<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi 'trippers...<br>
<br>
So I'm having some trouble with the following pipeline:<br>
<br>
Import and filter continuous data using ft_preprocessing<br>
Create trial definition using ft_definetrial<br>
Apply trial definition to imported, filtered data using
ft_redefinetrial<br>
(in case it helps, full code is below)<br>
<br>
When I call ft_redefinetrial, it fails with:-<br>
<b>??? Error using ==> ft_checkdata at 307<br>
This function requires raw data as input.<br>
<br>
Error in ==> ft_redefinetrial at 103<br>
data = ft_checkdata(data, 'datatype', 'raw', 'feedback',
cfg.feedback);</b><br>
<br>
However, when I check my data myself using ft_checkdata...<br>
<b>ft_checkdata(data,'datatype','raw','feedback','yes')</b><br>
...the feedback it gives me is...<br>
<b>the input is raw data with 2 channels and 1 trials</b><br>
...which is exactly what I'd expect. (There are only two channels
because I am just looking at my heog and veog data).<br>
<br>
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?<br>
<br>
Best,<br>
Tom <br>
<br>
PS - full code here:-<br>
<b><br>
% import eog data<br>
<br>
veog_chan='UADC001';<br>
heog_chan='UADC002';<br>
<br>
cfg = [];<br>
cfg.dataset = full_file;<br>
cfg.channel = {heog_chan, veog_chan};<br>
cfg.continuous = 'yes';<br>
data = ft_preprocessing(cfg);<br>
<br>
% define trials<br>
<br>
cfg = [];<br>
cfg.dataset = meg_file;<br>
cfg.trialdef.prestim = -0.1; % ie 100ms after stim<br>
cfg.trialdef.poststim = 5; % in seconds<br>
cfg.trialdef.behavdata = fullfile(behav_file_dir,
behav_file);<br>
<br>
cfg.trialfun = 'trialfun_find_eog';<br>
<br>
cfg = ft_definetrial(cfg);<br>
<br>
% apply trial def to continuous data<br>
<br>
data=ft_redefinetrial(data,cfg);</b><br>
<pre class="moz-signature" cols="72">--
Tom Marshall, MSc.
Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging
tel: +31(0)243668487
email: <a class="moz-txt-link-abbreviated" href="mailto:t.marshall@fcdonders.ru.nl">t.marshall@fcdonders.ru.nl</a>
postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands
visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands</pre>
</body>
</html>