Skip to content
Snippets Groups Projects
Commit 39c7b7ae authored by Moritz Huebner's avatar Moritz Huebner
Browse files

Merge branch 'master' into docstring_update

# Conflicts:
#	tupak/gw/conversion.py
#	tupak/gw/detector.py
#	tupak/gw/likelihood.py
#	tupak/gw/utils.py
#	tupak/gw/waveform_generator.py
parents f7cd4b44 ed7dee9d
No related branches found
No related tags found
1 merge request!63Docstring update
Pipeline #
Showing
with 274 additions and 155 deletions
......@@ -22,21 +22,24 @@ exitcode-jessie:
# CI is too old and fails when trying to install lalsuite
- sed -i '/lalsuite/d' requirements.txt
- pip install -r requirements.txt
- pip install coverage
- pip install 'coverage>=4.5'
- pip install coverage-badge
script:
- python setup.py install
# Run tests and collect coverage data
- coverage --version
- coverage erase
- coverage run --source=tupak/ -a test/conversion_tests.py
- coverage run --source=tupak/ -a test/detector_tests.py
- coverage run --source=tupak/ -a test/prior_tests.py
- coverage run --source=tupak/ -a test/sampler_tests.py
- coverage run --source=tupak/ -a test/waveform_generator_tests.py
- coverage run --omit=* -a test/example_tests.py
- coverage run --omit=* -a test/noise_realisation_tests.py
- coverage run --omit=* -a test/tests.py
- coverage html
- coverage-badge -o coverage_badge.svg -f
# Run all other tests (no coverage data collected)
- python test/example_tests.py
- python test/noise_realisation_tests.py
- python test/other_tests.py
# Make the documentation
- pip install -r docs/requirements.txt
......
include README.rst
[![pipeline status](https://git.ligo.org/Monash/tupak/badges/master/pipeline.svg)](https://git.ligo.org/Monash/tupak/commits/master)
[![coverage report](https://monash.docs.ligo.org/tupak/coverage_badge.svg)](
https://monash.docs.ligo.org/tupak/htmlcov/)
# Tupak
Fulfilling all your gravitational wave dreams.
Documentation can be found
[here](https://monash.docs.ligo.org/tupak/index.html). This and the code in
general are a work in progress. We encourage you to submit issues via are
[issue tracker](https://git.ligo.org/Monash/tupak/issues) and contribute to the
development via a merge request (for help in creating a merge request, see
[this page](https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html) or
contact us directly.
## Example
To get started with `tupak`, we have a few examples and tutorials:
1. [Examples of injecting and recovering data](https://git.ligo.org/Monash/tupak/tree/master/examples/injection_examples)
* [A basic tutorial](https://git.ligo.org/Monash/tupak/blob/master/examples/injection_examples/basic_tutorial.py)
* [Create your own source model](https://git.ligo.org/Monash/tupak/blob/master/examples/injection_examples/create_your_own_source_model.py)
* [Create your own time-domain source model](https://git.ligo.org/Monash/tupak/blob/master/examples/injection_examples/create_your_own_time_domain_source_model.py)
* [How to specify the prior](https://git.ligo.org/Monash/tupak/blob/master/examples/injection_examples/how_to_specify_the_prior.py)
* [Using a partially marginalized likelihood](https://git.ligo.org/Monash/tupak/blob/master/examples/injection_examples/marginalized_likelihood.py)
2. [Examples using open data](https://git.ligo.org/Monash/tupak/tree/master/examples/open_data_examples)
* [Analysing the first Binary Black hole detection, GW150914](https://git.ligo.org/Monash/tupak/blob/master/examples/open_data_examples/GW150914.py)
3. [Notebook-style tutorials](https://git.ligo.org/Monash/tupak/tree/master/examples/tutorials)
* [Comparing different samplers](https://git.ligo.org/Monash/tupak/blob/master/examples/tutorials/compare_samplers.ipynb)
* [Visualising the output](https://git.ligo.org/Monash/tupak/blob/master/examples/tutorials/visualising_the_results.ipynb)
## Installation
`tupak` is developed to work with both Python 2.7+ and Python 3+. In the
following, we assume you have a working python installation, [python
pip](https://packaging.python.org/tutorials/installing-packages/#use-pip-for-installing),
and [git](https://git-scm.com/).
### Install tupak
Clone the repository, install the requirements, and then install `tupak`.
```bash
$ git clone git@git.ligo.org:Monash/tupak.git
$ cd tupak/
$ pip install -r requirements.txt
$ python setup.py install
```
Once you have run these steps, you have `tupak` installed. You can now try to
run the examples. However, for many gravitational-wave related examples you'll
also need to install `lalsuite`.
### Install lalsuite
We recommend you install `lalsuite` the simple way:
```bash
$ pip install lalsuite.
```
If this doesn't work, or you prefer to, you can also install from source.
Head to
[https://git.ligo.org/lscsoft/lalsuite](https://git.ligo.org/lscsoft/lalsuite)
to check you have an account and SSH keys set up. Then,
```bash
$ git lfs install # you may need to install git-lfs first
$ git clone git@git.ligo.org:lscsoft/lalsuite.git
$ cd lalsuite
$ ./00boot
$ ./configure --prefix=${HOME}/lalsuite-install --disable-all-lal --enable-swig --enable-lalsimulation
$ make; make install
```
Warning: in the configure line here, we have disabled everything except
lalsimulation. If you need other modules, see `./configure --help`.
### Install pymultinest
If you want to use the `pymultinest` sampler, you first need the
MultiNest library to be installed to work properly. The full instructions can
be found [here](https://johannesbuchner.github.io/PyMultiNest/install.html). We
have also written [a shortened tl;dr here](./TLDR_MULTINEST.md).
## Tests and coverage
We have a variety of tests which can be found in the `tests` directory. You
can find a [current coverage report for master
here.](https://monash.docs.ligo.org/tupak/htmlcov/).
|pipeline status| |coverage report|
Tupak
=====
Fulfilling all your gravitational wave dreams.
- `Installation
instructions <https://monash.docs.ligo.org/tupak/installation.html>`__
- `Documentation <https://monash.docs.ligo.org/tupak/index.html>`__.
- `Issue tracker <https://git.ligo.org/Monash/tupak/issues>`__
We encourage you to contribute to the development via a merge request. For
help in creating a merge request, see `this page
<https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html>`__ or contact
us directly.
Examples
--------
To get started with ``tupak``, we have a few examples and tutorials:
1. `Examples of injecting and recovering
data <https://git.ligo.org/Monash/tupak/tree/master/examples/injection_examples>`__
- `A basic
tutorial <https://git.ligo.org/Monash/tupak/blob/master/examples/injection_examples/basic_tutorial.py>`__
- `Create your own source
model <https://git.ligo.org/Monash/tupak/blob/master/examples/injection_examples/create_your_own_source_model.py>`__
- `Create your own time-domain source
model <https://git.ligo.org/Monash/tupak/blob/master/examples/injection_examples/create_your_own_time_domain_source_model.py>`__
- `How to specify the
prior <https://git.ligo.org/Monash/tupak/blob/master/examples/injection_examples/how_to_specify_the_prior.py>`__
- `Using a partially marginalized
likelihood <https://git.ligo.org/Monash/tupak/blob/master/examples/injection_examples/marginalized_likelihood.py>`__
2. `Examples using open
data <https://git.ligo.org/Monash/tupak/tree/master/examples/open_data_examples>`__
- `Analysing the first Binary Black hole detection,
GW150914 <https://git.ligo.org/Monash/tupak/blob/master/examples/open_data_examples/GW150914.py>`__
3. `Notebook-style
tutorials <https://git.ligo.org/Monash/tupak/tree/master/examples/tutorials>`__
- `Comparing different
samplers <https://git.ligo.org/Monash/tupak/blob/master/examples/tutorials/compare_samplers.ipynb>`__
- `Visualising the
output <https://git.ligo.org/Monash/tupak/blob/master/examples/tutorials/visualising_the_results.ipynb>`__
.. |pipeline status| image:: https://git.ligo.org/Monash/tupak/badges/master/pipeline.svg
:target: https://git.ligo.org/Monash/tupak/commits/master
.. |coverage report| image:: https://monash.docs.ligo.org/tupak/coverage_badge.svg
:target: https://monash.docs.ligo.org/tupak/htmlcov/
Here is a short version, if this fails refer to the full instructions.
First, install the dependencies (for Ubuntu/Linux):
```bash
$ sudo apt-get install python-{scipy,numpy,matplotlib,progressbar} ipython libblas{3,-dev} liblapack{3,-dev} libatlas{3-base,-dev} cmake build-essential git gfortran
```
For Mac, the advice in the instructions are "If you google for “MultiNest Mac OSX” or “PyMultiNest Mac OSX” you will find installation instructions".
The following will place a directory `MultiNest` in your `$HOME` directory, if you want
to place it somewhere, adjust the instructions as such.
```bash
git clone https://github.com/JohannesBuchner/MultiNest $HOME
cd $HOME/MultiNest/build
cmake ..
make
```
Finally, add the libraries to you path. Add this to the `.bashrc` file
```
export LD_LIBRARY_PATH=$HOME/Downloads/MultiNest/lib:
```
(you'll need to resource your `.bashrc` after this, i.e. run `bash`.
......@@ -8,6 +8,7 @@ Welcome to tupak's documentation!
:maxdepth: 3
:caption: Contents:
installation
basics-of-parameter-estimation
compact-binary-coalescence-parameter-estimation
prior
......
============
Installation
============
The lastest stable release of Tupak can be `pip-installed
<https://pypi.org/project/TUPAK/>`_ from
.. code-block:: console
$ pip install tupak
If you would like to install the development version, see the instructions
below.
Install tupak from source
-------------------------
:code:`tupak` is developed to work with both Python 2.7+ and Python 3+. In the
following, we assume you have a working python installation, `python pip
<https://packaging.python.org/tutorials/installing-packages/#use-pip-for-installing)>`_,
and `git <https://git-scm.com/>`_.
Clone the repository, install the requirements, and then install the software:
.. code-block:: console
$ git clone git@git.ligo.org:Monash/tupak.git
$ cd tupak/
$ pip install -r requirements.txt
$ python setup.py install
Once you have run these steps, you have `tupak` installed. You can now try to
run the examples.
.. note::
If you do not have a git.ligo account, and recieve and error message:
.. code-block:: console
git@git.ligo.org: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.
Then you need to use the HTTPS URL, e.g. replace the first line above with
.. code-block:: console
$ git clone https://git.ligo.org/Monash/tupak.git
Installing lalsuite
-------------------
For many gravitational-wave related examples you'll need access to the
`lalsuite <https://wiki.ligo.org/DASWG/LALSuite>`_ tool set. These should be
installed by default in the requirements. However, if you have problems with
your installation, you can first try to install the simple way:
.. code-block:: console
$ pip install lalsuite.
If this doesn't work, or you prefer to, you can also install from source.
First, head to https://git.ligo.org/lscsoft/lalsuite to check you have an
account and SSH keys set up. Then,
.. code-block:: console
$ git lfs install # you may need to install git-lfs first
$ git clone git@git.ligo.org:lscsoft/lalsuite.git
$ cd lalsuite
$ ./00boot
$ ./configure --prefix=${HOME}/lalsuite-install --disable-all-lal --enable-swig --enable-lalsimulation
$ make; make install
Warning: in the configure line here, we have disabled everything except
lalsimulation. If you need other modules, see `./configure --help`.
Installing pymultinest
----------------------
If you want to use the `pymultinest` sampler, you first need the
MultiNest library to be installed to work properly. The full instructions can
be found here: https://johannesbuchner.github.io/PyMultiNest/install.html. Here
is a shortened version:
First, install the dependencies (for Ubuntu/Linux):
.. code-block:: console
$ sudo apt-get install python-{scipy,numpy,matplotlib,progressbar} ipython libblas{3,-dev} liblapack{3,-dev} libatlas{3-base,-dev} cmake build-essential git gfortran
For Mac, the advice in the instructions are "If you google for “MultiNest Mac OSX” or “PyMultiNest Mac OSX” you will find installation instructions".
The following will place a directory `MultiNest` in your :code:`$HOME` directory, if you want
to place it somewhere, adjust the instructions as such.
.. code-block:: console
$ git clone https://github.com/JohannesBuchner/MultiNest $HOME
$ cd $HOME/MultiNest/build
$ cmake ..
$ make
Finally, add the libraries to you path. Add this to the `.bashrc` file
.. code-block:: console
$ export LD_LIBRARY_PATH=$HOME/Downloads/MultiNest/lib:
(you'll need to resource your `.bashrc` after this, i.e. run `bash`).
......@@ -167,11 +167,55 @@ In the last example, we considered only cases with known noise (e.g., a
prespecified standard deviation. We now present a general function which can
handle unknown noise (in which case you need to specify a prior for
:math:`\sigma`, or known noise (in which case you pass the known noise in when
instatiating the likelihood
.. literalinclude:: ../examples/other_examples/linear_regression_unknown_noise.py
:lines: 52-94
instatiating the likelihood::
class GaussianLikelihood(tupak.Likelihood):
def __init__(self, x, y, function, sigma=None):
"""
A general Gaussian likelihood for known or unknown noise - the model
parameters are inferred from the arguments of function
Parameters
----------
x, y: array_like
The data to analyse
function:
The python function to fit to the data. Note, this must take the
dependent variable as its first argument. The other arguments are
will require a prior and will be sampled over (unless a fixed
value is given).
sigma: None, float, array_like
If None, the standard deviation of the noise is unknown and will be
estimated (note: this requires a prior to be given for sigma). If
not None, this defined the standard-deviation of the data points.
This can either be a single float, or an array with length equal
to that for `x` and `y`.
"""
self.x = x
self.y = y
self.N = len(x)
self.sigma = sigma
self.function = function
# These lines of code infer the parameters from the provided function
parameters = inspect.getargspec(function).args
parameters.pop(0)
self.parameters = dict.fromkeys(parameters)
self.function_keys = self.parameters.keys()
if self.sigma is None:
self.parameters['sigma'] = None
def log_likelihood(self):
sigma = self.parameters.get('sigma', self.sigma)
model_parameters = {k: self.parameters[k] for k in self.function_keys}
res = self.y - self.function(self.x, **model_parameters)
return -0.5 * (np.sum((res / sigma)**2)
+ self.N*np.log(2*np.pi*sigma**2))
We provide this general-purpose class as part of tupak:
.. autoclass:: tupak.core.likelihood.GaussianLikelihood
:members:
An example using this likelihood can be found `on this page <https://git.ligo.org/Monash/tupak/blob/master/examples/other_examples/linear_regression_unknown_noise.py>`_.
......
......@@ -39,7 +39,7 @@ If any model parameter required by the :ref:`likelihood` are not defined in the
will try to use a default prior. By default, these are setup for a binary black
hole and defined in a file like this
.. literalinclude:: /../tupak/core/prior_files/binary_black_holes.prior
.. literalinclude:: /../tupak/gw/prior_files/binary_black_holes.prior
You can define your own default prior and pass a string pointing to that file
to :ref:`run_sampler <run_sampler>`.
......
......@@ -29,13 +29,18 @@ np.random.seed(88170235)
# spins of both black holes (a, tilt, phi), etc.
injection_parameters = dict(mass_1=36., mass_2=29., a_1=0.4, a_2=0.3, tilt_1=0.5, tilt_2=1.0, phi_12=1.7, phi_jl=0.3,
luminosity_distance=2000., 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)
ra=1.375, dec=-1.2108)
# Fixed arguments passed into the source model
waveform_arguments = dict(waveform_approximant='IMRPhenomPv2',
reference_frequency=50.)
# Create the waveform_generator using a LAL BinaryBlackHole source function
waveform_generator = tupak.WaveformGenerator(time_duration=time_duration,
sampling_frequency=sampling_frequency,
frequency_domain_source_model=tupak.gw.source.lal_binary_black_hole,
parameters=injection_parameters)
parameters=injection_parameters,
waveform_arguments=waveform_arguments)
hf_signal = waveform_generator.frequency_domain_strain()
# Set up interferometers. In this case we'll use three interferometers (LIGO-Hanford (H1), LIGO-Livingston (L1),
......@@ -69,4 +74,4 @@ result = tupak.run_sampler(likelihood=likelihood, priors=priors, sampler='dynest
# make some plots of the outputs
result.plot_corner()
print(result)
......@@ -27,13 +27,18 @@ np.random.seed(88170235)
# spins of both black holes (a, tilt, phi), etc.
injection_parameters = dict(mass_1=36., mass_2=29., a_1=0.4, a_2=0.3, tilt_1=0.5, tilt_2=1.0, phi_12=1.7, phi_jl=0.3,
luminosity_distance=2000., 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)
ra=1.375, dec=-1.2108)
# Fixed arguments passed into the source model
waveform_arguments = dict(waveform_approximant='IMRPhenomPv2',
reference_frequency=50.)
# Create the waveform_generator using a LAL BinaryBlackHole source function
waveform_generator = tupak.WaveformGenerator(time_duration=time_duration,
sampling_frequency=sampling_frequency,
frequency_domain_source_model=tupak.gw.source.lal_binary_black_hole,
parameters=injection_parameters)
parameters=injection_parameters,
waveform_arguments=waveform_arguments)
hf_signal = waveform_generator.frequency_domain_strain()
# Set up interferometers. In this case we'll use three interferometers (LIGO-Hanford (H1), LIGO-Livingston (L1),
......@@ -66,4 +71,4 @@ result = tupak.run_sampler(likelihood=likelihood, priors=priors, sampler='dynest
# make some plots of the outputs
result.plot_corner()
print(result)
......@@ -27,13 +27,17 @@ np.random.seed(88170235)
# spins of both black holes (a, tilt, phi), etc.
injection_parameters = dict(mass_1=36., mass_2=29., a_1=0.4, a_2=0.3, tilt_1=0.5, tilt_2=1.0, phi_12=1.7, phi_jl=0.3,
luminosity_distance=2000., 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)
ra=1.375, dec=-1.2108)
waveform_arguments = dict(waveform_approximant='IMRPhenomPv2',
reference_frequency=50.)
# Create the waveform_generator using a LAL BinaryBlackHole source function
waveform_generator = tupak.WaveformGenerator(time_duration=time_duration,
sampling_frequency=sampling_frequency,
frequency_domain_source_model=tupak.gw.source.lal_binary_black_hole,
parameters=injection_parameters)
parameters=injection_parameters,
waveform_arguments=waveform_arguments)
hf_signal = waveform_generator.frequency_domain_strain()
# Set up interferometers. In this case we'll use three interferometers (LIGO-Hanford (H1), LIGO-Livingston (L1),
......@@ -66,4 +70,4 @@ result = tupak.run_sampler(likelihood=likelihood, priors=priors, sampler='dynest
# make some plots of the outputs
result.plot_corner()
print(result)
......@@ -20,7 +20,10 @@ np.random.seed(151226)
injection_parameters = dict(mass_1=36., mass_2=29., a_1=0.4, a_2=0.3, tilt_1=0.5, tilt_2=1.0, phi_12=1.7, phi_jl=0.3,
luminosity_distance=3000., 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)
ra=1.375, dec=-1.2108)
waveform_arguments = dict(waveform_approximant='IMRPhenomPv2',
reference_frequency=50.)
# Create the waveform_generator using a LAL BinaryBlackHole source function
waveform_generator = tupak.gw.waveform_generator.WaveformGenerator(
......@@ -28,7 +31,7 @@ waveform_generator = tupak.gw.waveform_generator.WaveformGenerator(
frequency_domain_source_model=tupak.gw.source.lal_binary_black_hole,
parameter_conversion=tupak.gw.conversion.convert_to_lal_binary_black_hole_parameters,
non_standard_sampling_parameter_keys=['chirp_mass', 'mass_ratio'],
parameters=injection_parameters)
parameters=injection_parameters, waveform_arguments=waveform_arguments)
hf_signal = waveform_generator.frequency_domain_strain()
# Set up interferometers.
......@@ -55,4 +58,4 @@ result = tupak.core.sampler.run_sampler(likelihood=likelihood, priors=priors, sa
injection_parameters=injection_parameters, label='DifferentParameters',
outdir=outdir, conversion_function=tupak.gw.conversion.generate_all_bbh_parameters)
result.plot_corner()
print(result)
......@@ -51,4 +51,4 @@ result = tupak.core.sampler.run_sampler(
likelihood, prior, sampler='dynesty', outdir=outdir, label=label,
resume=False, sample='unif', injection_parameters=injection_parameters)
result.plot_corner()
print(result)
......@@ -72,4 +72,4 @@ result = tupak.core.sampler.run_sampler(likelihood, prior, sampler='dynesty', np
outdir=outdir, label=label)
result.plot_corner()
print(result)
......@@ -18,13 +18,17 @@ np.random.seed(151012)
injection_parameters = dict(mass_1=36., mass_2=29., a_1=0.4, a_2=0.3, tilt_1=0.5, tilt_2=1.0, phi_12=1.7, phi_jl=0.3,
luminosity_distance=4000., 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)
ra=1.375, dec=-1.2108)
waveform_arguments = dict(waveform_approximant='IMRPhenomPv2',
reference_frequency=50.)
# Create the waveform_generator using a LAL BinaryBlackHole source function
waveform_generator = tupak.WaveformGenerator(time_duration=time_duration,
sampling_frequency=sampling_frequency,
frequency_domain_source_model=tupak.gw.source.lal_binary_black_hole,
parameters=injection_parameters)
parameters=injection_parameters,
waveform_arguments=waveform_arguments)
hf_signal = waveform_generator.frequency_domain_strain()
# Set up interferometers.
......@@ -60,4 +64,4 @@ likelihood = tupak.GravitationalWaveTransient(interferometers=IFOs, waveform_gen
result = tupak.run_sampler(likelihood=likelihood, priors=priors, sampler='dynesty',
injection_parameters=injection_parameters, outdir=outdir, label='specify_prior')
result.plot_corner()
print(result)
......@@ -17,12 +17,16 @@ np.random.seed(170608)
injection_parameters = dict(mass_1=36., mass_2=29., a_1=0.4, a_2=0.3, tilt_1=0.5, tilt_2=1.0, phi_12=1.7, phi_jl=0.3,
luminosity_distance=4000., 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)
ra=1.375, dec=-1.2108)
waveform_arguments = dict(waveform_approximant='IMRPhenomPv2',
reference_frequency=50.)
# Create the waveform_generator using a LAL BinaryBlackHole source function
waveform_generator = tupak.WaveformGenerator(
time_duration=time_duration, sampling_frequency=sampling_frequency,
frequency_domain_source_model=tupak.gw.source.lal_binary_black_hole, parameters=injection_parameters)
frequency_domain_source_model=tupak.gw.source.lal_binary_black_hole, parameters=injection_parameters,
waveform_arguments=waveform_arguments)
hf_signal = waveform_generator.frequency_domain_strain()
# Set up interferometers.
......@@ -46,4 +50,4 @@ likelihood = tupak.GravitationalWaveTransient(
result = tupak.run_sampler(likelihood=likelihood, priors=priors, sampler='dynesty',
injection_parameters=injection_parameters, outdir=outdir, label='BasicTutorial')
result.plot_corner()
print(result)
......@@ -63,7 +63,7 @@ result = tupak.core.sampler.run_sampler(likelihood=likelihood, priors=priors, sa
# make some plots of the outputs
result.plot_corner()
print(result)
......
......@@ -39,8 +39,8 @@ prior = tupak.gw.prior.BBHPriorSet(filename='GW150914.prior')
waveform_generator = tupak.WaveformGenerator(time_duration=interferometers[0].duration,
sampling_frequency=interferometers[0].sampling_frequency,
frequency_domain_source_model=tupak.gw.source.lal_binary_black_hole,
parameters={'waveform_approximant': 'IMRPhenomPv2',
'reference_frequency': 50})
waveform_arguments={'waveform_approximant': 'IMRPhenomPv2',
'reference_frequency': 50})
# In this step, we define the likelihood. Here we use the standard likelihood
# function, passing it the data and the waveform generator.
......@@ -51,4 +51,4 @@ likelihood = tupak.gw.likelihood.GravitationalWaveTransient(interferometers, wav
result = tupak.run_sampler(likelihood, prior, sampler='dynesty',
outdir=outdir, label=label)
result.plot_corner()
print(result)
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