Skip to main content

GWTC analysis tool

Project description

GWTC Analysis

Overview

GWTC Analysis is a command-line analysis suite for exploring publicly released Gravitational-Wave Transient Catalogs (GWTC) from the LIGO–Virgo–KAGRA (LVK) Collaboration.

The tool provides:

  • Search of gravitational-wave sky localizations around a given sky position
  • Visualization of parameter-estimation results for individual events
  • Selection of events based on physical constraints (masses, distance)
  • Global catalog statistics, including detector-network participation and sky-localization performance

All gravitational-wave data products are retrieved from the Gravitational Wave Open Science Center (GWOSC), or from supported alternative repositories (Zenodo / S3 / Galaxy collections).


Containerized Distribution (Docker)

gwtc_analysis is distributed as a ready-to-use Docker container named gwtc-tool.

Using the Docker image is recommended for reproducibility, portability, and integration with workflow systems (e.g. Galaxy, CI pipelines).


Astrophysical Sources

The GWTC catalogs contain compact binary merger events involving:

  • Binary Black Holes (BBH)
  • Binary Neutron Stars (BNS)
  • Neutron Star – Black Hole systems (NSBH)

These mergers are detected by the LVK detector network: H1 (Hanford), L1 (Livingston), V1 (Virgo), K1 (KAGRA).


Supported GW Catalog Names

Catalog identifiers are case-sensitive:

Catalog name Description
GWTC-1 Confident subset of GWTC-1
GWTC-2.1 Confident subset of GWTC-2.1
GWTC-3 Confident subset of GWTC-3
GWTC-4 GWTC-4 public release
ALL Expands to all catalogs above

Command-Line Interface (CLI)

usage: gwtc_analysis [-h] MODE ...

positional arguments:
  MODE
    catalog_statistics
    event_selection
    search_skymaps
    parameters_estimation

Each mode has its own help:

python -m gwtc_analysis.cli <MODE> -h

General Units and Ranges

  • Right Ascension: degrees [0, 360)
  • Declination: degrees [-90, +90]
  • Probability threshold: [0, 1]
  • Masses: solar masses (M☉)
  • Distances: megaparsecs (Mpc)

Data repositories

The GWTC catalogs (Parameter Estimation and Skymaps) can be directly downloaded from different supports:


Usage

This tool is designed to run either on your laptop as a docker image or conda package, or on several user-friendly platforms:

Inputs

  • Catalog selections are passed as parameters separated by space
  • Data repositories accept --data-repo to choose where data products are read from:
    • galaxy: read inputs from Galaxy collections
    • zenodo: official releases from Zenodo
    • s3: S3-compatible bucket

Outputs

  • TSV tables
  • HTML reports
  • Plot images

CLI options (auto-generated)

The tables below are generated directly from cli.py to stay aligned with the real CLI.

To regenerate locally (from the repository root):

python tools/gen_readme_cli_tables.py

catalog_statistics

Option Default Description
-h, --help `` show this help message and exit
--catalogs `` Catalog keys, space-separated (e.g. GWTC-1 GWTC-2.1 GWTC-3 GWTC-4). ALL key takes them all.
--out-events catalogs_statistics.tsv Output TSV path (per-event table).
--out-report catalogs_statistics.html Output HTML report path.
--include-detectors False Include detector network via GWOSC v2 calls.
--include-area False Compute sky localization area Axx if skymaps are available.
--area-cred 0.9 Credible level for sky area: 0.9→A90, 0.5→A50, 0.95→A95.
--plots-dir cat_plots Directory for plots (default: cat_plots).
--data-repo zenodo Where to read data from: galaxy | zenodo | s3.

event_selection

Option Default Description
-h, --help `` show this help message and exit
--catalogs `` Catalog keys, space-separated (e.g. GWTC-1 GWTC-2.1 GWTC-3 GWTC-4). ALL key takes them all.
--out-selection event_selection.tsv Output TSV path for the selected events.
--m1-min `` Minimum primary mass (source frame).
--m1-max `` Maximum primary mass (source frame).
--m2-min `` Minimum secondary mass (source frame).
--m2-max `` Maximum secondary mass (source frame).
--dl-min `` Minimum luminosity distance (Mpc).
--dl-max `` Maximum luminosity distance (Mpc).

search_skymaps

Option Default Description
-h, --help `` show this help message and exit
--catalogs `` Catalog keys, space-separated (e.g. GWTC-1 GWTC-2.1 GWTC-3 GWTC-4). ALL key takes them all.
--ra-deg `` Right ascension (deg).
--dec-deg `` Declination (deg).
--prob 0.9 Credible-level threshold (0–1). Common values: 0.9, 0.5, 0.95.
--skymap_label Mixed Label selector used to filter skymap (default: Mixed).
--out-events search_skymaps.tsv Output TSV file (default: search_skymaps.tsv).
--out-report search_skymaps.html Optional output HTML report path for hits.
--plots-dir sky_plots Directory for hit plots (default: sky_plots).
--data-repo zenodo Where to read data from: galaxy | zenodo | s3.

