pnpl.datasets.mixins.EpochedH5Mixin#
- class pnpl.datasets.mixins.EpochedH5Mixin[source]#
Mixin for loading epoched H5 MEG data.
Classes using this mixin should have: - data_path: str - Base data directory
- __init__()#
Methods
__init__()get_epoch(idx)Get a single epoch by index.
get_epoched_h5_path(partition[, preprocessing])Construct path to epoched H5 file.
get_label(idx)Get label for a trial.
init_epoched_data(partition[, ...])Initialize epoched data from H5 file.
load_epoched_h5(h5_path[, preload])Load epoched data from H5 file.
Attributes
dataGet the epoched data array (trials, channels, time).
labelsGet the labels array (trials,).
n_channelsGet number of channels.
n_timesGet number of time points per epoch.
n_trialsGet number of trials.
timesGet the time vector (time,).