Pipeline Lifecycle

This page walks through the complete pycWB analysis pipeline—from raw detector data to final detection efficiency. Think of it as a map: each step links to the detailed guide where you can learn more.

The stages below are pycWB’s modular Python implementation of the same cWB/cWB-2G search algorithms: WDM time-frequency analysis, coherent pixel selection, clustering and superclustering, likelihood evaluation, waveform reconstruction, and postproduction ranking.

Search lifecycle animation

Watch a simulated H1–L1 signal move through detector projection, whitening, multi-resolution WDM analysis, pixel selection, clustering, superclustering, sky reconstruction, waveform recovery, and time-slide background estimation in 60 seconds.

Download the video (MP4) or view the GIF.

The panels are computed from simulated data using the educational model in examples/search_animation/. The model simplifies the production likelihood, subnet cuts, and multi-resolution reconstruction; it does not illustrate postproduction training or detection-efficiency studies. See the animation notes for the scene descriptions, approximations, and rendering instructions.

Overview

Production search pipeline

cWB-2G Stage Correspondence

The ROOT/C++ cWB-2G notes describe the production algorithm as a sequence of named stages: data conditioning, WDM setup, coherence, supercluster, and likelihood. pycWB keeps that same algorithmic decomposition, but stores the intermediate objects in Python data structures, Parquet catalogs, and trigger files instead of ROOT job-file cycles.

cWB-2G stage

Algorithmic role

pycWB implementation

Data conditioning

Read detector strain, add configured injections, resample, remove lines, estimate detector noise RMS, and whiten the data.

pycwb.modules.read_data, pycwb.modules.injection, pycwb.modules.data_conditioning

WDM and MRA setup

Initialize WDM transforms for each resolution level and load the cross-resolution MRA/XTalk catalog used by reconstruction.

pycwb.modules.coherence_native, pycwb.modules.xtalk

Coherence

Build time-frequency maps, compute each detector’s maximum energy over the allowed time delays, set the black-pixel threshold, select significant pixels per lag, and perform single-resolution clustering.

pycwb.modules.coherence_native

Supercluster

Merge per-resolution clusters, load time-delay amplitudes, link clusters within TFgap into superclusters, apply the sub-network cut, and defragment nearby structures (defragmentation runs before the sub-network cut when pattern ≠ 0).

pycwb.modules.super_cluster_native

Likelihood

Loop over surviving clusters, scan sky directions, evaluate the coherent likelihood, reconstruct the waveform, and write event parameters.

pycwb.modules.likelihoodWP, pycwb.modules.reconstruction

1. Segment Construction

The analysis period is divided into contiguous analysis windows called job segments, each padded by segEdge on both sides (analysis windows overlap only when segOverlap is set). Segments are built from the configuration and data-quality lists alone, before any strain is read. Each segment is an independent unit of work that can run on a separate cluster node.

  • CAT0/CAT1 DQ files define the segments; CAT2 files become veto windows inside each segment

  • segLen, segMLS, segEdge control segment boundaries

  • Frame files are matched to each segment’s GPS window

→ Each segment becomes a job. Time-slide lags and injection trials are looped over inside the job; superlags (and, optionally, parallel_injection_trail) create additional jobs. See Job Control.

2. Data Ingestion

Each job reads the gravitational-wave strain for its own segment window from frame files (.gwf) listed in frFiles or discovered with gwdatafind, one time series per detector. The frames must already be sampled at the input rate inRate; a mismatch is an error. Resampling to the analysis rate happens later, during conditioning. NDS2 streaming is used only by the online search (pycwb online, pycwb.modules.online).

→ Configured injections are added to the strain, which is then conditioned. See Data Ingestion.

3. Data Conditioning

Within each segment, the data is prepared for wavelet analysis:

  1. Resampling to the analysis rate rateANA = (fResample if set, otherwise inRate) / 2levelR

  2. Regression (WDM linear-prediction filter) to remove spectral lines

  3. Whitening to flatten the noise spectrum

In cWB-2G terminology, this stage produces the whitened detector strain (HoT) and detector noise estimate (nRMS). pycWB carries the same algorithmic products forward as conditioned strain series and per-detector nRMS maps.

  • Methods: wavelet whitening (wavelet, alias python) or MESA spectral estimation (mesa)

  • Config: fResample, levelR, whiteMethod, whiteWindow, mesaOrder

  • Module: pycwb.modules.data_conditioning

→ Output: whitened time series ready for time-frequency decomposition. See Data Conditioning.

4. Time-Frequency Transform

The whitened data is transformed into the time-frequency domain using the Wilson-Daubechies-Meyer (WDM) wavelet transform. Multiple resolution levels are computed (from l_low to l_high) to capture signals of different durations.

The WDM transforms define the time-frequency basis. The MRA/XTalk catalog is a separate sparse table of overlaps between basis functions at different resolutions. The sub-network cut and the likelihood use it to correct cluster energies and pixel amplitudes for energy that appears at several resolutions; waveform reconstruction then uses those corrected amplitudes.

→ Output: time-frequency pixels (amplitude vs. time vs. frequency vs. detector). See WDM Time-Frequency Transform.

5. Coherence & Pixel Selection

Each detector’s time-frequency map is replaced by its maximum pixel energy over time delays up to the maximum inter-detector light-travel time (max_delay); no sky directions are scanned at this stage. A pixel-energy threshold is derived from the black-pixel probability bpp. For each lag, the maps are time-shifted by that lag’s per-detector shifts, and pixels whose energy summed over detectors exceeds the threshold (and that pass a neighbouring-pixel support check) are selected.

This corresponds to the cWB-2G maxEnergy → threshold → significant-pixel selection path. Selected pixels are clustered at each resolution before the multi-resolution supercluster step.

→ Output: selected pixels above threshold, grouped by resolution. See Clustering Algorithm.

6. Clustering & Superclustering

Selected pixels are grouped into clusters (per resolution level) and then merged into superclusters across resolutions. A sub-network cut removes clusters unlikely to be astrophysical.

This is the pycWB equivalent of the cWB-2G Supercluster stage: merge the per-resolution clusters into one list, load time-delay amplitudes for all of their pixels, link clusters within TFgap into superclusters (dropping those, including unlinked clusters, with fewer than 3 pixels or energy below e2or), apply subNetCut, and defragment surviving clusters within Tgap/Fgap. With the default pattern = 0 defragmentation runs after the sub-network cut; with pattern ≠ 0 it runs before it.

→ Each supercluster becomes a candidate event. See Clustering Algorithm.

7. Likelihood Evaluation

For each supercluster, the likelihood pipeline:

  1. Keeps at most BATCH of the loudest pixels (time-delay amplitudes were already attached in the supercluster stage)

  2. Scans all sky directions using precomputed time delays, projecting the data onto the Dominant Polarization Frame (DPF)

  3. Selects the best-fit sky position

  4. Computes SNR (\(\rho\)), network correlation (\(cc\)) and the \(\chi^2\) penalty at that position, and applies the threshold cuts

  5. Reconstructs the waveform and computes \(h_{rss}\)

This corresponds to the cWB-2G likelihood2G / likelihoodWP stage: loop over superclusters, evaluate the coherent network likelihood, and output reconstructed event parameters.

→ Each supercluster that passes the likelihood cuts becomes an event in the trigger catalog. See Likelihood.

8. Event Output

Event parameters of the accepted triggers are written to the Parquet trigger catalog (catalog/catalog.parquet). Each trigger also gets a folder under trigger/ holding its cluster JSON (save_cluster, on by default) and, optionally, its sky-map statistics JSON (save_sky_map). Progress metadata is written to catalog/progress.parquet.

  • Each event includes: GPS time, frequency, sky position, SNR, \(\chi^2\), network correlation

  • Eligible MRA searches estimate chirp morphology with Hough fitting in original-2G mode, or micropixels in XGB mode for CBC/BBH/IMBHB. Both use the explicit run seed and reset ineligible estimates (see Event Output).

→ Jobs complete. Postproduction begins. See Event Output.

9. Background Estimation

Background triggers are collected from all jobs: every trigger that is not at physical zero lag, i.e. with a non-zero time-slide lag or a non-zero superlag (segment) shift. The false alarm rate (FAR) is computed as a function of ranking statistic. The background livetime is the total analyzed time across all of these shifted analyses.

  • \(FAR(\rho^*) = N_{bkg}(\rho \ge \rho^*) / T_{bkg}\)

  • Train/FAR splitting ensures unbiased estimation

→ See Background Estimation.

10. Ranking & Detection Efficiency

An XGBoost classifier is trained on background + simulation events to produce a single ranking statistic. This statistic is used to:

  1. Assign FAR to each event

  2. Measure detection efficiency vs. signal amplitude (\(h_{rss}\))

  3. Compute hrss50/hrss90 sensitivity figures

→ See XGBoost Classification and Detection Efficiency.

Where Each Config Parameter Lives

Pipeline Stage

Key Parameters

Detailed Guide

Data Ingestion

frFiles, gwdatafind, inRate

Production Analysis

Segments & Jobs

segLen, lagSize, lagStep, lagOff

Job Control

Conditioning

fResample, levelR, whiteMethod, mesaOrder

User Parameters

TF Transform

l_low, l_high

User Parameters

Clustering

TFgap, Tgap, Fgap, subnet

Clustering Algorithm

Likelihood

netRHO, netCC, healpix, delta, BATCH

Likelihood

Postproduction

Workflow YAML, train fraction, FAR threshold

Postproduction


See also: Job Control · Clustering Algorithm · Likelihood · Postproduction

Next: Job Control — how pycWB splits work into segments, lags, and trials