wMEM for MEG GRAD and MAG sensors

Dear Brainstorm developers,

I was trying to perform source localization via wMEM method for both MEG GRAD and MAG sensors. When I run the analysis separately for each type of sensor, the calculation is perfectly accomplished, but when both MEG sensors are selected, I get the following error:

BST> Plugin brainentropy already loaded: C:\Users\mitaa.brainstorm\plugins\brainentropy

BEst (version 2.7.3, downloaded on: ) 
Brain Entropy in space and time
Credit: PhysNum - Centre de Recherches Mathematiques (U. of M., Montreal)
LATIS (ETS, Montreal) and MultiFunkImLab (McGill, Montreal)
e-mail: latislab@gmail.com

===== pipeline wMEM
wMEM, be_main_source ... done.
wMEM, be_main_leadfields ... done.
wMEM, wavelet pre-processing (new)
wMEM, sdw-rdw wavelet transform (rdw4):
j = 1, fc = 0.375fs, (225.4 Hz)
j = 2, fc = 0.188
fs, (112.7 Hz)
j = 3, fc = 0.094fs, (56.3 Hz)
j = 4, fc = 0.047
fs, (28.2 Hz)
j = 5, fc = 0.023fs, (14.1 Hz)
j = 6, fc = 0.012
fs, ( 7.0 Hz)
wMEM, sdw-rdw wavelet transform (rdw4):
j = 1, fc = 0.375fs, (225.4 Hz)
j = 2, fc = 0.188
fs, (112.7 Hz)
j = 3, fc = 0.094fs, (56.3 Hz)
j = 4, fc = 0.047
fs, (28.2 Hz)
j = 5, fc = 0.023fs, (14.1 Hz)
j = 6, fc = 0.012
fs, ( 7.0 Hz)
wMEM, wavelet processing of the MEG GRAD
wMEM, wavelet denoising:
j=1 (98% to 0), j=2 (60% to 0), j=3 (59% to 0)
j=4 (61% to 0), j=5 (56% to 0), j=6 (55% to 0)

wMEM, wavelet processing of the MEG MAG
wMEM, wavelet denoising:
j=1 (98% to 0), j=2 (60% to 0), j=3 (59% to 0)
j=4 (61% to 0), j=5 (56% to 0), j=6 (55% to 0)

Index in position 1 exceeds array bounds (must not exceed 3).

Error in be_selected_coeff (line 114)
tmi =
OPTIONS.automatic.selected_samples(6,:)-2.^(OPTIONS.automatic.selected_samples(2,:)-1)/fs/2;

Error in be_discrete_wavelet_preprocessing (line 65)
[OPTIONS] = be_selected_coeff(obj.data, obj, OPTIONS);

Error in be_wdata_preprocessing (line 49)
** [obj, OPTIONS] = be_discrete_wavelet_preprocessing(obj, OPTIONS);**

Error in be_wmem_solver (line 146)
[OPTIONS, obj] = be_wdata_preprocessing(obj, OPTIONS);

Error in be_main_call (line 157)
** [Results, MEMoptions] = feval(['be_' lower(MEMoptions.mandatory.pipeline) '_solver'],**
** HeadModel, MEMoptions, Results );**

Error in be_main (line 60)
** [Results, OPTIONS] = be_main_call(varargin{:});**

Error in process_inverse_2018>Compute (line 681)
** [Results, OPTIONS] = be_main(HeadModel, OPTIONS);**

Error in process_inverse_2018 (line 24)
eval(macro_method);

Error in panel_protocols>TreeInverse (line 1384)
** [OutputFiles, errMessage] = process_inverse_2018('Compute', iStudies, iDatas);**

Error in panel_protocols (line 46)
eval(macro_method);

Error in tree_callbacks>@(h,ev)panel_protocols('TreeInverse',bstNodes,'2018') (line 2579)
** gui_component('MenuItem', jPopup, [], 'Compute sources [2018]',**
** IconLoader.ICON_RESULTS, [], @(h,ev)panel_protocols('TreeInverse', bstNodes,**
** '2018'));**

I wanted to ask if this is my mistake, since this operation is not allowed at all, or if it is solvable somehow.

Best regards,
Margherita

This is a question for the developers of the MEM:
@youneszer @klack @RChowdhury @tanguy @Lina @cgrova @aliobaibk @edelaire

Hello, thank you for reporting the error. It was not a mistake from the user's side, I could reproduce the error as well. We are looking into this and will update you soon.

thanks,
@jafnan

2 Likes

Thanks! I am waiting for news then.
Best,
Margherita

Hello,

I'm sorry to bother you. Do you have any news about this? @jafnan

Dear Margherita, thanks for your message. We are looking into this issue with wMEM for different sensor types, and will let you know as soon as we have some updates.

P.S. If you are working with event related MEG data, you can also try cMEM implemented in Brainstorm, which is able to handle both types of sensors. Regarding wMEM, we are trying to fix the issue :slight_smile:

thank you for your patience,

Regards,
Jawata

Hi all, do you have updates about the issue? Thks!

Hello @jafnan, is there update on this topic?