From 5bc9705ec3a760cbadfbfbf9a323b9675e129d42 Mon Sep 17 00:00:00 2001 From: "Jack Y. Araz" Date: Thu, 12 Dec 2024 08:52:11 -0500 Subject: [PATCH] bugfix --- src/spey_pyhf/helper_functions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/spey_pyhf/helper_functions.py b/src/spey_pyhf/helper_functions.py index 694e060..1f59dbf 100644 --- a/src/spey_pyhf/helper_functions.py +++ b/src/spey_pyhf/helper_functions.py @@ -229,14 +229,14 @@ def make_patch(self) -> List[Dict]: patch = [] to_remove = [] for ich, channel in enumerate(self.channels): - if channel in self._signal_dict: + if channel in self._to_remove: + to_remove.append(remove_from_json(ich)) + elif channel in self._signal_dict: patch.append( add_to_json( ich, self._signal_dict[channel], self._signal_modifiers[channel] ) ) - elif channel in self._to_remove: - to_remove.append(remove_from_json(ich)) else: log.warning(f"Undefined channel in the patch set: {channel}")