pycsamt.interp.fusion#

Multi-method EM fusion — merge shallow and deep resistivity models.

Different EM methods sample different depth windows:

MultiMethodEMModel merges two ResistivityModel instances onto a unified depth grid. In the overlap zone where both methods have coverage, the two models are blended by one of three strategies:

  • 'linear' — linear weight ramp across the overlap (default)

  • 'sigmoid' — smooth S-curve transition (no depth kinks)

  • 'rms_weighted' — constant weights derived from each model’s RMS misfit

The fused ResistivityModel feeds directly into EMHydroModel.

Typical use (TDEM + AMT)#

>>> from pycsamt.interp.fusion import MultiMethodEMModel
>>> from pycsamt.interp.hydromodel import EMHydroModel, PetrophysicalConfig
>>>
>>> fused = MultiMethodEMModel(
...     primary=tdem_model,
...     secondary=amt_model,
...     blend='sigmoid',
... ).merge()
>>>
>>> result = EMHydroModel(fused, PetrophysicalConfig(), method_tag='TDEM+AMT').fit()

Classes

FusionDiagnostics(z_overlap_start, ...)

Metadata about a completed fusion operation.

MultiMethodEMModel(primary, secondary, *[, ...])

Fuse two EM resistivity models onto a single depth grid.

class pycsamt.interp.fusion.MultiMethodEMModel(primary, secondary, *, primary_max_depth=None, secondary_min_depth=None, blend='linear', blend_overlap=None, z_grid=None, sigmoid_k=0.02)[source]#

Bases: PyCSAMTObject

Fuse two EM resistivity models onto a single depth grid.

Parameters:
  • primary (ResistivityModel) – The model trusted at shallow depths (e.g. TDEM, EMAP).

  • secondary (ResistivityModel) – The model trusted at deeper depths (e.g. AMT, MT).

  • primary_max_depth (float, optional) – Override the primary model’s maximum contributing depth (m). Defaults to primary.z_centers[-1].

  • secondary_min_depth (float, optional) – Override the secondary model’s minimum contributing depth (m). Defaults to secondary.z_centers[0].

  • blend (str) –

    Blend strategy in the overlap zone:

    'linear' (default)

    Linear weight ramp from primary (top of overlap) to secondary (bottom of overlap).

    'sigmoid'

    Smooth S-curve parameterised by sigmoid_k. Avoids the slope discontinuity at the ends of the transition zone.

    'rms_weighted'

    Constant weights throughout: primary weight = rms_secondary / (rms_primary + rms_secondary). Requires both models to carry a valid rms value. Falls back to 'linear' if either RMS is nan.

  • blend_overlap (float, optional) – Restrict the blend transition to a window of this width (m) centred on the mid-point of the natural overlap zone. None uses the full overlap.

  • z_grid (ndarray, optional) – Explicit output depth-cell centres (m). Overrides the automatic union grid. Both models are interpolated onto this grid.

  • sigmoid_k (float) – Shape parameter for the sigmoid blend (m⁻¹; default 0.02, giving a smooth ~100 m transition for a 500 m overlap zone).

Variables:

diagnostics (FusionDiagnostics or None) – Set after merge() is called.

Examples

>>> fused_model = MultiMethodEMModel(
...     tdem_model, amt_model, blend='sigmoid', sigmoid_k=0.03
... ).merge()
>>> fused_model.method
'TDEM+AMT'
merge()[source]#

Produce the fused ResistivityModel.

Returns:

Unified model on the output depth grid. method is set to '<primary_method>+<secondary_method>' (e.g. 'TDEM+AMT').

Return type:

ResistivityModel

class pycsamt.interp.fusion.FusionDiagnostics(z_overlap_start, z_overlap_end, has_overlap, blend_mode, primary_method, secondary_method, primary_rms, secondary_rms, n_z_fused, blend_weights)[source]#

Bases: PyCSAMTObject

Metadata about a completed fusion operation.

Variables:
  • z_overlap_start (float) – Top of the depth zone where both methods contribute (m).

  • z_overlap_end (float) – Bottom of the overlap zone (m).

  • has_overlap (bool) – False if the two depth ranges are disjoint (simple concatenation).

  • blend_mode (str)

  • primary_method (str)

  • secondary_method (str)

  • primary_rms (float)

  • secondary_rms (float)

  • n_z_fused (int) – Total number of depth cells in the fused model.

  • blend_weights (ndarray (n_z,)) – Primary-model weight at each depth cell (1 = all primary, 0 = all secondary).

Parameters:
z_overlap_start: float#
z_overlap_end: float#
has_overlap: bool#
blend_mode: str#
primary_method: str#
secondary_method: str#
primary_rms: float#
secondary_rms: float#
n_z_fused: int#
blend_weights: ndarray#