The fatiando package has been deprecated. Please check out the new tools in the Fatiando a Terra website:

Gravity and magnetics (fatiando.gravmag)

Gravity and magnetics forward modeling, inversion, transformations and utilities.

Forward modeling

The forward modeling modules provide ways to calculate the gravitational and magnetic field of various types of geometric objects:

  • prism: 3D right rectangular prisms
  • polyprism: 3D prisms with polygonal horizontal cross-sections
  • sphere: Spheres in Cartesian coordinates
  • tesseroid: Tesseroids (spherical prisms) for modeling in spherical coordinates
  • talwani: 2D bodies with polygonal vertical cross-sections


The inversion modules use the forward modeling models and the fatiando.inversion package to solve potential field inverse problems:

  • basin2d: 2D inversion of the shape of sedimentary basins and other outcropping bodies
  • harvester: 3D inversion of compact bodies by planting anomalous densities
  • euler: 3D Euler deconvolution methods to estimate source location
  • magdir: Inversion methods to estimate the total magnetization vector of multiple sources.


The processing modules offer tools to prepare potential field data before or after modeling.

  • normal_gravity: Compute normal gravity and reductions.
  • eqlayer: Equivalent layer processing
  • transform: Potential field transformations, like upward continuation, derivatives, etc
  • imaging: Imaging methods for potential fields for estimating physical property distributions
  • tensor: Utilities for operating on the gradient tensor


Module interactive implements matplotlib GUIs and IPython HTML widgets for interacting with the modeling and processing functions.