Here you’ll find some recipes for doing common tasks using Fatiando, like generating synthetic data, running inversions, and plotting things.

Tip

You can download `.py`

files of the recipes by clicking on the
“Download source code” link below the recipe title.

- Meshing: Making a grid of 3D point sources
- Meshing: Make and plot a 3D prism mesh
- Meshing: Filter prisms from a 3D prism mesh based on their physical properties
- Meshing: Make and plot a 3D prism mesh with topography
- Meshing: Make a 3D prism mesh with depth-varying density
- Meshing: Generate a 3D prism model of the topography
- Meshing: Generate a SquareMesh and get the physical properties from an image
- Meshing: Make and plot a tesseroid with the Earth
- Meshing: Make and plot a tesseroid mesh
- Meshing: Make and plot a tesseroid mesh with topography

- GravMag: Interactive 2D forward modeling with polygons
- GravMag: 2D forward modeling with polygons
- GravMag: 2D gravity inversion for the relief of a basin
- GravMag: Simple gravity inversion for the relief of a 2D trapezoidal basin
- GravMag: Simple gravity inversion for the relief of a 2D triangular basin
- GravMag: Use the Polynomial Equivalent Layer to reduce a magnetic total field anomaly to the pole
- GravMag: Use the polynomial equivalent layer to upward continue gravity data
- GravMag: Use an equivalent layer to reduce a magnetic total field anomaly to the pole
- GravMag: Use an equivalent layer to upward continue gravity data
- GravMag: Forward gravity modeling using a stack of 3D polygonal model
- GravMag: Forward modeling of the gravitational potential and its derivatives using 3D model
- GravMag: Forward modeling of the gravity anomaly and gravity gradient tensor using model
- GravMag: Forward modeling of the gravitational potential and its derivatives using tesseroids
- GravMag: 3D gravity inversion by planting anomalous densities using
`harvester`

(more complex interactive example) - GravMag: 3D gravity gradient inversion by planting anomalous densities using
`harvester`

(with non-targeted sources) - GravMag: Using data weights in 3D inversion using
`harvester`

- GravMag: 3D imaging using the Generalized Inverse method on synthetic gravity data (more complex model + noisy data)
- GravMag: 3D imaging using the migration method on synthetic gravity data (more complex model + noisy data)
- GravMag: 3D imaging using the sandwich model method on synthetic gravity data (simple example)
- GravMag: 3D forward modeling of total-field magnetic anomaly using polygonal prisms
- GravMag: 3D forward modeling of total-field magnetic anomaly using rectangular prisms (model with induced and remanent magnetization)
- GravMag: 3D forward modeling of total-field magnetic anomaly using spheres
- GravMag: Use the DipoleMagDir class to estimate the magnetization direction of dipoles with known centers
- GravMag: Calculate the gravity disturbance and Bouguer anomaly for Hawaii
- GravMag: Center of mass estimation using the first eigenvector of the gravity gradient tensor (simple model)
- GravMag: Center of mass estimation using the first eigenvector of the gravity gradient tensor (2 sources with expanding windows)
- GravMag: Calculate the gravity gradient tensor invariants
- GravMag: Generate synthetic gradient tensor data from polygonal prisms
- GravMag: Generate noise-corrupted gravity gradient tensor data
- GravMag: Calculating the derivatives of the gravity anomaly using FFT
- GravMag: Reduction to the pole of a total field anomaly using FFT
- GravMag: Calculate the analytic signal of a total field anomaly using FFT
- GravMag: Upward continuation of noisy gz data

- Seismic: 2D epicenter estimation assuming a homogeneous and flat Earth
- Seismic: Invert vertical seismic profile (VSP) traveltimes for the velocity of a layered model.
- Seismic: Invert vertical seismic profile (VSP) traveltimes using smoothness regularization and unknown layer thicknesses
- Seismic: 2D straight-ray tomography using damping regularization
- Seismic: 2D straight-ray tomography using sharpness (total variation) regularization
- Seismic: 2D finite difference simulation of elastic P and SV wave propagation
- Seismic: 2D finite difference simulation of elastic SH wave propagation
- Seismic: 2D finite difference simulation of elastic SH wave propagation in a medium with a discontinuity (i.e., Moho), generating Love waves.
- Seismic: 2D finite difference simulation of elastic P and SV wave propagation in a medium with a discontinuity (i.e., Moho), generating Rayleigh waves
- Seismic: 2D finite difference simulation of scalar wave propagation.

- Vis: Plot a map using the Orthographic map projection and filled contours
- Vis: Plot a map using the Mercator map projection and pseudo-color
- Vis: Plot a map using the Robinson map projection and contours
- Vis: Plot contour lines and filled contours
- Vis: Plotting irregularly sampled map data
- Seismic: plotting a seismic section from a SEGY
- Vis: Set the colors in figures, prisms, polygonal prisms and tesseroids.
- Vis: Plot the Earth, continents, inner and outer core in 3D with Mayavi2
- Vis: Exaggerate the vertical dimension of 3D plots