biopsykit.io.tfm module
Module for loading and processing Task Force Monitor (TFM) data.
-
class biopsykit.io.tfm.TFMDataset(data_dict, sampling_rate_dict, tz=None)[source]
Bases: object
Initialize a TFM dataset.
- Parameters
data_dict (dict) – Dictionary containing TFM data. Keys are channel names, values are dataframes with the TFM data.
tz (str, optional) – Timezone of the data. Default: None
sampling_rate_dict (dict[str, float]) –
-
CHANNEL_MAPPING: ClassVar[dict[str, str]] = {'ecg_1': 'rawECG1', 'ecg_2': 'rawECG2', 'icg_der': 'rawICG'}
-
classmethod from_mat_file(path, tz='Europe/Berlin')[source]
Load a TFM dataset from a .mat file.
- Parameters
path (str or Path) – Path to the .mat file.
tz (str, optional) – Timezone of the data. Default: “Europe/Berlin”
-
data_as_df()[source]
Return the TFM data as a dictionary of pandas DataFrames.
- Returns
Dictionary containing the TFM data as pandas DataFrames. Keys are channel names, values are the dataframes.
- Return type
dict