[Eeglablist] Questions regarding preprocessing

Cedric Cannard ccannard at protonmail.com
Wed Mar 3 10:43:05 PST 2021


Hi,

Here the full conversation I had with Andreas recently in case that can be useful for you: https://sccn.ucsd.edu/pipermail/eeglablist/2021/016161.html

Sorry I don't know the answers to your other questions because I am not an expert on ICA and referencing.

Cedric

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, March 3, 2021 2:18 AM, Kathrin Sadus <kathrin.sadus at psychologie.uni-heidelberg.de> wrote:

> Hi Cedric,
>
> thanks a lot for your explanation. I might indeed run some analyses that require a high temporal precision, so your advice are really helpful.
>
> Regarding the ICA, I followed the eeg tutorial recommendations (chapter: How to deal with the aggressive high-pass filter applied before running ICA), because I read a paper indicating that ICA decomposition works better on 1 Hz -2 Hz filtered data. However, it's totally possible that I got it wrong, so correct me if that is not how it should be implemented.
>
> Besides the averaging question, which I still couldn't wrap my head around, another question crossed my mind: We recorded several indpendent tasks during one recording session. I was wondering how it would be best to deal with such a data set.
> In particular, I'm not sure whether I should apply my preprocessing pipeline seperately on each task, to avoid, for instance, an automatic rejection of bad channels based on a time period in which a participant was simply reading the instruction and was moving a lot. I guess for the rejection of segments with artifacts it doesn't really matter.
>
> Again thanks a lot for your support. I really appreciate it!
>
> Best,
>
> Kathrin
>
> Am Montag, 01. März 2021 19:55 CET, Cedric Cannard <ccannard at protonmail.com> schrieb:
>
>> 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
>
> --
> 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!UnYFThxEm2fjB4OW8vwAntTNa-sUSv42ShcRv0eZf85tHoZyFx4V5LVHTX0duszcQZKP1Q$ 


More information about the eeglablist mailing list