geopulse.earth.base
Abstract base class for Earth conductivity models.
The design contract: every EarthModel produces an
Impedance object. The
Impedance handles the actual E-field
computation via polymorphism. 1-D models produce
ScalarImpedance, 2-D produce
TensorImpedance, 3-D produce
KernelImpedance. The
efield layer calls impedance.apply(...) and never knows
which type it got.
Classes
|
A single layer in a 1-D conductivity model. |
Abstract base class for Earth conductivity models. |
- class geopulse.earth.base.ConductivityLayer(thickness_m, conductivity_Sm)[source]
Bases:
objectA single layer in a 1-D conductivity model.
- thickness_m
Layer thickness in meters. Use
numpy.inffor the terminating half-space (bottom layer).- Type:
Notes
Resistivity
ρ = 1/σis NOT stored — compute it when needed to avoid redundancy and potential inconsistency.- Raises:
ValueError – If
conductivity_Smis non-positive, orthickness_mis non-positive and not infinite.- Parameters:
- class geopulse.earth.base.EarthModel[source]
Bases:
ABCAbstract base class for Earth conductivity models.
Subclasses represent different spatial complexity:
Layered1D— horizontally layered half-space (Wait recursion).Structured2D— 2-D cross-section (finite-difference).Unstructured3D— full volumetric (ModEM / SimPEG wrapper).
All produce an
Impedanceobject viacompute_impedance().- abstractmethod compute_impedance(freqs_Hz)[source]
Compute the surface impedance at the given frequencies.
- classmethod from_library(name)[source]
Load a named model from the built-in library.
- Parameters:
name (
str) – Model name. Seegeopulse.earth.library.list_models()for the registry.- Return type:
- Returns:
EarthModel – The requested model.
- Raises:
KeyError – If
nameis not registered.