EmgManager#
- class pyCGM2.EMG.emgManager.EmgManager(DATA_PATH: str, emgSettings: str | Dict | None = None)#
Class to manage EMG settings (i.e., the emg.settings file).
This class is designed to handle the configuration and retrieval of EMG settings, which include channel information and processing parameters.
- Parameters:
DATA_PATH (str) – Data folder path where the EMG settings file is located.
emgSettings (Optional[Union[str, Dict]]) – Filename or (path+filename) with EMG settings or a dictionary of EMG settings.
None (If) –
loaded. (default settings are) –
- __init__(DATA_PATH: str, emgSettings: str | Dict | None = None)#
Initializes the EmgManager with a path to the data folder and EMG settings
Methods
__init__
(DATA_PATH[, emgSettings])Initializes the EmgManager with a path to the data folder and EMG settings
getChannel
(muscle, eventContext)Return the EMG channel label from a defined muscle and eventContext.
Return the channel section of the EMG settings.
Return the EMG channel labels from the settings.
Return the muscle names associated with EMG channels.
Return the normal activity muscle reference from the EMG settings.
Return the processing section of the EMG settings.
getSides
()Return the side (context) of each EMG channel.
- getChannel(muscle: str, eventContext: str)#
Return the EMG channel label from a defined muscle and eventContext.
- Returns:
str – the emg hannel.
- getChannelSection()#
Return the channel section of the EMG settings.
This section typically contains configuration related to EMG channels.
- Returns:
Dict – The channel section of the EMG settings.
- getChannels()#
Return the EMG channel labels from the settings.
Filters out channels that are not associated with a muscle.
- Returns:
List[str] – List of EMG channel labels.
- getMuscles()#
Return the muscle names associated with EMG channels.
Filters out channels that are not associated with a muscle.
- Returns:
List[str] – List of muscle names corresponding to EMG channels.
- getNormalActivity()#
Return the normal activity muscle reference from the EMG settings.
This information is used for normalization purposes during EMG processing.
- Returns:
List[str] – List of normal activities for each muscle.
- getProcessingSection()#
Return the processing section of the EMG settings.
This section usually includes parameters related to EMG signal processing.
- Returns:
Dict – The processing section of the EMG settings.
- getSides()#
Return the side (context) of each EMG channel.
Filters out channels that are not associated with a muscle.
- Returns:
List[str] – List of sides (e.g., ‘Left’, ‘Right’) for each EMG channel.