import dascore as dc
p = dc.examples.example_event_2()
s = p.envelope(dim="time").stalta(time=(0.002, 0.01))
s.viz.waterfall( # doctest: +SKIP
cmap="RdGy_r", scale=[0, 2], scale_type="absolute"
);
| function of dascore.transform.stalta | source |
stalta(
patch: Patch ,
samples: bool = False,
**kwargs ,
)-> ‘PatchType’
Compute the short-term / long-term average (STA/LTA) ratio along a patch dimension.
| Parameter | Description |
|---|---|
| patch : | The input DASCore patch. |
| samples | If True, values specified by kwargs are in samples not coordinate units. |
| **kwargs |
Used to pass one dimension name and the short/long-term window lengths. For example time=(0.1, 0.5) uses windows of 0.1 and 0.5 seconds alongthe time axis. |
PatchType A new patch containing the STA/LTA ratio.
A good first guess is to choose the long-term window 5x the length of the short-term window.