hnn_core.viz.plot_laminar_csd

hnn_core.viz.plot_laminar_csd(times, data, contact_labels, ax=None, colorbar=True, vmin=None, vmax=None, sink='b', interpolation='spline', show=True)[source]

Plot laminar current source density (CSD) estimation from LFP array.

Parameters:
timesNumpy array, shape (n_times,)

Sampling times (in ms).

dataarray-like, shape (n_channels, n_times)

CSD data, channels x time.

axinstance of matplotlib figure | None

The matplotlib axis.

colorbarbool

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

contact_labelslist

Labels associated with the contacts to plot. Passed as-is to set_yticklabels().

vmin: float, optional

lower bound of the color axis. Will be set automatically of None.

vmax: float, optional

upper bound of the color axis. Will be set automatically of None.

sinkstr

If set to ‘blue’ or ‘b’, plots sinks in blue and sources in red, if set to ‘red’ or ‘r’, sinks plotted in red and sources blue.

interpolationstr | None

If ‘spline’, will smoothen the CSD using spline method, if None, no smoothing will be applied.

showbool

If True, show the plot.

Returns:
figinstance of matplotlib Figure

The matplotlib figure handle.