Skip to content

Commit

Permalink
Discared Lukas changes in error
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobychev committed May 14, 2024
1 parent 28db948 commit 60e6db3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/ctapipe/irf/binning.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@

logger = logging.getLogger(__name__)


def check_bins_in_range(bins, range, source="result", raise_error=True):
# `pyirf.binning.create_bins_per_decade` includes the endpoint, if reasonably close.
# So different choices of `n_bins_per_decade` can lead to mismatches, if the same
# `*_energy_{min,max}` is chosen.
low = bins >= range.min * 0.9999999
hig = bins <= range.max * 1.0000001
low = bins >= range.min
hig = bins <= range.max

if not all(low & hig):
with np.printoptions(edgeitems=2, threshold=6, precision=4):
Expand Down

0 comments on commit 60e6db3

Please sign in to comment.