meegpype.interfaces.mne.sources moduleπŸ”—

class meegpype.interfaces.mne.sources.CombineSourceSpaces(from_file=None, resource_monitor=None, ignore_exception=False, **inputs)πŸ”—

Bases: BaseInterface

Mandatory Inputs:
  • fname (a string or os.PathLike object) – Output file name. Use a name <dir>/<name>-src.fif.

  • sources (a list of at least 2 items which are a string or os.PathLike object referring to an existing file) – List of source files.

Optional Inputs:
  • overwrite (a boolean) – Overwrite existing files.

  • verbose (a boolean) – Enable verbose mode (printing of log messages).

Outputs:

src (a pathlike object or string representing an existing file) – The combined sources.

class meegpype.interfaces.mne.sources.SetupSurfaceSourceSpace(from_file=None, resource_monitor=None, ignore_exception=False, **inputs)πŸ”—

Bases: BaseInterface

Mandatory Inputs:
  • fname (a string or os.PathLike object) – Output file name. Use a name <dir>/<name>-src.fif.

  • subject (a string) – Subject name (required). Maps to a command-line argument: --subject %s.

  • subjects_dir (a pathlike object or string representing an existing directory) – Subjects directory. Maps to a command-line argument: --subjects-dir=%s.

Optional Inputs:
  • add_dist (True or False or β€˜patch’) – Add distances. Can be β€˜True’, β€˜False’, or β€˜patch’ to only compute cortical patch statistics (like the –cps option in MNE-C).

  • n_jobs (1 or 2) – The number of jobs to run in parallel (default 1). Requires the joblib package. Will use at most 2 jobs (one for each hemisphere).

  • overwrite (a boolean) – Overwrite existing files.

  • spacing (a string or an integer) – The spacing to use. Can be β€˜ico#’ for a recursively subdivided icosahedron,’oct#’ for a recursively subdivided octahedron, β€˜all’ for all points, or an integer to use approximate distance-based spacing (in mm)..

  • surface (a string) – The surface to use.

  • verbose (a boolean) – Enable verbose mode (printing of log messages).

Outputs:

src (a pathlike object or string representing an existing file) – The resulting source space.

class meegpype.interfaces.mne.sources.SetupVolumeSourceSpace(from_file=None, resource_monitor=None, ignore_exception=False, **inputs)πŸ”—

Bases: BaseInterface

Mandatory Inputs:
  • fname (a string or os.PathLike object) – Output file name. Use a name <dir>/<name>-src.fif.

  • subject (a string) – Subject name (required).

Optional Inputs:
  • add_interpolator (a boolean) – If True and mri is not None, then an interpolation matrix will be produced. Requires inputs: mri.

  • bem (a string or os.PathLike object referring to an existing file) – Define source space bounds using a BEM file (specifically the inner skull surface). Mutually exclusive with inputs: sphere, surface.

  • exclude (a float) – Exclude points closer than this distance (mm) from the center of mass of the bounding surface.

  • mindist (a float) – Exclude points closer than this distance (mm) to the bounding surface.

  • mri (a string or os.PathLike object referring to an existing file or None) – The filename of an MRI volume (mgh or mgz) to create the interpolation matrix over. Source estimates obtained in the volume source space can then be morphed onto the MRI volume using this interpolator.

  • n_jobs (1 or 2) – The number of jobs to run in parallel (default 1). Requires the joblib package. Will use at most 2 jobs (one for each hemisphere).

  • overwrite (a boolean) – Overwrite existing files.

  • pos (a float) – Positions to use for sources. A grid will be constructed with the spacing given by pos in mm, generating a volume source space.

  • single_volume (a boolean) – If True, multiple values of volume_label will be merged into a a single source space instead of occupying multiple source spaces (one for each sub-volume), i.e., len(src) will be 1 instead of len(volume_label). This can help conserve memory and disk space when many labels are used. Requires inputs: volume_label.

  • sphere (an array with shape (4,)) – Define spherical source space bounds using origin and radius given by (Ox, Oy, Oz, rad) in sphere_units. Mutually exclusive with inputs: bem, surface.

  • sphere_units (β€˜m’ or β€˜mm’) – Defaults to β€˜m’.

  • subjects_dir (a string or os.PathLike object referring to an existing directory) – Subjects directory.

  • surface (a string or os.PathLike object referring to an existing file) – Define source space bounds using a FreeSurfer surface file. Mutually exclusive with inputs: bem.

  • verbose (a boolean) – Enable verbose mode (printing of log messages).

  • volume_label (a list of items which are any value) – Region(s) of interest to use. None (default) will create a single whole-brain source space. Otherwise, a separate source space will be created for each entry in the list or dict (str will be turned into a single-element list). Standard Freesurfer labels are assumed.

Outputs:

src (a pathlike object or string representing an existing file) – The resulting source space.