@@ -30,7 +30,7 @@ def _forward(self, data: Data) -> Data:
3030 """
3131
3232 # Check(s)
33- assert self .nb_inputs == 7
33+ # assert self.nb_inputs == 7
3434
3535 # Preprocessing
3636 data .x [:,0 ] /= 100. # dom_x
@@ -50,3 +50,65 @@ def _forward(self, data: Data) -> Data:
5050
5151class IceCubeDeepCore (IceCube86 ):
5252 """`Detector` class for IceCube-DeepCore."""
53+
54+
55+ class IceCubeUpgrade (IceCubeDeepCore ):
56+ """`Detector` class for IceCube-Upgrade."""
57+
58+ # Implementing abstract class attribute
59+ features = FEATURES .UPGRADE
60+
61+ def _forward (self , data : Data ) -> Data :
62+ """Ingests data, builds graph (connectivity/adjacency), and preprocesses features.
63+
64+ Assuming the following features, in this order (see self._features):
65+ dom_x
66+ dom_y
67+ dom_z
68+ dom_times
69+ charge
70+ rde
71+ pmt_area
72+ string
73+ pmt_number
74+ dom_number
75+ pmt_dir_x
76+ pmt_dir_y
77+ pmt_dir_z
78+ dom_type
79+
80+ Args:
81+ data (Data): Input graph data.
82+
83+ Returns:
84+ Data: Connected and preprocessed graph data.
85+ """
86+
87+ # Check(s)
88+ #assert self.nb_inputs == 14
89+
90+ # Run IceCube/DeepCore preprocessing on first 7 features
91+ #data = super()._forward(data)
92+
93+ # Preprocessing
94+ data .x [:,0 ] /= 100. # dom_x
95+ data .x [:,1 ] /= 100. # dom_y
96+ data .x [:,2 ] += 350. # dom_z
97+ data .x [:,2 ] /= 100.
98+ data .x [:,3 ] /= 1.05e+04 # dom_time
99+ data .x [:,3 ] -= 1.
100+ data .x [:,3 ] *= 20.
101+ data .x [:,4 ] /= 1. # charge
102+ #data.x[:,5] -= 1.25 # rde
103+ #data.x[:,5] /= 0.25
104+ data .x [:,6 ] /= 0.05 # pmt_area
105+ data .x [:,7 ] -= 90 # string
106+ data .x [:,8 ] /= 20. # pmt_number
107+ data .x [:,9 ] -= 60. # dom_number
108+ data .x [:,9 ] /= 60.
109+ #data.x[:,10] /= 1. # pmt_dir_x
110+ #data.x[:,11] /= 1. # pmt_dir_y
111+ #data.x[:,12] /= 1. # pmt_dir_z
112+ data .x [:,13 ] /= 130. # dom_type
113+
114+ return data
0 commit comments