- mne.viz.plot_epochs_psd_topomap(epochs, bands=None, tmin=None, tmax=None, proj=False, bandwidth=None, adaptive=False, low_bias=True, normalization='length', ch_type=None, cmap=None, agg_fun=None, dB=False, n_jobs=1, normalize=False, cbar_fmt='auto', outlines='head', axes=None, show=True, sphere=None, vlim=(None, None), verbose=None)¶
Plot the topomap of the power spectral density across epochs.
- epochsinstance of
The epochs object.
The frequencies or frequency ranges to plot. Length-2 tuples specify a single frequency and a subplot title (e.g.,
(6.5, 'presentation rate')); length-3 tuples specify lower and upper band edges and a subplot title. If
None(the default), expands to:
bands = [(0, 4, 'Delta'), (4, 8, 'Theta'), (8, 12, 'Alpha'), (12, 30, 'Beta'), (30, 45, 'Gamma')]
In bands where a single frequency is provided, the topomap will reflect the single frequency bin that is closest to the provided value.
Start time to consider.
End time to consider.
The bandwidth of the multi taper windowing function in Hz. The default value is a window half-bandwidth of 4 Hz.
Use adaptive weights to combine the tapered spectra into PSD (slow, use n_jobs >> 1 to speed up computation).
Only use tapers with more than 90% spectral concentration within bandwidth.
Either “full” or “length” (default). If “full”, the PSD will be normalized by the sampling rate as well as the length of the signal (as in nitime).
- ch_type‘mag’ | ‘grad’ | ‘planar1’ | ‘planar2’ | ‘eeg’ |
The channel type to plot. For ‘grad’, the gradiometers are collected in pairs and the mean for each pair is plotted. If None, then first available channel type from order given above is used. Defaults to None.
- cmapmatplotlib colormap | (colormap, bool) | ‘interactive’ |
Colormap to use. If
tuple, the first value indicates the colormap to use and the second value is a boolean defining interactivity. In interactive mode the colors are adjustable by clicking and dragging the colorbar with left and right mouse button. Left mouse button moves the scale up and down and right mouse button adjusts the range. Hitting space bar resets the range. Up and down arrows can be used to change the colormap. If
'Reds'is used for data that is either all-positive or all-negative, and
'RdBu_r'is used otherwise.
'interactive'is equivalent to
(None, True). Defaults to
True, transform data to decibels (with
10 * np.log10(data)) following the application of
agg_fun. Ignored if
The number of jobs to run in parallel (default 1). Requires the joblib package.
If True, each band will be divided by the total power. Defaults to False.
Format string for the colorbar tick labels. If
'auto', is equivalent to ‘%0.3f’ if
dB=Falseand ‘%0.1f’ if
dB=True. Defaults to
- outlines‘head’ | ‘skirt’ |
The outlines to be drawn. If ‘head’, the default head scheme will be drawn. If ‘skirt’ the head scheme will be drawn, but sensors are allowed to be plotted outside of the head circle. If dict, each key refers to a tuple of x and y positions, the values in ‘mask_pos’ will serve as image mask. Alternatively, a matplotlib patch object can be passed for advanced masking options, either directly or as a function that returns patches (required for multi-axis plots). If None, nothing will be drawn. Defaults to ‘head’.
List of axes to plot consecutive topographies to. If
Nonethe axes will be created automatically. Defaults to
Show figure if True.
float| array_like |
The sphere parameters to use for the cartoon head. Can be array-like of shape (4,) to give the X/Y/Z origin and radius in meters, or a single float to give the radius (origin assumed 0, 0, 0). Can also be a spherical ConductorModel, which will use the origin and radius. Can be “auto” to use a digitization-based fit. Can also be None (default) to use ‘auto’ when enough extra digitization points are available, and 0.095 otherwise. Currently the head radius does not affect plotting.
New in version 0.20.
tupleof length 2 | ‘joint’
Colormap limits to use. If a
tupleof floats, specifies the lower and upper bounds of the colormap (in that order); providing
Nonefor either entry will set the corresponding boundary at the min/max of the data (separately for each topomap). Elements of the
tuplemay also be callable functions which take in a
NumPy arrayand return a scalar. If
vlim='joint', will compute the colormap limits jointly across all topomaps of the same channel type, using the min/max of the data. Defaults to
New in version 0.21.
- verbosebool |
- epochsinstance of
- figinstance of
Figure distributing one image per channel across sensor topography.
- figinstance of