Input / Output
Warning
File types .sto, .trc, .csv are not tested yet.
This module provides classes for reading biomechanical file-types.
- class gaitalytics.io.AnalogsInputFileReader(file_path: Path)
A class for handling analog data in an easy and convenient way.
Uses the pyomeca.Analogs class to read analog data from a file.
- get_analogs() DataArray
Gets the analog data from the input file.
- Returns:
An xarray DataArray containing the analog data.
- class gaitalytics.io.AnalysisInputReader(file_path: Path, configs: MappingConfigs)
Read out data from modelled data form different input format.
- get_analysis() DataArray
Gets the analysis data from the input file.
- Returns:
An xarray DataArray containing the analysis data.
- class gaitalytics.io.C3dEventFileWriter(file_path: Path)
A class for handling C3D files in an easy and convenient way.
- write_events(events: DataFrame, file_path: Path | None = None)
Write the events to the output file.
- Args:
events: The events to write to the output file. file_path: The path to the output file if deviating from the input file.
- class gaitalytics.io.C3dEventInputFileReader(file_path: Path)
A class for handling C3D files in an easy and convenient way.
Implements the EventInputFileReader interface to read events from C3D files.
- get_events() DataFrame
Gets the events from the input file sorted by time.
- Returns:
A DataFrame containing the events.
- Raises:
ValueError: If no events are found in the C3D file.
- class gaitalytics.io.MarkersInputFileReader(file_path: Path)
A class for handling marker data in an easy and convenient way.
Uses the pyomeca.Markers class to read marker data from a file.
- get_markers() DataArray
Gets the markers from the input file.
- Returns:
An xarray DataArray containing the markers.
- class gaitalytics.io.NetCDFTrialExporter(file_path: Path)
A class for exporting trial data to NetCDF files.
- export_trial(trial: Trial | TrialCycles)
Export the trial to the output folder.
- Args:
trial: The trial to export. folder_path: The path to the output folder.