2.6.3.2. pycsamt.emtf.converters.spectra#
FCU-compatible recovery of EMTFs from historical EDI SPECTRA.
The SEG SPECTRA section stores a Hermitian cross-power matrix at each
frequency. EMTF FCU uses those matrices to recover the transfer functions and
the two covariance factors required for statistically correct rotation. This
module implements the same single-station and remote-reference equations while
keeping parsing in pycsamt.seg.spectra and rotation in
pycsamt.emtf.orientation.
Functions
|
Recover Z/T and full covariance from an EDI SPECTRA container. |
|
Resolve FCU local/remote channel roles from SPECTRA channel order. |
|
Convert EDI SPECTRA to the format-neutral EMTF scientific model. |
Classes
|
Resolved local, remote, and output channel indices. |
|
Numerical result of one FCU-compatible SPECTRA recovery. |
Exceptions
Warning emitted for recoverable SPECTRA covariance issues. |
|
Raised when an exact EDI SPECTRA recovery cannot be performed. |
- exception pycsamt.emtf.converters.spectra.SpectraCovarianceWarning[source]
Bases:
UserWarningWarning emitted for recoverable SPECTRA covariance issues.
- exception pycsamt.emtf.converters.spectra.SpectraRecoveryError[source]
Bases:
EdIDataErrorRaised when an exact EDI SPECTRA recovery cannot be performed.
- class pycsamt.emtf.converters.spectra.SpectraChannelMap(hx, hy, ex, ey, hz=None, rx=None, ry=None, channel_types=())[source]
Bases:
objectResolved local, remote, and output channel indices.
- Parameters:
- hx: int
- hy: int
- ex: int
- ey: int
- class pycsamt.emtf.converters.spectra.SpectraRecoveryResult(frequency, periods, transfer_functions, channel_map, used_indices, skipped_indices, avgt, rotspec, combined_residual_covariance=None, combined_output_channels=())[source]
Bases:
objectNumerical result of one FCU-compatible SPECTRA recovery.
- Parameters:
- frequency: ndarray
- periods: ndarray
- transfer_functions: dict[str, TransferFunction]
- channel_map: SpectraChannelMap
- used_indices: ndarray
- skipped_indices: ndarray
- avgt: ndarray
- rotspec: ndarray
- property impedance: TransferFunction[source]
- property tipper: TransferFunction | None[source]
- pycsamt.emtf.converters.spectra.resolve_spectra_channels(spectra)[source]
Resolve FCU local/remote channel roles from SPECTRA channel order.
Historical files commonly encode remote H channels as a second
HX/HYpair. ExplicitRX/RYorRHX/RHYlabels are also accepted. When no remote pair is present, the localHX/HYpair is reused exactly as FCU does for a single-station analysis.- Parameters:
spectra (Any)
- Return type:
- pycsamt.emtf.converters.spectra.recover_spectra_transfer_functions(spectra, *, nfreq_policy='raise', missing_policy='raise', avgt_policy='raise')[source]
Recover Z/T and full covariance from an EDI SPECTRA container.
The implementation mirrors EMTF FCU’s
read_edi_spectraequations. It intentionally does not rotate the spectra or the recovered TFs; Phase 7’s EMTF rotation engine performs any requested coordinate transformation.- Parameters:
- Return type:
- pycsamt.emtf.converters.spectra.spectra_to_emtf(source, *, spectra=None, nfreq_policy='raise', missing_policy='raise', avgt_policy='raise', target_angle=None)[source]
Convert EDI SPECTRA to the format-neutral EMTF scientific model.
If
target_angleis supplied, the recovered full-covariance TFs are passed to the Phase-7 rotation engine; no spectra-specific rotation code is used here.