muscle artifact rejection

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Fri Feb 18 15:18:03 CET 2005


Hi Dasha,

Definetrial creates a list with [beginsample endsample offset] 
triplets, which describes the interesting segments of data (e.g. around 
the triggers). However, preprocessing refuses to read datasegments in 
which the prestim or poststim is longer than the length of your actual 
trials in the datafile, i.e. preprocessing does not want to read 
datasegments that might have a gap in them.

Probably you have a CTF dataset which was recorded in a 
pseudocontinuous fashion. That means that the file does contain trials, 
but that there is no gap between the trials. In that case, you can 
force preprocessing (and each of the artifact_xxx routines) to 
disregard the trialboundaries and to continue reading the datasegments, 
even if they do cross trial boundaries in the datafile. This is done by 
specifying cfg.datatype='continuous'.

Hope this helps,
Robert


On 18 Feb 2005, at 11:52, Daria Osipova wrote:

> Hi
>
>  
>
> My muscle artifact rejection for the trial-based data crashes 
> apparently due to the fact that it starts to search for muscle 
> artifacts before the first trial starts. However I have this in my 
> script that should supposedly solve the problem:
>
>  
>
> cfg = definetrial(cfg);
>
> cfg.trl = cfg.trl(2:end-1,:);
>
> cfg = rmfield(cfg,'trialdef');
>
>  
>
> And this problem doesn’t occur with either EOG or jump rejection.
>
>  
>
> Here is what it says:
>
>  
>
> identifying artifact-epochs
>
> evaluating artifact_muscle
>
> scanning for muscle artifacts in trial 1 from 121
>
> ??? Error using ==> read_fcdc_data
>
> requested data segment extends over a discontinuous trial boundary
>
>  
>
> Error in ==> /home/common/matlab/fieldtrip/artifact_muscle.m
>
> On line 110  ==>      dat = read_fcdc_data(cfg.datafile, hdr, 
> trl(trllop,1)-fltpadding, ...
>
>  
>
> Error in ==> /home/common/matlab/fieldtrip/rejectartifact.m
>
> On line 238  ==>   eval(sprintf('[cfg, %s] = artifact_%s(cfg);', 
> cfg.artfctdef.type{type}, cfg.artfctdef.type{type}));
>
>  
>
> Error in ==> /home/common/matlab/fieldtrip/preprocessing.m
>
> On line 242  ==> [cfg] = rejectartifact(cfg);
>
>  
>
> Error in ==> /home/electromag/darosi/data/temp/prep.m
>
> On line 78  ==>             data = preprocessing(cfg);
>
>  
>
>  
>
> Thanks a lot!
>
>  
>
> Best regards,
>
>  
>
> Dasha
>
----------------------------------------------------------------------
Robert Oostenveld, PhD
F.C. Donders Centre for Cognitive Neuroimaging
Radboud University Nijmegen
phone: +31-24-3619695
http://www.ru.nl/fcdonders/
----------------------------------------------------------------------
N.B. Starting from 1 September 2004, the University of Nijmegen has 
changed its name to Radboud University Nijmegen. All web- and 
email-addresses ending in ".kun.nl" should therefore be changed into 
".ru.nl". Please update your address book and links.



More information about the fieldtrip mailing list