Ctrl K

eGSIM

A Python library and web application to select and test Ground Motion models. Online at: https://egsim.gfz-potsdam.de

2
contributors
Get started
1593 commitsLast commit ≈ 2 days ago12 stars3 forks

Description

eGSIM is a web service and Python library for selecting and testing ground shaking intensity models (GSIM), developed by the GFZ in the framework of the Thematic Core Services for Seismology of EPOS under the umbrella of EFEHR

License Build Build

The web portal and API documentation is available at:

https://egsim.gfz.de

Citation

Software

Zaccarelli, Riccardo; Weatherill, Graeme (2020): eGSIM - a Python library and web application to select and test Ground Motion models. GFZ Data Services. https://doi.org/10.5880/GFZ.2.6.2023.007

Research paper

Riccardo Zaccarelli, Graeme Weatherill, Dino Bindi, Fabrice Cotton; Ground‐Motion Models at Your Fingertips: Easy, Rapid, and Flexible Analysis with eGSIM. Seismological Research Letters 2026; doi: https://doi.org/10.1785/0220250228

Web Service

Python library

Python Python

eGSIM can also be installed and used as a Python package under specific Python versions and OSs (see below) according to OpenQuake compatibilities.

This approach bypasses the web API and, while requiring a steeper learning curve to directly call core functions (see source code or the Library functions reference for details), allows local execution on the CPU with greater control over optimization.

Installation

Clone repository

Select a root directory and clone eGSIM into it:

git clone https://github.com/rizac/eGSIM.git

this will create the eGSIM directory. Move into it (cd eGSIM)

Create and activate a Python virtual environment (virtualenv)

Move to whatever directory you want (you can use the eGSIM repo directory, as long as you create your virtualenv inside .env or .venv directories, which are ignored by git), and then:

python3 -m venv .venv/egsim  # replace ".venv/egsim" with your path

Activate virtualenv:

source .venv/egsim/bin/activate  # replace ".venv/egsim" with your path

(to later deactivate the virtualeanv, simply type deactivate on the terminal)

Install eGSIM

IMPORTANT: From now on, all following operations must have the virtualenv activated FIRST and assume you cd into eGSIM repository (If not the case, adjust paths accordingly)

Linux

  • Python 3.11

    python -m pip install --upgrade pip setuptools wheel && pip install -r ./requirements/requirements-py311-linux64.txt && pip install .
    
  • Python 3.12

    python -m pip install --upgrade pip setuptools wheel && pip install -r ./requirements/requirements-py312-linux64.txt && pip install .
    

MacOs

  • Python 3.11

    python -m pip install --upgrade pip setuptools wheel && pip install -r ./requirements/requirements-py311-macos_arm64.txt && pip install .
    
  • Python 3.12

    python -m pip install --upgrade pip setuptools wheel && pip install -r ./requirements/requirements-py312-macos_arm64.txt && pip install .
    
  • Python 3.11

    python -m pip install --upgrade pip setuptools wheel && pip install -r ./requirements/requirements-py311-macos_x86_64.txt && pip install .
    
  • Python 3.12

    python -m pip install --upgrade pip setuptools wheel && pip install -r ./requirements/requirements-py312-macos_x86_64.txt && pip install .
    

Windows

  • Python 3.11

    python -m pip install --upgrade pip setuptools wheel && pip install -r ./requirements/requirements-py311-win64.txt && pip install .
    
  • Python 3.12

    python -m pip install --upgrade pip setuptools wheel && pip install -r ./requirements/requirements-py312-win64.txt && pip install .
    

Run tests (optional)

(remember to pip install pytest first)

pytest -vvv ./tests/smtk

Usage.

See the Library functions reference

Keywords
Programming languages
  • Python 76%
  • JavaScript 12%
  • HTML 11%
  • CSS 1%
License
  • AGPL-3.0-only
</>Source code

Contributors

RZ
Riccardo Zaccarelli
GFZ German Research Centre for Geosciences, Potsdam, Germany
GW
Graeme Weatherill
GFZ German Research Centre for Geosciences, Potsdam, Germany