WaveDisp is a Python package designed for wave dispersion analysis in layered media. For a detailed understanding of the theory behind this package, please refer to the presentation. WaveDisp offers various functionalities, including generating synthetic data, training neural networks, and predicting wave dispersion properties based on input parameters.
- Generate Synthetic Data: Generate synthetic data for wave dispersion analysis with customizable parameters such as layer thickness, shear wave velocities, and frequency range.
- Train Neural Networks: Train neural network models to learn the relationship between input parameters and wave dispersion properties.
- Predict Wave Dispersion: Use trained models to predict wave dispersion properties based on input parameters, enabling fast and accurate analysis of layered media.
- Conventional Optimization: Use conventional optimization for inverting dispersion curves or use it in conjunction with neural network predictions.
The generation test generates synthetic data for wave dispersion analysis and saves it in the specified output directory. To run this test using multiprocessing on one machine:
python test/TestGeneration.pyFor using MPI on multiple machines and multiprocessing on each, run this test:
mpiexec -n <num_ranks> python test/TestGeneration.pySample generated data is shown below:

The training test trains the model and predicts the output for specific benchmarks, saving the prediction plots and training history in the output directory. To specify whether to use CPU or GPU for training, relevant arguments can be set in the test for CUDA visibility.
python test/TestTraining.pyBy enabling the optimization feature in the test, conventional optimization can be performed after obtaining network predictions. To use MPI on multiple machines and perform many experiments simultaneously for hyperparameter tuning, use:
mpiexec -n <num_ranks> python test/TestTraining.pyTo use conventional optimization (e.g., gradient-based methods), run this test:
python test/TestOptimization.pyTo solve the forward problem and obtain/plot the dispersion curves, run the test below:
python test/TestForward.py- Ali Vaziri (@github-ava)



