harmonica.dipole_magnetic

Contents

harmonica.dipole_magnetic#

harmonica.dipole_magnetic(coordinates, dipoles, magnetic_moments, field, parallel=True, dtype='float64', progressbar=False, disable_checks=False)[source]#

Magnetic field of dipoles in Cartesian coordinates

Compute the component(s) of the magnetic field vector generated by a collection of dipoles on a set of observation points.

Important

The component(s) of the magnetic field are returned in \(nT\).

Parameters:
  • coordinates (list of arrays) – List of arrays containing the easting, northing and upward coordinates of the computation points defined on a Cartesian coordinate system. All coordinates should be in meters.

  • dipoles (tuple of arrays) – Tuple of arrays containing the easting, northing and upward locations of the dipoles defined on a Cartesian coordinate system. All coordinates should be in meters.

  • magnetic_moments (tuple of arrays) – Tuple containing the three arrays corresponding to the magnetic moment components of each dipole in \(Am^2\). These arrays should be provided in the following order: mag_moment_easting, mag_moment_northing, mag_moment_upward.

  • field (str) –

    Magnetic field that will be computed. The available fields are:

    • The full magnetic vector: b

    • Easting component of the magnetic vector: b_e

    • Northing component of the magnetic vector: b_n

    • Upward component of the magnetic vector: b_u

  • parallel (bool (optional)) – If True the computations will run in parallel using Numba built-in parallelization. If False, the forward model will run on a single core. Might be useful to disable parallelization if the forward model is run by an already parallelized workflow. Default to True.

  • dtype (data-type (optional)) – Data type assigned to the resulting magnetic field. Default to np.float64.

  • progressbar (bool (optional)) – If True, a progress bar of the computation will be printed to standard error (stderr). Requires numba_progress to be installed. Default to False.

  • disable_checks (bool (optional)) – Flag that controls whether to perform a sanity check on the model. Should be set to True only when it is certain that the input model is valid and it does not need to be checked. Default to False.

Returns:

magnetic_field (array or tuple of arrays) – Computed magnetic field on every observation point in \(nT\). If field is set to a single component, then a single array with the computed magnetic field component will be returned. If field is set to "b", then a tuple containing the three components of the magnetic vector will be returned in the following order: b_e, b_n, b_u.