Generative modelling of seismic waveforms using denoising diffusion.
This repository implements Generative Waveform Models (GMWs), i.e., generative models that can generate synthetic seismic waveforms. In particular, the repository implements HighFEM, the GWM introduced in High Resolution Seismic Waveform Generation using Denoising Diffusion.
The repository can be also be used to replicate the results from the manuscript using the experimental code in experiments, and for training custom GWMs from scratch.
If you are only interested in generating synthetic waveforms, install tqdne using
pip install git+https://github.com/highfem/tqdne@<RELEASE>where RELEASE should be replaced with the latest release version to be found here.
You should then be able to simulate waveforms by calling
generate-waveformsfrom the (Unix) command line.
If you are interested in reproducing the results from the paper, please refer to experiments/README.md.
You can install tqdne by following the steps below.
-
a) Recommended: Download the latest release if you do not require commit history. Releases have been tested and reproduced by us and partners.
b) Alternatively, clone the repository using:
git clone (--depth 1) https://github.com/highfem/tqdne.git
-
There are two ways to install the package: you can either install the package with
uvwhich will use the versions of all dependencies that we are using for development, or you install the package using thepipinstaller which will install the latest versions of all dependencies.a) Recommended: Install all dependencies and the package with
uv, viauv sync
b) Install using
pipinstall, for instance, within acondaorvirtualenvenvironment, via:pip install -e .
To reproduce the experiments from the manuscript, including data preprocessing, training, and evaluation, navigate to the experiments folder. Refer to the corresponding README files for step-by-step guidance.
You can generate your own waveforms by using the scripts in scripts. See the corresponding README files for more information.
Contributions in the form of pull requests are more than welcome. In order to contribute:
- Clone
tqdneand installuvfrom here. - Create a new branch locally
git checkout -b feature/my-new-featureorgit checkout -b issue/fixes-bug. - Install all dependencies using:
uv sync --all-extras. - Activate the virtual environment:
source .venv/bin/activate. - Install
pre-commit(which we use for auto-formatting and checking code) using:pre-commit install. - Implement your contribution.
- Run
uv run ruff check .to check the code for issues. - Push your changes and submit a PR 🙂.
Some Python code has been adapted from the following repositories:
