Skip to content

LoadData

Bases: BaseClass

Class for loading BDF data from file.

MNE-functions used: mne.io.read_raw_bdf, mne.read_epochs, mne.io.read_raw_fif

Parameters:

Name Type Description Default
file_path str | Path

Path to the input BDF file.

required
preload bool | str

Preload data into memory for data manipulation and faster indexing. If True, the data will be preloaded into memory (fast, requires large amount of memory). If preload is a string, preload is the file name of a memory-mapped file which is used to store the data on the hard drive (slower, requires less memory).

True
**kwargs

Additional keyword arguments passed to the underlying mne.io.read_raw_bdf(), mne.io.read_raw_edf() or mne.io.read_raw_fif() functions by using a dictionary with load_bdf, load_edf, and load_fif or load_epochs as keys.

{}

Attributes:

Name Type Description
raw Raw

Loaded raw data.

Example settings for config file

Example settings in correct format for the config file.

LoadData:
    preload: True

If you need to pass extra arguments (**kwargs) to any of the underlying functions, use load_bdf, load_edf, load_fif, or load_epochs as key, depending on what type of file you are loading. These will be passed on as kwargs to mne.io.read_raw_bdf, mne.io.read_raw_edf, mne.io.read_raw_fif and mne.read_epochs, respectively.

When you run a pipeline using the Pipeline-class, LoadData should be omitted from your pipeline-configuration, as it is called automatically when the pipeline is created. If you need to pass extra arguments to any of the underlying functions while running a pipeline, either add them to your configuration-file in a section labeled Pipeline (see example below), or pass them directly as **kwargs when creating a new Pipeline.

Pipeline:
    load_bdf:
        encoding: 'latin-1'
        exclude_after_unique: true
    load_epochs:
        proj: 'delayed'