I have been endeavoring to compute the quantitative evaluation metrics of source localization, including Normalized Mean Squared Error (MSE), distribution discrepancy, and spatial dispersion, for both MRI volume and cortex surface of source localization.

The calculation of ImageGridAmp was conducted within the Matlab workspace (command window) using ImageGridAmp=ImagingKernel*recordings, as I encountered difficulties when attempting to utilize the Full results advanced option during the source estimation process from EEG recordings.

My inquiry pertains to identifying the appropriate pipeline within Brainstorm for conducting the evaluation metrics. Alternatively, if such functionality is not available within Brainstorm, I seek guidance on which data should be exported to Matlab for conducting this analysis.

Thank you for your prompt response; I am eager to contribute to Brainstorm.

I have a question regarding the ImageGridAmp matrix, obtained from either ImageGridAmp=ImagingKernel*recordings or Full results. Is this matrix considered a source activity matrix? Initially, I intended to compute the evaluation matrix within the Matlab editor and subsequently transfer it to the Brainstorm process. Hence, it is crucial for me to determine which data file I should export from Brainstrom to the Matlab editor as a source activity matrix. To let you know, I generated ERP from EEG, Head model using cortex/volume MRI of participants, and corresponding source modeling using ERP and head model.

Your clarification on this matter would be greatly appreciated.

Yes it is. For constrained sources it has the shape [nVertices, nTime]. For unconstrained sources it has the shape [3*nVertices, nTime] as there are 3 time series (x ,y and z) per vertex, the matrix is arranged as Vertex1_x, Vertex1_y, Vertex1_z, Vertex2_x ... VertexN_z

Thank you once again for your prompt response to my previous inquiry.

I have two additional questions regarding the source modeling process:

After completing the source modeling, if I make any adjustments to the pre-processing steps applied to the EEG data (such as modifying band frequencies or removing ICA components), or if there are changes in the MRI-electrode coregistration, would it be necessary to perform source re-modeling? Alternatively, would the impact of these changes in the processing pipeline be automatically updated in the source activity matrix?

If I were to perform normalization of the unconstrained sources using z-transform, specifically normalizing with the scores of unconstrained sources, what would be the resulting size of the source activity matrix?

Your insights on these matters would be greatly appreciated.