Skip to content

Commit

Permalink
add peak top fits
Browse files Browse the repository at this point in the history
  • Loading branch information
ggmarshall committed Mar 20, 2024
1 parent ee6a5ac commit aa3b3c8
Show file tree
Hide file tree
Showing 3 changed files with 340 additions and 15 deletions.
4 changes: 3 additions & 1 deletion src/pygama/math/binned_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ def fit_binned(func: Callable, hist: np.ndarray, bins: np.ndarray, var: np.ndarr

m = Minuit(cost_func, *guess)
if bounds is not None:
m.limits = bounds
if isinstance(bounds, dict):
for key, val in bounds.items():
m.limits[key] = val
if fixed is not None:
for fix in fixed:
m.fixed[fix] = True
Expand Down
Loading

0 comments on commit aa3b3c8

Please sign in to comment.