seisgo.stacking

The stacking module provides a unified interface to multiple waveform stacking algorithms, from simple linear averaging to advanced phase-weighted and cluster-based methods.


Function Summary


Stacking Methods Reference

All methods are accessible via the unified seisgo.stacking.stack() wrapper.

Method name

Description

Key parameter(s)

linear

Arithmetic mean along the stack axis.

axis

pws

Phase-weighted stack. Applies a phase coherence weight in the time domain.

p (phase power, default 2)

tf-pws

Time-frequency phase-weighted stack using the Stockwell transform.

p

tfpws-dost

TF-PWS using the discrete orthonormal Stockwell transform (DOST).

p

robust

Iterative robust stack (Pavlis & Vernon 2010). Downweights incoherent traces.

epsilon, maxstep, win, ref

acf

Adaptive covariance filter (Nakata et al. 2015). Enhances coherent signal.

g

nroot

N-th root stack. Enhances coherence at the cost of amplitude fidelity.

p

selective

Correlation-based selective stack. Only includes traces above a coherence threshold.

cc_min, epsilon, maxstep, win, ref

cluster

Cluster-based stack. Groups traces by similarity and returns the dominant cluster.

h, win, normalize


Usage Examples

Unified wrapper

from seisgo import stacking
import numpy as np

# d: 2-D array, shape (n_traces, n_samples)
linear = stacking.stack(d, method="linear")
pws    = stacking.stack(d, method="pws",    par={"p": 2})
robust = stacking.stack(d, method="robust", par={"epsilon": 1e-5, "maxstep": 10})

Selective stack with custom reference

ref = np.median(d, axis=0)
sel = stacking.stack(d, method="selective",
                     par={"cc_min": 0.6, "ref": ref, "win": [100, 400]})

Returning stacking statistics

newstack, weights, n_iter = stacking.robust(d, stat=True)