Plotting source estimation results

Hi,
I'm solving a source estimation problem using a 2000 nodes head model and 16 electrodes.
I'm using the classical Minimum Norm (MN) method with "unconstrained dipole orientation".
The inverse operator (Kernel) is computed in bst-inverse_2018.m. It has dimensions (3x2000) x 16.
I guess that the estimate J=Kernel*data is a vector having dimension (3x2000) x 1 (i.e., J is composed of 2000 dipoles, each being a vector of dimension 3x1)..
Am I correct ?
But When I plot the result, the displayed map is not a vector field but a scalar field.
My question is the following:
What field is plotted ? The norm of each estimated dipole ? If so, in which file this norm is computed.
Regards,
Greg

Hi Greg,

Yes, this is correct.
If your sensor (electrode) data has 1000 samples, its shape will be [16, 1000], then J will have the dimensions [(3x2000), 1000]. This matrix J is not stored, it is computed from the sensor data and the kernel when it is required. This is done to optimize RAM and storage.

To plot, J is generated as above, and the RMS (or L2-norm) is computed for each dipole.

Best,
Raymundo

Thank you Raymundo for your clear response.
I've got a last question : do you know in which file the commands to generate J and its L2-norm - for plotting purpose - can be found ?
Best,
Greg

The matrix J is generated in the function GetResultsValues() inside bst_memory.m

  • ResultsValues = ImagingKernel * Data;

For RMS/L2, it happens in the function ApplyFunction() inside bst_source_orient.m

  • Values = sqrt(Values(i1,:,:,:).^2 + Values(i2,:,:,:).^2 + Values(i3,:,:,:).^2);

Thanks you...

This is all described in the introduction tutorials: