Skip to content
INGVPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

4 watching

Forks

Repository files navigation

TeamDigitale-publiccode TeamDigitale-reuse

License

DockerHub DockerHub Image Size DockerHub Pulls

GitHub Static Badge GitHub Issues

Dynamic YAML Badge

pyml Version | GitHub Actions Workflow Status

Introduction

Python code, complementary to pyamp or REI, to calculate ML with different methods and attenuation functions.

Quickstart

Docker image

First, clone the git repository

git clone https://github.com/INGV/pyml.git
cd pyml
docker build --tag ingv/pyml .

in case of errors, try:

docker build --no-cache --pull --tag ingv/pyml .

Run docker

To run the container, use the command below; the -v option is used to "mount" working directory into container:

docker run --rm -v $(pwd)/examples/input:/opt/data ingv/pyml --in_file_name /opt/data/eventid_28745631.json --in_file_format json --out_format json

Station metadata

Station azimuths are measured from the station toward the event. A bearing of 0.0 degrees is valid and is returned as a JSON number on both horizontal components. An azimuth or angular distance that was not calculated is returned as JSON null. Zero latitude, longitude and elevation are valid metadata; stations with missing coordinates or elevation are omitted from the stationmagnitudes list.

Tests

With the Python dependencies listed in Dockerfile installed, run:

python3 -m unittest discover -s tests -v

The tests run the complete CLI in temporary directories. They cover the CPTP zero-azimuth regression reported in REI issue #684, nonzero bearings, sea-level and zero-coordinate stations, missing metadata, and unchanged magnitude results.

Contribute

Thanks to your contributions!

Here is a list of users who already contributed to this repository:

Authors

(c) 2025 Raffaele Distefano raffaele.distefano[at]ingv.it
(c) 2025 Valentino Lauciani valentino.lauciani[at]ingv.it

Istituto Nazionale di Geofisica e Vulcanologia, Italia

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages