pnpl.datasets.mixins.EpochedH5Mixin

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

data

Get the epoched data array (trials, channels, time).

labels

Get the labels array (trials,).

n_channels

Get number of channels.

n_times

Get number of time points per epoch.

n_trials

Get number of trials.

times

Get the time vector (time,).