[FieldTrip] automatic artifact correction after virtual channels/beamformer

"Jörn M. Horschig" jm.horschig at donders.ru.nl
Tue Apr 15 11:47:13 CEST 2014


Hi Tyler,

the only way to keep the trial as a whole and still 'mark' artifactual 
periods is by calling ft_rejectartifact on your preprocessed data (i.e. 
original data incl. artifacts) using cfg.artctdef.reject = 'nan'. This 
will sets periods in which an artifact was detected to nan. However, 
there might be several downsides with this, as not all fieldtrip 
functions work with nans in your data. I have absolutely no clue how 
trentool is handling this. The only other alternative you have is to 
remove the whole trial, so that all your trials are of equal lengths.

Maybe you can achieve a similar thing (nan-ing of artifacts) by 
ft_redefinetrial and specify the original .trl-matrix (given that you 
have not resampled). Not exactly sure, but you can give it a try if you 
do not have the original preprocessed data at hand anymore.

Best,
Jörn






On 4/15/2014 9:03 AM, Tyler Grummett wrote:
>
> Hi Haiteng,
>
>
> Basically the automatic artefact detection algorithms removes some EEG 
> (if artefactual) and splits the data into two trials. These trials are 
> not the same size.
>
>
> TRENTOOL can only work on trials that are the same length. So I 
> determined what the biggest trial length was and redefined the trials.
>
>
> ie cfg = []
>
> cfg.length = x length
>
> ​ft_redefinetrial( cfg, data)
>
>
> However this is causing computational errors later on. So I was 
> wondering whether you could append the trials together and place a 
> discontinuation marker between them.
>
>
> The other thing I tried was to pass in the argument 'nan' into the 
> reject artefact function, but then this causes an issue with the 
> virtual channel procedure.
>
>
> Tyler
>
>
> *************************
>
> /Tyler Grummett ( BBSc, BSc(Hons I))/
> /PhD Candidate/
> /Brain Signals Laboratory/
> /Flinders University/
> /Rm 5A301/
> /Ext 66124/
> ------------------------------------------------------------------------
> *From:* fieldtrip-bounces at science.ru.nl 
> <fieldtrip-bounces at science.ru.nl> on behalf of Haiteng Jiang 
> <haiteng.jiang at gmail.com>
> *Sent:* Monday, 14 April 2014 9:04 PM
> *To:* fieldtrip at science.ru.nl
> *Subject:* Re: [FieldTrip] automatic artifact correction after virtual 
> channels/beamformer
>
>     Hi Tyler ,
>
> I think it makes sense to apply the inverse spatial filter on the the 
> marked out data since you build it on this interval. In other words, 
> non-marked out intervals data has different inverse filter. I don't 
> understand appending trials after automatic artefact detection. Do you 
> mean keep trials after automatic artefact detection ?
>
> Best,
> Haiteng
>
>
>     Message: 3
>     Date: Mon, 14 Apr 2014 07:26:44 +0000
>     From: Tyler Grummett <tyler.grummett at flinders.edu.au
>     <mailto:tyler.grummett at flinders.edu.au>>
>     To: FieldTrip discussion list <fieldtrip at science.ru.nl
>     <mailto:fieldtrip at science.ru.nl>>
>     Subject: Re: [FieldTrip] automatic artifact correction after virtual
>     channels/beamformer
>     Message-ID:
>     <149bb27d65e749c5b37bb3bfab16e87b at SIXPR03MB368.apcprd03.prod.outlook.com
>     <mailto:149bb27d65e749c5b37bb3bfab16e87b at SIXPR03MB368.apcprd03.prod.outlook.com>>
>
>     Content-Type: text/plain; charset="us-ascii"
>
>     Hello Haiteng,
>
>
>     Thankyou for the response. Yes I have gone through the tutorial. I
>     use clean data to make the inverse spatial filter. But do then
>     apply it to
>
>     marked out data or can apply it to non-marked out data. Also, is
>     there a way to append trials after you run an automatic artefact
>
>     rejection algorithm over it? At the moment, I am trying to use a
>     function that requires equal trial lengths. I can use ft_redefinetrial
>
>     to grab a 2 second epoch from each 'trial'. However that feel a
>     little crude as I am throwing out a lot of data.
>
>
>     Your help will be greatly appreciated.
>
>
>     Tyler
>
>
>     *************************
>
>     Tyler Grummett ( BBSc, BSc(Hons I))
>     PhD Candidate
>     Brain Signals Laboratory
>     Flinders University
>     Rm 5A301
>     Ext 66124
>     ________________________________
>     From: fieldtrip-bounces at science.ru.nl
>     <mailto:fieldtrip-bounces at science.ru.nl>
>     <fieldtrip-bounces at science.ru.nl
>     <mailto:fieldtrip-bounces at science.ru.nl>> on behalf of Haiteng
>     Jiang <haiteng.jiang at gmail.com <mailto:haiteng.jiang at gmail.com>>
>     Sent: Monday, 14 April 2014 3:53 PM
>     To: fieldtrip at science.ru.nl <mailto:fieldtrip at science.ru.nl>
>     Subject: Re: [FieldTrip] automatic artifact correction after
>     virtual channels/beamformer
>
>     Hi Tyler,
>     It is always nice to computate virtual MEG channels based on
>     artifact-corrected CLEAN data . Note that we use clean data to get
>     the inverse spatial filter by DICS. Regrading to how to create
>     virtual channel , please have a look at tutorial:
>     http://fieldtrip.fcdonders.nl/tutorial/shared/virtual_sensors
>
>     Best,
>     Haiteng
>
>
>
>     Message: 2
>     Date: Mon, 14 Apr 2014 02:54:16 +0000
>     From: Tyler Grummett <tyler.grummett at flinders.edu.au
>     <mailto:tyler.grummett at flinders.edu.au><mailto:tyler.grummett at flinders.edu.au
>     <mailto:tyler.grummett at flinders.edu.au>>>
>     To: FieldTrip discussion list <fieldtrip at science.ru.nl
>     <mailto:fieldtrip at science.ru.nl><mailto:fieldtrip at science.ru.nl
>     <mailto:fieldtrip at science.ru.nl>>>
>     Subject: [FieldTrip] automatic artifact correction after virtual
>     channels/beamformer
>     Message-ID:
>     <d9f26aff9ba640b29bfa36febf84e9cc at SIXPR03MB368.apcprd03.prod.outlook.com
>     <mailto:d9f26aff9ba640b29bfa36febf84e9cc at SIXPR03MB368.apcprd03.prod.outlook.com><mailto:d9f26aff9ba640b29bfa36febf84e9cc at SIXPR03MB368.apcprd03.prod.outlook.com
>     <mailto:d9f26aff9ba640b29bfa36febf84e9cc at SIXPR03MB368.apcprd03.prod.outlook.com>>>
>
>     Content-Type: text/plain; charset="us-ascii"
>
>     ?Hello all,
>
>
>     I was just wondering whether it is necessary to use the artifact
>     corrected data when creating virtual channels from beamformer sources
>
>     or whether you are able to use original, non-artifact corrected data.
>
>
>     Tyler
>
>
>     *************************
>
>     Tyler Grummett ( BBSc, BSc(Hons I))
>     PhD Candidate
>     Brain Signals Laboratory
>     Flinders University
>     Rm 5A301
>     Ext 66124
>     -------------- next part --------------
>     An HTML attachment was scrubbed...
>     URL:
>     <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140414/dca251ee/attachment-0001.html>
>
>     ------------------------------
>
>
>
>
>     --
>     Haiteng Jiang
>     PhD candidate
>     Neuronal Oscillations Group
>     Donders Institute for Brain, Cognition and Behaviour
>     Centre for Cognitive Neuroimaging
>     Radboud University Nijmegen
>
>     Visiting address
>     Room 2.32
>     Donders Centre for Cognitive Neuroimaging
>     Kapittelweg 29
>     6525 EN Nijmegen
>     the Netherlands
>
>     Tel.: +31 (0)243668291 <tel:%2B31%20%280%29243668291>
>     Web: https://sites.google.com/site/haitengjiang/
>     -------------- next part --------------
>     An HTML attachment was scrubbed...
>     URL:
>     <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140414/c2da1c20/attachment-0001.html>
>
>     ------------------------------
>
>     _______________________________________________
>     fieldtrip mailing list
>     fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
>     http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>     End of fieldtrip Digest, Vol 41, Issue 25
>     *****************************************
>
>
>
>
> -- 
> Haiteng Jiang
> PhD candidate
> Neuronal Oscillations Group
> Donders Institute for Brain, Cognition and Behaviour
> Centre for Cognitive Neuroimaging
> Radboud University Nijmegen
>
> Visiting address
> Room 2.32
> Donders Centre for Cognitive Neuroimaging
> Kapittelweg 29
> 6525 EN Nijmegen
> the Netherlands
>
> Tel.: +31 (0)243668291
> Web: https://sites.google.com/site/haitengjiang/
>
>
> _______________________________________________
> 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




More information about the fieldtrip mailing list