Filters
These functions are tools for smoothing and filtering timeseries data.
- pyneurotrace.filters.nndSmooth(data, hz, tau, iterFunc=None)
Performs fast non-negative temporal deconvolution for laser scanning microscopy.
Podgorski, K., & Haas, K. (2013). Fast non‐negative temporal deconvolution for laser scanning microscopy. Journal of biophotonics, 6(2), 153-162.
- Parameters:
data (array) – Data array to be smoothed.
hz (int) – Sampling rate in Hz.
tau (float) – Time constant for the exponential decay.
iterFunc (function, optional) – Optional iteration function. Default is None.
- Returns:
smoothed_data – Smoothed data array.
- Return type:
array
- pyneurotrace.filters.okada(data, iterFunc=None)
A computationally efficient filter for reducing shot noise in low S/N data.
Okada, M., Ishikawa, T., & Ikegaya, Y. (2016). A computationally efficient filter for reducing shot noise in low S/N data. PloS one, 11(6), e0157595.
- Parameters:
data (array) – Data array to be filtered.
iterFunc (function, optional) – Optional iteration function. Default is None.
- Returns:
filtered_data – Filtered data array.
- Return type:
array
- pyneurotrace.filters.deltaFOverF0(data, hz, t0=0.2, t1=0.75, t2=3.0, iterFunc=None)
Calculates the change in fluorescence over baseline fluorescence. Optionally smoothed with an EWMA.
Jia, H., Rochefort, N. L., Chen, X., & Konnerth, A. (2011). In vivo two-photon imaging of sensory-evoked dendritic calcium signals in cortical neurons. Nature protocols, 6(1), 28.
- Parameters:
data (array) – Data array to be analyzed.
hz (int) – Sampling rate in Hz.
t0 (float, optional) – Time constant for exponential moving average. Default is 0.2.
t1 (float, optional) – Time window for calculating the mean baseline. Default is 0.75.
t2 (float, optional) – Time window for calculating the minimum baseline. Default is 3.0.
iterFunc (function, optional) – Optional iteration function. Default is None.
- Returns:
deltaF_over_F0 – Calculated change in fluorescence over baseline fluorescence.
- Return type:
array