Units and Conventions¶
This page defines how units cross pycWB’s user, numerical, and serialization boundaries. Coordinate meanings are defined separately in Coordinate Systems.
General rule¶
User-facing scalar sky angles are Astropy-compatible quantity strings, for
example "120 deg" or "2.094 rad". Each value carries its own unit so a
coordinate name, frame, and unit can be validated together.
Python numerical kernels use radians unless their docstring explicitly says otherwise. Output objects may retain cWB degree conventions for compatibility; those boundaries are listed below.
Angle boundaries¶
Boundary |
Representation |
Unit |
Notes |
|---|---|---|---|
YAML fixed or patch coordinate |
Quantity string |
Explicit |
Semantic key must match |
Existing sky table |
Numeric columns plus table |
Explicit |
|
Injection and detector-projection Python paths |
Floating point |
rad |
Canonical numerical representation |
|
Floating point |
rad |
Stored inside simulation trigger metadata |
Reconstructed |
Floating point |
deg |
Earth-fixed cWB output compatibility |
Reconstructed |
Floating point |
deg |
Celestial catalog output |
Sky-map plotting coordinates |
Floating point |
deg |
Plotting boundary converts explicitly |
Use astropy.units.Quantity at parsing and analysis boundaries rather
than relying on variable names such as theta or on a distant unit flag.
Time¶
Absolute analysis and event times are GPS seconds. Durations, segment lengths,
lags, and time-of-flight delays are seconds unless a field documents another
unit. Sidereal-time conversion uses astropy.time.Time or the explicit
cWB-compatible GMST function described in Coordinate Systems.
Frequency and sampling¶
Frequencies and bandwidths are in hertz. Sampling rates are samples per second,
and delta_t is seconds per sample. A frequency-bin spacing delta_f is
in hertz.
Distance, mass, and strain¶
Waveform-generator distances are luminosity distances in megaparsecs unless the generator documents otherwise. Compact-object masses are solar masses. Gravitational-wave strain is dimensionless; \(h_{rss}\) has units of \(1/\sqrt{\mathrm{Hz}}\) when written as strain times the square root of time.
Compatibility rule¶
Legacy fields remain readable where cWB interoperability requires them, but new YAML and new public APIs should use semantic names and explicit units. Compatibility is not a reason to propagate an ambiguous representation into a new interface.
Native calculation conventions¶
Native processing uses one cWB calculation contract. Search modes still select physically distinct estimators; execution optimizations do not select an older version of the scientific calculation.
Calculation |
Current convention |
|---|---|
Chirp morphology |
Original-2G rho uses Hough fitting, including mass/merger-time errors
and morphology. XGB rho uses micropixel estimation for |
Waveform summaries |
cWB mean-subtracted RMS energy, packed-FFT frequency moments, ordered time moments and float32 storage/accumulation at the cWB boundaries. Sky posterior scale uses the same arithmetic contract. The packed Nyquist contribution is treated at DC: this is a compatibility convention, not a claim of universally more accurate physical moments. Odd-length packed inputs are rejected safely. |
Regression |
Demeaned self-witness, full-sample percentile statistics and capped
witness application using |
Max energy |
Consume conditioned strain directly, as cWB does. Coherence setup does not insert an extra transform/inverse round trip before this stage. |
Coherence |
Deliberate divergence from cWB. The cluster statistic is
\(\sqrt{\rho}\) with
\(\rho = \sum_{\rm pix}(1 - a)(E - 2n_{\rm sub})\), but |
Injections |
Target-SNR normalization follows |
The former native_chirp, release_waveform_stats, regression_cap,
regression_percentile_stride, direct_max_energy_input and
band_td_cache profile settings, and top-level injection_resampling, have been removed. Delete them
from new YAML. Old records remain readable with their original provenance;
they cannot resume under changed conventions, even with
allow_version_change: true. See Upgrading Existing Analyses.
The chirp, waveform and cap component fixtures target cWB 6.4.6.9; the demeaned regression-witness fixture separately targets 6.4.8.0. Independent component fixtures, composed event tests and backend comparisons validate their stated contracts. Full LF/HF/LD searches, the direct-input selected-pixel comparison and hardware qualification remain separate tests; no complete cWB or GPU campaign is implied.
scalar_dpf selects an allocation-reduced implementation of the same
regulator formula. Geometry, rho modes, whitening methods and conditioning
hooks retain their separate physical/analysis meanings.
Detector geometry and exported angles¶
The per-detector detector_geometry selection is a physical-input choice;
see Detector Support and Geometry for definitions and defaults.
Vertex vectors are Earth-centered positions in metres, and arm vectors are
dimensionless. The default LAL-derived entries construct vectors from geographic
parameters; the cWB entries retain literal rounded vectors.
For detectors selected with :cwb, event antenna exports also reproduce the
existing cWB convention of narrowing stored sky/polarization angles to float32
before converting degrees to radians and evaluating the antenna response.
This output-precision convention is distinct from the geometry constants and
is applied per detector, independently of the waveform-summary convention.