EMGZarrDataset#
- class myoverse.datasets.loader.EMGZarrDataset(zarr_file, subset_name, target_name, emg_dtype=<class 'numpy.float32'>, target_dtype=<class 'numpy.float32'>, sampling_frequency=2048.0, input_data_class=<class 'myoverse.datatypes.EMGData'>, target_data_class=<class 'myoverse.datatypes.KinematicsData'>, input_augmentation_pipeline=None, input_augmentation_probabilities=None, target_augmentation_pipeline=None, target_augmentation_probabilities=None, cache_size=100)[source]#
Dataset class for loading EMG data from Zarr files.
- Parameters:
zarr_file (Path) – The path to the zarr file
subset_name (str) – The name of the subset to load (e.g., “training”, “validation”, “testing”)
target_name (str) – The name of the target data
emg_dtype (np.dtype, optional) – The data type of the EMG data, by default np.float32
target_dtype (np.dtype, optional) – The data type of the target data, by default np.float32
sampling_frequency (float, optional) – The sampling frequency of the EMG data in Hz, by default 2048.0
input_data_class (Type[_Data], optional) – The class to use for input data, by default EMGData
target_data_class (Type[_Data], optional) – The class to use for target data, by default KinematicsData
input_augmentation_pipeline (list[list[FilterBaseClass]], optional) – The augmentation pipeline for the input data
input_augmentation_probabilities (Sequence[float], optional) – The probabilities for each input augmentation pipeline
target_augmentation_pipeline (list[list[FilterBaseClass]], optional) – The augmentation pipeline for the target data
target_augmentation_probabilities (Sequence[float], optional) – The probabilities for each target augmentation pipeline
cache_size (int, optional) – The maximum number of items to cache, by default 100
Methods
__getitem__
(idx)__init__
(zarr_file, subset_name, target_name)__len__
()Validate that augmentation probabilities are valid.