From 06852c5b860163db5ff3eec1934e8ec206481e07 Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 14 Nov 2024 13:43:15 +0000 Subject: [PATCH] fix renaming old log_weight col correctly in importance sampler --- cosmosis/samplers/importance/importance_sampler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cosmosis/samplers/importance/importance_sampler.py b/cosmosis/samplers/importance/importance_sampler.py index 8b4a1085..6de469d4 100644 --- a/cosmosis/samplers/importance/importance_sampler.py +++ b/cosmosis/samplers/importance/importance_sampler.py @@ -92,6 +92,9 @@ def load_samples(self, filename): if code=="weight": code="old_weight" logs.overview("Renaming weight -> old_weight") + elif code == "log_weight": + code = "old_log_weight" + print("Renaming log_weight -> old_log_weight") self.output.add_column(code, float) #Now finally add our actual two sampler outputs, old_like and like