neuropsychology / NeuroKit.py

A Python Toolbox for Statistics and Neurophysiological Signal Processing (EEG, EDA, ECG, EMG...).
http://neurokit.rtfd.io
MIT License
366 stars 103 forks source link

NaN value in SCR_Recovery_Index #73

Open chongluyao opened 6 years ago

chongluyao commented 6 years ago

Hi, I'm using the processed_eda function to extract feature from the raw eda in my research. However, I found that there were some NaNs in the "processed_eda['EDA']['SCR_Recovery_Indexes']". Why these NaNs appear? And how should I deal with these NaNs to get the final feature such as mean of recovery times in your suggestion?

DominiqueMakowski commented 6 years ago

@chongluyao It seems that currently, Recovery is having NA if there is no peak onset in the selected SCR window. However, by looking at it superficially, I'm not sure this is needed. It could potentially be refactored to something a little bit better. I'll try to have a look at it when I'll have some time.

This does not prevent you from computing the means though, sometimes it's better to compute a feature based on few, but clean observations than from noisy and artefacted data.