pycsamt.agents.resistivity_map#
pycsamt.agents.resistivity_map#
ResistivityMapAgent — Horizontal depth-slice resistivity maps.
Assembles pseudo-3D resistivity volumes from per-station 1-D (or 2-D profile) inversion results. At each requested depth, per-station log₁₀ρ values are scattered onto a 2-D grid and interpolated with linear or IDW methods to produce a plan-view map.
Typical use: feed the predictions output of
AIInversionAgent, Inv3DAgent,
or any compatible inversion result together with station coordinates.
Classes
|
Build horizontal resistivity depth-slice maps from 1-D inversion results. |
- class pycsamt.agents.resistivity_map.ResistivityMapAgent(*, api_key=None, model=None, llm_provider='claude', depth_indices=None, interp_method='linear', grid_n=50)[source]#
Bases:
BaseAgentBuild horizontal resistivity depth-slice maps from 1-D inversion results.
- Parameters:
api_key (str)
model (str)
llm_provider (str)
depth_indices (list[int], optional) – Layer indices to map (0-based).
Nonemaps 3 evenly spaced layers.interp_method ({'linear', 'nearest', 'idw'}) – Interpolation method for gridding station values (default
'linear').grid_n (int) – Number of grid cells per axis (default 50).
keys (Output data)
----------
predictions (dict {station: ndarray} — log₁₀ρ per layer) – (from AIInversionAgent, Inv3DAgent, etc.)
station_coords (dict {station: (x, y)} or ndarray (n_sta, 2) — metres)
depths_km (ndarray — depth axis (km))
depth_indices
output_dir (str, optional)
keys
----------------
per-depth (depth_maps list[dict] —)
list[float] (depth_levels_km)
dict (figure_paths)
dict
- SYSTEM_PROMPT: str = 'You are an expert in pseudo-3D resistivity interpretation from MT surveys.\nGiven a set of horizontal resistivity maps, write 4-5 sentences that:\n1. Describe the dominant resistivity pattern at each depth level.\n2. Identify lateral contrasts that suggest geological boundaries or structures.\n3. Note any stations that appear anomalous at specific depths.\n4. Discuss the reliability of the interpolation given station spacing.\n5. Recommend drilling targets or geological follow-up based on the maps.\nReply in plain scientific English.\n'#
Override in subclasses to give the LLM its domain expertise.
- execute(input_data)[source]#
Run this agent on input_data and return an
AgentResult.Subclasses must implement this method. The contract:
Reset
self._last_cost = 0.0at the top.Record wall-clock time with
t0 = time.time().Return
AgentResult(elapsed_seconds=time.time()-t0, cost_estimate_usd=self._last_cost, ...).
- Parameters:
- Return type: