2.7.7.2. pycsamt.airborne.ztem.adapter#
Array-to-scientific-object adapter contract for ZTEM products.
ZTEM is represented as the standard vertical magnetic transfer function (tipper), while acquisition geometry records that the airborne Hz output is referenced to fixed ground Hx/Hy measurements. No proprietary native file schema is assumed here.
Shape/frequency/mask normalization that is not specific to the ZTEM
tipper layout is delegated to pycsamt.airborne.validation
(shared with pycsamt.airborne.mobilemt and, once it moves onto
the same helpers, pycsamt.airborne.afmag) via its error_cls
parameter, so every ZTEMValidationError raised here still comes
from this module even though the check itself is not reimplemented
per technology.
Functions
|
Build a common airborne dataset from constructed ZTEM lines. |
|
Build one sample-level |
|
Build one ZTEM flight line from decoded sample-aligned arrays. |
|
Build one airborne record from decoded ZTEM tipper values. |
|
Validate and return a ZTEM 1x2 vertical magnetic tipper. |
Exceptions
|
Raised when decoded ZTEM scientific arrays are inconsistent. |
- exception pycsamt.airborne.ztem.adapter.ZTEMValidationError[source]
Bases:
ValueErrorRaised when decoded ZTEM scientific arrays are inconsistent.
- pycsamt.airborne.ztem.adapter.validate_ztem_transfer_function(tf)[source]
Validate and return a ZTEM 1x2 vertical magnetic tipper.
- Parameters:
tf (TransferFunction) – Transfer function to validate in place.
- Returns:
tf, unchanged, for convenient chaining after
add_transfer_function().- Return type:
- Raises:
TypeError – If tf is not a
TransferFunction.ZTEMValidationError – If tf does not use the standard EMTF
tipperdatatype withHx/Hyinputs,Hzoutput, and matrix shape(1, 2).
- pycsamt.airborne.ztem.adapter.build_ztem_emtf(tipper, *, frequency=None, periods=None, units='[]', variance=None, inverse_signal_covariance=None, residual_covariance=None, product_id=None, description=None, reference_station=None, system_spec=None, site=None, orientation=None, processing=None, attrs=None)[source]
Build one sample-level
EMTFZTEM response.- Parameters:
tipper (array-like) – Complex
(Tzx, Tzy)values with shape(nf, 2)or canonical EMTF shape(nf, 1, 2). A single(2,)vector is accepted.frequency (array-like, optional) – Exactly one positive frequency or period vector must be supplied.
periods (array-like, optional) – Exactly one positive frequency or period vector must be supplied.
variance (array-like, optional) – Component variance with shape
(nf, 1, 2).inverse_signal_covariance (array-like, optional) – Input covariance factor
Swith shape(nf, 2, 2).residual_covariance (array-like, optional) – Output residual covariance
Nwith shape(nf, 1, 1).units (str | None)
product_id (str | None)
description (str | None)
reference_station (ZTEMReferenceStation | None)
system_spec (ZTEMSystemSpec | None)
site (SiteMeta | None)
orientation (OrientationMeta | None)
processing (ProcessingMeta | None)
- Return type:
Notes
ZTEM reuses the standard EMTF tipper datatype. The technology-specific distinction is acquisition geometry: airborne
Hzis related to fixed ground-referenceHxandHy. No line-axis orientation is inferred.
- pycsamt.airborne.ztem.adapter.build_ztem_record(sample_id, tipper, *, frequency=None, periods=None, fields=None, quality=None, record_attrs=None, **emtf_kwargs)[source]
Build one airborne record from decoded ZTEM tipper values.
- Parameters:
sample_id (str) – Navigation sample identifier for the new record.
tipper (array-like) – Forwarded to
build_ztem_emtf().frequency (array-like, optional) – Exactly one must be supplied; forwarded to
build_ztem_emtf().periods (array-like, optional) – Exactly one must be supplied; forwarded to
build_ztem_emtf().fields (dict, optional) – Forwarded to
AirborneEMRecord.quality (dict, optional) – Forwarded to
AirborneEMRecord.record_attrs (dict, optional) – Forwarded to
AirborneEMRecord.**emtf_kwargs – Forwarded to
build_ztem_emtf().
- Returns:
The record, with its EMTF
product_iddefaulted tostr(sample_id)unless overridden inemtf_kwargs.- Return type:
- pycsamt.airborne.ztem.adapter.build_ztem_line(line_id, navigation, tipper, *, frequency, record_mask=None, variance=None, inverse_signal_covariance=None, residual_covariance=None, units='[]', reference_station=None, system_spec=None, orientation=None, attrs=None)[source]
Build one ZTEM flight line from decoded sample-aligned arrays.
- Parameters:
line_id (str) – Flight-line identifier.
navigation (NavigationTrack) – Sample-aligned navigation defining the line’s sample axis.
tipper (array-like) – Forwarded to
_sample_axis_tipper(); accepts the per-sample analogues of every shape_normalize_tipper()accepts for one sample.frequency (array-like) – Either one shared
(nf,)vector or a per-sample(n_samples, nf)grid; seeresolve_line_frequency_grid().record_mask (array-like of bool, optional) – Marks which navigation samples get an attached record;
Nonemeans every sample does. Samples excluded here never need a validtipper/frequencyrow – navigation points are never deleted to represent a rejected EM sample.variance (Any | None)
inverse_signal_covariance (Any | None)
residual_covariance (Any | None)
array-like – Per-sample statistical estimates, each shaped
(n_samples, nf, *tail)(or unbatched whenn_samples == 1); forwarded per sample tobuild_ztem_record().optional – Per-sample statistical estimates, each shaped
(n_samples, nf, *tail)(or unbatched whenn_samples == 1); forwarded per sample tobuild_ztem_record().units (str, optional) – Forwarded to
build_ztem_emtf()for every sample.reference_station (optional) – Forwarded to
build_ztem_emtf()for every sample.system_spec (optional) – Forwarded to
build_ztem_emtf()for every sample.orientation (optional) – Forwarded to
build_ztem_emtf()for every sample.attrs (dict, optional) – Line-level extension metadata;
"technology"and"reference_station"are set here unless already present.
- Returns:
The line, with one record per sample where
record_mask(or its default) isTrue.- Return type:
- Raises:
TypeError – If navigation is not a
NavigationTrack.ZTEMValidationError – If tipper, frequency, record_mask, or any statistical estimate does not match its expected shape.
- pycsamt.airborne.ztem.adapter.build_ztem_dataset(name, lines, *, survey=None, system_spec=None, instrument_serial=None, software_version='', attrs=None)[source]
Build a common airborne dataset from constructed ZTEM lines.
- Parameters:
name (str) – Dataset/survey name.
lines (iterable of AirborneEMLine, or mapping of str to AirborneEMLine) – Lines to attach, typically previously built by
build_ztem_line().survey (SurveyMeta, optional) – Survey-level metadata.
system_spec (ZTEMSystemSpec, optional) – Used to build the dataset’s
instrumentmetadata; defaults to published nominal values.instrument_serial (str, optional) – Forwarded to
ZTEMSystemSpec.to_instrument_meta().software_version (str, optional) – Forwarded to
ZTEMSystemSpec.to_instrument_meta().attrs (dict, optional) – Dataset-level extension metadata;
"technology"and"ztem_system"are set here unless already present.
- Returns:
The dataset, with every line attached via
add_line().- Return type:
- Raises:
TypeError – If survey, system_spec, or an entry of lines has the wrong type.
ZTEMValidationError – If a line is explicitly tagged with a different technology.