Python interface for SpecFWAT (Full Waveform Adjoint Tomography)
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.
- 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
pip install pyfwatgit clone https://github.com/xumi1993/pyfwat.git
cd pyfwat
pip install -e .- 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)
PyFWAT provides numerous command-line utilities for various tasks:
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
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
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
fwat_pick_tele- Interactive GUI for teleseismic phase pickingfwat_pick_waveform- Interactive GUI for ambient noise / local earthquake waveform picking
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)
Contributions are welcome! Please feel free to submit issues or pull requests.
This project is licensed under the GNU General Public License v3.0 (GPLv3).
Mijian Xu ([email protected])