<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hey there,<br/></div><div><br/></div><div>sorry for not thinking about it any earlier, indeed I can confirm that ft_denoise.. needs the reference channels to function properly. I remember having to preprocess in a funny order in old ft versions, to do artefcat rejection without the refs and denoising with the refs. 
<br/></div><div><br/></div><div>Personally, I think the code should check whether the refs are there and otherwise throw an error. Since ft_denoise.. only concerns CTF (and bti??) systems, where the refs have fixed names this could be easily implemented, or am I mistaken?<br/></div><div><br/></div><div>Best,<br/></div><div>Michael<br/></div><div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
    <div style="margin:0 0 10px 0;">
        <b>Gesendet:</b> Donnerstag, 19. April 2012 um 08:59 Uhr<br/>
        <b>Von:</b> "Barbara Haendel" <B.Haendel@gmx.net><br/>
        <b>An:</b> "Email discussion list for the FieldTrip project" <fieldtrip@donders.ru.nl>, fieldtrip@donders.ru.nl<br/>
        
        <b>Betreff:</b> Re: [FieldTrip] ft_denoise_synthetic 3rd order grad
    </div>
    <div name="quoted-content">
        <br/>
<br/>
Hey there, thanks a lot for the replies!<br/>
<br/>
Panagiotis hit the mark. Indeed the reference channels were excluded in the first round of preprocessing. May be one could include a short note on that in the ft_denoise m-file description since only including relevant channels is the normal way to treat data in preprocessing. <br/>
<br/>
Thanks again,<br/>
Barbara<br/>
<br/>
<br/>
<br/>
<br/>
-------- Original-Nachricht --------<br/>
> Datum: Mon, 16 Apr 2012 17:53:56 +0200<br/>
> Von: Panagiotis Tsiatsis <Panagiotis.Tsiatsis@Tuebingen.MPG.de><br/>
> An: Email discussion list for the FieldTrip project <fieldtrip@donders.ru.nl><br/>
> Betreff: Re: [FieldTrip] ft_denoise_synthetic 3rd order grad<br/>
<br/>
> Hello girls and guys,<br/>
> <br/>
> It is working for my CTF MEG data - the version that I have is v4692 <br/>
> 2011-11-07.<br/>
> <br/>
> The other thing that might cause a problem could be ommiting the <br/>
> reference channels definition before the ft_ preprocessing command that <br/>
> gave you your "dataprepro"<br/>
> <br/>
> i.e maybe you might  need something like this<br/>
> <br/>
> cfg = [];<br/>
> <br/>
> ...<br/>
> //various preprocessing parameters<br/>
> ...<br/>
> <br/>
> cfg.channel            = {'MEG', 'MEGREF', 'REFGRAD' , 'REFMAG'};<br/>
> <br/>
> dataprepro = ft_preprocessing(cfg);<br/>
> <br/>
> <br/>
> Hope you are lucky :)<br/>
> <br/>
> Best,<br/>
> Panagiotis<br/>
> <br/>
> <br/>
> On 4/16/2012 4:59 PM, Stan van Pelt wrote:<br/>
> > Hi Barbara,<br/>
> ><br/>
> > I can replicate your finding, but am unsure what is causing it. Maybe <br/>
> > the difference/correction is lower than the Matlab or CTF precision? <br/>
> > In any case, if the 3rd order gradients were on, ft_denoise_synthetic <br/>
> > would undo the G3BR-balancing, ergo it toggles.<br/>
> ><br/>
> > Best,<br/>
> > Stan<br/>
> ><br/>
> ><br/>
> > ------------------------------------------------------------------------<br/>
> ><br/>
> >     *Van: *"Michael Wibral" <michael.wibral@web.de><br/>
> >     *Aan: *"Email discussion list for the FieldTrip project"<br/>
> >     <fieldtrip@donders.ru.nl><br/>
> >     *Verzonden: *Maandag 16 april 2012 16:46:27<br/>
> >     *Onderwerp: *Re: [FieldTrip] ft_denoise_synthetic 3rd order grad<br/>
> ><br/>
> >     Hi Barbara,<br/>
> ><br/>
> >     are you certain that the original data do not have 3rd gradients<br/>
> >     enabled? - looking at them once in dataEditor, switching to 3rd<br/>
> >     grads and accidentally forgetting to unclick 'save parameters with<br/>
> >     dataset' will make them have 3rd grads...<br/>
> ><br/>
> >     When I last used ft_denoise_synthetic it worked pretty much as<br/>
> >     described (??).<br/>
> ><br/>
> >     Michael<br/>
> ><br/>
> >     *Gesendet:* Montag, 16. April 2012 um 15:56 Uhr<br/>
> >     *Von:* "Barbara Haendel" <B.Haendel@gmx.net><br/>
> >     *An:* fieldtrip@donders.ru.nl<br/>
> >     *Betreff:* [FieldTrip] ft_denoise_synthetic 3rd order grad<br/>
> ><br/>
> >     Dear fieldtrip users,<br/>
> ><br/>
> >     has anyone experience in using ft_denoise_synthetic? If I try to<br/>
> >     calculate 3rd order grads in the below specified way the data does<br/>
> >     not change with respect to the input data (which has no synthetic<br/>
> >     gradiometer applied). Is there some obvious misunderstanding on my<br/>
> >     side of how to use this function or is our environment truly<br/>
> >     noiseless :)<br/>
> ><br/>
> >     Cheers,<br/>
> >     Barbara<br/>
> ><br/>
> >     cfg=[];<br/>
> >     cfg.gradient ='G3BR';<br/>
> >     cfg.trials = 'all';<br/>
> >     data_3rdorder = ft_denoise_synthetic(cfg, dataprepro);<br/>
> ><br/>
> ><br/>
> >     >> data_3rdorder.grad.balance<br/>
> ><br/>
> >     ans =<br/>
> ><br/>
> >     G1BR: [1x1 struct]<br/>
> >     G2BR: [1x1 struct]<br/>
> >     G3BR: [1x1 struct]<br/>
> >     current: 'G3BR'<br/>
> >     previous: {'none'}<br/>
> ><br/>
> >     >> sum(dataprepro.trial{8}(30,:)-data_3rdorder.trial{8}(30,:))<br/>
> ><br/>
> >     ans = 0<br/>
> ><br/>
> >     -- <br/>
> >     NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!<br/>
> >     Jetzt informieren:<br/>
> <a href="http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a" target="_blank">http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a</a><br/>
> >     _______________________________________________<br/>
> >     fieldtrip mailing list<br/>
> >     fieldtrip@donders.ru.nl<br/>
> >     <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br/>
> ><br/>
> ><br/>
> >     _______________________________________________<br/>
> >     fieldtrip mailing list<br/>
> >     fieldtrip@donders.ru.nl<br/>
> >     <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br/>
> ><br/>
> ><br/>
> ><br/>
> ><br/>
> > -- <br/>
> > Stan van Pelt<br/>
> ><br/>
> > Donders Institute for Brain, Cognition and Behaviour, Radboud <br/>
> > University Nijmegen<br/>
> > Kapittelweg 29, 6525 EN Nijmegen, Netherlands<br/>
> > E-mail:  stan.vanpelt@donders.ru.nl<br/>
> > Website: <a href="http://www.ru.nl/donders/" target="_blank">www.ru.nl/donders/</a><br/>
> > Phone:  (+31) (0)24 36 10981<br/>
> > Fax:    (+31) (0)24 36 10989<br/>
> ><br/>
> ><br/>
> > _______________________________________________<br/>
> > fieldtrip mailing list<br/>
> > fieldtrip@donders.ru.nl<br/>
> > <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br/>
> <br/>
> <br/>
> -- <br/>
> Panagiotis S. Tsiatsis<br/>
> Max Planck Institute for Biological Cybernetics<br/>
> Cognitive NeuroImaging Group<br/>
> Tuebingen, Germany<br/>
> <br/>
<br/>
-- <br/>
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  <br/>
Jetzt informieren: <a href="http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a" target="_blank">http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a</a><br/>
_______________________________________________<br/>
fieldtrip mailing list<br/>
fieldtrip@donders.ru.nl<br/>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br/>

    </div>
</div><div><br/><br/></div></div></body></html>