keurfonluu / disba

Numba-accelerated computation of surface wave dispersion

Home Page:https://github.com/keurfonluu/disba

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

disba

License Stars Pyversions Version Downloads Code style: black Codacy Badge Codecov Build Travis Awesome DOI

disba is a computationally efficient Python library for the modeling of surface wave dispersion that implements a subset of codes from Computer Programs in Seismology (CPS) in Python compiled just-in-time with numba. Such implementation alleviates the usual prerequisite for a Fortran compiler needed by other libraries also based on CPS (e.g., pysurf96, srfpython and PyLayeredModel) which often leads to further installation troubleshooting, especially on Windows platform.

disba aims to be lightweight and portable without compromising on the performance. For both Rayleigh-wave and Love-wave, it is significantly faster than CPS's surf96 program compiled with f2py, noticeably for large number of layers.

perf-rayleigh perf-love

Features

Forward modeling:

  • Compute Rayleigh-wave phase or group dispersion curves using Dunkin's matrix or fast delta matrix algorithms,
  • Compute Love-wave phase or group dispersion curves using Thomson-Haskell method,
  • Compute Rayleigh-wave ellipticity.

Eigenfunctions and sensitivity kernels:

  • Compute Rayleigh- and Love- wave eigenfunctions,
  • Compute Rayleigh- and Love- wave phase or group velocity, and Rayleigh-wave ellipticity sensitivity kernels with respect to layer thickness, P- and S- wave velocities, and density.

Installation

The recommended way to install disba and all its dependencies is through the Python Package Index:

Otherwise, clone and extract the package, then run from the package location:

To test the integrity of the installed package, check out this repository and run:

Documentation

Refer to the online documentation for detailed description of the API and examples.

Alternatively, the documentation can be built using Sphinx:

Usage

The following example computes the Rayleigh- and Love- wave phase velocity dispersion curves for the 3 first modes.

sample-rayleigh sample-love

Likewise, GroupDispersion can be used for group velocity.

disba's API is consistent across all its classes which are initialized and called in the same fashion. Thus, eigenfunctions are calculated as follow:

eigen-rayleigh eigen-love

Phase velocity sensitivity kernels (GroupSensitivity for group velocity):

kernel-rayleigh kernel-love

Ellipticity and ellipticity sensitivity kernels:

sample-ellipticity kernel-ellipticity

Contributing

Please refer to the Contributing Guidelines to see how you can help. This project is released with a Code of Conduct which you agree to abide by when contributing.

About

Numba-accelerated computation of surface wave dispersion

https://github.com/keurfonluu/disba

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%