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
I am using the nk.eda_process() function with a series "EDA_15" of 30000 values, recorded at 2000HZ (so 15sec).
My code is like that : SR=2000 eda_si_15, info_15 = nk.eda_process(EDA_15, sampling_rate=SR)
I dont know why but for some of my samples, there is a mistake when I try to plot it via nk.eda_plot(eda_si_15)
The mistake is always of the same format : "Length of values (n-1) does not match length of index (n)"
I realized it is because the first 'SCR_Onsets' is missing.
So I manage to plot with manually adding a first SCR_Onsets if missing with the following code : peak_index = eda_si_15.index[eda_si_15['SCR_Peaks'] == 1][0] onset_index = eda_si_15.index[eda_si_15['SCR_Onsets'] == 1][0] if peak_index < onset_index: eda_si_15.loc[0, 'SCR_Onsets'] = 1
But I still dont understand why I sometime have this mistake and sometime no.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I am using the nk.eda_process() function with a series "EDA_15" of 30000 values, recorded at 2000HZ (so 15sec).
My code is like that :
SR=2000
eda_si_15, info_15 = nk.eda_process(EDA_15, sampling_rate=SR)
I dont know why but for some of my samples, there is a mistake when I try to plot it via
nk.eda_plot(eda_si_15)
The mistake is always of the same format :
"Length of values (n-1) does not match length of index (n)"
I realized it is because the first 'SCR_Onsets' is missing.
So I manage to plot with manually adding a first SCR_Onsets if missing with the following code :
peak_index = eda_si_15.index[eda_si_15['SCR_Peaks'] == 1][0]
onset_index = eda_si_15.index[eda_si_15['SCR_Onsets'] == 1][0]
if peak_index < onset_index:
eda_si_15.loc[0, 'SCR_Onsets'] = 1
But I still dont understand why I sometime have this mistake and sometime no.
Thank you very much for your help.
Beta Was this translation helpful? Give feedback.
All reactions