We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b308987 commit 7da0734Copy full SHA for 7da0734
1 file changed
src/aind_dynamic_foraging_basic_analysis/metrics/snr_kurtosis.py
@@ -3,8 +3,12 @@
3
from scipy.signal import find_peaks
4
from scipy.stats import kurtosis
5
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.
10
-def estimate_snr(trace, fps):
11
+def estimate_snr(trace, fps=20.0):
12
"""
13
Estimate the signal-to-noise ratio (SNR) of a trace.
14
0 commit comments