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
listofarrays List of arrays containing the
easting,northingandupwardcoordinates of the computation points defined on a Cartesian coordinate system. All coordinates should be in meters.- dipoles
tupleofarrays Tuple of arrays containing the
easting,northingandupwardlocations of the dipoles defined on a Cartesian coordinate system. All coordinates should be in meters.- magnetic_moments
tupleofarrays 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:
bEasting component of the magnetic vector:
b_eNorthing component of the magnetic vector:
b_nUpward component of the magnetic vector:
b_u
- parallelbool (
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.
- dtypedata-type (
optional) Data type assigned to the resulting magnetic field. Default to
np.float64.- progressbarbool (
optional) If True, a progress bar of the computation will be printed to standard error (stderr). Requires
numba_progressto be installed. Default toFalse.- disable_checksbool (
optional) Flag that controls whether to perform a sanity check on the model. Should be set to
Trueonly when it is certain that the input model is valid and it does not need to be checked. Default toFalse.
- coordinates
- Returns:
- magnetic_field
arrayortupleofarrays Computed magnetic field on every observation point in \(nT\). If
fieldis set to a single component, then a single array with the computed magnetic field component will be returned. Iffieldis 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.
- magnetic_field