Forward Modelling#
pycsamt.forward contains the in-process forward modelling layer of
pyCSAMT v2. It provides resistivity model containers, 1-D/2-D/quasi-3-D
electromagnetic solvers, synthetic dataset generators, noise models, and
diagnostic plotting utilities.
Forward modelling answers a controlled physical question:
If this earth model were true, what response would the survey record?
That question sits underneath every serious inversion workflow. Inversion searches for a model that explains observed data; forward modelling computes the data predicted by a known model. A good inversion setup therefore depends on forward modelling for sensitivity tests, synthetic recovery experiments, training data, uncertainty design, and quality control.
What This Section Covers#
The forward documentation is organized around the full lifecycle of a synthetic experiment:
Forward operators, model dimensionality, response quantities, noise, and the relationship between synthetic responses and inversion.
Reproducible ForwardConfig, ForwardConfig2D, and
ForwardConfig3D files for synthetic runs and solver setup.
LayeredModel, Grid2D, Grid3D, 1-D MT/CSAMT/TEM solvers,
2-D MT profiles, and quasi-3-D tensor responses.
Dataset generation for regression tests, survey experiments, and AI-assisted inversion training.
Response curves, model sections, pseudo-sections, 3-D maps, tensor panels, dataset checks, and publication-ready figure hooks.
The handoff contract between synthetic forward responses and inversion backends, including units, shapes, geometry, and error models.
Forward And Model Integrations#
The pycsamt.forward and pycsamt.models packages are related, but
they should not be treated as the same layer.
Package |
Main responsibility |
Typical use |
|---|---|---|
Compute controlled synthetic responses inside Python using pyCSAMT model containers, solvers, dataset generators, noise models, and plotting helpers. |
Test survey design, generate training data, validate inversion assumptions, compare response behaviour, and build reproducible synthetic examples. |
|
Integrate external modelling and inversion engines such as Occam2D, ModEM, and MARE2DEM. |
Prepare native engine files, run external binaries, load engine outputs, and manage backend-specific inversion projects. |
Use pycsamt.forward when you need a controlled synthetic response from
a known model. Use pycsamt.models when you need to prepare, run, or load
a native external-engine project. The two layers meet when a forward synthetic
experiment is converted into an inversion benchmark.
Package Map#
The public forward API is built around a small set of object families.
Object family |
Main objects |
Role |
|---|---|---|
Configuration |
|
Store reproducible frequency/time axes, model ranges, station layouts, solver options, noise settings, and output choices. |
Model containers |
|
Represent 1-D layered earths, 2-D profile grids, and quasi-3-D resistivity volumes. |
Solvers |
|
Compute predicted electromagnetic responses from model containers. |
Response containers |
|
Hold predicted apparent resistivity, phase, transient values, impedance components, station geometry, and array conversion helpers. |
Noise models |
|
Convert ideal synthetic responses into more realistic observations. |
Dataset containers |
|
Store synthetic feature and target arrays, metadata, splits, and
compressed |
Plotting helpers |
|
Inspect models, responses, tensor components, noisy examples, and generated datasets before they are trusted downstream. |
Core Workflow#
A typical forward modelling workflow has six stages.
1import numpy as np
2
3from pycsamt.forward import LayeredModel, MT1DForward, plot_response_and_model_1d
4
5freqs = np.logspace(-2, 3, 40)
6model = LayeredModel(
7 resistivity=[100.0, 15.0, 800.0],
8 thickness=[250.0, 700.0],
9)
10
11solver = MT1DForward(freqs)
12response = solver.run(model)
13
14fig = plot_response_and_model_1d(response, model)
15fig.savefig("runs/forward/mt1d_response.png", dpi=200)
For production work, the same idea should be driven by a configuration file and archived with outputs:
define the physical question and target dimensionality;
create a
ForwardConfig*template;build a model or grid from the configuration;
run the selected solver;
apply a documented noise model when simulating observations;
plot and archive the model, response, configuration, and metadata.
Choosing A Path#
Different users enter the forward section with different goals.
Goal |
Start here |
Then read |
|---|---|---|
Understand the physics and vocabulary |
||
Build a reproducible synthetic run |
||
Generate training data for AI inversion |
Forward Configuration, Forward Plotting, AI And Model-Zoo Agents |
|
Compare 1-D, 2-D, and quasi-3-D behaviour |
||
Prepare an inversion benchmark |
||
Diagnose a generated dataset or response |
Synthetic Datasets And Noise, From Forward Modelling To Inversion |
Relationship To Theory#
Forward modelling is practical, but it is not detached from theory. When a plot or synthetic response looks surprising, the relevant background pages are:
../theory/csamt_amt_mt_overview for the distinction between CSAMT, AMT, MT, and TDEM survey assumptions;
../theory/impedance_tensor for impedance, apparent resistivity, phase, and tensor notation;
../theory/static_shift for shallow distortion effects that can make synthetic and field curves disagree;
../theory/inversion_concepts for how forward responses are used inside objective functions and regularized inversion.
Documentation Contents#
- Forward Modelling Concepts
- The Forward Problem
- Physical Inputs
- Dimensionality
- 1-D Forward Models
- MT, CSAMT, And TEM Assumptions
- 2-D Forward Modelling
- Quasi-3-D Forward Modelling
- Frequency, Period, And Depth Sensitivity
- Response Quantities
- Synthetic Priors
- Noise And Realism
- Synthetic Recovery
- Common Failure Modes
- Good Practice Checklist
- Next Steps
- Forward Configuration
- Solvers And Grids
- Solver Map
- 1-D Layered Models
- 1-D MT And CSAMT Solvers
- 1-D TDEM Solver
- 2-D Profile Grid Concepts
- 2-D Profile Grid Constructors
- 2-D MT Solver
- 3-D Volume Grid Concepts
- 3-D Volume Grid Constructors
- Quasi-3-D Solver
- Grid Design Rules
- Response Containers And Feature Arrays
- Debugging Solver Experiments
- Next Pages
- Synthetic Datasets And Noise
- 1-D Dataset Generation
- ForwardDataset Contract
- Saving, Loading, And Splitting
- Configuration-Driven Generation
- TDEM Datasets
- Geological Priors
- Noise Models
- Clean And Noisy Dataset Pairs
- Pseudo-3-D Survey Datasets
- 2-D And Quasi-3-D Solver Datasets
- Dataset QA
- Recommended Archive Layout
- Common Mistakes
- Next Pages
- Forward Plotting
- Plot Selection Guide
- Saving Figures
- 1-D Response Plots
- 1-D Model Plots
- 1-D Composite View
- 2-D Grid Model Plots
- 2-D Pseudo-Sections
- 2-D Lateral Response Profiles
- 3-D Model Slice Plots
- 3-D Response Maps
- 3-D Response Sections
- 3-D Tensor Component Panels
- Plotting Noisy Responses
- Plotting Dataset Samples
- Plotting Checklist
- Common Mistakes
- Next Pages
- From Forward Modelling To Inversion