Maintenance will be performed on git.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 22 April 2025 starting at approximately 9am PDT. It is expected to take around 30 minutes and there will be several periods of downtime throughout the maintenance. Please address any comments, concerns, or questions to the helpdesk. This maintenance will be upgrading the GitLab database in order to be ready for the migration.
Currently Bilby uses the function SimInspiralFD (which internally calls XLALSimInspiralTDFromTD) whenever a time-domain waveform model is being used. However, this can lead to unexpected results for precessing waveforms that do not support
fref
, e.g. SEOBNRv4P. This is because SimInspiralFD internally changes the starting frequency of the waveform such that at the requested starting frequency the waveform is properly conditioned. This is problematic because the spins for such waveforms have to be defined at the starting frequency. If the transformation from PE sampling parameters (e.g. tilt angles) is done at one frequency but the waveform is actually generated at another, this changes the waveform that is being produced. If the shift in frequency was constant, this would be inconvenient but would just amount to have a different reference frequency. However, the amount that the SimInspiralFD steps back is parameter dependent (see here). Thus every waveform during sampling would in effect be evaluated at a different reference frequency.
Possible ways to proceed that come to mind are
modify SimInspiralFD such that this change in starting frequency is not done for such waveforms as is already the case for one approximant here. Note, however, that the tapering done in this case has not been tested extensively.
use ChooseTDWaveform directly and do all the conditioning and FFTing internally within bilby
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related or that one is blocking others.
Learn more.
The issue is that if you want to do the tapering, high-pass filtering, and Fourier transforming robustly you will inevitably run into the same issues that SimInspiralFD needs/attempts to handle; specifically, you generally need to actually generate the waveform at a lower frequency to avoid the tapering entering the frequency band of interest. Ultimately, if you need an approximant-by-approximant solution, it may as well be done in lalsimulation so that it is available to all downstream consumers.
As another desired outcome: It would be excellent to improve the documentation of SimInspiralFD: What does it do internally, how does it treat its parameters, what assumptions does it place at the concrete waveform model being requested. ... and if those assumptions are not met (EOB), then how are parameters re-interpreted and ignored. Basically, define what the waveform code is doing, so that users can make confident and informed decisions.
Generates a frequency domain inspiral waveform using the specified approximant; the resulting waveform is appropriately conditioned and suitable for injection into data.For spinning waveforms, all known spin effects up to given PN order are included.This routine can generate TD approximants and transform them into the frequency domain. Waveforms are generated beginning at a slightly lower starting frequency and tapers are put in this early region so that the waveform smoothly turns on.If an FD approximant is used, this routine applies tapers in the frequency domain between the slightly-lower frequency and the requested f_min. Also, the phase of the waveform is adjusted to introduce a time shift. This time shift should allow the resulting waveform to be Fourier transformed into the time domain without wrapping the end of the waveform to the beginning.This routine assumes that f_max is the Nyquist frequency of a corresponding time-domain waveform, so that deltaT = 0.5 / f_max. If deltaF is set to 0 then this routine computes a deltaF that is small enough to represent the Fourier transform of a time-domain waveform. If deltaF is specified but f_max / deltaF is not a power of 2, and the waveform approximant is a time-domain approximant, then f_max is increased so that f_max / deltaF is the next power of 2. (If the user wishes to discard the extra high frequency content, this must be done separately.)This routine used to have one additional parameter relative to XLALSimInspiralChooseTDWaveform: the redshift, z, of the waveform, which is now stuffed into the LALDict. This should be set to zero (default value) for sources in the nearby universe (that are nearly at rest relative to the earth). For sources at cosmological distances, the mass parameters m1 and m2 should be interpreted as the physical (source frame) masses of the bodies and the distance parameter r is the comoving (transverse) distance. If the calling routine has already applied cosmological "corrections" to m1 and m2 and regards r as a luminosity distance then the redshift factor should again be set to zero.NoteThe parameters passed must be in SI units.Parametershptilde FD plus polarizationhctilde FD cross polarizationm1 mass of companion 1 (kg)m2 mass of companion 2 (kg)S1x x-component of the dimensionless spin of object 1S1y y-component of the dimensionless spin of object 1S1z z-component of the dimensionless spin of object 1S2x x-component of the dimensionless spin of object 2S2y y-component of the dimensionless spin of object 2S2z z-component of the dimensionless spin of object 2distance distance of source (m)inclination inclination of source (rad)phiRef reference orbital phase (rad)longAscNodes longitude of ascending nodes, degenerate with the polarization angle, Omega in documentationeccentricity eccentricity at reference epochmeanPerAno mean anomaly of periastrondeltaF sampling interval (Hz)f_min starting GW frequency (Hz)f_max ending GW frequency (Hz)f_ref Reference frequency (Hz)LALparams LAL dictionary containing accessory parametersapproximant post-Newtonian approximant to use for waveform production
Unfortunately, it is hard to keep documentation up to date with waveform development as new special cases arise. However, as one of the review criteria for waveform reviews is that the output from SimInspiralFD and SimInspiralTD should be sane (see telecon minutes and email thread) I think that updating the documentation of the routine could be part of the review.
Hi all, I think that for SEOBNRv4P(HM) we could do something similar to what is already done for the case of NR waveforms:
index dc636a3..029c07c 100644--- a/lalsimulation/lib/LALSimInspiral.c+++ b/lalsimulation/lib/LALSimInspiral.c@@ -2209,16 +2209,21 @@ int XLALSimInspiralTD( * This is because XLALSimInspiralTDFromTD modifies the start frequency * which is not always possible with NR_hdf5 waveforms. */- if (approximant == NR_hdf5)+ if (approximant == NR_hdf5 || approximant == SEOBNRv4P || approximant == SEOBNRv4PHM)
I am not sure that the conditioning currently done in that if statement is appropriate (I had some issues for short signals). Perhaps something like
The first part looks okay (adding the additional approximants to be conditioned differently to NR_hdf5).
The second part would be problematic. The point here was to make things compatible with how PyCBC does things (it uses ChooseWaveform and then WaveTaper) so if neither that nor the "standard" conditioning of TDFromTD is appropriate then use of that waveform is likely problematic no matter what (at least for certain parameter ranges, etc.). Also, conditioning the first 10% of a waveform is almost certainly the wrong thing to do for a wide range of parameters.
In principle, TDFromTD could have a large switch statement on the approximant and apply approximant-specific conditioning, along with parameter range checking to make sure that the waveform is valid everywhere it is expected to be valid. I was hoping to avoid this as that would really necessitate an additional level of waveform code review.
Hi Jolien, thanks for looking at this. I think the WaveTaper uses a different window from TDFromTD. I basically just intended to use the window from TDfromTD. I agree that tapering the first 10% is ad hoc and is probably not robust enough. However, I think if one can find setting(s) that work for very high total masses and high anti-aligned spins (which would make the shortest possible signal) the same settings should work for the other parts of parameter space where the signal would be longer and thus tapering has less of an effect.
Talking with Sergei, he now says only the first of the changes above will be needed:
- if (approximant == NR_hdf5)+ if (approximant == NR_hdf5 || approximant == SEOBNRv4P || approximant == SEOBNRv4PHM)
fine with me. However, this should be advertised at least on the PE call and on the PE and pyCBC mailing lists, so that nobody is surprised who is working under tight deadlines on O3a papers. @sebastian-khan, @maria.haney?