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

Fix bug

?
parent b96e42e4
No related branches found
No related tags found
No related merge requests found
Showing
with 28 additions and 63 deletions
# These are the default priors for analysing GW150914.
mass_1 = Uniform(name='mass_1', minimum=30, maximum=50, unit='$M_{\odot}$', boundary=None)
mass_2 = Uniform(name='mass_2', minimum=20, maximum=40, unit='$M_{\odot}$', boundary=None)
mass_ratio = Constraint(name='mass_ratio', minimum=0.125, maximum=1)
a_1 = Uniform(name='a_1', minimum=0, maximum=0.8, boundary='reflective')
a_2 = Uniform(name='a_2', minimum=0, maximum=0.8, boundary='reflective')
tilt_1 = Sine(name='tilt_1', boundary='reflective')
tilt_2 = Sine(name='tilt_2', boundary='reflective')
phi_12 = Uniform(name='phi_12', minimum=0, maximum=2 * np.pi, boundary='periodic')
phi_jl = Uniform(name='phi_jl', minimum=0, maximum=2 * np.pi, boundary='periodic')
luminosity_distance = bilby.gw.prior.UniformSourceFrame(name='luminosity_distance', minimum=1e2, maximum=1e3, unit='Mpc', boundary=None)
dec = Cosine(name='dec', boundary='reflective')
ra = Uniform(name='ra', minimum=0, maximum=2 * np.pi, boundary='periodic')
theta_jn = Sine(name='theta_jn', boundary='reflective')
psi = Uniform(name='psi', minimum=0, maximum=np.pi, boundary='periodic')
phase = Uniform(name='phase', minimum=0, maximum=2 * np.pi, boundary='periodic')
geocent_time = Uniform(1126259462.322, 1126259462.522, name='geocent_time', unit='$s$', boundary=None)
# These are the calibration parameters as described in
# https://journals.aps.org/prx/abstract/10.1103/PhysRevX.6.041015
# recalib_H1_frequency_0 = 20
# recalib_H1_frequency_1 = 54
# recalib_H1_frequency_2 = 143
# recalib_H1_frequency_3 = 383
# recalib_H1_frequency_4 = 1024
# recalib_H1_amplitude_0 = Gaussian(mu=0, sigma=0.048, name='recalib_H1_amplitude_0), '$\\delta A_{H0}$'
# recalib_H1_amplitude_1 = Gaussian(mu=0, sigma=0.048, name='recalib_H1_amplitude_1), '$\\delta A_{H1}$'
# recalib_H1_amplitude_2 = Gaussian(mu=0, sigma=0.048, name='recalib_H1_amplitude_2), '$\\delta A_{H2}$'
# recalib_H1_amplitude_3 = Gaussian(mu=0, sigma=0.048, name='recalib_H1_amplitude_3), '$\\delta A_{H3}$'
# recalib_H1_amplitude_4 = Gaussian(mu=0, sigma=0.048, name='recalib_H1_amplitude_4), '$\\delta A_{H4}$'
# recalib_H1_phase_0 = Gaussian(mu=0, sigma=0.056, name='recalib_H1_phase_0', '$\\delta \\phi_{H0}$')
# recalib_H1_phase_1 = Gaussian(mu=0, sigma=0.056, name='recalib_H1_phase_1', '$\\delta \\phi_{H1}$')
# recalib_H1_phase_2 = Gaussian(mu=0, sigma=0.056, name='recalib_H1_phase_2', '$\\delta \\phi_{H2}$')
# recalib_H1_phase_3 = Gaussian(mu=0, sigma=0.056, name='recalib_H1_phase_3', '$\\delta \\phi_{H3}$')
# recalib_H1_phase_4 = Gaussian(mu=0, sigma=0.056, name='recalib_H1_phase_4', '$\\delta \\phi_{H4}$')
# recalib_L1_frequency_0 = 20
# recalib_L1_frequency_1 = 54
# recalib_L1_frequency_2 = 143
# recalib_L1_frequency_3 = 383
# recalib_L1_frequency_4 = 1024
# recalib_L1_amplitude_0 = Gaussian(mu=0, sigma=0.082, name='recalib_L1_amplitude_0), '$\\delta A_{L0}$'
# recalib_L1_amplitude_1 = Gaussian(mu=0, sigma=0.082, name='recalib_L1_amplitude_1), '$\\delta A_{L1}$'
# recalib_L1_amplitude_2 = Gaussian(mu=0, sigma=0.082, name='recalib_L1_amplitude_2), '$\\delta A_{L2}$'
# recalib_L1_amplitude_3 = Gaussian(mu=0, sigma=0.082, name='recalib_L1_amplitude_3), '$\\delta A_{L3}$'
# recalib_L1_amplitude_4 = Gaussian(mu=0, sigma=0.082, name='recalib_L1_amplitude_4), '$\\delta A_{L4}$'
# recalib_L1_phase_0 = Gaussian(mu=0, sigma=0.073, name='recalib_L1_phase_0', '$\\delta \\phi_{L0}$')
# recalib_L1_phase_1 = Gaussian(mu=0, sigma=0.073, name='recalib_L1_phase_1', '$\\delta \\phi_{L1}$')
# recalib_L1_phase_2 = Gaussian(mu=0, sigma=0.073, name='recalib_L1_phase_2', '$\\delta \\phi_{L2}$')
# recalib_L1_phase_3 = Gaussian(mu=0, sigma=0.073, name='recalib_L1_phase_3', '$\\delta \\phi_{L3}$')
# recalib_L1_phase_4 = Gaussian(mu=0, sigma=0.073, name='recalib_L1_phase_4', '$\\delta \\phi_{L4}$')
......@@ -2,32 +2,32 @@
Examples
========
1. `General inference examples <https://git.ligo.org/lscsoft/bilby/tree/master/examples/other_examples>`_
1. `General inference examples <https://git.ligo.org/lscsoft/bilby/tree/master/examples/core_examples>`_
- `A simple Gaussian likelihood <https://git.ligo.org/lscsoft/bilby/blob/master/examples/core_examples/gaussian_example.py>`_: a good example to see how to write your own likelihood.
- `Linear regression for unknown noise <https://git.ligo.org/lscsoft/bilby/blob/master/examples/core_examples/linear_regression_unknown_noise.py>`_: fitting to general time-domain data.
- `A simple Gaussian likelihood <https://git.ligo.org/lscsoft/bilby/blob/master/examples/other_examples/gaussian_example.py>`_: a good example to see how to write your own likelihood.
- `Linear regression for unknown noise <https://git.ligo.org/lscsoft/bilby/blob/master/examples/other_examples/linear_regression_unknown_noise.py>`_: fitting to general time-domain data.
2. `Examples of injecting and recovering
data <https://git.ligo.org/lscsoft/bilby/tree/master/examples/injection_examples>`__
data <https://git.ligo.org/lscsoft/bilby/tree/master/examples/gw_examples/injection_examples>`__
- `4-parameter CBC
tutorial <https://git.ligo.org/lscsoft/bilby/blob/master/examples/injection_examples/fast_tutorial.py>`__
tutorial <https://git.ligo.org/lscsoft/bilby/blob/master/examples/gw_examples/injection_examples/fast_tutorial.py>`__
- `15-parameter CBC tutorial
<https://git.ligo.org/lscsoft/bilby/blob/master/examples/injection_examples/fast_tutorial.py>`__
<https://git.ligo.org/lscsoft/bilby/blob/master/examples/gw_examples/injection_examples/standard_15d_cbc_tutorial.py>`__
- `Create your own source
model <https://git.ligo.org/lscsoft/bilby/blob/master/examples/injection_examples/create_your_own_source_model.py>`__
model <https://git.ligo.org/lscsoft/bilby/blob/master/examples/gw_examples/injection_examples/create_your_own_source_model.py>`__
- `Create your own time-domain source
model <https://git.ligo.org/lscsoft/bilby/blob/master/examples/injection_examples/create_your_own_time_domain_source_model.py>`__
model <https://git.ligo.org/lscsoft/bilby/blob/master/examples/gw_examples/injection_examples/create_your_own_time_domain_source_model.py>`__
- `How to specify the
prior <https://git.ligo.org/lscsoft/bilby/blob/master/examples/injection_examples/how_to_specify_the_prior.py>`__
prior <https://git.ligo.org/lscsoft/bilby/blob/master/examples/gw_examples/injection_examples/how_to_specify_the_prior.py>`__
- `Using a partially marginalized
likelihood <https://git.ligo.org/lscsoft/bilby/blob/master/examples/injection_examples/marginalized_likelihood.py>`__
likelihood <https://git.ligo.org/lscsoft/bilby/blob/master/examples/gw_examples/injection_examples/marginalized_likelihood.py>`__
3. `Examples using open
data <https://git.ligo.org/lscsoft/bilby/tree/master/examples/open_data_examples>`__
3. `Examples using open
data <https://git.ligo.org/lscsoft/bilby/tree/master/examples/gw_examples/data_examples>`__
- `Analysing the first Binary Black hole detection,
GW150914 <https://git.ligo.org/lscsoft/bilby/blob/master/examples/open_data_examples/GW150914.py>`__
GW150914 <https://git.ligo.org/lscsoft/bilby/blob/master/examples/gw_examples/data_examples/GW150914.py>`__
4. `Notebook-style
tutorials <https://git.ligo.org/lscsoft/bilby/tree/master/examples/tutorials>`__
......
========
Examples
========
Here we host a large number of example scripts separated into core_examples,
which demonstrate the core features of :code:`bilby`, and gw_examples, which
demonstrate the gravitational-wave-specific features of :code:`bilby`. Finally,
there is also a directory containing various tutorials in the form of
notebooks.
The :code:`basic_tutorial.py` example discussed in arXiv:1811.02042 has been
renamed to `gw_examples/injection_examples/fast_tutorial.py
<https://git.ligo.org/lscsoft/bilby/tree/master/examples/gw_examples/injection_examples/fast_tutorial.py>`_.
File moved
File moved
File moved
File moved
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