<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Dear all, <br>
<br>
Until some weeks ago, I used to proceed with the following steps to
compute ERFs:<br>
<br>
% For each subject<br>
dat = ft_preprocessing(cfgp, input);<br>
dat = ft_timelockanalysis(cfgtl, dat);<br>
<br>
cfg.method = 'template';
<br>
cfg.neighbours = ft_prepare_neighbours(cfg, dat);
<br>
cfg.planarmethod = 'sincos';
<br>
cond = ft_megplanar(cfg, dat)<br>
cplanar{suj} = ft_combineplanar([], cond);<br>
<br>
ga = ft_timelockgrandaverage([], cplanar{:});<br>
<br>
I excluded some channels for some subjects. <br>
I re-ran this script and now I'm left only with the channels that
are common to all subjects. (I'm using the DCCN internal fieldtrip
version). But I'm pretty sure it used to work until some time ago
such that in the GA, I had all the planar gradients still.<br>
<br>
I understand where it comes from, coz I get the warning that
gradiometer info is being discarded coz it cannot be averaged. <br>
I've found a previous post that came close (but still not there
yet):
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/pipermail/fieldtrip/2011-February/003471.html">http://mailman.science.ru.nl/pipermail/fieldtrip/2011-February/003471.html</a><br>
<br>
But I'm not being able to understand the explanation in the tutorial
about how to proceed:<br>
"Before calculating the grand average the data of each subject can
be realigned to standard sensor positions with <strong><a
href="http://fieldtrip.fcdonders.nl/reference/ft_megrealign"
class="wikilink1" title="">ft_megrealign</a></strong>", but then
it's unclear to me what cfg.template should be when using
ft_megrealign.<br>
<br>
So I tried (suggested by JM from another previous post)
<pre><i>"Alternatively, you could construct a gradiometer structure which
</i><i>contains a meaningful average of the coil positions and orientations."
</i>
</pre>
I made a grad in which grad.chanpos was an average of my
participants [302x3].<br>
I tried <br>
cfg.template = grad;<br>
cfg.template = grad.chanpos;<br>
cfg.template = grad.chanori;<br>
but I'm probably doing something wrong coz it didn't work still.<br>
In all three cases, the error is in ft_megrealign at 174 "cell
contents reference from a non-cell array object".<br>
<br>
So I guess my questions are:<br>
- what should the template be? What am I doing wrong?<br>
- do I need to make a grad structure myself with all the averages or
will the template do, once I get it right?<br>
<br>
Thanx loads, <br>
Vitória<br>
<br>
<pre class="moz-signature" cols="72">--
** Please consider the environment - do you really need to print? ** </pre>
</body>
</html>