fmagrini / seislib

Seismic imaging at local, regional, and global scale
https://seislib.readthedocs.io/en/latest/
MIT License
67 stars 17 forks source link
ambient-noise imaging inversion python seismology surface-waves teleseismic-earthquakes tomography

PyPI version Documentation Status

SeisLib is a Python package that allows for obtaining seismic images of the sub-surface from the local to the global scale. It is the result of a long-term effort of our team to make efficient and open source some of the Python codes behind our seismological publications over the last few years. The library is in rapid expansion and, at present, includes:

Seismic Ambient Noise Interferometry

Surface-Wave Tomography based on Teleseismic Earthquakes

Least-Squares Imaging of Lateral Variations in Surface-Wave Velocity

 

Documentation

For more information on SeisLib, make sure to visit our wiki page!

 

Installation

First, make sure you have all the dependencies installed, i.e., obspy, cartopy, and cython. We recommend installing such dependences using conda (see below). You will also need gcc or equivalent, to compile the cython parts of the library.

conda create -n seislib python=3.9 numpy=1.20
conda activate seislib
conda install -c conda-forge obspy
conda install -c conda-forge cartopy
conda install -c anaconda cython

Once the above dependences have been installed, you can proceed with the installation of seislib:

pip install seislib

If you run into troubles with the above, you can try the following approach:

git clone https://github.com/fmagrini/seislib.git
cd seislib/seislib/tomography/_ray_theory
python setup_all.py build_ext --inplace

The last command will compile the Cython files. If you work on an anaconda environment, you might need to replace "python" with, e.g., "/home/your_name/anaconda3/bin/python". (You can retrieve the path to your python executable by typing "import sys; print(sys.executable)" in your Python GUI. Make sure to then add ~/seislib to your path to being able to import its modules in your Python codes.

 

References

Specific to the Python package:

Additional references depending on the use you made of SeisLib: