IMRPhenomD on GPU
IMRPhenomD is a fully vectorised,
torch.compile-compatible implementation of the IMRPhenomD aligned-spin
frequency-domain waveform model. It computes batches of \(h_+\) and \(h_\times\)
polarisations from a batch of physical parameters.
Note
In production, signal generation is handled through
IMRPhenomPv2, which extends
IMRPhenomD to precessing spins and wraps parameter sampling, waveform generation,
multi-detector projection, and SNR rescaling into a single callable. See
IMRPhenomPv2 on GPU for the recommended production usage.
Parameters
Each waveform is characterised by 11 physical parameters:
Index |
Parameter |
Description |
|---|---|---|
0 |
|
Primary mass in solar masses |
1 |
|
Secondary mass in solar masses |
2 |
|
Aligned spin of the primary (−1 to +1) |
3 |
|
Aligned spin of the secondary (−1 to +1) |
4 |
|
Luminosity distance in Mpc |
5 |
|
Time of coalescence in seconds (relative to segment start) |
6 |
|
Coalescence phase in radians |
7 |
|
Inclination angle in radians |
8 |
|
Polarisation angle in radians |
9 |
|
Right ascension in radians |
10 |
|
Declination in radians |
Comparison with LALSuite
Sage’s IMRPhenomD is validated against lalsimulation.SimInspiralChooseFDWaveform.
The two agree to floating-point precision (residuals ≈ 0) for the plus polarisation:
import lal, lalsimulation as lalsim
approximant = lalsim.SimInspiralGetApproximantFromString("IMRPhenomD")
hp_lal, hc_lal = lalsim.SimInspiralChooseFDWaveform(
30.0 * lal.MSUN_SI, 30.0 * lal.MSUN_SI,
0.0, 0.0, 0.99, 0.0, 0.0, 0.99,
440e6 * lal.PC_SI, 0.5, 0.5,
0.0, 0.0, 0.0,
1.0 / 20.0, 20.0, 2048.0, 20.0,
None, approximant,
)
# Residual between Sage and LAL
import matplotlib.pyplot as plt
plt.plot(hc_lal.data.data[:40_000] - hc[0].detach().cpu().numpy()[:40_000])
# Residual is at absolute zero (bit-identical within float64 precision)
Note
LALSuite zero-pads its output to the next power of two. A requested length of 40 961 samples (20 s at 2048 Hz + DC bin) will be returned as 65 537 samples. Sage returns exactly the requested length.