Skip to content

Commit afe3dc4

Browse files
committed
couple of small bugfixes
1 parent 5811e1f commit afe3dc4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/pygama/math/histogram.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,13 @@ def better_int_binning(
178178
dx = 1
179179

180180
# Finally, build a good binning from dx
181-
n_bins = np.ceil((x_hi - x_lo) / dx)
181+
final_n_bins = np.ceil((x_hi - x_lo) / dx)
182182
x_lo = np.floor(x_lo)
183-
x_hi = x_lo + n_bins * dx
183+
x_hi = x_lo + final_n_bins * dx
184184
if n_bins is None:
185185
return int(x_lo), int(x_hi), int(dx)
186186
else:
187-
return int(x_lo), int(x_hi), int(n_bins)
187+
return int(x_lo), int(x_hi), int(final_n_bins)
188188

189189

190190
@nb.njit(parallel=False, fastmath=True)

src/pygama/pargen/energy_cal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def hpge_find_energy_peaks(
236236
{
237237
"input_peaks_kev": peaks_kev,
238238
"found_peaks_kev": peaks_kev[iytup],
239-
"found_peaks_locs": detected_max_locs[iytup],
239+
"found_peaks_locs": detected_max_locs[ixtup],
240240
}
241241
)
242242
log.info(f"{len(peaks_kev[iytup])} peaks found:")

0 commit comments

Comments
 (0)