[FieldTrip] filter in-memory trials data with mirroring

Robin robince at gmail.com
Fri Apr 26 11:11:05 CEST 2013


Hello,

Is it possible filter in-memory extracted trials data with mirroring at the
edges?

When I try:

% filter
cfg = [];cfg.lpfilter = 'yes';cfg.lpfreq = '40';cfg.lpfilttype =
'but';cfg.padtype = 'mirror';% trial length is 1.1s so mirror-pad to
1.5s (200ms each side)cfg.padding = 1.5;
flt_data = ft_preprocessing(cfg, block_data);

I get:

Reference to non-existent field 'Fs'.

Error in ft_preprocessing (line 288)
      padding = round(cfg.padding * data.Fs);

Adding block_data.Fs = block_data.fsample; seems to work. But in the
resulting data structure the time vectors no longer match the trial data,
so obviously something is going wrong:

>> size(block_data.time{1})

ans =

     1   560

>> size(block_data.trial{1})

ans =

   234   560

>> size(flt_data.trial{1})

ans =

   234   560

>> size(flt_data.time{1})

ans =

     1   357

Is there a correct way to do this? (Filter trials with mirrored edges)

Thanks,

Robin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130426/43f24ae3/attachment.html>


More information about the fieldtrip mailing list