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)

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 (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)

Plot contours of an SLAP2 ROI over a reference image with color-coded super pixels.

This function plots the contours of specified ROIs over a reference image. The super pixels are color-coded.

Parameters:
  • datafile (SLAP2_Utils Datafile Object) – The datafile containing metadata and header information.

  • refimg (array) – Reference image, can be 3D (t, x, y) or 2D (x, y).

  • roiIdx (int or list) – Integer or list of integers for the ROI indices.

  • display (bool, optional) – If True, display the plot. 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)

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 (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