@@ -17,7 +17,6 @@ def __init__(self, pulsemap):
1717class I3FeatureExtractorIceCube86 (I3FeatureExtractor ):
1818 def __call__ (self , frame ) -> dict :
1919 """Extract features to be used as inputs to GNN models."""
20-
2120 output = {
2221 "charge" : [],
2322 "dom_time" : [],
@@ -27,6 +26,10 @@ def __call__(self, frame) -> dict:
2726 "width" : [],
2827 "pmt_area" : [],
2928 "rde" : [],
29+ "is_bright_dom" : [],
30+ "is_bad_dom" : [],
31+ "is_saturated_dom" : [],
32+ "is_errata_dom" : [],
3033 }
3134
3235 # Get OM data
@@ -36,6 +39,23 @@ def __call__(self, frame) -> dict:
3639 self ._calibration ,
3740 )
3841
42+ # Added these :
43+ bright_doms = None
44+ bad_doms = None
45+ saturation_windows = None
46+ calibration_errata = None
47+ if "BrightDOMs" in frame :
48+ bright_doms = frame .Get ("BrightDOMs" )
49+
50+ if "BadDomsList" in frame :
51+ bad_doms = frame .Get ("BadDomsList" )
52+
53+ if "SaturationWindows" in frame :
54+ saturation_windows = frame .Get ("SaturationWindows" )
55+
56+ if "CalibrationErrata" in frame :
57+ calibration_errata = frame .Get ("CalibrationErrata" )
58+
3959 for om_key in om_keys :
4060 # Common values for each OM
4161 x = self ._gcd_dict [om_key ].position .x
@@ -44,6 +64,27 @@ def __call__(self, frame) -> dict:
4464 area = self ._gcd_dict [om_key ].area
4565 rde = self ._get_relative_dom_efficiency (frame , om_key )
4666
67+ # DOM flags
68+ if bright_doms :
69+ is_bright_dom = 1 if om_key in bright_doms else 0
70+ else :
71+ is_bright_dom = - 1
72+
73+ if bad_doms :
74+ is_bad_dom = 1 if om_key in bad_doms else 0
75+ else :
76+ is_bad_dom = - 1
77+
78+ if saturation_windows :
79+ is_saturated_dom = 1 if om_key in saturation_windows else 0
80+ else :
81+ is_saturated_dom = - 1
82+
83+ if calibration_errata :
84+ is_errata_dom = 1 if om_key in calibration_errata else 0
85+ else :
86+ is_errata_dom = - 1
87+
4788 # Loop over pulses for each OM
4889 pulses = data [om_key ]
4990 for pulse in pulses :
@@ -55,7 +96,11 @@ def __call__(self, frame) -> dict:
5596 output ["dom_x" ].append (x )
5697 output ["dom_y" ].append (y )
5798 output ["dom_z" ].append (z )
58-
99+ # DOM flags
100+ output ["is_bright_dom" ].append (is_bright_dom )
101+ output ["is_bad_dom" ].append (is_bad_dom )
102+ output ["is_saturated_dom" ].append (is_saturated_dom )
103+ output ["is_errata_dom" ].append (is_errata_dom )
59104 return output
60105
61106 def _get_relative_dom_efficiency (self , frame , om_key ):
0 commit comments