From 6cb6ae4aa036c8e6f7594c54fc7c4f01ecea7c0e Mon Sep 17 00:00:00 2001
From: Gregory Ashton <gregory.ashton@ligo.org>
Date: Mon, 4 Apr 2022 19:23:54 +0000
Subject: [PATCH] Resolve "Bilby-MCMC unable to handle calibration parameters
 when using the ensemble sampler"

---
 bilby/bilby_mcmc/proposals.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/bilby/bilby_mcmc/proposals.py b/bilby/bilby_mcmc/proposals.py
index 2c4ffe4ae..e7363fe8d 100644
--- a/bilby/bilby_mcmc/proposals.py
+++ b/bilby/bilby_mcmc/proposals.py
@@ -983,9 +983,12 @@ def get_proposal_cycle(string, priors, L1steps=1, warn=True):
             first_fit=1000, nsamples_for_density=10000, fit_multiplier=2
         )
 
+        all_but_cal = [key for key in priors if "recalib" not in key]
         plist = [
-            AdaptiveGaussianProposal(priors, weight=small_weight),
-            DifferentialEvolutionProposal(priors, weight=small_weight),
+            AdaptiveGaussianProposal(priors, weight=small_weight, subset=all_but_cal),
+            DifferentialEvolutionProposal(
+                priors, weight=small_weight, subset=all_but_cal
+            ),
         ]
 
         if GMMProposal.check_dependencies(warn=warn) is False:
-- 
GitLab