mne.viz.EvokedField#
- class mne.viz.EvokedField(evoked, surf_maps, *, time=None, time_label='t = %0.0f ms', n_jobs=None, fig=None, vmax=None, n_contours=21, show_density=True, alpha=None, interpolation='nearest', interaction='terrain', time_viewer='auto', verbose=None)[source]#
Plot MEG/EEG fields on head surface and helmet in 3D.
- Parameters:
- evokedinstance of
mne.Evoked
The evoked object.
- surf_maps
list
The surface mapping information obtained with make_field_map.
- time
float
|None
The time point at which the field map shall be displayed. If None, the average peak latency (across sensor types) is used.
- time_label
str
|None
How to print info about the time instant visualized.
- n_jobs
int
|None
The number of jobs to run in parallel. If
-1
, it is set to the number of CPU cores. Requires thejoblib
package.None
(default) is a marker for ‘unset’ that will be interpreted asn_jobs=1
(sequential execution) unless the call is performed under ajoblib.parallel_config
context manager that sets another value forn_jobs
.- figinstance of
Figure3D
|None
If None (default), a new figure will be created, otherwise it will plot into the given figure.
New in v0.20.
- vmax
float
|dict
|None
Maximum intensity. Can be a dictionary with two entries
"eeg"
and"meg"
to specify separate values for EEG and MEG fields respectively. Can beNone
to use the maximum value of the data.New in v0.21.
New in v1.4:
vmax
can be a dictionary to specify separate values for EEG and MEG fields.- n_contours
int
The number of contours.
New in v0.21.
- show_densitybool
Whether to draw the field density as an overlay on top of the helmet/head surface. Defaults to
True
.- alpha
float
|dict
|None
Opacity of the meshes (between 0 and 1). Can be a dictionary with two entries
"eeg"
and"meg"
to specify separate values for EEG and MEG fields respectively. Can beNone
to use 1.0 when a single field map is shown, ordict(eeg=1.0, meg=0.5)
when both field maps are shown.New in v1.4.
- interpolation
str
|None
Interpolation method (
scipy.interpolate.interp1d
parameter). Must be one of'linear'
,'nearest'
,'zero'
,'slinear'
,'quadratic'
or'cubic'
.New in v1.6.
- interaction‘trackball’ | ‘terrain’
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. Defaults to'terrain'
.New in v1.1.
- time_viewerbool |
str
Display time viewer GUI. Can also be
"auto"
, which will meanTrue
if there is more than one time point andFalse
otherwise.New in v1.6.
- verbosebool |
str
|int
|None
Control verbosity of the logging output. If
None
, use the default verbosity level. See the logging documentation andmne.verbose()
for details. Should only be passed as a keyword argument.
- evokedinstance of
Methods
set_contours
(n_contours)Adjust the number of contour lines to use when drawing the fieldlines.
set_time
(time)Set the time to display (in seconds).
set_vmax
(vmax[, kind])Change the color range of the density maps.
Notes
The figure will publish and subscribe to the following UI events:
Contours
,kind="field_strength_meg" | "field_strength_eeg"
ColormapRange
,kind="field_strength_meg" | "field_strength_eeg"
- set_contours(n_contours)[source]#
Adjust the number of contour lines to use when drawing the fieldlines.
- Parameters:
- n_contours
int
The number of contour lines to use.
- n_contours
Examples using mne.viz.EvokedField
#
Using the event system to link figures