[Eeglablist] Filtering Confirmation

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Wed May 10 13:58:53 PDT 2017


Dear David and Andreas,

Related to David's moving window filter idea, there is piecewise
de-trending option implemented in SIFT. The SIFT manual says it is an
alternative to high-pass filter but affects less on phase structure. I've
seen previously Andreas says 'no' to this too, saying that properly
designed high-pass filter is better. It seems these intuitively appealing
method, such as moving average or peicewise detrending, do not do as well
as we imagine... is it because some essential part of these methods are
already included in the standard FIR filter? Andreas, do you have an
intuitive explanation for this?

Makoto

On Sat, Mar 4, 2017 at 4:45 AM, Andreas Widmann <widmann at uni-leipzig.de>
wrote:

> > I believe that a moving average would be useful in some cases because
> this would act as a LP filter without a lot of distortion except for the
> first few and last few points of each epoch.
> Sorry, but no. Moving average filters do not have a passband, do not have
> less distortions (rather more due to the lack of a passband), and have
> really poor attenuation. You might want to have a look at its the frequency
> response and compare it to other filters. Moving average filters are
> unsuitable for EEG pre-processing. Edge effects could be avoided by proper
> padding.
>
> Best,
> Andreas
>
> > David Gilbert
> >
> >
> > From: eeglablist-bounces at sccn.ucsd.edu <eeglablist-bounces at sccn.ucsd.edu>
> on behalf of Andreas Widmann <widmann at uni-leipzig.de>
> > Sent: Friday, March 3, 2017 2:56 AM
> > To: Isaiah Innis
> > Cc: EEGLAB List
> > Subject: Re: [Eeglablist] Filtering Confirmation
> >
> > > After reading your article, it seems like larger transition bandwidths
> and lower filter orders provide  less-distorting roll off of the data.
> > The picture is more complicated, unfortunately. It is not necessarily
> the roll-off per se which is distorting. You also have to consider the
> convolution of the signal, that is the signal is now depending on the
> signal features of adjacent data regions, and spreading of filter and other
> artifacts (e.g. touching an electrode). You can consider the filter order
> as the duration (in samples; divide by sampling rate to get seconds) the
> signal is convoluted or artifacts are potentially spread. Sharper filters
> need higher filter orders (longer duration) and reduce temporal precision.
> Only if the signal (e.g. ERP) is band-limited by the filter a shallow
> roll-off might produce less distortions. However, on the other hand if a
> sharper filter would not band-limit the signal it is preferable over a more
> shallow filter (e.g. for ERPs and a low-pass filter to remove line noise).
> You have to consider the signal in the frequency domain and find the right
> balance for your data.
> >
> > > The options I mentioned previously a .02Hz bandwidth for the highpass
> and 22Hz for the lowpass. In your example you listed 10Hz for the lowpass.
> I am wondering if I should use the shorter 10Hz, although again my own
> comparisons do not show large differences between the two. I do not want to
> filter too sharply.
> > The only intention to select 10 Hz for the example was to have numbers
> where I do not need a calculator. This was not a recommendation. And as you
> observed, if there are no particularly problematic features in the data you
> will hardly notice the difference in the time domain. You will have
> different amounts of noise in the ~89-95 Hz band which is usually low
> amplitude anyway. However, you will see the difference in the frequency
> domain and also in the auto-correlation function.
> >
> > Hope this helps! Best,
> > Andreas
> >
> > > Thank you,
> > >
> > >
> > > 2017-02-28 5:01 GMT-05:00 Andreas Widmann <widmann at uni-leipzig.de>:
> > > Hi Isaiah,
> > >
> > > > I have been closely following the recent pop_eegfiltnew filtering
> discussion with great interest; I would like to verify that I am filtering
> my datasets correctly. My goal is to bandpass filter 0.1 - 100Hz
> > > >
> > > > Previously I had been using these options:
> > > > EEG = pop_eegfiltnew(EEG, 0.1, 100, 33000, 0, [], 0);
> > > > I believe I understand now that this is wrong because 1) I should
> not use the highpass filter order for the entire bandpass, but do them
> separately and 2) the input is passband edge, NOT cutoff frequency. In
> reality here I was filtering from 0.05 - 112.5Hz correct?
> > > No, cutoff frequencies are 0.05 and 100.05. Transition bandwidth is
> 0.1 here. The cutoff frequency is passband edge +/- half the transition
> bandwidth.
> > >
> > > Compute transition band width df as ( dF / order ) * fs. dF is a
> constant defined by the window type. pop_eegfiltnew uses Hamming window
> with dF = 3.3. Thus,
> > > df = ( 3.3 / 33000 ) * 1000 = 0.1
> > >
> > > > How worried should I be about my mistake?
> > > Depends. Usually not too much, but if you have stronger low frequency
> noise or drifts or sharp artifacts or signal discontinuities these setting
> could also be problematic. I would recommend following your approach below.
> > >
> > > > To correctly filter 0.1-100Hz (at 1kHz srate) I should:
> > > > EEG = pop_eegfiltnew(EEG, 0.2, [], 16500, 0, [], 0);
> > > > EEG = pop_eegfiltnew(EEG, [], 89, 150, 0, [], 0);
> > > > Is this accurate?
> > > Yes.
> > >
> > > > I have looked at using pop_firws, but am hesitant because it does
> not display in the command window the cutoff freq, passband edge, etc…
> > > This is already added in the upcoming version. Will take some
> days/weeks still.
> > >
> > > > and I am not certain how to define the transition bandwidth
> correctly here.
> > > Transition bandwidth is defined by filter order. You can use the
> inverted equation from above or much easier press the „Estimate“ button,
> enter your requested transition bandwidth and get back the required filter
> order already filled in. For example, if want a lowpass cutoff of 100 Hz
> with a passband edge at 95 Hz you need a transition band width of 10 Hz
> (see above). Enter: cutoff 100 Hz, lowpass, Hamming window, click Estimate,
> enter transition bandwidth 10 Hz, click Ok, required filter order 330 (m =
> dF / ( df / fs ) = 3.3 / ( 10 / 1000 ) = 330) is already filled, click Plot
> filter responses to check whether the filter is designed as expected and
> apply with ok.
> > >
> > > I recommend reading
> > > http://home.uni-leipzig.de/~biocog/eprints/widmann_
> a2015jneuroscimeth250_34.pdf
> > filter design for electrophysiological data a practical ap ...
> > home.uni-leipzig.de
> > Digital filter design for electrophysiological data – a practical
> approach, Widmann et al. Page 3 sponses are used to characterize properties
> of the filter.
> >
> >
> > > for a hopefully accessible introduction into the basic concepts. No
> math or magic required :)
> > >
> > > Best,
> > > Andreas
> > >
> > > >
> > > >  I would like to thank Andreas, Jumana, Makoto, and any others for
> having this discussion; it has been helpful.
> > > >
> > > >
> > > > Thank you,
> > > > ---------- Mensaje reenviado ----------
> > > > From: Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
> > > > To: Andreas Widmann <widmann at uni-leipzig.de>
> > > > Cc: EEGLAB List <eeglablist at sccn.ucsd.edu>
> > > > Date: Tue, 7 Feb 2017 19:05:31 -0800
> > > > Subject: Re: [Eeglablist] high frequency oscillation- eeg advice
> > > > Dear Andreas and Jumana,
> > > >
> > > > > (0.2 - 0.2 / 2 and 35 + 10 / 2, respectively).
> > > >
> > > > This is much more understandable for I could not remember how
> eegfiltnew() determines the transient band width for the low-pass end.
> > > >
> > > > So for the higher frequencies (above 10Hz), log scale (octaves) is
> not used to determine the transient band width. I guess this is related to
> conventional practice in EEG research.
> > > >
> > > > Makoto
> > > >
> > > >
> > > > On Fri, Feb 3, 2017 at 5:26 PM, Andreas Widmann <
> widmann at uni-leipzig.de> wrote:
> > > > I hope it is ok to keep the discussion on-list. It might be
> interesting also for others.
> > > >
> > > > > Thanks again. I wanted to follow Steve Luck's ERP advice and
> filter between 0.1 as a half amplitude cutoff - 30/40Hz. I went for 40.
> What does this mean in terms of EEGlab's passband edge?
> > > > You only have to shift the passband edge by half the transition band
> width. In your case I would double the transition band width for the
> high-pass part to reduce the order.
> > > >
> > > >       if EEG.srate == 256;
> > > >           EEG = pop_eegfiltnew(EEG, 0.2,[], 4224, 0, [], 1);
> > > >           EEG = pop_eegfiltnew(EEG, [], 35, 86, 0, [], 0);
> > > >       elseif EEG.srate == 1000;
> > > >           EEG = pop_eegfiltnew(EEG, 0.2,[], 16500, 0, [], 0);
> > > >           EEG = pop_eegfiltnew(EEG, [], 35, 330, 0, [], 0);
> > > >       end
> > > >
> > > > will give you 0.1 Hz high-pass and 40 Hz low-pass cutoff frequencies
> (0.2 - 0.2 / 2 and 35 + 10 / 2, respectively). In general it is easier to
> directly use the windowed sinc filter function to specify the cutoff (but
> will give the identical result here if used with Hamming window).
> > > >
> > > > > I also wanted to follow Makoto's advice of using 1 Hz filter for
> running ICA (I apply the weights to 0.1). Was I therefore incorrect to use
> 1-40Hz as a passband edge?
> > > > I assume this also referred to cutoff frequency rather than passband
> edge (similar as in the Winkler et al., 2015, publication). However, I
> think the impact is limited here.
> > > >
> > > > Best,
> > > > Andreas
> > > >
> > > > > Best wishes,
> > > > > Jumana
> > > > >
> > > > > -----Original Message-----
> > > > > From: Andreas Widmann [mailto:widmann at uni-leipzig.de]
> > > > > Sent: 03 February 2017 15:03
> > > > > To: Ahmad, Jumana <jumana.ahmad at kcl.ac.uk>
> > > > > Cc: mmiyakoshi at ucsd.edu; eeglablist at sccn.ucsd.edu
> > > > > Subject: Re: [Eeglablist] high frequency oscillation- eeg advice
> > > > >
> > > > > Filters need transition bands separating passband and stopband.
> For FIR filters the cutoff frequency is in the center of the transition
> band. In pop_eegfiltnew you specify passband edges but reported are most
> commonly the cutoff frequencies. You compute cutoff frequency as passband
> edge  +/- transition band width / 2, here 0.1 - 0.1 / 2 and 40 + 10 / 2.
> Transition band width is reported in the console output of pop_eegfiltnew
> and can also be computed manually from order. See
> > > > > https://emea01.safelinks.protection.outlook.com/?url=
> http:%2F%2Fhome.uni-leipzig.de%2F~biocog%2Feprints%2Fwidmann_
> a2015jneuroscimeth250_34.pdf&data=01%7C01%7Cjumana.ahmad%40kcl.ac.uk%
> 7Cf50ed9fcf01b42b49aee08d44c45bef8%7C8370cf1416f34c16b83c72407165
> 4356%7C0&sdata=GxppGkTzfuGeht3gOpalHbv2dG5%2FhJwmOJFD5%2BCaj8M%3D&
> reserved=0
> > > > > for an introduction into the basic concepts (and also the
> equations to compute transition band width and order).
> > > > >
> > > > > Hope this helps,
> > > > > Andreas
> > > > >
> > > > >> Am 03.02.2017 um 15:49 schrieb Ahmad, Jumana <
> jumana.ahmad at kcl.ac.uk>:
> > > > >>
> > > > >> Would it be 40Hz low pass? I am unsure why 0.1 has been halved
> but 40 hasn't?
> > > > >> Thank you,
> > > > >> Jumana
> > > > >>
> > > > >>
> > > > >> -----Original Message-----
> > > > >> From: Andreas Widmann [mailto:widmann at uni-leipzig.de]
> > > > >> Sent: 03 February 2017 14:45
> > > > >> To: Ahmad, Jumana <jumana.ahmad at kcl.ac.uk>
> > > > >> Cc: mmiyakoshi at ucsd.edu; eeglablist at sccn.ucsd.edu
> > > > >> Subject: Re: [Eeglablist] high frequency oscillation- eeg advice
> > > > >>
> > > > >> Yes, that looks ok. Be aware that passband edge and not cutoff
> frequency is specified in pop_eegfiltnew (for backward compatibility).
> Report these filters as 0.05 Hz high-pass and 45 Hz low-pass (incl. specs:
> zero-phase Hamming windowed sinc FIR, order, and optimally transition band
> width).
> > > > >>
> > > > >> Best,
> > > > >> Andreas
> > > > >>
> > > > >>> Am 02.02.2017 um 13:00 schrieb Ahmad, Jumana <
> jumana.ahmad at kcl.ac.uk>:
> > > > >>>
> > > > >>> Thank you both for your explanation.
> > > > >>>
> > > > >>> Does this therefore look reasonable:
> > > > >>>
> > > > >>>       if EEG.srate == 256;
> > > > >>>
> > > > >>>           EEG = pop_eegfiltnew(EEG, 0.1,[], 8448, 0, [], 1);
> > > > >>>           EEG = pop_eegfiltnew(EEG, [], 40, 86, 0, [], 0);
> > > > >>>
> > > > >>>       elseif EEG.srate == 1000;
> > > > >>>           EEG = pop_eegfiltnew(EEG, 0.1,[], 33000, 0, [], 0);
> > > > >>>           EEG = pop_eegfiltnew(EEG, [], 40, 330, 0, [], 0);
> > > > >>>       end
> > > > >>>
> > > > >>> I have different sample rates. I work with a very large dataset
> recorded with different systems.
> > > > >>> Best wishes,
> > > > >>> Jumana
> > > > >>>
> > > > >>> From: eeglablist-bounces at sccn.ucsd.edu
> > > > >>> [mailto:eeglablist-bounces at sccn.ucsd.edu] On Behalf Of Makoto
> > > > >>> Miyakoshi
> > > > >>> Sent: 31 January 2017 03:29
> > > > >>> To: Andreas Widmann <widmann at uni-leipzig.de>
> > > > >>> Cc: eeglablist at sccn.ucsd.edu
> > > > >>> Subject: Re: [Eeglablist] high frequency oscillation- eeg advice
> > > > >>>
> > > > >>> Dear Andreas,
> > > > >>>
> > > > >>> Thank you for your explanations.
> > > > >>>
> > > > >>>> This was just a wild guess based on experience.
> > > > >>>
> > > > >>> Oh ok I see.
> > > > >>>
> > > > >>>> But note that the EEGLAB iirfilt-plugin does implement an
> Elliptic and not a Butterworth IIR filter.
> > > > >>>
> > > > >>> That's true. If I remember correctly, Elliptic filter can make
> theoretically the sharpest filter.
> > > > >>>
> > > > >>>> In MATLAB you compute the impulse response with impz (see the
> code example in my previous post).
> > > > >>>
> > > > >>> Yes, this is a new thing I learned this time! This function is
> very convenient.
> > > > >>>
> > > > >>> Thanks Andreas as always.
> > > > >>>
> > > > >>> Makoto
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> On Sat, Jan 28, 2017 at 1:26 AM, Andreas Widmann <
> widmann at uni-leipzig.de> wrote:
> > > > >>> Dear Makoto
> > > > >>>
> > > > >>>>>> A roughly equivalent Butterworth filter will have an
> estimated effective (numerically relevant) impulse response duration of
> 20592 samples (~82s!):
> > > > >>>>
> > > > >>>> I tried to replicate it with EEGLAB iirfilt() but the filter
> order was only 6. How did you calculate this number?
> > > > >>> Not sure whether I understand the question.
> > > > >>>
> > > > >>> Do you mean how I estimated the order (4) of the Butterworth
> filter in my example to be "roughly equivalent“ to the FIR variant? This
> was just a wild guess based on experience. In case necessary I could check
> how rough "roughly equivalent" really is. But note that the EEGLAB
> iirfilt-plugin does implement an Elliptic and not a Butterworth IIR filter.
> > > > >>>
> > > > >>> Or do you mean the comparison of your iirfilt order (6) to the
> impulse response duration (20592) of my example? One cannot directly
> compare the order of IIR and FIR filters. This is a (unfortunately common)
> misconception. For FIR filters (implemented by convolution) the order
> equals the duration of the impulse response (minus one sample). This does
> not hold for IIR filters implemented *recursively*. However, even if the
> impulse response of IIR filters is infinite by definition in digital
> implementations it is practically limited by numerical precision. That is,
> you can compute the impulse response of a digital IIR filter which is now
> also finite and can be applied by convolution exactly like a FIR filter
> finally giving the same result (within limits of numerical precision).
> > > > >>>
> > > > >>> In MATLAB you compute the impulse response with impz (see the
> code example in my previous post). If I remember correctly you may specify
> required numerical precision as an input argument to impz. I trusted the
> default here. You have to get the filter coefficients (b, a) of your EEGLAB
> iirfilt filter and feed them to impz. The length of the resulting impulse
> response times two is the duration to be compared to the order (or IR
> duration) of a FIR filter. Times two because you have to apply the
> non-linear phase IIR derived filter in forward and reverse direction (to
> get zero-phase).
> > > > >>>
> > > > >>> Does this help? Best,
> > > > >>> Andreas
> > > > >>>
> > > > >>>>
> > > > >>>> Makoto
> > > > >>>>
> > > > >>>>
> > > > >>>>
> > > > >>>> On Fri, Jan 27, 2017 at 2:35 PM, Andreas Widmann <
> widmann at uni-leipzig.de> wrote:
> > > > >>>> Dear Makoto,
> > > > >>>>
> > > > >>>> to my understanding these are two different and mostly
> unrelated issues:
> > > > >>>>
> > > > >>>> (1) Recommendations for very low high-pass cutoff frequencies:
> > > > >>>> The filter implementation (IIR vs. FIR) doesn’t really matter
> here. It is correct that you need very long epochs to resolve these very
> low frequencies. However, it is not valid to reverse this conclusion. Also,
> for short epochs apparently small differences in cutoff frequency may
> matter. You do filter the continuous data, that is, epoch length does not
> directly influence the filter effects. High-pass filter distortions (mainly
> due to larger late and slow components biasing smaller early and fast
> components) were shown empirically several times, e.g. most convincingly by
> Acunzo et al.
> > > > >>>>
> > > > >>>> But I agree that this issue is a matter of debate (mainly
> affecting ERP research). Personally, I recommend to individually adjust
> filter cutoffs to the properties of signal and noise. It is in principle
> possible to apply higher high-pass cutoff frequencies if noise level really
> requires this and it is properly demonstrated that filter distortions do
> not bias the conclusions. But people always ask for general recommendations
> and you have to be on the save side...
> > > > >>>>
> > > > >>>> (2) IIR vs. FIR
> > > > >>>> In the first part you argue against long impulse response
> durations. For IIR filters these are usually even (considerably) longer.
> Besides other issues (as the non-linear phase property of IIR filters and
> its side-effects) this is the main reason why I do not recommend IIR
> filters for offline processing in electrophysiology/ERPs. Following your
> example with a slightly higher cutoff of 0.1 Hz and a Hamming windowed sinc
> FIR filter you will have a impulse response duration of 4127 samples
> (~16s). A roughly equivalent Butterworth filter will have an estimated
> effective (numerically relevant) impulse response duration of 20592 samples
> (~82s!):
> > > > >>>>
> > > > >>>> [b, a]=butter(4, 0.1/125, 'high');
> > > > >>>> h = impz(b, a);
> > > > >>>> length(h)*2 % Times 2 as you have to apply the non-linear phase
> > > > >>>> filter in forward and reverse direction to achieve zero-phase
> > > > >>>> doubling the impulse response duration
> > > > >>>>
> > > > >>>> Thus, if you define filter efficiency as achieved roll-off per
> impulse response duration (as I do) IIR filters can be considerably less
> efficient. Impulse response duration defines the extent the signal is
> convoluted and artifacts and distortions are potentially smeared.
> > > > >>>>
> > > > >>>>> 0.1Hz IIR high-pass filter can be found in EEG amplifiers, so
> in that sense it is not strange at all.
> > > > >>>>
> > > > >>>> IIR filters have their merits if high throughput and/or low
> delays are required. FIR filters have large delays and are computationally
> less efficient (there are however highly optimized implementations). Delay
> and throughput do not matter for offline processing but both are highly
> relevant in amplifiers and BCI applications. Thus, IIR filters are
> frequently preferred for online processing (despite non-linear phase).
> > > > >>>>
> > > > >>>>> I thought it seemed a bit odd to report it like this in a
> paper.
> > > > >>>>
> > > > >>>> I do not see a problem as long as you reason your approach.
> > > > >>>>
> > > > >>>> Best,
> > > > >>>> Andreas
> > > > >>>>
> > > > >>>>> Am 27.01.2017 um 21:34 schrieb Makoto Miyakoshi <
> mmiyakoshi at ucsd.edu>:
> > > > >>>>>
> > > > >>>>> Dear Andreas,
> > > > >>>>>
> > > > >>>>>>> And I still don't like 0.1Hz high-pass if you use FIR
> > > > >>>>>> Why? What is the problem?
> > > > >>>>>
> > > > >>>>> Assuming people just enter '0.1' to EEGLAB default FIR filter
> GUI, it'll apply 0.05Hz cut-off high-pass filter with Hamming window. When
> the sampling rate is 250Hz, the model order it calculates is 8251, which is
> 33 sec long. Meanwhile, people are usually only interested in the first few
> hundreds milliseconds of the averaged signal. And they subtract
> pre-stimulus baseline mean value from the entire epoch anyway. I don't see
> much reason to apply 0.1-Hz high-pass filter in these cases. Of course, I
> saw papers discussing this issue and I have no objection, but intuitively
> it is still weird to me. I think the point is that people want to claim
> that ERP is a broadband phenomenon, but the way they demonstrate it is not
> satisfactory to me.
> > > > >>>>>
> > > > >>>>> By the way, people often complain about our recommended -1 to
> 2 sec epoch to be too long, and our recommended 1-Hz high-pass filter too
> aggressive. But doesn't it makes more sense to apply 1-Hz high-pass filter
> to 3-sec epoch data, compared with applying 0.1-Hz high-pass for 0.8 sec
> epoch data? This kind of unbalancedness makes me feel weird.
> > > > >>>>>
> > > > >>>>>> What would be your suggested alternative?
> > > > >>>>>
> > > > >>>>> I thought IIR would be more reasonable for such a low cutoff
> frequency, but I have never tried it myself (as far as I know,
> clean_rawdata plugin comes with its IIR filter, which could be a part of
> BCILAB for online processing). It depends on your relative time scale. If I
> analyze hour-long resting state data to target minute-long slow changes, I
> would use FIR with no problem.
> > > > >>>>>
> > > > >>>>> I did not know much about stability issue, but this time you
> made me learn it a little bit. Thank you Andreas for always pushing my back
> in this way.
> > > > >>>>>
> > > > >>>>> Makoto
> > > > >>>>>
> > > > >>>>>
> > > > >>>>>
> > > > >>>>> On Fri, Jan 27, 2017 at 3:28 AM, Andreas Widmann <
> widmann at uni-leipzig.de> wrote:
> > > > >>>>> Dear Makoto,
> > > > >>>>>
> > > > >>>>>> And I still don't like 0.1Hz high-pass if you use FIR
> > > > >>>>> Why? What is the problem? What would be your suggested
> alternative?
> > > > >>>>>
> > > > >>>>>> (and I do not know how bad it is to use IIR... I've heard it
> can
> > > > >>>>>> become 'unstable' but I've never seen it myself)
> > > > >>>>> Here you go:
> > > > >>>>> [b,a]=butter(4,0.1/500,'high');
> > > > >>>>> isstable(b,a)
> > > > >>>>> freqz(b,a)
> > > > >>>>>
> > > > >>>>> But note that possible instability is not the main problem
> with IIR application in electrophysiology. There are workarounds (e.g. for
> this example using zpk: [z,p,k]=butter(4,0.1/500,'high');
> sos=zp2sos(z,p,k); isstable(sos)).
> > > > >>>>>
> > > > >>>>> Best,
> > > > >>>>> Andreas
> > > > >>>>>
> > > > >>>>>
> > > > >>>>>>
> > > > >>>>>>> I won't be using granger causality but I will be estimating
> phase during ITC.
> > > > >>>>>>
> > > > >>>>>> Should be ok.
> > > > >>>>>>
> > > > >>>>>> Makoto
> > > > >>>>>>
> > > > >>>>>> On Thu, Jan 26, 2017 at 2:12 PM, Ahmad, Jumana <
> jumana.ahmad at kcl.ac.uk> wrote:
> > > > >>>>>> Dear Makoto,
> > > > >>>>>> I actually switched to the pop eeg filt eeglab function and
> it now Really attenuated anything >40Hz, and my ERPs are cleaner. However I
> filtering between 0.1-40Hz at the same time in the GUI (I interned the high
> pass and low pass simultaneously). Is this OK to do? The frequency response
> looks OK.
> > > > >>>>>>
> > > > >>>>>> The filter order was automatically set very high by the GUI,
> but it's continuous data and I have room without events at the beginning
> and end of the data so any edge effects can be disgusted. What do you think?
> > > > >>>>>>
> > > > >>>>>> Also, this is for my ERP analysis- I trained ICA on a 1Hz
> high pass filtered set.
> > > > >>>>>> I won't be using granger causality but I will be estimating
> phase during ITC.
> > > > >>>>>> Best wishes, and thanks,
> > > > >>>>>> Jumana
> > > > >>>>>>
> > > > >>>>>> ------------------------------------------
> > > > >>>>>> Jumana Ahmad
> > > > >>>>>> Post-Doctoral Research Worker in Cognitive Neuroscience
> EU-AIMS
> > > > >>>>>> Longitudinal European Autism Project (LEAP) & SynaG Study Room
> > > > >>>>>> M1.26.Department of Forensic and Neurodevelopmental Sciences
> (PO
> > > > >>>>>> 23) | Institute of Psychiatry, Psychology & Neuroscience |
> King’s
> > > > >>>>>> College London | 16 De Crespigny Park | London SE5 8AF
> > > > >>>>>>
> > > > >>>>>> Phone: 0207 848 5359| Email: jumana.ahmad at kcl.ac.uk |
> Website:
> > > > >>>>>> https://emea01.safelinks.protection.outlook.com/?url=
> www.eu-aims
> > > > >>>>>> .eu&data=01%7C01%7Cjumana.ahmad%40kcl.ac.uk%
> 7C15add3a4fe3049459e
> > > > >>>>>> 8a08d44c434afd%7C8370cf1416f34c16b83c72407165
> 4356%7C0&sdata=9bFL
> > > > >>>>>> Fj%2FkVl61CL%2BK749qenX14JOTzEBSNn9t9%2BBCJUk%3D&reserved=0 |
> > > > >>>>>> Facebook:
> > > > >>>>>> https://emea01.safelinks.protection.outlook.com/?url=
> www.faceboo
> > > > >>>>>> k.com%2Feuaims&data=01%7C01%7Cjumana.ahmad%40kcl.ac.uk%
> 7C15add3a
> > > > >>>>>> 4fe3049459e8a08d44c434afd%7C8370cf1416f34c16b83c72407165
> 4356%7C0
> > > > >>>>>> &sdata=d3Z6OAcHSkY4ww7a%2Bda2ir1pLENlcVPz%2FsDgLl%
> 2F51fo%3D&rese
> > > > >>>>>> rved=0
> > > > >>>>>>
> > > > >>>>>> From: Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
> > > > >>>>>> Sent: 26 January 2017 23:49:50
> > > > >>>>>> To: Ahmad, Jumana
> > > > >>>>>> Cc: eeglablist at sccn.ucsd.edu
> > > > >>>>>> Subject: Re: [Eeglablist] high frequency oscillation- eeg
> advice
> > > > >>>>>>
> > > > >>>>>> Dear Jumana,
> > > > >>>>>>
> > > > >>>>>> It's a bad idea to perform ICA with 0.1Hz high-pass filtered
> data. The cutoff frequency is too low. See this page and the referenced
> paper.
> > > > >>>>>>
> > > > >>>>>> https://emea01.safelinks.protection.outlook.com/?url=
> https%3A%2F
> > > > >>>>>> %2Fsccn.ucsd.edu%2Fwiki%2FMakoto%2527s_preprocessing_
> pipeline%23
> > > > >>>>>> High-pass_filter_the_data_at_1-Hz_.28for_ICA.2C_ASR.2C_and_
> Clean
> > > > >>>>>> Line.29&data=01%7C01%7Cjumana.ahmad%40kcl.ac.uk%
> 7C15add3a4fe3049
> > > > >>>>>> 459e8a08d44c434afd%7C8370cf1416f34c16b83c72407165
> 4356%7C0&sdata=
> > > > >>>>>> N0z4Ru6QsY24Bg4PD7FFPrfC999R8%2F7hLVk5ZvonLDU%3D&reserved=0
> > > > >>>>>>
> > > > >>>>>>> A 30Hz low pass does not help to get rid of the oscillation,
> which is really significant in the data.
> > > > >>>>>>
> > > > >>>>>> Check the channel frequency spectra and tell me if you see
> peaks
> > > > >>>>>> in it. If necessary, you can cut it off using a designed
> low-pass
> > > > >>>>>> filter (not like Butterworth...)
> > > > >>>>>>
> > > > >>>>>>> I use a butterworth filter, which is good for ERP analysis
> with low phase distortion.
> > > > >>>>>>
> > > > >>>>>> Do not make qualitative judgement just because something is
> NOT a classic Butterworth. Of course, if the attenuation is small, the
> phase 'distortion' is small. But if such small attenuation is not useful,
> it does not help at all! Also, be careful with the word 'phase'.
> Particularly people who do not know basics of signal processing believe
> phase as some magical thing. If you are not performing Granger Causality
> Analysis or something, you don't need to be so worried about phase issue in
> practice.
> > > > >>>>>>
> > > > >>>>>>> I also already run ICA, but in some datasets there is a very
> significant high frequency oscillation.
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>> Remember, to eliminate this is more important than being
> afraid of qualitative phase issue.
> > > > >>>>>>
> > > > >>>>>>> However, I can see the high frequency oscillations in my
> ERP, which is not ideal and now I need to try and get rid of it further.
> > > > >>>>>>
> > > > >>>>>> Can I filter again on top of the data which already has
> already undergone ICA- I only use ICA to remove blinks?
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>> You'd better to filter the data on continuous state. If you
> need to filter the epoched data, the half of filter length from both ends
> becomes unreliable.
> > > > >>>>>>
> > > > >>>>>>> Should I do cleanline, although it would have to be after
> ICA now- I read this is not advisable.
> > > > >>>>>>
> > > > >>>>>>> Should I use a notch filter?
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>> If you see > 20dB line noise, Cleanline may not help. In this
> case, I would simply apply a designed low-pass filter, either Hamming
> (-50dB) or Blackman (-70dB) using firfilt(). See 'Tools' -> 'Filter the
> data' -> 'Windowed sinc FIR filter'.
> > > > >>>>>>
> > > > >>>>>> There are different guys saying different things about data
> preprocessing. It is confusing, I know! The only good solution for this is
> to become an engineer yourself...
> > > > >>>>>>
> > > > >>>>>> Makoto
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>> On Tue, Jan 24, 2017 at 7:00 AM, Ahmad, Jumana <
> jumana.ahmad at kcl.ac.uk> wrote:
> > > > >>>>>> Hi  Everyone,
> > > > >>>>>>
> > > > >>>>>> I am running a large scale ERP analysis. I filtered 1-40Hz
> (ICA AMICA), or 0.1-40Hz for the ERP dataset. A 30Hz low pass does not help
> to get rid of the oscillation, which is really significant in the data. I
> use a butterworth filter, which is good for ERP analysis with low phase
> distortion.
> > > > >>>>>>
> > > > >>>>>> I also already run ICA, but in some datasets there is a very
> significant high frequency oscillation.
> > > > >>>>>>
> > > > >>>>>> I do not use cleanline, which is not typical in the
> literature I have been basing my pipeline on.
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>> However, I can see the high frequency oscillations in my ERP,
> which is not ideal and now I need to try and get rid of it further.
> > > > >>>>>>
> > > > >>>>>> Can I filter again on top of the data which already has
> already undergone ICA- I only use ICA to remove blinks?
> > > > >>>>>>
> > > > >>>>>> Should I do cleanline, although it would have to be after ICA
> now- I read this is not advisable.
> > > > >>>>>>
> > > > >>>>>> Should I use a notch filter?
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>> Any help would be appreciated.
> > > > >>>>>>
> > > > >>>>>> Best wishes,
> > > > >>>>>>
> > > > >>>>>> Jumana
> > > > >>>>>>
> > > > >>>>>>
> > > > >>>>>>
> > > >
> > > > --
> > > > Isaiah Innis
> > > > Indiana University '13
> > > > EEG Technician, IUB IRF
> > > >
> > > > _______________________________________________
> > > > 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
> > >
> > >
> > >
> > >
> > > --
> > > Isaiah Innis
> > > Indiana University '13
> > > EEG Technician, IUB IRF
> >
> > _______________________________________________
> > 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
>
> _______________________________________________
> 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
>



-- 
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170510/55a7d077/attachment.html>


More information about the eeglablist mailing list