paulvangentcom / heartrate_analysis_python

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

What units is the raw PPG data in? #74

Closed melissamullen closed 3 years ago

melissamullen commented 3 years ago

Looks way too high to be the standard BPM...

Our data is in BPM and we are getting the following error when running the process method (note that we have resampled and filtered our smartwatch data as you did in the example). Could it be because the units aren't the same as yours?

----------------
Could not determine best fit for given signal. Please check the source signal.
 Probable causes:
- detected heart rate falls outside of bpmmin<->bpmmax constraints
- no detectable heart rate present in signal
- very noisy signal (consider filtering and scaling)
If you're sure the signal contains heartrate data, consider filtering and/or scaling first.
----------------
paulvangentcom commented 3 years ago

Hi Melissa,

The standard PPG data unit is the sensor value at a moment in time. The sensor measures discoloration of the skin as blood perfuses through your capillaries. You can conceptualise the value as the raw color of the skin at a point in time. By logging this over time, you get a picture of blood flow. Typically it looks something like:

image

If you have your data in BPM, that is typically already too processed for HeartPy to make sense of.

Paul

paulvangentcom commented 3 years ago

closing for now, feel free to re-open if there are further questions