@@ -115,19 +115,23 @@ def run(self, event: DigiEventSparse | DigiEventRectangular | DigiEventCircular)
115
115
if isinstance (event , DigiEventSparse ):
116
116
pass
117
117
if isinstance (event , DigiEventCircular ):
118
- #If the readout is circular, we want to take all the neirest neighbors.
118
+ # If the readout is circular, we want to take all the neirest neighbors.
119
119
self .num_neighbors = HexagonalReadoutCircular .NUM_PIXELS - 1 # -1 is bc the central px is already considered
120
120
col = [event .column ]
121
121
row = [event .row ]
122
- adc_channel_order = []
122
+ adc_channel_order = [self . grid . adc_channel ( event . column , event . row ) ]
123
123
# Taking the NN in logical coordinates ...
124
124
for _col , _row in self .grid .neighbors (event .column , event .row ):
125
125
col .append (_col )
126
126
row .append (_row )
127
127
# ... transforming the coordinates of the NN in its corresponding ADC channel ...
128
- adc_channel_order .append (self .grid .adc_channel (_col , row ))
128
+ adc_channel_order .append (self .grid .adc_channel (_col , _row ))
129
129
# ... reordering the pha array for the correspondance (col[i], row[i]) with pha[i].
130
130
pha = event .pha [adc_channel_order ]
131
+ # Converting lists into numpy arrays
132
+ col = np .array (col )
133
+ row = np .array (row )
134
+ pha = np .array (pha )
131
135
# pylint: disable = invalid-name
132
136
if isinstance (event , DigiEventRectangular ):
133
137
seed_col , seed_row = event .highest_pixel ()
@@ -139,6 +143,7 @@ def run(self, event: DigiEventSparse | DigiEventRectangular | DigiEventCircular)
139
143
col = np .array (col )
140
144
row = np .array (row )
141
145
pha = np .array ([event (_col , _row ) for _col , _row in zip (col , row )])
146
+ # Zero suppressing the event (whatever the readout type)...
142
147
pha = self .zero_suppress (pha )
143
148
# Array indexes in order of decreasing pha---note that we use -pha to
144
149
# trick argsort into sorting values in decreasing order.
0 commit comments