<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear Lindsey,<div class=""><br class=""></div><div class="">The error lies in the way the data is loaded.</div><div class=""><blockquote type="cite" class=""><div id="divtagdefaultwrapper" class="" style="font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;"><div class="">segmentedmri = load('C:\Users\EEG1\Documents\Data\segmentedmri.mat’);</div></div></blockquote><br class=""></div><div class="">produces this:</div><div class=""><br class=""></div><div class=""><div class="">segmentedmri = </div><div class=""><br class=""></div><div class="">    segmentedmri: [1x1 struct]</div><div class=""><br class=""></div><div class="">The solution is quite easy, just replace the line by this:</div><div class=""><blockquote type="cite" class=""><div id="divtagdefaultwrapper" class="" style="font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;"><div class=""> load('C:\Users\EEG1\Documents\Data\segmentedmri.mat’);</div></div></blockquote></div><div class=""><br class=""></div><div class="">and it should look like this:</div><div class=""><div class="">segmentedmri = </div><div class=""><br class=""></div><div class="">          dim: [256 256 256]</div><div class="">    transform: [4x4 double]</div><div class="">     coordsys: 'ctf'</div><div class="">         unit: 'mm'</div><div class="">         gray: [256x256x256 double]</div><div class="">        white: [256x256x256 double]</div><div class="">          csf: [256x256x256 double]</div><div class="">          cfg: [1x1 struct]</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Bests,</div><div class=""><br class=""></div><div class="">
Simon Homölle<br class="">PhD Candidate<br class="">Donders Institute for Brain, Cognition and Behaviour<br class="">Centre for Cognitive Neuroimaging<br class="">Radboud University Nijmegen<br class="">Phone: +31-(0)24-36-65059
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 11 May 2016, at 07:11, Tate, Lindsey R. <<a href="mailto:lindseyrtate@ou.edu" class="">lindseyrtate@ou.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 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; font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Hello FieldTrip community,<br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">I'm working through the Beamformer tutorial on this page (<a title="Ctrl+Click or tap to follow the link" id="LPlnk933248" href="http://www.fieldtriptoolbox.org/tutorial/beamformer" class="">http://www.fieldtriptoolbox.org/tutorial/beamformer</a>) using MEG data from a saccade task.<a title="Ctrl+Click or tap to follow the link" id="LPlnk923360" href="http://www.fieldtriptoolbox.org/tutorial/beamformer" class=""></a></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><a id="LPlnk923360" href="http://www.fieldtriptoolbox.org/tutorial/beamformer" class=""><br class=""></a></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">This code for constructing the head model, copied from the page, is giving me an error:<span class="Apple-converted-space"> </span><br class=""></div><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div class="">    % forward model mri<br class="">    segmentedmri = load('C:\Users\EEG1\Documents\Data\segmentedmri.mat');<br class="">    cfg = [];<br class="">    cfg.method = 'singleshell';<br class="">    headmodel = ft_prepare_headmodel(cfg, segmentedmri);</div><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">This is the complete text of the error:<span class="Apple-converted-space"> </span><br class=""></div><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div class="">Error using ft_convert_units (line 150)<br class="">cannot determine geometrical units<br class=""><br class="">Error in ft_checkdata (line 543)<br class="">  data = ft_convert_units(data);<br class=""><br class="">Error in ft_prepare_headmodel (line 203)<br class="">  data = ft_checkdata(data, 'hasunit', 'yes');<br class=""><br class="">Error in LindseysBF (line 48)<br class="">    headmodel = ft_prepare_headmodel(cfg, segmentedmri);<br class=""><br class=""><br class="">When I check the struct segmentedmri, it has a field called unit with a value of 'mm.' Because this code is using a file downloaded from the tutorial (i.e., segmentedmri, which can be downloaded from the link above) and is copy/pasted from the tutorial page, I can't figure out what's wrong or what to investigate. Can someone tell me if I'm making an error in the code, if there's something I could change about the code to make it work, or if this is a bug? Any help would be greatly appreciated.<br class=""><br class=""><br class="">Thank you,<br class=""><br class="">Lindsey Tate<br class="">Graduate Research Assistant<span class="Apple-converted-space"> </span><br class="">Brian and Biomarker Lab<br class="">University of Oklahoma<br class=""></div><br class=""><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 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; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 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;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 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; float: none; display: inline !important;" class="">fieldtrip mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 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;" class=""><a href="mailto:fieldtrip@donders.ru.nl" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 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;" class="">fieldtrip@donders.ru.nl</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 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;" class=""><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: 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;" class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div></blockquote></div><br class=""></div></body></html>