intan.processing package¶
Signal processing, filtering, feature extraction, and metrics utilities for EMG data.
intan.processing._metrics_utils
Utilities for loading gesture metrics and creating gesture-label mappings.
This module: - Loads EMG trial classification metadata from CSV or TXT - Parses gesture names into integer class mappings - Provides helper functions for checking or retrieving metrics files
Used in training/testing pipelines that require alignment between gesture labels and EMG signal segments.
- load_metrics_data(metrics_filepath, verbose=True)[source]¶
Loads the metrics data from the specified file path and returns the data along with the gesture mapping.
- Parameters:
metrics_filepath (str) – The path to the metrics data file.
verbose (bool) – Whether to print the loaded data and gesture mapping.
- Returns:
A tuple containing the metrics data as a pandas DataFrame and the gesture mapping as a dictionary.
- Return type:
tuple
- get_metrics_file(metrics_filepath, verbose=False)[source]¶
Checks if the metrics file exists at the specified path. If it does, loads the data and returns it.
- Parameters:
metrics_filepath (str) – The path to the metrics data file.
verbose (bool) – Whether to print the loaded data.
- Returns:
The loaded metrics data as a pandas DataFrame.
- Return type:
pd.DataFrame