mne.simulation.select_source_in_label#
- mne.simulation.select_source_in_label(src, label, random_state=None, location='random', subject=None, subjects_dir=None, surf='sphere')[source]#
Select source positions using a label.
- Parameters:
- src
list
ofdict
The source space.
- label
Label
The label.
- random_state
None
|int
| instance ofRandomState
A seed for the NumPy random number generator (RNG). If
None
(default), the seed will be obtained from the operating system (seeRandomState
for details), meaning it will most likely produce different output every time this function or method is run. To achieve reproducible results, pass a value here to explicitly initialize the RNG with a defined state.- location
str
The label location to choose. Can be ‘random’ (default) or ‘center’ to use
mne.Label.center_of_mass()
(restricting to vertices both in the label and in the source space). Note that for ‘center’ mode the label values are used as weights.New in version 0.13.
- subject
str
|None
The subject the label is defined for. Only used with
location='center'
.New in version 0.13.
- subjects_dirpath-like |
None
The path to the directory containing the FreeSurfer subjects reconstructions. If
None
, defaults to theSUBJECTS_DIR
environment variable.New in version 0.13.
- surf
str
The surface to use for Euclidean distance center of mass finding. The default here is “sphere”, which finds the center of mass on the spherical surface to help avoid potential issues with cortical folding.
New in version 0.13.
- src
- Returns: