pycsamt.forward.em1d#
1-D electromagnetic forward solvers.
Three EM methods are provided, all using the same
LayeredModel / ForwardResponse objects:
MT1DForwardMagnetotelluric (plane-wave source). Uses the exact recursive Wait (1954) impedance formula — the standard for generating MT/AMT/CSAMT far-field training data.
TEM1DForwardCentral-loop time-domain EM (step-off waveform). Computes the frequency-domain H_z via a Hankel transform of the TE admittance kernel, then converts to time via a cosine transform. Uses
scipy.integrate(correct but not optimised; a DLF acceleration layer is planned for Phase 2).CSAMT1DForwardControlled-source AMT. In the far-field limit this reduces to MT. A near-field geometry correction factor is applied when source–receiver distance and frequencies are provided.
References
Wait, J.R. (1954). On the relation between telluric currents and the Earth’s magnetic field. Geophysics, 19(2), 281-289.
Nabighian, M.N. (1979). Quasi-static transient response of a conducting half-space. Geophysics, 44(10), 1700-1705.
Ward, S.H. & Hohmann, G.W. (1988). Electromagnetic theory for geophysical applications. In: Electromagnetic Methods in Applied Geophysics, 1, 130-311.
Puzyrev, V. et al. (2021). Inversion of 1D frequency- and time-domain EM data with CNNs. Computers & Geosciences, 149, 104681.
Classes
|
1-D controlled-source AMT forward solver. |
|
Container for the output of a 1-D forward solver. |
|
1-D magnetotelluric forward solver (plane-wave, isotropic earth). |
|
1-D central-loop TEM forward solver (step-off waveform). |
- class pycsamt.forward.em1d.MT1DForward(freqs)[source]#
Bases:
_Base1DForward1-D magnetotelluric forward solver (plane-wave, isotropic earth).
Uses the exact Wait (1954) recursive impedance algorithm. Runs in O(n_freq × n_layers) time — fast enough for generating millions of synthetic training samples.
- Parameters:
freqs (array-like) – Frequencies [Hz] at which to evaluate the response. Typical range: 1e-4 – 1e5 Hz for MT/AMT.
Examples
>>> import numpy as np >>> from pycsamt.forward.em1d import MT1DForward >>> from pycsamt.forward.synthetic import LayeredModel >>> freqs = np.logspace(-3, 4, 30) >>> model = LayeredModel( ... resistivity=[100, 10, 500], ... thickness=[500, 1000] ... ) >>> resp = MT1DForward(freqs).run(model) >>> resp.rho_a.shape (30,)
- run(model)[source]#
Compute the MT 1-D response for model.
- Parameters:
model (LayeredModel) – Input earth model.
- Returns:
Fields populated:
z,rho_a,phase,freqs.- Return type:
- class pycsamt.forward.em1d.TEM1DForward(times, loop_radius=50.0, moment=1.0, n_freqs=64, n_lam=100)[source]#
Bases:
_Base1DForward1-D central-loop TEM forward solver (step-off waveform).
Computes the vertical magnetic field H_z(ω) via a numerical Hankel transform of the TE admittance kernel, then converts to the step-off time-domain dBz/dt via a cosine transform.
Note
This implementation uses
scipy.integratefor correctness. It is suitable for generating training datasets of moderate size (up to ~10 000 samples). A Digital Linear Filter (DLF) optimisation yielding 100× speed-up is planned for Phase 2.- Parameters:
times (array-like) – Measurement times [s] for the step-off response. Typical range: 1e-6 – 1e-2 s.
loop_radius (float) – Transmitter loop radius [m]. Default 50 m.
moment (float) – Transmitter magnetic moment [A·m²]. Default 1 A·m².
n_freqs (int) – Number of frequency-domain evaluation points used in the cosine transform. Higher → better accuracy at early times.
n_lam (int)
References
Ward & Hohmann (1988), Electromagnetic Methods in Applied Geophysics, Vol. 1.
- run(model)[source]#
Compute the TEM 1-D step-off response for model.
- Parameters:
model (LayeredModel) – Input earth model.
- Returns:
Fields populated:
dBz_dt,hz_freq,times.- Return type:
- class pycsamt.forward.em1d.CSAMT1DForward(freqs, source_offset=None, dipole_length=1000.0)[source]#
Bases:
_Base1DForward1-D controlled-source AMT forward solver.
In the far-field (source–receiver offset r ≫ skin depth δ) the CSAMT response approximates the MT plane-wave response. A first- order near-field correction factor after Zonge & Hughes (1991) is applied when source_offset is supplied.
- Parameters:
References
Zonge, K.L. & Hughes, L.J. (1991). Controlled source audio- frequency magnetotellurics. In Electromagnetic Methods in Applied Geophysics, 2B, 713-809.
- class pycsamt.forward.em1d.ForwardResponse(method='MT1D', freqs=None, times=None, z=None, rho_a=None, phase=None, dBz_dt=None, hz_freq=None, model=None)[source]#
Bases:
objectContainer for the output of a 1-D forward solver.
- Parameters:
method (str) – Solver identifier (
'MT1D','TEM1D','CSAMT1D').freqs (ndarray or None) – Frequencies in Hz (MT/CSAMT).
times (ndarray or None) – Times in seconds (TEM).
z (ndarray or None) – Complex surface impedance (n_freq,) for MT/CSAMT [V/A].
rho_a (ndarray or None) – Apparent resistivity (n_freq,) [Ω·m].
phase (ndarray or None) – Impedance phase (n_freq,) [degrees, 0–90° for normal models].
dBz_dt (ndarray or None) – dBz/dt step-off response (n_times,) [T/s] for TEM.
hz_freq (ndarray or None) – Complex frequency-domain H_z (n_freq,) for TEM.
model (LayeredModel or None) – The input model that produced this response.