paulvangentcom / heartrate_analysis_python

Python Heart Rate Analysis Package, for both PPG and ECG signals
MIT License
962 stars 322 forks source link

working_data['peaklist'] is always np.array #83

Closed meierman1 closed 2 years ago

meierman1 commented 3 years ago

Usually working_data['peaklist'] is returned as a list. However, if there is a peak in the first 150ms of the trace, it is removed in calc_rr(). As a result of this, working_data['peaklist'] is overwritten by an np.array.

First commit always overwrites working_data['peaklist'] with np.array which is consistent with most other values in working_data. Second commit is more optional: It also converts RR_masklist and RR_list_cor into np.array for consistency. Only RR_indices remains a list of tuples.

Fixes #82

paulvangentcom commented 2 years ago

Thanks, looks good and indeed it was inconsistent