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. |
|
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:
- class pycsamt.map._core.ProfileLine(name, stations=())[source]#
Bases:
objectA named sequence of stations in one profile.
- Parameters:
name (str)
stations (tuple[StationRecord, ...])
- 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, ...])
- stations: tuple[StationRecord, ...] = ()#
- profiles: tuple[ProfileLine, ...] = ()#
- class pycsamt.map._core.ComponentSpec(name, indices=None, mode='tensor')[source]#
Bases:
objectParsed impedance component request.
- class pycsamt.map._core.FrequencySelection(requested, actual, index, delta, relative_delta, within_tolerance=True)[source]#
Bases:
objectNearest-frequency selection metadata.
- Parameters:
- class pycsamt.map._core.FrequencyValue(station, value, selection)[source]#
Bases:
objectStation value and selected-frequency metadata.
- Parameters:
station (str)
value (float)
selection (FrequencySelection)
- 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.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.select_frequency(frequencies, requested=None, *, tolerance=None)[source]#
Select the closest finite positive frequency.
- Parameters:
- Return type:
FrequencySelection | None
- 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.