Skip to main content

A small package of useful geophysics utilities

Project description

Tectonic Utils

A simple library with utility functions for "everyday use" in active tectonics research. There are geodesy and seismology utility functions in Python, some originally from libraries in Matlab or other languages. There are read-write functions to access commonly used formats. Please explore and let me know if you'd like to contribute!

Functions in this library that I use regularly:

  • Haversine formula
  • Euler Pole rotations
  • Geographic to XYZ Earth-centered coordinates
  • InSAR look vectors (Fialko et al., 2001)
  • Fault vector operations (Aki and Richards, 1980)
  • Moment magnitude conversions (Hanks and Kanamori, 1979)
  • Earthquake magnitude scaling (Wells and Coppersmith, 1994)
  • Reading GMT multi-segment files into Python

cover

Dependencies

  • Python 3
  • numpy
  • scipy
  • netCDF4 (pip install netCDF4)

Installation

On Unix (other systems not tested yet), install from PyPI using:

pip install Tectonic-Utils

To test that it works, import a utility in Python. I use an import structure like:

$ python
>>> from Tectonic_Utils.geodesy import haversine

Documentation

The preliminary sphinx html docs can be found here: https://kmaterna.github.io/Tectonic_Utils/index.html

Additional Thoughts

I wrote this library for my own research because (in theory) putting all my Python utility functions into one unit-tested repository reduces bugs, increases code reproducibility, and allows for faster experimentation. The library is open source and available on Pip in case it would help others too.

Disclaimer: Completely bug-free code can never be guaranteed. As things come up, I occasionally fix and update the package Pip.

If you're using this package and you'd like to contribute or you find bugs, please let me know!

References

  • Aki, K., and P. G. Richards (1980), Quantitative Seismology: Theory and Methods, W. H. Freeman, New York.
  • Fialko, Y., Simons, M., & Agnew, D. (2001). The complete (3-D) surface displacement field in the epicentral area of the 1999 Mw7.1 Hector Mine earthquake, California, from space geodetic observations. Geophysical Research Letters, 28(16), 3063–3066.
  • Hanks, T., & Kanamori, H. (1979). A moment magnitude scale. Journal of Geophysical Research, 84(B5), 2348–2350.
  • Wells, D. L., & Coppersmith, K. J. (1994). New Empirical Relationships among Magnitude, Rupture Length, Rupture Width, Rupture Area, and Surface Displacement. Bulletin of the Seismological Society of America, 84(4), 974–1002.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Tectonic_Utils-0.0.9.tar.gz (34.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

Tectonic_Utils-0.0.9-py3.9.egg (88.7 kB view details)

Uploaded Egg

Tectonic_Utils-0.0.9-py3-none-any.whl (39.7 kB view details)

Uploaded Python 3

File details

Details for the file Tectonic_Utils-0.0.9.tar.gz.

File metadata

  • Download URL: Tectonic_Utils-0.0.9.tar.gz
  • Upload date:
  • Size: 34.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for Tectonic_Utils-0.0.9.tar.gz
Algorithm Hash digest
SHA256 07e160078078036d3c6ee8c05ce082eaa6d0dcc7387541f5db9772714035e1ae
MD5 6820a897a9fa70c9be33159596336e39
BLAKE2b-256 59397fd813107820c376377e85a5ffb85ad1559b1e6f2072d5310492f46db3a9

See more details on using hashes here.

File details

Details for the file Tectonic_Utils-0.0.9-py3.9.egg.

File metadata

  • Download URL: Tectonic_Utils-0.0.9-py3.9.egg
  • Upload date:
  • Size: 88.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.9.13

File hashes

Hashes for Tectonic_Utils-0.0.9-py3.9.egg
Algorithm Hash digest
SHA256 783b51737d7978997aaa9b8c64a2f5b354234cb2ccc115ac5108ce0270bd6626
MD5 6ff720987506fc131b1ce87949fe4f71
BLAKE2b-256 91b98f7c5d93b41849c8b28c97cd6b6eba4a448135ff1394fb199c376720a554

See more details on using hashes here.

File details

Details for the file Tectonic_Utils-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: Tectonic_Utils-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 39.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for Tectonic_Utils-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 111e434d5e598bd6185fe1ba01d12e553de64c16890d18da2e9529f663e4aeb1
MD5 b0b46c1f51688650981fa0401a917015
BLAKE2b-256 b0961e3e555da67544c50a4f8886d614f351361704ca808415ff3869f3e1628f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page