mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-07 18:38:41 +01:00
using np.take and updated pixel map
This commit is contained in:
@@ -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":
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user