[FieldTrip] How to detect the artifacts in continuous eeg data prior to segmenting with Fieldtrip

AGOURAM Hasnae hasnae.AGOURAM at univ-amu.fr
Mon Apr 24 16:03:28 CEST 2023


Hi Fieldtrip community,

I have a question regarding the artifcat identification based on continouis data prior to epoching (because I am not going to epoch my data ). In this case I can not use the function ft_rejectvisual, which is specific to epoched data, but I am going to use ft_databrowser () to mark the artifact segements.

I use the following code:
% Define the configuration for the data browser
cfg = [];
cfg.viewmode = 'vertical';
cfg.continuous = 'yes';
cfg.artfctdef.visual.artifact = 1; % enable artifact marking mode
cfg.artfctdef.visual.continuous = 'yes'; % mark continuous segments
cfg.artfctdef.visual.channel = {'all'}; % mark artifacts across all channels
cfg.artfctdef.visual.feedback = 'yes'; % show the marked artifacts
% Launch the data browser and mark segments with artifacts
cfg.artfctdef.reject = 'complete'; % mark complete segments as artifacts
cfg = ft_databrowser(cfg, data);
% Retrieve the marked artifacts
artifacts = cfg.artfctdef.visual.artifact;


But, I have an error : Output argument "trl" (and possibly others) not assigned a value in the execution with "artifact2trl" function.

Before epoching, has anyone tried to reject artifacts using continuous data. Do you have any insight into this error?


Many thanks,

Hasnae AGOURAM

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230424/4fff8a7d/attachment.htm>


More information about the fieldtrip mailing list