Skip to content

Commit

Permalink
modif name of variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinGhibaudo committed Nov 30, 2023
1 parent 71a78ed commit 8f1774f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions physio/ecg.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ def compute_ecg_metrics(ecg_peaks, min_interval_ms=500., max_interval_ms=2000.,

metrics = pd.Series(dtype=float)

metrics['N_RRi'] = np.count_nonzero(~np.isnan(delta_ms))
metrics['HRV_N'] = np.count_nonzero(~np.isnan(delta_ms))
metrics['HRV_Mean'] = np.nanmean(delta_ms)
metrics['HRV_SD'] = np.nanstd(delta_ms)
metrics['HRV_SEM'] = metrics['HRV_SD'] / np.sqrt(metrics['N_RRi'])
metrics['HRV_SEM'] = metrics['HRV_SD'] / np.sqrt(metrics['HRV_N'])
metrics['HRV_Median'], metrics['HRV_Mad'] = compute_median_mad(delta_ms[~np.isnan(delta_ms)])
metrics['HRV_CV'] = metrics['HRV_SD'] / metrics['HRV_Mean']
metrics['HRV_MCV'] = metrics['HRV_Mad'] / metrics['HRV_Median']
Expand Down

0 comments on commit 8f1774f

Please sign in to comment.