[FieldTrip] why does ft_denoise_synthetic inserts NaNs in grad fields

Mohsen moradi moh3nalimoradi at gmail.com
Wed Jul 10 12:12:01 CEST 2013


*Hello,** *

       I am mohsen alimoradi, MSc student of artificial intelligence
in Qazvin Azad University. *
   **I am working on  the Biomag 2012 analysis competition.**
   I have downloaded a .zip file from
ftp://ftp.fcdonders.nl/pub/biomag2012/.
<ftp://ftp.fcdonders.nl/pub/biomag2012/>** **   I have extracted the
content and I am interested in the second objective,**   the one
related to long-term memory representations (folder data2).** **   I
was able to load the 2 mat files into Matlab workspace.** **   I was
also able to use FieldTrip functions on tutorial code.** **   How
could I use FieldTrip on this data? If there are more ways, which one
would be the fastest/easiest?** **   Thanks a lot*



On Tue, Jul 9, 2013 at 9:16 PM, Alexander Backus <a.backus at donders.ru.nl>wrote:

> Thanks for your answer Haiteng.
>
> To share our findings on this topic:
>
> After some more debugging, we realized that it could indeed be the ICA
> function that inserts NaNs into the grad info.
>
> It seems ft_denoise_synthetic only changes the grad info for some
> reference channels...
>
> We now use Haiteng's trick of replacing the post-ICA grad info, with the
> post-denoise grad info, however, it feels somewhat dangerous to perform
> such "dirty" fixes, since that grad info is probably removed for a certain
> reason. We are oblivious to its impact subsequent steps like planar
> transform and source reconstruction.
>
> In addition, we dug up the following page on the FieldTrip wiki which
> explains the denoising.
>
> http://fieldtrip.fcdonders.nl/faq/how_does_the_ctf_higher-order_gradiometer_work
>
> Thanks!
>
> Cheers,
> Alexander
>
>
> On Sun, Jul 7, 2013 at 8:17 PM, Haiteng Jiang <haiteng.jiang at gmail.com>wrote:
>
>> Hi Alexander,
>>       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:
>>
>>            % reading
>>           cfg = [];
>>           cfg.dataset                 = dataset;
>>           cfg.trialdef.eventtype      = '';
>>           cfg.trialdef.eventvalue  =  ;
>>           cfg.continuous = 'yes';
>>           cfg.channel= 'all';
>>           cfg.trialdef.prestim = ;
>>           cfg.trialdef.poststim = ;
>>           cfg = ft_definetrial(cfg);
>>           trl =   cfg.trl;
>>           cfg.detrend ='yes';
>>           cfg.demean = 'yes';
>>           data= ft_preprocessing(cfg);
>>           cfg.gradient = 'G3BR';
>>           data= ft_denoise_synthetic(cfg,data);
>>
>> 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.
>>                                                      Best,
>>                                                      Haiteng
>>
>>
>>>
>>>
>>> Message: 2
>>> Date: Fri, 5 Jul 2013 09:38:55 +0200
>>> From: Alexander Backus <a.backus at donders.ru.nl>
>>> To: fieldtrip at science.ru.nl
>>> Subject: [FieldTrip] why does ft_denoise_synthetic inserts NaNs in
>>>         grad    fields
>>> Message-ID:
>>>         <
>>> CAEfPLbcMKmSkhak0cqQHNp-Lye8xhLJKjauN4GWupBCdVBA6cQ at mail.gmail.com>
>>> Content-Type: text/plain; charset="iso-8859-1"
>>>
>>>
>>> Hi,
>>>
>>> When I use ft_denoise_synthetic on my preprocessed CTF275 MEG data to
>>> covert to 3rd order gradient, it replaces the values in data.grad.chanpos
>>> and data.grad.chanori with NaNs.
>>>
>>> I assume this is done because they are no longer valid.
>>> When digging into the low-level code I found something about mismatching
>>> number of channels.
>>>
>>> Anyway, when I want to subsequently covert to planar gradient (does this
>>> actually makes sense?) or create a source model, I need these grad
>>> values.
>>>
>>> I have two questions:
>>>
>>> 1) What does ft_denoise_synthetic exactly do (in non-math terms) and why
>>> are NaNs inserted in the grad subfields?
>>>
>>> 2) Can I still use the data for planar gradient conversion or source
>>> modeling by using the earlier stored old gradient info (pre
>>> ft_denoise_synthetic) or is this ill-advised and is there a more wise
>>> course of action?
>>>
>>> Thanks in advance,
>>> Best,
>>> Alexander Backus
>>>
>>
>>
>>
>> --
>> Haiteng Jiang
>> PhD candidate
>> Neuronal Oscillations Group
>> Donders Institute for Brain, Cognition and Behaviour
>> Centre for Cognitive Neuroimaging
>> Radboud University Nijmegen
>>
>> Visiting address
>> Room 2.32
>> Donders Centre for Cognitive Neuroimaging
>> Kapittelweg 29
>> 6525 EN  Nijmegen
>> the Netherlands
>>
>>  Tel.: +31 (0)243668291
>>  Web:  https://sites.google.com/site/haitengjiang/
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>
>
>
> --
> Alexander R. Backus, MSc
> PhD Candidate at the Donders Institute for Brain, Cognition and Behaviour
>
> Centre for Cognitive Neuroimaging
> Radboud University Nijmegen
> Memory and Space Research Group
> www.doellerlab.com
>
> P.O. Box 9101, NL-6500 HB Nijmegen , The Netherlands
> Telephone: +31(0)24 36 10754
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130710/94777459/attachment.html>


More information about the fieldtrip mailing list