supereeg.load

supereeg.load(fname, vox_size=None, return_type=None, sample_inds=None, loc_inds=None, field=None)[source]

Load nifti file, brain or model object, or example data.

This function can load in example data, as well as nifti objects (.nii), brain objects (.bo) and model objects (.mo) by detecting the extension and calling the appropriate load function. Thus, be sure to include the file extension in the fname parameter.

Parameters:
fname : str

The name of the example data or a filepath.

Examples include :

example_data - example brain object (n = 64)

example_filter - load example patient data with kurtosis thresholded channels (n = 40)

example_model - example model object with locations from gray masked brain downsampled to 20mm (n = 210)

example_nifti - example nifti file from gray masked brain downsampled to 20mm (n = 210)

Nifti templates :

gray - load gray matter masked MNI 152 brain

std - load MNI 152 standard brain

Models :

pyfr - model used for analyses from Owen LLW and Manning JR (2017) Towards Human Super EEG. bioRxiv: 121020`

vox_size options: 6mm and 20mm

vox_size : int or float

Voxel size for loading and resampling nifti image

return_type : str

Option for loading data

‘bo’ - returns supereeg.Brain

‘mo’ - returns supereeg.Model

‘nii’ - returns supereeg.Nifti

sample_inds : int, list or slice

Indices of samples you’d like to load in. Only works for Brain object.

loc_inds : int, list or slice

Indices of slices you’d like to load in. Only works for Brain object.

field : str

The particular field of the data you want to load. This will work for Brain objects and Model objects.

Returns:
data : supereeg.Nifti, supereeg.Brain or supereeg.Model

Data to be returned