From 1525f95586ab8a92788ff9aaf7708660cd7190b0 Mon Sep 17 00:00:00 2001 From: Alexander Harvey Nitz Date: Thu, 11 May 2023 15:37:35 -0400 Subject: [PATCH] more logging --- pycbc/inference/sampler/refine.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pycbc/inference/sampler/refine.py b/pycbc/inference/sampler/refine.py index 4ee2731e53d..075056cfe41 100644 --- a/pycbc/inference/sampler/refine.py +++ b/pycbc/inference/sampler/refine.py @@ -98,8 +98,10 @@ def __init__(self, model, *args, nprocesses=1, use_mpi=False, def draw_samples(self, size): """Draw new samples within the model priors""" + logging.info('getting from kde') ksamples = self.kde.resample(size=size) params = {k: ksamples[i, :] for i, k in enumerate(self.vparam)} + logging.info('checking prior') keep = self.model.prior_distribution.contains(params) return ksamples[:, keep] @@ -228,7 +230,9 @@ def run(self): logging.info('Drawing final samples') ksamples = self.draw_samples(self.num_samples) + logging.info('Calculating final likelihoods') ksamples, logp, logl, logw = self.run_samples(ksamples) self._samples = {k: ksamples[j,:] for j, k in enumerate(self.vparam)} self._samples['loglikelihood'] = logl + logging.info("Reweighting to equal samples") self._samples = resample_equal(self._samples, logw)