EmotiBit / EmotiBit_FeatherWing

Firmware to run Emotibit with Adafruit feather M0 WiFi and Feather ESP32
MIT License
19 stars 8 forks source link

PPG and Accelerometer signals (from the same recording) differ in length (e.g., 58 sec) #307

Open MyrteSch opened 2 months ago

MyrteSch commented 2 months ago

Describe the bug When analysing several recordings I realised that the PPG signal and accelerometer signal are not the same duration. The accelerometer signal is longer than the ppg. To show one example (see attached files), from one recording, the PPG contains 412893 samples with fs=100Hz, and the accelerometer contains 104682 samples with fs=25Hz. So, on approximately 69 minutes of recording, the difference is 58 seconds. Which is way too much for my application, where exact timing is essential. I have multiple recordings where this difference occurs. Do you have any idea what is happening? Thank you for your thoughts!

Expected behavior I expect the signals of one recording to have the same duration.

Additional details

To Reproduce Steps to reproduce the behavior:

  1. Load the signals in any processing tool
  2. Inspect the length and calculate the duration of the AX and IR signals

Files 2024-03-04_09-54-23-462677_AX.csv 2024-03-04_09-54-23-462677_AY.csv 2024-03-04_09-54-23-462677_AZ.csv 2024-03-04_09-54-23-462677_PG.csv 2024-03-04_09-54-23-462677_PI.csv 2024-03-04_09-54-23-462677_PR.csv 2024-03-04_09-54-23-462677_info.json

To add some examples and details: Recording number | Recording duration based on ppg (in minutes) | Difference between ppg and Acc (length(ppg)/fs_ppg – length(ax)/fs_ax) | Ratio between recording duration and difference 1 | 87.4882 | -74.1900 | -0.8480 2 | 68.8155 | -58.3500 | -0.8479 3 | 89.9533 | -75.5200 | -0.8395 4 | 61.1705 | -50.9300 | -0.8326 The ratio seems to be around 0.84 in all recordings so far.

git-aniket commented 2 months ago

I have come across this same issue as well. One of the signals is longer than other with the 100Hz firmware.