simnibs.SubjectFiles

class simnibs.SubjectFiles(fnamehead: str = None, subpath: str = None)

Bases: object

Class to find files for a given subject

Parameters
  • fnamehead (str (optional)) – Path to head mesh. Either fnamehead or subpath need to be set. subpath has preference when it comes to finding other files.

  • subpath (str (optional)) – Path to m2m_folder. Either fnamehead or subpath need to be set. subpath has preference when it comes to finding other files

fnamehead

Path to head mesh (.msh)

Type

str

subpath

Path to m2m_folder (dir)

Type

str

subid

The subject ID (eg: ernie)

Type

str

basedir

Path to the folder where the m2m_subid folder is located (dir)

Type

str

tensor_file

Path to the NifTi file with the tensor conductivity information (.nii.gz)

Type

str

eeg_cap_folder

Path to the folder with EEG caps (dir)

Type

str

eeg_cap_1010

Path to the EEG 10-10 electrode file (.csv)

Type

str

reference_volume

Path to the reference subject volume (.nii.gz)

Type

str

mni2conf_nonl

MNI to conform nonlinear transformation (.nii or .nii.gz)

Type

str

conf2mni_nonl

Conform to MNI nonlinear tansformation (.nii or .nii.gz)

Type

str

mni2conf_6dof

MNI to conform 6 DOF transfomation (.txt or .mat)

Type

str

mni2conf_12dof

MNI to conform 12 DOF transfomation (.txt or .mat)

Type

str

ref_fs

Reference FreeSurfer space file (.nii.gz)

Type

str

surf_dir

Directory with surfaces from CAT12/FreeSurfer segmentations (dir)

Type

str

seg_type

Type of segmentation (only in mri2mesh and headreco+CAT)

Type

‘headreco’ or ‘mri2mesh’

lh_midgm

Left hemisphere middle gray matter model (only for headreco+CAT segmentations) (.gii)

Type

str

rh_midgm

Right hemisphere middle right gray matter model (only for headreco+CAT segmentations) (.gii)

Type

str

lh_gm

Left hemisphere pial surface model (only for mri2mesh tranformations) (fs surface)

Type

str

rh_gm

Right hemisphere pial surface model (only for mri2mesh tranformations) (fs surface)

Type

str

lh_wm

Left hemisphere white matter surface model (only for mri2mesh tranformations) (fs surface)

Type

str

rh_wm

Right hemisphere white matter surface model (only for mri2mesh tranformations) (fs surface)

Type

str

lh_reg

Left hemisphere sphere registration file (only in mri2mesh and headreco+CAT) (fs surface or .gii)

Type

str

rh_reg

Right hemisphere sphere registration file (only in mri2mesh and headreco+CAT) (fs surface or .gii)

Type

str

final_contr

Volume mask after meshing (.nii.gz)

Type

str

masks_contr

Volume mask before meshing (.nii.gz)

Type

str

T1

T1 image after applying transformations

Type

str

Warning

This class does not check for existance of the files

__init__(fnamehead: str = None, subpath: str = None)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([fnamehead, subpath])

Initialize self.

get_eeg_cap([cap_name])

Gets the name of an EEG cap for this subject

get_eeg_cap(cap_name: str = 'EEG10-10_UI_Jurak_2007.csv') → str

Gets the name of an EEG cap for this subject

Parameters

cap_name (str (optional)) – Name of cap file. Default: ‘EEG10-10_UI_Jurak_2007.csv’

Returns

cap_fn – Path to the cap file

Return type

str

Warning

This does not check for existance of the file