[FieldTrip] Automatized artifact rejection in FT
Herring, J.D. (Jim)
j.herring at donders.ru.nl
Wed Nov 18 15:42:23 CET 2015
Hi Ricarda,
I’m not sure if that is what you want but you could see whether a time-shifted version of your data (+200ms) differs more than 3uV from your original data. To shift your data you can use ft_redefinetrial with cfg.offset = -samples, where samples is the amount of samples from the original zero-point you wish to shift your time series by. Subtracting those time-series should give you the difference between t and t+200ms.
Best,
Jim
From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ricarda Braukmann
Sent: woensdag 18 november 2015 14:42
To: FieldTrip discussion list
Subject: Re: [FieldTrip] Automatized artifact rejection in FT
Hi Jim,
Thanks for the quick reply, this is really helpful.
I will try your suggestion for number three.
Regarding the second criteria, we indeed want to exclude changes of more than 3uV between t and t+200ms.
So if you have any suggestion of how we might be able to implement this as well, that would be great!
Thanks!
Ricarda
On Wed, Nov 18, 2015 at 2:14 PM, Herring, J.D. (Jim) <j.herring at donders.ru.nl<mailto:j.herring at donders.ru.nl>> wrote:
Hi Ricarda,
All three criteria have a certain threshold that has to be met in order for a trial to be marked as containing artifacts so for all criteria you could use ft_artifact_threshold (or ft_artifact_zvalue). The difference will be how you preprocess the signal. You would need to transform the signal so that for criteria nr. 2 the signal represents the potential difference over a 200ms window?, and for nr. 3 the potential difference per sampling point.
Number 3 is relatively easy, you can calculate the first temporal derivative (ie. the difference between two consecutive samples) with cfg.artfctdef.threshold.derivative = ‘yes’ (or ….threshold.absdiff = ‘yes’, if you want the absolute difference). So something like this should work:
cfg.artfctdef.threshold.channel = cell-array with channel labels
cfg.artfctdef.threshold.bpfilter = 'no';
cfg.artfctdef.threshold.absdiff = ‘yes’;
cfg.artfctdef.threshold.max = 50;
Number 2 is slightly more difficult because you want to integrate over a larger window. I don’t fully understand what you want to avoid, should the signal at time X stay within 3uV of the signal at time X + 200ms?
Best,
Jim
From: fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl> [mailto:fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl>] On Behalf Of Ricarda Braukmann
Sent: woensdag 18 november 2015 12:58
To: FieldTrip discussion list
Subject: [FieldTrip] Automatized artifact rejection in FT
Hi everyone,
I would like to implement an automatized artifact rejection procedure for my EEG data and compare this to manual rejection.
I would like to use the following criteria for rejection of a segment:
1. amplitudes below -150 or above 150 µV
2. a difference of 3 µV per 200 ms,
3. or a voltage change of 50 µV per sampling point
Is there a function in fieldtrip that I can use for implementing these different criteria?
I know that FT_ARTIFACT_THRESHOLD can reject segments on basis of the first criteria but I am unsure how to implement the second two.
Any help would be highly appreciated.
Thanks!
Ricarda
--
Ricarda Braukmann, MSc
PhD student
Radboud University Medical Centre & Baby Research Center
Donders Institute for Brain, Cognition and Behaviour,
Centre for Neuroscience & Centre for Cognition
Room B.01.22
Phone: +31 (0) 24 36 12652
Email: r.braukmann at donders.ru.nl<mailto:r.braukmann at donders.ru.nl>
Website: http://www.zebra-project.nl/
--
Ricarda Braukmann, MSc
PhD student
Radboud University Medical Centre & Baby Research Center
Donders Institute for Brain, Cognition and Behaviour,
Centre for Neuroscience & Centre for Cognition
Room B.01.22
Phone: +31 (0) 24 36 12652
Email: r.braukmann at donders.ru.nl<mailto:r.braukmann at donders.ru.nl>
Website: http://www.zebra-project.nl/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151118/5d228899/attachment-0002.html>
More information about the fieldtrip
mailing list