<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Brian,<div><br></div><div>What does your cfg.elec look like?</div><div><br></div><div>Best,</div><div><br></div><div>JM</div><div><br><div><div>On Oct 7, 2011, at 3:37 PM, <<a href="mailto:B.Mouthaan@neuro.umcn.nl">B.Mouthaan@neuro.umcn.nl</a>> <<a href="mailto:B.Mouthaan@neuro.umcn.nl">B.Mouthaan@neuro.umcn.nl</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="MS Exchange Server version 6.5.7651.53">
<title>Creating volume conduction model and leadfieldmatrix using .elp</title>

<div>
<!-- Converted from text/plain format --><p><font size="2">Dear Fieldtrippers,<br>
<br>
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.<br>
I can succesfully create the headmodel with ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model developed by Nolte (2003)<br>
However when using ft_prepare_leadfield(cfg) I get problems.<br>
<br>
My code is like this:<br>
<br>
% discretize brainvolume in grid<br>
cfg=[]<br>
cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01'<br>
[lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) % reading in .elp files<br>
<br>
%renaming lbl.textdata to lbl.label, else it gives an error at ft_channelselection, because it is unable to read sens.label<br>
oldField = 'textdata';<br>
newField = 'label';<br>
[lbl.(newField)] = lbl.(oldField);<br>
lbl = rmfield(lbl,oldField);<br>
cfg.elec= lbl<br>
cfg.vol            = vol;<br>
cfg.reducerank      = 3;<br>
cfg.channel         = 'Fz'<br>
cfg.grid.resolution = 1;   % use a 3-D grid with a 1 cm resolution<br>
save cfg<br>
[grid] = ft_prepare_leadfield(cfg);<br>
<br>
When executing this I get the following commandscreen:<br>
....<br>
.....<br>
using headmodel specified in the configuration<br>
using electrodes specified in the configuration<br>
??? Error using ==> ft_prepare_vol_sens at 110<br>
the input does not look like EEG, nor like MEG<br>
<br>
Error in ==> prepare_headmodel at 114<br>
[vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order);<br>
<br>
Error in ==> ft_prepare_leadfield at 159<br>
[vol, sens, cfg] = prepare_headmodel(cfg, data);<br>
<br>
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.<br>
<br>
Any ideas?<br>
<br>
Kind regards,<br>
<br>
Brian<br>
</font>
</p>

<br clear="all"> 

        <div><p style="font-size:13px;font-family:arial;">
        
        Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629.<br> The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629.<br>
        </p>
        </div>


</div>


_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Jan-Mathijs Schoffelen, MD PhD </div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: +31-24-3614793</div></div></span></div></span></div></span></span>
</div>
<br></div></body></html>