plots.figure_voltage_snippets
plots.figure_voltage_snippets(
snippets,
vrange=None,
cmap='Greys_r',
show_colorbar=True,
show_titles=True,
fig=None,
axs=None,
)Voltage images (channels × time) of one or several snippets, side by side.
Each panel is drawn by ibldsp.plots.voltageshow. Crop the time window before calling, e.g. data[:, :int(0.05 * fs)] for 50 ms.
Args: snippets (dict[str, tuple[np.ndarray, float]]): {title: (data, fs)}, with data of shape (n_channels, n_samples) in volts and fs in Hz. For example the destriped AP and LF bands, or the raw and destriped AP. vrange (float, optional): Colour range, ± µV, for every panel. Defaults to 4 times the median channel standard deviation of each panel, so the channels outside the brain, which are much larger, do not grey out the others. cmap (str, optional): Matplotlib colormap name. Defaults to “Greys_r”. show_colorbar (bool, optional): Draw a colorbar beside each panel. Defaults to True. show_titles (bool, optional): Title each panel with its key. Defaults to True. fig (matplotlib.figure.Figure, optional): Figure of axs. axs (Sequence[matplotlib.axes.Axes], optional): One axes per snippet.
Returns: tuple: The figure, and a dict of axes keyed by snippet title.