Skip to main content

Deep learning framework for reconstructing gravitational wave signals and glitches from LIGO detector data

Project description

DeepExtractor

Deep learning framework for reconstructing gravitational-wave signals and glitches from LIGO detector data.

Built for LIGO's O3 observing run (Hanford and Livingston detectors). Described in the paper:

Time-domain reconstruction of signals and glitches in gravitational wave data with deep learning Dooney, Narola, Bromuri, Curier, Van Den Broeck, Caudill, Tan — Phys. Rev. D 112, 044022 (2025) 10.1103/s91m-c2jw

Documentation | GitHub | PyPI


How it works

LIGO strain data contains both astrophysical signals and instrumental glitches — short-duration noise transients that can mimic or obscure gravitational-wave events. DeepExtractor frames glitch reconstruction as a supervised denoising problem:

Input:  h(t)  = background noise  +  glitch/signal
Output: n̂(t)  = predicted background
Result: ĝ(t)  = h(t) − n̂(t)   ← reconstructed glitch or signal

The model is a U-Net operating on STFT spectrograms (magnitude + phase). The default model, DeepExtractor_257, uses a 4-level U-Net with feature maps [64, 128, 256, 512].


Installation

pip install deepextractor

Requires Python ≥ 3.10 and PyTorch ≥ 2.1. Pretrained weights are downloaded automatically from Hugging Face Hub on first use — no manual step required.

Install from source:

git clone https://github.com/tomdooney95/deepextractor.git
cd deepextractor
pip install -e ".[dev]"

Quickstart

import numpy as np
import deepextractor

# Load model (bilby noise variant by default)
model = deepextractor.DeepExtractorModel()

# Reconstruct — extract the transient from noisy strain
noisy_strain = np.random.randn(8192)             # replace with real data
reconstructed = model.reconstruct(noisy_strain)  # extracted signal
background    = model.background(noisy_strain)   # noise estimate

# One-liner convenience function
reconstructed = deepextractor.reconstruct(noisy_strain)

Two pretrained variants are available:

Variant Use case
bilby_noise (default) Simulated LIGO/Virgo noise, injection studies
real_noise Real LIGO O3 detector data

Bundled dataset

The package ships a sample of the GravitySpy LIGO O3a high-confidence catalogue at assets/data_o3a_sample.csv — 10 H1 examples per glitch class (17 classes, 170 rows total), SNR > 15.

import pandas as pd
import importlib.resources as resources

with resources.path("deepextractor", "assets") as assets:
    df = pd.read_csv(assets / "data_o3a_sample.csv")

print(df["label"].value_counts())

CLI tools

# Train a model
deepextractor-train --model DeepExtractor_257 --data-dir data/spectrogram_domain/

# Generate training data
deepextractor-generate --output-dir data/ --num-train 250000

# Convert time-domain data to spectrograms
deepextractor-specgen --input-dir data/time_domain/ --output-dir data/spectrogram_domain/

# Evaluate a trained model
deepextractor-evaluate --model DeepExtractor_257 --checkpoint-dir checkpoints/ --data-dir data/

Citation

@article{s91m-c2jw,
  title     = {Time-domain reconstruction of signals and glitches in gravitational wave data with deep learning},
  author    = {Dooney, Tom and Narola, Harsh and Bromuri, Stefano and Curier, R. Lyana and Van Den Broeck, Chris and Caudill, Sarah and Tan, Daniel Stanley},
  journal   = {Phys. Rev. D},
  volume    = {112},
  issue     = {4},
  pages     = {044022},
  numpages  = {24},
  year      = {2025},
  month     = {Aug},
  publisher = {American Physical Society},
  doi       = {10.1103/s91m-c2jw},
  url       = {https://link.aps.org/doi/10.1103/s91m-c2jw}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deepextractor-0.1.0.tar.gz (936.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deepextractor-0.1.0-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file deepextractor-0.1.0.tar.gz.

File metadata

  • Download URL: deepextractor-0.1.0.tar.gz
  • Upload date:
  • Size: 936.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for deepextractor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 86341e60caaaafeeb645b1a6eee993ae3713aaf74bc8679ea31df2bf6e02f762
MD5 6a40619f28479b54d9d46a0140bc566b
BLAKE2b-256 caf422ddbba08aa90e4a0ea43d9fc47a28ab7fce99656d46b2f36065c01ac0e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for deepextractor-0.1.0.tar.gz:

Publisher: publish.yml on tomdooney95/deepextractor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deepextractor-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: deepextractor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for deepextractor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb7874cf24223a617228cdd2605f525875eaae1385c2e538886c5b8844f95ced
MD5 70958f3f183d7103396afd1b3e80195e
BLAKE2b-256 7ac683a9a26ab7fc7a6a78cb3f26db8495bdbef6c12d53f6e6067abaf3f8667f

See more details on using hashes here.

Provenance

The following attestation bundles were made for deepextractor-0.1.0-py3-none-any.whl:

Publisher: publish.yml on tomdooney95/deepextractor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page