You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recovery of skin conductance response is miscalculated in eda_peaks() when using vanhalem2020 method. I think the problem is that the height of the skin conductance response is miscalculated or defined incorrectly in eda/_eda_findpeaks_vanhalem2020.
Describe the bug
info = {
"SCR_Onsets": info["Onsets"][idx],
"SCR_Peaks": info["Peaks"][idx],
"SCR_Height": info["Height"][idx],
}
info["Height"][idx] is calculated with nk.signal_findpeak(). I think in eda_peaks() function, the offset/recovery of skin conductance response is based on the peak value of each peak, instead of the height of the peak defined in nk.signal_findpeak().
Mentioned issue has been fixed. There is another concern left for discussion: in the current script, if eda signals ends before the peak recovers, the offset will not be detected.
The recovery of skin conductance response is miscalculated in eda_peaks() when using vanhalem2020 method. I think the problem is that the height of the skin conductance response is miscalculated or defined incorrectly in eda/_eda_findpeaks_vanhalem2020.
Describe the bug
info = {
"SCR_Onsets": info["Onsets"][idx],
"SCR_Peaks": info["Peaks"][idx],
"SCR_Height": info["Height"][idx],
}
info["Height"][idx] is calculated with nk.signal_findpeak(). I think in eda_peaks() function, the offset/recovery of skin conductance response is based on the peak value of each peak, instead of the height of the peak defined in nk.signal_findpeak().
To Reproduce
eda_signal = nk.data("bio_eventrelated_100hz")["EDA"]
_, vanhalem2020 = nk.eda_peaks(data2plot['cda_phasic'], method="vanhalem2020", sampling_rate=100)
Expected behaviour
I think "SCR_Height": eda_phasic[peaks["Peaks"]] might fix the problem.
Screenshots

purple denotes the onsets from vanhalem2020, and red lines denote the recovery/offset.
The text was updated successfully, but these errors were encountered: