<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hi Mats,
<div><br>
</div>
<div>You can append any of the original grad fields into the data structure.</div>
<div>You could also consider using ft_average_sens.</div>
<div>Best,</div>
<div>Jan-Mathijs</div>
<div><br>
</div>
<div><br>
</div>
<div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Jan-Mathijs Schoffelen, MD PhD, Senior researcher
<div><br>
Max Planck Institute for Psycholinguistics<br>
Donders Centre for Cognitive Neuroimaging</div>
<div><br>
E-mail: <a href="mailto:j.schoffelen@donders.ru.nl">j.schoffelen@donders.ru.nl</a><br>
Telephone: +31-24-3614793<br>
<br>
<a href="http://www.hettaligebrein.nl">http://www.hettaligebrein.nl</a></div>
<div><a href="http://www.fieldtriptoolbox.org">http://www.fieldtriptoolbox.org</a></div>
</div>
</div>
</div>
</div>
<br>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
<div>
<div>On Jul 8, 2015, at 10:16 PM, Es, M.W.J. van (Mats) <<a href="mailto:M.vanEs@donders.ru.nl">M.vanEs@donders.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div fpstyle="1" ocsi="0">
<div style="direction: ltr; font-family: Tahoma; font-size: 10pt;"><span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">Hi everyone,</span>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
For my experiment I have three MEG sessions. For analysis I preprocessed them and combined them using ft_appenddata. However, the 'grad' field in the data structured is then removed. When I call ft_megplanar (see code)  to do time frequency analysis I get the
 following error (matlab2013a in cluster, latest fieldtrip version):</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
------------------------------<wbr>----</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
<div>cfg                 = [];</div>
<div>cfg.method          = 'template';</div>
<div>cfg.template        = 'CTF275_neighb.mat';</div>
<div>% neighbours          = ft_prepare_neighbours(cfg, alldatacorrect);</div>
<div>neighbours          = ft_prepare_neighbours(cfg, alldata);</div>
<div><br>
</div>
<div>cfg                 = [];</div>
<div>cfg.method          = 'sincos';</div>
<div>cfg.neighbours      = neighbours;</div>
<div>% data_planar_correct = ft_megplanar(cfg, alldatacorrect);</div>
<div>data_planar         = ft_megplanar(cfg, alldata);</div>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
------------------------------<wbr>----<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
<div><i>Error using ft_checkdata (line 527)</i></div>
<div><i>This function requires MEG data with a 'grad' field</i></div>
<div><i><br>
</i></div>
<div><i>Error in ft_megplanar (line 96)</i></div>
<div><i>data = ft_checkdata(data, 'datatype', {'raw' 'freq'}, 'feedback', 'yes', 'hassampleinfo', 'yes', 'ismeg', 'yes', 'senstype', {'ctf151', 'ctf275', 'bti148',</i></div>
<div><i>'bti248', 'itab153', 'yokogawa160', 'yokoga </i></div>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
I already looked at the 'grad' field of the individual sessions and they are not the same. How should I solve this?</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
Thanks for your help,</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px; background-color: rgb(255, 255, 255);">
Mats</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div>
</blockquote>
</div>
<br>
</div>
<br>
</div>
</body>
</html>