[FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Fri Oct 7 16:41:50 CEST 2011


Hi Brian,

What does your cfg.elec look like?

Best,

JM

On Oct 7, 2011, at 3:37 PM, <B.Mouthaan at neuro.umcn.nl> <B.Mouthaan at neuro.umcn.nl> wrote:

> Dear Fieldtrippers,
> 
> I am using .avr files for source modelling on ERP data. From the ERP components, I have calculated the differencewaves in a .mat file. Until this it all went fine. However I get stuck at using .elp files.
> I can succesfully create the headmodel with ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model developed by Nolte (2003)
> However when using ft_prepare_leadfield(cfg) I get problems.
> 
> My code is like this:
> 
> % discretize brainvolume in grid
> cfg=[]
> cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01'
> [lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) % reading in .elp files
> 
> %renaming lbl.textdata to lbl.label, else it gives an error at ft_channelselection, because it is unable to read sens.label
> oldField = 'textdata';
> newField = 'label';
> [lbl.(newField)] = lbl.(oldField);
> lbl = rmfield(lbl,oldField);
> cfg.elec= lbl
> cfg.vol            = vol;
> cfg.reducerank      = 3;
> cfg.channel         = 'Fz'
> cfg.grid.resolution = 1;   % use a 3-D grid with a 1 cm resolution
> save cfg
> [grid] = ft_prepare_leadfield(cfg);
> 
> When executing this I get the following commandscreen:
> ....
> .....
> using headmodel specified in the configuration
> using electrodes specified in the configuration
> ??? Error using ==> ft_prepare_vol_sens at 110
> the input does not look like EEG, nor like MEG
> 
> Error in ==> prepare_headmodel at 114
> [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order);
> 
> Error in ==> ft_prepare_leadfield at 159
> [vol, sens, cfg] = prepare_headmodel(cfg, data);
> 
> I think this is because I use .elp files? The .elp files contain N rows and 3 columns representing xyz or spherical coordinates I assume. However this is the only information I have about the electrodes, so I have to do with it.
> 
> Any ideas?
> 
> Kind regards,
> 
> Brian
> 
> 
> Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629.
> The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629.
> _______________________________________________
> 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
J.Schoffelen at donders.ru.nl
Telephone: +31-24-3614793

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


More information about the fieldtrip mailing list