Library reference

Warning

MTUQ is still in under development. Some documentation may be incomplete or describe planned rather than current functionality.

Seismic data structures

mtuq.Dataset

Container for observed or synthetic seismic data

mtuq.GreenTensor

Green’s tensor object

mtuq.GreenTensorList

Container for Green’s tensor objects

Data I/O

mtuq.download_greens_tensors

Downloads Green’s tensors from syngine

mtuq.open_db

Opens Green’s tensor database from disk

mtuq.open_ds

Opens grid search results from disk

mtuq.read

Reads seismic data from disk

Data processing and inversion

mtuq.ProcessData

Data processing function constructor

mtuq.PolarityMisfit

Polarity misfit function constructor

mtuq.WaveformMisfit

Waveform misfit function constructor

mtuq.grid_search

Evaluates misfit over grids

mtuq.MTUQDataArray

Data structure for storing misfit on regularly-spaced grids

mtuq.MTUQDataFrame

Data structure for storing misfit on irregularly-spaced grids

Station and event structures

mtuq.Station

Station metdata object

mtuq.Origin

Origin metdata object

mtuq.Wavelet

Source wavelet or source-time function object

mtuq.Force

Force source

mtuq.MomentTensor

Moment tensor source

Data visualization

mtuq.graphics.plot_waveforms1

Plots surface waves only

mtuq.graphics.plot_waveforms2

Plots body and surface waves

mtuq.graphics.plot_data_greens1

Variation on plot_waveforms1

mtuq.graphics.plot_data_greens2

Variation on plot_waveforms2

mtuq.graphics.plot_beachball

Plots first-motion beachball

mtuq.graphics.plot_polarities

Plots first-motion data fit

Moment tensor and force visualization

mtuq.graphics.plot_likelihood_lune

Plots maximum likelihoods on lune

mtuq.graphics.plot_marginal_lune

Plots marginal likelihoods on lune

mtuq.graphics.plot_misfit_lune

Plots misfit on lune

mtuq.graphics.plot_likelihood_vw

Plots maximum likelihoods on v,w rectangle

mtuq.graphics.plot_marginal_vw

Plots marginal likelihoods on v,w rectangle

mtuq.graphics.plot_misfit_vw

Plots misfit on v,w rectangle

mtuq.graphics.plot_likelihood_force

Plots maximum likelihoods w.r.t force orientation

mtuq.graphics.plot_marginal_force

Plots marginal likelihoods w.r.t. force orientation

mtuq.graphics.plot_misfit_force

Plots misfit w.r.t force orientation

Depth and hypocenter visualization

mtuq.graphics.plot_likelihood_depth

Plots maximum likelihoods versus depth

mtuq.graphics.plot_misfit_depth

Plots misfit versus depth

mtuq.graphics.plot_likelihood_latlon

Plots maximum likelihoods versus hypocenter

mtuq.graphics.plot_misfit_laton

Plots misfit versus hypocenter

Station attributes visualization

mtuq.graphics.plot_time_shifts

Plots time shifts by location and component

mtuq.graphics.plot_amplitude_ratios

Plots amplitude ratios by location and component

mtuq.graphics.plot_cross_corr

Plots normalized cross-correlation by location and component

Moment tensor and force grids

mtuq.grid.FullMomentTensorGridRandom

Grid with randomly-drawn full moment tensors

mtuq.grid.FullMomentTensorGridSemiregular

Grid with semiregularly-spaced full moment tensors

mtuq.grid.DoubleCoupleGridRandom

Grid with randomly-drawn double couples

mtuq.grid.DoubleCoupleGridRegular

Grid with regularly-spaced double couples

mtuq.grid.DeviatoricGridRandom

Grid with randomly-drawn deviatoric moment tensors

mtuq.grid.DeviatoricGridSemiregular

Grid with semiregularly-spaced deviatoric moment tensors

mtuq.grid.ForceGridRandom

Grid with randomly-drawn forces

mtuq.grid.ForceGridRegular

Grid with regularly-spaced forces

Grid base classes

Note

These base classes can be used for specialized uses cases not covered by the above grids

mtuq.grid.Grid

Grid defined by values on axes

mtuq.grid.UnstructuredGrid

Grid defined by lists of coordinates points

Database and web service clients

Note

These classes provide low-level database and web service access. Normally it is easier to use high-level functions mtuq.download_greens_tensors or mtuq.open_db instead.

mtuq.io.clients.AxiSEM_NetCDF.Client

AxiSEM NetCDF database client based on instaseis

mtuq.io.clients.FK_SAC.Client

FK database client

mtuq.io.clients.CPS_SAC.Client

CPS database client

mtuq.io.clients.SPECFEM3D_SGT.Client

SPECFEM3D/3D_GLOBE database client based on seisgen

mtuq.io.clients.syngine.Client

Syngine web service client

Low-level misfit modules

Note

Waveform misfit evaluation is the most computationally intensive task performed by this package. These classes provide low-level access to non-optimized and optimized versions of the misfit function (the former exists to check correctness of the latter). Normally users can avoid this complexity by simply calling mtuq.misfit.WaveformMisfit.

mtuq.misfit.waveform.level0.misfit

Easy-to-read pure Python implementation

mtuq.misfit.waveform.level1.misfit

Fast pure Python implementation

mtuq.misfit.waveform.level2.misfit

Fastest Python/C implementation