Gijom / TEAP

Toolbox for Emotion Analysis using Physiological signals
http://www.teap.science/
GNU General Public License v3.0
57 stars 20 forks source link

The condition for calculating tachogram power seems to be wrong for BVP. #15

Closed cheulyop closed 4 years ago

cheulyop commented 4 years ago

In the below codes for extracting features from BVP and ECG signals, I found something that might be an issue and would like to ask for clarification.

While the condition for extracting tachogram features from ECG seems to be correctly defined as when length(IBI) is not less than welch_window_size_IBI + 1, the condition appears to be wrong for BVP as it is asking that length(IBI) < welch_window_size_**BVP** + 1 be false to compute tachogram power.

https://github.com/Gijom/TEAP/blob/b9f8d900041082a4f2e80a5a0a4fddacb8470306/src/signals/ECG/features/ECG_feat_extr.m#L124-L127

https://github.com/Gijom/TEAP/blob/b9f8d900041082a4f2e80a5a0a4fddacb8470306/src/signals/BVP/features/BVP_feat_extr.m#L130-L133

Shouldn't the condition be length(IBI) < welch_window_size_IBI + 1 for BVP as well?

Gijom commented 4 years ago

Thanks for spotting this bug. This is now corrected in the hotfix branch and should be merge in master soon.