Skip to content

Commit 85be706

Browse files
committed
when running trials with fixed gamma don't require that gamma is the same as injected
1 parent 8ba9c14 commit 85be706

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

flarestack/core/minimisation.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,17 +212,16 @@ def __init__(self, mh_dict):
212212
self.floor_name = "static_floor"
213213

214214
# run trials for a fixed gamma, by default trials run with gamma fitted
215-
# make sure you pass the same gamma in the llh and injection energy dictionaries
216215
self.fix_gamma = mh_dict.get("fix_gamma", False)
217216
if self.fix_gamma:
218217
assert (
219218
"gamma" in self.llh_dict["llh_energy_pdf"].keys()
220219
), "Running trials with fixed gamma but no gamma passed in the llh energy pdf"
221220
self.llh_gamma = self.llh_dict["llh_energy_pdf"]["gamma"]
222-
inj_gamma = self.inj_dict["injection_energy_pdf"]["gamma"]
223-
assert (
224-
self.llh_gamma == inj_gamma
225-
), f"Fixing gamma to {self.llh_gamma} for llh but injection is with {inj_gamma}"
221+
if self.llh_gamma != self.inj_dict["injection_energy_pdf"]["gamma"]:
222+
logger.warning(
223+
f"Fixing gamma to {self.llh_gamma} for llh but injection is with {self.inj_dict["injection_energy_pdf"]["gamma"]}"
224+
)
226225

227226
p0, bounds, names = self.return_parameter_info(mh_dict)
228227

0 commit comments

Comments
 (0)