hnn_core.viz.plot_tfr_morlet

hnn_core.viz.plot_tfr_morlet(dpl, freqs, *, n_cycles=7.0, tmin=None, tmax=None, layer='agg', decim=None, padding='zeros', ax=None, colormap='inferno', colorbar=True, show=True)

Plot Morlet time-frequency representation of dipole time course

Parameters
dplinstance of Dipole | list of Dipole instances

The Dipole object. If a list of dipoles is given, the power is calculated separately for each trial, then averaged.

freqsarray

Frequency range of interest.

n_cyclesfloat or array of float, default 7.0

Number of cycles. Fixed number or one per frequency.

tminfloat or None

Start time of plot in milliseconds. If None, plot entire simulation.

tmaxfloat or None

End time of plot in milliseconds. If None, plot entire simulation.

layerstr, default ‘agg’

The layer to plot. Can be one of ‘agg’, ‘L2’, and ‘L5’

decimint or list of int or None (default)

Optional (integer) factor by which to decimate the raw dipole traces. The SciPy function decimate() is used, which recommends values <13. To achieve higher decimation factors, a list of ints can be provided. These are applied successively.

paddingstr or None

Optional padding of the dipole time course beyond the plotting limits. Possible values are: ‘zeros’ for padding with 0’s (default), ‘mirror’ for mirror-image padding.

axinstance of matplotlib figure | None

The matplotlib axis

colormapstr

The name of a matplotlib colormap, e.g., ‘viridis’. Default: ‘inferno’

colorbarbool

If True (default), adjust figure to include colorbar.

showbool

If True, show the figure

Returns
figinstance of matplotlib Figure

The matplotlib figure handle.