Skip to content

Commit

Permalink
improve peakfit boundary conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
mieskolainen committed Jul 16, 2024
1 parent 43d6e9c commit b9e9cda
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions icefit/icepeak.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ def analyze_1D_fit(hist, param: dict, techno: dict, fitfunc,

counts = d['counts']
errors = d['errors']
bin_edges = d['bin_edges']
cbins = d['bin_center']
range_mask = d['range_mask']
fitbin_mask = d['fitbin_mask']
Expand All @@ -775,9 +776,10 @@ def analyze_1D_fit(hist, param: dict, techno: dict, fitfunc,
# --------------------------------------------------------------------
## Create fit functions

# Samples on x-axis
x = np.linspace(np.min(cbins[range_mask]), np.max(cbins[range_mask]), int(nsamples))

# Samples on x-axis between [first_edge, ..., last_edge]
index = np.where(range_mask)[0]
x = np.linspace(np.min(bin_edges[index]), np.max(bin_edges[index+1]), int(nsamples))

# Loop over function components
y = {}
for key in param['components']:
Expand Down

0 comments on commit b9e9cda

Please sign in to comment.