Skip to main content

TIDE

Documentation

Torch-based Inversion & Development Engine

Test coverage License: MIT

TIDE is a PyTorch-first electromagnetic FDTD library for forward modeling and full-waveform inversion. It provides differentiable 2D and 3D Maxwell solvers, native C/CUDA kernels, and configurable snapshot storage for memory-intensive gradient calculations.

Capabilities

Capability API Status
2D TM forward/inverse modeling tide.MaxwellTM Stable
3D forward/inverse modeling tide.Maxwell3D Stable with constraints
JVP, VJP, and second VJP operator.linearize(model) Stable
Snapshot storage storage_mode Device, CPU, disk, none, or auto
Snapshot compression storage_compression Optional BF16 compression
Debye dispersion DebyeDispersion Advanced

TIDE also includes PML boundaries, staggered-grid operators, callbacks, CFL resampling, shot batching, and inversion workflow helpers. Check the limitations guide before scaling up 3D or inversion workloads.

Installation

TIDE requires Python 3.12 or newer and PyTorch 2.12 or newer.

Install the package from PyPI:

uv pip install tide-GPR

You can also use pip:

pip install tide-GPR

For GPU use, install the PyTorch build that matches your CUDA environment before installing TIDE.

Build from source

Building from source requires CMake 3.28 or newer. A CUDA Toolkit is optional.

git clone https://github.com/vcholerae1/tide.git
cd tide
uv build

See the build guide for native-backend builds and troubleshooting.

Quick start

This example runs a small 2D TM forward simulation on CUDA when available and falls back to CPU otherwise:

import torch
import tide

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
epsilon = torch.full((96, 96), 4.0, device=device)
model = tide.EMModel(
    epsilon=epsilon,
    sigma=torch.zeros_like(epsilon),
    mu=torch.ones_like(epsilon),
)

nt, dt = 300, 4e-11
experiment = tide.Experiment(
    acquisition=tide.Acquisition(
        source_location=torch.tensor([[[20, 48]]], device=device),
        receiver_location=torch.tensor([[[20, 60]]], device=device),
    ),
    source_amplitude=tide.ricker(8e8, nt, dt, device=device).view(1, 1, nt),
)
operator = tide.MaxwellTM(
    tide.Discretization(
        spacing=0.02,
        dt=dt,
        boundary=tide.CPML(width=10),
    ),
    experiment,
    execution=tide.ExecutionOptions(fallback=tide.FallbackPolicy.REFERENCE),
)

result = operator(model)
print(result.receiver_data.shape)  # [nt, n_shots, n_receivers]

Documentation

Start with the path that matches your task:

  • Getting started: installation, backend checks, and a first 2D simulation
  • API orientation: models, experiments, operators, and derivative sessions
  • Modeling: sources, receivers, boundaries, and tensor layouts
  • Inversion: losses, backpropagation, and optimizer workflows
  • Configuration: storage, callbacks, backends, and CFL controls
  • API reference: public contracts and operators

Before relying on advanced configurations, review the known limitations and verification guide.

Development

Install the development dependencies and run the test suite:

uv sync --group dev
uv run pytest

Preview the documentation:

npm install
npm run dev

Issues and pull requests are welcome.

Citation

If you use TIDE in your research, cite:

@software{tide2025,
  author = {Vcholerae1},
  title = {TIDE: Torch-based Inversion \& Development Engine},
  year = {2025},
  url = {https://github.com/vcholerae1/tide}
}

Acknowledgments

TIDE includes code derived from Deepwave by Alan Richardson.

License

TIDE is available under the MIT License.

Metadata

Release files for tide-GPR 0.1.2

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

Source distribution (sdist)

Source distribution for tide-GPR 0.1.2
File Size Uploaded
tide_gpr-0.1.2.tar.gz 837.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tide-GPR 0.1.2
File Interpreter ABI Platform
tide_gpr-0.1.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
tide_gpr-0.1.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
tide_gpr-0.1.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 8.9 MB

Release files / tide_gpr-0.1.2.tar.gz

Download URL tide_gpr-0.1.2.tar.gz
Size 837.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f95a6b195a5b9893b5be4f5a99f0bd5892bacb1af44cf930f163b571106675f8
BLAKE2b-256 checksum
How to use checksums
8178c233edfd66c9938fa5f8d78d26bfaa7858475c630363618479237c4109ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / tide_gpr-0.1.2-py3-none-win_amd64.whl

Download URL tide_gpr-0.1.2-py3-none-win_amd64.whl
Size 791.2 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
e22cabb79234d5056ff39d10fce84e66f48b365df114ae3005499a5ddb44d58b
BLAKE2b-256 checksum
How to use checksums
91afba8b6efc60c04f8390e3d731b64c6e53e4f03d760069a82cd06c58424255
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / tide_gpr-0.1.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL tide_gpr-0.1.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 6.3 MB
Tags Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c43063dbbb7feab1e0d9724da1db3565a70dbe4cd194604cb6df5dfa330912ff
BLAKE2b-256 checksum
How to use checksums
57779a30a94948485a538c087b9a5a58cd4f371db672ba8c1bef5d2eac8323d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / tide_gpr-0.1.2-py3-none-macosx_11_0_arm64.whl

Download URL tide_gpr-0.1.2-py3-none-macosx_11_0_arm64.whl
Size 984.1 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e20fd01e3f1a1e4b6681d3021ef61ffda9359731237fef8086f989656dc86659
BLAKE2b-256 checksum
How to use checksums
ccbe7264355ec5c200a59f9e04fb823a8104bc50caeae2fef903df1b3225a512
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.2 This release

4 release files

0.1.1

4 release files

0.1.0

4 release files

0.0.34

4 release files

0.0.32

4 release files

0.0.31

4 release files

0.0.29

4 release files

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