Plot head, sensor, and source space alignment in 3D.
mne.Info
| None
The mne.Info
object with information about the sensors and methods of measurement. If None (default), no sensor information will be shown.
dict
| instance of Transform
| None
If str, the path to the head<->MRI transform *-trans.fif
file produced
during coregistration. Can also be 'fsaverage'
to use the built-in
fsaverage transformation.
If trans is None, an identity matrix is assumed.
Changed in version 0.19: Support for ‘fsaverage’ argument.
str
The FreeSurfer subject name. Can be omitted if src
is provided.
None
The path to the directory containing the FreeSurfer subjects
reconstructions. If None
, defaults to the SUBJECTS_DIR
environment
variable.
str
| list
| dict
Surfaces to plot. Supported values:
scalp: one of ‘head’, ‘outer_skin’ (alias for ‘head’), ‘head-dense’, or ‘seghead’ (alias for ‘head-dense’)
skull: ‘outer_skull’, ‘inner_skull’, ‘brain’ (alias for ‘inner_skull’)
brain: one of ‘pial’, ‘white’, ‘inflated’, or ‘brain’ (alias for ‘pial’).
Can be dict to specify alpha values for each surface. Use None to specify default value. Specified values must be between 0 and 1. for example:
surfaces=dict(brain=0.4, outer_skull=0.6, head=None)
Defaults to ‘auto’, which will look for a head surface and plot it if found.
Note
For single layer BEMs it is recommended to use 'brain'
.
The coordinate frame to use. If 'auto'
(default), chooses 'mri'
if trans
was passed, and 'head'
otherwise.
Changed in version 1.0: Defaults to 'auto'
.
str
| list
| bool | None
Can be “helmet”, “sensors” or “ref” to show the MEG helmet, sensors or
reference sensors respectively, or a combination like
('helmet', 'sensors')
(same as None, default). True translates to
('helmet', 'sensors', 'ref')
.
str
| list
String options are:
True
)Shows EEG sensors using their digitized locations (after
transformation to the chosen coord_frame
)
The EEG locations projected onto the scalp, as is done in forward modeling
Can also be a list of these options, or an empty list ([]
,
equivalent of False
).
Forward
The forward solution. If present, the orientations of the dipoles present in the forward solution are displayed.
If True, plot the digitization points; ‘fiducials’ to plot fiducial points only.
If True (default), show ECoG sensors.
SourceSpaces
| None
If not None, also plot the source space points.
str
Plot MRI fiducials (default False). If True
, look for a file with
the canonical name (bem/{subject}-fiducials.fif
). If str
,
it can be 'estimated'
to use mne.coreg.get_mni_fiducials()
,
otherwise it should provide the full path to the fiducials file.
New in version 0.22: Support for 'estimated'
.
list
of dict
| instance of ConductorModel
| None
Can be either the BEM surfaces (list of dict), a BEM solution or a
sphere model. If None, we first try loading
'$SUBJECTS_DIR/$SUBJECT/bem/$SUBJECT-$SOURCE.fif'
, and then look
for '$SUBJECT*$SOURCE.fif'
in the same directory. For
'outer_skin'
, the subjects bem and bem/flash folders are searched.
Defaults to None.
If True (default), show sEEG electrodes.
str
| list
| bool | None
Can be “channels”, “pairs”, “detectors”, and/or “sources” to show the
fNIRS channel locations, optode locations, or line between
source-detector pairs, or a combination like ('pairs', 'channels')
.
True translates to ('pairs',)
.
.. versionadded:: 0.20
If True (default False), coordinate frame axis indicators will be shown:
head in pink.
MRI in gray (if trans is not None
).
MEG in blue (if MEG sensors are present).
New in version 0.16.
If True (default), show DBS (deep brain stimulation) electrodes.
Figure3D
| None
PyVista scene in which to plot the alignment.
If None
, creates a new 600x600 pixel figure with black background.
New in version 0.16.
How interactions with the scene via an input device (e.g., mouse or
trackpad) modify the camera position. If 'terrain'
, one axis is
fixed, enabling “turntable-style” rotations. If 'trackball'
,
movement along all axes is possible, which provides more freedom of
movement, but you may incidentally perform unintentional rotations along
some axes.
New in version 0.16.
Changed in version 1.0: Defaults to 'terrain'
.
str
| int
| None
Control verbosity of the logging output. If None
, use the default
verbosity level. See the logging documentation and
mne.verbose()
for details. Should only be passed as a keyword
argument.
Figure3D
The figure.
See also
Notes
This function serves the purpose of checking the validity of the many different steps of source reconstruction:
Transform matrix (keywords trans
, meg
and mri_fiducials
),
BEM surfaces (keywords bem
and surfaces
),
sphere conductor model (keywords bem
and surfaces
) and
source space (keywords surfaces
and src
).
New in version 0.15.
mne.viz.plot_alignment
#Source alignment and coordinate frames
Using an automated approach to coregistration
Head model and forward computation
EEG forward operator with a template MRI
The role of dipole orientations in distributed source localization
EEG source localization given electrode locations on an MRI
Brainstorm Elekta phantom dataset tutorial
Brainstorm CTF phantom dataset tutorial
4D Neuroimaging/BTi phantom dataset tutorial
Annotate movement artifacts and reestimate dev_head_t
How to convert 3D electrode positions to a 2D image
Plotting EEG sensors on the scalp
Plotting sensor layouts of MEG systems
Plotting sensor layouts of EEG systems
Compute source power spectral density (PSD) of VectorView and OPM data
Generate a left cerebellum volume source space
Optically pumped magnetometer (OPM) data