PySEP

PySEP (Python Seismogram Extraction and Processing) is a package revolving around the collection, visualization and curation of seismic data and metadata. It is built around ObsPy and uses a number of core classes to achieve its goals:

  • PySep: data download and processing tool

  • RecSec: record section plotter for data visualization

  • Declust: event and station declustering and weighting

PySEP is hosted on GitHub as part of the adjTomo organization.

As part of the SCOPED toolkit, PySEP has been containerized using Docker.


Installation

We recommend installing PySEP into a Conda environment to avoid package or dependency conflicts with other Python packages.

Installation via Pip is recommended for the latest, stable version of PySEP. Note that the package name PySEP was already take on PyPi, so our package must be installed via the name: pysep-adjtomo.

Note

Cartopy must be installed separately via Conda otherwise you will encounter Pip dependency errors

conda create -n pysep
conda activate pysep
conda install cartopy
pip install pysep-adjtomo

Installing Development Version

PySEP is under an active state of development, so for the latest version of the codebase, installation must take place directly from the devel branch of the code.

Warning

API and code stability is subject to change without warning when using the devel branch

git clone --branch devel https://github.com/adjtomo/pysep.git
cd pysep/
conda env create -f environment.yml
conda activate pysep

The above code installs PySEP in editable mode via Pip. This means that any source code changes that occur in the pysep/ directory are directly accesible in your development version.

To update the development branch with the most up-to-date changes, run:

git pull origin devel

Running Tests

PySEP comes with unit testing which should be run before and after making any changes to see if your changes have altered the expected code behavior.

If you have installed the Development version of PySEP, you can run tests with:

conda install pytest
cd pysep/tests
pytest