An Efficient and Integrated Python Package for Computing Synthetic Seismograms in a Layered Half-Space Model
Project description
⭐ Like this project? Give it a Star! ⭐
Overview
PyGRT: An Efficient and Integrated C/Python Package for Computing Synthetic Seismograms, Strain, Rotation and Stress Tensor in a Layered Half-Space Model (Dynamic & Static Cases)
-
PyGRT now can compute following properties in both dynamic and static case.
- Displacements and its spatial derivatives
- Strain Tensor
- Rotation Tensor
- Stress Tensor
-
At present, PyGRT can run on
- Linux
- MacOS
- Windows
-
PyGRT is extremely easy to install by distributing precompiled binary files.
-
PyGRT now supports the model with liquid layers.
-
PyGRT is still evolving, and more features will be released in the future.
Features
-
Dual-Language:
To optimize performance, PyGRT uses C for its core computational tasks, while Python provides a user-friendly interface. Support script style and command line style to run the program. -
Parallelization:
Accelerated with OpenMP for parallel processing. -
Integration:
Built on the Generalized Reflection-Transmission matrix Method (GRTM) and the Discrete Wavenumber Method (DWM), PyGRT integrates the Peak-Trough Averaging Method (PTAM), Filon’s Integration Method (FIM) and Self-Adaptive Filon’s Integration Method (SAFIM) to handle diverse source-receiver distributions. -
Modular Design:
Clean and organized code structure, making it easy to extend and maintain. -
Compatibility:
PyGRT provides pre-compiled static files, ensuring ease of installation, usage, and portability across different systems.
Pre-Requisite
- For Thread-Level Parallel Computing
-
- For Linux and macOS users: If the GNU compiler is installed on your system, the
OpenMPlibrary is usually included. - For Windows users:
OpenMPhas been statically linked.
In general, you don't have to worry about it. However, if the program complains that "
libgomp.sonot found" or "needs more dependencies", you should installOpenMP. - For Linux and macOS users: If the GNU compiler is installed on your system, the
-
- For Python Script Style
- Anaconda (recommend), to build your virtual environment.
- Other dependencies are declared in
setup.py, automatically handled bypip install.
- For Command Line Style
the output waveforms are binary files in SAC format, you need Seismic Analysis Code (SAC) to view and process.
Installation
In PyGRT, the C programs and libraries operate independently of Python (not CPython or Cython). If you are not familiar with Python and pip, and prefer the Command Line Style, you can quickly run the program by downloading the latest GitHub release for your machine. The necessary files are located in the pygrt/C_extension/bin and pygrt/C_extension/lib folders.
Two ways, choose one:
-
PYPI (recommend)
Run the following command in your virtual environment:pip install -v pygrt-kit
-
-
Download the latest release for your machine, uncompress, and change the directory.
-
Run the following command in your virtual environment:
pip install -v .
-
-
Build from Source Code.
Not recommend.
Setting
For Command Line Style, run
python -m pygrt.print
the outputs are
PyGRT installation directory: </path/to/installation>
PyGRT executable file directory: </path/to/installation/bin>
PyGRT library directory: </path/to/installation/lib>
and you can
- add "executable file directory" to
PATHenvironment variable.
Then you can run the command like grt in terminal.
For each command, use -h to see the help message.
Usage Example
example/ folder shows some examples in paper. More examples are coming soon.
Contact
If you have any questions or suggestions, feel free to reach out:
- Email: zhudengda@mail.iggcas.ac.cn
- GitHub Issues: You can also raise an issue directly on GitHub.
Citation
Zhu D., J. Wang*, J. Hao, S. Yao, Y. Xu, T. Xu and Z. Yao (2025). PyGRT: An Efficient and Integrated Python Package for Computing Synthetic Seismograms in a Layered Half-Space Model. Seismological Research Letters. (under review)
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 Distributions
Built Distributions
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 pygrt_kit-0.9.1-py3-none-win_amd64.whl.
File metadata
- Download URL: pygrt_kit-0.9.1-py3-none-win_amd64.whl
- Upload date:
- Size: 6.3 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d37f963d9d247f5fd9bdb996cb4d797e7029dd939367e36bb48ad10a7c2f7fe2
|
|
| MD5 |
21a6be70d6b00830f840d36baf39c46b
|
|
| BLAKE2b-256 |
ddf646654002809096cf945ca0cc4e0990acd41a1beea21a1832f0ca194ad09f
|
Provenance
The following attestation bundles were made for pygrt_kit-0.9.1-py3-none-win_amd64.whl:
Publisher:
build.yml on Dengda98/PyGRT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygrt_kit-0.9.1-py3-none-win_amd64.whl -
Subject digest:
d37f963d9d247f5fd9bdb996cb4d797e7029dd939367e36bb48ad10a7c2f7fe2 - Sigstore transparency entry: 257237549
- Sigstore integration time:
-
Permalink:
Dengda98/PyGRT@0d5d477e74a314cc2cf06ab8303ed9b4ee2bdc36 -
Branch / Tag:
refs/tags/v0.9.1 - Owner: https://github.com/Dengda98
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@0d5d477e74a314cc2cf06ab8303ed9b4ee2bdc36 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pygrt_kit-0.9.1-py3-none-manylinux2014_x86_64.whl.
File metadata
- Download URL: pygrt_kit-0.9.1-py3-none-manylinux2014_x86_64.whl
- Upload date:
- Size: 3.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92657b1bc680b74a477590c8a2645b2b1039ed9fb783217ab0afa7a10752f440
|
|
| MD5 |
6057cf9fd1e19957915054cd20279fb2
|
|
| BLAKE2b-256 |
8c5ae789cdb71bdb5c52b0a64d94ea87097d9db83c4c6395f9b79381dfce3f70
|
Provenance
The following attestation bundles were made for pygrt_kit-0.9.1-py3-none-manylinux2014_x86_64.whl:
Publisher:
build.yml on Dengda98/PyGRT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygrt_kit-0.9.1-py3-none-manylinux2014_x86_64.whl -
Subject digest:
92657b1bc680b74a477590c8a2645b2b1039ed9fb783217ab0afa7a10752f440 - Sigstore transparency entry: 257237552
- Sigstore integration time:
-
Permalink:
Dengda98/PyGRT@0d5d477e74a314cc2cf06ab8303ed9b4ee2bdc36 -
Branch / Tag:
refs/tags/v0.9.1 - Owner: https://github.com/Dengda98
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@0d5d477e74a314cc2cf06ab8303ed9b4ee2bdc36 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pygrt_kit-0.9.1-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: pygrt_kit-0.9.1-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.9 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba91a60f845079ad5704638acadea34b1cfa3fd0c3f64f8fff4e1aea74c03899
|
|
| MD5 |
72778b6deb792944fe0dbced08ee8905
|
|
| BLAKE2b-256 |
b8571d2927f7c42b5cb53027390f1041bf62ca6309e5f8f6926b5d632a3669b3
|
Provenance
The following attestation bundles were made for pygrt_kit-0.9.1-py3-none-macosx_11_0_arm64.whl:
Publisher:
build.yml on Dengda98/PyGRT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygrt_kit-0.9.1-py3-none-macosx_11_0_arm64.whl -
Subject digest:
ba91a60f845079ad5704638acadea34b1cfa3fd0c3f64f8fff4e1aea74c03899 - Sigstore transparency entry: 257237546
- Sigstore integration time:
-
Permalink:
Dengda98/PyGRT@0d5d477e74a314cc2cf06ab8303ed9b4ee2bdc36 -
Branch / Tag:
refs/tags/v0.9.1 - Owner: https://github.com/Dengda98
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@0d5d477e74a314cc2cf06ab8303ed9b4ee2bdc36 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pygrt_kit-0.9.1-py3-none-macosx_10_9_x86_64.whl.
File metadata
- Download URL: pygrt_kit-0.9.1-py3-none-macosx_10_9_x86_64.whl
- Upload date:
- Size: 3.6 MB
- Tags: Python 3, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3f5c6c90254775250a1d88c82d3cd293e5724809e2a1c9ad1ecd3c189169a10
|
|
| MD5 |
97aa96e6a81326b9ac1ef94b81d5aca3
|
|
| BLAKE2b-256 |
1bd508ae7505c3f5ba9d14c4401b8caaaf7d329c2eee379721a0d6f88c3fffe5
|
Provenance
The following attestation bundles were made for pygrt_kit-0.9.1-py3-none-macosx_10_9_x86_64.whl:
Publisher:
build.yml on Dengda98/PyGRT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygrt_kit-0.9.1-py3-none-macosx_10_9_x86_64.whl -
Subject digest:
a3f5c6c90254775250a1d88c82d3cd293e5724809e2a1c9ad1ecd3c189169a10 - Sigstore transparency entry: 257237553
- Sigstore integration time:
-
Permalink:
Dengda98/PyGRT@0d5d477e74a314cc2cf06ab8303ed9b4ee2bdc36 -
Branch / Tag:
refs/tags/v0.9.1 - Owner: https://github.com/Dengda98
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@0d5d477e74a314cc2cf06ab8303ed9b4ee2bdc36 -
Trigger Event:
push
-
Statement type: