pickagm
Warning: pickagm is under heavy development and may change at any time. Functions, arguments and results can change between releases without notice. If you need exactly the same results later, pin the version, for example
pickagm==0.1.0.
pickagm is a Python library for selecting earthquake ground-motion records for nonlinear structural analysis. It selects records that are hazard-consistent: the selected set matches the ground shaking that the seismic hazard at a site predicts, not only a single target spectrum.
It does this with the generalised conditional intensity measure (GCIM) approach. Given the hazard at one intensity level (for example a spectral acceleration at a chosen period) and the earthquake scenarios that cause it, pickagm:
- builds target distributions of other intensity measures (spectral accelerations at other periods, significant duration, Arias intensity, and so on), using ground-motion models from OpenQuake and empirical correlations between intensity measures;
- draws random target realisations from those distributions;
- scales the records in a database to the conditioning intensity level and picks, for each realisation, the record that fits it best;
- checks how well the selected set matches the targets.
The ESM flatfile (intensity measures and metadata of European and Middle Eastern strong-motion records) is included with the package as the record database.
Documentation
https://pickagm.readthedocs.io
Installation
pickagm needs Python 3.12 or later and OpenQuake engine 3.26 or later.
Install OpenQuake first. OpenQuake depends on GDAL, which PyPI only offers
as source code, so a plain pip install openquake.engine usually fails.
OpenQuake publishes pinned requirement files that download ready-built
wheels instead. For example, for OpenQuake 3.26 and Python 3.12 on Linux:
pip install -r https://raw.githubusercontent.com/gem/oq-engine/engine-3.26/requirements-py312-linux64.txt
pip install openquake.engine
On Windows use requirements-py312-win64.txt instead, and on macOS
requirements-py312-macos_arm64.txt (Apple silicon). See the
OpenQuake installation guide
for other options.
Then install pickagm:
pip install pickagm
The package is about 24 MB, because it includes the ESM flatfile.
A first look
Load one of the bundled correlation models and the first rows of the bundled ESM flatfile:
import numpy as np
from pickagm import corrmodels, eqdbases
# Correlation model for active shallow crust, interpolated to three periods
# (seconds). The periods must be a numpy array.
model = corrmodels.CORR_MODELS["clemett_asc"](
incl_nonSA_imts=["PGA"],
incl_SA_Ts=np.array([0.1, 0.35, 1.0]),
)
print(model.rho["total"]) # total-residual correlation matrix (pandas DataFrame)
# The first 5 records of the ESM flatfile.
flatfile = eqdbases.load_esm_flatfile(5)
print(flatfile[["event_id", "station_code", "Mw", "JB_dist"]])
A full worked example of a record selection is in the documentation.
How to cite
If you use pickagm, please cite the software and the version you used. The
repository's citation metadata is in
CITATION.cff;
GitHub shows it under "Cite this repository".
If your work uses the bundled data, please also credit the data sources listed below.
Licence
Copyright (C) Nicholas Clemett.
pickagm is licensed under GPL-3.0-or-later: you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version. It is distributed in the hope that it
will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
LICENSE file for the
full text.
Data credits
Full details are in
DATA_LICENCES.md.
- ESM flatfile (
data/ESM_flatfile_SA.csv, installed): Engineering Strong Motion database flatfile, published by INGV, licensed under CC BY 4.0. Converted from semicolon-separated to comma-separated values; the values are unchanged. Lanzano et al. (2018), https://doi.org/10.13127/esm/flatfile.1.0, and Lanzano et al. (2019), Bulletin of Earthquake Engineering 17, 561–582, https://doi.org/10.1007/s10518-018-0480-z. - Correlation coefficients (
im_corr_data/clemett_corr_coeffs.hdf5, installed): the correlation model of Clemett and Gündel (paper in preparation), distributed under GPL-3.0-or-later. - Baker and Bradley (2017) correlations (
im_corr_data/BB17.csv): kept in the source repository only, not installed. From bakerjw/NGAW2_correlations, MIT licence, Copyright (c) 2016 Jack Baker.
Metadata
Release files for pickagm 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pickagm-0.1.0.tar.gz | 23.7 MB | With provenance | Details for pickagm-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pickagm-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pickagm-0.1.0-py3-none-any.whl |
Total release size: 47.6 MB
Release files / pickagm-0.1.0.tar.gz
| Download URL | pickagm-0.1.0.tar.gz |
|---|---|
| Size | 23.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bae912731a1546b1c1524e08dbbd638f6cf65b117b871703b54b04535017fc01
|
|
BLAKE2b-256 checksum How to use checksums |
8183379776fb427b79b0837ca746e4573451a115e24814237476cfcef6929078
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logRelease files / pickagm-0.1.0-py3-none-any.whl
| Download URL | pickagm-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb1661e9abb58db3c6a9a47ff68d2273c52b932d0ff05d620b8eb2a820bc4f5c
|
|
BLAKE2b-256 checksum How to use checksums |
b8b4d66f922d928a3e01854638cee2097640cce0029f4da777be1acba70bf624
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logSecurity for pickagm 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pickagm-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.