mne.viz.plot_trans

mne.viz.plot_trans(info, trans=’auto’, subject=None, subjects_dir=None, ch_type=None, source=(‘bem’, ’head’, ’outer_skin’), coord_frame=’head’, meg_sensors=(‘helmet’, ’sensors’), eeg_sensors=’original’, dig=False, ref_meg=False, ecog_sensors=True, head=None, brain=None, skull=False, src=None, mri_fiducials=False, verbose=None)[source]

Plot head, sensor, and source space alignment in 3D.

Parameters:

info : dict

The measurement info.

trans : str | ‘auto’ | dict | None

The full path to the head<->MRI transform *-trans.fif file produced during coregistration. If trans is None, an identity matrix is assumed.

subject : str | None

The subject name corresponding to FreeSurfer environment variable SUBJECT. Can be omitted if src is provided.

subjects_dir : str

The path to the freesurfer subjects reconstructions. It corresponds to Freesurfer environment variable SUBJECTS_DIR.

ch_type : None | ‘eeg’ | ‘meg’

This argument is deprecated. Use meg_sensors and eeg_sensors instead.

source : str | list

Type to load. Common choices would be ‘bem’, ‘head’ or ‘outer_skin’. If list, the sources are looked up in the given order and first found surface is used. 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 ‘bem’. Note. For single layer bems it is recommended to use ‘head’.

coord_frame : str

Coordinate frame to use, ‘head’, ‘meg’, or ‘mri’.

meg_sensors : bool | str | list

Can be “helmet” (equivalent to False) or “sensors” to show the MEG helmet or sensors, respectively, or a combination of the two like ['helmet', 'sensors'] (equivalent to True, default) or [].

eeg_sensors : bool | str | list

Can be “original” (default; equivalent to True) or “projected” to show EEG sensors in their digitized locations or projected onto the scalp, or a list of these options including [] (equivalent of False).

dig : bool | ‘fiducials’

If True, plot the digitization points; ‘fiducials’ to plot fiducial points only.

ref_meg : bool

If True (default False), include reference MEG sensors.

ecog_sensors : bool

If True (default), show ECoG sensors.

head : bool | None

If True, show head surface. Can also be None, which will show the head surface for MEG and EEG, but hide it if ECoG sensors are present.

brain : bool | str | None

If True, show the brain surfaces. Can also be a str for surface type (e.g., ‘pial’, same as True), or None (True for ECoG, False otherwise).

skull : bool | str | list of str | list of dict

Whether to plot skull surface. If string, common choices would be ‘inner_skull’, or ‘outer_skull’. Can also be a list to plot multiple skull surfaces. If a list of dicts, each dict must contain the complete surface info (such as you get from mne.make_bem_model()). True is an alias of ‘outer_skull’. The subjects bem and bem/flash folders are searched for the ‘surf’ files. Defaults to False.

src : instance of SourceSpaces | None

If not None, also plot the source space points.

New in version 0.14.

mri_fiducials : bool | str

Plot MRI fiducials (default False). If True, look for a file with the canonical name (bem/{subject}-fiducials.fif). If str it should provide the full path to the fiducials file.

New in version 0.14.

verbose : bool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

Returns:

fig : instance of mlab.Figure

The mayavi figure.