Skip to main content

Python tools from the Collaboratory for the Study of Earthquake Predictability

Project description

PyCSEP: Collaboratory for the Study of Earthquake Predictability

Python version Python application Build sphinx documentation codecov

The PyCSEP tools help earthquake forecast model developers evaluate their forecasts with the goal of understanding earthquake predictability.

PyCSEP should:

  1. Help modelers become familiar with formats, procedures, and evaluations used in CSEP Testing Centers.
  2. Provide vetted software for model developers to use in their research.
  3. Provide quantative and visual tools to assess earthquake forecast quality.
  4. Promote open-science ideas by ensuring transparency and availability of scientific code and results.
  5. Curate benchmark models and data sets for modelers to conduct retrospective experiments of their forecasts.

Using Conda

The easiest way to install PyCSEP is using conda. It can also be installed using pip or built from source. If you plan on contributing to this package, visit the contribution guidelines for installation instructions.

conda install --channel conda-forge pycsep

Using Pip

Before this installation will work, you must first install the following system dependencies. The remaining dependencies should be installed by the installation script. To help manage dependency issues, we recommend using virtual environments like virtualenv.

Python 3.7 or later (https://python.org)

NumPy 1.10 or later (https://numpy.org)
    Python package for scientific computing and numerical calculations.

GEOS 3.3.3 or later (https://trac.osgeo.org/geos/)
    C++ library for processing geometry.

PROJ 4.9.0 or later (https://proj4.org/)
    Library for cartographic projections.

Example for Ubuntu:

sudo apt-get install libproj-dev proj-data proj-bin  
sudo apt-get install libgeos-dev 
pip install --upgrade pip
pip install numpy

Example for MacOS:

brew install proj geos
pip install --upgrade pip
pip install numpy

From Source

Use this approach if you want the most up-to-date code. This creates an editable installation that can be synced with the latest GitHub commit.

We recommend using virtual environments when installing python packages from source to avoid any dependency conflicts. We prefer conda as the package manager over pip, because conda does a good job of handling binary distributions of packages across multiple platforms. Also, we recommend using the miniconda installer, because it is lightweight and only includes necessary pacakages like pip and zlib.

Using Conda

If you don't have conda on your machine, download and install Miniconda.

git clone https://github.com/SCECcode/pycsep
cd pycsep
conda env create -f requirements.yml
conda activate csep-dev
# Installs in editor mode with all dependencies
pip install -e .

Note: If you want to go back to your default environment use the command conda deactivate.

Using Pip / Virtualenv

We highly recommend using Conda, because this tools helps to manage binary dependencies on Python packages. If you must use Virtualenv follow these instructions:

git clone https://github.com/SCECcode/pycsep
cd pycsep
python -m virtualenv venv
source venv/bin/activate
# Installs in editor mode with all dependencies
pip install -e .[all]

Note: If you want to go back to your default environment use the command deactivate.

Documentation and Changelog

The documentation can be found at here, and the changelog can be found here.

Releases

We follow semver for our versioning strategy.

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

pycsep-0.4.1.tar.gz (23.8 MB view hashes)

Uploaded Source

Built Distribution

pycsep-0.4.1-py3-none-any.whl (24.9 MB view hashes)

Uploaded Python 3

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