Python interface for SpecFWAT (Full Waveform Adjoint Tomography)
Project description
PyFWAT
Python interface for SpecFWAT (Full Waveform Adjoint Tomography)
Overview
PyFWAT is a comprehensive Python toolkit designed for full waveform inversion (FWI) and adjoint tomography workflows. It provides a complete set of tools for preprocessing seismic data, running inversions, post-processing results, and visualizing various aspects of the tomographic models and data fits.
Features
- Preprocessing Tools: Data preparation and model setup utilities
- Plotting Utilities: Comprehensive visualization tools for velocity models, kernels, misfits, and data fits
- Post-processing: Model updates, kernel operations, and optimization routines
- Data I/O: Support for various seismic data formats and model representations
- Interactive Picking: GUI-based phase picking interface for teleseismic data
Installation
Install from PyPI (recommended)
pip install pyfwat
Install from source
git clone https://github.com/xumi1993/pyfwat.git
cd pyfwat
pip install -e .
Requirements
- Python >= 3.9
- ObsPy >= 1.2.0
- NumPy >= 1.19.0
- SciPy >= 1.1.0
- Matplotlib >= 3.2.0
- pandas >= 1.0.0
- PyGMT
- h5py
- pyproj
- ruamel.yaml
- PyQt5 (optional, for GUI tools)
Command-line Tools
PyFWAT provides numerous command-line utilities for various tasks:
Visualization Tools
fwat_plot_vel_sec- Plot velocity cross-sectionsfwat_plot_dv_sec- Plot velocity perturbation cross-sectionsfwat_plot_kernel_sec- Plot sensitivity kernel cross-sectionsfwat_plot_residual- Visualize data residualsfwat_plot_misfit- Plot misfit evolutionfwat_plot_misfit_multifreq- Plot misfit for multiple frequenciesfwat_plot_misfit_multistage- Plot misfit across multiple inversion stagesfwat_plot_misfit_linesearch- Visualize line search optimizationfwat_plot_stations- Display station distributionsfwat_plot_rf_evts- Plot receiver function eventsfwat_plot_rf_fit- Show receiver function data fitsfwat_plot_waveform_fit- Visualize ambient noise / local earthquake data fitsfwat_plot_tele_fit- Display teleseismic waveform fits
Preprocessing Tools
fwat_gen_virt_fkevts- Generate virtual FK eventsfwat_gen_gauss_stf- Generate Gaussian source time functionsfwat_ch_fkmodel- Modify FK modelsfwat_cal_fk_times- Calculate FK travel timesfwat_checkerboard- Create checkerboard resolution testsfwat_createmodel- Generate initial crustal modelsfwat_setpar- Setup parameters of FWAT and Specfem3D
Post-processing Tools
fwat_optimize_ls- Perform line search optimizationfwat_clean- Clean up working directoriesfwat_joint_kernel- Combine kernels from different data typesfwat_model_update- Update velocity models
Interactive Tools
fwat_pick_tele- Interactive GUI for teleseismic phase pickingfwat_pick_waveform- Interactive GUI for ambient noise / local earthquake waveform picking
Module Structure
pyfwat/
├── io/ # Input/output utilities
├── picker/ # Phase picking tools
├── plot/ # Visualization modules
├── postproc/ # Post-processing routines
├── preproc/ # Preprocessing utilities
├── utils/ # General utility functions
├── cpt/ # Color palette files
└── data/ # Data resources (e.g., CRUST1.0 model)
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
License
This project is licensed under the GNU General Public License v3.0 (GPLv3).
Author
Mijian Xu (mijian.xu@utoronto.ca)
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 pyfwat-0.2.3.tar.gz.
File metadata
- Download URL: pyfwat-0.2.3.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c7377f656627dbf34236ed548f6d81405129ebcf5b63f33fc2ee84620e38918
|
|
| MD5 |
77b0e65d80b6b019f9366b616366db4f
|
|
| BLAKE2b-256 |
e518fe5f612129017f1e0b7cb1e15279b2cc0ab2fabfa087120570d992fa4392
|
Provenance
The following attestation bundles were made for pyfwat-0.2.3.tar.gz:
Publisher:
publish-to-pypi.yml on xumi1993/pyfwat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyfwat-0.2.3.tar.gz -
Subject digest:
1c7377f656627dbf34236ed548f6d81405129ebcf5b63f33fc2ee84620e38918 - Sigstore transparency entry: 1590462432
- Sigstore integration time:
-
Permalink:
xumi1993/pyfwat@d0ae7e280a575fc0fcf51af95bbc67bd5a43e34d -
Branch / Tag:
refs/tags/0.2.2 - Owner: https://github.com/xumi1993
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@d0ae7e280a575fc0fcf51af95bbc67bd5a43e34d -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyfwat-0.2.3-py3-none-any.whl.
File metadata
- Download URL: pyfwat-0.2.3-py3-none-any.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f34ca81583f4f3e5a644f08c58283a47c9a7f8c1248a5eb061e2965cb13dc643
|
|
| MD5 |
96540051af3fc278d65b9937a57af85d
|
|
| BLAKE2b-256 |
2551e32814b97549e3fba91c432bf467972ccf214794f4a9e3c7ca78894c7ad9
|
Provenance
The following attestation bundles were made for pyfwat-0.2.3-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on xumi1993/pyfwat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyfwat-0.2.3-py3-none-any.whl -
Subject digest:
f34ca81583f4f3e5a644f08c58283a47c9a7f8c1248a5eb061e2965cb13dc643 - Sigstore transparency entry: 1590462441
- Sigstore integration time:
-
Permalink:
xumi1993/pyfwat@d0ae7e280a575fc0fcf51af95bbc67bd5a43e34d -
Branch / Tag:
refs/tags/0.2.2 - Owner: https://github.com/xumi1993
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@d0ae7e280a575fc0fcf51af95bbc67bd5a43e34d -
Trigger Event:
release
-
Statement type: