pick_stalta: Calculate stal-lta-ratio.

View source: R/pick_stalta.R

pick_staltaR Documentation

Calculate stal-lta-ratio.

Description

The function calculates the ratio of the short-term-average and long-term-average of the input signal.

Usage

pick_stalta(data, time, dt, sta, lta, freeze = FALSE, on, off)

Arguments

data

eseis object, numeric vector or list of objects, data set to be processed.

time

POSIXct vector, time vector of the signal(s). If not provided, a synthetic time vector will be created.

dt

Numeric value, sampling period. If omitted, either estimated from time or set to 0.01 s (i.e., f = 100 Hz).

sta

Numeric value, number of samples for short-term window.

lta

Numeric value, number of samples for long-term window.

freeze

Logical value, option to freeze lta value at start of an event. Useful to avoid self-adjustment of lta for long-duration events.

on

Numeric value, threshold value for event onset.

off

Numeric value, threshold value for event end.

Value

data frame, detected events (ID, start time, duration in seconds, STA-LTA vaue).

Author(s)

Michael Dietze

Examples


## load example data
data(rockfall)

## filter signal
rockfall_f <- signal_filter(data = rockfall_eseis,
                            f = c(1, 90), 
                            p = 0.05)
                    
## calculate signal envelope
rockfall_e <- signal_envelope(data = rockfall_f)

## pick earthquake and rockfall event
p <- pick_stalta(data = rockfall_e,
                 sta = 100, 
                 lta = 18000, 
                 freeze = TRUE, 
                 on = 5, 
                 off = 3)
                 
p$picks
                     

coffeemuggler/eseis documentation built on Aug. 19, 2023, 9:57 p.m.