Skip to content

Commit 22b3903

Browse files
committed
add over/underflow metadata
1 parent 9e8eaba commit 22b3903

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/ctapipe/irf/event_weighter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import numpy as np
1010
from astropy import units as u
1111
from astropy.table import QTable
12-
from pyirf.binning import calculate_bin_indices
12+
from pyirf.binning import OVERFLOW_INDEX, UNDERFLOW_INDEX, calculate_bin_indices
1313
from pyirf.spectral import (
1414
calculate_event_weights,
1515
)
@@ -161,3 +161,5 @@ def _compute_weights(self, events_table: QTable):
161161
].description = "True if event's offset was inside the binning range."
162162

163163
events_table.meta["OFFSBINS"] = list(offset_bins.to_value("deg"))
164+
events_table.meta["BINOVER"] = OVERFLOW_INDEX
165+
events_table.meta["BINUNDR"] = UNDERFLOW_INDEX

0 commit comments

Comments
 (0)