2.7.7.1. pycsamt.airborne.ztem#
ZTEM scientific adapter contract.
The module maps decoded ZTEM tipper values into the existing EMTF T
transfer function and common airborne containers. It intentionally does not
invent a proprietary native file reader.
- class pycsamt.airborne.ztem.ZTEMSystemSpec(practical_frequency_range_hz=(22.0, 720.0), common_processed_bands_hz=((30.0, 720.0), (25.0, 600.0)), typical_frequency_count=(5, 6), time_series_sampling_rate_hz=2000.0, nominal_output_rate_hz=2.5, input_channels=('Hx', 'Hy'), output_channels=('Hz', ), attrs=<factory>)
Bases:
CoreObjectPublished/declared ZTEM system characteristics.
The values are informative defaults. ZTEM frequency selection depends on platform speed, sampling, signal strength, and noise, so processed survey products may legitimately use a different subset or frequency grid; nothing here constrains
build_ztem_emtf()’s accepted input.- Parameters:
practical_frequency_range_hz ((float, float), optional) – Published practical frequency band in Hz,
(low, high)with0 < low < high. Seepractical_frequency_mask().common_processed_bands_hz (tuple of (float, float), optional) – Commonly published processed sub-bands in Hz; each validated the same way as practical_frequency_range_hz.
typical_frequency_count ((int, int), optional) – Typical minimum/maximum count of processed frequency windows,
(low, high)with0 < low <= high.time_series_sampling_rate_hz (float, optional) – Published raw time-series sampling rate in Hz.
nominal_output_rate_hz (float, optional) – Published processed-output rate in Hz.
input_channels ((str, str), default ("Hx", "Hy")) – Fixed ground-reference horizontal magnetic input channels; must equal
("Hx", "Hy").output_channels ((str,), default ("Hz",)) – Fixed airborne vertical magnetic output channel; must equal
("Hz",).attrs (dict, optional) – Free-form extension metadata.
- Raises:
ValueError – If any frequency range/band/count is not finite and correctly ordered, if any rate is not finite and positive, or if input_channels/output_channels differ from their fixed values.
- time_series_sampling_rate_hz: float = 2000.0
- nominal_output_rate_hz: float = 2.5
- validate()
Normalize and range-check every descriptive field in place.
- Return type:
None
- practical_frequency_mask(frequency)
Return a mask for values inside the published practical band.
- to_instrument_meta(*, serial=None, software_version='')
Return reusable instrument metadata without vendor guesses.
Only a
magnetic_sensoris populated –electric_sensorstaysNonebecause ZTEM’s tipper geometry has no electric channel, unlike MobileMT’s admittance (seeto_instrument_meta()).- Parameters:
- Return type:
- class pycsamt.airborne.ztem.ZTEMReferenceStation(station_id=None, site=None, magnetic_channels=('Hx', 'Hy'), attrs=<factory>)
Bases:
CoreObjectFixed ground magnetic reference station used by ZTEM processing.
Passed to
build_ztem_emtf()to populateprocessing’s remote-reference metadata; see_processing_for_reference().- Parameters:
station_id (str, optional) – Explicit reference-station identifier. Falls back to
site.preferred_namethroughpreferred_idwhen omitted; seenormalize_optional_identifier().site (SiteMeta, optional) – Reference-station location/identity metadata.
magnetic_channels ((str, str), default ("Hx", "Hy")) – Fixed horizontal magnetic channels measured at the reference station; must equal
("Hx", "Hy").attrs (dict, optional) – Free-form extension metadata.
- Raises:
ValueError – If magnetic_channels differs from
("Hx", "Hy").
- validate()
Normalize the identifier/channels and type-check
site.- Return type:
None
- exception pycsamt.airborne.ztem.ZTEMValidationError
Bases:
ValueErrorRaised when decoded ZTEM scientific arrays are inconsistent.
- pycsamt.airborne.ztem.validate_ztem_transfer_function(tf)
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.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)
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.build_ztem_record(sample_id, tipper, *, frequency=None, periods=None, fields=None, quality=None, record_attrs=None, **emtf_kwargs)
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.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)
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.build_ztem_dataset(name, lines, *, survey=None, system_spec=None, instrument_serial=None, software_version='', attrs=None)
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.