geopulse.config
YAML configuration loader for GeoPulse pipelines.
Uses Python dataclasses for the schema — deliberately NO pydantic /
hydra / dynaconf, to keep the core dependency list minimal (see Section 14 of
the handoff spec).
The top-level document must have a single geopulse: key. Example:
geopulse:
source:
type: synthetic
waveform: gaussian_pulse
amplitude_nT: 500.0
duration_s: 3600.0
dt_s: 1.0
earth:
type: layered_1d
model: quebec_7layer
network:
type: powergrid
file: benchmarks/horton2012/network.json
solver:
type: lpm
output:
file: results.hdf5
format: hdf5
Functions
|
Load a YAML pipeline config from disk. |
Classes
|
Earth-model section. |
|
Top-level GeoPulse configuration. |
|
Network section. |
|
Output section. |
|
Solver section. |
|
B-field source section. |
- class geopulse.config.SourceConfig(type, waveform=None, amplitude_nT=0.0, duration_s=0.0, dt_s=1.0, file=None, station_id='SYN')[source]
Bases:
objectB-field source section.
- Parameters:
- class geopulse.config.EarthConfig(type, model=None, file=None)[source]
Bases:
objectEarth-model section.
- class geopulse.config.SolverConfig(type='lpm', options=<factory>)[source]
Bases:
objectSolver section.
- class geopulse.config.OutputConfig(file='results.hdf5', format='hdf5')[source]
Bases:
objectOutput section.
- class geopulse.config.GeoPulseConfig(source, earth, network, solver, output)[source]
Bases:
objectTop-level GeoPulse configuration.
- Parameters:
source (SourceConfig)
earth (EarthConfig)
network (NetworkConfig)
solver (SolverConfig)
output (OutputConfig)
- source: SourceConfig
- earth: EarthConfig
- network: NetworkConfig
- solver: SolverConfig
- output: OutputConfig
- classmethod from_dict(data)[source]
Build a
GeoPulseConfigfrom a plain nested dict.- Parameters:
data (
dict[str,Any]) – The parsed YAML content (either the root or itsgeopulse:child, both accepted).- Raises:
ConfigurationError – If required top-level sections are missing.
- Return type:
- geopulse.config.load_config(path)[source]
Load a YAML pipeline config from disk.
- Parameters:
- Return type:
- Returns:
GeoPulseConfig – Parsed and validated config.
- Raises:
ConfigurationError – If the file does not exist or fails validation.