Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Software for teleseismic body wave modeling through stacks of anisotropic layers

The structure of the Earth's crust and upper mantle gives useful information on the internal composition and dynamics of our planet. Some of the most widely used techniques to infer these properties are based on examining the effect of teleseismic body wave (i.e., P and S waves that originate from distant earthquakes and arrive as plane waves) propagation (e.g., transmission and scattering) through stratified media. Modeling the seismic response from stacks of subsurface layers is therefore an essential tool in characterizing their effect on observed seismograms.

This package contains python and fortran modules to synthesize teleseismic body-wave propagation through stacks of generally anisotropic and strictly horizontal layers using the matrix propagator approach of Kennett (1983), as implemented in Thomson (1997). The software also properly models reverberations from an overlying column of water using the R/T matrix expressions of Bostock and Trehu (2012), effectively simulating ocean-bottom seismic (OBS) station recordings. The software will be useful in a variety of teleseismic receiver-based studies, such as P or S receiver functions, long-period P-wave polarization, shear-wave splitting from core-refracted shear waves (i.e., SKS, SKKS), etc. It may also be the starting point for stochastic inverse methods (e.g., Monte Carlo sampling). The main part of the code is written in fortran with python wrappers. Common computational workflows are covered in the Jupyter notebooks bundled with this package.

JOSS paper DOI PyPI version tests codecov

Installation, Usage, API documentation and Jupyter Notebooks are described at


If you use Telewavesim in your work, please cite the Zenodo DOI and the following paper:

  • Audet, P., Thomson, C.J., Bostock, M.G., and Eulenfeld, T. (2019). Telewavesim: Python software for teleseismic body wave modeling. Journal of Open Source Software, 4(44), 1818,


All constructive contributions are welcome, e.g. bug reports, discussions or suggestions for new features. You can either open an issue on GitHub or make a pull request with your proposed changes. Before making a pull request, check if there is a corresponding issue opened and reference it in the pull request. If there isn't one, it is recommended to open one with your rationale for the change. New functionality or significant changes to the code that alter its behavior should come with corresponding tests and documentation. If you are new to contributing, you can open a work-in-progress pull request and have it iteratively reviewed.

Examples of straightforward contributions include adding more elastic constants or notebooks that describe published examples of teleseismic body-wave modeling. Suggestions for improvements (speed, accuracy, etc.) are also welcome.