paulvangentcom / heartrate_analysis_python

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

issue with reject_segmentwise argument inside "hp.process" function #93

Open atazarv opened 2 years ago

atazarv commented 2 years ago

When I run heartpy.process with the _rejectsegmentwise set to True, it doesn't make any difference in the output (doesn't do what it is supposed to do). I was able to track it down and the issue seems to be inside the "process" function when the "check_peaks" function is being called. It is currently as:

_working_data = check_peaks(working_data['RR_list'], working_data['peaklist'], working_data['ybeat'], reject_segmentwise, working_data=workingdata)

and it should be changed to:

_working_data = check_peaks(working_data['RR_list'], working_data['peaklist'], working_data['ybeat'], reject_segmentwise=reject_segmentwise, working_data=workingdata)

I'm using Python 3.7 with Heartpy version 1.2.6.