Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • john-veitch/bilby
  • duncanmmacleod/bilby
  • colm.talbot/bilby
  • lscsoft/bilby
  • matthew-pitkin/bilby
  • salvatore-vitale/tupak
  • charlie.hoy/bilby
  • bfarr/bilby
  • virginia.demilio/bilby
  • vivien/bilby
  • eric-howell/bilby
  • sebastian-khan/bilby
  • rhys.green/bilby
  • moritz.huebner/bilby
  • joseph.mills/bilby
  • scott.coughlin/bilby
  • matthew.carney/bilby
  • hyungwon.lee/bilby
  • monica.rizzo/bilby
  • christopher-berry/bilby
  • lindsay.demarchi/bilby
  • kaushik.rao/bilby
  • charles.kimball/bilby
  • andrew.matas/bilby
  • juan.calderonbustillo/bilby
  • patrick-meyers/bilby
  • hannah.middleton/bilby
  • eve.chase/bilby
  • grant.meadors/bilby
  • khun.phukon/bilby
  • sumeet.kulkarni/bilby
  • daniel.reardon/bilby
  • cjhaster/bilby
  • sylvia.biscoveanu/bilby
  • james-clark/bilby
  • meg.millhouse/bilby
  • joshua.willis/bilby
  • nikhil.sarin/bilby
  • paul.easter/bilby
  • youngmin/bilby
  • daniel-williams/bilby
  • shanika.galaudage/bilby
  • bruce.edelman/bilby
  • avi.vajpeyi/bilby
  • isobel.romero-shaw/bilby
  • andrew.kim/bilby
  • dominika.zieba/bilby
  • jonathan.davies/bilby
  • marc.arene/bilby
  • srishti.tiwari/bilby-tidal-heating-eccentric
  • aditya.vijaykumar/bilby
  • michael.williams/bilby
  • cecilio.garcia-quiros/bilby
  • rory-smith/bilby
  • maite.mateu-lucena/bilby
  • wushichao/bilby
  • kaylee.desoto/bilby
  • brandon.piotrzkowski/bilby
  • rossella.gamba/bilby
  • hunter.gabbard/bilby
  • deep.chatterjee/bilby
  • tathagata.ghosh/bilby
  • arunava.mukherjee/bilby
  • philip.relton/bilby
  • reed.essick/bilby
  • pawan.gupta/bilby
  • francisco.hernandez/bilby
  • rhiannon.udall/bilby
  • leo.tsukada/bilby
  • will-farr/bilby
  • vijay.varma/bilby
  • jeremy.baier/bilby
  • joshua.brandt/bilby
  • ethan.payne/bilby
  • ka-lok.lo/bilby
  • antoni.ramos-buades/bilby
  • oliviastephany.wilk/bilby
  • jack.heinzel/bilby
  • samson.leong/bilby-psi4
  • viviana.caceres/bilby
  • nadia.qutob/bilby
  • michael-coughlin/bilby
  • hemantakumar.phurailatpam/bilby
  • boris.goncharov/bilby
  • sama.al-shammari/bilby
  • siqi.zhong/bilby
  • jocelyn-read/bilby
  • marc.penuliar/bilby
  • stephanie.letourneau/bilby
  • alexandresebastien.goettel/bilby
  • alec.gunny/bilby
  • serguei.ossokine/bilby
  • pratyusava.baral/bilby
  • sophie.hourihane/bilby
  • eunsub/bilby
  • james.hart/bilby
  • pratyusava.baral/bilby-tg
  • zhaozc/bilby
  • pratyusava.baral/bilby_SoG
  • tomasz.baka/bilby
  • nicogerardo.bers/bilby
  • soumen.roy/bilby
  • isaac.mcmahon/healpix-redundancy
  • asamakai.baker/bilby-frequency-dependent-antenna-pattern-functions
  • anna.puecher/bilby
  • pratyusava.baral/bilby-x-g
  • thibeau.wouters/bilby
  • christian.adamcewicz/bilby
  • raffi.enficiaud/bilby
