obspy.signal.cpxtrace.centroid

centroid(data, fk)[source]

Centroid time of a signal.

Computes the centroid time of the given data which can be windowed or not. The centroid time is determined as the time in the processed window where 50 per cent of the area below the envelope is reached.

The time derivative of the centroid time is returned if input data are windowed only.

Parameters:
  • data (ndarray) Data to determine centroid time of.
  • fk Coefficients for calculating time derivatives (calculated via central difference).
Returns:

centroid[, dcentroid] - Centroid time input data, Time derivative of centroid time (windowed only).