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.

__init__(config_path: Path)

Initializes a new instance of the MappingConfigs class.

Reads the yaml file into memory.

Parameters:

config_path – The path to the configuration file.

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.

Parameters:

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.