Gijom / TEAP

Toolbox for Emotion Analysis using Physiological signals

Home Page:http://www.teap.science/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

cheulyop opened this issue · comments

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.

if length(IBI)< welch_window_size_IBI +1
warning('singal to short for the welch size - PSD features cannot be calcualted');
tachogram_LF = NaN;tachogram_MF = NaN;tachogram_HF = NaN;
tachogram_energy_ratio = NaN;

if length(IBI)< welch_window_size_BVP +1
warning('Signal is too short for this welch window size and the PSD features cannot be calculated');
tachogram_LF = NaN;tachogram_MF = NaN;tachogram_HF = NaN;
tachogram_energy_ratio = NaN;

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

commented

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