[FieldTrip] creating leadfiled

"Jörn M. Horschig" jm.horschig at donders.ru.nl
Fri Mar 8 15:52:27 CET 2013


Dear Enrico,

the error you are describing is clearly from a rather old version of 
FieldTrip, because sens.pnt is deprecated. Could you make sure that you 
are using the newest FieldTrip version? Since you load from 
c:\...\fieldtrip-20130307\... I assume that you downloaded the newest 
version already. It might be that either you have not updated your 
startup script in adding the correct FieldTrip version or that you are 
adding both, an old and a new FieldTrip version to your Matlab path. You 
could check in Matlab what function is being used by typing:
/
which ft_prepare_vol_sens/

If you want to add only the newest FieldTrip and remove the old one, you 
can call///restoredefaultpath/ in Matlab. The add 
c:\MATLAB\R2009b\work\fieldtrip-20130307\ to your path and call 
/ft_def//aults/. That should solve the issue. Note that your Matlab is 
_definitely_ calling an old FT version, because the line tyour error 
comes from does not exist anymore (i.e. it has been rewritten, because 
sens.pnt is deprecated)

Hope it works out for you! Best,
Jörn.


On 3/8/2013 1:31 PM, Enrico Schulz wrote:
> 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 sensorstructure 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 
> <mailto: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 <mailto:fieldtrip at donders.ru.nl>
>     > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
>     _______________________________________________
>     fieldtrip mailing list
>     fieldtrip at donders.ru.nl <mailto: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
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip


-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel:    +31-(0)24-36-68493
Web: http://www.ru.nl/donders

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130308/a226a668/attachment-0002.html>


More information about the fieldtrip mailing list