File tree Expand file tree Collapse file tree
src/data_analysis/heart_rate_variability Expand file tree Collapse file tree Original file line number Diff line number Diff line change 122122 window (-> resampled-ppi
123123 :ppi
124124 (dtype/sub-buffer start-idx window-size))
125- window-standardized ( stats/standardize window)
125+ ; ; Filter first, then standardize for FFT normalization
126126 window-filtered (.bandPassFilter bw
127- (double-array window-standardized )
127+ (double-array window)
128128 4
129129 0.04 ; Lower cutoff at 0.04 Hz to remove baseline drift
130130 0.4 )
131+ window-standardized (stats/standardize window-filtered)
131132; ; Apply Hann window to reduce spectral leakage
132133 hann-window (-> (Hanning. window-size) .getWindow)
133- window-windowed (map * window-filtered hann-window)
134+ window-windowed (map * window-standardized hann-window)
134135 fft (DiscreteFourier. (double-array window-windowed))
135136 _ (.transform fft)
136137 whole-magnitude (.getMagnitude fft true )]
You can’t perform that action at this time.
0 commit comments