Skip to content

Commit

Permalink
add bounds and include debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jackaraz committed Jul 25, 2024
1 parent acea9e8 commit 4ee5c39
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/spey_pyhf/simplify.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ def __call__(
_, fit_param = fit(
**fit_opts,
initial_parameters=None,
bounds=None,
fixed_poi_value=0.0,
)

Expand Down Expand Up @@ -267,6 +266,10 @@ def __call__(
)
fit_opts = statistical_model.prepare_for_fit(expected=expected)
suggested_fixed = fit_opts["model_configuration"].suggested_fixed
log.debug(
"Number of parameters to be fitted during the scan: "
f"{fit_opts['model_configuration'].npar - len(fit_param)}"
)

samples = []
warnings_list = []
Expand Down Expand Up @@ -316,7 +319,9 @@ def __call__(
_, new_params = fit(
**current_fit_opts,
initial_parameters=init_params.tolist(),
bounds=None,
bounds=current_fit_opts[
"model_configuration"
].suggested_bounds,
)
warnings_list += w

Expand Down

0 comments on commit 4ee5c39

Please sign in to comment.