eelbrain.load.mne.DatasetSTCLoader

class eelbrain.load.mne.DatasetSTCLoader(data_dir)[source]

Load source estimates on disk into Dataset for use in statistical tests

Parameters:

data_dir (str) – Path to directory containing stc files

data_dir

Path to data directory

Type:

str

subjects

Subject IDs extracted from stc filenames

Type:

tuple[str, …]

factors

Names of experimental factors

Type:

tuple[str, …]

levels

Names of levels of each factor in factors

Type:

tuple[tuple[str, …], …]

Notes

When instantiated, the loader will automatically do level detection based on .stc filenames. The user must explicitly set the factor names with DatasetSTCLoader.set_factor_names(). The dataset may then be loaded via DatasetSTCLoader.make_dataset().

Examples

>>> loader = DatasetSTCLoader("path/to/exported/stcs")
>>> loader.set_factor_names(["factor1", "factor2"])
>>> data = loader.make_dataset(subjects_dir="mri/")

See also

eelbrain.gui.load_stcs

a GUI to load source estimates into a Dataset

Methods

make_dataset([load_stcs, subject, src])

Load stcs into a Dataset with columns for subject and experimental factors

set_factor_names(factors)

Set names of experimental factors