obspy.signal.konnoohmachismoothing.konnoOhmachiSmoothingWindow

konnoOhmachiSmoothingWindow(frequencies, center_frequency, bandwidth=40.0, normalize=False)[source]

Returns the Konno & Ohmachi Smoothing window for every frequency in frequencies.

Returns the smoothing window around the center frequency with one value per input frequency defined as follows (see [Konno1998]):

[sin(b * log_10(f/f_c)) / (b * log_10(f/f_c)]^4
b = bandwidth f = frequency f_c = center frequency

The bandwidth of the smoothing function is constant on a logarithmic scale. A small value will lead to a strong smoothing, while a large value of will lead to a low smoothing of the Fourier spectra. The default (and generally used) value for the bandwidth is 40. (From the Geopsy documentation - www.geopsy.org)

All parameters need to be positive. This is not checked due to performance reasons and therefore any negative parameters might have unexpected results.

This function might raise some numpy warnings due to divisions by zero and logarithms of zero. This is intentional and faster than prefiltering the special cases. You can disable numpy warnings (they usually do not show up anyways) with:

temp = np.geterr() np.seterr(all=’ignore’) ...code that raises numpy warning due to division by zero... np.seterr(**temp)

Parameters:
  • frequencies numpy.ndarray (float32 or float64) All frequencies for which the smoothing window will be returned.
  • center_frequency float >= 0.0 The frequency around which the smoothing is performed.
  • bandwidth float > 0.0 Determines the width of the smoothing peak. Lower values result in a broader peak. Defaults to 40.
  • normalize boolean, optional The Konno-Ohmachi smoothing window is normalized on a logarithmic scale. Set this parameter to True to normalize it on a normal scale. Default to False.

This Page