eelbrain.load.fiff.DatasetSTCLoader

class eelbrain.load.fiff.DatasetSTCLoader(data_dir)

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

Parameters:
data_dir : str

Path to directory containing stc files

See also

eelbrain.gui.load_stcs
a GUI to load source estimates into a Dataset

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"])
>>> ds = loader.make_dataset(subjects_dir="mri/")
Attributes:
data_dir : str

Path to data directory

subjects : tuple of str

Subject IDs extracted from stc filenames

factors : tuple of str

Names of experimental factors

levels : tuple of tuple of str

Names of levels of each factor in factors

Methods

make_dataset(self[, load_stcs, subject, src]) Load stcs into a Dataset with columns for subject and experimental factors
set_factor_names(self, factors) Set names of experimental factors