neuropsychology / NeuroKit.py

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

Filtering for EDA #64

Open Eichhof opened 6 years ago

Eichhof commented 6 years ago

Hi

Before applying the cvxEDA algorithm you are filtering the signal. According to the cvxEDA paper this is not necessary: "As a result, the method does not require pre-processing of the observed SC signal (e.g., bandpass filtering) nor post-processing of the inferred phasic and tonic components (e.g., to deal with negative neural activations)."

DominiqueMakowski commented 6 years ago

@Eichhof as you can turn off the cvxEDA algorithm, a bit of filtering is indeed done by default. I had some good results with it (mainly to clean some serious artifacts to ease the subsequent cvxEDA computation).

However, if you have reasons to think this could be a bad thing (the cvxEDA must be run on raw data), I believe we could either change it (and add the option to select between "traditional" filtering and cvxEDA) or a parameter to turn off the prefiltering.

What are your thoughts?

Eichhof commented 6 years ago

Actually, I have just seen that in eda_process() you pass the raw (unfiltered and unsmoothed) signal to cvxEDA. Am I right?

DominiqueMakowski commented 6 years ago

Ah yes, I didn't remembered myself that this was already changed (I used the filtered signal at the beginning). Problem solved then :)