[FieldTrip] Redefining trials, data is both raw and not raw...

Tom Marshall t.marshall at fcdonders.ru.nl
Thu May 24 16:18:38 CEST 2012


Hi 'trippers...

So I'm having some trouble with the following pipeline:

Import and filter continuous data using ft_preprocessing
Create trial definition using ft_definetrial
Apply trial definition to imported, filtered data using ft_redefinetrial
(in case it helps, full code is below)

When I call ft_redefinetrial, it fails with:-
*??? Error using ==> ft_checkdata at 307
This function requires raw data as input.

Error in ==> ft_redefinetrial at 103
data = ft_checkdata(data, 'datatype', 'raw', 'feedback', cfg.feedback);*

However, when I check my data myself using ft_checkdata...
*ft_checkdata(data,'datatype','raw','feedback','yes')*
...the feedback it gives me is...
*the input is raw data with 2 channels and 1 trials*
...which is exactly what I'd expect. (There are only two channels 
because I am just looking at my heog and veog data).

It seems that my zenlike data are both raw and not raw, depending on 
whether ft_checkdata is called within ft_redefinetrial or by me. Any 
ideas why it could be failing in the former case?

Best,
Tom

PS - full code here:-
*
% import eog data

   veog_chan='UADC001';
   heog_chan='UADC002';

   cfg = [];
   cfg.dataset        = full_file;
   cfg.channel        = {heog_chan, veog_chan};
   cfg.continuous     = 'yes';
   data        = ft_preprocessing(cfg);

% define trials

   cfg                         = [];
   cfg.dataset                 = meg_file;
   cfg.trialdef.prestim        = -0.1; % ie 100ms after stim
   cfg.trialdef.poststim       = 5; % in seconds
   cfg.trialdef.behavdata     = fullfile(behav_file_dir, behav_file);

   cfg.trialfun = 'trialfun_find_eog';

   cfg = ft_definetrial(cfg);

% apply trial def to continuous data

   data=ft_redefinetrial(data,cfg);*

-- 
Tom Marshall, MSc.
Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging
tel: +31(0)243668487
email: t.marshall at fcdonders.ru.nl
postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands
visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands

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


More information about the fieldtrip mailing list