[FieldTrip] ft_preprocessing ignores channel selection

Steph Bickel bick35 at gmail.com
Sun Sep 27 08:54:21 CEST 2015


Hello fieldtrip experts,

a script that used to work gives me problems now. 

When I specify subsets of channels to import it will correctly only import the selected label but in the trial field it will have all channels imported. 


cfg=[];
cfg.dataset =  edf_file ;
cfg.continuous = ‘yes’;
cfg.demean = ‘yes' ;
cfg.channel = ‘Event' ;
raw = ft_preprocessing(cfg);

raw = 

           hdr: [1x1 struct]
         label: {'Event'}
          time: {[1x152082 double]}
         trial: {[129x152082 double]}
       fsample: 499.7071
    sampleinfo: [1 152082]
           cfg: [1x1 struct]


It seems that read_edf.m is being called and at line 351 the chanindx is being overwritten by EDF.chansel (which is being read out of the edf header directly). Do I see this correctly or am I setting wrong parameters?


  if isfield(EDF, 'chansel')
      chanindx = EDF.chansel;
      chanSel = 1;
  else
      chanindx = [1:EDF.NS]; 
      chanSel = 0;
  end;



Thank you!

Stephan 

(I’m using the current github field trip version on a mac) 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150926/e7807e11/attachment.html>


More information about the fieldtrip mailing list