Compute goodness of fit for simulated dipole comparing it with actual EEG recording

Hello Brainstorm users,

I am trying to look at the goodness of fit between the dipole that I have simulated in Brainstorm( I also have the predicted EEG/MEG sensor reconstruction obtained from the simulated dipole). I want to compare it with the actual EEG/MEG recording of the patient that I have. I want to be able to do it through scripting but don't know how. Could anyone help me with how I can compute the goodness of fit through scripts?

The dipoles are computed with processes, for which you can easily generate scripts:

Then all the values computed for the dipoles are available directly in the .mat files. Example:
image

If this doesn't answer your question, please describe precisely the information you obtained with the interface and that you don't know how to access from a script. Include screen captures.