Skip to main content

PyFWAT

PyPI version Python License: GPL v3 Downloads GitHub stars

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

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-sections
  • fwat_plot_dv_sec - Plot velocity perturbation cross-sections
  • fwat_plot_kernel_sec - Plot sensitivity kernel cross-sections
  • fwat_plot_residual - Visualize data residuals
  • fwat_plot_misfit - Plot misfit evolution
  • fwat_plot_misfit_multifreq - Plot misfit for multiple frequencies
  • fwat_plot_misfit_multistage - Plot misfit across multiple inversion stages
  • fwat_plot_misfit_linesearch - Visualize line search optimization
  • fwat_plot_stations - Display station distributions
  • fwat_plot_rf_evts - Plot receiver function events
  • fwat_plot_rf_fit - Show receiver function data fits
  • fwat_plot_waveform_fit - Visualize ambient noise / local earthquake data fits
  • fwat_plot_tele_fit - Display teleseismic waveform fits

Preprocessing Tools

  • fwat_gen_virt_fkevts - Generate virtual FK events
  • fwat_gen_gauss_stf - Generate Gaussian source time functions
  • fwat_ch_fkmodel - Modify FK models
  • fwat_cal_fk_times - Calculate FK travel times
  • fwat_checkerboard - Create checkerboard resolution tests
  • fwat_createmodel - Generate initial crustal models
  • fwat_setpar - Setup parameters of FWAT and Specfem3D

Post-processing Tools

  • fwat_optimize_ls - Perform line search optimization
  • fwat_clean - Clean up working directories
  • fwat_joint_kernel - Combine kernels from different data types
  • fwat_model_update - Update velocity models

Interactive Tools

  • fwat_pick_tele - Interactive GUI for teleseismic phase picking
  • fwat_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)

Metadata

Release files for pyfwat 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyfwat 0.2.3
File Size Uploaded Provenance Actions
pyfwat-0.2.3.tar.gz 2.3 MB With provenance Details for pyfwat-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyfwat 0.2.3
File Interpreter ABI Platform Actions
pyfwat-0.2.3-py3-none-any.whl Python 3 none any Details for pyfwat-0.2.3-py3-none-any.whl

Total release size: 4.7 MB

Release files / pyfwat-0.2.3.tar.gz

Download URL pyfwat-0.2.3.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
1c7377f656627dbf34236ed548f6d81405129ebcf5b63f33fc2ee84620e38918
BLAKE2b-256 checksum
How to use checksums
e518fe5f612129017f1e0b7cb1e15279b2cc0ab2fabfa087120570d992fa4392
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 21, 2026.

Transparency log

Release files / pyfwat-0.2.3-py3-none-any.whl

Download URL pyfwat-0.2.3-py3-none-any.whl
Size 2.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f34ca81583f4f3e5a644f08c58283a47c9a7f8c1248a5eb061e2965cb13dc643
BLAKE2b-256 checksum
How to use checksums
2551e32814b97549e3fba91c432bf467972ccf214794f4a9e3c7ca78894c7ad9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 21, 2026.

Transparency log

Security for pyfwat 0.2.3

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.

Select from 2 files

Attestation for pyfwat-0.2.3.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 May 21, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page