109 results
Show changes
Commits on Source (2)
......@@ -44,15 +44,6 @@ basic-3.7:
<<: *test-python
image: python:3.7
# test example on python 2
python-2.7:
stage: test
image: bilbydev/bilby-test-suite-python27
script:
- python -m pip install .
# Run tests without finding coverage
- pytest --ignore=test/utils_py3_test.py
# test example on python 3
python-3.7:
stage: test
......@@ -97,7 +88,6 @@ pages:
stage: deploy
dependencies:
- python-3.7
- python-2.7
script:
- mkdir public/
- mv htmlcov/ public/
......
......@@ -57,6 +57,8 @@ class Emcee(MCMCSampler):
pos0=None, nburn=None, burn_in_fraction=0.25, resume=True,
burn_in_act=3, **kwargs):
import emcee
self.emcee = emcee
if LooseVersion(emcee.__version__) > LooseVersion('2.2.1'):
self.prerelease = True
else:
......@@ -93,8 +95,8 @@ class Emcee(MCMCSampler):
@property
def sampler_function_kwargs(self):
import emcee
keys = ['lnprob0', 'rstate0', 'blobs0', 'iterations', 'thin', 'storechain', 'mh_proposal']
keys = ['lnprob0', 'rstate0', 'blobs0', 'iterations', 'thin',
'storechain', 'mh_proposal']
# updated function keywords for emcee > v2.2.1
updatekeys = {'p0': 'initial_state',
......@@ -107,7 +109,8 @@ class Emcee(MCMCSampler):
if self.prerelease:
if function_kwargs['mh_proposal'] is not None:
logger.warning("The 'mh_proposal' option is no longer used "
"in emcee v{}, and will be ignored.".format(emcee.__version__))
"in emcee v{}, and will be ignored.".format(
self.emcee.__version__))
del function_kwargs['mh_proposal']
for key in updatekeys:
......@@ -259,8 +262,7 @@ class Emcee(MCMCSampler):
sys.exit()
def _initialise_sampler(self):
import emcee
self._sampler = emcee.EnsembleSampler(**self.sampler_init_kwargs)
self._sampler = self.emcee.EnsembleSampler(**self.sampler_init_kwargs)
self._init_chain_file()
@property
......@@ -307,7 +309,10 @@ class Emcee(MCMCSampler):
This is used when loading in a sampler from a pickle file to figure out
how much of the run has already been completed
"""
return len(self.sampler.blobs)
try:
return len(self.sampler.blobs)
except AttributeError:
return 0
def _draw_pos0_from_prior(self):
return np.array(
......@@ -344,7 +349,10 @@ class Emcee(MCMCSampler):
iterations = sampler_function_kwargs.pop('iterations')
iterations -= self._previous_iterations
sampler_function_kwargs['p0'] = self.pos0
if self.prerelease:
sampler_function_kwargs['initial_state'] = self.pos0
else:
sampler_function_kwargs['p0'] = self.pos0
# main iteration loop
for sample in tqdm(
......
......@@ -124,7 +124,7 @@ class TestGWUtils(unittest.TestCase):
strain = gwutils.read_frame_file(
filename, start_time=None, end_time=None, channel=channel)
self.assertEqual(strain.channel.name, channel)
self.assertTrue(np.all(strain.value==data))
self.assertTrue(np.all(strain.value==data[:-1]))
# Check reading with time limits
start_cut = 2
......@@ -138,12 +138,12 @@ class TestGWUtils(unittest.TestCase):
# Check reading with unknown channels
strain = gwutils.read_frame_file(
filename, start_time=None, end_time=None)
self.assertTrue(np.all(strain.value==data))
self.assertTrue(np.all(strain.value==data[:-1]))
# Check reading with incorrect channel
strain = gwutils.read_frame_file(
filename, start_time=None, end_time=None, channel='WRONG')
self.assertTrue(np.all(strain.value==data))
self.assertTrue(np.all(strain.value==data[:-1]))
ts = gwpy.timeseries.TimeSeries(data=data, times=times, t0=0)
ts.name = 'NOT-A-KNOWN-CHANNEL'
......