Skip to content

Commit

Permalink
Merge pull request #281 from rmodrak/master
Browse files Browse the repository at this point in the history
graphics/waveforms.py refactoring
  • Loading branch information
rmodrak authored Jan 17, 2025
2 parents 6c8ea2d + 0a3b876 commit 086dabc
Show file tree
Hide file tree
Showing 6 changed files with 409 additions and 489 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/python-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
python tests/test_grid_search_mt_depth.py --no_figures
python tests/test_greens_SPECFEM3D_SAC.py --no_figures
python tests/test_time_shifts.py --no_figures
- name: Graphics
run: |
python tests/test_graphics.py
# unfortunately, these Conda installation tests exceed the resource limits
# for GitHub workflows
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
# mtuq

[![Build Status](https://github.com/uafgeotools/mtuq/actions/workflows/python-app.yaml/badge.svg)](https://github.com/rmodrak/mtuq/blob/master/.github/workflows/python-app.yaml)
[![Build Status](https://github.com/mtuqorg/mtuq/actions/workflows/python-app.yaml/badge.svg)](https://github.com/rmodrak/mtuq/blob/master/.github/workflows/python-app.yaml)
[![SCOPED](https://img.shields.io/endpoint?url=https://runkit.io/wangyinz/scoped/branches/master/MTUQ)](https://github.com/SeisSCOPED/container/pkgs/container/MTUQ)

MTUQ provides *m*oment *t*ensor estimates and *u*ncertainty *q*uantification from broadband seismic data.


## Getting started

[Installation](https://uafgeotools.github.io/mtuq/install/index.html)
[Installation](https://mtuqorg.github.io/mtuq/install/index.html)

[Quick start](https://uafgeotools.github.io/mtuq/quick_start.html)
[Quick start](https://mtuqorg.github.io/mtuq/quick_start.html)



## Documentation

[Acquiring seismic data](https://uafgeotools.github.io/mtuq/user_guide/02.html)
[Acquiring seismic data](https://mtuqorg.github.io/mtuq/user_guide/02.html)

[Acquiring Green's functions](https://uafgeotools.github.io/mtuq/user_guide/03.html)
[Acquiring Green's functions](https://mtuqorg.github.io/mtuq/user_guide/03.html)

[Data processing](https://uafgeotools.github.io/mtuq/user_guide/04.html)
[Data processing](https://mtuqorg.github.io/mtuq/user_guide/04.html)

[Visualization galleries](https://uafgeotools.github.io/mtuq/user_guide/05.html)
[Visualization galleries](https://mtuqorg.github.io/mtuq/user_guide/05.html)

[Library reference](https://uafgeotools.github.io/mtuq/library/index.html)
[Library reference](https://mtuqorg.github.io/mtuq/library/index.html)


## Highlights

Common use cases include [double couple moment tensor](https://github.com/uafgeotools/mtuq/blob/master/examples/SerialGridSearch.DoubleCouple.py), [full moment tensor](https://github.com/uafgeotools/mtuq/blob/master/examples/GridSearch.FullMomentTensor.py), [depth](https://github.com/rmodrak/mtuq/blob/master/examples/GridSearch.DoubleCouple%2BMagnitude%2BDepth.py) and [hypocenter](https://github.com/rmodrak/mtuq/blob/master/examples/GridSearch.DoubleCouple%2BMagnitude%2BHypocenter.py) uncertainty analysis. Applications involving composite sources, force sources, constrained moment tensor sources, source-time functions, and other source parameters are also possible.
Common use cases include [double couple moment tensor](https://github.com/mtuqorg/mtuq/blob/master/examples/SerialGridSearch.DoubleCouple.py), [full moment tensor](https://github.com/mtuqorg/mtuq/blob/master/examples/GridSearch.FullMomentTensor.py), [depth](https://github.com/rmodrak/mtuq/blob/master/examples/GridSearch.DoubleCouple%2BMagnitude%2BDepth.py) and [hypocenter](https://github.com/rmodrak/mtuq/blob/master/examples/GridSearch.DoubleCouple%2BMagnitude%2BHypocenter.py) uncertainty analysis. Applications involving composite sources, force sources, constrained moment tensor sources, source-time functions, and other source parameters are also possible.


### Solver interfaces

[I/O functions](https://uafgeotools.github.io/mtuq/library/index.html#data-i-o)
[I/O functions](https://mtuqorg.github.io/mtuq/library/index.html#data-i-o)
are included for reading AxiSEM, SPECFEM3D, and FK Green's functions as well as
downloading Green's functions from remote [syngine](http://ds.iris.edu/ds/products/syngine/) databases.



### Misfit evaluation

Waveform difference and cross-correlation time-shift [misfit evaluation](https://uafgeotools.github.io/mtuq/library/index.html#data-processing-and-inversion)
Waveform difference and cross-correlation time-shift [misfit evaluation](https://mtuqorg.github.io/mtuq/library/index.html#data-processing-and-inversion)
on body-wave and surface-wave windows is implemented in C-accelerated Python.

These misfit functions can be used with [mtuq.grid_search](https://uafgeotools.github.io/mtuq/library/generated/mtuq.grid_search.grid_search.html), which automatically partitions the grid over multiple MPI processes if invoked from an MPI environment. For efficient and unbiased uncertainty quantification, [uniform grids](https://uafgeotools.github.io/mtuq/library/index.html#moment-tensor-and-force-grids) can be used for the grid search, drawing from [Tape2015](https://academic.oup.com/gji/article/202/3/2074/613765).
These misfit functions can be used with [mtuq.grid_search](https://mtuqorg.github.io/mtuq/library/generated/mtuq.grid_search.grid_search.html), which automatically partitions the grid over multiple MPI processes if invoked from an MPI environment. For efficient and unbiased uncertainty quantification, [uniform grids](https://mtuqorg.github.io/mtuq/library/index.html#moment-tensor-and-force-grids) can be used for the grid search, drawing from [Tape2015](https://academic.oup.com/gji/article/202/3/2074/613765).

Alternatively, MTUQ misfit functions can be used as a starting point for Bayesian uncertainty quantification using pymc or other MCMC libraries.


### Visualization

[Visualization utilities](https://uafgeotools.github.io/mtuq/user_guide/05/gallery_mt.html) are included for both the [eigenvalue lune](https://onlinelibrary.wiley.com/doi/10.1111/j.1365-246X.2012.05491.x) and [v,w rectangle](https://academic.oup.com/gji/article/202/3/2074/613765), with matplotlib and Generic Mapping Tools graphics backends.
[Visualization utilities](https://mtuqorg.github.io/mtuq/user_guide/05/gallery_mt.html) are included for both the [eigenvalue lune](https://onlinelibrary.wiley.com/doi/10.1111/j.1365-246X.2012.05491.x) and [v,w rectangle](https://academic.oup.com/gji/article/202/3/2074/613765), with matplotlib and Generic Mapping Tools graphics backends.


### Testing

The package has been tested against [legacy Perl/C codes](https://github.com/uafgeotools/mtuq/blob/master/tests/benchmark_cap_vs_mtuq.py) as well as [published studies](https://github.com/rmodrak/mtbench).
The package has been tested against [legacy Perl/C codes](https://github.com/mtuqorg/mtuq/blob/master/tests/benchmark_cap_vs_mtuq.py) as well as [published studies](https://github.com/rmodrak/mtbench).



Expand Down
Loading

0 comments on commit 086dabc

Please sign in to comment.