[FieldTrip] why does ft_denoise_synthetic inserts NaNs in grad fields

Haiteng Jiang haiteng.jiang at gmail.com
Sun Jul 7 20:17:58 CEST 2013


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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130707/cbdd8572/attachment.html>


More information about the fieldtrip mailing list