From 119dd1cc74a4d1b7755afc9e8ced2342daa524ef Mon Sep 17 00:00:00 2001 From: Colm Talbot <colm.talbot@ligo.org> Date: Tue, 24 Sep 2019 22:28:43 -0500 Subject: [PATCH] add live when using checkpointing to fix n effective calulation in dynesty --- bilby/core/sampler/dynesty.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bilby/core/sampler/dynesty.py b/bilby/core/sampler/dynesty.py index 87540c340..efb25f260 100644 --- a/bilby/core/sampler/dynesty.py +++ b/bilby/core/sampler/dynesty.py @@ -295,7 +295,7 @@ class Dynesty(NestedSampler): old_ncall = self.sampler.ncall sampler_kwargs = self.sampler_function_kwargs.copy() sampler_kwargs['maxcall'] = self.n_check_point - sampler_kwargs['add_live'] = False + sampler_kwargs['add_live'] = True self.start_time = datetime.datetime.now() while True: sampler_kwargs['maxcall'] += self.n_check_point @@ -304,6 +304,7 @@ class Dynesty(NestedSampler): break old_ncall = self.sampler.ncall + self.sampler._remove_live_points() self.write_current_state() sampler_kwargs['add_live'] = True -- GitLab