Skip to content

Commit

Permalink
bugfix for results of get peaks and valid check before updating guess
Browse files Browse the repository at this point in the history
  • Loading branch information
ggmarshall committed Apr 26, 2024
1 parent fd20746 commit 2c79cd1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pygama/pargen/energy_cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ def hpge_get_energy_peaks(
self.update_results_dict(
{
"input_peaks_kev": input_peaks,
"got_peaks_kev": got_peak_locations,
"got_peaks_locs": matched_energies,
"got_peaks_kev": matched_energies,
"got_peaks_locs": got_peak_locations,
}
)

Expand Down Expand Up @@ -2174,8 +2174,9 @@ def unbinned_staged_energy_fit(
bin_width=bin_width,
**guess_kwargs if guess_kwargs is not None else {},
)
for arg in x0_notail.to_dict():
x0[arg] = x0_notail[arg]
if m.valid:
for arg in x0_notail.to_dict():
x0[arg] = x0_notail[arg]

else:
x0 = guess_func(
Expand Down

0 comments on commit 2c79cd1

Please sign in to comment.