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¶
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. |
|
WDM and MRA setup |
Initialize WDM transforms for each resolution level and load the cross-resolution MRA/XTalk catalog used by reconstruction. |
|
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. |
|
Supercluster |
Merge per-resolution clusters, load time-delay amplitudes, link clusters
within |
|
Likelihood |
Loop over surviving clusters, scan sky directions, evaluate the coherent likelihood, reconstruct the waveform, and write event parameters. |
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,segEdgecontrol segment boundariesFrame 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).
Config:
frFiles,gwdatafind,inRateModule:
pycwb.modules.read_data
→ 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:
Resampling to the analysis rate
rateANA= (fResampleif set, otherwiseinRate) / 2levelRRegression (WDM linear-prediction filter) to remove spectral lines
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, aliaspython) or MESA spectral estimation (mesa)Config:
fResample,levelR,whiteMethod,whiteWindow,mesaOrderModule:
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.
Config:
l_low,l_highModule:
pycwb.modules.coherence_native
→ 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.
Config:
bpp,patternModule:
pycwb.modules.coherence_native
→ 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.
Config:
TFgap,Tgap,Fgap,subnet,subcut
→ Each supercluster becomes a candidate event. See Clustering Algorithm.
7. Likelihood Evaluation¶
For each supercluster, the likelihood pipeline:
Keeps at most
BATCHof the loudest pixels (time-delay amplitudes were already attached in the supercluster stage)Scans all sky directions using precomputed time delays, projecting the data onto the Dominant Polarization Frame (DPF)
Selects the best-fit sky position
Computes SNR (\(\rho\)), network correlation (\(cc\)) and the \(\chi^2\) penalty at that position, and applies the threshold cuts
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.
Config:
netRHO,netCC,delta,cfg_gamma,healpix,BATCHModule:
pycwb.modules.likelihoodWP
→ 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:
Assign FAR to each event
Measure detection efficiency vs. signal amplitude (\(h_{rss}\))
Compute hrss50/hrss90 sensitivity figures
→ See XGBoost Classification and Detection Efficiency.
Where Each Config Parameter Lives¶
Pipeline Stage |
Key Parameters |
Detailed Guide |
|---|---|---|
Data Ingestion |
|
|
Segments & Jobs |
|
|
Conditioning |
|
|
TF Transform |
|
|
Clustering |
|
|
Likelihood |
|
|
Postproduction |
Workflow YAML, train fraction, FAR threshold |
See also: Job Control · Clustering Algorithm · Likelihood · Postproduction
Next: Job Control — how pycWB splits work into segments, lags, and trials