Skip to content
Seismic Wave Equation Exploration Platform X

The earth,
differentiated.

A PyTorch + JAX framework for differentiable seismic wave-equation modeling, migration, and full-waveform inversion. Built so every gradient is yours to read.

Get started $ pip install sweepx
Python 3.10+  ·  PyTorch  ·  JAX  ·  CUDA 12/13
SWEEP — animated wavefield
PACKAGE · import sweep

sweep-solver

The differentiable wave-equation engine. Nine equation families — acoustic, elastic, VTI, TTI, VRZ, SEM — on torch / JAX / native-CUDA backends, with FWI, LSRTM and RTM building blocks.

Open the solver docs
PACKAGE · import sweepx.agent

sweepx.agent

The natural-language control layer. Say what you want and a local LLM (Ollama / vLLM) turns it into a validated sweep run — forward modelling, benchmark models, plots.

Open the agent docs
TOOLKIT · import sweepx

…and the toolkit

sweepx.tasks (production FWI/LSRTM runner), sweepx.loss, sweepx.io, sweepx.nn and sweepx.opt, all in the one sweepx package; tomography follows.

Open the toolkit docs
WHAT'S NEW

Recently shipped.

The latest user-visible additions across the stack. The badge says where each one lives: a released version you get from pip install, or dev for what is merged but not yet on PyPI — these docs are built from the development branch.

v0.3.62026-10
Spectral elements
sweep.sem.PropSEM solves on meshes fitted to the free surface, with PropTorch's constructor and call: acoustic, elastic, fluid-solid and Biot poroelastic in 2-D, acoustic and elastic in 3-D, with C-PML, boundary saving and impl='c' kernels. sweep list equations lists them next to the finite-difference equations.
v0.3.62026-10
Poroelastic waves
Biot: 2-D low-frequency Biot waves, fast P, slow P and S in one wavefield, with gradients. The viscous drag is integrated exactly, so any permeability runs at the fast-P time step, and biot_from_rock builds the coefficients from rock properties.
v0.3.62026-10
Elastic topography, rebuilt
ElasticCurvilinear now follows Bartana, Xu & Rickett: collocated fields and a self-adjoint operator that stays stable on every hill tried, where the old scheme blew up. Sources, receivers, snapshots and models all live on the physical grid. It replaces the APM free surface, now removed.
v0.3.62026-10
Anisotropic qP on the CUDA core
The pure-qP AcousticVTI and AcousticTTI of Liang et al. (2023) run on impl='c' with full-storage and boundary-saving gradients, and gain Born / LSRTM forms, AcousticVTIBorn and AcousticTTIBorn, on both backends.
v0.3.62026-10
Elastic Born
ElasticBorn models Born data for the 2-D first-order elastic equation (Li et al., 2019): the scattered field is the exact derivative of the Elastic step, on eager and impl='c', with gradients for the vp, vs and rho perturbations and, on eager, the elastic RWI background gradient. The LSRTM equations are now named Born: AcousticBorn, AcousticBorn3D, AcousticVTIBorn, AcousticTTIBorn.
sweepx 0.4.12026-10
Viking, wavelet-free
The Viking Graben walkthrough now inverts all 1001 shots at once with frequency-selection FWI: download, index, plan, six coefficient shards and one sweep-tasks run. No source wavelet, and under an hour on one V100.
ONE INSTALL · TWO PACKAGES

One install.
Then import sweep.

sweepx is the toolkit — the task runner, the agent and the libraries they use — and it pulls in the engine, sweep-solver, as a dependency. Install sweepx; import the engine as sweep (same pattern as scikit-learn → sklearn) and the toolkit as sweepx.<module>.

# one install — the engine and the whole toolkit:
#     pip install sweepx

import sweep                                       # ← sweep-solver, the engine
from sweep.propagator.torch import PropTorch       # torch / JAX / native-CUDA
from sweep.equations import Acoustic, ElasticTTI   # nine equation families

from sweepx.loss import EnvelopeLoss               # ← sweepx, the toolkit
from sweepx.tasks import load_task, TaskRunner     # YAML task runner

# …or drive it all in plain language — sweepx.agent:
#     sweep-agent chat
#     >>> load Marmousi and run a forward — show the shot gather

Install & get started →

THE FAMILY

The engine, and the toolkit on top.

The engine is its own package, sweep-solver, so it installs on its own. Everything built on it ships together in sweepx, one module per job, layered agent → tasks → io / loss / nn / opt: a module imports only from the layers below it.

PUBLISHED
sweep-solver
import sweep · docs
Wave-equation engine — equations, propagators, FWI/LSRTM/RTM.
IN SWEEPX
sweepx.agent
in sweepx · docs
Natural-language control via a local LLM.
IN SWEEPX
sweepx.tasks
in sweepx · docs
Production FWI/LSRTM runner — specs, YAML, multi-GPU, IO.
IN SWEEPX
sweepx.loss
in sweepx · docs
Misfit / loss functions for inversion.
IN SWEEPX
sweepx.nn
in sweepx · docs
Neural reparameterizations and priors — INR / hash / SIREN, TV, diffusion.
IN SWEEPX
sweepx.io
in sweepx · docs
Seismic I/O — SEG-Y index, data plans, prefetched reads, geometry.
IN SWEEPX
sweepx.opt
in sweepx · docs
FWI optimizers — L-BFGS, truncated Newton / Gauss-Newton, Adam, Shampoo / SOAP, preconditioners, bounds.
COMING
sweepx.tomo
in sweepx, later
First-arrival traveltime tomography — eikonal + SIRT / FATT.