scale_sections function bug
See original GitHub issueDear HeartPy team,
I am a maker. I am designing a PPG wearable device for real-time HRV analysis, data collecting and visualization.
When developing the PC application, I integrated your library. When working on preprocessing for rolling data, I find that “scale_sections” function issue may analysis failed randomly.
Let me share what I’ve found:
output = np.empty(len(data))
// length of output array is the same as length of data array.
so if data_end is not equal to length of data. Then some data at the end of output numpy array will not be assigned. They will be random value. If one of them is nan, then the process fuction will crash.
To fix this: just change return np.array(output) -> return np.array(output[0:data_start])
Let me know if I described the issue clearly. Feel free to let me know your thoughts.
Best, Lauren
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
@Lauren-ED209 @adamhub
If either of you needs help with pcb design or embedded C for the arduino projects I can lend a hand as well.
Hey @Lauren-ED209 I am making a wearable PPG device too and came across this issue. I fixed it by fixing my import to avoid float rounding issues by just using integers when making my CSV via numpy. Would love to hear more about your project. I ended up with the MAX30102 sensor and am about to try it with the Nano RF board from Emakefun. It contains a NRF24L01 radio rather than wifi, which suites my purposes better.
@paulvangentcom KILLER work. Thank you so much!