Efficient implementatins of the Konno Omachi filter in Python
Konno Omachi filter implemented in Cython.
This code implements Konno-Ohmachi spectral smoothing as defined in:
Konno, K. and Ohmachi, T., 1998. Ground-motion characteristics estimated from spectral ratio between horizontal and vertical components of microtremor. Bulletin of the Seismological Society of America, 88(1), pp.228-241.
This code was originally written for smoothing sub-module in gmprocess by Bruce Worden. Dave Boore has provided notes on this topic, which also may be of interest. Notes regarding the characteristics of the Konno-Ohmachi filter and the implementation are provided in the implementation Jupyter Notebook.
pykoom is available via pip and can be installed with:
pip install pykoom
By default, pykoom uses numba for the fast implementation of the filter. Performance can be increased by using cython, but this requires a C complier. If a C compiler is available, install cython required dependencies with:
pip install pykoom[cython]
Smooth a signal using a bandwith of 30.
import pykoom signal_smooth = pykoom.smooth(freqs, freqs_raw, signal_raw, 30)
Additional examples and comparison with obspy are provided in example.
Please cite this software using the following DOI.
- Rename to pykoom
- Add support for numba
- Make cython an optonal dependency
- Packaging is hard. MANIFEST is fixed now.
- Added History to MANIFEST.
- Updated badges.
- Added tests for example and implemenation notebooks.
- Moved Cython to a setup_requires
- Fixed packaging issue
- Added calculation of effective amplitude spectrum
- Initial release
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size pykoom-0.3.0.tar.gz (6.1 kB)||File type Source||Python version None||Upload date||Hashes View hashes|