Analysis of time series calcium traces
(A) Depiction of raw fluorescence traces for 5 focal planes for the ROI, the annular background region, and the background-subtracted fluorescence (arbitrary units). X axis reports the datapoint number in the trace. Red indicates the focal plane defined as the “best” focal plane for this ROI.
(B) Calculation of ΔF/F values for the best focal plane defined as (F − F0)/F0. F0 is calculated by smoothing the background-subtracted fluorescence and then taking a running minimum.
(C) Preparation of the ΔF/F trace for peak detection. The ΔF/F trace is heavily smoothed to find the red shape of the trace. The difference between the ΔF/F and the smoothed trace reveals transients without any baseline shift. A two-cycle thresholding that considers the mean and standard deviation of the 5th through 95th percentile of datapoints reveals the signal component (red) above the noise. Peak detection algorithms can then proceed using this threshold.