mark ioc magnets

This commit is contained in:
2023-06-01 16:54:48 +02:00
parent 256bd69f33
commit e3900c8b74
3 changed files with 25 additions and 12 deletions
+12 -6
View File
@@ -21,7 +21,8 @@
"pwrref" : [0.106, 0.878, 0.042, 0.006, 0.029, 54.029, 0.000, 0.007,
1.487, 0.885, 0.028, 0.000, 8.026, 0.001, 0.000, 0.776,
0.006, 0.496, 0.237, 0.006, 0.013, 0.002, 0.003, 0.233,
0.187]
0.187],
"iocDevice" : ["AYB", "AYD","QYA7"]
},
"IW2":{
"standby": [-5.001, 5.001, 0.05, -5.001, 5.001, 5.001, -5.001, 0.05,
@@ -38,7 +39,8 @@
0.001, 0.007, 0.981, 0.288, 0.668, 0.703, 0.001, 0.000,
0.000, 0.457, 1.264, 40.576, 2.030, 37.721, 0.000, 0.622,
0.642, 0.117, 0.883, 0.015, 57.955, 0.002, 0.042, 0.000,
82.413, 119.657]
82.413, 119.657],
"iocDevice" : ["AXD", "AXE","ANC"]
},
"PK1":{
"standby": [56.791, 0.05, -2.0005, 2.0005, 0.05, 0.05, 44.9525, -2.0005,
@@ -46,7 +48,8 @@
"ref" : [1041.543, -1.731, -20.112, 3.575, 16.202, -17.818, 883.495, -4.034,
-13.558, -70.330, 89.133, -85.226, 7.834, -20.279, 1096.418],
"pwrref" : [181.888, 0.001, 0.081, 0.003, 0.079, 0.104, 125.121, 0.003,
0.037, 0.148, 1.743, 1.531, 0.013, 0.088, 26.241]
0.037, 0.148, 1.743, 1.531, 0.013, 0.088, 26.241],
"iocDevice" : ["AHB", "AHC","ABS"]
},
"PK2":{
@@ -61,7 +64,8 @@
"pwrref" : [0.458, 4.059, 4.186, 32.167, 1.197, 0.089, 0.045, 0.008,
75.620, 5.467, 5.567, 0.042, 1.187, 14.101, 40.852, 12.158,
0.001, 0.021, 0.002, 0.675, 6.471, 33.538, 15.411, 42.646,
0.000, 42.081, 62.808, 0.000]
0.000, 42.081, 62.808, 0.000],
"iocDevice" : ["AHD1", "AHD2","AHL"]
},
"SINQ":{
@@ -73,7 +77,8 @@
928.267, 353.358, -463.980],
"pwrref" : [40.122, 0.000, 31.222, 3.592, 8.755, 0.179, 68.803,
11.411, 18.554, 0.609, 60.770, 0.331, 22.372, 46.987,
144.810, 40.355, 71.447]
144.810, 40.355, 71.447],
"iocDevice" : ["AHM", "AHN","AHO"]
},
"UCN":{
"standby": [9.404, 25.006, -25.006, 0.05, 0.05, 0.05, 0.05, 25.006,
@@ -81,7 +86,8 @@
"ref" : [180.513, 177.778, -171.062, -9.981, 12.019, 1.707, -2.827, 224.753,
-220.024, 404.640, 83.663, -65.592, -11.409, 406.150, 317.827],
"pwrref" : [7.037, 2.681, 2.353, 0.074, 0.106, 0.002, 0.006, 4.301,
4.091, 45.333, 1.385, 0.857, 0.064, 44.196, 8.692]
4.091, 45.333, 1.385, 0.857, 0.064, 44.196, 8.692],
"iocDevice" : ["ABT", "AK1","AK2"]
},
"Parameters":{
Binary file not shown.
+13 -6
View File
@@ -418,7 +418,7 @@ class AppGui(QWidget):
box = QVBoxLayout()
box.addWidget(table_pwr[0])
box.addWidget(table_pwr[1])
box.setAlignment(Qt.AlignTop | Qt.AlignRight)
box.setAlignment(Qt.AlignTop | Qt.AlignCenter)
box.setSpacing(10)
qw = QWidget()
qw.setLayout(box)
@@ -530,8 +530,6 @@ class AppGui(QWidget):
self.check_status(pv_last_pwr, stat, _line())
def ca_table_sector_widget(self, sector: str="", color: str="MACHINE"):
device_list = self.settings.data[sector]["device"]
attribute_list = self.settings.data[sector]["attribute"]
@@ -617,8 +615,12 @@ class AppGui(QWidget):
table_sol.setColumnWidth(2, 80)
table_sol.setColumnWidth(3, 88)
table_sol.setFixedWidth(386)
ioc_magnets = []
for i, device in enumerate(device_list):
if device in self.settings.data[sector]["iocDevice"]:
ioc_magnets.append(i)
header_value = QTableWidgetItem()
f = header_value.font()
@@ -630,7 +632,6 @@ class AppGui(QWidget):
table_ist.setColumnWidth(0, 90)
table_ist.setFixedWidth(140)
header_init = QTableWidgetItem()
f = header_init.font()
header_init.setFont(f)
@@ -647,6 +648,12 @@ class AppGui(QWidget):
table_pwr.setColumnWidth(1, 88)
table_pwr.setFixedWidth(226)
for i in ioc_magnets:
table_sol.paint_rows(row_range=[i, i+1], reset=False,
columns=[0, 1])
table_ist.paint_rows(row_range=[i, i+1], reset=False)
table_pwr.paint_rows(row_range=[i, i+1], reset=False)
pvI = self.settings.data[sector]['current']
I = self.cafe.getCache(pvI)