[FieldTrip] padding of segmented data

Nenad Polomac polomacnenad at gmail.com
Mon Jun 24 11:02:18 CEST 2013


Hi Jörn and Casper,

Thank you very for your answers
I will use Jörns suggestion. I wasn't aware that you upgraded
ft_preprocessing.
All the best!

Nenad

On 24 June 2013 10:44, <fieldtrip-request at science.ru.nl> wrote:

> Send fieldtrip mailing list submissions to
>         fieldtrip at science.ru.nl
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> or, via email, send a message with subject or body 'help' to
>         fieldtrip-request at science.ru.nl
>
> You can reach the person managing the list at
>         fieldtrip-owner at science.ru.nl
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of fieldtrip digest..."
>
>
> Today's Topics:
>
>    1. Decreased baseline level after using ICA in ERP data
>       (Beom Jun Min)
>    2. Re: Decreased baseline level after using ICA in ERP data
>       (Lozano Soldevilla, D. (Diego))
>    3. Re: padding of segmented data (J?rn M. Horschig)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 24 Jun 2013 13:27:47 +0900
> From: Beom Jun Min <mbj0310 at gmail.com>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: [FieldTrip] Decreased baseline level after using ICA in ERP
>         data
> Message-ID:
>         <
> CA+v9jvKJnKAfsQDwoDhNVSPAKCmpOpwut8vdmFXa1akp_1WDGA at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear all,
>
> I have ERP data and now I am dealing with ICA to remove muscle and eye
> artifacts.
> However, I found that after ft_rejectcomponent, the baseline level of the
> segmented epoch decreased. (The baselinewindow is [-0.2 0].)
> The baseline level decreased even though I rejected only one component.
>
> My script is shown below.
>
> *%% Removing the Artifacts*
> *cfg = [];
> *
> *cfg.component = [ ]; % to be removed component(s)*
> *post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw);*
> *
> *
> *%% timelocking*
> *
> *
> *cfg = [];*
> *timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6);*
> *
> *
> *%% Plot*
> *
> *
> *figure;*
> *cfg = [];*
> *cfg.layout = lay;*
> *cfg.interactive = 'yes';*
> *cfg.channel = ['all', {'-EKG', '-EMG'}];*
> *ft_multiplotER(cfg, timelock_temp6)*
>
> Is there something that I missed?
>
> Thanks.
>
> BJ
>
> --
> BeomJun Min, M.D.
>
> Department of Medical System Engineering (DMSE)
> Gwangju Institute of Science and Technology (GIST)
> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju
> 500-712, Republic of Korea (South)
> Phone: +82-62-715-3266 / Fax: +82-62-715-3244
> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130624/02dd2d57/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Mon, 24 Jun 2013 10:25:24 +0200 (CEST)
> From: "Lozano Soldevilla, D. (Diego)"
>         <d.lozanosoldevilla at fcdonders.ru.nl>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: Re: [FieldTrip] Decreased baseline level after using ICA in
>         ERP data
> Message-ID:
>         <
> 831995030.1708865.1372062324986.JavaMail.root at sculptor.zimbra.ru.nl>
> Content-Type: text/plain; charset="utf-8"
>
> Dear Beom Jun, I see multiple scenarios why this baseline activity
> decrease could happen. First of all, how the component you're rejecting
> look like (i.e. "blink component")? Do you see this activity decrease after
> the baseline period? The "quality" of the ICA decomposition, how well your
> artifact/component of interest has been isolated by algorithm in time (i.e.
> blink time courses) and space (marked frontal topography), will determine
> the activity that later on you'll reject/select. If your decomposition is
> not well suited, the rejection of a particular IC activity might have
> "extra" activity you don't want to reject (effect of interest), might be
> the algorithm is not able to isolate the components of interests (i.e.
> artifacts) or a combination of both. To evaluate the quality of your ICA
> decomposition you might have a look here (
> http://www.ncbi.nlm.nih.gov/pubmed/19162199 ). Basically, the authors
> find that the ICA decomposition improves significantly " increased by
> removing the mean EEG at each channel for each epoch of data rather than
> the mean EEG in a prestimulus baseline" . In addition (see here:
> http://sccn.ucsd.edu/pipermail/eeglablist/2012/004925.html ), high-pass
> filtering above ~1hz improve the results. It's very important to feed ICA
> as much relevant data as you can use. The more the data, the better the
> decomposition. There's a rule of thumb that says that for a reliable IC
> decomposition 20 time points per channel 2 is needed (see here for a
> reference http://www.ncbi.nlm.nih.gov/pubmed/16904745 ) I hope that
> helps, Diego ----- Original Message -----
> > From: "Beom Jun Min" <mbj0310 at gmail.com>
> > To: "FieldTrip discussion list" <fieldtrip at science.ru.nl>
> > Sent: Monday, 24 June, 2013 6:27:47 AM
> > Subject: [FieldTrip] Decreased baseline level after using ICA in ERP
> > data
> > Dear all,
> > I have ERP data and now I am dealing with ICA to remove muscle and eye
> > artifacts.
> > However, I found that after ft_rejectcomponent, the baseline level of
> > the segmented epoch decreased. (The baselinewindow is [-0.2 0].)
> > The baseline level decreased even though I rejected only one
> > component.
> > My script is shown below.
> > %% Removing the Artifacts
> > cfg = [];
> > cfg.component = [ ]; % to be removed component(s)
> > post_ICA_temp6 = ft_rejectcomponent(cfg, comp_detrand, data_raw);
> > %% timelocking
> > cfg = [];
> > timelock_temp6 = ft_timelockanalysis(cfg, post_ICA_temp6);
> > %% Plot
> > figure;
> > cfg = [];
> > cfg.layout = lay;
> > cfg.interactive = 'yes';
> > cfg.channel = ['all', {'-EKG', '-EMG'}];
> > ft_multiplotER(cfg, timelock_temp6)
> > Is there something that I missed?
> > Thanks.
> > BJ
> > --
> > BeomJun Min, M.D.
> > Department of Medical System Engineering (DMSE)
> > Gwangju Institute of Science and Technology (GIST)
> > 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju
> > 500-712, Republic of Korea (South)
> > Phone: +82-62-715-3266 / Fax: +82-62-715-3244
> > E-mail: mbj0310 at gmail.com , http://bmssa.gist.ac.kr
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> -- PhD Student Neuronal Oscillations Group Donders Institute for Brain,
> Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud
> University Nijmegen NL-6525 EN Nijmegen The Netherlands
> http://www.ru.nl/people/donders/lozano-soldevilla-d/
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130624/ea1393f7/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Mon, 24 Jun 2013 10:43:11 +0200
> From: "J?rn M. Horschig" <jm.horschig at donders.ru.nl>
> To: fieldtrip at science.ru.nl
> Subject: Re: [FieldTrip] padding of segmented data
> Message-ID: <51C8069F.5070707 at donders.ru.nl>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Hi Nenad,
>
> what Casper said is not quite true. You can pad segmented trials, but
> you are limited in how to pad. There are different ways of padding, and
> what Casper was referring to is true data padding. Once you segmented
> your trials you cannot get back to your recorded data and attach more
> data to it. This is because filtering artifacts at edges etc would
> result in discontinuities and the like. However, there are other ways to
> achieve what you want. The most elegant way in my opinion is what Casper
> already suggested. Just for completeness, you can still pad using
> zero-padding (i.e. adding a bunch of 0s in the beginning and at the end
> of your trials). Other ways are mean-padding (pad with the mean value),
> or edge-padding (using the first/last value to padding). However, with
> all these methods you mostly also add a discontinuity, but you
> explicitly ask for that in this case :) The most elegant solution here
> might be to use mirror-padding, which is recently implemented.
> See here:
> http://fieldtrip.fcdonders.nl/reference/ft_preprocessing
> and here:
> http://fieldtrip.fcdonders.nl/reference/ft_preproc_padding
>
> Best,
> J?rn
>
> On 6/22/2013 2:32 PM, Casper van Heck wrote:
> > Dear Nenad,
> >
> > I think the option cfg.padding only works for that iteration of
> > ft_preprocessing, but what you can do, is select larger segments
> > initially, and then run ft_preprocessing again with smaller segments.
> >
> > While you can set ft_preprocessing to apply multiple different filters
> > in one go (like a low-pass, a high-pass, and a DFT-filter, for
> > example), using a similar filter multiple times (like a high-pass
> > filter at 4Hz, and another at 8Hz) is usually not required, or
> > recommended. If you do multiple analyses on the same data (which, for
> > example, require different filters) you could find it useful to create
> > multiple smaller pipelines with their own ft_preprocessing. Debugging
> > complex analyses can be a lot easier that way:)
> >
> > Hope this helps,
> >
> > Casper
> >
> >
> > On Sat, Jun 22, 2013 at 1:34 PM, Nenad Polomac <polomacnenad at gmail.com
> > <mailto:polomacnenad at gmail.com>> wrote:
> >
> >     Dear all,
> >
> >     In my pipeline I need two times to filter data with
> >     ft_preprocessing. Is it somehow possible to pad trials
> >     after segmentation? I need this in order to avoid filter artifacts
> >     during the second filtering.
> >
> >     Thank you in advance!
> >
> >     Nenad
> >
> >     _______________________________________________
> >     fieldtrip mailing list
> >     fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
> >     http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
> >
> >
> >
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
> --
> J?rn M. Horschig
> PhD Student
> Donders Institute for Brain, Cognition and Behaviour
> Centre for Cognitive Neuroimaging
> Radboud University Nijmegen
> Neuronal Oscillations Group
> FieldTrip Development Team
>
> P.O. Box 9101
> NL-6500 HB Nijmegen
> The Netherlands
>
> Contact:
> E-Mail: jm.horschig at donders.ru.nl
> Tel:    +31-(0)24-36-68493
> Web: http://www.ru.nl/donders
>
> Visiting address:
> Trigon, room 2.30
> Kapittelweg 29
> NL-6525 EN Nijmegen
> The Netherlands
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130624/d7eb547a/attachment.html
> >
>
> ------------------------------
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> End of fieldtrip Digest, Vol 31, Issue 41
> *****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130624/9adbc3ec/attachment-0002.html>


More information about the fieldtrip mailing list