mmt_dipole_cuboid_inversion.numba_lib#

Module Contents#

Functions#

populate_matrix(G, scan_domain, scan_height, cuboids, ...)

Main function to populate the G matrix

mmt_dipole_cuboid_inversion.numba_lib.populate_matrix(G, scan_domain, scan_height, cuboids, Npart, Ny, Nx, scan_spacing_x, scan_spacing_y, scan_deltax, scan_deltay, Origin, verbose=True)#

Main function to populate the G matrix

Parameters:
G

Reference to the forward matrix (np array) to be populated

scan_domain

Array of size 2x2 with the lower left and upper right coordinates of the scan surface

scan_height

If positive, z is oriented upwards, and grains are defined with negative z-values. If negative, z is oriented towards depth and grains are defined with positive z-values

Origin

If True the scan data is set to the QDM lower left corner coordinates. If False, the scan data origin is set at (0., 0.)

Notes

The outer while loop will last until reaching the total number of cuboids in the sample. Adjacent cuboids belong to a single particle, which is indexed in the 6th element of the cuboids array. The population of the G matrix is performed column wise for every particle. For each cuboid belonging to a particle, their contribution to the magnetic flux is summed up for every sensor measurement in steps of delta_* in the xy plane, which are given by the loops with the i-j indexes. The flux is stored column wise.