trigger

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AICPick

func AICPick(data []float64, start, end int) (int, error)

AICPick returns the minimum finite AIC sample in [start, end). It is useful for narrowing an arrival search after a coarse trigger has found a window.

func AICSimple

func AICSimple(data []float64) []float64

AICSimple calculates Maeda's sample-wise Akaike Information Criterion. The final value is repeated so the output has the same length as input.

func ARCoefficients

func ARCoefficients(data []float64, order int) ([]float64, error)

ARCoefficients estimates autoregressive coefficients using ordinary least squares. The model is x[t] = c[0]x[t-1] + ... + c[p-1]x[t-p].

func ARPick

func ARPick(vertical, north, east []float64, sampleRate, lowFrequency, highFrequency, ltaP, staP, ltaS, staS float64, orderP, orderS int, varianceP, varianceS float64, pickS bool) (pTime, sTime float64, err error)

ARPick returns P and optionally S arrival times in seconds using the ObsPy/ Akazawa AR-AIC and STA/LTA workflow. varianceP and varianceS are the P/S variance-window lengths in seconds, corresponding to ObsPy l_p/l_s.

func ARResidual

func ARResidual(data, coefficients []float64) []float64

ARResidual returns absolute one-step prediction errors for an AR model.

func CarlStaTrig

func CarlStaTrig(a []float64, nsta, nlta int, ratio, quiet float64) []float64

Computes the carlSTAtrig characteristic function. Translated from Obspy. https://docs.obspy.org/tutorial/code_snippets/trigger_tutorial.html#carl-sta-trig

func ClassicStaLta

func ClassicStaLta(a []float64, nsta, nlta int) []float64

Computes the standard STA/LTA from a given input array a. The length of the STA is given by nsta in samples, respectively is the length of the LTA given by nlta in samples. Translated from Obspy. https://docs.obspy.org/tutorial/code_snippets/trigger_tutorial.html#classic-sta-lta

func DelayedStaLta

func DelayedStaLta(a []float64, nsta, nlta int) []float64

Delayed STA/LTA. Translated from Obspy. https://docs.obspy.org/tutorial/code_snippets/trigger_tutorial.html#delayed-sta-lta

func EnergyRatio

func EnergyRatio(data []float64, nsta, nlta int) ([]float64, error)

EnergyRatio returns a short-window to long-window mean-square ratio. The initial long-window samples are zeroed because no stable LTA exists yet.

func KurtosisCharacteristic

func KurtosisCharacteristic(data []float64, window int) ([]float64, error)

KurtosisCharacteristic computes excess kurtosis over a trailing window. It is useful for impulsive arrivals and is zero until a complete window is available.

func RecursiveStaLta

func RecursiveStaLta(a []float64, nsta, nlta int) []float64

Recursive STA/LTA, translated from Obspy. https://docs.obspy.org/tutorial/code_snippets/trigger_tutorial.html#recursive-sta-lta

func TriggerOnset

func TriggerOnset(charfct []float64, thres1, thres2 float64, maxLen int, maxLenDelete bool) [][]int

func ZDetect

func ZDetect(a []float64, nsta int) []float64

Z-detector. Translated from Obspy. https://docs.obspy.org/tutorial/code_snippets/trigger_tutorial.html#z-detect

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL