Skip to content

Commit

Permalink
Fix bug with running vitals window size
Browse files Browse the repository at this point in the history
  • Loading branch information
prouast committed Jul 21, 2024
1 parent 1bf997e commit b481586
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vitallens/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def __call__(
if self.estimate_running_vitals:
try:
if 'ppg_waveform' in self.config['signals']:
window_size = int(CALC_HR_WINDOW_SIZE*SECONDS_PER_MINUTE)
window_size = int(CALC_HR_WINDOW_SIZE*fps)
running_hr = windowed_freq(
x=data['ppg_waveform'], f_s=fps, f_res=0.005,
f_range=(CALC_HR_MIN/SECONDS_PER_MINUTE, CALC_HR_MAX/SECONDS_PER_MINUTE),
Expand All @@ -227,7 +227,7 @@ def __call__(
'note': 'Estimate of the running heart rate using VitalLens, along with frame-wise confidences between 0 and 1.',
}
if 'respiratory_waveform' in self.config['signals']:
window_size = int(CALC_RR_WINDOW_SIZE*SECONDS_PER_MINUTE)
window_size = int(CALC_RR_WINDOW_SIZE*fps)
running_rr = windowed_freq(
x=data['respiratory_waveform'], f_s=fps, f_res=0.005,
f_range=(CALC_RR_MIN/SECONDS_PER_MINUTE, CALC_RR_MAX/SECONDS_PER_MINUTE),
Expand Down

0 comments on commit b481586

Please sign in to comment.