Next generation earthquake cycle kinematics
Project description
Quasi-static imaging of earthquake cycle kinematics
celeri is a Python-based package designed to image earthquake cycle activity, including spatial slip deficit/fault coupling across geometrically complex fault systems at large scales. It features:
- GUI-based model building with
celeri_ui - Graphical comparisons of model results with
result_manager - 3D visualization of model results with
parsli - Fast and automated block closure on the sphere
- Large aperture models with locally optimized sphere flattening
- Implicit smoothing and a small memory footprint via distance-weighted eigenmodes
- Slip rate and coupling bounded solves via sequential quadratic programming
- Markov chain Monte Carlo (MCMC) uncertainty estimates
- Blazingly fast elastic calculations via Ben Thompson's cutde
- Easy I/O with standard file types (
.csv,.json,.hdf5,.pkl)
Getting started
celeri can be run from the command line or from a Jupyter notebook.
A project folder structure containing a data/ directory, such as the one provided with this repository, is required to use celeri.
After installation, you can use celeri-solve or other commands from the command line:
cd data/config
celeri-solve some_config.json
You can also run celeri from a Jupyter notebook, such as those provided in the notebooks/ directory.
To run notebooks from Visual Studio Code:
- Ensure that
celeriis installed. - Start VS Code, and ensure that the Jupyter extension is installed.
- Open the project folder (e.g. a clone of this repository).
- Open the notebook you'd like to run.
- Click on the Python environment selector near the upper right-hand corner of the VS Code window.
- If using pixi, select the "default" kernel. Otherwise, select the environment in which you installed
celeri. - Run the notebook.
If VS Code does not show an option for the "default" kernel, ensure that your Jupyter extension is up to date. You may need to restart VS Code after running pixi shell for the first time.
Installation
The simplest way to install celeri is to use pixi.
# Create a clone of this repository into the celeri/ directory
git clone https://github.com/brendanjmeade/celeri.git
cd celeri
pixi shell # Installs and activates the pre-configured celeri "default" environment
Note that pixi is project-centric, so the commands only apply if you're within the project directory.
For details about how to use pixi in other configurations, or how to install celeri with other tools such as conda, pip, or uv, see alternative-installation.md.
Command line workflow
celeri-solve
- Estimate model parameters.
- A
*_config.jsonfile is a required argument. - With the Python environment activated, run:
celeri-solve <my_config.json>
-
This will create a folder in the
runs/directory that contains all output files. New folders are created automatically for each run and are sequentially numbered. -
All relative paths in
*_config.jsonare resolved relative to the directory containing the config file. Absolute paths are used as-is. -
NOTE: In the current release, several warnings/errors will be thrown, but they do not impact the calculations. These result from: https://github.com/numpy/numpy/issues/28687. These are patched in numpy 2.3 and will go away once Numba releases with https://github.com/numba/numba/pull/10110 merged.
celeri-forward
- Predict surface velocities from model parameters constrained by previous
celeri-solverun. celeri-forwardis batched so that it never creates large matrices.- With the Python environment activated, run:
celeri-forward <path to output folder> <station file for forward model predictions>
- If you plan to run
celeri-forward, you may want gridded locations for model evaluation. Usecreate-grid-station:
create-grid-station <lon_min> <lat_min> <lon_max> <lat_max> --n_points=<number of grid points>
- where:
lon_min: Minimum longitudelat_min: Minimum latitudelon_max: Maximum longitudelat_max: Maximum latitude--n_points=<number of grid points>: Optional. The default value is 100.
- This produces a station file (named
<UUID>_station.csv) that can be passed toceleri-forward.
Folder structure and file locations for applications
A large number of input files can be involved in a model run. We assume that a project is arranged using the following folder structure:
project_name/
├── README.md
├── notebooks/
│ ├── block_model.ipynb
│ ├── visualize_results.ipynb
│ └── resolution_tests.ipynb
├── data/
| ├── config/
│ | └── *config.json
│ ├── segment/
│ │ └── *segment.csv
│ ├── block/
│ │ └── *block.csv
│ ├── station/
│ │ └── *station.csv
│ ├── mesh/
│ | ├── *mesh.json
│ | └── *.msh
| └── operators/
│ └── *.hdf5
└── runs/
└── 0000000001/
├── 0000000001.log
├── output.pkl
├── elastic_operators.hdf5
├── model_segment.csv
├── model_block.csv
└── model_station.csv
The flow of information through celeri
Contributing to celeri
In order to contribute a GitHub pull request, you'll need to:
- Set up your Python environment for development
- Set up your local Git clone for contributions
If you've installed using pixi as described above, your environment is already development-ready. Otherwise, you'll need to ensure celeri has been pip-installed in editable mode as per the alternative installation instructions.
To reconfigure your local Git clone for contributions, you'll need to fork the repository and reconfigure your remotes:
# After forking the repository to your GitHub account:
git remote rename origin upstream
git remote add origin https://github.com/YOUR_USERNAME/celeri.git
Replace YOUR_USERNAME with your GitHub username.
Maintenance notes
See maintenance-notes.md for current best practices for maintaining this repository, in particular:
Other earthquake cycle kinematics software
We think celeri is pretty great, but there are other great kinematic modeling tools:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file celeri-0.0.4.tar.gz.
File metadata
- Download URL: celeri-0.0.4.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4da37c89eb6345c8c533f2a565e6970d852bf02b6f40704722df0907439da249
|
|
| MD5 |
480d2824edbd4e8c79020d24d8152f3f
|
|
| BLAKE2b-256 |
c591c6eabeb67ec5f1b53c9c423ef2f25029dd0affa0645bde66699c0cb45f99
|
Provenance
The following attestation bundles were made for celeri-0.0.4.tar.gz:
Publisher:
release.yaml on brendanjmeade/celeri
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
celeri-0.0.4.tar.gz -
Subject digest:
4da37c89eb6345c8c533f2a565e6970d852bf02b6f40704722df0907439da249 - Sigstore transparency entry: 440461237
- Sigstore integration time:
-
Permalink:
brendanjmeade/celeri@1274f0ff466ec3f48a3e8ef4cf7acf76763f8be8 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/brendanjmeade
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@1274f0ff466ec3f48a3e8ef4cf7acf76763f8be8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file celeri-0.0.4-py3-none-any.whl.
File metadata
- Download URL: celeri-0.0.4-py3-none-any.whl
- Upload date:
- Size: 141.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca42070a0f2d75bc1d8efbc6acba6ddc28d16975c023faa309448d9e506b193d
|
|
| MD5 |
17434acbeafef6302877ac852d22c23e
|
|
| BLAKE2b-256 |
85e0c56432f8ed5dd7c3b4008482358a03a227cb85bd40bc59b747f434b5b36f
|
Provenance
The following attestation bundles were made for celeri-0.0.4-py3-none-any.whl:
Publisher:
release.yaml on brendanjmeade/celeri
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
celeri-0.0.4-py3-none-any.whl -
Subject digest:
ca42070a0f2d75bc1d8efbc6acba6ddc28d16975c023faa309448d9e506b193d - Sigstore transparency entry: 440461265
- Sigstore integration time:
-
Permalink:
brendanjmeade/celeri@1274f0ff466ec3f48a3e8ef4cf7acf76763f8be8 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/brendanjmeade
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@1274f0ff466ec3f48a3e8ef4cf7acf76763f8be8 -
Trigger Event:
release
-
Statement type: