Skip to content
Snippets Groups Projects
Commit b75c1c97 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Update 150914 to new spin components

- Also adds matplotlib backend default to avoid issues on servers
- Shrinks psi/phase prior
- Standardish run_sampler call
parent 20d859ad
No related branches found
No related tags found
No related merge requests found
Pipeline #
from __future__ import division
import matplotlib
matplotlib.use('AGG')
import peyote
import numpy as np
peyote.utils.setup_logger()
......@@ -12,7 +15,7 @@ L1, sampling_frequency, time_duration = peyote.detector.get_inteferometer('L1',
IFOs = [H1, L1]
maximum_posterior_estimates = dict(
spin11=0, spin12=0, spin13=0, spin21=0, spin22=0, spin23=0,
a_1=0, a_2=0, tilt_1=0, tilt_2=0, phi_1=0, phi_2=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)
......@@ -21,8 +24,8 @@ maximum_posterior_estimates = dict(
prior = peyote.prior.parse_floats_to_fixed_priors(maximum_posterior_estimates)
prior['ra'] = peyote.prior.create_default_prior(name='ra')
prior['dec'] = peyote.prior.create_default_prior(name='dec')
prior['psi'] = peyote.prior.create_default_prior(name='psi')
prior['phase'] = peyote.prior.create_default_prior(name='phase')
prior['psi'] = peyote.prior.Uniform(0, np.pi/2, 'psi')
prior['phase'] = peyote.prior.Uniform(0, np.pi/2, 'phase')
prior['iota'] = peyote.prior.create_default_prior(name='iota')
prior['mass_1'] = peyote.prior.Uniform(10, 80, 'mass_1')
prior['mass_2'] = peyote.prior.Uniform(10, 80, 'mass_2')
......@@ -42,7 +45,6 @@ likelihood = peyote.likelihood.Likelihood(IFOs, waveformgenerator)
# Run the sampler
result, sampler = peyote.sampler.run_sampler(
likelihood, prior, label='GW150914', sampler='pymultinest',
n_live_points=512, verbose=True, resume=False, outdir=outdir,
use_ratio=True)
npoints=1024, resume=False, outdir=outdir, use_ratio=True)
truth = [maximum_posterior_estimates[x] for x in result.search_parameter_keys]
sampler.plot_corner(truth=truth)
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