[Eeglablist] Questions regarding preprocessing

Cedric Cannard ccannard at protonmail.com
Mon Mar 1 10:55:29 PST 2021


Hi,


In my understanding, if you are filtering continuous data, don't need high temporal precision (e.g. average power spectra), the default zero-phase non-causal FIR is great and appropriate. You only have to worry about the filter order having big values if you are focusing on causal relationships or need high temporal accuracy because the group delay (or phase shift) increases with the order. When using causal filters, everything is shifted in time by the group delay, and when using non-causal filters activity from the future and past is smeared into the present. Both problematic when temporal accuracy is the goal.

If you need to calculate the group delay, you can do so with:
transition_width = 0.1;
order = firwsord('hamming', EEG.srate, transition_width)
group_delay = (order + 1 - 1) / 2 / EEG.srate           %(in s; remove sRate to get it in samples)
--> group delay of 16.5 s in your case.

If you are not looking at specific latencies as with time or time-frequency analyses, the bigger the order the more accurate the filtering is, and the longer it takes to filter the data. So if you are doing for example spectral analyses over a large period and don't need to filter your data quickly, it is fine. You can use the "frequency-domain" option to go faster.

However, I do not think you can have a transition width greater than your cutoff frequency. With a transition width of 0.1 Hz and cutoff at 0.05 Hz, you get a stopband of 0-0.0 Hz and a passband of 0.1-500 Hz.
I would recommend a cutoff freq and transition width of 0.1 Hz, giving you a stopband of 0-0.1 hz and passband of 0.1-500 Hz.

You can play with values and see what you get with EEG = pop_firws(EEG) or in GUI: Tools > filter data > windowed sync FIR filter

Andreas Widman is the expert and creator of these filters, maybe he'll correct me if I am wrong or missing something.

Regarding transferring the IC weights obtained on data filtered differently, that doesn't feel right, I would just run ICA on your 0.1 hz filtered data, or do highpass 1 Hz instead. But I am not familiar with these details as well as your referencing question sorry. Maybe someone can comment on that.

Cedric



‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, March 1, 2021 7:04 AM, Kathrin Sadus <kathrin.sadus at psychologie.uni-heidelberg.de> wrote:

> Dear all,
> As a PhD student, I have only recently started to learn about the processing and analysis of EEG data. As a novice, I have some questions regarding my preprocessing pipeline and hope to get some advice. * Filtering As I am running an ICA, I use a 1 Hz high pass filter and transfer the resulting IC-weights on a 0.1Hz high pass filtered data set. Regarding the filtering, I was wondering which filter to implement. Based on my research I found that many people apply an IIR Butterworth filter. However, literature suggests that FIR filter are superior despite the higher computational costs. When applying a FIR Filter (let’s say the eeglab default Hemming filter), I would need a long filter, as my cut off is quite low (0.05Hz). I wanted to apply the filter to my continuous data set to avoid edge artifacts, which was recorded with a 1000 Hz sampling rate. Given that I am applying the filter to my continuous data set which has over 8.000.000 data points before resampling, would it be fine to use a FIR Filter? Using the default values, I ended up with a 33001-point high pass filtering. Based on my sampling rate my filter would have impulse response duration of 33 seconds and a transition band width if 0.1, am I correct? Assuming that I am not including the first 33 seconds in my data analysis would it be fine to use such a FIR Filter or are there any other drawbacks of a long impulse response duration? I checked the channel data to get a feeling for the impact of the different filters (butterworth, hemming), but the data looked exactly the same at first glance (which is essentially a good thing). However, I was wondering whether there are any suggestions regarding transition band width, since I simply used the default values to become more familiar with the filter.
>   * Averaging During the acquisition, we used a Cz online reference. First, I used an average offline reference but I was worried that the channel density is too low with 32 electrodes resulting in biased averaging. Thus, I decided to perform a linked mastoid reference. However, I was wondering whether it is necessary to reconstruct the Cz in my dataset before performing an average reference to avoid rank deficiency. When using the average reference, I have simply adjusted the data dimension within the ICA by using 'pca' and specifying nchan-1. However, I was wondering whether reconstructing the online reference would be a better way to deal with the data dimensions.I apologize in advance if my understanding is deficient at some points and I appreciate your advice.
>
>  Best,
>
> Kathrin
>  
>
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Research assistant 
> Heidelberg Universty - Institue of Psychology
>
> Hauptstraße 47-51
> 69117 Heidelberg
> Germany
>
> Tel: +49 6221 547746
> Mail: eeg.labor at psychologie.uni-heidelberg.de
> Web: https://urldefense.com/v3/https://www.psychologie.uni-heidelberg.de/ae/diff/diff/eeglab.html;!!Mih3wA!SW0QxhukT2uw4Xw-bF0zk4Has2DxDz258jpSaOnBUW7EnLFbD1yIzNl9XRSprI2JGT_cLw$
>
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu




More information about the eeglablist mailing list