kurtosis

function of dascore.transform.kurtosis source

kurtosis(
    patch: Patch ,
    samples: bool = False,
    recursive: bool = True,
    **kwargs ,
)-> ‘PatchType’

Compute kurtosis along a patch dimension.

Seismic arrivals are more impulsive than approximately Gaussian background noise, so their windowed amplitude distribution has higher kurtosis. This makes kurtosis useful for detecting arrivals, especially P-wave onsets.

Parameters

Parameter Description
patch Input DASCore patch.
samples If True, the values in kwargs and step represent samples along a
dimension. Must be integers. Otherwise, values are assumed to have
same units as the specified dimension, or have units attached.
recursive Use the recursive pseudo-kurtosis of Langet et al. (2014), an exponentially
weighted estimator that avoids storing sliding windows. False computes
ordinary windowed kurtosis.
**kwargs Dimension and window length, such as time=0.5 or
distance=10 * dascore.units.m.

Returns

PatchType A new patch with kurtosis traces.

Examples

import dascore as dc
import numpy as np
patch = dc.get_example_patch("example_event_2")
kurtosis = patch.kurtosis(time=0.002)
_ = kurtosis.viz.waterfall(cmap="inferno")

# Amplify a block of Gaussian noise to create an impulsive onset.
rng = np.random.default_rng()
data = rng.normal(size=patch.shape)
data[:, 300:450] *= 3
synthetic = patch.update(data=data)
onset = synthetic.kurtosis(time=0.002)

References

Langet, Nadège, Alessia Maggi, Alberto Michelini, and Florent Brenguier. 2014. Continuous Kurtosis-Based Migration for Seismic Event Detection and Location, with Application to Piton de la Fournaise Volcano, La Réunion.” Bulletin of the Seismological Society of America, 229–46. https://doi.org/10.1785/0120130107.