PGomes92 / pyhrv

Python toolbox for Heart Rate Variability
BSD 3-Clause "New" or "Revised" License
271 stars 77 forks source link

Verifying pyHRV against Kubios #23

Open enra64 opened 3 years ago

enra64 commented 3 years ago

Hi Pedro, first of all - thanks for the great project!

I'm currently trying to check how well the biosppy+pyHRV analysis stacks up vs Kubios for a dataset of mine, and I'm having some trouble to reach equal results for FFT and time domain features.

I have seen Table 6 - Parameter Settings from your thesis, and tried to implement all the settings as described there. I'm not sure if I can match them exactly, as FFT - Interpolation frequency, FFT - Window width, and FFT - Window overlap are not exposed through kwargs_welch. However, I checked the source code, and since noverlap=nperseg//2 per default and the sampling frequency is 4, only the window width needs to be set to the same value. I tried with nperseg=300 as set in the source code, as well as nperseg=1200, as I thought that with a sampling frequency of 4Hz you'd need more values in the segments to match 300 seconds, but still, my results are off.

Can you help me? I've kept the other parameters on their default, as I assume they are at the value you used for the verification in the thesis. Could this be due to the R-Peak extraction by biosppy?