2.30.7.2. pycsamt.map._core#
Core data extraction helpers for pycsamt.map.
Functions
|
Return tensor indices for an impedance component. |
|
Return a parsed impedance component specification. |
|
Extract a 1-D value series for one component. |
|
Return normalized map data. |
|
Return the first finite frequency axis found. |
|
|
|
Return the canonical map component name. |
|
Loosely-normalized station id for fuzzy matching. |
|
Return normalized profile lines for data. |
|
Return long-form profile data for pseudosections. |
|
Per-station resistivity on a horizontal slice at |
|
Select the closest finite positive frequency. |
|
Return skin depth at the closest frequency. |
|
Return station records as a DataFrame. |
|
Return approximate station distance in km. |
|
Return normalized station records for data. |
|
Return station values at the closest frequency. |
|
Return values with selected-frequency metadata. |
Classes
|
Parsed impedance component request. |
|
Nearest-frequency selection metadata. |
|
Station value and selected-frequency metadata. |
|
Normalized survey data shared by map renderers. |
|
A named sequence of stations in one profile. |
|
A normalized station row used by map renderers. |
- pycsamt.map._core.normalize_station_id(name)[source]
Loosely-normalized station id for fuzzy matching.
Lowercases and strips everything but letters/digits, so minor formatting differences between sources —
23-18-001Avs23_18_001avs23 18 001A— still match. Used as a fallback tier (never the only lookup) wherever a station from one source (EDI, ModEM, an uploaded elevation file, …) needs to be matched against another.
- class pycsamt.map._core.StationRecord(id, latitude=None, longitude=None, elevation=None, line=None, index=0, source=None)[source]
Bases:
objectA normalized station row used by map renderers.
- Parameters:
- id: str
- index: int = 0
- source: Any = None
- class pycsamt.map._core.ProfileLine(name, stations=())[source]
Bases:
objectA named sequence of stations in one profile.
- Parameters:
name (str)
stations (tuple[StationRecord, ...])
- name: str
- stations: tuple[StationRecord, ...] = ()
- class pycsamt.map._core.MapData(sites, stations=(), profiles=(), metadata=<factory>)[source]
Bases:
objectNormalized survey data shared by map renderers.
- Parameters:
sites (Any)
stations (tuple[StationRecord, ...])
profiles (tuple[ProfileLine, ...])
- sites: Any
- stations: tuple[StationRecord, ...] = ()
- profiles: tuple[ProfileLine, ...] = ()
- class pycsamt.map._core.ComponentSpec(name, indices=None, mode='tensor')[source]
Bases:
objectParsed impedance component request.
- name: str
- mode: str = 'tensor'
- class pycsamt.map._core.FrequencySelection(requested, actual, index, delta, relative_delta, within_tolerance=True)[source]
Bases:
objectNearest-frequency selection metadata.
- Parameters:
- actual: float
- index: int
- delta: float
- relative_delta: float
- within_tolerance: bool = True
- class pycsamt.map._core.FrequencyValue(station, value, selection)[source]
Bases:
objectStation value and selected-frequency metadata.
- Parameters:
station (str)
value (float)
selection (FrequencySelection)
- station: str
- value: float
- selection: FrequencySelection
- pycsamt.map._core.ensure_map_data(data, *, recursive=True, line_map=None, verbose=0)[source]
Return normalized map data.
- Parameters:
data (Any) – EDI path, directory, iterable, or
Sites.recursive (bool) – Passed to
pycsamt.emtools._core.ensure_sites().line_map (dict[str, Iterable[str]] | None) – Optional
line -> station namesmapping used when line metadata is not embedded in EDI objects.verbose (int) – Verbosity passed to
ensure_sites().
- Return type:
- pycsamt.map._core.station_records(data, **kwargs)[source]
Return normalized station records for data.
- Parameters:
- Return type:
tuple[StationRecord, …]
- pycsamt.map._core.profile_lines(data, **kwargs)[source]
Return normalized profile lines for data.
- Parameters:
- Return type:
tuple[ProfileLine, …]
- pycsamt.map._core.station_dataframe(data)[source]
Return station records as a DataFrame.
- pycsamt.map._core.normalize_component(component)[source]
Return the canonical map component name.
- pycsamt.map._core.component_spec(component)[source]
Return a parsed impedance component specification.
- Parameters:
component (str | None)
- Return type:
- pycsamt.map._core.component_index(component)[source]
Return tensor indices for an impedance component.
- pycsamt.map._core.component_values(arr, component, *, quantity='rho')[source]
Extract a 1-D value series for one component.
- pycsamt.map._core.frequency_axis(data)[source]
Return the first finite frequency axis found.
- pycsamt.map._core.select_frequency(frequencies, requested=None, *, tolerance=None)[source]
Select the closest finite positive frequency.
- Parameters:
- Return type:
FrequencySelection | None
- pycsamt.map._core.station_distance_km(data)[source]
Return approximate station distance in km.
- pycsamt.map._core.value_at_frequency(data, *, frequency, quantity='rho', component='xy', tolerance=None)[source]
Return station values at the closest frequency.
- pycsamt.map._core.value_at_frequency_details(data, *, frequency, quantity='rho', component='xy', tolerance=None)[source]
Return values with selected-frequency metadata.
- pycsamt.map._core.skin_depth_at_frequency(data, *, frequency, component='xy', tolerance=None)[source]
Return skin depth at the closest frequency.
- pycsamt.map._core.inversion_depth_range(data)[source]
(z_min, z_max)across every precomputed inversion section, orNonewhen the survey carries no inversion result.
- pycsamt.map._core.resistivity_at_depth(data, depth)[source]
Per-station resistivity on a horizontal slice at
depth(m below the surface), read from the precomputed inversion sections indata.metadata["sections"].Each station column is linearly interpolated in depth; a query outside a column’s own sampled range returns no entry for that station (never a fabricated value). Returns
{}when the survey has no inversion result.