Skip to content
Snippets Groups Projects
Commit 57f16cf5 authored by Colm Talbot's avatar Colm Talbot
Browse files

Merge branch 'spin_phase_angles' into 'master'

Spin phase angles

See merge request Monash/peyote!26
parents 426864c1 86b58a69
No related branches found
No related tags found
1 merge request!26Spin phase angles
Pipeline #
......@@ -68,10 +68,10 @@ class Prior(object):
return '$\\theta_1$'
elif self.name == 'tilt_2':
return '$\\theta_2$'
elif self.name == 'phi_1':
return '$\phi_1$'
elif self.name == 'phi_2':
return '$\phi_2$'
elif self.name == 'phi_12':
return '$\Delta\phi$'
elif self.name == 'phi_jl':
return '$\phi_{JL}$'
elif self.name == 'luminosity_distance':
return '$d_L$'
elif self.name == 'dec':
......@@ -327,9 +327,9 @@ def create_default_prior(name):
prior = Sine(name=name)
elif name == 'tilt_2':
prior = Sine(name=name)
elif name == 'phi_1':
elif name == 'phi_12':
prior = PowerLaw(name=name, alpha=0, bounds=(0, 2 * np.pi))
elif name == 'phi_2':
elif name == 'phi_jl':
prior = PowerLaw(name=name, alpha=0, bounds=(0, 2 * np.pi))
elif name == 'luminosity_distance':
prior = PowerLaw(name=name, alpha=2, bounds=(1e2, 5e3))
......
......@@ -10,7 +10,7 @@ from . import utils
def lal_binary_black_hole(
frequency_array, mass_1, mass_2, luminosity_distance, a_1, tilt_1, phi_1, a_2, tilt_2, phi_2,
frequency_array, mass_1, mass_2, luminosity_distance, a_1, tilt_1, phi_12, a_2, tilt_2, phi_jl,
iota, phase, waveform_approximant, reference_frequency, ra, dec,
geocent_time, psi):
""" A Binary Black Hole waveform model using lalsimulation """
......@@ -21,8 +21,9 @@ def lal_binary_black_hole(
mass_1 = mass_1 * utils.solar_mass
mass_2 = mass_2 * utils.solar_mass
spin_1x, spin_1y, spin_1z = utils.spherical_to_cartesian(a_1, tilt_1, phi_1)
spin_2x, spin_2y, spin_2z = utils.spherical_to_cartesian(a_2, tilt_2, phi_2)
iota, spin_1x, spin_1y, spin_1z, spin_2x, spin_2y, spin_2z = \
lalsim.SimInspiralTransformPrecessingNewInitialConditions(iota, phi_jl, tilt_1, tilt_2, phi_12, a_1, a_2,
mass_1, mass_2, reference_frequency, phase)
longitude_ascending_nodes = 0.0
eccentricity = 0.0
......
......@@ -7,7 +7,7 @@ peyote.utils.setup_logger()
time_duration = 1.
sampling_frequency = 4096.
injection_parameters = dict(mass_1=36., mass_2=29., a_1=0, a_2=0, tilt_1=0, tilt_2=0, phi_1=0, phi_2=0,
injection_parameters = dict(mass_1=36., mass_2=29., a_1=0, a_2=0, tilt_1=0, tilt_2=0, phi_12=0, phi_jl=0,
luminosity_distance=2500., iota=0.4, psi=2.659, phase=1.3, geocent_time=1126259642.413,
waveform_approximant='IMRPhenomPv2', reference_frequency=50., ra=1.375, dec=-1.2108)
......@@ -45,7 +45,7 @@ priors = {}
priors['mass_1'] = peyote.prior.Uniform(
lower=35, upper=37, name='mass_1', latex_label='$m_1$')
priors['luminosity_distance'] = peyote.prior.create_default_prior('luminosity_distance')
for key in ['mass_2', 'a_1', 'a_2', 'tilt_1', 'tilt_2', 'phi_1', 'phi_2', 'phase', 'psi', 'iota', 'ra',
for key in ['mass_2', 'a_1', 'a_2', 'tilt_1', 'tilt_2', 'phi_12', 'phi_jl', 'phase', 'psi', 'iota', 'ra',
'dec', 'geocent_time']:
priors[key] = injection_parameters[key]
......
......@@ -15,7 +15,7 @@ L1, sampling_frequency, time_duration = peyote.detector.get_inteferometer('L1',
IFOs = [H1, L1]
maximum_posterior_estimates = dict(
a_1=0, a_2=0, tilt_1=0, tilt_2=0, phi_1=0, phi_2=0,
a_1=0, a_2=0, tilt_1=0, tilt_2=0, phi_12=0, phi_jl=0,
luminosity_distance=410., iota=2.97305, phase=1.145,
waveform_approximant='IMRPhenomPv2', reference_frequency=50., ra=1.375,
dec=-1.2108, geocent_time=time_of_event, psi=2.659, mass_1=36, mass_2=29)
......
......@@ -17,7 +17,7 @@ prior['mass_2'] = peyote.prior.Uniform(10, 80, 'mass_2')
# Merger time is some time in 2018, shame LIGO will never see it...
time_of_event = np.random.uniform(1198800018, 1230336018)
prior['geocent_time'] = peyote.prior.Uniform(time_of_event-0.01, time_of_event+0.01, name='geocent_time')
for name in ['a_1', 'a_2', 'tilt_1', 'tilt_2', 'phi_1', 'phi_2', 'luminosity_distance', 'iota', 'psi', 'ra', 'dec',
for name in ['a_1', 'a_2', 'tilt_1', 'tilt_2', 'phi_12', 'phi_jl', 'luminosity_distance', 'iota', 'psi', 'ra', 'dec',
'phase']:
prior[name] = peyote.prior.create_default_prior(name)
......
......@@ -19,8 +19,8 @@ simulation_parameters = dict(
a_2=0,
tilt_1=0,
tilt_2=0,
phi_1=0,
phi_2=0,
phi_12=0,
phi_jl=0,
luminosity_distance=100.,
iota=0.4,
phase=1.3,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment