Cannot find MEM in Compute Source [2018]

Hi,

I'd like to use MEM for source loc of MEG data.
If I right click on the file, then --> compute source [2018], I can select MEM and it seems to work well;
If I try to call MEM from run --> sources --> compute sources [2018], I cannot find it. There does not seem to be the possibility to run MEM from here.

Any suggestion on how to solve this?

You have to use the process "Compute sources : BEST" instead.

Thank you Francois,

I don't seem to have this option. I can't find the "Compute source : BEST" anywhere.
The only possibility I have so far is to right click on the file and select MEM from there, but this is very inconvenient when you have hundreds of files to process.
I have updated brainstorm and MEM, but this does not seem to solve the issue.
Do you have any further recommendations?

Thanks again for your help

Hello Giovanni,
You should have it under the dipole scanning process in the Sources submenu.

Edouard

Thanks Edouard,

unfortunately I don't seem to have it there...
Any suggestions on how to have this process available?
Calling it from Matlab script is good as well, as long as I don't have to manually click for all the sources I have to compute.

ok. that is weird.

Can you check that the brainentropy toolbox is loaded? Also, can you check that when you open Brainstorm you don't have a message saying "BST> Invalid plug-in function: "process_inverse_mem.m" ?

If you have that, can you check what is the output of "which process_inverse_mem" ? it should be .brainstorm/plugins/brainentropy/best-brainstorm-master/processes/process_inverse_mem.m

In case that helps, i ask brainstorm to generate the script that calls MEM process:

% Script generated by Brainstorm (31-Mar-2023)

% Input files
sFiles = {'... .mat'};

% Start a new report
bst_report('Start', sFiles);

% Process: Compute sources: BEst
sFiles = bst_process('CallProcess', 'process_inverse_mem', sFiles, [], ...
    'comment',     '', ...
    'mem',         struct(...
         'MEMpaneloptions', struct(...
               'InverseMethod', 'MEM', ...
               'automatic',     struct(...
                     'MEMexpert',   1, ...
                     'version',     '2.7.3', ...
                     'last_update', ''), ...
               'clustering',    struct(...
                     'neighborhood_order',   4, ...
                     'MSP_window',           10, ...
                     'clusters_type',        'static', ...
                     'MSP_scores_threshold', 0), ...
               'optional',      struct(...
                     'TimeSegment',     [-20, 30], ...
                     'groupAnalysis',   0, ...
                     'Baseline',        [], ...
                     'BaselineHistory', {{'within'}}, ...
                     'display',         0, ...
                     'BaselineSegment', [-20, 0]), ...
               'mandatory',     struct(...
                     'pipeline', 'cMEM'), ...
               'model',         struct(...
                     'active_mean_method', 2, ...
                     'alpha_method',       3, ...
                     'alpha_threshold',    0, ...
                     'initial_lambda',     1), ...
               'solver',        struct(...
                     'spatial_smoothing',  0.6, ...
                     'active_var_mult',    0.05, ...
                     'inactive_var_mult',  0, ...
                     'NoiseCov_method',    2, ...
                     'Optim_method',       'fminunc', ...
                     'parallel_matlab',    1, ...
                     'NoiseCov_recompute', 1))), ...
    'sensortypes', 'EEG');

% Save and display report
ReportFile = bst_report('Save', sFiles);
bst_report('Open', ReportFile);
% bst_report('Export', ReportFile, ExportDir);
% bst_report('Email', ReportFile, username, to, subject, isFullReport);

% Delete temporary files
% gui_brainstorm('EmptyTempFolder');

Thank you so much

  1. yes, brain entropy toolbox is loaded
  2. yes, you are right, I just noticed the message "BST> Invalid plug-in function: "process_inverse_mem.m"
  3. which process_inverse_mem gives me the following: '/Users/GPellegrino/.brainstorm/process/process_inverse_mem.m'

So I have deleted that old process (probably I kept it from the time I was in Montreal) and now it seems to be ok. Thanks a lot for your help

Giovanni

1 Like