[FieldTrip] fieldtrip Digest, Vol 37, Issue 8

Todorovic, A. a.todorovic at fcdonders.ru.nl
Mon Dec 9 14:29:46 CET 2013


Hi Eelke,

Thanks for your quick reply! 

ICA is indeed what I normally do (including saving the original gradiometer definitions), but the NaNs appear even if I skip ICA and just preprocess and then do ft_megplanar directly after. However I am now starting to think that these NaNs are a normal consequence of doing a planar gradient transformation and that I was wrong to assume that this is what it causing my problem further down the pipeline. I dug up some old TFRs and saw that their grad.chanori structures also consist of NaNs. My apologies for not checking this previously.

And the problem that I have is that the channel labels disappear after ft_freqdescriptives and that the powspctrm field is empty (or if I use a variant of ft_freqdescriptives which is newer than the one I normally use, an error with reshape occurs). The original TFRs prior to ft_freqdescriptives look OK though. But I will dig further to see what could be causing it - in most cases it's something I did.  

Cheers,
Ana

> 
> Message: 3
> Date: Mon, 9 Dec 2013 09:16:11 +0100
> From: Eelke Spaak <eelke.spaak at donders.ru.nl>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: Re: [FieldTrip] gradiometer definitions after ft_megplanar
> Message-ID:
> <CABPNLUqBrxD_oQ9azHUTPn8GDR6Rzxm-pUsL6K1XFYELg=DW3g at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Hi Ana,
> 
> Are you by any chance doing ICA followed by ft_rejectcomponent at some
> point before ft_megplanar? After rejecting a component, grad.chanpos
> and grad.chanori will contain only NaNs (as of some months ago
> indeed), as the channel positions are ill-defined at that point (i.e.
> each 'data'-channel is in fact a weighted mixture of the original,
> physical, MEG channels). Since ft_megplanar needs the channel
> positions, it can no longer operate on data after ft_rejectcomponent.
> 
> However, there is an easy workaround: the original channel positions
> should quite nicely approximate the positions after
> ft_rejectcomponent. So, what I do is simply store the original
> data.grad somewhere, and then make sure to stick in the data just
> before ft_megplanar.
> 
> Note that the reason why ft_rejectcomponent updates the grad is that
> creating an accurate forward model (for source reconstruction)
> requires accurate sensor information. Therefore it fills grad.chanpos
> with NaNs, while updating grad.coilpos etc. to reflect the new
> projection. So you should *not* use the original grad for source
> analysis after ft_rejectcomponent, in that case just use the updated
> one with the NaNs inside.
> 
> Best,
> Eelke
> 
> On 8 December 2013 22:44, Todorovic, A. <a.todorovic at fcdonders.ru.nl>
> wrote:
> > Dear 'trippers,
> >
> > I am attempting to do a TFR on planar gradient data. I first
> > preprocess, then do ft_megplanar, then ft_freqanalysis, followed by
> > ft_combineplanar. However, upon doing ft_megplanar, the grad.chanori
> > field consists only of NaNs. I see that some changes were made a few
> > months ago on how gradiometers are described, so I am wondering
> > whether there are some changes I should now make to the cfg
> > structure when doing the planar gradient transformation.
> >
> > This is how I normally do it:
> >
> >         cfg = [];
> >         cfg.planarmethod = 'sincos';
> >         cfg.channel = {'MEG'};
> >         cfg.trials = 'all';
> >         cfg.neighbours = neighbours; %
> >         neighbours=ft_prepare_neighbours(cfg,data)
> >         data_planar = ft_megplanar(cfg,data);
> >
> >
> > Alternatively, is there some workaround I could now implement to fix
> > my already calculated TFR structures?
> >
> >
> > Cheers,
> > Ana
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> 
> 
> 
> ------------------------------
> 
> Message: 4
> Date: Mon, 9 Dec 2013 09:19:04 +0100
> From: Eelke Spaak <eelke.spaak at donders.ru.nl>
> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> Subject: Re: [FieldTrip] gradiometer definitions after ft_megplanar
> Message-ID:
> <CABPNLUptV2A3pGFxsARwSGosizSzvQj0osnG4yz=rn0zeCUcYg at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> PS: Note that a bug is assigned to me to facilitate ft_megplanar after
> reprojection without artificially restoring the grad
> (http://bugzilla.fcdonders.nl/show_bug.cgi?id=2332), so this should be
> fixed at some point.
> 



More information about the fieldtrip mailing list