sampsapursiainen / zeffiro_interface

Interface for using finite elements in inverse problems with complex domains
GNU General Public License v3.0
25 stars 15 forks source link

MEG Grad Lead Field Error (commit b7d41a2) #82

Closed SeSodesa closed 2 years ago

SeSodesa commented 2 years ago

When running the script m/forward_scripts/brain/lead_field_meg_grad_fem.m via the Mesh Tool, the following error is printed in the Matlab console:

Index in position 1 exceeds array bounds. Index must not exceed 6.

Error in lead_field_meg_grad_fem (line 58)
    sensors(7:9,:) = sensors(7:9,:)./repmat(sqrt(sum(sensors(7:9,:).^2)),3,1);

Error in lead_field_matrix (line 97)
[zef.L, zef.source_positions, zef.source_directions] = lead_field_meg_grad_fem(zef.nodes_aux,zef.tetra,zef.sigma(:,1),zef.sensors_aux,zef.brain_ind,zef.source_ind,zef.lf_param);

Error in zef_meg_gradiometers_lead_field (line 6)
lead_field_matrix;

Error in zef_run_forward_simulation (line 1)
eval(zef.h_forward_simulation_table.Data{zef.forward_simulation_selected(1),3});

Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
Error while evaluating Button PrivateButtonPushedFcn.

The steps to reproduce this are as follows:

  1. start Zeffiro Interface,

  2. open up a project with a test model,

  3. select the script zef_meg_gradiometers_lead_field in the Mesh Tool, but do not make any changes to the settings

  4. press Run Script in the Mesh Tool window and

  5. wait for the error to appear.

This happens when the read–write HEAD is pointed at commit b7d41a2.