[FieldTrip] change in ft_rejectvisual regarding dataout.cfg.artifact

Robert Oostenveld r.oostenveld at donders.ru.nl
Mon Oct 20 15:31:29 CEST 2014

Dear all

I recently made a change in ft_rejectvisual that some of you might want to be aware of. It has to do with keeping track of rejected data segments and the change was made in revision 9881, which you can see in detail at https://code.google.com/p/fieldtrip/source/detail?r=9881

It used to be that with
dataout = ft_rejectvisual(cfg, datain);
you would get
as a Nx2 matrix with the data segments that were marked as artifact. 

The new behaviour is that the Nx2 matrix is now to be found in either one of
depening on whether cfg.method=summary/trial/channel.

This makes ft_rejectvisual compatible with the other ft_artifact_xxx functions. So, you can now do
cfg.keeptrial = ‘yes’
cfg.keepchannel = ‘yes’
dataout = ft_rejectvisual(cfg, datain);
where dataout still contains all trials and channels, but subsequently you can use
dataclean = ft_rejectartifact(dataout.cfg, datain) 
to remove them explicitly.

This facilitates repeated passes of ft_rejectartifact for different channel types (EEG, planar gradiometers, magnetometers) and to store the manual work in between.

best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141020/dd6bd140/attachment-0001.html>

More information about the fieldtrip mailing list