parameters_estimation

Option Default Description
-h, --help `` show this help message and exit
--out-report parameters_estimation.html Output HTML report path.
--src-name `` Source event name (e.g. GW231223_032836).
--data-repo zenodo Where to read data from: galaxy | zenodo | s3.
--pe-vars `` Extra posterior sample variables to plot (space-separated). Example: --pe-vars chi_eff chi_p luminosity_distance.
--pe-pairs `` Extra 2D posterior pairs to plot as 'x:y' tokens. Example: --pe-pairs mass_1_source:mass_2_source chi_eff:chi_p.
--plots-dir pe_plots Directory for output PE plots (default: pe_plots).
--start 0.2 Seconds before GPS time for strain window.
--stop 0.1 Seconds after GPS time for strain window.
--fs-low 20.0 Bandpass low frequency (Hz).
--fs-high 300.0 Bandpass high frequency (Hz).
--pe-label `` PE label used to select posterior samples and metadata. If omitted and --waveform-engine is provided, the tool selects the closest PE label by substring match in the PE label. If both are omitted, defaults to Mixed.
--waveform-engine `` Waveform engine used to generate a time-domain waveform for strain overlay. If omitted, a sensible default engine is used for overlays.

Choosing --pe-label and --waveform-engine

The parameter estimation workflow distinguishes between which PE label is used (to read posteriors and metadata from the PE file) and which waveform engine is requested (to synthesize a time-domain signal for strain overlays).

--pe-label (PE samples / posteriors)

  • Selects the PE label used to read posterior samples and associated metadata (e.g. C00:Mixed, C00:IMRPhenomXPHM-SpinTaylor, C00:SEOBNRv5PHM).
  • If explicitly provided, this choice takes priority.

--waveform-engine (waveform engine for strain overlay)

  • Selects the waveform generator used to build the time-domain waveform for strain overlays (engine name, e.g. IMRPhenomXPHM).
  • This is an engine name and does not have to exactly match a PE label stored in the file.

Automatic label selection rules

  1. If --pe-label is explicitly provided

    • That label is used for posterior plots.
    • The same label is also used as the source of PSDs and maximum-likelihood parameters for strain overlays.
  2. If --pe-label is not provided but --waveform-engine is

    • The tool selects the PE label whose waveform string best matches the requested engine by substring match on the PE label string (no hardcoded waveform mappings).
    • The selected label is then used consistently for posteriors, PSDs/detector lists, and maximum-likelihood parameters.

    Example:

    • --waveform-engine IMRPhenomXPHM
    • → selects C00:IMRPhenomXPHM-SpinTaylor if present in the PE file
  3. If neither option is provided

    • The default Mixed PE label is used.

Waveform synthesis fallback

If the requested waveform engine cannot be instantiated (e.g. unsupported parameter range), the tool:

  • logs a clear warning
  • falls back to an alternative engine when possible
  • explicitly reports both the requested and the actually used engine in the logs and plot titles

This ensures robustness while keeping model choices transparent.


Testing

python -m gwtc_analysis.cli search_skymaps --catalogs GWTC-4 --ra-deg 265.0 --dec-deg -46.0 --prob 0.6 --data-repo s3
python -m gwtc_analysis.cli event_selection --catalogs GWTC-4
python -m gwtc_analysis.cli catalog_statistics --catalogs GWTC-4 --data-repo s3
python -m gwtc_analysis.cli parameters_estimation --src-name GW231223_032836 --data-repo zenodo

LIGO–Virgo–KAGRA (LVK)


Software Stack

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

gwtc_analysis-0.3.3.tar.gz (68.0 kB view details)

Uploaded Source

Built Distribution

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

gwtc_analysis-0.3.3-py3-none-any.whl (69.8 kB view details)

Uploaded Python 3

File details

Details for the file gwtc_analysis-0.3.3.tar.gz.

File metadata

  • Download URL: gwtc_analysis-0.3.3.tar.gz
  • Upload date:
  • Size: 68.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for gwtc_analysis-0.3.3.tar.gz
Algorithm Hash digest
SHA256 ffe7092843bf6c9ddefbc08a249ec4cdc1cef0c38935482e1e4269732d159697
MD5 18cc210656a57291706d7351102f6269
BLAKE2b-256 83b4884cf38aeb544b36d89e1ef7bfde005fdf3ff83a60ef56e96f56881477dd

See more details on using hashes here.

File details

Details for the file gwtc_analysis-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: gwtc_analysis-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 69.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for gwtc_analysis-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0eb738e8f41bfab8f6a1470b7d4171a60509d209861a1408af5c490206c3da07
MD5 4d2c8da196b5e853d4be5ec0aa48ff89
BLAKE2b-256 445ed2f7a3779616a02a6f1366dc67c5c6ad2fc5c13579401075f32433ff7a98

See more details on using hashes here.

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