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

induction_multiperiod_map_smart(sites)

plot_induction_multiperiod_map if tipper is present, else None.

induction_section_smart(sites)

plot_induction_section if tipper is present, else None.

phase_tensor_smart(sites)

plot_phase_tensor_psection if the data is multi-component, else None.

response_tipper_smart(sites)

plot_response_tipper if tipper is present, else None.

tipper_components_smart(sites)

plot_tipper_components if tipper is present, else None.

tipper_hodograms_smart(sites)

plot_tipper_hodograms if tipper is present, else None.

pycsamt.pipeline._smart_qc.phase_tensor_smart(sites)[source]

plot_phase_tensor_psection if 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.

Parameters:

sites (Any)

Return type:

Any

pycsamt.pipeline._smart_qc.induction_multiperiod_map_smart(sites)[source]

plot_induction_multiperiod_map if tipper is present, else None.

Parameters:

sites (Any)

Return type:

Any

pycsamt.pipeline._smart_qc.induction_section_smart(sites)[source]

plot_induction_section if tipper is present, else None.

Parameters:

sites (Any)

Return type:

Any

pycsamt.pipeline._smart_qc.response_tipper_smart(sites)[source]

plot_response_tipper if tipper is present, else None.

Parameters:

sites (Any)

Return type:

Any

pycsamt.pipeline._smart_qc.tipper_components_smart(sites)[source]

plot_tipper_components if tipper is present, else None.

Parameters:

sites (Any)

Return type:

Any

pycsamt.pipeline._smart_qc.tipper_hodograms_smart(sites)[source]

plot_tipper_hodograms if tipper is present, else None.

Parameters:

sites (Any)

Return type:

Any