plots.slap2plots
This module is part of the plotting utilities and provides functions specifically designed for generating plots from SLAP2 data. It allows for the visualization of traces, ROI data, and other relevant metrics in a customizable manner.
Functions
- slap2_utils.utils.plots.slap2Plots.plotPixTrace(dffData, hz, start, end)[source]
Plot pixel-wise traces of fluorescence changes over time.
This function plots the traces of fluorescence changes for each super pixel over a specified time period.
- Parameters:
dffData (
np.array
) – The delta F/F data of super pixels.hz (float) – Sampling rate in Hertz.
start (int) – Start frame index.
end (int) – End frame index.
- Return type:
None
- slap2_utils.utils.plots.slap2Plots.roiOverlay(datafile, refimg, roiIdx, display=True)[source]
Plots contours of SLAP2 ROIs over a reference image with color-coded super pixels.
- Parameters:
datafile (
SLAP2_Utils Datafile Object
) – The datafile containing metadata and header information.refimg (
np.ndarray
) – Reference image; can be 3D (t, x, y) or 2D (x, y).roiIdx (int or list of int) – Single ROI index or a list of ROI indices to overlay.
display (bool,
optional
) – Whether to display the plot immediately. Default is True.
- Returns:
ax – Matplotlib Axes object with the plotted contours
- Return type:
matplotlib.axes.Axes
- slap2_utils.utils.plots.slap2Plots.roiOverlaySuperPix(datafile, refimg, roiIdx, display=True)[source]
Plot pixel-wise traces of fluorescence changes over time.
This function plots the traces of fluorescence changes for each super pixel over a specified time period.
- Parameters:
dffData (
np.array
) – The delta F/F data of super pixels.hz (float) – Sampling rate in Hertz.
start (int) – Start frame index.
end (int) – End frame index.
- Returns:
ax – Matplotlib axes object with the plotted contours
- Return type:
matplotlib.axes.Axes