[FieldTrip] Beamformer Tutorial, ft_prepare_headmodel Error

Tate, Lindsey R. lindseyrtate at ou.edu
Wed May 11 07:11:24 CEST 2016


Hello FieldTrip community,



I'm working through the Beamformer tutorial on this page (http://www.fieldtriptoolbox.org/tutorial/beamformer) using MEG data from a saccade task.<http://www.fieldtriptoolbox.org/tutorial/beamformer>


<http://www.fieldtriptoolbox.org/tutorial/beamformer>


This code for constructing the head model, copied from the page, is giving me an error:

    % forward model mri
    segmentedmri = load('C:\Users\EEG1\Documents\Data\segmentedmri.mat');
    cfg = [];
    cfg.method = 'singleshell';
    headmodel = ft_prepare_headmodel(cfg, segmentedmri);



This is the complete text of the error:

Error using ft_convert_units (line 150)
cannot determine geometrical units

Error in ft_checkdata (line 543)
  data = ft_convert_units(data);

Error in ft_prepare_headmodel (line 203)
  data = ft_checkdata(data, 'hasunit', 'yes');

Error in LindseysBF (line 48)
    headmodel = ft_prepare_headmodel(cfg, segmentedmri);


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.


Thank you,

Lindsey Tate
Graduate Research Assistant
Brian and Biomarker Lab
University of Oklahoma

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


More information about the fieldtrip mailing list