obspy.signal.trigger.energy_ratio

energy_ratio(a, nsta)[source]

Energy ratio detector.

Energy ratio defined as

\[\text{er}(i) = \frac{\sum_{j=i}^{i+L}{a_j^2}}{\sum_{j=i-L}^{i}{a_j^2}}\]

where \(L\) is nsta.

Parameters:
  • a (NumPy ndarray) – Seismic Trace

  • nsta (int) – Length of the energy ratio window in samples. It’s the same length as nsta in the classical STA/LTA methods.

Return type:

NumPy ndarray

Returns:

Energy Ratio

See also

[Han2009]