I computed the head model as described in https://neuroimage.usc.edu/brainstorm/Tutorials/Epilepsy
When I run, Source>dipole scanning, getting this error, can you pls help me to solve this issue ?
BST> Saving scouts in surface: Subject01/tess_cortex_pial_low.mat
** Error: [process_dipole_scanning] Sources > Dipole scanning
** Line 110: Index exceeds matrix dimensions.
**
** Call stack:
** >process_dipole_scanning.m>Run at 110
** >process_dipole_scanning.m at 24
** >bst_process.m>Run at 196
** >bst_process.m at 36
** >panel_process1.m>RunProcess at 151
** >panel_process1.m at 26
** >gui_brainstorm.m>CreateWindow/ProcessRun_Callback at 788
** >bst_call.m at 28
** >gui_brainstorm.m>@(h,ev)bst_call(@ProcessRun_Callback) at 312
**
**
** File: link|Subject01/@raw2086073_20190706_095916_fil_seg_ave_1/results_Dipoles_EEG_KERNEL_210104_1206.mat|Subject01/@raw2086073_20190706_095916_fil_seg_ave_1/data_0raw_2086073_20190706_095916_fil_seg_ave_1.mat
**
It looks like something wrong happened to the files in your database: the recordings used to estimate the Dipoles map was modified or moved after...
Try deleting and recomputing the Dipoles file.
If you can't get this to work:
- Please post a screen capture showing the files in the database explorer ("Functional view").
- Type
edit process_dipole_scanning, then put a breakpoint at line 110 (click just on the right of the line number to make a red circle appear)
- Run the execution of the dipole scanning process. When the debugger stops, type
DataMatP and then sResultP in the Matlab command window. Copy-paste the full text output here.
- If you are not familiar with the Matlab debugger, watch a short introduction tutorial to this super useful tool.
thank you Francois for immediate response.
I rebuild the head model after deleting the files. But same issue persist.
here is my functional database files
Here is the outputs
DataMatP =
struct with fields:
ChannelFlag: [257×1 double]
ColormapType: []
Comment: 'Link to raw file'
DataType: 'raw'
Device: 'MFF'
DisplayUnits: []
Events: []
F: [1×1 struct]
History: {1×3 cell}
Leff: 1
Std: []
Time: [1×250 double]
nAvg: 1
K>> sResultP
sResultP =
struct with fields:
ImagingKernel: [45006×256 double]
ImageGridAmp: []
Std: []
Whitener: [256×256 double]
SourceDecompSa: [3×15002 double]
SourceDecompVa: [3×45006 double]
nComponents: 3
Comment: 'Dipoles: EEG(Unconstr) 2018'
Function: 'glsp'
Time: [1×250 double]
DataFile: 'Subject01/@raw2086073_20190706_095916_fil_seg_ave_1/data_0raw_2086073_20190706_095916_fil_seg_ave_1.mat'
HeadModelFile: 'Subject01/@raw2086073_20190706_095916_fil_seg_ave_1/headmodel_surf_openmeeg_02.mat'
HeadModelType: 'surface'
ChannelFlag: [257×1 double]
GoodChannel: [1×256 double]
SurfaceFile: 'Subject01/tess_cortex_pial_low.mat'
Atlas: []
GridLoc: []
GridOrient: []
GridAtlas: []
Options: [1×1 struct]
ColormapType: []
DisplayUnits: []
ZScore: []
nAvg: 1
Leff: 1
DataWhitener: []
History: {'04-Jan-2021 14:14:50' 'compute' 'Source estimation: gls'}
The dipole scanning is not supported for continuous files.
Import your data segments of interest first.
I added a test to capture this error correctly:
Bugfix: Disable dipole scanning from raw links · brainstorm-tools/brainstorm3@2658cb7 · GitHub
When you update Brainstorm, you should see this error message:

Thank you so much, Francois. It works.