2.27.2.9. pycsamt.pipeline._smart_qc#
Data-driven (“smart”) QC plot gating for method-aware presets.
A plain StepSpec QC hook is called as fn(sites)
only (see generate_qc_plots()) — there is no
channel to pass extra parameters through. The wrappers in this module use
that single-argument contract to decide, from the data itself, whether a
plot is actually meaningful before calling it:
Phase-tensor-ellipse plotting only makes sense once both off-diagonal impedance components (Zxy and Zyx) are populated on at least one station — a single-component TE/TM-only CSAMT line cannot produce a meaningful ellipse.
Tipper plots only make sense once a real (non-empty) vertical-field channel is present on at least one station — most AMT surveys carry none.
Each wrapper returns None when its precondition isn’t met.
generate_qc_plots() already treats a None
return as “skip this plot, no figure saved, no error” — the same mechanism
every other QC hook relies on — so no changes to the step-execution engine
were needed to support this.
The detection helpers below (_any_multicomponent, _any_tipper) reuse
the exact low-level idioms already used elsewhere in emtools for the
same checks (_get_z_block/direct Zxy·Zyx presence in
fieldzone.py/source_effects.py; _get_t_block in
strike.py/inspect.py), rather than the higher-level
SiteMixin.has_component/quality_flags API, so behaviour matches what
correct_near_field and plot_strike_analysis already consider
“present” on the exact same data.
Functions
|
|
|
|
|
|
|
|
|
|
|
|
- pycsamt.pipeline._smart_qc.phase_tensor_smart(sites)[source]
plot_phase_tensor_psectionif the data is multi-component, else None.A single-component TE/TM-only CSAMT line has only one off-diagonal Z component populated, so a phase-tensor ellipse cannot be constructed meaningfully — skip rather than draw a degenerate figure.
- pycsamt.pipeline._smart_qc.induction_multiperiod_map_smart(sites)[source]
plot_induction_multiperiod_mapif tipper is present, else None.
- pycsamt.pipeline._smart_qc.induction_section_smart(sites)[source]
plot_induction_sectionif tipper is present, else None.
- pycsamt.pipeline._smart_qc.response_tipper_smart(sites)[source]
plot_response_tipperif tipper is present, else None.
- pycsamt.pipeline._smart_qc.tipper_components_smart(sites)[source]
plot_tipper_componentsif tipper is present, else None.