using np.take and updated pixel map
All checks were successful
Build on RHEL9 / build (push) Successful in 3m47s
Build on RHEL8 / build (push) Successful in 4m42s

This commit is contained in:
froejdh_e
2026-01-28 15:54:27 +01:00
parent c3c3970f19
commit 8a0191e3f6
3 changed files with 4 additions and 3 deletions

View File

@@ -428,7 +428,7 @@ class PlotTab(QtWidgets.QWidget):
self.mainWindow.pixel_map = pm.matterhorn1_transceiver_16bit_1_counter()
elif self.view.comboBoxPlot.currentText() == "Matterhorn1_16bit_4_counters":
print("Setting pixel map for Matterhorn1 with 4 counters")
self.mainWindow.nTransceiverRows = Defines.Matterhorn1.nRows
self.mainWindow.nTransceiverRows = Defines.Matterhorn1.nRows*4
self.mainWindow.nTransceiverCols = Defines.Matterhorn1.nCols
self.mainWindow.pixel_map = pm.matterhorn1_transceiver_16bit_4_counters()
elif self.view.comboBoxPlot.currentText() == "Moench04":

View File

@@ -134,7 +134,8 @@ class TransceiverTab(QtWidgets.QWidget):
transceiverOffset += nDBitEnabled * (nbitsPerDBit // 8)
trans_array = np.array(np.frombuffer(data, offset=transceiverOffset, dtype=np.uint16))
print(f'{trans_array.shape=}')
tmp = decoder.decode(trans_array, self.mainWindow.pixel_map)
# tmp = decoder.decode(trans_array, self.mainWindow.pixel_map)
tmp = np.take(trans_array, self.mainWindow.pixel_map)
print(f'{tmp.shape=}')
return tmp

View File

@@ -79,7 +79,7 @@ def matterhorn1_transceiver_16bit_4_counters():
n_counters = 4
n_cols = 256
n_rows = 256
pixel_map = np.zeros((n_rows*n_counters,n_cols,n_counters), np.uint32)
pixel_map = np.zeros((n_rows*n_counters,n_cols), np.uint32)
for row in range(n_rows):
for counter in range(n_counters):