Questions about the noise covariance matrix calculation

Hi,

I would like to have your opinion of the calculation of the noise covariance matrix in brainstorm. What is puzzled me actually is that in the previous version of brainstorm, when solving the inversion problem, the covariance matrix was normalized by the number of averaged trials of the data to estimate. This step has been commented out in the new version. Is it normal?

Thanks a lot,
Tanguy

Hi Tanguy,

The noise covariance matrix is divided by the number of trials here:


Is it what you were referring to?

I don’t know to which version of Brainstorm you are referring to, but I think it has been like this for at least two years.

Cheers,
Francois

I am referring to the very last version of brainstorm, in the “Compute source [2018]” process.

The line you are mentioning in “Compute source [2009]” has been commented

This operation was moved earlier in the computation, in the function I mentioned previously.

I might be wrong but I really think you should check. Using breakpoints, I looked at the noise covariance matrices for the estimation of two inverse solutions (using “Compute sources [2018]”) : one single and one average data, and the cov matrices are identical.
If I do exactly the same thing using the “Compute sources [2009]” process, I found a ratio of 1/n between the two covariance matrices.

I checked.
Put a breakpoint in both functions where the NoiseCov value is actually used in both functions, and you’ll get exactly the same values: bst_wmne.m line 149, bst_inverse_linear_2018 line 235.

(And make sure you’re using today’s version of Brainstorm)