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);