Source Computation: Index Exceeds Matrix Dimension

Hi,

I am currently trying to create an inversion Kernel (source model) for my EEG data, but no matter what inversion-method, option or headmodel I choose, I encounter an “Index exceeds matrix dimensions” error, as described below.

The processing steps are:

  1. import freesurfer folder
  2. import channel file (Xensor)
  3. Project channels to scalp surface
  4. Set Noise covariance matrix to “No noise modeling”
  5. Run BEM on MRI data, compute according headmodel (other headmodels do not work, too)
  6. Compute Head Model (no matter which method or option I choose)

Please see below for the matlab output of the error. All functions were called from within the brainstorm GUI. I use Matlab R2012a and brainstorm 3.2 (updated today).

Any ideas? Please let me know if you need further information.

Thank you very much in advance, I look forward to hear from you
Tim


** Error: Line 202: Index exceeds matrix dimensions.
**
** Call stack:
** >bst_sourceimaging.m at 202
** >panel_inverse.m>ComputeInverse at 808
** >bst_call.m at 26
** >macro_methodcall.m at 37
** >panel_inverse.m at 26
** >panel_protocols.m>TreeInverse at 1120
** >bst_call.m at 28
** >macro_methodcall.m at 39
** >panel_protocols.m at 43
** >bst_call.m at 28
** >tree_callbacks.m>@(h,ev)bst_call(@panel_protocols,‘TreeInverse’,bstNodes) at 1882
**


<edit>
Having looked into this a little further, the problem seems to arise from the fact that I am trying to compute only the inversion kernel without loading or using data (yet, the actual inversion will be computed manually at a later stage). Put differently, is there a function in brainstorm to only compute the Kernel without having loaded the data?
</edit>

Hi Tim,

It looks like there is something wrong with your channel file. This error you get seems to indicate that there is not a correct number of channels defined in your channel file.
Can you open and review the data correctly after you import the channel file? Can you import blocks of recordings without problem?
Please make sure that you have the same number of channel defined in all the files: the channel file (right-click on the channel file > Edit channel) and the imported data files (right-click on the imported recordings > File > View contents > Check the first dimension of the field “F”).

Can you please post a screen capture of your database explorer that shows the channel file, the head model, the continuous file you are using, and the imported data blocks?
This would help me understand better the problem.

Thanks,
Francois

Hi Francois,

Thanks for your response and suggestions. As I wrote in my original post (see the edit in the bottom), I would like to compute the inversion Kernel from the BEM model, channel file and noise covariance without loading the continuous data. The reason for this is that I would like to project the data by hand at a later point in time, in a different part of the processing stream. Thus the question whether there is a function in brainstorm to only compute the Kernel without having loaded the data?

That being said, I also tried loading some small part of the data (averaged ERP data, 2 seconds @ 500Hz) to test the Kernel-computation using BEM. With this, I ran into a different problem of brainstorm eating up my 32gb of Memry within seconds. Since this issue is not directly related to the bug reported here, I posted it in a different threat, to keep things sorted:

http://neuroimage.usc.edu/forums/showthread.php?1729-Source-computation-Massive-memory-usage-for-BEM-Model

Best regards and thanks again
Tim

Hi Tim,

It was a minor bug while reading the list bad EEG channels: it was not testing before if there were recordings available.
It is now fixed, the update is online.

Thanks for reporting this bug.
Francois

It is working now, thanks for the quick fix!