[FieldTrip] creating leadfiled

Enrico Schulz eschulz at lrz.tu-muenchen.de
Fri Mar 8 13:31:32 CET 2013


Dear Lilla and Jörn,

thank you very much for your reply on my problem.
I already checked the example sites but got still error messages.

For creating the (leadfield) grid variable  used the template files provided
by Fieldtrip.
vol structure:
load('c:\MATLAB\R2009b\work\fieldtrip-20130307\template\headmodel\standard_bem.mat');

I created a sensor structure based on the "standard_1020.elc" file.

sens =

    chanpos: [65x3 double]
    elecpos: [65x3 double]
      label: {65x1 cell}
       type: 'ext1020'
       unit: 'mm'
        pnt: [65x3 double]

I started creating the leadfiled:
cfg                         = [];
cfg.elec                 = sens;
cfg.vol                   = vol;
cfg.reducerank      = 3;
cfg.grid.resolution = 1;
[grid65]                  = ft_prepare_leadfield(cfg);


Finally I got the following error message.
??? Reference to non-existent field 'pnt'.

Error in ==> ft_prepare_vol_sens at 301
    sens.pnt = sens.pnt(selsens,:);

Error in ==> prepare_headmodel at 90
[vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel,
'order',
cfg.order);

Error in ==> ft_prepare_leadfield at 148
[vol, sens, cfg] = prepare_headmodel(cfg, data);


That error message is funny because my sens variable has a sens.pnt subnode.

I (hopefully) solved the problem by editing the  "
ft_prepare_vol_sens"function and  loading the sens
variable just before the error line in the 295. It is running now but is that
way correct?

Any help is highly appreciated.
Thank you very much.
Best,
Enrico


On 5 March 2013 12:08, <Lilla.Magyari at mpi.nl> wrote:

> Dear Enrico,
>
> I think more information is needed about the error messages and about how
> you try to compute leadfield in order to help.
>
> If you have not encountered the FT tutorial sites, example scripts and
> FAQs yet, maybe you can check out those as well because they provide
> information on source-reconstruction, leadfields... etc..
> (For example, a tutorial for EEG headmodels:
> http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg and an example script
> for leadfield computation:
> http://fieldtrip.fcdonders.nl/example/compute_leadfield).
>
> Best,
> Lilla
>
>
> > Dear Fieldtrip experts,
> >
> > I would like to create a leadfield based on the standard brain provided
> by
> > the fieldtrip package and standard electrode positions.
> > Unfortunately, whatever I'm trying it ends up in a number of error
> > messages.
> >
> > Is anybody out there who could provide some support?
> >
> > Thank you very much in advance,
> > Best,
> > Enrico
> >
> >
> > --
> > Dr. Enrico Schulz
> > Postdoc
> > Klinikum rechts der Isar der Technischen Universität München
> > Neurologische Klinik und Poliklinik
> > Neuro-Kopf-Zentrum
> > Ismaningerstr. 22
> > 81675 München
> >
> >  Tel.: 089-4140-7664
> > _______________________________________________
> > 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
>



-- 
Dr. Enrico Schulz
Postdoc
Klinikum rechts der Isar der Technischen Universität München
Neurologische Klinik und Poliklinik
Neuro-Kopf-Zentrum
Ismaningerstr. 22
81675 München

 Tel.: 089-4140-7664
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130308/9ae411fe/attachment-0002.html>


More information about the fieldtrip mailing list