Commit d5fad496 authored by Gregory Ashton's avatar Gregory Ashton Committed by Colm Talbot

Fixes the scheduled tests

- Make the test case generate samples from the prior
- Force the marginalized likelihood test to use fixed m1 and m2 to
  ensure no samples are generated with the wrong ordering
- Remove pipenv
parent 47afcd7c
......@@ -79,18 +79,9 @@ scheduled-python-3.7:
image: bilbydev/bilby-test-suite-python37
only:
- schedules
before_script:
# Install the dependencies specified in the Pipfile
- pipenv install --three --python=/opt/conda/bin/python --system --deploy
script:
- python setup.py install
# Run pyflakes
- flake8 .
# Run tests
- pytest
# Run tests which are only done on schedule
- pytest test/example_test.py
- pytest test/gw_example_test.py
......
......@@ -378,6 +378,7 @@ class Dynesty(NestedSampler):
def _run_test(self):
import dynesty
import pandas as pd
self.sampler = dynesty.NestedSampler(
loglikelihood=self.log_likelihood,
prior_transform=self.prior_transform,
......@@ -387,7 +388,8 @@ class Dynesty(NestedSampler):
self.sampler.run_nested(**sampler_kwargs)
self.result.samples = np.random.uniform(0, 1, (100, self.ndim))
self.result.samples = pd.DataFrame(
self.priors.sample(100))[self.search_parameter_keys].values
self.result.log_evidence = np.nan
self.result.log_evidence_err = np.nan
return self.result
......@@ -48,7 +48,7 @@ priors['geocent_time'] = bilby.core.prior.Uniform(
name='geocent_time', latex_label='$t_c$', unit='$s$')
# These parameters will not be sampled
for key in ['a_1', 'a_2', 'tilt_1', 'tilt_2', 'phi_12', 'phi_jl', 'theta_jn', 'ra',
'dec']:
'dec', 'mass_1', 'mass_2']:
priors[key] = injection_parameters[key]
# Initialise GravitationalWaveTransient
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment