obspy.signal.cross_correlation.xcorr_3c

xcorr_3c(st1, st2, shift_len, components=['Z', 'N', 'E'], full_xcorr=False, abs_max=True)[source]

Calculates the cross correlation on each of the specified components separately, stacks them together and estimates the maximum and shift of maximum on the stack.

Basically the same as ~obspy.signal.cross_correlation.correlate but for (normally) three components, please also take a look at the documentation of that function. Useful e.g. for estimation of waveform similarity on a three component seismogram.

Parameters:
  • st1 (Stream) – Stream 1, containing one trace for Z, N, E component (other component_id codes are ignored)

  • st2 (Stream) – Stream 2, containing one trace for Z, N, E component (other component_id codes are ignored)

  • shift_len (int) – Total length of samples to shift for cross correlation.

  • components (list[str]) – List of components to use in cross-correlation, defaults to ['Z', 'N', 'E'].

  • full_xcorr (bool) – If True, the complete xcorr function will be returned as ndarray.

  • abs_max (bool) – shift will be calculated for maximum or absolute maximum.

Returns:

index, value[, fct] - index of maximum xcorr value and the value itself. The complete xcorr function is returned only if full_xcorr=True.