Skip to content

Commit

Permalink
Fix j>=0 condition
Browse files Browse the repository at this point in the history
  • Loading branch information
gschwefer committed Apr 25, 2024
1 parent 03bd7f3 commit bb99355
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ctapipe/image/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ def adaptive_centroid(waveforms, peak_index, rel_descend_limit, centroids):
sum_ += waveforms[j]
jsum += j * waveforms[j]
j -= 1
if j > 0 and waveforms[j] > peak_amplitude:
if j >= 0 and waveforms[j] > peak_amplitude:
descend_limit = rel_descend_limit * peak_amplitude

j = peak_index + 1
Expand Down

0 comments on commit bb99355

Please sign in to comment.