gwnr
A collection of tools for academic research in gravitational-wave astronomy, astrophysics, and numerical relativity.
gwnr (imported as the Python package gwnr) is a research toolkit built on top of
PyCBC, LALSuite,
Bilby and the scientific Python stack. It collects the
utilities, analysis pipelines and plotting machinery developed over years of research on
gravitational-wave (GW) source modeling, template-bank construction, matched-filter searches,
Bayesian parameter estimation, and numerical relativity (NR).
What’s inside
| Area | Package | Highlights |
|---|---|---|
| Waveform tools | gwnr.waveform |
Waveform generation and conditioning, alignment, hybridization of inspiral and merger–ringdown modes, eccentricity measurement, tidal corrections, parameter conversions |
| Data analysis | gwnr.analysis |
Faithfulness (match) and fitting-factor calculations, PSD handling, GW transient catalog access, stochastic template-bank construction |
| Numerical relativity | gwnr.nr |
SXS/SpEC waveform handling, strain-mode containers, SpEC and SpECTRE simulation output parsing, NR data in matched-filtering analyses |
| Statistics & inference | gwnr.stats |
Bayesian inference configuration writers (PyCBC Inference, Bilby, LALInference), Fisher-matrix computations, distribution utilities, MCMC sampler helpers |
| Visualization | gwnr.graph |
Corner plots, contour/scatter plotting for effectualness and bias studies, ParaView helpers, movie embedding |
| Cosmology | gwnr.cosmo |
Redshift–distance conversions, source/detector-frame mass conversions, merger-rate-weighted redshift sampling |
| Workflow automation | gwnr.workflow |
HTCondor DAG generation for banksims, faithsims, and batch parameter-estimation campaigns |
| Bundled data | gwnr.data |
Detector noise curves (PSDs/ASDs) shipped with the package |
| General utilities | gwnr.utils |
LAL/PyCBC type conversions, array helpers, memory profiling, function timeouts |
In addition, ~30 command-line tools are installed for building template banks, running banksims/faithsims on HTCondor clusters, and orchestrating parameter-estimation campaigns on GW events and injections.
Quick example
Compute the faithfulness (noise-weighted match) between two waveform models:
from gwnr.analysis import calculate_faithfulness
match = calculate_faithfulness(
m1=36.0, m2=29.0, # component masses (solar masses)
s1z=0.3, s2z=-0.2, # aligned spin components
signal_approx="SEOBNRv4", # "signal" model
tmplt_approx="IMRPhenomD", # "template" model
f_lower=20.0,
sample_rate=4096,
signal_duration=32,
psd_string="aLIGOZeroDetHighPower",
)
Documentation
Citation & license
gwnr is developed by Prayush Kumar and collaborators, and is
distributed under the GNU General Public License. If you use it in published work, please cite the
repository: https://github.com/gwnr/gwnr.