Plot head, sensor, and source space alignment in 3D.
mne.Info | NoneThe 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 | NoneIf 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.
strThe FreeSurfer subject name. Can be omitted if src is provided.
NoneThe path to the directory containing the FreeSurfer subjects
reconstructions. If None, defaults to the SUBJECTS_DIR environment
variable.
str | list | dictSurfaces 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 | NoneCan 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 | listString 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).
ForwardThe 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 | NoneIf not None, also plot the source space points.
strPlot 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 | NoneCan 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 | NoneCan 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 | NonePyVista 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 | NoneControl 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.
Figure3DThe 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#The role of dipole orientations in distributed source localization
EEG source localization given electrode locations on an MRI
Annotate movement artifacts and reestimate dev_head_t
How to convert 3D electrode positions to a 2D image
Compute source power spectral density (PSD) of VectorView and OPM data