|
|
## Review of the tilts at infinity calculation
|
|
|
|
|
|
### Review team
|
|
|
|
|
|
#### Reviewees
|
|
|
|
|
|
* @charlie.hoy
|
|
|
|
|
|
#### Reviewer
|
|
|
|
|
|
* @nathan-johnson-mcdaniel
|
|
|
|
|
|
### Review goal
|
|
|
|
|
|
Check the implementation of the tilts at infinity calculation as an option in PESummary by code inspection and against an independent script and that the output in various cases is as expected.
|
|
|
|
|
|
### Check against independent script
|
|
|
|
|
|
Using the script given below, we find differences of at most `2e-7 rad` in the tilts at infinity, except for tilt 2 with only precession-averaged evolution (where there is a much larger number of samples than in the hybrid case), where the maximum difference is `6e-7 rad`. These differences presumably correspond to differences in the environment and possibly the CPUs used: The PESummary runs were performed on CIT and the check was performed on Sarathi.
|
|
|
|
|
|
### Example output
|
|
|
|
|
|
### Signoff
|
|
|
|
|
|
### Comparison script
|
|
|
```
|
|
|
# Check PESummary output of tilts at infinity
|
|
|
# NKJ-M, 7.2021
|
|
|
|
|
|
import numpy as np
|
|
|
|
|
|
import lalsimulation.tilts_at_infinity as tai
|
|
|
|
|
|
from lal import MSUN_SI
|
|
|
|
|
|
# Set data to read in and type of results
|
|
|
|
|
|
#data_file, prec_only, step = 'precession_averaged_pesummary.dat', True, 100
|
|
|
|
|
|
data_file, prec_only, step = 'hybrid_orbit_averaged_pesummary.dat', False, 10
|
|
|
|
|
|
if prec_only:
|
|
|
suffix = '_only_prec_avg'
|
|
|
else:
|
|
|
suffix = ''
|
|
|
|
|
|
# Read in data
|
|
|
|
|
|
data = np.genfromtxt(data_file, dtype=None, names=True)
|
|
|
|
|
|
m1, m2 = data['mass_1'], data['mass_2']
|
|
|
|
|
|
chi1, chi2 = data['a_1'], data['a_2']
|
|
|
|
|
|
tilt1, tilt2, phi12 = data['tilt_1'], data['tilt_2'], data['phi_12']
|
|
|
|
|
|
tilt1_inf, tilt2_inf = data['tilt_1_infinity' + suffix], data['tilt_2_infinity' + suffix]
|
|
|
|
|
|
# Compute tilts at infinity
|
|
|
|
|
|
tilt1_inf_check, tilt2_inf_check = np.zeros_like(m1), np.zeros_like(m1)
|
|
|
|
|
|
for k, m1_sel in enumerate(m1):
|
|
|
if k % step == 0:
|
|
|
print(k)
|
|
|
|
|
|
data_inf = tai.calc_tilts_at_infty_hybrid_evolve(m1_sel*MSUN_SI, m2[k]*MSUN_SI, chi1[k], chi2[k], tilt1[k], tilt2[k], phi12[k], 20., prec_only=prec_only)
|
|
|
|
|
|
tilt1_inf_check[k], tilt2_inf_check[k] = data_inf['tilt1_inf'], data_inf['tilt2_inf']
|
|
|
|
|
|
print(max(abs(tilt1_inf - tilt1_inf_check)), max(abs(tilt2_inf - tilt2_inf_check)))
|
|
|
``` |
|
|
\ No newline at end of file |