Skip to content

Commit 7da0734

Browse files
committed
Update snr_kurtosis.py
minor adding default value for fps, comments
1 parent b308987 commit 7da0734

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/aind_dynamic_foraging_basic_analysis/metrics/snr_kurtosis.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
from scipy.signal import find_peaks
44
from scipy.stats import kurtosis
55

6+
# -snr function was inspired by AIND-OPhys SLAP2 team.
7+
# -for `trace` feed a dF/F preprocessed trace as the function calculate the peak values from zero
8+
# -so far all FIP sampling frequency has been 20Hz. Modify it when using a different fps.
9+
# -given the peak finding won't nan, nan will be filled with median of the trace.
610

7-
def estimate_snr(trace, fps):
11+
def estimate_snr(trace, fps=20.0):
812
"""
913
Estimate the signal-to-noise ratio (SNR) of a trace.
1014

0 commit comments

Comments
 (0)