Skip to main content

A Python interface for HypoInverse earthquake relocation software

Project description

HypoInvPy

A Python interface for HypoInverse earthquake relocation software

This package is not intended to show documentation of how to use hypoinverse. Instead, we focus on buiding an user-friendly Python interface to run hypoinverse. For detailed documentation of hypoinverse, please read the documentation for hypoinverse in hyp1.40/doc/hyp1.40.pdf. The documentation for this interface package is in doc/HypoInvPy_manual.pdf.

Credit note

The codes and workflow in this package are modified and simplified from Hypo-Interface-Py (https://github.com/YijianZhou/Hypo-Interface-Py). The hypoinverse version is 1.4 and can be downloaded from USGS (https://www.usgs.gov/software/hypoinverse-earthquake-location).

Installation

  1. Create and activate a Python virtual environment hypoinv. This is optional but recommended. This will help isolate the computational needs from other packages. This will also help avoid version incompatibility in case new packages for some codes are updated in the base conda environment. However, since HypoInvPy doesn't currently need complicated packages, running under the base environment may just work fine.
$ conda create -n hypoinv -c conda-forge jupyter numpy scipy pandas python cartopy obspy mpi4py

Then, activate the environment with: $ conda activate hypoinv

  1. Clone the github repository, in terminal under the desired directory:
$ git clone https://github.com/xtyangpsp/HypoInvPy.git
  1. cd to the repository folder in terminal and install the package with the parameters in setup.py.
$ pip install .
  1. Create jupyter notebook kernel with the environment (after activating the environment).
$ pip install --user ipykernel
$ python -m ipykernel install --user --name=hypoinv

Run the hypoinverse example:

  1. Make sure hypo1.40 has been installed on your computer. Download the version from the USGS website (https://www.usgs.gov/software/hypoinverse-earthquake-location). For your convinience, a copy of the hyp1.40 codes is available under folder hyp1.40.
  2. In terminal under the example directory, run the jupyter notebook HypoInvPy_run_example.ipynb
  3. The output directory includes the resultant earthquake catalogs.

Upcoming changes:

  • Add visualization functionalities, e.g., earthquake locations and depth distribution and temporal sequence, etc.

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

hypoinvpy-0.5.0.tar.gz (6.3 MB view details)

Uploaded Source

File details

Details for the file hypoinvpy-0.5.0.tar.gz.

File metadata

  • Download URL: hypoinvpy-0.5.0.tar.gz
  • Upload date:
  • Size: 6.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for hypoinvpy-0.5.0.tar.gz
Algorithm Hash digest
SHA256 b14f949ddbe0870f4823bccb120f6dcea3712fe34e6293e15bb22f045e9be9ef
MD5 85fa9703a89ac228611af043b3197a87
BLAKE2b-256 d5303048ea70b17dd16823877c488333ac44722a48c8165158c9a49ffb767029

See more details on using hashes here.

Supported by

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