<div dir="ltr">Hi Alexander,<div> I am not clear about what's ft_denoise_synthetic doing. However , I don't have such problem when I use . The reason you get 'mismatching number of channels' probably because you specify cfg.channel ='MEG' instead of including all channels. My FT code is something like this:</div>
<div><br></div><div><div> % reading </div><div> cfg = [];</div><div> cfg.dataset = dataset;</div><div> cfg.trialdef.eventtype = ''; </div><div> cfg.trialdef.eventvalue = ; </div>
<div> cfg.continuous = 'yes'; </div><div> cfg.channel= 'all'; </div><div> cfg.trialdef.prestim = ;</div><div> cfg.trialdef.poststim = ;</div><div> cfg = ft_definetrial(cfg); </div>
<div> trl = cfg.trl; </div><div> cfg.detrend ='yes';</div><div> cfg.demean = 'yes'; </div><div> data= ft_preprocessing(cfg); </div><div> cfg.gradient = 'G3BR';</div>
<div> data= ft_denoise_synthetic(cfg,data); </div></div><div><br></div><div>In my pipeline , the grad changes into NAN only after I run I ICA to remove artifacts . I replace this grad with previous good gradient information and assume it is fine for the latter source reconstruction. Hope this helps.</div>
<div> Best,</div><div> Haiteng <div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<br>
Message: 2<br>
Date: Fri, 5 Jul 2013 09:38:55 +0200<br>
From: Alexander Backus <<a href="mailto:a.backus@donders.ru.nl">a.backus@donders.ru.nl</a>><br>
To: <a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a><br>
Subject: [FieldTrip] why does ft_denoise_synthetic inserts NaNs in<br>
grad fields<br>
Message-ID:<br>
<<a href="mailto:CAEfPLbcMKmSkhak0cqQHNp-Lye8xhLJKjauN4GWupBCdVBA6cQ@mail.gmail.com">CAEfPLbcMKmSkhak0cqQHNp-Lye8xhLJKjauN4GWupBCdVBA6cQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi,<br>
<br>
When I use ft_denoise_synthetic on my preprocessed CTF275 MEG data to<br>
covert to 3rd order gradient, it replaces the values in data.grad.chanpos<br>
and data.grad.chanori with NaNs.<br>
<br>
I assume this is done because they are no longer valid.<br>
When digging into the low-level code I found something about mismatching<br>
number of channels.<br>
<br>
Anyway, when I want to subsequently covert to planar gradient (does this<br>
actually makes sense?) or create a source model, I need these grad values.<br>
<br>
I have two questions:<br>
<br>
1) What does ft_denoise_synthetic exactly do (in non-math terms) and why<br>
are NaNs inserted in the grad subfields?<br>
<br>
2) Can I still use the data for planar gradient conversion or source<br>
modeling by using the earlier stored old gradient info (pre<br>
ft_denoise_synthetic) or is this ill-advised and is there a more wise<br>
course of action?<br>
<br>
Thanks in advance,<br>
Best,<br>
Alexander Backus<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div><font face="arial, helvetica, sans-serif">Haiteng Jiang</font></div><div><font face="arial, helvetica, sans-serif">PhD candidate</font></div><div><font face="arial, helvetica, sans-serif">Neuronal Oscillations Group</font></div>
<div><font face="arial, helvetica, sans-serif">Donders Institute for Brain, Cognition and Behaviour</font></div><div><font face="arial, helvetica, sans-serif">Centre for Cognitive Neuroimaging</font></div><div><font face="arial, helvetica, sans-serif">Radboud University Nijmegen</font></div>
<div><span style="line-height:18px;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif"><br></font></span></div><div><span style="line-height:18px;background-color:rgb(255,255,255)"><font face="arial, helvetica, sans-serif">Visiting address</font></span></div>
<div><div style="text-align:left;background-color:rgb(255,255,255)"><div><span style="line-height:18px"><font face="arial, helvetica, sans-serif">Room 2.32</font></span></div><div><span style="line-height:18px"><font face="arial, helvetica, sans-serif">Donders Centre for Cognitive Neuroimaging</font></span></div>
<div><span style="line-height:18px"><font face="arial, helvetica, sans-serif">Kapittelweg 29</font></span></div><div><span style="line-height:18px"><font face="arial, helvetica, sans-serif">6525 EN Nijmegen</font></span></div>
<div><span style="line-height:18px"><font face="arial, helvetica, sans-serif">the Netherlands</font></span></div><div><span style="line-height:18px"><font face="arial, helvetica, sans-serif"><br></font></span></div></div>
</div><div><font face="arial, helvetica, sans-serif"> Tel.: +31 (0)243668291</font></div></div><div><font face="arial, helvetica, sans-serif"> Web: <a href="https://sites.google.com/site/haitengjiang/" target="_blank">https://sites.google.com/site/haitengjiang/</a></font></div>
</div></div></div>