No subject

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Mon Feb 13 12:56:40 CET 2006


Hi Thomas

On 13-feb-2006, at 11:42, Thomas Koelewijn wrote:
> Dear all,
>
> I'm working with a old fieldtrip script in which I perform artefact
> rejection for both EOG channels separately. When I run the scrip
> for the second channel fieldtrip tells me that I already used EOG
> rejection and skips this part. Is there a trick to prevent this?
>
> Gr.
> Thomas

You can erase the field cfg.artfctdef.eog after the first EOG
detection. i.e.

cfg               = ... general settings ...
cfg.artfctdef.eog = ... EOG1 settings ...
cfg               = artifact_eog(cfg); % detect EOG in channel 1
keepeog1          = cfg.artfctdef.eog;
cfg.artfctdef.eog = [];

cfg.artfctdef.eog = ... EOG2 settings ...
cfg               = artifact_eog(cfg); % detect EOG in channel 2
keepeog2          = cfg.artfctdef.eog;
cfg.artfctdef.eog = [];

Then you can concatenate the artifacts for EOG1 to those of EOG2 and
reject them together:

cfg.artfctdef.eog.artifact = [keepeog1.artifact; keepeog2.artifact];
% this is a Nx2 trl-like array without offset
cfg = rejectartifact(cfg);

I hope this works,
Robert



More information about the fieldtrip mailing list