Mapping
- class gaitalytics.mapping.MappedMarkers(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
- class gaitalytics.mapping.MappingConfigs(config_path: Path)
A class for reading the mapping configuration file.
This class provides methods to read the mapping configuration file and get the markers and analogs for analysis. The file has to be in the YAML format and has to follow this structure:
- analysis: (Section to define the markers and analogs for general analysis)
- markers: (List of markers to be used for analysis)
Marker1
Marker2
…
- analogs: (List of analogs to be used for analysis)
Analog1
Analog2
…
- mapping: (Section to define the mapping of markers to compute complex metrics)
- markers: (List of mappings for markers)
right_heel = RHEE …
- analogs: (List of mappings for analogs)
right_heel = RHEE …
- get_analogs_analysis() list[str]
Gets the analogs for analysis.
- Returns:
A list of analog names to be used for analysis if present in the config file, otherwise an empty list.
- Raises:
ValueError: If the analysis section is missing in the config file.
- get_marker_mapping(marker: MappedMarkers) str
Gets the mapping of markers.
- Args:
marker: The marker to get the mapping for.
- Returns:
The mapped marker name if present in the config file.
- Raises:
ValueError: If sections in the mapping are missing in the config file.
- get_markers_analysis() list[str]
Gets the markers for analysis.
- Returns:
A list of marker names to be used for analysis if present in the config file, otherwise an empty list.
- Raises:
ValueError: If the analysis section is missing in the config file.