Magnetics Inversion

Documents the equivalent source gridding and full 3D magnetic inversion processes in docker/base-runner/mag_processes/ and the underlying inversion systems in the simplemag library.

Source Files

Equivalent Source Inversion

Process: MagEquivSourceMagEquivalentSourceSystem

Physical Model

Inverts flight-line TMI (total magnetic intensity) data for an equivalent distribution of magnetic dipoles on a single flat horizontal layer. The layer is placed at layer__depth_below_flight metres below the minimum observed flight altitude.

The forward problem uses SimPEG's Simulation3DIntegral with full tensor Green's functions for magnetic dipoles in a homogeneous half-space. The integral solution computes the magnetic field at each receiver location as the sum of contributions from all source dipoles.

Mesh

A discretize.TensorMesh with: - Single vertical cell (layer__cell_thickness) - Horizontal cells of layer__cell_size (default 50 m) - layer__padding_cells padding cells around data extent (default 8 per side)

Model Types

  1. "scalar" (susceptibility): Assumes induced magnetization aligned with Earth's field. One parameter per cell: M = χ·H₀. Models only induced magnetization.

  2. "vector" (MVI): Three-component magnetization (Mx, My, Mz) per cell. Can represent remanent magnetization with arbitrary direction. n_params = 3 × n_cells.

Reference: Lelièvre & Oldenburg (2009) for MVI theory.

Inversion Formulation

Prediction on Output Grid

After inversion, the recovered dipole layer is used to forward-predict Bx, By, Bz, and TMI on a regular grid at output__altitude (default: mean flight altitude). This step uses Simulation3DIntegral with store_sensitivities="forward_only" (no caching — G is not needed again).

Output

An xarray Dataset with dimensions (y, x) containing variables for each requested component (tmi, bx, by, bz), plus CRS metadata (spatial_ref with WKT). Written as webxtile.

Full 3D Magnetic Inversion

Process: MagInversion3DMagInversion3DSystem

Physical Model

Inverts gridded field components (output of the equivalent source step) for a 3D susceptibility or magnetization vector model using an OcTree (TreeMesh) discretization. The same Simulation3DIntegral forward operator drives this inversion.

Model Types

  1. "scalar": Susceptibility χ (SI) per active cell, induced-only. Works with any single component (usually tmi).

  2. "vector" (MVI): Three-component magnetization per active cell. Requires bx, by, bz input components.

  3. "amplitude": Scalar susceptibility from the amplitude of the anomalous field: |B_a| = √(Bx² + By² + Bz²) The forward model predicts all three components and internally computes the amplitude. This approach is remanence-insensitive (the amplitude depends only on the total magnetization magnitude, not its direction) but does not determine magnetization direction.

Reference: Li et al. (2017) for amplitude magnetic inversion.

Mesh

Adaptive OcTree built with mesh_builder_xyz and refine_tree_xyz: - Core cell size: mesh__core_cell_size (default 50 m) - Surface refinement: Refined around topography using octree_levels_surf (default [2, 4]) - Observation refinement: Radial refinement around observation points using octree_levels_obs (default [2, 4]) - Depth: mesh__depth_core (default 500 m below observation level) - Horizontal padding: mesh__max_distance (default 5000 m beyond data bounds)

Active cells are determined by active_from_xyz(mesh, topography) — cells below the topography surface are active.

Inversion Formulation

Output

OcTree cell centres are interpolated (nearest neighbour) onto a regular 3D grid. Output as xarray Dataset with dimensions (z, y, x): - Scalar/amplitude: susceptibility (SI units) - Vector: mx, my, mz (A/m units)

Written as webxtile.

Sensitivity Matrix Caching

Both inversion systems use sensitivity_hash() — a SHA-256 hash computed from: - Receiver locations (3D coordinates) - Earth field parameters (intensity, inclination, declination) - Mesh parameters (cell size, padding, depth) - Model type (scalar/vector)

The hash determines a subdirectory for on-disk .npy sensitivity matrices (store_sensitivities="disk"). The process wrappers sync this directory to/from blob storage (sensitivity_cache/equiv/ and sensitivity_cache/mag3d/), enabling reuse across pipeline runs when the survey geometry is unchanged.

References