By default, this method uses the "classic_LR" algorithm which calculates the average power in the Trace
data over a short window (STA) and a long window (LTA). With this algorithm, windows are "left/right aligned" meaning
that the point for which STA/LTA is calculated is at the lefttmost edge of the STA window
and the rightmost edge of the LTA window.
The resulting STA/LTA ratio thus has the same number of points as the original data. This is a standard method
of "first break picking" and can be used to identify the onset of a seismic event.
Three different algorithms are currently available:
1) algorithm="classic_RR"
This is the original STA/LTA algorithm with "right alignment".
$$ STA(x_i) = \frac{1}{ns}\sum_{j=i-ns}^{i}{x_i^2} $$
$$ LTA(x_i) = \frac{1}{nl}\sum_{j=i-nl}^{i}{x_i^2} $$
$$ r_i = \frac{STA_i}{LTA_i} $$
[---------- LTA ---------*]
[-- STA -*]
2) algorithm="classic_LR"
(default) This algorithm has the index at the left edge of the STA window
and the right edge of the LTA window
$$ STA(x_i) = \frac{1}{ns}\sum_{j=i}^{i+ns}{x_i^2} $$
$$ LTA(x_i) = \frac{1}{nl}\sum_{j=i-nl}^{i}{x_i^2} $$
$$ r_i = \frac{STA_i}{LTA_i} $$
[---------- LTA --------*]
[*- STA --]
3) algorithm="EarleAndShearer_envelope"
$$ STA(x_i) = \frac{1}{ns} \sum_{j=i}^{i+ns}{Mod(H(x))_i} $$
$$ LTA(x_i)= \frac{1}{nl} \sum_{j=i-nl}^{i}{Mod(H(x))_i} $$
$$ r_i = \frac{STA_i}{LTA_i} $$
[---------- LTA ---------*]
[*- STA --]
where \(H(x)\) is the Hilbert transform of the data and \(Mod(H(x))\) is the 'envelope' of the seismic signal.
Note that because the Hilbert transform involves performing an FFT of the data it can take significantly longer
than the "classic" algorithms for longer seismic signals (>500K pts).