Some indexing problems with volume models

Hi Francois,

I have a large (whole head) overlapping spheres volume head model and am trying to compute MNE uncontrained sources on it, and later do dipole scanning. My goal is to evaluate if a signal is coming from a peripheral nerve. For some subjects it seems to work, and for others I have had some errors that seem to be about indexing. This has occured at several points in the processing as follows.

S1 (subject 1)- overlapping spheres volume head model, and source models (unconstrained MNE on volume) seem to work, dipole scanning breaks because a head model index is out of bounds - screencap

S2- for this one I cannot compute the overlapping spheres head mode, error "sub2ind.m out of range subscript at line 72" -screencap

S3 - works

S5 - same error as S2

S4, S6, S7, S8 seem to work and give somewhat reasonable results (hopefully there isn't a problem with the indexing that affects them? :slight_smile:

(Sorry for breaking Brainstorm by doing weird things.)

E



Hi Emily,

The error you were getting was probably due to some source points that were really close to the border of the MRI. I added a quick fix to prevent this sub2ind error.
Or there is something really wrong with the cortex/MRI interpolation matrix saved in the file. This could have happened if you played a lot with the anatomy folder of the subjects.
Before trying again, right-click on the cortex file > Remove interpolations.

I don’t have any idea why you would get the other error. I cannot reproduce it and and I didn’t write this function, it’s difficult to estimate what is going wrong.
Could you send me some data with which you can reproduce this error or show me directly the next time you’re coming around here?

Francois

Main errors - fixed with update. Thank you very much.

I deleted and am recopying from original for the first error - assume it’s fixed if I don’t bother you again.

Thanks!