<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br>Hi again,</div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div ocsi="0" fpstyle="1" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="direction: ltr; font-family: Tahoma; font-size: 10pt;">Hi again,<br><br>On another run through my analysis I've realized that the below problem likely stems from the fact that I haven't yet computed the leadfield. (I was avoiding this step as I was getting errors there too). </div></div></blockquote>right, but avoiding it want solve the problem ;-)</div><div><br><blockquote type="cite"><div ocsi="0" fpstyle="1" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="direction: ltr; font-family: Tahoma; font-size: 10pt;">If anyone has insight on the message below, please chime in:<br><br>cfg = [];<br>elec = ft_read_sens('GSN-HydroCel-129.sfp');  <span class="Apple-converted-space"> </span><br>cfg.elec = elec;<br>cfg.channel = 'all';<br>cfg.vol = vol;<br></div></div></blockquote><div><br></div><div>at this step you seem to read electrodes in but are these aligned to the vol you using in the subsequent step?</div><div>If not please consult this tutorial and in particular the function ft_electroderealign: <a href="http://www.fieldtriptoolbox.org/tutorial/natmeg/dipolefitting#read_and_visualise_the_anatomical_data">http://www.fieldtriptoolbox.org/tutorial/natmeg/dipolefitting#read_and_visualise_the_anatomical_data</a></div><div>Also make sure that vol and elec are in the same units, if not use ft_convert_units.</div><div><br></div><div>good luck</div><div>tzvetan</div><div><br></div><blockquote type="cite"><div ocsi="0" fpstyle="1" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="direction: ltr; font-family: Tahoma; font-size: 10pt;">cfg.grid.resolution = 1;   % use a 3-D grid with a 1 cm resolution<br>cfg.grid.unit = 'mm';<br>[grid] = ft_prepare_leadfield(cfg, freqCR);<br>using headmodel specified in the configuration<br>using electrodes specified in the configuration<br>converting units from 'cm' to 'mm'<br>determining source compartment (1)<br>projecting electrodes on skin surface<br>combining electrode transfer and system matrix<br>creating dipole grid based on automatic 3D grid with specified resolution<br>using headmodel specified in the configuration<br>using gradiometers specified in the configuration<br>creating dipole grid with 1 mm resolution<br>0 dipoles inside, 0 dipoles outside brain<br>making tight grid<br><font color="FF0000">Error using  ==<span class="Apple-converted-space"> </span><br>Matrix dimensions must agree.<br><br>Error in ft_prepare_sourcemodel (line 666)<br>  xmin_indx = find(grid.xgrid==xmin);<br><br>Error in ft_prepare_leadfield (line 159)<br>grid = ft_prepare_sourcemodel(tmpcfg);<br><br><font>Thanks again, and sorry for flooding your inbox.<br><br><font>Helen</font><br></font></font><div style="font-family: 'Times New Roman'; font-size: 16px;"><hr tabindex="-1"><div id="divRpF588584" style="direction: ltr;"><font face="Tahoma" size="2"><b>From:</b><span class="Apple-converted-space"> </span>Helen L. Wieffering<br><b>Sent:</b><span class="Apple-converted-space"> </span>Monday, July 20, 2015 3:52 PM<br><b>To:</b><span class="Apple-converted-space"> </span><a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Error in DICS Source Localization (Beamformer)<br></font><br></div><div></div><div><div style="direction: ltr; font-family: Tahoma; font-size: 10pt;">Dear Fieldtrip Users,<br><br>In attempting to use Beamformer source localization, I get an error when computing ft_sourceanalysis with the code below:<br><br>cfg = [];<br>cfg.method = 'dics';<br>cfg.frequency = 6;<br>cfg.elecfile = 'GSN_HydroCel_129_short.sfp';<br>cfg.vol = vol;<br>cfg.dics.projectnoise = 'yes';<br>cfg.dics.lambda = '5%';<br>cfg.dics.keepfilter = 'yes';<br>cfg.dics.realfilter = 'yes';<br>sourceAll = ft_sourceanalysis(cfg, freqAll);<br><br>the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB<br>using headmodel specified in the configuration<br>reading electrodes from file 'GSN_HydroCel_129_short.sfp'<br>converting units from 'cm' to 'mm'<br>determining source compartment (1)<br>projecting electrodes on skin surface<br>combining electrode transfer and system matrix<br>creating dipole grid based on inward-shifted brain surface from volume conductor model<br>using headmodel specified in the configuration<br>using gradiometers specified in the configuration<br>642 dipoles inside, 0 dipoles outside brain<br>the call to "ft_prepare_sourcemodel" took 0 seconds and required the additional allocation of an estimated 42 MB<br>selection crsspctrm along dimension 3<br><br><font color="FF0000">Attempted to access noise(0); index must be a positive integer or logical.<br><br>Error in beamformer_dics (line 211)<br>    noise = noise(end);<br><br>Error in ft_sourceanalysis (line 662)<br>          dip(i) = beamformer_dics(grid, sens, vol, [],  squeeze(Cf(i,:,:)), optarg{:});</font><br> <br><br>I note that it runs without errors when I change cfg.dics.projectnoise to 'no' - but what implications does that bring? I find with that change I can make it through the rest of the Beamformer tutorial (the section on contrasting conditions) without explicit errors, but I nevertheless receive the following messages, following which my plotted figure is simply blank! Something is going wrong, I think.<br><br>(1)<br>sourceDiffInt = ft_sourceinterpolate(cfg, sourceDiff, mri);<br><font color="FF9900">Warning: use cfg.parameter='pow' instead of cfg.parameter='avg.pow'<span class="Apple-converted-space"> </span><br>> In ft_checkconfig (line 139)<br>  In ft_sourceinterpolate (line 119)<span class="Apple-converted-space"> </span><br><br><font color="FF9900">(2)</font><br><font color="FF9900"><font>ft_sourceplot(cfg, sourceDiffInt);</font><br>Warning: use cfg.funparameter='pow' instead of cfg.funparameter='avg.pow'<span class="Apple-converted-space"> </span><br>> In ft_checkconfig (line 139)<br>  In ft_sourceplot (line 210)<span class="Apple-converted-space"> </span><br>Warning: use cfg.maskparameter='pow' instead of cfg.maskparameter='avg.pow'<span class="Apple-converted-space"> </span><br>> In ft_checkconfig (line 139)<br>  In ft_sourceplot (line 213)<span class="Apple-converted-space"> </span><br>the input is segmented volume data with dimensions [128 128 128]<br>not plotting anatomy<br>Warning: could not determine dimord of "pow" in the following data<span class="Apple-converted-space"> </span><br>> In getdimord (line 516)<br>  In ft_sourceplot (line 390)<span class="Apple-converted-space"> </span></font><br></font><br>Anyone know what might be the problem? Thanks very much!<br><br>Helen Wieffering<br></div></div></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</div></blockquote></div><br></body></html>