part of my internship work, consists in integrating a new inversion method in Brainstorm, I saw in the tutorial How to write your own process the procedure the procedure, but I do not know which .m file to modify and the procedure to be continued,
thank you for your help.

Hi Younes,

I'm not sure if it's an easy task for you to dive deeply into the code during your internship,
as first step, I would suggest validating your method outside Brainstorm first by comparing your results to the results produced by Brainstorm's inverse methods.

However, if you would like to dive in, you need to add breakpoints on many parts of the code in order to follow the differents steps.

You can start by checking these functions:

panel_protocols.m at the subfunction TreeInverse,
there you can find the list of the inverse methods available within Brainstorm,
Your method can be added to this function:

and you can check also this one as well:

Good luck :crossed_fingers:

You can find examples for easily getting started in the tutorial "How to write your own process":

Make sure you read the Scripting tutorial in details before anything else:

Thank you for your answers

on paper (PM 2002) we have kernel = T = L' * inv(L * L' + alpha I ), in bst_inv_lineare2018 we have Kernel = Lambda * L' * inv(Lambda * L * L' + eye(size(L,1))) , my question is : is lambda = alpha ? or lambda = 1/alpha ?

@John_Mosher @Sylvain?

These two equations are identical once you distribute Lambda, which is a scalar.

Hello, Thank you for your answers,
I have two other questions ;

  1. when the inverse problem is solved, the displayed result is:
    Kernel * data ?, the standard for kernel * data ?, or something else?

  2. The "practical" use of whitener 'iW_noise'

Thank you.

The source time series are obtained via Kernel*data; not sure what you mean by standard for kernel.

As to your second question, the whitener noise model is used for regularization of the kernel, to strengthen numerical robustness. This notion is explained in e.g.

What I meant to say is the norm of kernel*data

The inverse models in Brainstorm do not apply the norm operator by default. This step can be added as a separate process.

would you please send me a reference (article title or DOI) related to the method glsp (lcmv)

Thank you in advance

They are cited in Brainstorm's documentation: