[FieldTrip] fieldtrip Digest, Vol 31, Issue 27
Joram van Driel
joramvandriel at gmail.com
Tue Jun 25 09:17:27 CEST 2013
Hi Steve,
I had the same problem a while ago.
First of all, you need to take care of all the necessary ingredients to be
in cm before computing the volume conduction model and the leadfield
matrix, by using ft_convertunits.
Second, I also first had a brain-shaped grid, which was not a plot-related
problem; I noticed during the computation of the leadfield in the Matlab
command lines that it estimated 0 dipoles outside, and x-number of dipoles
inside the brain, which already made me suspicious. Check whether you get
this as well, then you know it's not a plotting problem.
In the end I managed to get a x inside and x outside number of dipoles, and
I think the difference was that I first used ft_prepare_singleshell (which
gave me the weird brain-shaped results with 0 dipoles outside), while I
think you should use ft_prepare_headmodel with cfg.method='singleshell'.
Maybe it doesn't matter at all, and the problem lies somewhere else, but
for me it worked and I got a nice cube-shaped grid in the end.
Hope this helps.
Best,
Joram
On Mon, Jun 24, 2013 at 8:11 PM, Stolk, A. <a.stolk at fcdonders.ru.nl> wrote:
> Hi Steve,
>
> With respect to the cube vs. brain-shaped grid; this seems to be
> plotting-related? template_grid.inside in the snippet of code below selects
> only the grid points that have been determined as inside the brain, but
> with a negative inwardshift, hence it's also outside.
>
> ft_plot_mesh(template_grid.pos(template_grid.inside,:)); % taken from the
> wiki
>
> Hopefully someone else has up-to-date knowledge to answer your question
> pertaining to the units (mm vs. cm) of the volume conductor and the source
> model.
>
> Best regards,
> Arjen
>
> ------------------------------
>
> *Van: *"Stephen Politzer-Ahles" <politzerahless at gmail.com>
> *Aan: *fieldtrip at science.ru.nl
> *Verzonden: *Maandag 24 juni 2013 17:19:59
> *Onderwerp: *Re: [FieldTrip] fieldtrip Digest, Vol 31, Issue 27
>
>
> Hi everyone,
>
> I recently tried
> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_spaceand noticed some inconsistencies between the example code and the results;
> I updated the code on the wiki but I wanted to send a message to the list
> to double-check whether my changes are ok. Firstly, I had to add a call to
> ft_convert_units, because otherwise the vol was expressed in mm and the
> grid in cm, causing the grid to be much smaller than the volume conductor
> (see http://i.imgur.com/gzct9Dm.png). Is this change ok?
>
> The result I get is still not quite consistent with the examples shown on
> that page, though; in my result, the grid is a cube (
> http://i.imgur.com/NSgCFpg.png), whereas in the example the grid is
> brain-shaped. I used the same Fieldtrip brain template and the same code
> from the example (except for the change above), so I'm not sure if the
> difference is due to different plot settings, a change in the Fieldtrip
> code since this example was made, or a change in the sample brain included
> in Fieldtrip since the example was made.
>
> Best,
> Steve
>
>
> On Thu, Jun 13, 2013 at 5:05 AM, <fieldtrip-request at science.ru.nl> wrote:
> >
> > Send fieldtrip mailing list submissions to
> > fieldtrip at science.ru.nl
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> > or, via email, send a message with subject or body 'help' to
> > fieldtrip-request at science.ru.nl
> >
> > You can reach the person managing the list at
> > fieldtrip-owner at science.ru.nl
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of fieldtrip digest..."
> >
> >
> > Today's Topics:
> >
> > 1. Re: Source statistics on spatio-temporal source
> > reconstruction data (MNE) (Nicolai Mersebak)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Thu, 13 Jun 2013 12:04:34 +0200
> > From: Nicolai Mersebak <nicolai at mersebak.dk>
> > To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> > Subject: Re: [FieldTrip] Source statistics on spatio-temporal source
> > reconstruction data (MNE)
> > Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > Thanks to all of you for your comments and ideas - they are very helpful!
> >
> > I ( off course :) ) have some follow up questions.
> >
> > I have created an ERP structure for my MNE source, so the only think
> which I need and that is not straight forward is the neighbour structure.
> >
> > I am using the standard bem template
> (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model
> and use the following code to get a grid for all subjects as I don't have
> any subject specific information regarding the anatomy.
> >
> > cfg = [];
> > cfg.grid.xgrid = -100:10:100;
> > cfg.grid.ygrid = -100:10:100;
> > cfg.grid.zgrid = -100:10:100;
> > cfg.grid.tight = 'yes';
> > cfg.grid.unit = hdm.unit; % unit: mm
> > cfg.vol = hdm;
> > grid = ft_prepare_sourcemodel(cfg);
> >
> >
> > @Jan-Mathijs and Stephan: I guess making a subject specific grid based
> on a warped template requires anatomic information for each subject, e.g. a
> MRI image like this tutorial shows:
> >
> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B
> >
> > The final grid output in the tutorial - does it have this 3D grid which
> can be used as a neighbour structure ?
> >
> > I am not sure how to go from my cortical sheet [vertices x
> coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ?
> >
> > A second thing I would like to know is, if any of you have tried to use
> an atlas (e.g ALL template atlas) where the regions now are channels in the
> permutation test? Going from source points to atlas regions can be done
> through ft_sourcestatistics, but I am still interested in keeping the
> temporal dimension. The reason to use atlas regions instead of source
> points is to decrease the computation time.
> >
> > Best,
> >
> > Nicolai
> >
> >
>
>
> On Thu, Jun 13, 2013 at 5:05 AM, <fieldtrip-request at science.ru.nl> wrote:
>
>> Send fieldtrip mailing list submissions to
>> fieldtrip at science.ru.nl
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> or, via email, send a message with subject or body 'help' to
>> fieldtrip-request at science.ru.nl
>>
>> You can reach the person managing the list at
>> fieldtrip-owner at science.ru.nl
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of fieldtrip digest..."
>>
>>
>> Today's Topics:
>>
>> 1. Re: Source statistics on spatio-temporal source
>> reconstruction data (MNE) (Nicolai Mersebak)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Thu, 13 Jun 2013 12:04:34 +0200
>> From: Nicolai Mersebak <nicolai at mersebak.dk>
>> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
>> Subject: Re: [FieldTrip] Source statistics on spatio-temporal source
>> reconstruction data (MNE)
>> Message-ID: <6F3697BB-194F-422F-A1BF-EBBB132F805B at mersebak.dk>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Thanks to all of you for your comments and ideas - they are very helpful!
>>
>> I ( off course :) ) have some follow up questions.
>>
>> I have created an ERP structure for my MNE source, so the only think
>> which I need and that is not straight forward is the neighbour structure.
>>
>> I am using the standard bem template
>> (fieldtrip-20130124/template/headmodel/standard_bem.mat) as a head model
>> and use the following code to get a grid for all subjects as I don't have
>> any subject specific information regarding the anatomy.
>>
>> cfg = [];
>> cfg.grid.xgrid = -100:10:100;
>> cfg.grid.ygrid = -100:10:100;
>> cfg.grid.zgrid = -100:10:100;
>> cfg.grid.tight = 'yes';
>> cfg.grid.unit = hdm.unit; % unit: mm
>> cfg.vol = hdm;
>> grid = ft_prepare_sourcemodel(cfg);
>>
>>
>> @Jan-Mathijs and Stephan: I guess making a subject specific grid based on
>> a warped template requires anatomic information for each subject, e.g. a
>> MRI image like this tutorial shows:
>>
>> http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s%5B
>>
>> The final grid output in the tutorial - does it have this 3D grid which
>> can be used as a neighbour structure ?
>>
>> I am not sure how to go from my cortical sheet [vertices x
>> coordinates(x,y,z)] to a 3D grid, which I can use as a neighbour structure ?
>>
>> A second thing I would like to know is, if any of you have tried to use
>> an atlas (e.g ALL template atlas) where the regions now are channels in the
>> permutation test? Going from source points to atlas regions can be done
>> through ft_sourcestatistics, but I am still interested in keeping the
>> temporal dimension. The reason to use atlas regions instead of source
>> points is to decrease the computation time.
>>
>> Best,
>>
>> Nicolai
>>
>>
>> Den 12/06/2013 kl. 18.58 skrev "smoratti at psi.ucm.es" <smoratti at psi.ucm.es
>> >:
>>
>> >
>> > I think Jan.Mathijs alternative suggestion is quite attractive. With
>> the neighbors on a cortical sheet I also had the problems that sometimes
>> the vertices do not have the same distance and then clustering may be
>> biased to smaller or bigger clusters as the number of neighbors does not
>> guarantee same cluster sizes. With the interpolation onto a 3D grid, you
>> won't have that problem.
>> >
>> > best,
>> >
>> > Stephan
>> >
>> >
>> > ________________________________________________________
>> > Stephan Moratti, PhD
>> >
>> > see also: http://web.me.com/smoratti/
>> >
>> > Universidad Complutense de Madrid
>> > Facultad de Psicolog?a
>> > Departamento de Psicolog?a B?sica I
>> > Campus de Somosaguas
>> > 28223 Pozuelo de Alarc?n (Madrid)
>> > Spain
>> >
>> > and
>> >
>> > Center for Biomedical Technology
>> > Laboratory for Cognitive and Computational Neuroscience
>> > Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de Madrid
>> > Campus Montegancedo
>> > 28223 Pozuelo de Alarc?n (Madrid)
>> > Spain
>> >
>> >
>> > email: smoratti at psi.ucm.es
>> > Tel.: +34 679219982
>> >
>> > El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribi?:
>> >
>> >> An alternative would be to interpolate the cortical sheet to a 3D grid
>> (where the grid is defined for each subject based on a warped template grid
>> defined in a standard space), and then do clustering using a regular 3D
>> spatial neighbourhood structure. The rationale being that two vertices on
>> the sheet may appear as disconnected (e.g. being on two sides of a sulcus)
>> whereas, given the poor spatial resolution, they belong to the same spatial
>> blob.
>> >>
>> >> Best,
>> >> Jan-Mathijs
>> >>
>> >> On Jun 12, 2013, at 5:44 PM, smoratti at psi.ucm.es wrote:
>> >>
>> >>> Dear Nicolai,
>> >>>
>> >>> Indeed I have used ft_timelockstatistics for minimum norm source
>> data. The trick is to put the source level data into a ERF structure.
>> Determining the neighbors of a source surface with vertices is not trivial.
>> However I used tess_vertconn.m from the BrainStorm toolbox to get the
>> connectivity matrix that tells you who is a neighbor. This you can feed
>> into timelockstats.
>> >>>
>> >>> Hope that helps,
>> >>>
>> >>> Stephan
>> >>>
>> >>> ________________________________________________________
>> >>> Stephan Moratti, PhD
>> >>>
>> >>> see also: http://web.me.com/smoratti/
>> >>>
>> >>> Universidad Complutense de Madrid
>> >>> Facultad de Psicolog?a
>> >>> Departamento de Psicolog?a B?sica I
>> >>> Campus de Somosaguas
>> >>> 28223 Pozuelo de Alarc?n (Madrid)
>> >>> Spain
>> >>>
>> >>> and
>> >>>
>> >>> Center for Biomedical Technology
>> >>> Laboratory for Cognitive and Computational Neuroscience
>> >>> Parque Cient?fico y Tecnol?gico de la Universidad Politecnica de
>> Madrid
>> >>> Campus Montegancedo
>> >>> 28223 Pozuelo de Alarc?n (Madrid)
>> >>> Spain
>> >>>
>> >>>
>> >>> email: smoratti at psi.ucm.es
>> >>> Tel.: +34 679219982
>> >>>
>> >>> El 12/06/2013, a las 15:44, Nicolai Mersebak escribi?:
>> >>>
>> >>>> Dear all,
>> >>>>
>> >>>> I have a question concerning the usage of ft_sourcegrandaverage and
>> ft_sourcestatistics.
>> >>>>
>> >>>> After using ft_sourceanalysis (method: MNE), I get spatio-temporal
>> source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and
>> 897 time points.
>> >>>>
>> >>>> Now I would like to use the cluster-based permutation test on my
>> source reconstructed data. However it seems like ft_sourcegrandaverage and
>> ft_sourcestatistics don't support source level time courses. E.g when I am
>> using ft_sourcegrandaverage I am getting the following error:
>> >>>>
>> >>>> Error in ft_sourcegrandaverage (line 158)
>> >>>> dat(:,i) = tmp(:);
>> >>>>
>> >>>> Looking into the code:
>> >>>>
>> >>>> for i=1:Nsubject
>> >>>> tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter,
>> varargin{i}));
>> >>>> dat(:,i) = tmp(:);
>> >>>> tmp = getsubfield(varargin{i}, 'inside');
>> >>>> inside(tmp,i) = 1;
>> >>>> end
>> >>>>
>> >>>> I see that "tmp" are getting the structure [N_sources x timepoints]
>> from source.avg.pow for one subject, where "dat" requires the structure
>> [N_sources x 1].
>> >>>>
>> >>>> I seached the mailing list for similar issues and found this thread:
>> >>>>
>> >>>>
>> http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html
>> >>>>
>> >>>> Since I am interested in using the temporal dimension in my
>> statistics, I would like to know if it is still not possible to use
>> spatio-temporal source reconstructed data in ft_sourcestatistics and
>> ft_sourcegrandaverage ?
>> >>>>
>> >>>> Or if any have succeeded in using the cluster-based permutation test
>> on source level also including the temporal dimension ?
>> >>>>
>> >>>> Alternative I was thinking that I might could use
>> ft_timelockstatistics, where I substituted the channels with sources, e.g
>> instead of having 64 channels, I would now have 4050 "channels".
>> >>>> If so I need to calculate a label structure and an appropriate
>> neighbor structure, which I guess is possible as I have all the 3D
>> coordinates for each source, e.g in leadfield.pos ?
>> >>>> I know this is a work around solution, but have anyone tried or have
>> any experience using such an approach ?
>> >>>>
>> >>>> Best,
>> >>>>
>> >>>> Nicolai
>> >>>>
>> >>>> _______________________________________________
>> >>>> fieldtrip mailing list
>> >>>> fieldtrip at donders.ru.nl
>> >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> >>>
>> >>> _______________________________________________
>> >>> fieldtrip mailing list
>> >>> fieldtrip at donders.ru.nl
>> >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> >>
>> >> Jan-Mathijs Schoffelen, MD PhD
>> >>
>> >> Donders Institute for Brain, Cognition and Behaviour,
>> >> Centre for Cognitive Neuroimaging,
>> >> Radboud University Nijmegen, The Netherlands
>> >>
>> >> Max Planck Institute for Psycholinguistics,
>> >> Nijmegen, The Netherlands
>> >>
>> >> J.Schoffelen at donders.ru.nl
>> >> Telephone: +31-24-3614793
>> >>
>> >> http://www.hettaligebrein.nl
>> >>
>> >> _______________________________________________
>> >> fieldtrip mailing list
>> >> fieldtrip at donders.ru.nl
>> >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>> >
>> > _______________________________________________
>> > 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/20130613/5974284f/attachment.html
>> >
>>
>> ------------------------------
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>> End of fieldtrip Digest, Vol 31, Issue 27
>> *****************************************
>>
>
>
>
> --
> Stephen Politzer-Ahles
> University of Kansas
> Linguistics Department
> http://people.ku.edu/~sjpa/
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
--
Joram van Driel, MSc.
PhD student at the University of Amsterdam
Department of Psychology, Brain & Cognition
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130625/8a78c9eb/attachment-0002.html>
More information about the fieldtrip
mailing list