mmt_multipole_inversion.susceptibility_modules.spherical_harmonics_basis#

Module Contents#

Functions#

dipole_Bz_sus(dip_r, pos_r, Q, n_col_stride)

This function generates the dipolar Bz susceptibility field contributed

quadrupole_Bz_sus(dip_r, pos_r, Q, n_col_stride)

This function generates the quadrupolar Bz susceptibility field contributed

octupole_Bz_sus(dip_r, pos_r, Q, n_col_stride)

This function generates the octupolar Bz susceptibility field contributed

mmt_multipole_inversion.susceptibility_modules.spherical_harmonics_basis.dipole_Bz_sus(dip_r, pos_r, Q, n_col_stride)#

This function generates the dipolar Bz susceptibility field contributed from magnetic point sources over different positions of a scan grid. The method used here is populating the Q matrix which has size:

(len(pos_r), len(dip_r) * n_col_stride)

Method

For every position in the pos_r array, the function computes the susc Bz contribution from all the magnetic sources at positions in dip_r. These susc components are stored in the Q array. Every row i has the dipolar contributions from all the sources at pos_r[i]. The stride value n_col_stride is necessary to “jump” over array cells reserved to store quadrupolar or octupolar susc contributions. If:

pos_r = [r0 r1 r2 ... rN]

and if n_col_stride=5 (so we have space to store quadrupolar Bz sus) then Q is populated as:

Q =  _                                                                                                      _
    | mx_0(r0)  my_0(r0)  mz_0(r0)  0  0  0  0  0  mx_1(r0)  my_1(r0)  mz_1(r0)  0  0 ... mz_M(r0) 0 0 0 0 0 |
    | mx_0(r1)  my_0(r1)  mz_0(r1)  0  0  0  0  0  mx_1(r0)  my_1(r0)  mz_1(r0)  0  0 ...                    |
    | mx_0(r2)  ...                                                                                          |
    |                                                                                                        |
    |   ...                                                                                                  |
    |_mx_0(rN)                                                                                              _|

where mx_j(ri) is the x-component of the Bz susc contribution from the dipole located at dip_r[j] Notice that if Q also stores octupolar fields, then we would have strides of 12 zeros (5 quad + 7 oct moments), so n_col_stride=15

Parameters
dip_r

N x 3 array OR 1 x 3 array

pos_r

M x 3 array OR 1 x 3 array

Returns
None

None

Notes

Calculate magnetic flux Bz-susceptibility per dipole component generated by dipoles located in position dip_r (m) at position pos_r (m) Units of result is T / (A m2)

mmt_multipole_inversion.susceptibility_modules.spherical_harmonics_basis.quadrupole_Bz_sus(dip_r, pos_r, Q, n_col_stride)#

This function generates the quadrupolar Bz susceptibility field contributed from magnetic point sources over different positions of a scan grid. The method used here is populating the Q matrix which has size:

(len(pos_r), len(dip_r) * n_col_stride)

Methods

See dipole_Bz_sus documentation for details of this function. The Q array is populated strating from the 3rd column since the 0-2 columns are reserved for the dipolar Bz susceptibility contributions

Parameters
dip_r

N x 3 array OR 1 x 3 array

pos_r

M x 3 array OR 1 x 3 array

Returns
None

None

mmt_multipole_inversion.susceptibility_modules.spherical_harmonics_basis.octupole_Bz_sus(dip_r, pos_r, Q, n_col_stride)#

This function generates the octupolar Bz susceptibility field contributed from magnetic point sources over different positions of a scan grid. The method used here is populating the Q matrix which has size:

(len(pos_r), len(dip_r) * n_col_stride)

Methods

See dipole_Bz_sus documentation for details of this function. The Q array is populated strating from the 8th column since the 0-2 columns are reserved for the dipolar Bz susceptibility contributions and columns 3-7 for the quadrupolar contributions.

Parameters
dip_r

N x 3 array OR 1 x 3 array

pos_r

M x 3 array OR 1 x 3 array

Returns
None

None