diff --git a/.buildinfo b/.buildinfo new file mode 100644 index 000000000..1497ced8c --- /dev/null +++ b/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 50f4ceadb5651794d817cedd16469637 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle new file mode 100644 index 000000000..93f20a267 Binary files /dev/null and b/.doctrees/environment.pickle differ diff --git a/.doctrees/index.doctree b/.doctrees/index.doctree new file mode 100644 index 000000000..03023c5f3 Binary files /dev/null and b/.doctrees/index.doctree differ diff --git a/.doctrees/siriushla.as_ap_configdb.doctree b/.doctrees/siriushla.as_ap_configdb.doctree new file mode 100644 index 000000000..b6f08124f Binary files /dev/null and b/.doctrees/siriushla.as_ap_configdb.doctree differ diff --git a/.doctrees/siriushla.as_ap_configdb.models.doctree b/.doctrees/siriushla.as_ap_configdb.models.doctree new file mode 100644 index 000000000..0ec2f1632 Binary files /dev/null and b/.doctrees/siriushla.as_ap_configdb.models.doctree differ diff --git a/.doctrees/siriushla.as_ap_configdb.normconfigs.doctree b/.doctrees/siriushla.as_ap_configdb.normconfigs.doctree new file mode 100644 index 000000000..eb9af977e Binary files /dev/null and b/.doctrees/siriushla.as_ap_configdb.normconfigs.doctree differ diff --git a/.doctrees/siriushla.as_ap_configdb.pvsconfigs.delegate.doctree b/.doctrees/siriushla.as_ap_configdb.pvsconfigs.delegate.doctree new file mode 100644 index 000000000..aec8c54d2 Binary files /dev/null and b/.doctrees/siriushla.as_ap_configdb.pvsconfigs.delegate.doctree differ diff --git a/.doctrees/siriushla.as_ap_configdb.pvsconfigs.doctree b/.doctrees/siriushla.as_ap_configdb.pvsconfigs.doctree new file mode 100644 index 000000000..73ccd153f Binary files /dev/null and b/.doctrees/siriushla.as_ap_configdb.pvsconfigs.doctree differ diff --git a/.doctrees/siriushla.as_ap_currinfo.doctree b/.doctrees/siriushla.as_ap_currinfo.doctree new file mode 100644 index 000000000..3e9618dfd Binary files /dev/null and b/.doctrees/siriushla.as_ap_currinfo.doctree differ diff --git a/.doctrees/siriushla.as_ap_energybutton.doctree b/.doctrees/siriushla.as_ap_energybutton.doctree new file mode 100644 index 000000000..5c3fc4a48 Binary files /dev/null and b/.doctrees/siriushla.as_ap_energybutton.doctree differ diff --git a/.doctrees/siriushla.as_ap_injcontrol.doctree b/.doctrees/siriushla.as_ap_injcontrol.doctree new file mode 100644 index 000000000..b3386b32b Binary files /dev/null and b/.doctrees/siriushla.as_ap_injcontrol.doctree differ diff --git a/.doctrees/siriushla.as_ap_injection.doctree b/.doctrees/siriushla.as_ap_injection.doctree new file mode 100644 index 000000000..0df7d7e58 Binary files /dev/null and b/.doctrees/siriushla.as_ap_injection.doctree differ diff --git a/.doctrees/siriushla.as_ap_launcher.doctree b/.doctrees/siriushla.as_ap_launcher.doctree new file mode 100644 index 000000000..d80cc5fa2 Binary files /dev/null and b/.doctrees/siriushla.as_ap_launcher.doctree differ diff --git a/.doctrees/siriushla.as_ap_machshift.doctree b/.doctrees/siriushla.as_ap_machshift.doctree new file mode 100644 index 000000000..e87aba55d Binary files /dev/null and b/.doctrees/siriushla.as_ap_machshift.doctree differ diff --git a/.doctrees/siriushla.as_ap_macreport.doctree b/.doctrees/siriushla.as_ap_macreport.doctree new file mode 100644 index 000000000..d298b609e Binary files /dev/null and b/.doctrees/siriushla.as_ap_macreport.doctree differ diff --git a/.doctrees/siriushla.as_ap_magoffconv.doctree b/.doctrees/siriushla.as_ap_magoffconv.doctree new file mode 100644 index 000000000..d41e5bee1 Binary files /dev/null and b/.doctrees/siriushla.as_ap_magoffconv.doctree differ diff --git a/.doctrees/siriushla.as_ap_measure.doctree b/.doctrees/siriushla.as_ap_measure.doctree new file mode 100644 index 000000000..09ef65c3b Binary files /dev/null and b/.doctrees/siriushla.as_ap_measure.doctree differ diff --git a/.doctrees/siriushla.as_ap_monitor.doctree b/.doctrees/siriushla.as_ap_monitor.doctree new file mode 100644 index 000000000..8b17604a5 Binary files /dev/null and b/.doctrees/siriushla.as_ap_monitor.doctree differ diff --git a/.doctrees/siriushla.as_ap_opticscorr.doctree b/.doctrees/siriushla.as_ap_opticscorr.doctree new file mode 100644 index 000000000..d399a0667 Binary files /dev/null and b/.doctrees/siriushla.as_ap_opticscorr.doctree differ diff --git a/.doctrees/siriushla.as_ap_posang.doctree b/.doctrees/siriushla.as_ap_posang.doctree new file mode 100644 index 000000000..78c62064d Binary files /dev/null and b/.doctrees/siriushla.as_ap_posang.doctree differ diff --git a/.doctrees/siriushla.as_ap_rabpmmon.doctree b/.doctrees/siriushla.as_ap_rabpmmon.doctree new file mode 100644 index 000000000..f2caa75c2 Binary files /dev/null and b/.doctrees/siriushla.as_ap_rabpmmon.doctree differ diff --git a/.doctrees/siriushla.as_ap_radmon.doctree b/.doctrees/siriushla.as_ap_radmon.doctree new file mode 100644 index 000000000..4d883681c Binary files /dev/null and b/.doctrees/siriushla.as_ap_radmon.doctree differ diff --git a/.doctrees/siriushla.as_ap_sofb.doctree b/.doctrees/siriushla.as_ap_sofb.doctree new file mode 100644 index 000000000..c58526c79 Binary files /dev/null and b/.doctrees/siriushla.as_ap_sofb.doctree differ diff --git a/.doctrees/siriushla.as_ap_sofb.graphics.doctree b/.doctrees/siriushla.as_ap_sofb.graphics.doctree new file mode 100644 index 000000000..e49d0df05 Binary files /dev/null and b/.doctrees/siriushla.as_ap_sofb.graphics.doctree differ diff --git a/.doctrees/siriushla.as_ap_sofb.ioc_control.doctree b/.doctrees/siriushla.as_ap_sofb.ioc_control.doctree new file mode 100644 index 000000000..dea034ca3 Binary files /dev/null and b/.doctrees/siriushla.as_ap_sofb.ioc_control.doctree differ diff --git a/.doctrees/siriushla.as_di_bpms.doctree b/.doctrees/siriushla.as_di_bpms.doctree new file mode 100644 index 000000000..215b00fd4 Binary files /dev/null and b/.doctrees/siriushla.as_di_bpms.doctree differ diff --git a/.doctrees/siriushla.as_di_dccts.doctree b/.doctrees/siriushla.as_di_dccts.doctree new file mode 100644 index 000000000..58b4c7449 Binary files /dev/null and b/.doctrees/siriushla.as_di_dccts.doctree differ diff --git a/.doctrees/siriushla.as_di_icts.doctree b/.doctrees/siriushla.as_di_icts.doctree new file mode 100644 index 000000000..eb8af1826 Binary files /dev/null and b/.doctrees/siriushla.as_di_icts.doctree differ diff --git a/.doctrees/siriushla.as_di_scrns.doctree b/.doctrees/siriushla.as_di_scrns.doctree new file mode 100644 index 000000000..29fadd6b2 Binary files /dev/null and b/.doctrees/siriushla.as_di_scrns.doctree differ diff --git a/.doctrees/siriushla.as_di_tune.doctree b/.doctrees/siriushla.as_di_tune.doctree new file mode 100644 index 000000000..cea7fbbbd Binary files /dev/null and b/.doctrees/siriushla.as_di_tune.doctree differ diff --git a/.doctrees/siriushla.as_di_vlight.doctree b/.doctrees/siriushla.as_di_vlight.doctree new file mode 100644 index 000000000..2bb9114e3 Binary files /dev/null and b/.doctrees/siriushla.as_di_vlight.doctree differ diff --git a/.doctrees/siriushla.as_ps_commands.doctree b/.doctrees/siriushla.as_ps_commands.doctree new file mode 100644 index 000000000..6109678e1 Binary files /dev/null and b/.doctrees/siriushla.as_ps_commands.doctree differ diff --git a/.doctrees/siriushla.as_ps_control.control_widget.doctree b/.doctrees/siriushla.as_ps_control.control_widget.doctree new file mode 100644 index 000000000..64eda31b2 Binary files /dev/null and b/.doctrees/siriushla.as_ps_control.control_widget.doctree differ diff --git a/.doctrees/siriushla.as_ps_control.detail_widget.doctree b/.doctrees/siriushla.as_ps_control.detail_widget.doctree new file mode 100644 index 000000000..c68cc4301 Binary files /dev/null and b/.doctrees/siriushla.as_ps_control.detail_widget.doctree differ diff --git a/.doctrees/siriushla.as_ps_control.doctree b/.doctrees/siriushla.as_ps_control.doctree new file mode 100644 index 000000000..b6542a6a4 Binary files /dev/null and b/.doctrees/siriushla.as_ps_control.doctree differ diff --git a/.doctrees/siriushla.as_ps_cycle.doctree b/.doctrees/siriushla.as_ps_cycle.doctree new file mode 100644 index 000000000..00a582dc9 Binary files /dev/null and b/.doctrees/siriushla.as_ps_cycle.doctree differ diff --git a/.doctrees/siriushla.as_ps_diag.doctree b/.doctrees/siriushla.as_ps_diag.doctree new file mode 100644 index 000000000..e681cd0f1 Binary files /dev/null and b/.doctrees/siriushla.as_ps_diag.doctree differ diff --git a/.doctrees/siriushla.as_pu_control.doctree b/.doctrees/siriushla.as_pu_control.doctree new file mode 100644 index 000000000..67c4b2d98 Binary files /dev/null and b/.doctrees/siriushla.as_pu_control.doctree differ diff --git a/.doctrees/siriushla.as_rf_control.doctree b/.doctrees/siriushla.as_rf_control.doctree new file mode 100644 index 000000000..0b4a8ae70 Binary files /dev/null and b/.doctrees/siriushla.as_rf_control.doctree differ diff --git a/.doctrees/siriushla.as_ti_control.doctree b/.doctrees/siriushla.as_ti_control.doctree new file mode 100644 index 000000000..0952b5d55 Binary files /dev/null and b/.doctrees/siriushla.as_ti_control.doctree differ diff --git a/.doctrees/siriushla.bl_ap_imgproc.doctree b/.doctrees/siriushla.bl_ap_imgproc.doctree new file mode 100644 index 000000000..6df077bc0 Binary files /dev/null and b/.doctrees/siriushla.bl_ap_imgproc.doctree differ diff --git a/.doctrees/siriushla.bo_ap_ramp.doctree b/.doctrees/siriushla.bo_ap_ramp.doctree new file mode 100644 index 000000000..953188982 Binary files /dev/null and b/.doctrees/siriushla.bo_ap_ramp.doctree differ diff --git a/.doctrees/siriushla.common.afc_acq_core.doctree b/.doctrees/siriushla.common.afc_acq_core.doctree new file mode 100644 index 000000000..7d1a311ac Binary files /dev/null and b/.doctrees/siriushla.common.afc_acq_core.doctree differ diff --git a/.doctrees/siriushla.common.cam_basler.doctree b/.doctrees/siriushla.common.cam_basler.doctree new file mode 100644 index 000000000..7132ec977 Binary files /dev/null and b/.doctrees/siriushla.common.cam_basler.doctree differ diff --git a/.doctrees/siriushla.common.diff_ctrl.doctree b/.doctrees/siriushla.common.diff_ctrl.doctree new file mode 100644 index 000000000..2863474ad Binary files /dev/null and b/.doctrees/siriushla.common.diff_ctrl.doctree differ diff --git a/.doctrees/siriushla.common.doctree b/.doctrees/siriushla.common.doctree new file mode 100644 index 000000000..753bf1a9b Binary files /dev/null and b/.doctrees/siriushla.common.doctree differ diff --git a/.doctrees/siriushla.common.epics.doctree b/.doctrees/siriushla.common.epics.doctree new file mode 100644 index 000000000..b448872ca Binary files /dev/null and b/.doctrees/siriushla.common.epics.doctree differ diff --git a/.doctrees/siriushla.common.epics.task.doctree b/.doctrees/siriushla.common.epics.task.doctree new file mode 100644 index 000000000..c87276465 Binary files /dev/null and b/.doctrees/siriushla.common.epics.task.doctree differ diff --git a/.doctrees/siriushla.common.epics.wrapper.doctree b/.doctrees/siriushla.common.epics.wrapper.doctree new file mode 100644 index 000000000..f2cb2d20b Binary files /dev/null and b/.doctrees/siriushla.common.epics.wrapper.doctree differ diff --git a/.doctrees/siriushla.doctree b/.doctrees/siriushla.doctree new file mode 100644 index 000000000..167f09fc1 Binary files /dev/null and b/.doctrees/siriushla.doctree differ diff --git a/.doctrees/siriushla.li_ap_mps.doctree b/.doctrees/siriushla.li_ap_mps.doctree new file mode 100644 index 000000000..4bd5b5f9d Binary files /dev/null and b/.doctrees/siriushla.li_ap_mps.doctree differ diff --git a/.doctrees/siriushla.li_di_bpms.doctree b/.doctrees/siriushla.li_di_bpms.doctree new file mode 100644 index 000000000..520568117 Binary files /dev/null and b/.doctrees/siriushla.li_di_bpms.doctree differ diff --git a/.doctrees/siriushla.li_di_scrns.doctree b/.doctrees/siriushla.li_di_scrns.doctree new file mode 100644 index 000000000..45f5842db Binary files /dev/null and b/.doctrees/siriushla.li_di_scrns.doctree differ diff --git a/.doctrees/siriushla.li_eg_control.doctree b/.doctrees/siriushla.li_eg_control.doctree new file mode 100644 index 000000000..0bd185ade Binary files /dev/null and b/.doctrees/siriushla.li_eg_control.doctree differ diff --git a/.doctrees/siriushla.li_pu_modltr.doctree b/.doctrees/siriushla.li_pu_modltr.doctree new file mode 100644 index 000000000..64be84102 Binary files /dev/null and b/.doctrees/siriushla.li_pu_modltr.doctree differ diff --git a/.doctrees/siriushla.li_rf_llrf.doctree b/.doctrees/siriushla.li_rf_llrf.doctree new file mode 100644 index 000000000..a15322543 Binary files /dev/null and b/.doctrees/siriushla.li_rf_llrf.doctree differ diff --git a/.doctrees/siriushla.li_va_control.doctree b/.doctrees/siriushla.li_va_control.doctree new file mode 100644 index 000000000..91cc998d3 Binary files /dev/null and b/.doctrees/siriushla.li_va_control.doctree differ diff --git a/.doctrees/siriushla.si_ap_fofb.doctree b/.doctrees/siriushla.si_ap_fofb.doctree new file mode 100644 index 000000000..23f08aa46 Binary files /dev/null and b/.doctrees/siriushla.si_ap_fofb.doctree differ diff --git a/.doctrees/siriushla.si_ap_genstatus.doctree b/.doctrees/siriushla.si_ap_genstatus.doctree new file mode 100644 index 000000000..b122ee4b5 Binary files /dev/null and b/.doctrees/siriushla.si_ap_genstatus.doctree differ diff --git a/.doctrees/siriushla.si_ap_idff.doctree b/.doctrees/siriushla.si_ap_idff.doctree new file mode 100644 index 000000000..e30a8d8d3 Binary files /dev/null and b/.doctrees/siriushla.si_ap_idff.doctree differ diff --git a/.doctrees/siriushla.si_ap_orbintlk.doctree b/.doctrees/siriushla.si_ap_orbintlk.doctree new file mode 100644 index 000000000..4196a6ef2 Binary files /dev/null and b/.doctrees/siriushla.si_ap_orbintlk.doctree differ diff --git a/.doctrees/siriushla.si_di_bbb.doctree b/.doctrees/siriushla.si_di_bbb.doctree new file mode 100644 index 000000000..4ce1a6efd Binary files /dev/null and b/.doctrees/siriushla.si_di_bbb.doctree differ diff --git a/.doctrees/siriushla.si_di_equalize_bpms.doctree b/.doctrees/siriushla.si_di_equalize_bpms.doctree new file mode 100644 index 000000000..2d08875d1 Binary files /dev/null and b/.doctrees/siriushla.si_di_equalize_bpms.doctree differ diff --git a/.doctrees/siriushla.si_di_scraps.doctree b/.doctrees/siriushla.si_di_scraps.doctree new file mode 100644 index 000000000..e50dd2a13 Binary files /dev/null and b/.doctrees/siriushla.si_di_scraps.doctree differ diff --git a/.doctrees/siriushla.si_id_control.doctree b/.doctrees/siriushla.si_id_control.doctree new file mode 100644 index 000000000..7262c7009 Binary files /dev/null and b/.doctrees/siriushla.si_id_control.doctree differ diff --git a/.doctrees/siriushla.tb_di_slits.doctree b/.doctrees/siriushla.tb_di_slits.doctree new file mode 100644 index 000000000..70bc6bf64 Binary files /dev/null and b/.doctrees/siriushla.tb_di_slits.doctree differ diff --git a/.doctrees/siriushla.widgets.dialog.doctree b/.doctrees/siriushla.widgets.dialog.doctree new file mode 100644 index 000000000..adcd668c8 Binary files /dev/null and b/.doctrees/siriushla.widgets.dialog.doctree differ diff --git a/.doctrees/siriushla.widgets.doctree b/.doctrees/siriushla.widgets.doctree new file mode 100644 index 000000000..a5aab6c7e Binary files /dev/null and b/.doctrees/siriushla.widgets.doctree differ diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/_modules/index.html b/_modules/index.html new file mode 100644 index 000000000..8355ecbe2 --- /dev/null +++ b/_modules/index.html @@ -0,0 +1,395 @@ + + + + + + Overview: module code — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ +

All modules for which code is available

+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/client_configdb.html b/_modules/siriushla/as_ap_configdb/client_configdb.html new file mode 100644 index 000000000..3442c862d --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/client_configdb.html @@ -0,0 +1,744 @@ + + + + + + siriushla.as_ap_configdb.client_configdb — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.client_configdb

+"""Window to manage configurations."""
+import logging
+import time
+
+from qtpy.QtWidgets import QGridLayout, QHBoxLayout, QVBoxLayout, \
+    QWidget, QFrame, QLabel, QComboBox, QPushButton, QMessageBox, QTabWidget, \
+    QTableView, QTreeView, QHeaderView
+from qtpy.QtCore import Qt, Slot, QModelIndex, QAbstractItemModel
+
+from siriuspy.clientconfigdb import ConfigDBException
+from siriushla.widgets.windows import SiriusMainWindow
+from .models import ConfigTypeModel, ConfigDbTableModel
+from .configdialogs import RenameConfigDialog
+
+
+
+[docs] +class TreeItem: + """An item of a tree.""" + + def __init__(self, data, parentItem): + """Set item data and its parent item.""" + self._childItems = list() + self._itemData = data + self._parentItem = parentItem + +
+[docs] + def appendChild(self, item): + """Append a child item.""" + self._childItems.append(item)
+ + +
+[docs] + def child(self, row): + """Return child at given row.""" + return self._childItems[row]
+ + +
+[docs] + def childCount(self): + """Return number of children.""" + return len(self._childItems)
+ + +
+[docs] + def columnCount(self): + """Return number of columns of data.""" + return len(self._itemData)
+ + +
+[docs] + def data(self, column): + """Return data at given column.""" + return self._itemData[column]
+ + +
+[docs] + def row(self): + """Report the item's location within its parent's list of items.""" + if self._parentItem is not None: + return self._parentItem._childItems.index(self) + return 0
+ + +
+[docs] + def parentItem(self): + """Return parent item.""" + return self._parentItem
+
+ + + +
+[docs] +class JsonTreeModel(QAbstractItemModel): + """Model for a tree that represent a JSON document.""" + + def __init__(self, config_type, name, connection, parent=None): + """Set model data.""" + super().__init__(parent) + self._rootItem = TreeItem(['Key', 'Value'], None) + self._connection = connection + self.setupModelData([(config_type, name)]) + +
+[docs] + def index(self, row, column, parent): + """Provide and index.""" + if not self.hasIndex(row, column, parent): + return QModelIndex() + + if not parent.isValid(): + parentItem = self._rootItem + else: + parentItem = parent.internalPointer() + + childItem = parentItem.child(row) + if childItem: + return self.createIndex(row, column, childItem) + else: + return QModelIndex()
+ + +
+[docs] + def parent(self, index): + """Return parent of given index.""" + if not index.isValid(): + return QModelIndex() + + childItem = index.internalPointer() + parentItem = childItem.parentItem() + + if parentItem == self._rootItem: + return QModelIndex() + + return self.createIndex(parentItem.row(), 0, parentItem)
+ + +
+[docs] + def rowCount(self, parent): + """Return index row count.""" + if parent.column() > 0: + return 0 + + if not parent.isValid(): + parentItem = self._rootItem + else: + parentItem = parent.internalPointer() + + return parentItem.childCount()
+ + +
+[docs] + def columnCount(self, parent): + """Return index column count.""" + if parent.isValid(): + return parent.internalPointer().columnCount() + else: + return self._rootItem.columnCount()
+ + +
+[docs] + def data(self, index, role): + """Return data at index.""" + if not index.isValid(): + return None + + if role != Qt.DisplayRole: + return None + + item = index.internalPointer() + + return item.data(index.column())
+ + +
+[docs] + def flags(self, index): + """Read-only.""" + if not index.isValid(): + return 0 + + return QAbstractItemModel.flags(self, index)
+ + +
+[docs] + def headerData(self, section, orientation, role): + """Return data stored in root item.""" + if orientation == Qt.Horizontal and role == Qt.DisplayRole: + return self._rootItem.data(section) + + return None
+ + +
+[docs] + def setupModelData(self, config_list): + """Set model data.""" + # Parse json data to python structures + configs = list() + for config_type, name in config_list: + if not config_type: + continue + try: + request = self._connection.get_config_info( + name, config_type=config_type) + request['value'] = self._connection.get_config_value( + name, config_type=config_type) + if 'modified' in request: + request['modified'] = \ + [time.strftime( + '%d/%m/%Y %H:%M:%S', time.localtime(float(t))) + for t in request['modified']] + request['created'] = time.strftime( + '%d/%m/%Y %H:%M:%S', time.localtime(float( + request['created']))) + configs.append(request) + except ConfigDBException as err: + configs.append(err.server_code) + self._fillTree(configs)
+ + + def _fillTree(self, config): + """Fill tree.""" + self.beginResetModel() + self._rootItem = TreeItem(['Key', 'Value'], None) + # Fill tree + if len(config) == 1: + self._addChildren(self._rootItem, config[0]) + else: + self._addChildren(self._rootItem, config) + self.endResetModel() + + def _addChildren(self, item, config): + """Add children.""" + if isinstance(config, dict): + for key, val in config.items(): + if isinstance(val, (list, dict)): # Has children + new_item = TreeItem([key, ''], item) + self._addChildren(new_item, val) + item.appendChild(new_item) + else: + item.appendChild(TreeItem([key, str(val)], item)) + elif isinstance(config, list): + for idx, value in enumerate(config): + if isinstance(value, (list, dict)): # Has children + new_item = TreeItem([str(idx), ''], item) + # new_item = QTreeWidgetItem([str(idx), '']) + self._addChildren(new_item, value) + item.appendChild(new_item) + else: + item.appendChild(TreeItem([str(idx), str(value)], item))
+ + + +
+[docs] +class ConfigurationManager(SiriusMainWindow): + """.""" + + NAME_COL = None + CONFIG_TYPE_COL = None + + def __init__(self, model, parent=None): + """Constructor.""" + super().__init__(parent) + self._model = model + self._logger = logging.getLogger(__name__) + self._logger.setLevel(logging.INFO) + self._setup_ui() + self.setWindowTitle("Configuration Manager") + + def _setup_ui(self): + # self.setGeometry(0, 0, 1600, 900) + self.main_widget = QFrame() + self.main_widget.setObjectName('ServConf') + self.setCentralWidget(self.main_widget) + self.layout = QGridLayout() + self.main_widget.setLayout(self.layout) + + # Basic widgets + self.editor = QTableView() + self.delete_button = QPushButton('Delete', self) + self.delete_button.setObjectName('DeleteButton') + self.rename_button = QPushButton('Rename', self) + self.rename_button.setObjectName('RenameButton') + self.d_editor = QTableView() + self.retrieve_button = QPushButton('Retrieve', self) + self.retrieve_button.setObjectName('RetrieveButton') + self.tree = QTreeView(self) + self.config_type = QComboBox(parent=self) + self.config_type.setModel( + ConfigTypeModel(self._model, self.config_type)) + + # Tab widgets + self.tab1 = QWidget() + self.tab1.layout = QVBoxLayout(self.tab1) + self.tab2 = QWidget() + self.tab2.layout = QVBoxLayout(self.tab2) + self.tab1.layout.addWidget(self.editor) + hlay = QHBoxLayout() + hlay.addWidget(self.rename_button) + hlay.addWidget(self.delete_button) + self.tab1.layout.addLayout(hlay) + self.tab2.layout.addWidget(self.d_editor) + self.tab2.layout.addWidget(self.retrieve_button) + + self.editor_tab = QTabWidget(self) + self.editor_tab.addTab(self.tab1, 'Configurations') + self.editor_tab.addTab(self.tab2, 'Discarded Configurations') + self.config_viewer = QWidget(self) + self.config_viewer.layout = QVBoxLayout(self.config_viewer) + self.config_viewer.layout.addWidget(self.editor_tab) + self.config_viewer.layout.addWidget(self.tree) + + # Header widget + self.header = QFrame(self) + self.header.setObjectName('Header') + self.header.layout = QHBoxLayout(self.header) + self.header.layout.addStretch() + self.header.layout.addWidget( + QLabel('Configuration Database Manager', self.header)) + self.header.layout.addStretch() + + # Sub header with database genral information + self.sub_header = QFrame(self) + self.sub_header.setObjectName('SubHeader') + self.sub_header.layout = QVBoxLayout(self.sub_header) + + self.server_layout = QHBoxLayout() + self.server_layout.addWidget(QLabel('<b>Server:</b>', self.sub_header)) + self.server_layout.addWidget(QLabel(self._model.url, self.sub_header)) + self.server_layout.addStretch() + + self.size_layout = QHBoxLayout() + self.size_layout.addWidget(QLabel('<b>DB Size:</b>', self.sub_header)) + try: + dbsize = self._model.get_dbsize() + dbsize = '{:.2f} MB'.format(dbsize/(1024*1024)) + except ConfigDBException: + dbsize = 'Failed to retrieve information' + self.size_layout.addWidget(QLabel(dbsize, self.sub_header)) + self.size_layout.addStretch() + + self.sub_header.layout.addLayout(self.server_layout) + self.sub_header.layout.addLayout(self.size_layout) + + # Query form + self.query_form = QFrame() + self.query_form.setObjectName("QueryForm") + self.query_form.layout = QVBoxLayout() + self.query_form.setLayout(self.query_form.layout) + + self.configs_layout = QGridLayout() + self.configs_layout.addWidget(QLabel('Configurations:', self), 0, 0) + self.nr_configs = QLabel(self) + self.configs_layout.addWidget(self.nr_configs, 0, 1) + self.configs_layout.addWidget(QLabel('Discarded:', self), 0, 2) + self.nr_discarded = QLabel(self) + self.configs_layout.addWidget(self.nr_discarded, 0, 3) + + self.query_form.layout.addWidget(self.config_type) + self.query_form.layout.addLayout(self.configs_layout) + + # Main widget layout setup + self.layout.addWidget(self.header, 0, 0, 1, 3) + self.layout.addWidget(self.sub_header, 1, 0, 1, 2) + self.layout.addWidget(self.query_form, 2, 0, 1, 2) + self.layout.addWidget(self.config_viewer, 3, 0, 1, 2) + self.layout.addWidget(self.tree, 1, 2, 4, 1) + # self.layout.addWidget(self.delete_button, 4, 0, 1, 2) + self.layout.setColumnStretch(0, 1) + self.layout.setColumnStretch(1, 2) + self.layout.setColumnStretch(2, 2) + + # Set table models and options + self.editor_model = ConfigDbTableModel('notexist', self._model) + self.d_editor_model = ConfigDbTableModel('notexist', self._model, True) + self.editor.setModel(self.editor_model) + self.editor.setSelectionBehavior(self.editor.SelectRows) + self.editor.setSortingEnabled(True) + self.editor.horizontalHeader().setResizeMode(QHeaderView.Stretch) + self.d_editor.setModel(self.d_editor_model) + self.d_editor.setSelectionBehavior(self.editor.SelectRows) + self.d_editor.setSortingEnabled(True) + self.d_editor.horizontalHeader().setResizeMode(QHeaderView.Stretch) + self.d_editor.setSelectionMode(self.d_editor.SingleSelection) + # Set tree model and options + self.tree_model = JsonTreeModel(None, None, self._model) + self.tree.setModel(self.tree_model) + # Delete button + self.delete_button.setEnabled(False) + self.rename_button.setEnabled(True) + self.retrieve_button.setEnabled(False) + + # Signals and slots + + # Tab + self.editor_tab.currentChanged.connect(self._tab_changed) + # Fill tables when configuration is selected + self.config_type.currentTextChanged.connect(self._fill_table) + # Fill tree when a configuration is selected + self.editor.selectionModel().selectionChanged.connect( + lambda x, y: self._fill_tree()) + self.d_editor.selectionModel().selectionChanged.connect( + lambda x, y: self._fill_tree()) + # Connect database error to slot that show messages + self.editor_model.connectionError.connect(self._database_error) + self.d_editor_model.connectionError.connect(self._database_error) + # Makes tree column extend automatically to show content + self.tree.expanded.connect( + lambda idx: self.tree.resizeColumnToContents(idx.column())) + # Button action + self.delete_button.pressed.connect(self._remove_configuration) + self.rename_button.pressed.connect(self._rename_configuration) + self.retrieve_button.pressed.connect(self._retrieve_configuration) + # Set constants + ConfigurationManager.NAME_COL = \ + self.editor_model.horizontalHeader.index('name') + ConfigurationManager.CONFIG_TYPE_COL = \ + self.editor_model.horizontalHeader.index('config_type') + + self.editor.resizeColumnsToContents() + self.d_editor.resizeColumnsToContents() + + @Slot(str) + def _fill_table(self, config_type): + """Fill table with configuration of `config_type`.""" + leng = len(self._model.find_configs( + config_type=config_type, discarded=False)) + self.nr_configs.setText(str(leng)) + leng = len(self._model.find_configs( + config_type=config_type, discarded=True)) + self.nr_discarded.setText(str(leng)) + + self.editor_model.setupModelData(config_type) + self.d_editor_model.setupModelData(config_type) + self.editor.resizeColumnsToContents() + self.d_editor.resizeColumnsToContents() + self.editor_model.sort(2, Qt.DescendingOrder) + self.d_editor_model.sort(2, Qt.DescendingOrder) + + @Slot() + def _fill_tree(self): + if self.editor_tab.currentIndex() == 0: + configs = list() + rows = self._get_selected_rows(self.editor) + # Get selected rows + for row in rows: + # Get name and configuration type + configs.append(self._type_name(row, self.editor_model)) + # Set tree data + self.tree_model.setupModelData(configs) + if len(configs) == 1: + self.delete_button.setEnabled(True) + self.delete_button.setText( + 'Delete {} ({})'.format(configs[0][1], configs[0][0])) + self.rename_button.setEnabled(True) + self.rename_button.setText( + 'Rename {} ({})'.format(configs[0][1], configs[0][0])) + + elif len(configs) > 1: + self.rename_button.setEnabled(False) + self.rename_button.setText('Rename') + self.delete_button.setEnabled(True) + self.delete_button.setText( + 'Delete {} configurations'.format(len(configs))) + else: + self.rename_button.setEnabled(False) + self.rename_button.setText('Rename') + self.delete_button.setEnabled(False) + self.delete_button.style().polish(self.delete_button) + self.rename_button.style().polish(self.rename_button) + else: + try: + row = self._get_selected_rows(self.d_editor).pop() + except KeyError: + self.retrieve_button.setEnabled(False) + self.retrieve_button.style().polish(self.retrieve_button) + else: + config_type, name = self._type_name(row, self.d_editor_model) + self.tree_model.setupModelData([(config_type, name)]) + self.retrieve_button.setEnabled(True) + self.retrieve_button.style().polish(self.retrieve_button) + # self.tree.resizeColumnsToContents() + + @Slot() + def _remove_configuration(self): + type = QMessageBox.Question + title = 'Remove configuration?' + buttons = QMessageBox.Ok | QMessageBox.Cancel + + # self.editor.selectRow(index.row()) + rows = list(self._get_selected_rows(self.editor)) + message = 'Remove configurations:\n' + for row in rows: + config_type = self.editor_model.createIndex(row, 0).data() + name = self.editor_model.createIndex(row, 1).data() + message += '- {} ({})\n'.format(name, config_type) + + msg = QMessageBox(type, title, message, buttons).exec_() + if msg == QMessageBox.Ok: + rows.sort(reverse=True) + for row in rows: + self.editor_model.removeRows(row) + + self.editor.selectionModel().clearSelection() + self._fill_table(self.config_type.currentText()) + + @Slot() + def _rename_configuration(self): + # self.editor.selectRow(index.row()) + rows = list(self._get_selected_rows(self.editor)) + if not rows: + return + config_type = self.editor_model.createIndex(rows[0], 0).data() + name = self.editor_model.createIndex(rows[0], 1).data() + + wid = RenameConfigDialog(config_type, self) + wid.setWindowTitle('Rename: {}'.format(name)) + wid.search_le.setText(name) + newname, status = wid.exec_() + if not newname or not status: + return + self._model.rename_config( + name, newname, config_type=config_type) + + self.editor.selectionModel().clearSelection() + self._fill_table(self.config_type.currentText()) + + @Slot() + def _retrieve_configuration(self): + type = QMessageBox.Question + title = 'Retrieve configuration?' + buttons = QMessageBox.Ok | QMessageBox.Cancel + + try: + row = self._get_selected_rows(self.d_editor).pop() + except KeyError: + pass + else: + config_type, name = self._type_name(row, self.d_editor_model) + name = name[:-37] + message = \ + 'Retrieve configuration {} ({})?'.format(config_type, name) + msg = QMessageBox(type, title, message, buttons).exec_() + if msg == QMessageBox.Ok: + try: + self.d_editor_model.removeRows(row) + except TypeError: + self._database_error( + 'Exception', + 'Configuration no longer is in the correct format', + 'retrieve configuration') + + self.editor.selectionModel().clearSelection() + self._fill_table(self.config_type.currentText()) + + @Slot(int) + def _tab_changed(self, index): + if index == 0: + self.editor.selectionModel().clearSelection() + self.delete_button.setText('Delete') + self.delete_button.setEnabled(False) + self.delete_button.style().polish(self.delete_button) + self.rename_button.setText('Rename') + self.rename_button.setEnabled(False) + self.rename_button.style().polish(self.rename_button) + else: + self.d_editor.selectionModel().clearSelection() + self.retrieve_button.setEnabled(False) + self.retrieve_button.style().polish(self.retrieve_button) + self.tree_model.setupModelData([]) + + @Slot(int, str, str) + def _database_error(self, code, message, operation): + type = QMessageBox.Warning + title = 'Something went wrong' + msg = '{}: {}, while trying to {}'.format(code, message, operation) + QMessageBox(type, title, msg).exec_() + + def _get_selected_rows(self, table): + index_list = table.selectionModel().selectedIndexes() + return {idx.row() for idx in index_list} + + def _type_name(self, row, model): + # Return config_type and name given a row and a table model + return (model.createIndex(row, self.CONFIG_TYPE_COL).data(), + model.createIndex(row, self.NAME_COL).data())
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/configdialogs.html b/_modules/siriushla/as_ap_configdb/configdialogs.html new file mode 100644 index 000000000..f4079c372 --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/configdialogs.html @@ -0,0 +1,368 @@ + + + + + + siriushla.as_ap_configdb.configdialogs — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.configdialogs

+"""Define a window to save configurations."""
+
+import logging
+from qtpy.QtWidgets import QHBoxLayout, QVBoxLayout, \
+    QWidget, QLabel, QPushButton, QMessageBox
+from qtpy.QtCore import Slot, Signal
+
+from siriuspy.clientconfigdb import ConfigDBClient
+from siriushla.widgets.windows import SiriusDialog
+from .configwidgets import ConfigTableWidget, ConfigDBInfoHeader, \
+    ConfigDBSearchEngine
+
+
+class _BaseConfigManipulation(SiriusDialog):
+    configname = Signal(str)
+
+    def __init__(self, config_type, parent=None):
+        """Constructor."""
+        super().__init__(parent)
+        self._client = ConfigDBClient(config_type=config_type)
+        self._config_type = config_type
+        self._logger = logging.getLogger(__name__)
+        self._logger.setLevel(logging.INFO)
+        self._setupui()
+        self._config = ''
+        self._status = False
+        self.setWindowTitle("Configuration Database Manager")
+
+    def _setupui(self):
+        self.layoutv = QVBoxLayout(self)
+
+        # Basic widgets
+        self.editor = ConfigTableWidget(self._client, self)
+        self.editor.config_type = self._config_type
+        self.cancel_button = QPushButton('Cancel', self)
+        self.cancel_button.pressed.connect(self.reject)
+        self.ok_button = QPushButton('Load', self)
+        self.ok_button.setEnabled(False)
+        self.ok_button.pressed.connect(self._load_configuration)
+
+        self.search_le = ConfigDBSearchEngine(self.editor, self)
+        self.label_exist = QLabel('', self)
+
+        # Config View Widget
+        self.config_viewer = QWidget(self)
+        self.config_viewer.layout = QVBoxLayout(self.config_viewer)
+        self.config_viewer.layout.addWidget(self.search_le)
+        self.config_viewer.layout.addWidget(self.label_exist)
+        self.config_viewer.layout.addWidget(self.editor)
+        hbl = QHBoxLayout()
+        hbl.addStretch()
+        hbl.addWidget(self.cancel_button)
+        hbl.addStretch()
+        hbl.addWidget(self.ok_button)
+        hbl.addStretch()
+        self.config_viewer.layout.addLayout(hbl)
+
+        # Sub header with database general information
+        self.sub_header = ConfigDBInfoHeader(
+            self._client, parent=self, config_type=self._config_type)
+
+        # Main widget layout setup
+        self.layoutv.addWidget(self.sub_header)
+        self.layoutv.addWidget(self.config_viewer)
+
+        # Update Selection when a configuration is selected
+        self.editor.configChanged.connect(self._update_selection)
+        # Connect database error to slot that show messages
+        self.editor.connectionError.connect(self._database_error)
+
+    @property
+    def client(self):
+        """."""
+        return self._client
+
+    @property
+    def config_name(self):
+        return self.editor.config_name
+
+    def accept(self):
+        """Override accept."""
+        self._status = True
+        super().accept()
+
+    def exec_(self):
+        """Override exec."""
+        super().exec_()
+        return self._config, self._status
+
+    def exec(self):
+        return self.exec_()
+
+    @Slot(str, str)
+    def _update_selection(self, selected, deselected):
+        config = selected
+        if config:
+            self.ok_button.setEnabled(True)
+            self.ok_button.setText('Load {}'.format(config))
+        else:
+            self.ok_button.setEnabled(False)
+        self.ok_button.style().polish(self.ok_button)
+
+    @Slot()
+    def _load_configuration(self):
+        config = self.config_name
+        if config:
+            self.configname.emit(config)
+            self._config = config
+        self.accept()
+
+    @Slot(int, str, str)
+    def _database_error(self, code, message, operation):
+        tpe = QMessageBox.Warning
+        title = 'Something went wrong'
+        msg = '{}: {}, while trying to {}'.format(code, message, operation)
+        QMessageBox(tpe, title, msg).exec_()
+
+
+
+[docs] +class LoadConfigDialog(_BaseConfigManipulation): + """Load configurations."""
+ + + +
+[docs] +class SaveConfigDialog(_BaseConfigManipulation): + """Save configurations.""" + + configname = Signal(str) + + def __init__(self, config_type, parent=None): + """Constructor.""" + super().__init__(config_type, parent) + self.ok_button.setText('Save') + self.search_le.setPlaceholderText('Type the configuration name...') + self.search_le.filteredidcs.connect(self._filtered_indices) + + @property + def config_name(self): + return self.search_le.text() + + @Slot(str, str) + def _update_selection(self, selected, deselected): + config = selected + if config: + self.search_le.setText(config) + self.ok_button.style().polish(self.ok_button) + + @Slot(list) + def _filtered_indices(self, idxlist): + valid = True + txt = self.search_le.text() + for idx in idxlist: + name = self.editor.model().createIndex( + idx, self.editor.NAME_COL).data() + valid &= not txt == name + + self.ok_button.setEnabled(bool(txt)) + if not bool(txt): + savetext = 'Save' + labltext = '' + elif valid: + savetext = 'Save ' + labltext = '<b>Name Valid</b>' + else: + savetext = 'Overwrite ' + labltext = '<b>Caution, configuration will be overwritten!!</b.' + self.label_exist.setText(labltext) + self.ok_button.setText(savetext + txt)
+ + + +
+[docs] +class RenameConfigDialog(SaveConfigDialog): + """Rename configurations.""" + + configname = Signal(str) + + def __init__(self, config_type, parent=None): + """Constructor.""" + super().__init__(config_type, parent) + self.ok_button.setText('Rename') + self.search_le.setPlaceholderText('Type the new name...') + + @Slot(list) + def _filtered_indices(self, idxlist): + txt = self.search_le.text() + valid = bool(txt) + for idx in idxlist: + name = self.editor.model().createIndex( + idx, self.editor.NAME_COL).data() + valid &= not txt == name + + self.ok_button.setEnabled(valid) + if not valid: + rnmetext = 'Rename' + labltext = '<b>Name already taken. Choose another one.</b.' + else: + rnmetext = 'Rename to ' + txt + labltext = '<b>Name Valid</b>' + self.label_exist.setText(labltext) + self.ok_button.setText(rnmetext)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/configwidgets.html b/_modules/siriushla/as_ap_configdb/configwidgets.html new file mode 100644 index 000000000..bdb677810 --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/configwidgets.html @@ -0,0 +1,342 @@ + + + + + + siriushla.as_ap_configdb.configwidgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.configwidgets

+"""Load Configuration Widget."""
+import re
+
+from qtpy.QtCore import Qt, Signal, Slot, QItemSelection
+from qtpy.QtWidgets import QLineEdit, QTableView, QVBoxLayout, \
+    QLabel, QHBoxLayout, QFrame
+
+from siriuspy.clientconfigdb import ConfigDBException
+from .models import ConfigDbTableModel
+
+
+
+[docs] +class ConfigTableWidget(QTableView): + """Widget that loads a configuration.""" + + NAME_COL = ConfigDbTableModel.horizontalHeader.index('name') + CONFIG_TYPE_COL = ConfigDbTableModel.horizontalHeader.index('config_type') + + configChanged = Signal(str, str) + connectionError = Signal(int, str, str) + + def __init__(self, client, parent=None, config_type=None): + """Constructor.""" + super().__init__(parent) + self._client = client + self._config_type = config_type or 'not_exist' + self._setup_ui() + + def _setup_ui(self): + self.setModel( + ConfigDbTableModel(self._config_type, self._client)) + self.setSelectionBehavior(self.SelectRows) + self.setSelectionMode(self.SingleSelection) + self.setSortingEnabled(True) + # self.horizontalHeader().setResizeMode(QHeaderView.Stretch) + self.hideColumn(0) + self.hideColumn(3) + self.model().sort(2, Qt.DescendingOrder) + + # Signals + self.selectionModel().selectionChanged.connect( + self._config_changed) + self.model().connectionError.connect(self.connectionError) + + @property + def config_type(self): + """selected_configConfiguration type name.""" + return self._config_type + + @config_type.setter + def config_type(self, name): + self._config_type = name + self.model().config_type = self._config_type + self.model().sort(2, Qt.DescendingOrder) + + @property + def config_name(self): + """Return selected configuration name.""" + indexes = self.selectionModel().selectedIndexes() + if indexes: + return indexes[1].data() + return None + + @Slot(QItemSelection, QItemSelection) + def _config_changed(self, selected, deselected): + selected_config = self.model().data(selected.indexes()[1]) + if deselected: + deselected_config = \ + self.model().data(deselected.indexes()[1]) + else: + deselected_config = '' + self.configChanged.emit(selected_config, deselected_config) + +
+[docs] + def resizeEvent(self, event): + """Reimplement resize event.""" + width = self.width() - self.verticalHeader().width() + self.setColumnWidth(1, width*0.65) + self.setColumnWidth(2, width*0.33) + super().resizeEvent(event)
+
+ + + +
+[docs] +class ConfigDBSearchEngine(QLineEdit): + + NAME_COL = ConfigDbTableModel.horizontalHeader.index('name') + CONFIG_TYPE_COL = ConfigDbTableModel.horizontalHeader.index('config_type') + + filteredidcs = Signal(list) + + def __init__(self, table, parent=None): + super().__init__(parent) + self.table = table + self.setPlaceholderText( + 'Type the configuration name...') + self.textChanged.connect(self._filter_rows) + + @Slot(str) + def _filter_rows(self, text): + """Filter power supply widgets based on text inserted at line edit.""" + try: + pattern = re.compile(text, re.I) + except Exception: # Ignore malformed patterns? + return + + idxlist = list() + for idx in range(self.table.model().rowCount(1)): + name = self.table.model().createIndex(idx, self.NAME_COL).data() + if not pattern.search(name): + self.table.hideRow(idx) + else: + self.table.showRow(idx) + idxlist.append(idx) + self.filteredidcs.emit(idxlist)
+ + + +
+[docs] +class ConfigDBInfoHeader(QFrame): + + def __init__(self, client, parent=None, config_type=None): + super().__init__(parent) + self._client = client + self._config_type = config_type or 'notexist' + self.setupui() + +
+[docs] + def setupui(self): + # Sub header with database general information + self.layout = QHBoxLayout(self) + vbl = QVBoxLayout() + self.layout.addLayout(vbl) + + hbl = QHBoxLayout() + hbl.addWidget(QLabel('<b>Server:</b>', self)) + hbl.addWidget(QLabel(self._client.url, self)) + hbl.addStretch() + vbl.addLayout(hbl) + + hbl = QHBoxLayout() + hbl.addWidget(QLabel('<b>DB Size:</b>', self)) + try: + dbsize = self._client.get_dbsize() + dbsize = '{:.2f} MB'.format(dbsize/(1024*1024)) + except ConfigDBException: + dbsize = 'Failed to retrieve information' + hbl.addWidget(QLabel(dbsize, self)) + hbl.addStretch() + vbl.addLayout(hbl) + + vbl = QVBoxLayout() + self.layout.addLayout(vbl) + hbl = QHBoxLayout() + hbl.addWidget(QLabel( + '<b>Configuration Type:</b>', self)) + hbl.addWidget(QLabel(self._config_type, self)) + hbl.addStretch() + vbl.addLayout(hbl) + + hbl = QHBoxLayout() + hbl.addWidget(QLabel( + '<b>Number of Configurations:</b>', self)) + self.nr_configs = QLabel(self) + hbl.addWidget(self.nr_configs) + try: + leng = len(self._client.find_configs(config_type=self._config_type)) + except ConfigDBException: + leng = 'NA' + self.nr_configs.setText(str(leng)) + hbl.addStretch() + vbl.addLayout(hbl)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/models/config_db_table_model.html b/_modules/siriushla/as_ap_configdb/models/config_db_table_model.html new file mode 100644 index 000000000..aa1435549 --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/models/config_db_table_model.html @@ -0,0 +1,317 @@ + + + + + + siriushla.as_ap_configdb.models.config_db_table_model — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.models.config_db_table_model

+"""Configuration database model."""
+import time
+
+from qtpy.QtCore import Qt, Signal, QAbstractTableModel, \
+    QAbstractItemModel, QModelIndex
+from qtpy.QtWidgets import QMessageBox
+
+from siriuspy.clientconfigdb import ConfigDBException
+
+
+
+[docs] +class ConfigDbTableModel(QAbstractTableModel): + """Model for configuration database.""" + + removeRow = Signal(QModelIndex) + connectionError = Signal(int, str, str) + horizontalHeader = ('config_type', 'name', 'created', 'modified') + + def __init__(self, config_type, client, discarded=False, parent=None): + """Constructor.""" + super().__init__(parent) + self._client = client + self._discarded = discarded + self._config_type = config_type + self.setupModelData(config_type) + + @property + def config_type(self): + """Configuration type name.""" + return self._config_type + + @config_type.setter + def config_type(self, value): + self._config_type = value + self.setupModelData(self._config_type) + +
+[docs] + def rowCount(self, index): + """Return number of configurations.""" + return len(self._configs)
+ + +
+[docs] + def columnCount(self, index): + """Return number of columns.""" + return len(self.horizontalHeader)
+ + +
+[docs] + def data(self, index, role=Qt.DisplayRole): + """Return data at index.""" + if not index.isValid(): + return None + + if role != Qt.DisplayRole: + return None + + columnName = self.horizontalHeader[index.column()] + if columnName in ('config_type', 'name'): + return self._configs[index.row()][columnName] + elif columnName == 'created': + tmstmp = self._configs[index.row()][columnName] + return time.strftime('%d/%m/%Y %H:%M:%S', time.localtime(tmstmp)) + elif columnName == 'modified': + tmstmp = self._configs[index.row()][columnName][-1] + return time.strftime('%d/%m/%Y %H:%M:%S', time.localtime(tmstmp)) + else: + return str(self._configs[index.row()][columnName]) + + return None
+ + +
+[docs] + def headerData(self, section, orientation, role): + """Return header.""" + if orientation == Qt.Horizontal and role == Qt.DisplayRole: + return self.horizontalHeader[section] + elif orientation == Qt.Vertical and role == Qt.DisplayRole: + return section + 1 + + return None
+ + +
+[docs] + def setupModelData(self, config_type, discarded=False): + """Set model data.""" + self.beginResetModel() + try: + self._configs = self._client.find_configs( + config_type=config_type, discarded=self._discarded) + except ConfigDBException as err: + self._configs = [] + QMessageBox.warning(self.parent(), 'Error', str(err)) + self.endResetModel()
+ + +
+[docs] + def sort(self, column, order=Qt.AscendingOrder): + """Sort model by column.""" + col = self.horizontalHeader[column] + reverse = False if order == Qt.AscendingOrder else True + self.beginResetModel() + if col in ('config_type', 'name'): + self._configs.sort(key=lambda x: x[col].lower(), reverse=reverse) + elif col == 'modified': + self._configs.sort(key=lambda x: len(x[col]), reverse=reverse) + else: + self._configs.sort(key=lambda x: x[col], reverse=reverse) + self.endResetModel()
+ + +
+[docs] + def flags(self, index): + """Override to make cells editable.""" + if not index.isValid(): + return Qt.ItemIsEnabled + return QAbstractItemModel.flags(self, index)
+ + +
+[docs] + def removeRows(self, row, count=1, index=QModelIndex()): + """Updated table.""" + self.beginRemoveRows(index, row, row + count - 1) + config = self._configs[row] + if not self._discarded: + try: + request = self._client.delete_config( + config['name'], config_type=config['config_type']) + except ConfigDBException as err: + self.connectionError.emit( + err.server_code, err.server_message, + 'delete configuration') + return False + else: + try: + request = self._client.retrieve_config( + config['name'], config_type=config['config_type']) + except ConfigDBException as err: + self.connectionError.emit( + err.server_code, err.server_message, + 'retrieve configuration') + self._configs = self._configs[:row] + self._configs[row + count:] + self.endRemoveRows() + return True
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/models/config_names_model.html b/_modules/siriushla/as_ap_configdb/models/config_names_model.html new file mode 100644 index 000000000..399b2a36e --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/models/config_names_model.html @@ -0,0 +1,238 @@ + + + + + + siriushla.as_ap_configdb.models.config_names_model — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.models.config_names_model

+"""Model to get registered configuration names for a given type."""
+from qtpy.QtCore import Qt, QAbstractListModel
+
+from siriuspy.clientconfigdb import ConfigDBException
+
+
+
+[docs] +class ConfigNamesModel(QAbstractListModel): + """Model that gets a list of names given a configuration type.""" + + def __init__(self, connection, parent=None): + """Constructor.""" + super().__init__(parent) + self._config_type = None + self._connection = connection + self.setupModelData() + + @property + def config_type(self): + """Configuration type.""" + return self._config_type + + @config_type.setter + def config_type(self, value): + self._config_type = value + self.setupModelData() + +
+[docs] + def rowCount(self, index): + """Return number of configurations.""" + return len(self._items)
+ + +
+[docs] + def columnCount(self, index): + """Return number of columns.""" + return 1
+ + +
+[docs] + def data(self, index, role=Qt.DisplayRole): + """Return data at index.""" + if not index.isValid(): + return None + + if role != Qt.DisplayRole: + return None + + return self._items[index.row()]
+ + +
+[docs] + def setupModelData(self): + """Setup model data.""" + self.beginResetModel() + if self._config_type is None: + self._items = ['No configuration found...', ] + else: + try: + ret = self._connection.find_configs( + config_type=self._config_type) + if ret: + self._items = ['Select a configuration...', ] + self._items.extend(sorted([r['name'] for r in ret])) + else: + self._items = ['No configuration found...', ] + except ConfigDBException as err: + self._items = [err.server_message, ] + self.endResetModel()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/models/config_types_model.html b/_modules/siriushla/as_ap_configdb/models/config_types_model.html new file mode 100644 index 000000000..213c3b022 --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/models/config_types_model.html @@ -0,0 +1,250 @@ + + + + + + siriushla.as_ap_configdb.models.config_types_model — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.models.config_types_model

+"""Model to get all config types registered."""
+
+from qtpy.QtCore import Qt, QAbstractListModel
+
+
+
+[docs] +class ConfigTypeModel(QAbstractListModel): + """.""" + + def __init__(self, connection, parent=None): + """Constructor.""" + super().__init__(parent) + self._connection = connection + self.setupModelData() + +
+[docs] + def rowCount(self, index): + """Return number of configurations.""" + return len(self._configs)
+ + +
+[docs] + def columnCount(self, index): + """Return number of columns.""" + return 1
+ + +
+[docs] + def data(self, index, role=Qt.DisplayRole): + """Return data at index.""" + if not index.isValid(): + return None + + if role != Qt.DisplayRole: + return None + + return self._configs[index.row()]
+ + +
+[docs] + def setupModelData(self): + """Set model data up.""" + self.beginResetModel() + self._configs = ['Select a configuration type...', ] + dbase = self._connection.get_config_types() + templ = self._connection.get_config_types_from_templates() + config_types = sorted(set(dbase + templ)) + self._configs.extend(config_types) + self.endResetModel()
+
+ + + +
+[docs] +class ConfigPVsTypeModel(ConfigTypeModel): + """.""" + +
+[docs] + def setupModelData(self): + """Set model data up.""" + self.beginResetModel() + self._configs = ['Select a configuration type...', ] + + # sort all configs of PV type + conn = self._connection + allconfs = conn.get_config_types_from_templates() + configs = [c for c in allconfs if 'pvs' in + conn.get_value_from_template(c)] + configs = sorted(configs) + + # move 'global_config' to begin, if it exists + try: + configs.remove('global_config') + configs.insert(0, 'global_config') + except ValueError: + pass + + self._configs.extend(configs) + self.endResetModel()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/models/pv_configuration_model.html b/_modules/siriushla/as_ap_configdb/models/pv_configuration_model.html new file mode 100644 index 000000000..ea8b20740 --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/models/pv_configuration_model.html @@ -0,0 +1,295 @@ + + + + + + siriushla.as_ap_configdb.models.pv_configuration_model — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.models.pv_configuration_model

+"""Model that gets the pvs field of configuration type."""
+from qtpy.QtCore import Qt, QAbstractTableModel
+from siriuspy.clientconfigdb import ConfigDBClient
+
+
+
+[docs] +class PVConfigurationTableModel(QAbstractTableModel): + """Table model with PVs from a given type of configuration.""" + + def __init__(self, config_type=None, parent=None): + """Constructor. + + config_type: configuration type name + connection: connection object + """ + super().__init__(parent) + self._config_type = config_type + self._data = list() + self.setupModelData() + + @property + def model_data(self): + """Data.""" + return self._data + + @property + def config_type(self): + """Configuration type.""" + return self._config_type + + @config_type.setter + def config_type(self, value): + self._config_type = value + self.setupModelData() + +
+[docs] + def rowCount(self, index): + """Return number of rows.""" + return len(self._data)
+ + +
+[docs] + def columnCount(self, index): + """Return number of columns.""" + try: + return len(self._data[0]) + except IndexError: + return 0
+ + +
+[docs] + def data(self, index, role=Qt.DisplayRole): + """Return data at index.""" + if not index.isValid(): + return None + + if role != Qt.DisplayRole: + return None + + column = index.column() + row = index.row() + + return self._data[row][column]
+ + +
+[docs] + def headerData(self, section, orientation, role): + """Return header.""" + if orientation == Qt.Horizontal: + if section == 0: + return 'PV' + elif section == 1: + return 'Value' + elif section == 2: + return 'Delay' + return super().headerData(section, orientation, role)
+ + +
+[docs] + def setupModelData(self): + """Setup model data.""" + if self._config_type is None: + return + self.beginResetModel() + config = ConfigDBClient().get_value_from_template(self._config_type) + if 'pvs' in config: + self._data = config['pvs'] + # self._data.sort(key=lambda x: x[0]) + self.endResetModel()
+ + +
+[docs] + def flags(self, index): + """Override to make cells editable.""" + if not index.isValid(): + return Qt.ItemIsEnabled + if index.column() in (2, ): + return Qt.ItemFlags( + QAbstractTableModel.flags(self, index) | Qt.ItemIsEditable) + return QAbstractTableModel.flags(self, index)
+ + +
+[docs] + def setData(self, index, value, role=Qt.EditRole): + """Set data.""" + if not index.isValid(): + return False + + column = index.column() + row = index.row() + + if column == 0: + return False + + if column == 1: + self._data[row][column] = value + self.dataChanged.emit(index, index) + + if column == 2: + self._data[row][column] = float(value) + self.dataChanged.emit(index, index) + + return True
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/normconfigs/ConfigManagerWindow.html b/_modules/siriushla/as_ap_configdb/normconfigs/ConfigManagerWindow.html new file mode 100644 index 000000000..32b70d9de --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/normconfigs/ConfigManagerWindow.html @@ -0,0 +1,600 @@ + + + + + + siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow

+"""Define a window to manage offline configurations."""
+# from pymysql.err import IntegrityError, InternalError, OperationalError
+from qtpy.QtCore import Qt, QPoint, Slot
+from qtpy.QtWidgets import QVBoxLayout, QPushButton, \
+        QTableView, QWidget, QHBoxLayout, QInputDialog, QMenu, QAction, \
+        QMessageBox
+from qtpy.QtGui import QKeySequence
+from siriushla.widgets import SiriusMainWindow
+from siriushla.widgets import LoadingDialog
+from .ConfigModel import ConfigModel, ConfigDelegate
+from .TuneDlg import TuneDlg
+from .LoadingThread import LoadingThread
+
+
+
+[docs] +class ConfigManagerWindow(SiriusMainWindow): + """Window to manage offline configuration of BO and SI devices. + + This window allows the user to create new configurations as well as + interpolate or apply a tune or chromaticity delta to a configuration. + """ + + NEW_CONFIGURATION = 0 + + def __init__(self, config_type, parent=None): + """Init UI.""" + super(ConfigManagerWindow, self).__init__(parent) + + self._config_type = config_type + self._model = ConfigModel(self._config_type) + self._delegate = ConfigDelegate() + + self._setup_ui() + + self.ld_cur_state_btn.clicked.connect(self._loadCurrentConfiguration) + self.ld_config_btn.clicked.connect(self._addConfiguration) + self.delete_config_btn.clicked.connect(self._removeConfiguration) + + self.setGeometry(100, 100, 1600, 900) + self.setWindowTitle("Configuration Manager") + self.show() + + def _setup_ui(self): + self.central_widget = QWidget() + self.central_widget.layout = QHBoxLayout() + + self.button_box = QVBoxLayout() + self.ld_cur_state_btn = QPushButton("Load Current State") + self.ld_config_btn = QPushButton("Load Configuration") + self.ld_config_btn.setShortcut(QKeySequence.New) + self.delete_config_btn = QPushButton("Delete Configuration") + self.button_box.addWidget(self.delete_config_btn) + self.button_box.addWidget(self.ld_config_btn) + self.button_box.addWidget(self.ld_cur_state_btn) + self.button_box.addStretch() + + # TableView + self.table = QTableView(self) + self.table.setModel(self._model) + self.table.setItemDelegate(self._delegate) + # self.table.setSelectionBehavior(QAbstractItemView.SelectColumns) + self.table.setContextMenuPolicy(Qt.CustomContextMenu) + self.table.customContextMenuRequested.connect(self._showHeaderMenu) + self.table.resizeColumnsToContents() + self.table.resizeRowsToContents() + + # TableView Headers + self.headers = self.table.horizontalHeader() + self.headers.setContextMenuPolicy(Qt.CustomContextMenu) + self.headers.customContextMenuRequested.connect(self._showHeaderMenu) + + self.central_widget.layout.addLayout(self.button_box) + self.central_widget.layout.addWidget(self.table) + self.central_widget.setLayout(self.central_widget.layout) + + # Set widget + self.setCentralWidget(self.central_widget) + +
+[docs] + def closeEvent(self, event): + """Close window. + + The user is warned if there are any unsaved changes. + """ + columns = list(range(len(self._model.configurations))) + columns.sort(reverse=True) + if not self._closeConfigurations(columns): + event.ignore()
+ + +
+[docs] + def keyPressEvent(self, event): + """Override keyPressEvent. + + Ctrl+S - Save changes + Ctrl+W - Close configuration on focus + F2 - Rename configuration on focus + Ctrl+Z - Undo + Ctrl+R - Redo + """ + if event.key() == Qt.Key_S: + self._saveChanges() + return + if event.key() == Qt.Key_W: + self._closeConfigurationOnFocus() + return + if event.key() == Qt.Key_F2: + self._renameOnFocus() + return + if event.key() == Qt.Key_Z: + print(self._model._undo) + if len(self._model._undo) > 0: + self._model._undo.pop()[1]() + return + if event.key() == Qt.Key_R: + if len(self._model._redo) > 0: + self._model._redo.pop()[1]() + return
+ + + @Slot(QPoint) + def _showHeaderMenu(self, point): + column = self.headers.logicalIndexAt(point.x()) + if column == -1: + return + menu = QMenu(self) + # Actions + cols = self.table.selectionModel().selectedColumns() + if len(cols) != 2 or column not in [col.column() for col in cols]: + self.table.selectColumn(column) + menu.aboutToHide.connect(lambda: self.table.clearSelection()) + + save = QAction("Save", menu) + save.triggered.connect(lambda: self._saveConfiguration(column)) + save_all = QAction("Save all", menu) + save_all.triggered.connect(lambda: self._saveChanges()) + save_all.setShortcut(QKeySequence.Save) + rename = QAction("Rename", menu) + rename.triggered.connect(lambda: self._renameConfiguration(column)) + close = QAction("Close", menu) + close.triggered.connect(lambda: self._closeConfiguration(column)) + close.setShortcut(QKeySequence.Close) + close_right = QAction("Close to the right", menu) + close_right.triggered.connect( + lambda: self._closeConfigurationsToTheRight(column)) + close_others = QAction("Close other", menu) + close_others.triggered.connect( + lambda: self._closeOtherConfigurations(column)) + close_all = QAction("Close all", menu) + close_all.triggered.connect(lambda: self._closeAllConfigurations()) + tune = QAction("Tune", menu) + tune.triggered.connect(lambda: self._tuneConfiguration(column)) + + menu.addActions([save, save_all]) + menu.addSeparator() + menu.addActions([rename]) + menu.addSeparator() + menu.addActions([close, close_right, close_others, close_all]) + menu.addSeparator() + menu.addActions([tune]) + else: + bar = QAction("Interpolate", menu) + bar.triggered.connect(lambda: self._barConfiguration(cols)) + + menu.addAction(bar) + + vheader_offset = self.table.verticalHeader().width() + point.setX(point.x() + vheader_offset) + menu.popup(self.mapToGlobal(point)) + + # ContextMenu Actions + @Slot(int) + def _saveConfiguration(self, column): + try: + self._model.saveConfiguration(column) + return True + except Exception as e: + QMessageBox(QMessageBox.Warning, "Failed to save data", + "{}, {}".format(e, type(e))).exec_() + return False + + @Slot(int) + def _renameConfiguration(self, column): + new_name, ok = QInputDialog.getText(self, "New name", "Rename to:") + if ok and new_name: + return self._model.renameConfiguration(column, new_name) + + @Slot(int) + def _closeConfiguration(self, column): + self._closeConfigurations([column]) + + @Slot(int) + def _closeConfigurationsToTheRight(self, column): + columns = list() + i = len(self._model.configurations) - 1 + while i > column: + columns.append(i) + i -= 1 + + self._closeConfigurations(columns) + + @Slot(int) + def _closeOtherConfigurations(self, column): + columns = list() + i = len(self._model.configurations) - 1 + while i >= 0: + if i == column: + i -= 1 + continue + columns.append(i) + i -= 1 + + self._closeConfigurations(columns) + + @Slot() + def _closeAllConfigurations(self): + columns = list() + i = len(self._model.configurations) - 1 + while i >= 0: + columns.append(i) + i -= 1 + + self._closeConfigurations(columns) + + def _closeConfigurations(self, columns): + save = self._maybeSaveChanges(columns) + + if save == QMessageBox.Discard: + for column in columns: + self._model.cleanUndo(column) + self._model.closeConfiguration(column) + return True + elif save == QMessageBox.Save: + for column in columns: + if self._saveConfiguration(column): + self._model.cleanUndo(column) + self._model.closeConfiguration(column) + else: + return False + return True + else: + return False + + @Slot(int) + def _tuneConfiguration(self, column): + dlg = TuneDlg(self) + ok1 = dlg.exec_() + if ok1: + # Get Matrix Calculate deltaK and show to user + tune = [dlg.tune_x.value(), dlg.tune_y.value()] + try: + inv_matrix = self._model.getTuneMatrix() + except Exception as e: + self._showWarningBox("{}".format(e), + "Failed to retrieve tune matrix") + else: + delta_f = tune[0]*inv_matrix[0][0] + tune[1]*inv_matrix[0][1] + delta_d = tune[0]*inv_matrix[1][0] + tune[1]*inv_matrix[1][1] + # config_name, ok2 = QInputDialog.getText( + # self, "Select value", "New Configuration Name:") + # if ok2: + # if not config_name: + proceed = QMessageBox( + QMessageBox.Question, "Delta K", + ("\u0394K<sub>d</sub> = {:1.3f}<br>" + "\u0394K<sub>f</sub> = {:1.3f}<br>" + "Proceed?").format(delta_d, delta_f), + QMessageBox.Ok | QMessageBox.Cancel, self).exec_() + if proceed == QMessageBox.Ok: + config_name = self._getNextName() + self._model.deriveConfiguration(config_name, column, + ConfigModel.TUNE, + [delta_d, delta_f]) + + @Slot(int) + def _barConfiguration(self, cols): + if len(cols) != 2: + raise SystemError("Must interpolate 2 columns") + new_name, ok = QInputDialog.getText(self, "New name", "Rename to:") + if ok: + if not new_name: + new_name = self._getNextName() + + self._model.interpolateConfiguration( + new_name, cols[0].column(), cols[1].column()) + + # Window menu slots + @Slot() + def _addConfiguration(self): + try: + configs = self._model.getConfigurations() + except Exception as e: + self._showWarningBox(e, "Failed to retrieve configurations") + else: + if configs: + options = [item["name"] for item in configs] + config_name, ok = QInputDialog.getItem( + self, "Available Configurations", + "Select a configuration:", options, 0, False) + if ok and config_name: + if not self._isConfigurationLoaded(config_name): + self._model.loadConfiguration(name=config_name) + else: + QMessageBox( + QMessageBox.Information, + "Configuration already loaded", + "Configuration is already loaded." + ).exec_() + # Highlight new column; or the one that is already loaded + col = self._model.getConfigurationColumn(config_name) + self.table.selectColumn(col) + else: + self._showMessageBox("No configuration found") + return + + @Slot() + def _removeConfiguration(self): + try: + configs = self._model.getConfigurations() + except Exception as e: + self._showWarningBox(e, "Failed to retrieve configurations") + else: + if configs: + # Show configs available + options = [item["name"] for item in configs] + config, ok = QInputDialog.getItem( + self, "Available Configurations", + "Select a configuration:", options, 0, False) + if ok and config: + # Ask for confirmation + if self._isConfigurationLoaded(config): + msg = ("Configuration is currenty loaded." + "Delete it anyway?") + else: + msg = ("This will permanently delete configuration {}." + "Proceed?").format(config) + + if self._showDialogBox(msg) == QMessageBox.Cancel: + return + # Delete configuration + config = configs[options.index(config)] + try: + self._model.deleteConfiguration(config) + except Exception as e: + self._showWarningBox(e) + else: + self._showMessageBox( + "Configuration {} was deleted.".format( + config['name'])) + else: + self._showMessageBox("No configuration found") + return + + @Slot() + def _loadCurrentConfiguration(self): + try: + t = LoadingThread( + self._getNextName(), self._model._vertical_header, self) + dlg = \ + LoadingDialog("Loading", len(self._model._vertical_header), self) + t.taskUpdated.connect(dlg.update) + t.taskFinished.connect(dlg.done) + t.start() + dlg.exec_() + except Exception as e: + self._showWarningBox("{}".format(e)) + + # Actions binded with keys + def _saveChanges(self): + for column in range(len(self._model.configurations)): + self._saveConfiguration(column) + + def _closeConfigurationOnFocus(self): + cols = self.table.selectionModel().selectedColumns() + columns = list() + for col in cols: + columns.append(col.column()) + columns.sort(reverse=True) + self._closeConfigurations(columns) + + def _renameOnFocus(self): + cols = self.table.selectionModel().selectedColumns() + if len(cols) == 1: + self._renameConfiguration(cols[0].column()) + + # Helpers + def _isConfigurationLoaded(self, config_name): + ret = self._model.getConfigurationColumn(config_name) + + if ret == -1: + return False + + return True + + def _getNextName(self): + # Treat if there already exist saved configuration with this name + configs = self._model.getConfigurations(deleted=None) + configs = [item["name"] for item in configs] + configs.extend([item.name for item in self._model.configurations]) + new_name = 'config-{}'.format(self.NEW_CONFIGURATION) + while new_name in configs: + self.NEW_CONFIGURATION += 1 + new_name = 'config-{}'.format(self.NEW_CONFIGURATION) + return new_name + + def _maybeSaveChanges(self, columns): + ask_to_save = False + for column in columns: + if self._model.configurations[column].dirty: + ask_to_save = True + break + # If nothing to save, will close all columns + if not ask_to_save: + return QMessageBox.Discard + # Ask if user wants to save changes + msg_box = QMessageBox( + QMessageBox.Question, + "There are unsaved changes", + "Keep changes?", + QMessageBox.Save | QMessageBox.Cancel | QMessageBox.Discard, + self) + + return msg_box.exec_() + + def _showWarningBox(self, message, title="Warning"): + QMessageBox(QMessageBox.Warning, title, '{}'.format(message)).exec_() + + def _showMessageBox(self, message, title="Message"): + return QMessageBox(QMessageBox.Information, title, message).exec_() + + def _showDialogBox(self, message, title="Dialog"): + return QMessageBox( + QMessageBox.Information, title, message, + QMessageBox.Ok | QMessageBox.Cancel).exec_()
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/normconfigs/ConfigModel.html b/_modules/siriushla/as_ap_configdb/normconfigs/ConfigModel.html new file mode 100644 index 000000000..9534895a7 --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/normconfigs/ConfigModel.html @@ -0,0 +1,728 @@ + + + + + + siriushla.as_ap_configdb.normconfigs.ConfigModel — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.normconfigs.ConfigModel

+"""Configuration window model definition."""
+import re
+from qtpy.QtCore import Qt, QAbstractTableModel, QModelIndex, QVariant
+from qtpy.QtWidgets import QItemDelegate, QDoubleSpinBox
+from qtpy.QtGui import QColor
+from siriuspy.clientconfigdb import ConfigDBClient
+
+
+
+[docs] +class Configuration: + """Represents a configuration.""" + + def __init__(self, name, config_type, values, new=True): + """Init.""" + self._name = name + self._config_type = config_type + self._values = values['pvs'] + + self._old_name = None + self._renamed = False + self._dirty_pvs = dict() + self._is_new = new + +
+[docs] + @staticmethod + def newConfiguration(name, config_type, values): + """Create new configuration.""" + return Configuration(name, config_type, values)
+ + +
+[docs] + @staticmethod + def loadConfiguration(config_type, name): + """Load existing configuration.""" + config = Configuration._load(config_type, name) # Might fail + name = config["name"] + config_type = config["config_type"] + values = config["value"] + return Configuration(name, config_type, values, False)
+ + + @staticmethod + def _load(config_type, name): + db = ConfigDBClient() + data = db.get_config_info(name, config_type=config_type) + data['value'] = db.get_config_value(name, config_type=config_type) + return data + +
+[docs] + @staticmethod + def delete_config(config_type, name): + """Delete configuration.""" + db = ConfigDBClient() + return db.delete_config(name, config_type=config_type)
+ + + @property + def name(self): + """Configuration name.""" + return self._name + + @name.setter + def name(self, new_name): + """Set new name to configuration.""" + if new_name == self._old_name: + self._renamed = False + self._name = self._old_name + else: + self._renamed = True + self._old_name = self._name + self._name = new_name + + @property + def old_name(self): + """Configuration name in database.""" + return self._old_name + + @property + def values(self): + """PV values.""" + return {'pvs': self._values} + + @property + def dirty(self): + """Return wether thre is unsaved data.""" + if len(self._dirty_pvs) > 0 or self._renamed or self._is_new: + return True + return False + +
+[docs] + def setValue(self, pv_name, value): + """Set value of a given pv.""" + if value != self._values[pv_name]: + # If the configuration is new there is no need to set dirty flags + if not self._is_new: + # Clean dirty flag + if pv_name in self._dirty_pvs.keys() \ + and value == self._dirty_pvs[pv_name]: + del self._dirty_pvs[pv_name] + # Set dirty flag + elif pv_name not in self._dirty_pvs.keys(): + self._dirty_pvs[pv_name] = self._values[pv_name] + # Finally set value + self._values[pv_name] = value
+ + +
+[docs] + def save(self): + """Save data.""" + db = ConfigDBClient() + if self._is_new or self._renamed or self._dirty_pvs: + # Insert configuration + db.insert_config( + self._name, {'pvs': self._values}, + config_type=self._config_type) + # Clear flags + self._is_new = False + self._renamed = False + self._dirty_pvs = dict()
+ + +
+[docs] + def delete(self): + """Delete configuration.""" + db = ConfigDBClient() + db.delete_config(self._name, config_type=self._config_type)
+
+ + + +
+[docs] +class ConfigDelegate(QItemDelegate): + """Styling.""" + +
+[docs] + def paint(self, painter, option, index): + """Override paint function. + + Responsible for painting dirt columns and cells. + """ + col = index.column() + pvname = index.model()._vertical_header[index.row()]['name'] + if pvname in index.model().configurations[col]._dirty_pvs.keys(): + color = QColor(200, 0, 0) + painter.fillRect(option.rect, color) + QItemDelegate.paint(self, painter, option, index) + elif index.model().configurations[col].dirty: + color = QColor(230, 230, 230) + painter.fillRect(option.rect, color) + QItemDelegate.paint(self, painter, option, index) + else: + QItemDelegate.paint(self, painter, option, index)
+ + +
+[docs] + def createEditor(self, parent, option, index): + """Override. + + Create and editor based on the cell type + """ + editor = QDoubleSpinBox(parent) + editor.setDecimals(5) + return editor
+ + +
+[docs] + def setEditorData(self, editor, index): + """Override. + + Set cell data as float. + """ + value = index.model().data(index, Qt.DisplayRole) + editor.setValue(float(value.value()))
+
+ + + +
+[docs] +class ConfigModel(QAbstractTableModel): + """Model for the configuration table.""" + + TUNE, CHROMATICITY = range(2) + UNDO_MEMORY = 75 + + def __init__(self, config_type, parent=None): + """Class constructor.""" + super(ConfigModel, self).__init__(parent) + + self._config_type = config_type + self._setVerticalHeader() + self._types = set() + self._configurations = list() + self._undo = list() + self._redo = list() + + @property + def configurations(self): + """Return list of open configurations.""" + return self._configurations + + # QAbstractTableModel Overriden functions +
+[docs] + def rowCount(self, index=QModelIndex()): + """Return the number of PVs for this configuration type.""" + return len(self._vertical_header)
+ + +
+[docs] + def columnCount(self, index=QModelIndex()): + """Return the number of configurations currently open.""" + return len(self._configurations)
+ + +
+[docs] + def data(self, index, role=Qt.DisplayRole): + """Set data of the table (override).""" + if role == Qt.DisplayRole: + pvname = self._vertical_header[index.row()]['name'] + pvtype = self._vertical_header[index.row()]['type'] + if pvtype == float: + return QVariant("{:8.5f}".format( + self._configurations[index.column()].values[pvname])) + else: + raise NotImplementedError
+ + +
+[docs] + def headerData(self, section, orientation, role=Qt.DisplayRole): + """Set headers of the table (override).""" + if role == Qt.TextAlignmentRole: + pass + if role != Qt.DisplayRole: + return QVariant() + if orientation == Qt.Horizontal: + if not self._configurations[section].dirty: + return QVariant(self._configurations[section].name) + else: + return QVariant(self._configurations[section].name + "*") + elif orientation == Qt.Vertical: + if role == Qt.DisplayRole: + pvname = self._vertical_header[section]['name'] + vheader = "{}".format(pvname) + return QVariant(vheader) + + return QVariant(int(section + 1))
+ + +
+[docs] + def flags(self, index): + """Override to make cells editable.""" + if not index.isValid(): + return Qt.ItemIsEnabled + return Qt.ItemFlags( + QAbstractTableModel.flags(self, index) | Qt.ItemIsEditable)
+ + +
+[docs] + def setData(self, index, value, role=Qt.EditRole): + """Set cell data.""" + row = index.row() + col = index.column() + if index.isValid() and 0 <= row < len(self._vertical_header): + pvname = self._vertical_header[row]['name'] + config_name = self._configurations[col].name + old_value = self._configurations[col].values[pvname] + # Clean undo if it is the case + if len(self._undo) > self.UNDO_MEMORY: + self._undo.pop(0) + # Append new undo action + self._undo.append( + (config_name, lambda: self.setDataAlt(row, config_name, + value, old_value))) + # Update Value + self._configurations[col].setValue(pvname, value) + # Update view + self.headerDataChanged.emit(Qt.Horizontal, col, col) + self.dataChanged.emit(index, index) + return True + return False
+ + +
+[docs] + def insertColumn(self, column, index=QModelIndex()): + """Update table widget telling it a new column was inserted.""" + self.beginInsertColumns(index, column, column) + self.endInsertColumns() + + return True
+ + +
+[docs] + def removeColumns(self, column, count=1, index=QModelIndex()): + """Update table widget telling it a column was removed.""" + self.beginRemoveColumns(index, column, column + count - 1) + self.endRemoveColumns() + + return True
+ + + # Private members + def _setVerticalHeader(self): + # Used to sort section elements dict + def subSection(elem): + if re.search('-Fam', elem): + return 0 + else: + return 1 + + def elem(elem): + name = elem + if re.search('-B', name): + return 0 + elif re.search('-QF', name): + return 2 + elif re.search('-QD', name): + return 4 + elif re.search('-Q[0-9]', name): + return 6 + elif re.search('-SF', name): + return 8 + elif re.search('-SD', name): + return 10 + elif re.search('-CH', name): + return 12 + elif re.search('-CV', name): + return 14 + elif re.search('-FCH', name): + return 16 + elif re.search('-FCV', name): + return 18 + else: + return 20 + + self._vertical_header = list() + client = ConfigDBClient() + if self._config_type == 'bo_normalized': + pvs = client.get_value_from_template('bo_normalized')['pvs'] + elif self._config_type == 'si_normalized': + pvs = client.get_value_from_template('si_normalized')['pvs'] + else: + raise Exception("Module {} not found".format(self._config_type)) + # pvs = get_dict()["value"] + # pvs = getattr(ConfigurationPvs, self._config_type)().pvs() + for name, value, _ in pvs: + self._vertical_header.append({'name': name, 'type': type(value)}) + self._vertical_header.sort( + key=lambda x: elem(x['name']) + subSection(x['name'])) + + def _addConfiguration(self, column, id=None, + config_name=None, values=None): + """Add new configuration to table.""" + # Create new configuration + if values is None: + new_configuration = Configuration.loadConfiguration( + self._config_type, config_name) + else: + new_configuration = Configuration.newConfiguration( + config_name, self._config_type, values) + # Add to model in case it was successfully created + if column >= self.columnCount(): + self._configurations.append(new_configuration) + else: + self._configurations.insert(column, new_configuration) + # Call insertColumns to update table widget + self.insertColumn(column) + + # Interface functions view - model +
+[docs] + def getConfigurationColumn(self, config_name): + """Return column number of the given configuration.""" + for configuration in self._configurations: + if config_name in (configuration.name, configuration.old_name): + return self._configurations.index(configuration) + + return -1
+ + +
+[docs] + def getConfigurations(self, deleted=False): + """Return name of saved configurations.""" + db = ConfigDBClient() + return db.find_configs( + config_type=self._config_type, discarded=deleted)
+ + +
+[docs] + def getTuneMatrix(self): + """Get tune matrix from db.""" + db = ConfigDBClient() + return db.get_config_value("tune_matrix", "tune_matrix")
+ + + # Actions +
+[docs] + def saveConfiguration(self, column): + """Save configuration if it is dirty.""" + if self._configurations[column].dirty: + self._configurations[column].save() + # Issue a change in the table and header + idx1 = self.index(0, column) + idx2 = self.index(self.rowCount() - 1, column) + self.dataChanged.emit(idx1, idx2) + self.headerDataChanged.emit(Qt.Horizontal, column, column)
+ + +
+[docs] + def renameConfiguration(self, column, new_name): + """Change configuration name.""" + self._configurations[column].name = new_name
+ + +
+[docs] + def deriveConfiguration(self, config_name, base_column, func, parameters): + """Create new configuration from existing one TUNE or CHROMATICITY.""" + # Derives new configuration + new_configuration = dict() + for pv in self._vertical_header: + pvname = pv['name'] + # pvtype = pv['type'] + value = self._configurations[base_column].values[pvname] + if func == self.TUNE: # Applied to quadrupoles + if re.search("-QD", pvname): + new_value = value + parameters[0] + elif re.search("QF", pvname): + new_value = value + parameters[1] + else: + new_value = value + elif func == self.CHROMATICITY: + new_value = value + else: + new_value = value + new_configuration[pvname] = new_value + # Add configuration to table as a new column + self._addConfiguration( + base_column+1, config_name=config_name, values=new_configuration)
+ + +
+[docs] + def closeConfiguration(self, column): + """Close a configuration.""" + self._configurations.remove(self._configurations[column]) + self.removeColumns(column)
+ + +
+[docs] + def interpolateConfiguration(self, config_name, column1, column2): + """Linear interpolation of 2 configurations.""" + for type_ in self._getTypes(): + if type_ not in [int, float]: + raise ValueError("Cannot interpolate non-numeric values") + + new_configuration = dict() + for pv in self._vertical_header: + pvname = pv['name'] + value1 = self._configurations[column1].values[pvname] + value2 = self._configurations[column2].values[pvname] + new_configuration[pvname] = (value1 + value2)/2 + # Choose where to place new column + new_column = column1 if column1 > column2 else column2 + self._addConfiguration( + new_column + 1, config_name=config_name, values=new_configuration)
+ + +
+[docs] + def loadConfiguration(self, name=None, values=None): + """Load configuration from database.""" + if values is None: # Load existing config + self._addConfiguration(self.columnCount(), config_name=name) + else: # New config + self._addConfiguration( + self.columnCount(), config_name=name, values=values)
+ + +
+[docs] + def deleteConfiguration(self, config_info): + """Delete configuration from database.""" + col = self.getConfigurationColumn(config_info["name"]) + Configuration.delete_config(config_info['config_type'], config_info['name']) + if col >= 0: + self.closeConfiguration(col)
+ + + # Implements undo/redo +
+[docs] + def setDataAlt(self, row, config_name, value, old_value, redo=True): + """Called by the undo/redo methods to change data on table.""" + pvname = self._vertical_header[row]['name'] + # pvtype = self._vertical_header[row]['type'] + column = self.getConfigurationColumn(config_name) + index = self.index(row, column) + self._configurations[column].setValue(pvname, old_value) + if redo: + # Clean redo if bigger than memort + if len(self._redo) > self.UNDO_MEMORY: + self._redo.pop(0) + # Append new redo action + self._redo.append( + (config_name, + lambda: self.setDataAlt( + row, config_name, old_value, value, False))) + else: + # Clean undo if bigger than memory + if len(self._undo) > self.UNDO_MEMORY: + self._undo.pop(0) + # Append new undo action + self._undo.append( + (config_name, + lambda: self.setDataAlt( + row, config_name, old_value, value, True))) + # Update view + self.headerDataChanged.emit( + Qt.Horizontal, index.column(), index.column()) + self.dataChanged.emit(index, index)
+ + +
+[docs] + def cleanUndo(self, column): + """Clean undo/redo actions for given column.""" + config_name = self._configurations[column].name + for i, action in enumerate(self._undo): + if action[0] == config_name: + self._undo.pop(i) + + for i, action in enumerate(self._redo): + if action[0] == config_name: + self._redo.pop(i)
+ + + def _getTypes(self): + if not self._types: + for pv in self._vertical_header: + self._types.add(pv['type']) + return self._types
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/normconfigs/LoadingThread.html b/_modules/siriushla/as_ap_configdb/normconfigs/LoadingThread.html new file mode 100644 index 000000000..1db09a2ce --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/normconfigs/LoadingThread.html @@ -0,0 +1,198 @@ + + + + + + siriushla.as_ap_configdb.normconfigs.LoadingThread — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.normconfigs.LoadingThread

+import os
+from epics import caget
+from qtpy.QtCore import Signal, QThread
+from qtpy.QtWidgets import QDialog
+
+
+
+[docs] +class LoadingThread(QThread): + VACA_PREFIX = os.environ.get('VACA_PREFIX', default='') + + taskUpdated = Signal(int) + taskFinished = Signal(int) + + def __init__(self, name, pv_list, parent=None): + super(LoadingThread, self).__init__(parent) + self.name = name + self.pv_list = pv_list + self.parent = parent + +
+[docs] + def run(self): + values = dict() + for i, pvname in enumerate(self.pv_list): + # current_pv = ':'.join(pvname['name'].split(':')[:2]) + ':Current-RB' + force = caget(self.VACA_PREFIX + pvname["name"], timeout=0.3) # readForce + if force is None: + force = -1 + values[pvname['name']] = force + self.taskUpdated.emit(i + 1) + + self.parent._model.loadConfiguration(name=self.name, values=values) + self.taskFinished.emit(QDialog.Accepted)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/normconfigs/TuneDlg.html b/_modules/siriushla/as_ap_configdb/normconfigs/TuneDlg.html new file mode 100644 index 000000000..f4b22c31e --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/normconfigs/TuneDlg.html @@ -0,0 +1,200 @@ + + + + + + siriushla.as_ap_configdb.normconfigs.TuneDlg — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.normconfigs.TuneDlg

+from qtpy.QtWidgets import QDialog, QDialogButtonBox, \
+    QGridLayout, QLabel
+from siriushla.widgets import QDoubleSpinBoxPlus
+
+
+
+[docs] +class TuneDlg(QDialog): + def __init__(self, parent=None): + super(TuneDlg, self).__init__(parent) + + self._setupUi() + + self.button_box.accepted.connect(self.accept) + self.button_box.rejected.connect(self.reject) + + def _setupUi(self): + self.layout = QGridLayout() + + self.tune_x_label = QLabel("\u0394\u03bd<sub>x</sub>", self) + self.tune_y_label = QLabel("\u0394\u03bd<sub>y</sub>", self) + self.tune_x = QDoubleSpinBoxPlus(self) + self.tune_x.setSingleStep(0.1) + self.tune_y = QDoubleSpinBoxPlus(self) + self.tune_y.setSingleStep(0.1) + + self.button_box = QDialogButtonBox( + QDialogButtonBox.Ok|QDialogButtonBox.Cancel) + + self.layout.addWidget(self.tune_x_label, 0, 0) + self.layout.addWidget(self.tune_x, 0, 1) + self.layout.addWidget(self.tune_y_label, 1, 0) + self.layout.addWidget(self.tune_y, 1, 1) + self.layout.addWidget(self.button_box, 2, 0, 1, 2) + + self.setWindowTitle("Tune Dialog") + self.setLayout(self.layout)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/pvsconfigs/delegate/pv_configuration_delegate.html b/_modules/siriushla/as_ap_configdb/pvsconfigs/delegate/pv_configuration_delegate.html new file mode 100644 index 000000000..a36752ca0 --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/pvsconfigs/delegate/pv_configuration_delegate.html @@ -0,0 +1,199 @@ + + + + + + siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate

+"""Configuration Delegate."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QItemDelegate, QDoubleSpinBox
+
+
+
+[docs] +class PVConfigurationDelegate(QItemDelegate): + +
+[docs] + def createEditor(self, parent, option, index): + """Override. + + Create and editor based on the cell type + """ + if index.column() == 2: + editor = QDoubleSpinBox(parent) + editor.setDecimals(3) + editor.setMaximum(10) + editor.setMinimum(0) + editor.setSingleStep(0.001) + return editor
+ + +
+[docs] + def setEditorData(self, editor, index): + """Override. + + Set cell data as float. + """ + value = index.model().data(index, Qt.DisplayRole) + editor.setValue(value)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/pvsconfigs/load_and_apply.html b/_modules/siriushla/as_ap_configdb/pvsconfigs/load_and_apply.html new file mode 100644 index 000000000..4cd121234 --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/pvsconfigs/load_and_apply.html @@ -0,0 +1,457 @@ + + + + + + siriushla.as_ap_configdb.pvsconfigs.load_and_apply — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.pvsconfigs.load_and_apply

+"""Set configuration window."""
+import logging
+
+from qtpy.QtCore import Qt, Slot, Signal
+from qtpy.QtWidgets import QWidget, QComboBox, QLabel, QPushButton, \
+    QHBoxLayout, QVBoxLayout, QSplitter, QMessageBox
+
+import qtawesome as qta
+
+from siriuspy.clientconfigdb import ConfigDBException
+
+from siriushla.common.epics.wrapper import PyEpicsWrapper
+from siriushla.common.epics.task import EpicsChecker, EpicsSetter, \
+    EpicsConnector, EpicsWait
+from siriushla.widgets.windows import SiriusMainWindow
+from siriushla.widgets.pvnames_tree import PVNameTree
+from siriushla.widgets.dialog import ReportDialog, ProgressDialog
+from .. import LoadConfigDialog
+from ..models import ConfigPVsTypeModel
+
+
+
+[docs] +class SelectAndApplyPVsWidget(QWidget): + """Select and Apply PVs widget.""" + + settingFinished = Signal() + + def __init__(self, parent, client, wrapper=PyEpicsWrapper): + super().__init__(parent=parent) + self._client = client + self._wrapper = wrapper + self._current_config = None + + self.logger = logging.getLogger(__name__) + self.logger.setLevel(logging.INFO) + + self.setupui() + +
+[docs] + def setupui(self): + """Setup widget.""" + # Add Send Button + self._set_btn = QPushButton('Apply Selected PVs', self) + self._set_btn.setObjectName('set_btn') + self._set_btn.setStyleSheet( + '#set_btn{font-size:1.5em; min-width:8em;}') + self._set_btn.clicked.connect(self._set) + + # Add Selection Tree + self._tree = PVNameTree( + tree_levels=('sec', 'dis', 'dev', 'device_name')) + self._tree.updateItemCheckedCount.connect( + self._update_but_text) + + self.setLayout(QVBoxLayout()) + self.layout().addWidget(QLabel('<h3>Configuration</h3>')) + self.layout().addWidget(self._tree) + hlay = QHBoxLayout() + hlay.addStretch() + hlay.addWidget(self._set_btn) + hlay.addStretch() + self.layout().addLayout(hlay)
+ + + @property + def current_config_type(self): + """Current config type.""" + if self.current_config: + return self.current_config['config_type'] + return None + + @property + def current_config(self): + """Current config data.""" + return self._current_config['name'] + + @current_config.setter + def current_config(self, value): + if self._current_config: + self.fill_config(self._current_config['config_type'], value) + + @Slot() + def _set(self): + # Get selected PVs + selected_pvs = set(self._tree.checked_items()) + + set_pvs_tuple = list() + check_pvs_tuple = list() + + for data in self._current_config['value']['pvs']: + try: + pvo, value, delay = data + except ValueError: + pvo, value = data + delay = 1e-2 + if pvo in selected_pvs: + set_pvs_tuple.append((pvo, value, delay)) + if pvo.endswith('-Cmd'): + self.logger.warning('{} being checked'.format(pvo)) + check_pvs_tuple.append((pvo, value, delay)) + + # if nothing selected, show message and abort + if not set_pvs_tuple: + msg = 'No PV selected!' + self.logger.warning(msg) + QMessageBox.warning(self, 'Warning', msg) + return + + # Create thread + failed_items = [] + pvs, values, delays = zip(*set_pvs_tuple) + conn_task = EpicsConnector(pvs, self._wrapper, self) + set_task = EpicsSetter(pvs, values, delays, self._wrapper, self) + pvs, values, delays = zip(*check_pvs_tuple) + check_task = EpicsChecker(pvs, values, delays, self._wrapper, self) + check_task.itemChecked.connect( + lambda pv, status: failed_items.append(pv) if not status else None) + + sleep_task = EpicsWait(pvs, wait_time=2.0, parent=self) + + # Set/Check PVs values and show wait dialog informing user + labels = [ + 'Connecting with PVs', + 'Setting PV values', + 'Waiting IOCs updates', + 'Checking PV values'] + tasks = [conn_task, set_task, sleep_task, check_task] + self.logger.debug( + 'Setting {} configuration'.format(self._current_config['name'])) + dlg = ProgressDialog(labels, tasks, self) + dlg.rejected.connect(set_task.exit_task) + dlg.rejected.connect(check_task.exit_task) + ret = dlg.exec_() + if ret == dlg.Rejected: + return + # Show report dialog informing user results + for item in failed_items: + self.logger.warning('Failed to set/check {}'.format(item)) + self._report = ReportDialog(failed_items, self) + self._report.exec_() + self.settingFinished.emit() + +
+[docs] + @Slot(str, str) + def fill_config(self, config_type, config_name): + """Fill config data.""" + self._tree.clear() + try: + ret = self._client.get_config_info( + config_name, config_type=config_type) + ret['value'] = self._client.get_config_value( + config_name, config_type=config_type) + self._current_config = ret + pvs = self._current_config['value']['pvs'] + self._tree.items = pvs + self._tree.check_all() + self._tree.collapse_all() + except KeyError: + self._tree.message = 'Configuration has no field pvs' + except ConfigDBException as err: + self._tree.message = 'Failed to retrieve configuration:' + \ + ' error {}'.format(err.server_code)
+ + + @Slot(int) + def _update_but_text(self, count): + """Update apply button text.""" + text = 'Apply Selected PVs ({})'.format(count) \ + if count else 'Apply Selected PVs' + self._set_btn.setText(text)
+ + + +
+[docs] +class SelectConfigWidget(QWidget): + """Select config Widget.""" + + configChanged = Signal(str, str) + + def __init__(self, parent, client): + super().__init__(parent=parent) + self._client = client + self.setupui() + +
+[docs] + def setupui(self): + """Setup widget.""" + self.setLayout(QVBoxLayout()) + + # Add combo box with types + self._type_cb = QComboBox(self) + self._type_cb.setObjectName('type_cb') + self._type_cb.setModel(ConfigPVsTypeModel(self._client, self._type_cb)) + self._reload_btn = QPushButton(self) + self._reload_btn.setIcon(qta.icon('fa5s.sync')) + self._reload_btn.setStyleSheet('max-width: 2em;') + + # Add widgets + self._config_type_widget = QWidget(self) + self._config_type_widget.setLayout(QVBoxLayout()) + self._config_type_widget.layout().addWidget( + QLabel('<h3>Configuration Type</h3>')) + hlay = QHBoxLayout() + hlay.setContentsMargins(9, 9, 18, 9) + hlay.addWidget(self._type_cb) + hlay.addWidget(self._reload_btn) + self._config_type_widget.layout().addLayout(hlay) + + # Add table for the configuration name + self._config_table = LoadConfigDialog('notexist', self) + self._config_table.setObjectName('config_table') + self._config_table.setStyleSheet('#config_table {min-width: 30em;}') + self._config_table.label_exist.hide() + self._config_table.sub_header.hide() + self._config_table.ok_button.hide() + self._config_table.cancel_button.hide() + + self._config_name_widget = QWidget(self) + self._config_name_widget.setLayout(QVBoxLayout()) + self._config_name_widget.layout().addWidget( + QLabel('<h3>Configuration Name</h3>')) + self._config_name_widget.layout().addWidget(self._config_table) + + self.layout().addWidget(self._config_type_widget) + self.layout().addWidget(self._config_name_widget) + + # Add signals + self._type_cb.currentTextChanged.connect(self._fill_config_names) + self._reload_btn.clicked.connect(self._update_config_names) + self._config_table.editor.configChanged.connect(self._emit_config)
+ + + @property + def current_config_type(self): + """Current config type.""" + return self._type_cb.currentText() + + @current_config_type.setter + def current_config_type(self, config_type): + # init with global_config, if it exists + index = self._type_cb.findText(config_type, Qt.MatchFixedString) + if index >= 0: + self._type_cb.setCurrentText(config_type) + + @Slot(str) + def _fill_config_names(self, config_type): + self._config_table.editor.config_type = config_type + + @Slot(bool) + def _update_config_names(self): + self._config_table.editor.config_type = self._type_cb.currentText() + + @Slot(str, str) + def _emit_config(self, selected, deselected): + self.configChanged.emit(self.current_config_type, selected)
+ + + +
+[docs] +class LoadAndApplyConfig2MachineWindow(SiriusMainWindow): + """Configuration Window to set configration via epics.""" + + def __init__(self, client, wrapper=PyEpicsWrapper, parent=None): + """Constructor.""" + super().__init__(parent) + self._client = client + self._wrapper = wrapper + + self._conn_fail_msg = 'Could not connect to {}'.format( + self._client.url) + + self._setup_ui() + self.setWindowTitle('Set saved configuration') + + self._load_widget.current_config_type = 'global_config' + + def _setup_ui(self): + # Set central widget + self._central_widget = QSplitter(Qt.Horizontal) + self._central_widget.setObjectName('CentralWidget') + self.setCentralWidget(self._central_widget) + + self._load_widget = SelectConfigWidget(self, self._client) + self._set_widget = SelectAndApplyPVsWidget( + self, self._client, wrapper=self._wrapper) + self._load_widget.configChanged.connect(self._set_widget.fill_config) + self._central_widget.addWidget(self._load_widget) + self._central_widget.addWidget(self._set_widget)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/pvsconfigs/main.html b/_modules/siriushla/as_ap_configdb/pvsconfigs/main.html new file mode 100644 index 000000000..4c024b63f --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/pvsconfigs/main.html @@ -0,0 +1,220 @@ + + + + + + siriushla.as_ap_configdb.pvsconfigs.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.pvsconfigs.main

+"""PVs Config Main Module."""
+
+from qtpy.QtWidgets import QWidget, QPushButton, QHBoxLayout
+
+from siriuspy.clientconfigdb import ConfigDBClient
+
+from siriushla.widgets.windows import SiriusMainWindow
+from siriushla.util import connect_window
+from .load_and_apply import LoadAndApplyConfig2MachineWindow
+from .read_and_save import ReadAndSaveConfig2ServerWindow
+
+
+
+[docs] +class PVsConfigManager(SiriusMainWindow): + """Window to manage configuration.""" + + def __init__(self, parent=None, url=None): + """Setup UI.""" + super().__init__(parent) + self._client = ConfigDBClient(url) + self._setup_ui() + self.setWindowTitle("PVs Configuration Manager") + + def _setup_ui(self): + self.central_widget = QWidget(self) + self.central_widget.layout = QHBoxLayout(self.central_widget) + self.central_widget.setLayout(self.central_widget.layout) + self.setCentralWidget(self.central_widget) + + self.save_btn = QPushButton('Save', self) + self.load_btn = QPushButton('Load', self) + self.save_btn.setObjectName('SaveBtn') + self.load_btn.setObjectName('LoadBtn') + + self.central_widget.layout.addWidget(self.save_btn) + self.central_widget.layout.addWidget(self.load_btn) + + self.central_widget.setStyleSheet(""" + #SaveBtn, #LoadBtn { + background: qlineargradient(x1:0 y1:0, x2:0 y2:1, + stop:0 white, stop:1 lightgrey); + height: 100%; + border: 1px solid grey; + padding: 0 5px 0 5px; + } + #SaveBtn:hover, #LoadBtn:hover { + background: qlineargradient(x1:0 y1:0, x2:0 y2:1, + stop:0 lightgrey, stop:1 white); + }""") + + connect_window( + self.save_btn, ReadAndSaveConfig2ServerWindow, + self, client=self._client) + connect_window( + self.load_btn, LoadAndApplyConfig2MachineWindow, + self, client=self._client)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_configdb/pvsconfigs/read_and_save.html b/_modules/siriushla/as_ap_configdb/pvsconfigs/read_and_save.html new file mode 100644 index 000000000..e879e930d --- /dev/null +++ b/_modules/siriushla/as_ap_configdb/pvsconfigs/read_and_save.html @@ -0,0 +1,371 @@ + + + + + + siriushla.as_ap_configdb.pvsconfigs.read_and_save — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_configdb.pvsconfigs.read_and_save

+"""Read configuration window."""
+import logging
+import time
+
+from qtpy.QtCore import Slot
+from qtpy.QtGui import QKeySequence, QKeyEvent
+from qtpy.QtWidgets import QWidget, QComboBox, QPushButton, \
+    QVBoxLayout, QTableView, QMessageBox, QApplication
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.clientconfigdb import ConfigDBException, ConfigDBClient
+from siriushla.widgets.windows import SiriusMainWindow
+from siriushla.common.epics.wrapper import PyEpicsWrapper
+from siriushla.common.epics.task import EpicsConnector, EpicsGetter
+from siriushla.widgets.dialog import ReportDialog, ProgressDialog
+from ..models import ConfigPVsTypeModel, PVConfigurationTableModel
+from .. import SaveConfigDialog
+from .delegate import PVConfigurationDelegate
+
+
+class _CustomTable(QTableView):
+
+    def keyPressEvent(self, event):
+        if event.type() == QKeyEvent.KeyPress:
+            if event.matches(QKeySequence.Copy):
+                indexes = self.selectionModel().selectedIndexes()
+                if len(indexes) == 1:
+                    index = indexes[0]
+                    if index.column() == 2:
+                        value = self.model().data(index)
+                        QApplication.instance().clipboard().setText(str(value))
+                else:
+                    QMessageBox.information(
+                        self, 'Copy', 'No support for multi-cell copying')
+            elif event.matches(QKeySequence.Paste):
+                value = QApplication.instance().clipboard().text()
+                indexes = self.selectionModel().selectedIndexes()
+                for index in indexes:
+                    self.pasteDelay(index, value)
+
+    def pasteDelay(self, index, value):
+        if index.column() != 2:
+            return
+        try:
+            value = float(value)
+        except ValueError:
+            return
+        self.model().setData(index, value)
+
+
+
+[docs] +class ReadAndSaveConfig2ServerWindow(SiriusMainWindow): + """Read configuration window.""" + + def __init__(self, client, wrapper=PyEpicsWrapper, parent=None): + """Constructor.""" + super().__init__(parent) + self._client = client + self._wrapper = wrapper + + self._current_config = None + self._valid_config = False + + self.logger = logging.getLogger(__name__) + self.logger.setLevel(logging.INFO) + + self._setup_ui() + self._central_widget.setStyleSheet(""" + #CentralWidget { + min-width: 40em; + min-height: 40em; + } + """) + self.setWindowTitle('Create new configuration') + self._type_cb.setCurrentText('global_config') + + def _setup_ui(self): + # Set central widget + self._central_widget = QWidget() + self._central_widget.setObjectName('CentralWidget') + self._central_widget.layout = QVBoxLayout() + self._central_widget.setLayout(self._central_widget.layout) + self.setCentralWidget(self._central_widget) + + # Add combo box with types + self._type_cb = QComboBox(self) + self._type_cb.setObjectName('type_cb') + self._type_cb.setModel(ConfigPVsTypeModel(self._client, self._type_cb)) + + # Add LineEdit for configuration name + # self._name_le = QLineEdit(self) + # self._name_le.setObjectName('name_le') + + # Add configuration table + self._table = _CustomTable(self) + self._table.setObjectName('config_tbl') + self._table.setModel(PVConfigurationTableModel()) + self._table.setItemDelegate(PVConfigurationDelegate()) + + # Add Read Button + self._read_btn = QPushButton('Read', self) + self._read_btn.setObjectName('read_btn') + self._read_btn.setEnabled(False) + + # Add Save Button + self._save_btn = QPushButton('Save', self) + self._save_btn.setObjectName('save_btn') + self._save_btn.setEnabled(False) + + # Add widgets + self._central_widget.layout.addWidget(self._type_cb) + # self._central_widget.layout.addWidget(self._name_le) + self._central_widget.layout.addWidget(self._read_btn) + self._central_widget.layout.addWidget(self._table) + self._central_widget.layout.addWidget(self._save_btn) + + # Add signals + self._type_cb.currentTextChanged.connect(self._fill_table) + self._read_btn.clicked.connect(self._read) + self._save_btn.clicked.connect(self._save) + + @Slot(str) + def _fill_table(self, config_type): + self._table.model().config_type = config_type + self._table.resizeColumnsToContents() + self._is_configuration_valid() + + @Slot() + def _read(self): + failed_items = [] + tbl_data = self._table.model().model_data + # Get PVs + vp = _VACA_PREFIX + pvs = {data[0]: i for i, data in enumerate(tbl_data)} + defvals = [data[1] for data in tbl_data] + if len(pvs) != len(tbl_data): + QMessageBox.warning( + self, 'Error', 'Configuration has duplicated values') + return + # Create thread to read PVs + pvsl = list(pvs) + connt = EpicsConnector(pvsl, self._wrapper, parent=self) + task = EpicsGetter(pvsl, defvals, self._wrapper, parent=self) + task.itemRead.connect( + lambda pv, value: self._fill_value(pvs[pv.replace(vp, '')], value)) + task.itemNotRead.connect(failed_items.append) + # Show progress dialog + time.sleep(1) + dlg = ProgressDialog( + ['Connecting to PVs', 'Reading PVs...'], [connt, task], self) + ret = dlg.exec_() + if ret == dlg.Rejected: + return + # Show failed items + for item in failed_items: + self.logger.warn('Failed to get {}'.format(item)) + self._report = ReportDialog(failed_items, self) + self._report.show() + self._table.resizeColumnsToContents() + # if not failed_items: + self._save_btn.setEnabled(True) + + @Slot() + def _fill_value(self, row, value): + self.logger.debug('Setting value {} in row {}'.format(value, row)) + index = self._table.model().createIndex(row, 1) + self._table.model().setData(index, value) + + def _save(self): + config_type = self._type_cb.currentText() + + success = False + error = '' + label = 'Please select a name' + # Ask for a name until it is either canceled or succesfully inserted + while not success: + # config_name, status = QInputDialog.getText( + # self, 'Configuration Name', error + label) + + config_name, status = SaveConfigDialog(config_type, self).exec() + if not status or not config_name: + return + + # Check status and configuration name + if not ConfigDBClient.check_valid_configname(config_name): + self.logger.warning('Name not allowed') + error = 'Name not allowed<br>' + else: + success = True + + # Get config_type, config_name, data and insert new configuration + data = self._table.model().model_data + try: + ret = self._client.insert_config( + config_name, {'pvs': data}, config_type=config_type) + except (TypeError, ConfigDBException) as err: + QMessageBox.warning(self, 'Save', '{}'.format(str(err))) + else: + self._save_btn.setEnabled(False) + QMessageBox.information(self, 'Save', 'Saved successfully') + + def _is_configuration_valid(self): + if self._table.model().model_data: + self._config_valid = True + else: + self._config_valid = False + self._read_btn.setEnabled(self._config_valid)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_currinfo/charge_monitor.html b/_modules/siriushla/as_ap_currinfo/charge_monitor.html new file mode 100644 index 000000000..d47dd7086 --- /dev/null +++ b/_modules/siriushla/as_ap_currinfo/charge_monitor.html @@ -0,0 +1,324 @@ + + + + + + siriushla.as_ap_currinfo.charge_monitor — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_currinfo.charge_monitor

+"""Charge Monitor."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QLabel, QCheckBox, QPushButton, \
+    QVBoxLayout, QGridLayout, QApplication
+
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.clientarch.time import Time
+from siriushla.widgets import SiriusMainWindow, SiriusConnectionSignal, \
+    SiriusTimePlot, QDoubleSpinBoxPlus
+
+
+
+[docs] +class BOMonitor(SiriusMainWindow): + """BO charges monitor.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX): + super().__init__(parent) + self.setObjectName('BOApp') + self.setWindowTitle('BO Charge Monitor') + + self._prefix = prefix + self._ioc_prefix = _PVName('BO-Glob:AP-CurrInfo').substitute( + prefix=prefix) + self._energies = ['150MeV', '1GeV', '2GeV', '3GeV'] + self._latest_offsets = {e: 0.0 for e in self._energies} # in nC + self._latest_charges = {e: 0.0 for e in self._energies} # in nC + + self._app = QApplication.instance() + font = self._app.font() + font.setPointSize(20) + self._app.setFont(font) + self._setupUi() + + def _setupUi(self): + cw = QWidget(self) + self.setCentralWidget(cw) + self.setFocusPolicy(Qt.StrongFocus) + + label = QLabel('<h4>Booster Charge</h4>', + self, alignment=Qt.AlignCenter) + + # timeplot + self.timeplot = SiriusTimePlot(parent=self, background='w') + timespan = 60*60*6 + colors = ['blue', 'red', 'green', 'magenta'] + self.timeplot.timeSpan = timespan # [s] + self.timeplot.bufferSize = 2*timespan # [2 samples/s] + self.timeplot.autoRangeY = True + self.timeplot.showXGrid = True + self.timeplot.showYGrid = True + self.timeplot.setLabel('left', text='Charge', units='C', color='gray') + self.timeplot.setObjectName('timeplot') + self.timeplot.setStyleSheet( + '#timeplot{min-width:28em; min-height: 18em;}') + t_end = Time.now() + t_init = t_end - timespan + + self._channels = dict() + self._curves = dict() + self._cb_show = dict() + self._pvs_labels = dict() + self._cb_offsets = dict() + glay_aux = QGridLayout() + glay_aux.setHorizontalSpacing(20) + glay_aux.setVerticalSpacing(10) + glay_aux.addWidget( + QLabel('Show curves: ', self), 0, 0, alignment=Qt.AlignCenter) + glay_aux.addWidget( + QLabel('Offset [nC]: ', self), 2, 0, alignment=Qt.AlignCenter) + for i, e in enumerate(self._energies): + pvname = self._ioc_prefix.substitute(propty='Charge'+e+'-Mon') + self._channels[e] = SiriusConnectionSignal(address=pvname) + self._channels[e].new_value_signal[float].connect( + self._update_charges) + + self.timeplot.addYChannel('Charge'+e, color=colors[i], lineWidth=2) + curve = self.timeplot.curveAtIndex(-1) + self._curves[e] = curve + self.timeplot.fill_curve_with_archdata( + self._curves[e], pvname, factor=1e9, + t_init=t_init.get_iso8601(), t_end=t_end.get_iso8601()) + + cb = QCheckBox(e) + cb.setChecked(True) + cb.setStyleSheet('color:'+colors[i]+';') + cb.stateChanged.connect(curve.setVisible) + self._cb_show[e] = cb + + lb = QLabel('', self, alignment=Qt.AlignCenter) + self._pvs_labels[e] = lb + + sb = QDoubleSpinBoxPlus(self) + sb.energy = e + sb.setMinimum(0) + sb.setMaximum(1e6) + sb.setDecimals(4) + sb.setStyleSheet('max-width: 5em;') + sb.setValue(self._latest_offsets[e]) + sb.editingFinished.connect(self._update_offset) + self._cb_offsets[e] = sb + + glay_aux.addWidget(cb, 0, i+1, alignment=Qt.AlignCenter) + glay_aux.addWidget(lb, 1, i+1, alignment=Qt.AlignCenter) + glay_aux.addWidget(sb, 2, i+1, alignment=Qt.AlignCenter) + + self.pb_offset = QPushButton('Update offset', self) + self.pb_offset.clicked.connect(self._set_current_values_2_offset) + self.pb_offset.setToolTip('Set offsets to current charge values.') + glay_aux.addWidget(self.pb_offset, 1, 0) + + lay = QVBoxLayout(cw) + lay.addWidget(label) + lay.addWidget(self.timeplot) + lay.addLayout(glay_aux) + + def _update_charges(self, value): + if self.sender() is None: + return + address = self.sender().address + energy = address.strip(self._ioc_prefix).strip('Charge').strip('-Mon') + self._latest_charges[energy] = value + # update widgets + curve = self._curves[energy] + latest_offset = self._latest_offsets[energy] + new_value = value - latest_offset + curve.receiveNewValue(1e-9*new_value) + curve.redrawCurve() + lb = self._pvs_labels[energy] + lb.setText('{:.4e} nC'.format(new_value)) + + def _update_offset(self): + sender = self.sender() + energy = sender.energy + value = sender.value() + if value == self._latest_offsets[energy]: + return + self._update_curve_and_label(energy, value) + + def _set_current_values_2_offset(self): + for e in self._energies: + charge = self._latest_charges[e] + if charge == self._latest_offsets[e]: + continue + sb = self._cb_offsets[e] + sb.setValue(charge) + self._update_curve_and_label(e, charge) + + def _update_curve_and_label(self, energy, value): + self._curves[energy].blockSignals(True) + self._curves[energy].data_buffer[1] += \ + self._latest_offsets[energy]*1e-9 + self._curves[energy].data_buffer[1] -= value*1e-9 + self._latest_offsets[energy] = value + self._curves[energy].redrawCurve() + self._curves[energy].blockSignals(False) + lb = self._pvs_labels[energy] + charge = self._latest_charges[energy] + lb.setText('{:.4f} nC'.format(charge - value))
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_currinfo/current_and_lifetime.html b/_modules/siriushla/as_ap_currinfo/current_and_lifetime.html new file mode 100644 index 000000000..b33c81690 --- /dev/null +++ b/_modules/siriushla/as_ap_currinfo/current_and_lifetime.html @@ -0,0 +1,885 @@ + + + + + + siriushla.as_ap_currinfo.current_and_lifetime — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_currinfo.current_and_lifetime

+"""Current and Lifetime Window."""
+
+import time as _time
+import numpy as _np
+
+from qtpy.QtCore import Slot, Qt
+from qtpy.QtWidgets import QLabel, QGroupBox, QWidget, QSpacerItem,\
+    QSizePolicy as QSzPlcy, QComboBox, QPushButton, QCheckBox,\
+    QGridLayout, QHBoxLayout, QVBoxLayout
+import qtawesome as qta
+from pydm.widgets import PyDMEnumComboBox, PyDMLineEdit,\
+    PyDMPushButton
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.clientarch.time import Time
+from siriushla.util import connect_window
+from siriushla.widgets import SiriusLabel, SiriusLedAlert, SiriusLedState,\
+    SiriusSpinbox, PyDMStateButton, SiriusMainWindow, SiriusConnectionSignal,\
+    SiriusTimePlot
+from siriushla.as_di_dccts import DCCTMain, EffMonitor
+
+
+
+[docs] +class CurrLTWindow(SiriusMainWindow): + """Current and Lifetime Window.""" + + def __init__(self, parent=None, prefix=_VACA_PREFIX): + """Initialize some widgets.""" + super(CurrLTWindow, self).__init__(parent) + self.prefix = prefix + self.device = _PVName('SI-Glob:AP-CurrInfo') + self.devname = self.device.substitute(prefix=self.prefix) + self.setObjectName('SIApp') + self.setWindowTitle('SI Current Info: Current and Lifetime') + self._setupUi() + self.setFocus(True) + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + self.label_title = QLabel('SI Current and Lifetime') + self.label_title.setStyleSheet(""" + font-size:1.2em; font-weight:bold; + background-color: qlineargradient(spread:pad, x1:1, y1:0.0227273, + x2:0, y2:0, stop:0 rgba(173, 190, 207, 255), + stop:1 rgba(213, 213, 213, 255));""") + self.label_title.setAlignment(Qt.AlignRight | Qt.AlignVCenter) + + self.settings = QWidget() + vlay_sett = QVBoxLayout(self.settings) + vlay_sett.setContentsMargins(0, 0, 0, 0) + vlay_sett.addWidget(self._setupCurrentSettingsWidget()) + vlay_sett.addWidget(self._setupLifetimeSettigsWidget()) + vlay_sett.addWidget(self._setupGraphSettingsWidget()) + + self.pb_showsett = QPushButton('<', self) + self.pb_showsett.setObjectName('showsett') + self.pb_showsett.setToolTip('Hide settings') + self.pb_showsett.setStyleSheet( + '#showsett{min-width:0.7em;max-width:0.7em;}') + self.pb_showsett.released.connect(self._handle_settings_vis) + + self.pb_showeff = QPushButton('v', self) + self.pb_showeff.setObjectName('showeff') + self.pb_showeff.setToolTip('Show efficiency graph') + self.pb_showeff.setStyleSheet( + '#showeff{min-width:0.7em;max-width:0.7em;}') + self.pb_showeff.released.connect(self._handle_efficiency_vis) + + hbox_visi = QHBoxLayout() + hbox_visi.addStretch() + hbox_visi.addWidget(self.pb_showsett) + hbox_visi.addWidget(self.pb_showeff) + + self.eff_graph = EffMonitor(self, self.prefix, self.device.sec) + self.eff_graph.setVisible(False) + + cw = QWidget() + self.setCentralWidget(cw) + lay = QGridLayout(cw) + lay.addWidget(self.label_title, 0, 0, 1, 2) + lay.addLayout(self._setupGraphPanelLayout(), 1, 0) + lay.addWidget(self.settings, 1, 1) + lay.addLayout(hbox_visi, 2, 0, 1, 2, alignment=Qt.AlignRight) + lay.addWidget(self.eff_graph, 3, 0, 1, 2) + lay.setColumnStretch(0, 6) + lay.setColumnStretch(1, 1) + + def _setupGraphPanelLayout(self): + # Main Panel + # # Labels + self._ld_current = QLabel('Current', self, alignment=Qt.AlignCenter) + self._ld_current.setStyleSheet("font-weight:bold; max-height1.5em;") + self._lb_current = SiriusLabel( + self, self.devname.substitute(propty='Current-Mon')) + self._lb_current.setStyleSheet("font-size:40px;") + self._lb_current.precision = 0 + self._lb_current.showUnits = True + + self._ld_lifetime = QLabel('Lifetime', self) + self._ld_lifetime.setStyleSheet("font-weight:bold; max-height1.5em;") + self._ld_lifetime.setAlignment(Qt.AlignCenter) + self._lb_lifetime = QLabel('0:00:00', self) + self._lb_lifetime.channel = self.devname.substitute( + propty='Lifetime-Mon') + self._lb_lifetime.setStyleSheet("font-size:40px;") + self.lifetime_dcct_pv = SiriusConnectionSignal( + self.devname.substitute(propty='Lifetime-Mon')) + self.lifetime_dcct_pv.new_value_signal[float].connect( + self._format_lifetime_label) + self.lifetime_bpm_pv = SiriusConnectionSignal( + self.devname.substitute(propty='LifetimeBPM-Mon')) + self.lifetime_bpm_pv.new_value_signal[float].connect( + self._format_lifetime_label) + + # # Graph + self.graph = SiriusTimePlot(self, background='w') + self.graph.plotItem.getAxis('left').setLabel( + 'Current [mA]', color='blue') + self.graph.plotItem.getAxis('right').setLabel( + 'Lifetime [h]', color='red') + self.graph.showLegend = False + self.graph.showXGrid = True + self.graph.showYGrid = True + self.graph.autoRangeY = True + self.graph.setObjectName('graph') + self.graph.setStyleSheet('#graph{min-width:40em;min-height:32em;}') + self.graph.bufferSize = 60*60*10 + self.graph.timeSpan = 30*60 + + t_end = Time.now() + t_init = t_end - 30*60 + t_end_iso = t_end.get_iso8601() + t_init_iso = t_init.get_iso8601() + + pvname = self.devname.substitute(propty='Current-Mon') + self.graph.addYChannel( + y_channel=pvname, axis='left', name='Current', + color='blue', lineWidth=1) + self._curve_current = self.graph.curveAtIndex(0) + self.graph.fill_curve_with_archdata( + self._curve_current, pvname, + t_init=t_init_iso, t_end=t_end_iso) + + pvname = _PVName( + 'SI-01M1:DI-BPM:Sum-Mon').substitute(prefix=self.prefix) + self.graph.addYChannel( + y_channel=pvname, + axis='left', name='Current', color='blue', lineWidth=1) + self._curve_bpmsum = self.graph.curveAtIndex(1) + self.graph.fill_curve_with_archdata( + self._curve_bpmsum, pvname, + t_init=t_init_iso, t_end=t_end_iso) + + self.graph.addYChannel( + y_channel='FAKE:Lifetime', axis='right', name='Lifetime', + color='red', lineWidth=1) + self._curve_lifetimedcct = self.graph.curveAtIndex(2) + self.graph.fill_curve_with_archdata( + self._curve_lifetimedcct, + self.devname.substitute(propty='Lifetime-Mon'), + t_init=t_init_iso, t_end=t_end_iso, factor=3600) + + self.graph.addYChannel( + y_channel='FAKE:LifetimeBPM', axis='right', name='Lifetime', + color='red', lineWidth=1) + self._curve_lifetimebpm = self.graph.curveAtIndex(3) + self.graph.fill_curve_with_archdata( + self._curve_lifetimebpm, + self.devname.substitute(propty='LifetimeBPM-Mon'), + t_init=t_init_iso, t_end=t_end_iso, factor=3600) + + self.lifetime_dcct_pv.new_value_signal[float].connect( + self._update_graph) + self.lifetime_bpm_pv.new_value_signal[float].connect( + self._update_graph) + + self._flag_need_dcctx = True + self._flag_need_dccty = True + self._flag_need_bpmx = True + self._flag_need_bpmy = True + self.dcct_wavx = _np.array([]) + self.dcct_wavy = _np.array([]) + self.bpm_wavx = _np.array([]) + self.bpm_wavy = _np.array([]) + self.dcct_buff_y_pv = SiriusConnectionSignal( + self.devname.substitute(propty='BufferValue-Mon')) + self.dcct_buff_x_pv = SiriusConnectionSignal( + self.devname.substitute(propty='BufferTimestamp-Mon')) + self.bpm_buff_y_pv = SiriusConnectionSignal( + self.devname.substitute(propty='BufferValueBPM-Mon')) + self.bpm_buff_x_pv = SiriusConnectionSignal( + self.devname.substitute(propty='BufferTimestampBPM-Mon')) + self.dcct_buff_y_pv.new_value_signal[_np.ndarray].connect( + self._update_waveforms) + self.dcct_buff_x_pv.new_value_signal[_np.ndarray].connect( + self._update_waveforms) + self.bpm_buff_y_pv.new_value_signal[_np.ndarray].connect( + self._update_waveforms) + self.bpm_buff_x_pv.new_value_signal[_np.ndarray].connect( + self._update_waveforms) + + self.graph.addYChannel( + y_channel='FAKE:DCCTBuffer', axis='left', name='DCCTBuffer', + color='blue', lineStyle=Qt.NoPen, symbolSize=10, symbol='o') + self._curve_dcct_buff = self.graph.curveAtIndex(4) + self.graph.addYChannel( + y_channel='FAKE:BPMBuffer', axis='left', name='BPMBuffer', + color='blue', lineStyle=Qt.NoPen, symbolSize=10, symbol='o') + self._curve_bpm_buff = self.graph.curveAtIndex(5) + + self._curve_bpmsum.setVisible(False) + self._curve_lifetimebpm.setVisible(False) + self._curve_bpm_buff.setVisible(False) + + lay = QGridLayout() + lay.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum), 0, 0) + lay.addWidget(self._ld_current, 0, 1) + lay.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum), 0, 2) + lay.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum), 0, 3) + lay.addWidget(self._ld_lifetime, 0, 4) + lay.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum), 0, 5) + lay.addWidget(self._lb_current, 1, 1) + lay.addWidget(self._lb_lifetime, 1, 4) + lay.addWidget(self.graph, 2, 0, 1, 6) + return lay + + def _setupCurrentSettingsWidget(self): + self._ld_storedebeam = QLabel('Stored EBeam?', self) + self._ld_storedebeam.setAlignment( + Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._led_storedebeam = SiriusLedState( + self, self.devname.substitute(propty='StoredEBeam-Mon')) + + self._ld_dcctfault = QLabel('DCCT Fault Check:', self) + self._ld_dcctfault.setAlignment( + Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._bt_dcctfault = PyDMStateButton( + self, self.devname.substitute(propty='DCCTFltCheck-Sel')) + self._bt_dcctfault.shape = PyDMStateButton.Rounded + self._led_dcctfault = SiriusLedState( + self, self.devname.substitute(propty='DCCTFltCheck-Sts')) + + self._ld_seldcct = QLabel('Select DCCT:', self) + self._ld_seldcct.setAlignment( + Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._cb_seldcct = PyDMEnumComboBox( + self, self.devname.substitute(propty='DCCT-Sel')) + self._lb_seldcct = SiriusLabel( + self, self.devname.substitute(propty='DCCT-Sts')) + self._lb_seldcct.setAlignment(Qt.AlignCenter) + + self._led_dcct13c4 = SiriusLedAlert(self, _PVName( + 'SI-13C4:DI-DCCT:ReliableMeas-Mon').substitute(prefix=self.prefix)) + self._lb_dcct13c4 = QLabel('DCCT 13C4', self) + self._lb_dcct13c4.setAlignment( + Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._pb_13c4_detail = QPushButton(self) + self._pb_13c4_detail.setObjectName('DCCT13C4_dtl') + self._pb_13c4_detail.setStyleSheet( + "#DCCT13C4_dtl{min-width:25px; max-width:25px; icon-size:20px;}") + self._pb_13c4_detail.setIcon(qta.icon('fa5s.ellipsis-h')) + connect_window( + self._pb_13c4_detail, DCCTMain, self, + prefix=self.prefix, device='SI-13C4:DI-DCCT') + hlay_dcct13c4 = QHBoxLayout() + hlay_dcct13c4.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum)) + hlay_dcct13c4.addWidget(self._led_dcct13c4) + hlay_dcct13c4.addWidget(self._lb_dcct13c4) + hlay_dcct13c4.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum)) + hlay_dcct13c4.addWidget(self._pb_13c4_detail) + hlay_dcct13c4.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum)) + + self._led_dcct14c4 = SiriusLedAlert(self, _PVName( + 'SI-14C4:DI-DCCT:ReliableMeas-Mon').substitute(prefix=self.prefix)) + self._lb_dcct14c4 = QLabel('DCCT 14C4', self) + self._lb_dcct14c4.setAlignment( + Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._pb_14c4_detail = QPushButton(self) + self._pb_14c4_detail.setObjectName('DCCT14C4_dtl') + self._pb_14c4_detail.setStyleSheet( + "#DCCT14C4_dtl{min-width:25px; max-width:25px; icon-size:20px;}") + self._pb_14c4_detail.setIcon(qta.icon('fa5s.ellipsis-h')) + connect_window( + self._pb_14c4_detail, DCCTMain, self, + prefix=self.prefix, device='SI-14C4:DI-DCCT') + hlay_dcct14c4 = QHBoxLayout() + hlay_dcct14c4.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum)) + hlay_dcct14c4.addWidget(self._led_dcct14c4) + hlay_dcct14c4.addWidget(self._lb_dcct14c4) + hlay_dcct14c4.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum)) + hlay_dcct14c4.addWidget(self._pb_14c4_detail) + hlay_dcct14c4.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum)) + + gbox = QGroupBox('Current Settings and Status', self) + lay = QGridLayout(gbox) + lay.addWidget(self._ld_storedebeam, 0, 0) + lay.addWidget(self._led_storedebeam, 0, 1) + lay.addWidget(self._ld_dcctfault, 1, 0) + lay.addWidget(self._bt_dcctfault, 1, 1) + lay.addWidget(self._led_dcctfault, 1, 2) + lay.addWidget(self._ld_seldcct, 2, 0) + lay.addWidget(self._cb_seldcct, 2, 1) + lay.addWidget(self._lb_seldcct, 2, 2) + lay.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum), 3, 0) + lay.addLayout(hlay_dcct13c4, 4, 0, 1, 3) + lay.addLayout(hlay_dcct14c4, 5, 0, 1, 3) + lay.setColumnStretch(0, 2) + lay.setColumnStretch(1, 1) + lay.setColumnStretch(2, 1) + return gbox + + def _setupLifetimeSettigsWidget(self): + self._ld_calcmode = QLabel( + 'Calc Mode:', self, + alignment=Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._cb_calcmode = PyDMEnumComboBox( + self, self.devname.substitute(propty='LtFitMode-Sel')) + self._lb_calcmode = SiriusLabel( + self, self.devname.substitute(propty='LtFitMode-Sts')) + self._lb_calcmode.setAlignment(Qt.AlignCenter) + + self._ld_curroffset = QLabel( + 'Current\nOffset [mA]:', self, + alignment=Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._sb_curroffset = SiriusSpinbox( + self, self.devname.substitute(propty='CurrOffset-SP')) + self._lb_curroffset = SiriusLabel( + self, self.devname.substitute(propty='CurrOffset-RB')) + self._lb_curroffset.setAlignment(Qt.AlignCenter) + + self._ld_buffer = QLabel( + '<h4>Buffer</h4>', self, alignment=Qt.AlignCenter) + + self._pb_plussett = QPushButton('+', self) + self._pb_plussett.setStyleSheet('max-height:0.9em; max-width:0.9em;') + self._pb_plussett.released.connect( + self._handle_intvl_sett_visibility) + self._ld_maxintvl = QLabel( + 'Max. Sampling\nInterval [s]:', self, + alignment=Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._ld_maxintvl.setToolTip( + "Timestamp settings use 2 parameters to define the\n" + "timestamp interval.\n\n" + "If 'Max. Sampling Interval' == -1:\n" + " use 'Last Time' and 'First Time' parameters.\n" + "Else:\n" + " use 'Max. Sampling Interval' and last timestamp set.\n\n" + "Default: use 'Max. Sampling Interval' and 'Last Time'.") + hlay_maxintvl = QHBoxLayout() + hlay_maxintvl.addWidget(self._pb_plussett) + hlay_maxintvl.addWidget(self._ld_maxintvl) + self._sb_maxintvl = SiriusSpinbox( + self, self.devname.substitute(propty='MaxSplIntvl-SP')) + self._sb_maxintvl.precisionFromPV = True + self._lb_maxintvl = SiriusLabel( + self, self.devname.substitute(propty='MaxSplIntvl-RB')) + self._lb_maxintvl.setAlignment(Qt.AlignCenter) + self._lb_maxintvl.precisionFromPV = True + + self._ld_firstsmpl = QLabel( + 'First Time [s]:', self, + alignment=Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._ld_firstsmpl.setVisible(False) + self._le_firstsmpl = PyDMLineEdit( + self, self.devname.substitute(propty='FrstSplTime-SP')) + self._le_firstsmpl.setVisible(False) + self._lb_firstsmpl_dcct = SiriusLabel( + self, self.devname.substitute(propty='FrstSplTime-RB')) + self._lb_firstsmpl_dcct.setVisible(False) + self._lb_firstsmpl_bpm = SiriusLabel( + self, self.devname.substitute(propty='FrstSplTimeBPM-RB')) + self._lb_firstsmpl_bpm.setVisible(False) + self._pb_firstnow = QPushButton( + qta.icon('mdi.clock-end'), '', self) + self._pb_firstnow.setObjectName('firstnow') + self._pb_firstnow.setStyleSheet( + '#firstnow{min-width:25px; max-width:25px; icon-size:20px;}') + self._pb_firstnow.setToolTip('Click to set current timestamp') + self._pb_firstnow.released.connect(self._update_first_time) + self._pb_firstnow.setVisible(False) + hbox_sp_first = QHBoxLayout() + hbox_sp_first.addWidget(self._le_firstsmpl) + hbox_sp_first.addWidget(self._pb_firstnow) + + self._ld_lastsmpl = QLabel( + 'Last Time [s]:', self, + alignment=Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._ld_lastsmpl.setToolTip( + "If 'Last Time' == -1, use current timestamp.") + self._ld_lastsmpl.setVisible(False) + self._le_lastsmpl = PyDMLineEdit( + self, self.devname.substitute(propty='LastSplTime-SP')) + self._le_lastsmpl.setVisible(False) + self._lb_lastsmpl_dcct = SiriusLabel( + self, self.devname.substitute(propty='LastSplTime-RB')) + self._lb_lastsmpl_dcct.setVisible(False) + self._lb_lastsmpl_bpm = SiriusLabel( + self, self.devname.substitute(propty='LastSplTimeBPM-RB')) + self._lb_lastsmpl_bpm.setVisible(False) + self._pb_lastnow = QPushButton( + qta.icon('mdi.clock-end'), '', self) + self._pb_lastnow.setObjectName('lastnow') + self._pb_lastnow.setStyleSheet( + '#lastnow{min-width:25px; max-width:25px; icon-size:20px;}') + self._pb_lastnow.setToolTip('Click to set current timestamp') + self._pb_lastnow.released.connect(self._update_last_time) + self._pb_lastnow.setVisible(False) + hbox_sp_last = QHBoxLayout() + hbox_sp_last.addWidget(self._le_lastsmpl) + hbox_sp_last.addWidget(self._pb_lastnow) + + self._ld_smplintvl = QLabel( + 'Samples\nInterval [s]:', self, + alignment=Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._lb_smplintvl_dcct = SiriusLabel( + self, self.devname.substitute(propty='SplIntvl-Mon')) + self._lb_smplintvl_bpm = SiriusLabel( + self, self.devname.substitute(propty='SplIntvlBPM-Mon')) + self._lb_smplintvl_bpm.setVisible(False) + + self._ld_intvlbtwspl = QLabel( + 'Interval Between\nSamples [s]:', self, + alignment=Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._sb_intvlbtwspl = SiriusSpinbox( + self, self.devname.substitute(propty='MinIntvlBtwSpl-SP')) + self._sb_intvlbtwspl.precisionFromPV = True + self._lb_intvlbtwspl = SiriusLabel( + self, self.devname.substitute(propty='MinIntvlBtwSpl-RB')) + self._lb_intvlbtwspl.setAlignment(Qt.AlignCenter) + self._lb_intvlbtwspl.precisionFromPV = True + + self._ld_bufautoreset = QLabel( + 'Auto Reset:', self, + alignment=Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._cb_bufautoreset = PyDMEnumComboBox( + self, self.devname.substitute(propty='BuffAutoRst-Sel')) + self._lb_bufautoreset = SiriusLabel( + self, self.devname.substitute(propty='BuffAutoRst-Sts')) + + self._ld_bufdcurr = QLabel( + 'Auto Reset Delta\nCurrent [mA]:', self, + alignment=Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._sb_bufdcurr = SiriusSpinbox( + self, self.devname.substitute(propty='BuffAutoRstDCurr-SP')) + self._lb_bufdcurr = SiriusLabel( + self, self.devname.substitute(propty='BuffAutoRstDCurr-RB')) + + self._ld_bufsize = QLabel( + 'Size:', self, + alignment=Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._lb_bufsize_dcct = SiriusLabel( + self, self.devname.substitute(propty='BuffSize-Mon')) + self._lb_bufsize_dcct.setAlignment(Qt.AlignCenter) + self._lb_bufsize_bpm = SiriusLabel( + self, self.devname.substitute(propty='BuffSizeBPM-Mon')) + self._lb_bufsize_bpm.setAlignment(Qt.AlignCenter) + self._lb_bufsize_bpm.setVisible(False) + self._pb_bufreset = PyDMPushButton( + self, label='', icon=qta.icon('mdi.delete-empty'), pressValue=1, + init_channel=self.devname.substitute(propty='BuffRst-Cmd')) + self._pb_bufreset.setObjectName('reset') + self._pb_bufreset.setStyleSheet( + "#reset{min-width:25px; max-width:25px; icon-size:20px;}") + self._ld_sep = QLabel('/', self) + self._lb_bufsizetot_dcct = SiriusLabel( + self, self.devname.substitute(propty='BuffSizeTot-Mon')) + self._lb_bufsizetot_dcct.setStyleSheet( + "min-width:5em; max-width:5em;") + self._lb_bufsizetot_dcct.setAlignment(Qt.AlignCenter) + self._lb_bufsizetot_dcct.precision = 0 + self._lb_bufsizetot_bpm = SiriusLabel( + self, self.devname.substitute(propty='BuffSizeTotBPM-Mon')) + self._lb_bufsizetot_bpm.setStyleSheet( + "min-width:5em; max-width:5em;") + self._lb_bufsizetot_bpm.setAlignment(Qt.AlignCenter) + self._lb_bufsizetot_bpm.precision = 0 + self._lb_bufsizetot_bpm.setVisible(False) + glay_bufsize = QGridLayout() + glay_bufsize.addWidget(self._lb_bufsize_dcct, 0, 0) + glay_bufsize.addWidget(self._lb_bufsize_bpm, 0, 0) + glay_bufsize.addWidget(self._pb_bufreset, 0, 1) + glay_bufsize.addWidget(self._ld_sep, 0, 2) + glay_bufsize.addWidget(self._lb_bufsizetot_dcct, 0, 3) + glay_bufsize.addWidget(self._lb_bufsizetot_bpm, 0, 3) + glay_bufsize.setColumnStretch(0, 5) + glay_bufsize.setColumnStretch(1, 2) + glay_bufsize.setColumnStretch(2, 1) + glay_bufsize.setColumnStretch(3, 5) + + gbox = QGroupBox('Lifetime Settings', self) + lay = QGridLayout(gbox) + lay.addWidget(self._ld_calcmode, 0, 0) + lay.addWidget(self._cb_calcmode, 0, 1) + lay.addWidget(self._lb_calcmode, 0, 2) + lay.addWidget(self._ld_curroffset, 1, 0) + lay.addWidget(self._sb_curroffset, 1, 1) + lay.addWidget(self._lb_curroffset, 1, 2) + lay.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum), 2, 1) + lay.addWidget(self._ld_buffer, 3, 0, 1, 3) + lay.addLayout(hlay_maxintvl, 4, 0) + lay.addWidget(self._sb_maxintvl, 4, 1) + lay.addWidget(self._lb_maxintvl, 4, 2) + lay.addWidget(self._ld_firstsmpl, 5, 0) + lay.addLayout(hbox_sp_first, 5, 1, 1, 2) + lay.addWidget(self._lb_firstsmpl_dcct, 6, 1, 1, 2) + lay.addWidget(self._lb_firstsmpl_bpm, 6, 1, 1, 2) + lay.addWidget(self._ld_lastsmpl, 7, 0) + lay.addLayout(hbox_sp_last, 7, 1, 1, 2) + lay.addWidget(self._lb_lastsmpl_dcct, 8, 1, 1, 2) + lay.addWidget(self._lb_lastsmpl_bpm, 8, 1, 1, 2) + lay.addWidget(self._ld_smplintvl, 9, 0) + lay.addWidget(self._lb_smplintvl_dcct, 9, 1) + lay.addWidget(self._lb_smplintvl_bpm, 9, 1) + lay.addWidget(self._ld_intvlbtwspl, 10, 0) + lay.addWidget(self._sb_intvlbtwspl, 10, 1) + lay.addWidget(self._lb_intvlbtwspl, 10, 2) + lay.addItem( + QSpacerItem(20, 5, QSzPlcy.Minimum, QSzPlcy.Fixed), 11, 1) + lay.addWidget(self._ld_bufautoreset, 12, 0) + lay.addWidget(self._cb_bufautoreset, 12, 1) + lay.addWidget(self._lb_bufautoreset, 12, 2) + lay.addWidget(self._ld_bufdcurr, 13, 0) + lay.addWidget(self._sb_bufdcurr, 13, 1) + lay.addWidget(self._lb_bufdcurr, 13, 2) + lay.addItem( + QSpacerItem(20, 5, QSzPlcy.Minimum, QSzPlcy.Fixed), 14, 1) + lay.addWidget(self._ld_bufsize, 15, 0) + lay.addLayout(glay_bufsize, 15, 1, 1, 2) + return gbox + + def _setupGraphSettingsWidget(self): + self._ld_ltfrom = QLabel( + 'Show lifetime from:', self, + alignment=Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._cb_ltfrom = QComboBox() + self._cb_ltfrom.addItem('DCCT') + self._cb_ltfrom.addItem('BPM') + self._cb_ltfrom.currentTextChanged.connect( + self._handle_lifetime_type_sel) + + self._ld_showsmpl = QLabel( + 'Show samples: ', self, + alignment=Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + self._cb_showsmpl = QCheckBox(self) + self._cb_showsmpl.setChecked(True) + self._cb_showsmpl.stateChanged.connect(self._handle_samples_visibility) + + gbox = QGroupBox('Graphs Settings', self) + lay = QGridLayout(gbox) + lay.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum), 0, 0) + lay.addWidget(self._ld_ltfrom, 0, 1) + lay.addWidget(self._cb_ltfrom, 0, 2) + lay.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Minimum), 0, 3) + lay.addItem( + QSpacerItem(1, 1, QSzPlcy.Minimum, QSzPlcy.Expanding), + 1, 1, 1, 2) + lay.addWidget(self._ld_showsmpl, 2, 1) + lay.addWidget(self._cb_showsmpl, 2, 2) + return gbox + + # ---------- auxiliar methods ---------- + + def _format_lifetime_label(self, value): + """Format lifetime label.""" + if self._lb_lifetime.channel != self.sender().address: + return + lt = 0 if _np.isnan(value) else value + H = int(lt // 3600) + m = int((lt % 3600) // 60) + s = int((lt % 3600) % 60) + lt_str = '{:d}:{:02d}:{:02d}'.format(H, m, s) + self._lb_lifetime.setText(lt_str) + + @Slot(str) + def _handle_lifetime_type_sel(self, text): + """Handle lifetime type selection.""" + cond = bool(text == 'DCCT') + self._curve_current.setVisible(cond) + self._curve_lifetimedcct.setVisible(cond) + self._curve_dcct_buff.setVisible(cond) + self._lb_bufsizetot_dcct.setVisible(cond) + self._lb_bufsize_dcct.setVisible(cond) + self._lb_smplintvl_dcct.setVisible(cond) + + self._curve_bpmsum.setVisible(not cond) + self._curve_lifetimebpm.setVisible(not cond) + self._curve_bpm_buff.setVisible(not cond) + self._lb_bufsizetot_bpm.setVisible(not cond) + self._lb_bufsize_bpm.setVisible(not cond) + self._lb_smplintvl_bpm.setVisible(not cond) + + visi = self._pb_plussett.text() == '-' + self._lb_firstsmpl_dcct.setVisible(cond and visi) + self._lb_lastsmpl_dcct.setVisible(cond and visi) + self._lb_firstsmpl_bpm.setVisible(not cond and visi) + self._lb_lastsmpl_bpm.setVisible(not cond and visi) + + if not cond: + self.graph.plotItem.getAxis('left').setLabel( + '01M1 BPM Sum', color='blue') + self._lb_lifetime.channel = \ + self.devname.substitute(propty='LifetimeBPM-Mon') + else: + self.graph.plotItem.getAxis('left').setLabel( + 'Current [mA]', color='blue') + self._lb_lifetime.channel = \ + self.devname.substitute(propty='Lifetime-Mon') + + def _handle_intvl_sett_visibility(self): + """Handle sampling interval settings.""" + text = self.sender().text() + visi = text == '+' + self._ld_firstsmpl.setVisible(visi) + self._le_firstsmpl.setVisible(visi) + self._pb_firstnow.setVisible(visi) + self._ld_lastsmpl.setVisible(visi) + self._le_lastsmpl.setVisible(visi) + self._pb_lastnow.setVisible(visi) + + showingdcct = self._cb_ltfrom.currentText() == 'DCCT' + self._lb_firstsmpl_dcct.setVisible(showingdcct and visi) + self._lb_lastsmpl_dcct.setVisible(showingdcct and visi) + self._lb_firstsmpl_bpm.setVisible(not showingdcct and visi) + self._lb_lastsmpl_bpm.setVisible(not showingdcct and visi) + + self.sender().setText('+' if text == '-' else '-') + + @Slot(int) + def _handle_samples_visibility(self, state): + """Handle samples visibility.""" + showingdcct = self._cb_ltfrom.currentText() == 'DCCT' + self._curve_dcct_buff.setVisible(showingdcct and state) + self._curve_bpm_buff.setVisible(not showingdcct and state) + + def _handle_settings_vis(self): + vis = self.settings.isVisible() + text = '>' if vis else '<' + ttip = 'Show' if vis else 'Hide' + self.pb_showsett.setText(text) + self.pb_showsett.setToolTip(ttip+' settings') + self.settings.setVisible(not vis) + self.sender().parent().adjustSize() + self.centralWidget().adjustSize() + self.adjustSize() + + def _handle_efficiency_vis(self): + vis = self.eff_graph.isVisible() + text = 'v' if vis else '^' + ttip = 'Show' if vis else 'Hide' + self.pb_showeff.setText(text) + self.pb_showeff.setToolTip(ttip+' efficiency graph') + self.eff_graph.setVisible(not vis) + self.sender().parent().adjustSize() + self.centralWidget().adjustSize() + self.adjustSize() + + def _update_first_time(self): + """Update first sample time to current timestamp.""" + now = _time.time() + self._le_firstsmpl.send_value_signal[float].emit(now) + + def _update_last_time(self): + """Update last sample time to current timestamp.""" + now = _time.time() + self._le_lastsmpl.send_value_signal[float].emit(now) + + @Slot(float) + def _update_graph(self, value): + """Receive new lifetime values and update curves in hours.""" + if 'BPM' in self.sender().address: + self._curve_lifetimebpm.receiveNewValue(value/3600) + else: + self._curve_lifetimedcct.receiveNewValue(value/3600) + + @Slot(_np.ndarray) + def _update_waveforms(self, value): + """Update samples waveforms.""" + address = self.sender().address + if 'BPM' in address: + if 'Timestamp' in address: + self.bpm_wavx = value + _time.time() + self._flag_need_bpmx = False + elif 'Value' in address: + self.bpm_wavy = value + self._flag_need_bpmy = False + if not self._flag_need_bpmy and not self._flag_need_bpmx: + if len(self.bpm_wavx) != len(self.bpm_wavy): + return + self.graph.fill_curve_buffer( + self._curve_bpm_buff, self.bpm_wavx, self.bpm_wavy) + self._flag_need_bpmx = True + self._flag_need_bpmy = True + else: + if 'Timestamp' in address: + self.dcct_wavx = value + _time.time() + self._flag_need_dcctx = False + elif 'Value' in address: + self.dcct_wavy = value + self._flag_need_dccty = False + if not self._flag_need_dccty and not self._flag_need_dcctx: + if len(self.dcct_wavx) != len(self.dcct_wavy): + return + self.graph.fill_curve_buffer( + self._curve_dcct_buff, self.dcct_wavx, self.dcct_wavy) + self._flag_need_dcctx = True + self._flag_need_dccty = True
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_currinfo/efficiency_monitor.html b/_modules/siriushla/as_ap_currinfo/efficiency_monitor.html new file mode 100644 index 000000000..fe5b9a237 --- /dev/null +++ b/_modules/siriushla/as_ap_currinfo/efficiency_monitor.html @@ -0,0 +1,274 @@ + + + + + + siriushla.as_ap_currinfo.efficiency_monitor — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_currinfo.efficiency_monitor

+"""Efficiency Monitor."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QLabel, QCheckBox, QGridLayout, \
+    QApplication, QVBoxLayout
+
+import qtawesome as qta
+
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.namesys import SiriusPVName
+from siriuspy.clientarch.time import Time
+from siriushla.widgets import SiriusMainWindow, SiriusTimePlot, SiriusLabel
+from siriushla.util import get_appropriate_color
+
+
+
+[docs] +class EfficiencyMonitor(SiriusMainWindow): + """Efficiency monitor.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX): + super().__init__(parent) + self.setObjectName('ASApp') + self.setWindowTitle('Efficiency Monitor') + color = get_appropriate_color('AS') + self.setWindowIcon(qta.icon('mdi.percent-outline', color=color)) + self._prefix = prefix + self._eff_list = ( + # ('LI-SI Inj', 'AS-Glob:AP-CurrInfo:InjEff-Mon', 'magenta'), + ('BO-SI Inj', 'SI-Glob:AP-CurrInfo:InjEff-Mon', 'blue'), + ('TS', 'TS-Glob:AP-CurrInfo:TranspEff-Mon', 'black'), + ('BO Ramp', 'BO-Glob:AP-CurrInfo:RampEff-Mon', 'green'), + # ('LI-BO Inj', 'BO-Glob:AP-CurrInfo:InjEff-Mon', 'darkRed'), + ('TB', 'TB-Glob:AP-CurrInfo:TranspEff-Mon', 'darkCyan'), + ('LI', 'LI-Glob:AP-CurrInfo:TranspEff-Mon', 'red'), + ) + self._app = QApplication.instance() + font = self._app.font() + font.setPointSize(32) + self._app.setFont(font) + self._setupUi() + + def _setupUi(self): + cw = QWidget(self) + self.setCentralWidget(cw) + self.setFocusPolicy(Qt.StrongFocus) + + label = QLabel('<h3>Efficiency Monitor</h3>', + self, alignment=Qt.AlignCenter) + + # timeplot + timespan = 30*60 # [s] + self.timeplot = SiriusTimePlot(parent=self, background='w') + self.timeplot.timeSpan = timespan + self.timeplot.autoRangeY = False + self.timeplot.maxYRange = 150.0 + self.timeplot.minYRange = 0.0 + self.timeplot.showXGrid = True + self.timeplot.showYGrid = True + self.timeplot.setLabel( + 'left', text='Efficiency', units='%', color='gray') + self.timeplot.setObjectName('timeplot') + self.timeplot.setStyleSheet( + '#timeplot{min-width:24em; min-height: 10em;}') + t_end = Time.now() + t_init = t_end - timespan + + self._channels = dict() + self._curves = dict() + self._cb_show = dict() + self._pvs_labels = dict() + + lay_lbls = QVBoxLayout() + lay_lbls.setSpacing(10) + + for i, data in enumerate(self._eff_list): + text, pvn, color = data + pvname = SiriusPVName(pvn).substitute(prefix=self._prefix) + + self.timeplot.addYChannel( + pvname, name=pvname, color=color, lineWidth=2) + curve = self.timeplot.curveAtIndex(-1) + self._curves[pvn] = curve + self.timeplot.fill_curve_with_archdata( + self._curves[pvn], pvname, + t_init=t_init.get_iso8601(), t_end=t_end.get_iso8601()) + + cb = QCheckBox(text, self) + cb.setChecked(True) + cb.setStyleSheet('color:'+color+';') + cb.stateChanged.connect(curve.setVisible) + self._cb_show[pvn] = cb + + lb = SiriusLabel(self, pvname) + lb.setStyleSheet(""" + QLabel{ + font-weight: bold; min-width: 6em; max-width: 6em; + qproperty-alignment: AlignCenter; + }""") + lb.showUnits = True + self._pvs_labels[pvn] = lb + + lay_lbls.addWidget(cb, alignment=Qt.AlignLeft) + lay_lbls.addWidget(lb, alignment=Qt.AlignCenter) + lay_lbls.addStretch() + + lay = QGridLayout(cw) + lay.setSpacing(20) + lay.addWidget(label, 0, 0, 1, 2) + lay.addWidget(self.timeplot, 1, 0) + lay.addLayout(lay_lbls, 1, 1)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_energybutton/energy_button.html b/_modules/siriushla/as_ap_energybutton/energy_button.html new file mode 100644 index 000000000..019f88a7b --- /dev/null +++ b/_modules/siriushla/as_ap_energybutton/energy_button.html @@ -0,0 +1,369 @@ + + + + + + siriushla.as_ap_energybutton.energy_button — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_energybutton.energy_button

+"""Interface to set dipole energies with constant normalization."""
+
+from qtpy.QtCore import Slot, QVariant
+from qtpy.QtWidgets import QVBoxLayout, QWidget, QPushButton, \
+    QHBoxLayout, QLabel
+from qtpy.QtGui import QPalette, QColor
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriushla.common.epics.task import EpicsConnector, EpicsSetter, \
+    EpicsChecker, EpicsGetter, EpicsWait
+from siriushla.widgets.dialog import ReportDialog, ProgressDialog
+from siriushla.widgets import PVNameTree, QDoubleSpinBoxPlus, SiriusLabel
+from siriushla.util import get_appropriate_color
+
+from .set_energy import init_section
+
+
+
+[docs] +class EnergyButton(QWidget): + """Set dipole energy.""" + + def __init__(self, section, parent=None): + """Setups widget interface.""" + super().__init__(parent) + self._section = section + self.dips, self.mags = init_section(section.upper()) + self._items_fail = [] + self._items_success = [] + self._setup_ui() + color = QColor(get_appropriate_color(section.upper())) + pal = self.palette() + pal.setColor(QPalette.Background, color) + self.setAutoFillBackground(True) + self.setPalette(pal) + + def _setup_ui(self): + self.setLayout(QVBoxLayout()) + + self.energy_value = QDoubleSpinBoxPlus(self) + self.energy_value.setSingleStep(0.01) + self.energy_value.setMinimum(self.lower_limit) + self.energy_value.setMaximum(self.upper_limit) + self.energy_value.setDecimals(4) + + if self.section == 'tb': + sp_channel = 'TB-Fam:PS-B:Energy-RB' + elif self.section == 'bo': + sp_channel = 'BO-Fam:PS-B-1:Energy-RB' + elif self.section == 'ts': + sp_channel = 'TS-Fam:PS-B:Energy-RB' + elif self.section == 'si': + sp_channel = 'SI-Fam:PS-B1B2-1:Energy-RB' + else: + raise RuntimeError + sp_channel = _PVName(sp_channel).substitute(prefix=_VACA_PREFIX) + self.energy_sp = SiriusLabel(self, keep_unit=True) + self.energy_sp.channel = sp_channel + self.energy_sp.showUnits = True + + self._tree = PVNameTree( + items=self.mags, tree_levels=('dis', 'mag_group'), parent=self) + self._tree.tree.setHeaderHidden(True) + self._tree.tree.setColumnCount(1) + self._tree.check_all() + self._tree.collapse_all() + + self.set_energy = QPushButton('Set', self) + self.set_energy.clicked.connect(self._process) + + # forml = Q + hbl = QHBoxLayout() + # hbl.addStretch() + hbl.addWidget(QLabel('<h4>New Energy:</h4> ', self)) + hbl.addWidget(self.energy_value) + self.layout().addLayout(hbl) + hbl = QHBoxLayout() + # hbl.addStretch() + hbl.addWidget(QLabel('Current Energy: ', self)) + hbl.addWidget(self.energy_sp) + self.layout().addLayout(hbl) + self.layout().addWidget(self._tree) + self.layout().addWidget(self.set_energy) + + @property + def section(self): + return self._section + + @property + def upper_limit(self): + if self.section == 'tb': + return 0.155 + elif self.section == 'bo': + return 0.160 + elif self.section == 'ts': + return 3.2 + elif self.section == 'si': + return 3.014 + else: + raise RuntimeError + + @property + def lower_limit(self): + if self.section == 'tb': + return 0.0 + elif self.section == 'bo': + return 0.0 + elif self.section == 'ts': + return 0.0 + elif self.section == 'si': + return 0.0 + else: + raise RuntimeError + + def _process(self): + self._items_success = [] + self._items_fail = [] + + # Get selected PVs + selected_pvs = set(self._tree.checked_items()) + mags = [mag for mag in self.mags if mag in selected_pvs] + if not mags: + report = ReportDialog(['Select at least one PS!'], self) + report.exec_() + return + + pvs = self.dips + mags + + conn = EpicsConnector(pvs, parent=self) + get_task = EpicsGetter(pvs, parent=self) + get_task.itemRead.connect(self._read_success) + get_task.itemNotRead.connect(self._read_fail) + dlg = ProgressDialog( + ['Connecting', 'Reading'], [conn, get_task], parent=self) + ret = dlg.exec_() + if ret == dlg.Rejected: + return + if self._items_fail: + failed = ['Failed to read some PVs', ] + failed += self._items_fail + ['Aborting!', ] + report = ReportDialog(failed, self) + report.exec_() + return + + energy = self.energy_value.value() + # remove dipole + pvs, values = zip(*self._items_success[len(self.dips):]) + delays = [0.0, ] * len(pvs) + self._items_success = [] + + energies = [energy, ] * len(self.dips) + dly_dips = [0.0, ] * len(self.dips) + conn = EpicsConnector(self.dips, parent=self) + set_dip = EpicsSetter(self.dips, energies, dly_dips, parent=self) + sleep_task = EpicsWait([None, ]*10, wait_time=2.0, parent=self) + check_dip = EpicsChecker(self.dips, energies, dly_dips, parent=self) + check_dip.itemChecked.connect(self._check_status) + + dlg = ProgressDialog( + ['Connecting', 'Setting Dipole', 'Waiting Dipole', + 'Checking Dipole'], + [conn, set_dip, sleep_task, check_dip], parent=self) + ret = dlg.exec_() + if ret == dlg.Rejected: + return + if self._items_fail: + failed = ['Failed to set Dipole. Aborting!'] + report = ReportDialog(failed, self) + report.exec_() + return + + conn = EpicsConnector(pvs, parent=self) + set_mags = EpicsSetter(pvs, values, delays, parent=self) + sleep_task = EpicsWait([None, ]*10, wait_time=2.0, parent=self) + check_mags = EpicsChecker(pvs, values, delays, parent=self) + check_mags.itemChecked.connect(self._check_status) + + dlg = ProgressDialog( + ['Connecting to Magnets', 'Setting Magnets', 'Waiting Magnets', + 'Checking Magnets'], + [conn, set_mags, sleep_task, check_mags], parent=self) + ret = dlg.exec_() + if ret == dlg.Rejected: + return + + failed = [] + if self._items_fail: + failed = ['Failed to set magnets:', ] + self._items_fail + report = ReportDialog(failed, self) + report.exec_() + + @Slot(str) + def _read_fail(self, item): + self._items_fail.append(item) + + @Slot(str, QVariant) + def _read_success(self, item, value): + self._items_success.append((item, value)) + + @Slot(str, bool) + def _check_status(self, item, status): + if status: + self._items_success.append((item, True)) + else: + self._items_fail.append(item)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_energybutton/energy_setter_window.html b/_modules/siriushla/as_ap_energybutton/energy_setter_window.html new file mode 100644 index 000000000..3fef9ed55 --- /dev/null +++ b/_modules/siriushla/as_ap_energybutton/energy_setter_window.html @@ -0,0 +1,194 @@ + + + + + + siriushla.as_ap_energybutton.energy_setter_window — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_energybutton.energy_setter_window

+"""Main window."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QTabWidget
+
+from siriushla.widgets import SiriusMainWindow
+from siriushla.as_ap_energybutton.energy_button import EnergyButton
+
+
+
+[docs] +class EnergySetterWindow(SiriusMainWindow): + """.""" + + def __init__(self, parent=None): + """.""" + super().__init__(parent) + self._setup_ui() + self.setWindowTitle('Energy Button Application') + self.setFocusPolicy(Qt.StrongFocus) + self.setObjectName('ASApp') + + def _setup_ui(self): + cwid = QTabWidget() + + for section in ('tb', 'bo', 'ts', 'si'): + widget = EnergyButton(section, parent=cwid) + cwid.addTab(widget, section.upper()) + self.setCentralWidget(cwid) + cwid.setObjectName('cwid') + cwid.setStyleSheet('#cwid{width: 20em; height: 25em;}')
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_energybutton/set_energy.html b/_modules/siriushla/as_ap_energybutton/set_energy.html new file mode 100644 index 000000000..c3f4cf8a7 --- /dev/null +++ b/_modules/siriushla/as_ap_energybutton/set_energy.html @@ -0,0 +1,240 @@ + + + + + + siriushla.as_ap_energybutton.set_energy — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_energybutton.set_energy

+"""."""
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.search import PSSearch as _PSSearch
+from siriuspy.namesys import SiriusPVName as _SiriusPVName
+
+
+_TIMEOUT = 0.05
+DIPNAMES = {
+    'TB': [_SiriusPVName('TB-Fam:PS-B'), ],
+    'BO': [_SiriusPVName('BO-Fam:PS-B-1'), _SiriusPVName('BO-Fam:PS-B-2')],
+    'TS': [_SiriusPVName('TS-Fam:PS-B'), ],
+    'SI': [
+        _SiriusPVName('SI-Fam:PS-B1B2-1'),
+        _SiriusPVName('SI-Fam:PS-B1B2-2')]}
+
+
+
+[docs] +def init_section(section): + """.""" + dipoles, magnets = _create_objects(section) + dipoles, magnets = _create_pvs(dipoles, magnets) + return dipoles, magnets
+ + + +def _create_objects(section): + """.""" + dipnames = DIPNAMES[section] + psnames = _PSSearch.get_psnames({'sec': section}) + kckrs = [ + _SiriusPVName('BO-01D:PU-InjKckr'), + _SiriusPVName('BO-48D:PU-EjeKckr'), + _SiriusPVName('SI-01SA:PU-InjDpKckr'), + _SiriusPVName('SI-01SA:PU-InjNLKckr')] + # Add Kickers to TLs: + if section == 'TS': + psnames.extend(kckrs[1:]) + psnames = sorted(psnames) + elif section == 'TB': + psnames.append(kckrs[0]) + psnames = sorted(psnames) + else: + psnames = sorted(set(psnames) - set(kckrs)) + + magnets = [] + dipoles = [] + for psname in psnames: + if psname.dev.startswith('FC'): + continue + mfunc = _PSSearch.conv_psname_2_magfunc(psname) + if mfunc == 'dipole': + dipoles.append({'psname': psname, 'mafunc': mfunc}) + continue + magnets.append({'psname': psname, 'mafunc': mfunc}) + return dipoles, magnets + + +def _create_pvs(dipoles, magnets): + """.""" + dips = [] + for dipole in dipoles: + dips.append(dipole['psname'].substitute( + prefix=_VACA_PREFIX, propty_name='Energy', propty_suffix='SP')) + mags = set() + for d in magnets: + psname = d['psname'] + magf = d['mafunc'] + if 'corrector' in magf: + mags.add(psname.substitute( + prefix=_VACA_PREFIX, propty_name='Kick', propty_suffix='SP')) + elif 'quadrupole' in magf: + mags.add(psname.substitute( + prefix=_VACA_PREFIX, propty_name='KL', propty_suffix='SP')) + elif 'sextupole' in magf: + mags.add(psname.substitute( + prefix=_VACA_PREFIX, propty_name='SL', propty_suffix='SP')) + return dips, sorted(mags) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_injcontrol/base.html b/_modules/siriushla/as_ap_injcontrol/base.html new file mode 100644 index 000000000..d69c59d88 --- /dev/null +++ b/_modules/siriushla/as_ap_injcontrol/base.html @@ -0,0 +1,388 @@ + + + + + + siriushla.as_ap_injcontrol.base — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_injcontrol.base

+
+import os as _os
+
+from qtpy.QtCore import Qt, Slot
+from qtpy.QtSvg import QSvgWidget
+from qtpy.QtWidgets import QHBoxLayout, QVBoxLayout, QGridLayout, QWidget, \
+    QLabel, QPushButton, QCheckBox, QSizePolicy as QSzPlcy, QGroupBox, \
+    QButtonGroup, QMenuBar
+from pydm.widgets import PyDMEnumComboBox
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+
+from siriushla import util
+from siriushla.widgets import SiriusMainWindow, PyDMLed, \
+    SiriusLedState, PyDMSpinboxScrollbar, SiriusLabel
+from siriushla.as_di_scrns import SiriusScrnView
+from siriushla.as_ps_control import PSDetailWindow
+from siriushla.as_pu_control import PUDetailWindow
+
+
+
+[docs] +class BaseWindow(SiriusMainWindow): + """Base class.""" + + def __init__(self, parent=None, prefix=_VACA_PREFIX): + """Init.""" + super().__init__(parent) + self.prefix = prefix + self._curr_dir = _os.path.abspath(_os.path.dirname(__file__)) + + def _setupUi(self): + # menubar + self.menubar = QMenuBar(self) + self.menubar.setNativeMenuBar(False) + self.setMenuBar(self.menubar) + self.menu = self.menubar.addMenu("Open...") + self._setupMenu() + + # auxiliar diagnostics widget + self.auxdig_wid = None + self._setupDiagWidget() + + # lattice widget + self.lattice_wid = QSvgWidget( + _os.path.join(self._curr_dir, self.SVG_FILE)) + + # screens view widget (create only one ScrnView) + self._scrns_wids_dict = dict() + self._currScrn = 0 + scrn_wid = SiriusScrnView( + parent=self, prefix=self.prefix, + device=self._scrns[self._currScrn]) + scrn_wid.setVisible(True) + self._scrns_wids_dict[self._currScrn] = scrn_wid + self.scrns_wid = QWidget() + lay_scrns = QGridLayout(self.scrns_wid) + lay_scrns.addWidget(scrn_wid) + + # correction widget + self.corr_wid = QGroupBox('Screens and Correctors Panel') + self._scrns_sel_bg = QButtonGroup(parent=self.corr_wid) + self._scrns_sel_bg.setExclusive(True) + self._setupScrnsCorrsWidget() + + vlay1 = QVBoxLayout() + if self.auxdig_wid: + vlay1.addWidget(self.auxdig_wid) + vlay1.addWidget(self.scrns_wid) + vlay2 = QVBoxLayout() + vlay2.addWidget(self.lattice_wid) + vlay2.addWidget(self.corr_wid) + + cw = QWidget() + lay = QHBoxLayout(cw) + lay.addLayout(vlay1) + lay.addLayout(vlay2) + self.setCentralWidget(cw) + + def _setupMenu(self): + raise NotImplementedError + + def _setupScrnsCorrsWidget(self): + raise NotImplementedError + + def _setupDiagWidget(self): + raise NotImplementedError + + @Slot() + def _setScrnWidget(self): + scrn_obj = self._scrns_wids_dict[self._currScrn] + scrn_obj.setVisible(False) + + sender = self.sender() + self._currScrn = self._scrns_sel_bg.id(sender) + + if self._currScrn not in self._scrns_wids_dict.keys(): + scrn_obj = SiriusScrnView( + parent=self, prefix=self.prefix, + device=self._scrns[self._currScrn]) + self.scrns_wid.layout().addWidget(scrn_obj, 2, 0) + self._scrns_wids_dict[self._currScrn] = scrn_obj + else: + scrn_obj = self._scrns_wids_dict[self._currScrn] + + self._scrns_wids_dict[self._currScrn].setVisible(True) + + def _create_headerline(self, labels): + """Create and return a headerline.""" + hl = QWidget() + hl.setLayout(QHBoxLayout()) + hl.layout().setContentsMargins(0, 9, 0, 0) + + glay = None + for text, width in labels: + if not width: + if glay: + hl.layout().addLayout(glay) + hl.layout().addStretch() + glay = QGridLayout() + glay.setAlignment(Qt.AlignCenter) + glay.setContentsMargins(0, 0, 0, 0) + c = 0 + else: + label = QLabel(text, self) + label.setStyleSheet(""" + min-width:valueem; min-height:1.29em; max-height:1.29em; + font-weight:bold; qproperty-alignment: AlignCenter; + """.replace('value', str(width))) + glay.addWidget(label, 0, c) + c += 1 + return hl + + def _create_scrn_summwidget(self, scrn_device, scrn_idx): + """Create and return a screen detail widget.""" + cb_scrn = QCheckBox(scrn_device.get_nickname(dev=True), self) + self._scrns_sel_bg.addButton(cb_scrn) + self._scrns_sel_bg.setId(cb_scrn, scrn_idx) + if scrn_idx == self._currScrn: + cb_scrn.setChecked(True) + cb_scrn.clicked.connect(self._setScrnWidget) + cb_scrn.setStyleSheet(""" + min-width:6.5em; max-width:6.5em; font-weight:bold;""") + + led_camenbl = SiriusLedState(self, scrn_device.substitute( + prefix=self.prefix, propty='CamEnbl-Sts')) + led_camenbl.setStyleSheet("min-width:3.2em; max-width:3.2em;") + + cb_scrntype = PyDMEnumComboBox(self, scrn_device.substitute( + prefix=self.prefix, propty='ScrnType-Sel')) + cb_scrntype.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Fixed) + cb_scrntype.setStyleSheet("min-width:4.5em;max-width:4.5em;") + + lb_scrntype = SiriusLabel(self, scrn_device.substitute( + prefix=self.prefix, propty='ScrnType-Sts')) + lb_scrntype.setStyleSheet("min-width:4.5em; max-width:4.5em;") + lb_scrntype.setAlignment(Qt.AlignCenter) + + led_scrntype = PyDMLed( + self, scrn_device.substitute( + prefix=self.prefix, propty='ScrnType-Sts'), + color_list=[PyDMLed.LightGreen, PyDMLed.Red, PyDMLed.Red, + PyDMLed.Yellow]) + led_scrntype.shape = 2 + led_scrntype.setStyleSheet("""min-width:4.5em; max-width:4.5em;""") + + wid = QWidget() + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignCenter) + lay.addWidget(cb_scrn, 1, 1) + lay.addWidget(led_camenbl, 1, 2) + lay.addWidget(cb_scrntype, 1, 3) + lay.addWidget(lb_scrntype, 1, 4) + lay.addWidget(led_scrntype, 2, 4) + return wid + + def _create_corr_summwidget(self, corr): + """Create and return a corrector detail widget.""" + wid = QWidget() + wid.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + lay = QGridLayout(wid) + lay.setContentsMargins(0, 0, 0, 0) + lay.setAlignment(Qt.AlignCenter) + + propty_sp = 'Current-SP' if corr.sec == 'LI' else 'Kick-SP' + propty_mon = propty_sp.replace('SP', 'Mon') + + led = SiriusLedState(self, corr.substitute( + prefix=self.prefix, propty='PwrState-Sts')) + led.setStyleSheet("max-width:1.29em;") + lay.addWidget(led, 1, 1) + + nickname = corr.get_nickname(sec=corr.sec == 'LI', dev=True) + pb = QPushButton(nickname, self) + if corr.dis == 'PU': + util.connect_window( + pb, PUDetailWindow, parent=self, devname=corr) + else: + util.connect_window( + pb, PSDetailWindow, parent=self, psname=corr) + pb.setStyleSheet(""" + min-width:6em; max-width:6em; min-height:1.29em;""") + lay.addWidget(pb, 1, 2) + + sp_kick = PyDMSpinboxScrollbar( + self, corr.substitute(prefix=self.prefix, propty=propty_sp)) + sp_kick.setStyleSheet( + "QDoubleSpinBox{min-width:4em; max-width:4em; }" + "QScrollBar{max-width:4em;}") + sp_kick.spinbox.precisionFromPV = False + sp_kick.spinbox.precision = 1 + sp_kick.scrollbar.limitsFromPV = True + lay.addWidget(sp_kick, 1, 3, 2, 1) + + lb_kick = SiriusLabel( + self, corr.substitute(prefix=self.prefix, propty=propty_mon), + keep_unit=True) + lb_kick.setStyleSheet(""" + min-width:5em; max-width:5em; min-height:1.29em;""") + lb_kick.showUnits = True + lb_kick.precisionFromPV = False + lb_kick.precision = 1 + lb_kick.setAlignment(Qt.AlignCenter) + lay.addWidget(lb_kick, 1, 4) + return wid
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_injcontrol/injbo.html b/_modules/siriushla/as_ap_injcontrol/injbo.html new file mode 100644 index 000000000..f096a402c --- /dev/null +++ b/_modules/siriushla/as_ap_injcontrol/injbo.html @@ -0,0 +1,366 @@ + + + + + + siriushla.as_ap_injcontrol.injbo — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_injcontrol.injbo

+"""Booster Injection Control HLA module."""
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QGridLayout, QVBoxLayout, QHBoxLayout, QWidget, \
+    QSizePolicy as QSzPlcy, QGroupBox, QLabel, QPushButton, QAction
+
+from pydm.widgets import PyDMPushButton
+from siriuspy.namesys import SiriusPVName
+from siriushla import util
+from siriushla.widgets import SiriusLabel, SiriusSpinbox
+from siriushla.as_ap_posang import CorrParamsDetailWindow
+from siriushla.as_ap_injcontrol.base import BaseWindow
+
+
+
+[docs] +class InjBOControlWindow(BaseWindow): + """Booster Injection Control HLA.""" + + def __init__(self, parent=None, prefix=_VACA_PREFIX): + super().__init__(parent, prefix) + self.setWindowTitle('Booster Injection Control Window') + self.setObjectName('BOApp') + self.SVG_FILE = 'TB-BO.svg' + self._scrns = ('BO-01D:DI-Scrn-1', + 'BO-01D:DI-Scrn-2', + 'BO-02U:DI-Scrn') + self._setupUi() + self.lattice_wid.setStyleSheet( + 'min-width:60em; min-height:14em; max-height:14em;') + + def _setupMenu(self): + PosAng = QAction("PosAng CH-Sept", self) + util.connect_newprocess( + PosAng, 'sirius-hla-tb-ap-posang.py', parent=self) + self.menu.addAction(PosAng) + + def _setupDiagWidget(self): + return + + def _setupScrnsCorrsWidget(self): + # screens + lay_screens = QVBoxLayout() + lay_screens.setContentsMargins(0, 0, 0, 0) + header_screens = self._create_headerline( + (('', 0), + ('Screen', 6.5), ('Cam', 3.5), ('Type-Sel', 5), + ('Type-Sts', 5), + ('', 0))) + header_screens.setObjectName('header_screens') + header_screens.setStyleSheet( + '#header_screens {border-bottom: 2px solid gray;}') + header_screens.layout().setContentsMargins(0, 9, 0, 9) + header_screens.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + lay_screens.addWidget(header_screens) + + for idx, scrn_prefix in enumerate(self._scrns): + scrn_prefix = SiriusPVName(scrn_prefix) + w = self._create_scrn_summwidget(scrn_prefix, idx) + w.layout().setContentsMargins(9, 9, 9, 9) + lay_screens.addWidget(w) + + # correctors + w_corr = QWidget() + w_corr.setObjectName('w_corr') + w_corr.setStyleSheet( + '#w_corr {border-left: 2px solid gray;}') + lay_corr = QGridLayout(w_corr) + lay_corr.setContentsMargins(0, 0, 0, 0) + lay_corr.setVerticalSpacing(25) + lay_corr.setHorizontalSpacing(15) + lay_corr.setAlignment(Qt.AlignTop) + header_corrs = self._create_headerline( + (('', 0), + ('', 1.29), ('', 5), ('Kick-SP', 5), ('Kick-Mon', 5), + ('', 0), + ('', 1.29), ('', 5), ('Kick-SP', 5), ('Kick-Mon', 5), + ('', 0))) + header_corrs.setObjectName('header_corrs') + header_corrs.setStyleSheet( + '#header_corrs {border-bottom: 2px solid gray;}') + header_corrs.layout().setContentsMargins(0, 9, 0, 9) + header_corrs.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + lay_corr.addWidget(header_corrs, 0, 0, 1, 2) + + for corr, row, col in (('TB-04:PS-CH-1', 1, 0), + ('TB-04:PS-CH-2', 2, 0), + ('TB-04:PS-CV-1', 1, 1), + ('TB-04:PS-CV-2', 2, 1), + ('TB-04:PU-InjSept', 3, 0), + ('BO-01D:PU-InjKckr', 3, 1)): + corr = SiriusPVName(corr) + w = self._create_corr_summwidget(corr) + w.layout().setContentsMargins(9, 9, 9, 9) + lay_corr.addWidget(w, row, col) + + # posang + posang_prefix = SiriusPVName( + 'TB-Glob:AP-PosAng').substitute(prefix=self.prefix) + + w_posang = QWidget() + w_posang.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + w_posang.setObjectName('w_posang') + w_posang.setStyleSheet( + '#w_posang {border-top: 2px solid gray;}') + lay_posang = QGridLayout(w_posang) + lay_posang.setVerticalSpacing(9) + lay_posang.setHorizontalSpacing(15) + + header_posang = self._create_headerline( + (('', 0), + ('', 1.29), ('Position and Angle Correction', 30), + ('', 0))) + header_posang.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + lay_posang.addWidget(header_posang, 0, 0, 1, 2) + + self.pb_update_ref = PyDMPushButton( + label='Update Reference', parent=self, + init_channel=posang_prefix.substitute(propty='SetNewRefKick-Cmd'), + pressValue=1) + self.pb_update_ref.setStyleSheet('min-height: 2em;') + lay_posang.addWidget(self.pb_update_ref, 1, 0, 1, 2) + + for col, title, axis in ((0, 'Horizontal', 'X'), (1, 'Vertical', 'Y')): + lb_pos = QLabel('<h4>Δ'+axis.lower()+'</h4>', self, + alignment=Qt.AlignRight) + lb_pos.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum) + pos_sp = SiriusSpinbox( + self, posang_prefix.substitute(propty='DeltaPos'+axis+'-SP')) + pos_sp.setObjectName('pos_sp_'+axis.lower()) + pos_rb = SiriusLabel( + self, posang_prefix.substitute(propty='DeltaPos'+axis+'-RB'), + keep_unit=True) + pos_rb.showUnits = True + pos_rb.setObjectName('pos_rb_'+axis.lower()) + lb_ang = QLabel('<h4>Δ'+axis.lower()+'\'</h4>', self, + alignment=Qt.AlignRight) + lb_ang.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum) + ang_sp = SiriusSpinbox( + self, posang_prefix.substitute(propty='DeltaAng'+axis+'-SP')) + ang_sp.setObjectName('ang_sp_'+axis.lower()) + ang_rb = SiriusLabel( + self, posang_prefix.substitute(propty='DeltaAng'+axis+'-RB'), + keep_unit=True) + ang_rb.showUnits = True + ang_rb.setObjectName('ang_rb_'+axis.lower()) + gbox_posang = QGroupBox(title, self) + axlay = QGridLayout(gbox_posang) + axlay.addWidget(lb_pos, 0, 0) + axlay.addWidget(pos_sp, 0, 1) + axlay.addWidget(pos_rb, 0, 2) + axlay.addWidget(lb_ang, 1, 0) + axlay.addWidget(ang_sp, 1, 1) + axlay.addWidget(ang_rb, 1, 2) + lay_posang.addWidget(gbox_posang, 2, col) + + self.pb_posang_settings = QPushButton('Settings', self) + util.connect_window(self.pb_posang_settings, CorrParamsDetailWindow, + parent=self, tl='TB', prefix=self.prefix) + lay_posang.addWidget(self.pb_posang_settings, 3, 0, 1, 2, + alignment=Qt.AlignRight) + + lay_posangref = QGridLayout() + lay_posangref.setHorizontalSpacing(9) + lay_posangref.setVerticalSpacing(9) + lay_posangref.addWidget(QLabel('<h4>Reference Kicks</h4>', self, + alignment=Qt.AlignCenter), 0, 0, 1, 7) + for corr in ('CH1', 'CH2', 'CV1', 'CV2'): + lb_corr = SiriusLabel( + self, posang_prefix.substitute(propty=corr+'-Cte')) + lb_corr.setStyleSheet('font-weight:bold;') + lb_refkick = SiriusLabel( + self, posang_prefix.substitute(propty='RefKick'+corr+'-Mon')) + lb_refkick.showUnits = True + col = 1 if 'CH' in corr else 4 + row = 0 if '1' in corr else 1 + lay_posangref.addWidget(lb_corr, row+1, col) + lay_posangref.addWidget(lb_refkick, row+1, col+1) + lay_posangref.setColumnStretch(0, 1) + lay_posangref.setColumnStretch(1, 3) + lay_posangref.setColumnStretch(2, 3) + lay_posangref.setColumnStretch(3, 1) + lay_posangref.setColumnStretch(4, 3) + lay_posangref.setColumnStretch(5, 3) + lay_posangref.setColumnStretch(6, 1) + lay_posang.addLayout(lay_posangref, 4, 0, 1, 2) + + lay_corr.addWidget(w_posang, 4, 0, 1, 2) + + lay_corr.setRowStretch(0, 1) + lay_corr.setRowStretch(1, 2) + lay_corr.setRowStretch(2, 2) + lay_corr.setRowStretch(3, 2) + lay_corr.setRowStretch(4, 10) + + lay = QHBoxLayout() + lay.setContentsMargins(0, 0, 0, 0) + lay.setSpacing(0) + lay.addLayout(lay_screens) + lay.addWidget(w_corr) + self.corr_wid.setLayout(lay)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_injcontrol/tbts.html b/_modules/siriushla/as_ap_injcontrol/tbts.html new file mode 100644 index 000000000..ca6364fb5 --- /dev/null +++ b/_modules/siriushla/as_ap_injcontrol/tbts.html @@ -0,0 +1,378 @@ + + + + + + siriushla.as_ap_injcontrol.tbts — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_injcontrol.tbts

+#!/usr/bin/env python-sirius
+"""HLA TB and TS AP Control Window."""
+
+from qtpy.QtWidgets import QVBoxLayout, QHBoxLayout, QWidget, QAction, \
+    QSizePolicy as QSzPlcy, QTabWidget
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.namesys import SiriusPVName
+from siriushla import util
+from siriushla.as_di_icts import ICTSummary
+from siriushla.tb_di_slits import SlitMonitoring
+from siriushla.as_ap_injcontrol.base import BaseWindow
+
+
+
+[docs] +class TLControlWindow(BaseWindow): + """Class to create the main window for TB and TS HLA.""" + + def __init__(self, parent=None, prefix=_VACA_PREFIX, tl=None): + """Initialize widgets in main window.""" + super().__init__(parent, prefix) + self.setWindowTitle(tl.upper() + ' Control Window') + self.setObjectName(tl.upper()+'App') + self.tl = tl.lower() + self.SVG_FILE = tl.upper() + '.svg' + self._devices = self._getTLData() + self._scrns = [devs[0] for devs in self._devices] + self._setupUi() + self.lattice_wid.setStyleSheet( + 'min-width:62em; min-height:10em; max-height:10em;') + + def _setupMenu(self): + # LatticeAndTwiss = QAction("Show Lattice and Twiss", self) + # util.connect_window(LatticeAndTwiss, ShowLatticeAndTwiss, + # parent=self, tl=self.tl) + # self.menu.addAction(LatticeAndTwiss) + PS = QAction("PS", self) + util.connect_newprocess( + PS, 'sirius-hla-'+self.tl+'-ps-control.py', parent=self) + self.menu.addAction(PS) + PU = QAction("PU", self) + util.connect_newprocess( + PU, 'sirius-hla-'+self.tl+'-pu-control.py', parent=self) + self.menu.addAction(PU) + SOFB = QAction("SOFB", self) + util.connect_newprocess( + SOFB, 'sirius-hla-'+self.tl+'-ap-sofb.py', parent=self) + self.menu.addAction(SOFB) + ICTs = QAction("ICTs", self) + util.connect_newprocess( + ICTs, 'sirius-hla-'+self.tl+'-di-icts.py', parent=self) + self.menu.addAction(ICTs) + + def _setupScrnsCorrsWidget(self): + lay = QVBoxLayout() + lay.setContentsMargins(0, 0, 0, 0) + + headerline = self._create_headerline( + (('', 0), + ('Screen', 6.5), ('Cam', 3.5), ('Type-Sel', 5), ('Type-Sts', 5), + ('', 0), + ('', 1.29), ('CH', 5), ('Kick-SP', 5), ('Kick-Mon', 5), + ('', 0), + ('', 1.29), ('CV', 5), ('Kick-SP', 5), ('Kick-Mon', 5), + ('', 0))) + headerline.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + lay.addWidget(headerline) + + for scrn_idx, devices in enumerate(self._devices): + scrnprefix, ch_group, cv_group = devices + + scrnprefix = SiriusPVName(scrnprefix) + scrn_details = self._create_scrn_summwidget(scrnprefix, scrn_idx) + scrn_details.setObjectName(scrnprefix) + scrn_details.layout().setContentsMargins(0, 9, 0, 9) + + ch_widget = QWidget() + ch_widget.setLayout(QVBoxLayout()) + ch_widget.layout().setContentsMargins(0, 9, 0, 9) + for ch in ch_group: + ch = SiriusPVName(ch) + ch_details = self._create_corr_summwidget(ch) + ch_details.setObjectName(ch) + ch_widget.layout().addWidget(ch_details) + + cv_widget = QWidget() + cv_widget.setLayout(QVBoxLayout()) + cv_widget.layout().setContentsMargins(0, 9, 0, 9) + for cv in cv_group: + cv = SiriusPVName(cv) + cv_details = self._create_corr_summwidget(cv) + cv_details.setObjectName(cv) + cv_widget.layout().addWidget(cv_details) + + hlay_scrncorr = QHBoxLayout() + hlay_scrncorr.setContentsMargins(0, 0, 0, 0) + hlay_scrncorr.addStretch() + hlay_scrncorr.addWidget(scrn_details) + hlay_scrncorr.addStretch() + hlay_scrncorr.addWidget(ch_widget) + hlay_scrncorr.addStretch() + hlay_scrncorr.addWidget(cv_widget) + hlay_scrncorr.addStretch() + widget_scrncorr = QWidget() + widget_scrncorr.setObjectName('widget_correctors_scrn') + widget_scrncorr.setLayout(hlay_scrncorr) + widget_scrncorr.setStyleSheet( + '#widget_correctors_scrn {border-top: 2px solid gray;}') + lay.addWidget(widget_scrncorr) + + self.corr_wid.setLayout(lay) + + def _setupDiagWidget(self): + self.ictmon = ICTSummary(self, prefix=self.prefix, tl=self.tl) + if self.tl == 'tb': + self.auxdig_wid = QTabWidget() + self.auxdig_wid.setStyleSheet(""" + QTabBar::tab{margin-top: 0em;}""") + self.auxdig_wid.addTab(self.ictmon, 'ICTs') + self.slith = SlitMonitoring(self, self.prefix, 'TB-01:DI-SlitH') + self.slith.setObjectName('slith') + self.slith.setStyleSheet('#slith{max-height:8.5em;}') + self.auxdig_wid.addTab(self.slith, 'Slit H') + self.slitv = SlitMonitoring(self, self.prefix, 'TB-01:DI-SlitV') + self.slitv.setObjectName('slitv') + self.slitv.setStyleSheet('#slitv{max-height:8.5em;}') + self.auxdig_wid.addTab(self.slitv, 'Slit V') + elif self.tl == 'ts': + self.auxdig_wid = QWidget() + lay = QVBoxLayout() + lay.setContentsMargins(0, 0, 0, 0) + lay.addStretch() + lay.addWidget(self.ictmon) + lay.addStretch() + self.auxdig_wid.setLayout(lay) + + def _getTLData(self): + """Return transport line data based on input 'tl'.""" + if self.tl == 'tb': + devices = ( + ('TB-01:DI-Scrn-1', ('LI-01:PS-CH-7', ), ('LI-01:PS-CV-7', )), + ('TB-01:DI-Scrn-2', ('TB-01:PS-CH-1', ), ('TB-01:PS-CV-1', )), + ('TB-02:DI-Scrn-1', ('TB-01:PS-CH-2', ), ('TB-01:PS-CV-2', )), + ('TB-02:DI-Scrn-2', ('TB-02:PS-CH-1', ), ('TB-02:PS-CV-1', )), + ('TB-03:DI-Scrn', ('TB-02:PS-CH-2', ), ('TB-02:PS-CV-2', )), + ('TB-04:DI-Scrn', ('TB-04:PS-CH-1', ), ('TB-04:PS-CV-1', )) + ) + elif self.tl == 'ts': + devices = ( + ('TS-01:DI-Scrn', ('TS-01:PU-EjeSeptF', 'TS-01:PU-EjeSeptG'), + ('TS-01:PS-CV-1', 'TS-01:PS-CV-1E2')), + ('TS-02:DI-Scrn', ('TS-01:PS-CH', ), + ('TS-01:PS-CV-2', 'TS-02:PS-CV-0')), + ('TS-03:DI-Scrn', ('TS-02:PS-CH', ), ('TS-02:PS-CV', )), + ('TS-04:DI-Scrn-1', ('TS-03:PS-CH', ), + ('TS-03:PS-CV', 'TS-04:PS-CV-0')), + ('TS-04:DI-Scrn-2', ('TS-04:PS-CH', ), + ('TS-04:PS-CV-1', 'TS-04:PS-CV-1E2')), + ('TS-04:DI-Scrn-3', + ('TS-04:PU-InjSeptG-1', 'TS-04:PU-InjSeptG-2', + 'TS-04:PU-InjSeptF'), ('TS-04:PS-CV-2', )) + ) + return devices + +
+[docs] + def keyPressEvent(self, event): + """Override keyPressEvent.""" + super().keyPressEvent(event) + if self.tl == 'tb': + self.slith.updateDevWidget() + self.slitv.updateDevWidget()
+
+ + + +# import pyaccel as _pyaccel +# import pymodels as _pymodels +# from siriushla.widgets import MatplotlibWidget +# +# +# class ShowLatticeAndTwiss(SiriusMainWindow): +# """Class to create Lattice and Twiss Widget.""" +# +# def __init__(self, parent=None, tl=None): +# """Create Lattice and Twiss Graph.""" +# super(ShowLatticeAndTwiss, self).__init__(parent) +# self.setWindowTitle(tl.upper() + ' Nominal Lattice and Twiss') +# if tl == 'tb': +# self.tl, self._twiss_in = _pymodels.tb.create_accelerator() +# fam_data = _pymodels.tb.families.get_family_data(self.tl) +# fam_mapping = _pymodels.tb.family_mapping +# elif tl == 'ts': +# self.tl, self._twiss_in = _pymodels.ts.create_accelerator() +# fam_data = _pymodels.ts.families.get_family_data(self.tl) +# fam_mapping = _pymodels.ts.family_mapping +# +# self.tl_twiss, _ = _pyaccel.optics.calc_twiss( +# accelerator=self.tl, +# init_twiss=self._twiss_in) +# self._fig, self._ax = _pyaccel.graphics.plot_twiss( +# accelerator=self.tl, +# twiss=self.tl_twiss, +# family_data=fam_data, +# family_mapping=fam_mapping, +# draw_edges=True, +# height=4, +# show_label=True) +# self.centralwidget = QWidget() +# self.centralwidget.setLayout(QVBoxLayout()) +# self.canvas = MatplotlibWidget(figure=self._fig) +# self.canvas.setParent(self.centralwidget) +# self.centralwidget.layout().addWidget(self.canvas) +# self.centralwidget.layout().setContentsMargins(0, 0, 0, 0) +# self.setCentralWidget(self.centralwidget) +# self.centralwidget.setStyleSheet("""min-width:90em;max-width:90em;""") +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_injection/auxiliary_dialogs.html b/_modules/siriushla/as_ap_injection/auxiliary_dialogs.html new file mode 100644 index 000000000..d39ceb3d0 --- /dev/null +++ b/_modules/siriushla/as_ap_injection/auxiliary_dialogs.html @@ -0,0 +1,807 @@ + + + + + + siriushla.as_ap_injection.auxiliary_dialogs — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_injection.auxiliary_dialogs

+"""Auxiliary Dialogs."""
+
+import numpy as _np
+
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QVBoxLayout, QHBoxLayout, QGridLayout, \
+    QTabWidget, QWidget, QLabel, QGroupBox, QSizePolicy as QSzPlcy, \
+    QSpacerItem
+
+from pyqtgraph import mkBrush, FillBetweenItem
+
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.namesys import SiriusPVName
+
+from ..widgets import SiriusDialog, SiriusWaveformPlot, \
+    SiriusEnumComboBox, SiriusSpinbox, SiriusLabel, \
+    SiriusLedState, PyDMStateButton, SiriusConnectionSignal
+
+
+
+[docs] +class BiasFBDetailDialog(SiriusDialog): + """Bias FB detail dialog.""" + + def __init__(self, parent=None, device='', prefix=''): + super().__init__(parent) + self._prefix = prefix + self._inj_dev = SiriusPVName(device) + self._inj_prefix = device.substitute(prefix=prefix) + self.setObjectName('ASApp') + self.setWindowTitle('Injection Controls - Bias Feedback Settings') + self._setupUi() + + def _setupUi(self): + title = QLabel( + '<h4>Bias Feedback Settings</h4>', self, + alignment=Qt.AlignCenter) + + # global parameters + wid_global = self._setupGlobalParams() + + # fitting settings + wid_model = self._setupModelParams() + + # graphs: model inference and prediction + tab_graphs = QTabWidget(self) + wid_graphinf = self._setupInferenceGraph() + tab_graphs.addTab(wid_graphinf, 'Inferences') + wid_graphpred = self._setupPredictionGraph() + tab_graphs.addTab(wid_graphpred, 'Models') + tab_graphs.setObjectName('ASTab') + tab_graphs.setStyleSheet(""" + QTabWidget::pane{ + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }""") + + lay = QVBoxLayout(self) + lay.addWidget(title) + lay.addWidget(wid_global) + lay.addWidget(wid_model) + lay.addWidget(tab_graphs) + + def _setupGlobalParams(self): + ld_minv = QLabel( + 'Min.:', self, alignment=Qt.AlignRight) + sb_minv = SiriusSpinbox( + self, self._inj_prefix.substitute(propty='BiasFBMinVoltage-SP')) + lb_minv = SiriusLabel( + self, self._inj_prefix.substitute(propty='BiasFBMinVoltage-RB')) + lb_minv.showUnits = True + ld_maxv = QLabel( + 'Max.:', self, alignment=Qt.AlignRight) + sb_maxv = SiriusSpinbox( + self, self._inj_prefix.substitute(propty='BiasFBMaxVoltage-SP')) + lb_maxv = SiriusLabel( + self, self._inj_prefix.substitute(propty='BiasFBMaxVoltage-RB')) + lb_maxv.showUnits = True + + wid = QGroupBox('Bias Limits') + lay = QHBoxLayout(wid) + lay.addStretch() + lay.addWidget(ld_minv) + lay.addWidget(sb_minv) + lay.addWidget(lb_minv) + lay.addStretch() + lay.addWidget(ld_maxv) + lay.addWidget(sb_maxv) + lay.addWidget(lb_maxv) + lay.addStretch() + + wid.setStyleSheet(""" + .QLabel{ + min-width: 7em; min-height: 1.5em; max-height: 1.5em; + qproperty-alignment: 'AlignRight | AlignVCenter'; + }""") + return wid + + def _setupModelParams(self): + ld_modtyp = QLabel( + 'Type:', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + cb_modtyp = SiriusEnumComboBox( + self, self._inj_prefix.substitute(propty='BiasFBModelType-Sel')) + lb_modtyp = SiriusLabel( + self, self._inj_prefix.substitute(propty='BiasFBModelType-Sts')) + + ld_modupd = QLabel( + 'Update data:', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + sb_modupd = PyDMStateButton( + self, self._inj_prefix.substitute( + propty='BiasFBModelUpdateData-Sel')) + led_modupd = SiriusLedState( + self, self._inj_prefix.substitute( + propty='BiasFBModelUpdateData-Sts')) + + lay1 = QHBoxLayout() + lay1.setContentsMargins(0, 0, 0, 0) + lay1.addStretch() + lay1.addWidget(ld_modtyp) + lay1.addWidget(cb_modtyp) + lay1.addWidget(lb_modtyp) + lay1.addStretch() + lay1.addWidget(ld_modupd) + lay1.addWidget(sb_modupd) + lay1.addWidget(led_modupd, alignment=Qt.AlignLeft) + lay1.addStretch() + + gbox_autofit = QGroupBox('Auto Fit') + ld_autofit = QLabel( + 'Enable:', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + cb_autofit = PyDMStateButton( + self, self._inj_prefix.substitute( + propty='BiasFBModelAutoFitParams-Sel')) + led_autofit = SiriusLedState( + self, self._inj_prefix.substitute( + propty='BiasFBModelAutoFitParams-Sts')) + ld_autofitnp = QLabel( + 'Every # pts.:', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + cb_autofitnp = SiriusSpinbox( + self, self._inj_prefix.substitute( + propty='BiasFBModelAutoFitEveryNrPts-SP')) + lb_autofitnp = SiriusLabel( + self, self._inj_prefix.substitute( + propty='BiasFBModelAutoFitEveryNrPts-RB')) + glay_autofit = QGridLayout(gbox_autofit) + glay_autofit.addWidget(ld_autofit, 0, 0) + glay_autofit.addWidget(cb_autofit, 0, 1) + glay_autofit.addWidget(led_autofit, 0, 2, alignment=Qt.AlignLeft) + glay_autofit.addWidget(ld_autofitnp, 1, 0) + glay_autofit.addWidget(cb_autofitnp, 1, 1) + glay_autofit.addWidget(lb_autofitnp, 1, 2) + + ld_modmaxnp = QLabel( + 'Max. # pts.:', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + sb_modmaxnp = SiriusSpinbox( + self, self._inj_prefix.substitute( + propty='BiasFBModelMaxNrPts-SP')) + lb_modmaxnp = SiriusLabel( + self, self._inj_prefix.substitute( + propty='BiasFBModelMaxNrPts-RB'), + alignment=Qt.AlignCenter) + slash = QLabel('/', self, alignment=Qt.AlignCenter) + slash.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Preferred) + lb_modnp = SiriusLabel( + self, self._inj_prefix.substitute(propty='BiasFBModelNrPts-Mon'), + alignment=Qt.AlignCenter) + hlay_modmaxnp = QHBoxLayout() + hlay_modmaxnp.setContentsMargins(0, 0, 0, 0) + hlay_modmaxnp.addWidget(sb_modmaxnp) + hlay_modmaxnp.addWidget(lb_modnp) + hlay_modmaxnp.addWidget(slash) + hlay_modmaxnp.addWidget(lb_modmaxnp) + + ld_npafterfit = QLabel( + '# pts. after last fit:', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + lb_npafterfit = SiriusLabel( + self, self._inj_prefix.substitute( + propty='BiasFBModelNrPtsAfterFit-Mon')) + + pb_fitnow = PyDMPushButton( + self, label='Fit Now', pressValue=1, + init_channel=self._inj_prefix.substitute( + propty='BiasFBModelFitParamsNow-Cmd')) + pb_fitnow.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Preferred) + pb_fitnow.setDefault(False) + pb_fitnow.setAutoDefault(False) + + lay2 = QGridLayout() + lay2.setContentsMargins(0, 0, 0, 0) + lay2.setAlignment(Qt.AlignCenter) + lay2.addWidget(gbox_autofit, 0, 0, 2, 3, alignment=Qt.AlignCenter) + lay2.addItem( + QSpacerItem(20, QSzPlcy.Minimum, QSzPlcy.Preferred), 0, 3) + lay2.addWidget(ld_modmaxnp, 0, 4) + lay2.addLayout(hlay_modmaxnp, 0, 5, 1, 2) + lay2.addWidget(ld_npafterfit, 1, 4) + lay2.addWidget(lb_npafterfit, 1, 5) + lay2.addWidget(pb_fitnow, 1, 6, alignment=Qt.AlignCenter) + + tab_models = QTabWidget(self) + wid_linmod = self._setupLinearParams() + tab_models.addTab(wid_linmod, 'Linear') + wid_gpmod = self._setupGPParams() + tab_models.addTab(wid_gpmod, 'Gaussian Process') + tab_models.setObjectName('ASTab') + tab_models.setStyleSheet(""" + QTabWidget::pane{ + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }""") + + wid = QGroupBox('Model settings') + lay = QVBoxLayout(wid) + lay.setAlignment(Qt.AlignTop) + lay.addLayout(lay1) + lay.addLayout(lay2) + lay.addWidget(tab_models) + return wid + + def _setupLinearParams(self): + ld_ang = QLabel('Ang. Coeff.:', self, alignment=Qt.AlignRight) + sb_ang = SiriusSpinbox( + self, self._inj_prefix.substitute( + propty='BiasFBLinModAngCoeff-SP')) + lb_ang = SiriusLabel( + self, self._inj_prefix.substitute( + propty='BiasFBLinModAngCoeff-RB')) + lb_ang_mon = SiriusLabel( + self, self._inj_prefix.substitute( + propty='BiasFBLinModAngCoeff-Mon')) + + ld_offset = QLabel('Offset Coeff.:', self, alignment=Qt.AlignRight) + sb_offset = SiriusSpinbox( + self, self._inj_prefix.substitute( + propty='BiasFBLinModOffCoeff-SP')) + lb_offset = SiriusLabel( + self, self._inj_prefix.substitute( + propty='BiasFBLinModOffCoeff-RB')) + lb_offset_mon = SiriusLabel( + self, self._inj_prefix.substitute( + propty='BiasFBLinModOffCoeff-Mon')) + + wid = QWidget() + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignHCenter | Qt.AlignTop) + lay.addWidget(ld_ang, 0, 0) + lay.addWidget(sb_ang, 0, 1) + lay.addWidget(lb_ang, 0, 2) + lay.addWidget(lb_ang_mon, 0, 3) + lay.addWidget(ld_offset, 1, 0) + lay.addWidget(sb_offset, 1, 1) + lay.addWidget(lb_offset, 1, 2) + lay.addWidget(lb_offset_mon, 1, 3) + + wid.setStyleSheet(""" + .QLabel{ + min-width: 7em; min-height: 1.5em; max-height: 1.5em; + qproperty-alignment: 'AlignRight | AlignVCenter'; + }""") + return wid + + def _setupGPParams(self): + ld_likehdvar = QLabel( + 'Likelihood std.:', self, alignment=Qt.AlignRight) + sb_likehdvar = SiriusSpinbox( + self, self._inj_prefix.substitute( + propty='BiasFBGPModNoiseStd-SP')) + lb_likehdvar = SiriusLabel( + self, self._inj_prefix.substitute( + propty='BiasFBGPModNoiseStd-RB')) + lb_likehdvar_mon = SiriusLabel( + self, self._inj_prefix.substitute( + propty='BiasFBGPModNoiseStd-Mon')) + pb_likehdvarfit = PyDMStateButton(self, self._inj_prefix.substitute( + propty='BiasFBGPModNoiseStdFit-Sel')) + lb_likehdvarfit = SiriusLabel(self, self._inj_prefix.substitute( + propty='BiasFBGPModNoiseStdFit-Sts')) + + ld_kernvar = QLabel( + 'Kernel std.:', self, alignment=Qt.AlignRight) + sb_kernvar = SiriusSpinbox( + self, self._inj_prefix.substitute( + propty='BiasFBGPModKernStd-SP')) + lb_kernvar = SiriusLabel( + self, self._inj_prefix.substitute( + propty='BiasFBGPModKernStd-RB')) + lb_kernvar_mon = SiriusLabel( + self, self._inj_prefix.substitute( + propty='BiasFBGPModKernStd-Mon')) + pb_kernvarfit = PyDMStateButton(self, self._inj_prefix.substitute( + propty='BiasFBGPModKernStdFit-Sel')) + lb_kernvarfit = SiriusLabel(self, self._inj_prefix.substitute( + propty='BiasFBGPModKernStdFit-Sts')) + + ld_kernlenscl = QLabel( + 'Kernel length scale:', self, alignment=Qt.AlignRight) + sb_kernlenscl = SiriusSpinbox( + self, self._inj_prefix.substitute( + propty='BiasFBGPModKernLenScl-SP')) + lb_kernlenscl = SiriusLabel( + self, self._inj_prefix.substitute( + propty='BiasFBGPModKernLenScl-RB')) + lb_kernlenscl_mon = SiriusLabel( + self, self._inj_prefix.substitute( + propty='BiasFBGPModKernLenScl-Mon')) + pb_kernlensclfit = PyDMStateButton(self, self._inj_prefix.substitute( + propty='BiasFBGPModKernLenSclFit-Sel')) + lb_kernlensclfit = SiriusLabel(self, self._inj_prefix.substitute( + propty='BiasFBGPModKernLenSclFit-Sts')) + + ld_dofit = QLabel(' Fit?', self) + ld_dofit.setStyleSheet(""" + min-width: 3em; min-height: 1.5em; max-height: 1.5em; + qproperty-alignment: 'AlignRight | AlignVCenter';""") + + wid = QWidget() + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignHCenter | Qt.AlignTop) + lay.addWidget(ld_likehdvar, 0, 1) + lay.addWidget(sb_likehdvar, 0, 2) + lay.addWidget(lb_likehdvar, 0, 3) + lay.addWidget(lb_likehdvar_mon, 0, 4) + lay.addWidget(pb_likehdvarfit, 0, 6) + lay.addWidget(lb_likehdvarfit, 0, 7) + lay.addWidget(ld_kernvar, 1, 1) + lay.addWidget(sb_kernvar, 1, 2) + lay.addWidget(lb_kernvar, 1, 3) + lay.addWidget(lb_kernvar_mon, 1, 4) + lay.addWidget(pb_kernvarfit, 1, 6) + lay.addWidget(lb_kernvarfit, 1, 7) + lay.addWidget(ld_kernlenscl, 2, 1) + lay.addWidget(sb_kernlenscl, 2, 2) + lay.addWidget(lb_kernlenscl, 2, 3) + lay.addWidget(lb_kernlenscl_mon, 2, 4) + lay.addWidget(pb_kernlensclfit, 2, 6) + lay.addWidget(lb_kernlensclfit, 2, 7) + lay.addWidget(ld_dofit, 0, 5, 3, 1) + lay.setColumnStretch(0, 2) + lay.setColumnStretch(8, 2) + + wid.setStyleSheet(""" + .QLabel{ + min-width: 7em; min-height: 1.5em; max-height: 1.5em; + qproperty-alignment: 'AlignRight | AlignVCenter'; + } + .PyDMStateButton{ + min-width: 3.2em; min-height: 1.5em; max-height: 1.5em; + }""") + return wid + + def _setupInferenceGraph(self): + # Injcurr X Bias: model inference about the bias + self.graph_inf = SiriusWaveformPlot() + self.graph_inf.addChannel( + y_channel=self._inj_prefix.substitute( + propty='BiasFBGPModInferenceBias-Mon'), + x_channel=self._inj_prefix.substitute( + propty='BiasFBGPModInferenceInjCurr-Mon'), + name='GP', color=QColor(80, 80, 80), lineWidth=2) + self.graph_inf.addChannel( + y_channel=self._inj_prefix.substitute( + propty='BiasFBLinModInferenceBias-Mon'), + x_channel=self._inj_prefix.substitute( + propty='BiasFBLinModInferenceInjCurr-Mon'), + name='Linear', color='blue', lineWidth=2) + self.graph_inf.autoRangeX = True + self.graph_inf.autoRangeY = True + self.graph_inf.showXGrid = True + self.graph_inf.showYGrid = True + self.graph_inf.showLegend = True + self.graph_inf.title = 'Model inference: Inj.Current X Bias Voltage' + self.graph_inf.setLabel( + 'bottom', text='Inj. current [mA]') + self.graph_inf.setLabel( + 'left', text='Bias voltage [V]', color='gray') + self.graph_inf.setBackgroundColor(QColor(255, 255, 255)) + + return self.graph_inf + + def _setupPredictionGraph(self): + # Bias x InjCurr: model prediction about current (check sanity) + self.graph_pred = SiriusWaveformPlot() + self.graph_pred.addChannel( + x_channel=self._inj_prefix.substitute( + propty='BiasFBGPModPredBias-Mon'), + y_channel=self._inj_prefix.substitute( + propty='BiasFBGPModPredInjCurrAvg-Mon'), + name='GP with 95% Conf.', color=QColor(80, 80, 80), lineWidth=2) + + self.graph_pred.addChannel( + x_channel=self._inj_prefix.substitute( + propty='BiasFBGPModPredBias-Mon'), + y_channel='FAKE:GP_Avg_plus_Std', + name='extra1', color='gray', + lineWidth=2, lineStyle=Qt.DashLine) + self.graph_pred.legend.removeItem('extra1') + self._curve_gp_pred_avg_p_std = self.graph_pred.curveAtIndex(-1) + + self.graph_pred.addChannel( + x_channel=self._inj_prefix.substitute( + propty='BiasFBGPModPredBias-Mon'), + y_channel='FAKE:GP_Avg_minus_Std', name='extra2', color='gray', + lineWidth=2, lineStyle=Qt.DashLine) + self.graph_pred.legend.removeItem('extra2') + self._curve_gp_pred_avg_m_std = self.graph_pred.curveAtIndex(-1) + + self._curve_gp_fill_std = FillBetweenItem( + self._curve_gp_pred_avg_p_std, self._curve_gp_pred_avg_m_std, + brush=mkBrush(QColor('lightGray'))) + + self.graph_pred.addChannel( + x_channel=self._inj_prefix.substitute( + propty='BiasFBLinModPredBias-Mon'), + y_channel=self._inj_prefix.substitute( + propty='BiasFBLinModPredInjCurrAvg-Mon'), + name='Linear', color='blue', lineWidth=2) + + self.graph_pred.addChannel( + x_channel=self._inj_prefix.substitute( + propty='BiasFBModelDataBias-Mon'), + y_channel=self._inj_prefix.substitute( + propty='BiasFBModelDataInjCurr-Mon'), + name='Model data', color='black', lineStyle=Qt.NoPen, + symbol='o', symbolSize=6) + curve = self.graph_pred.curveAtIndex(-1) + curve.opts['symbolBrush'] = mkBrush(QColor(0, 0, 0)) + + self.graph_pred.addChannel( + x_channel='FAKE:Bias', y_channel='FAKE:InjCurr', + name='Last Inj.', color='red', lineStyle=Qt.NoPen, + symbol='o', symbolSize=8, redraw_mode=2) + curve = self.graph_pred.curveAtIndex(-1) + curve.opts['symbolBrush'] = mkBrush(QColor(255, 0, 0)) + self._curve_bias_vs_injcurr = curve + + self.graph_pred.addItem(self._curve_gp_fill_std) + self.graph_pred.autoRangeX = True + self.graph_pred.autoRangeY = True + self.graph_pred.showXGrid = True + self.graph_pred.showYGrid = True + self.graph_pred.showLegend = True + self.graph_pred.legend.setOffset((1, 1)) + self.graph_pred.title = 'Model prediction: Bias Voltage X Inj.Current' + self.graph_pred.setLabel('bottom', text='Bias voltage [V]') + self.graph_pred.setLabel( + 'left', text='Inj. current [mA]', color='gray') + self.graph_pred.setBackgroundColor(QColor(255, 255, 255)) + + self._chn_gp_injcurr_avg = SiriusConnectionSignal( + self._inj_prefix.substitute( + propty='BiasFBGPModPredInjCurrAvg-Mon')) + self._chn_gp_injcurr_std = SiriusConnectionSignal( + self._inj_prefix.substitute( + propty='BiasFBGPModPredInjCurrStd-Mon')) + self._chn_gp_injcurr_avg.new_value_signal[_np.ndarray].connect( + self._plot_gp_prediction_confidance) + self._chn_gp_injcurr_std.new_value_signal[_np.ndarray].connect( + self._plot_gp_prediction_confidance) + + self._chn_bias = SiriusConnectionSignal( + self._inj_prefix.substitute(propty='MultBunBiasVolt-RB')) + self._chn_injcurr = SiriusConnectionSignal( + 'SI-Glob:AP-CurrInfo:InjCurr-Mon') + self._chn_injcurr.new_value_signal[float].connect( + self._plot_bias_vs_injcurr) + + return self.graph_pred + + def _plot_gp_prediction_confidance(self, _): + avg = self._chn_gp_injcurr_avg.value + std = self._chn_gp_injcurr_std.value + if avg is None or std is None: + return + avg = _np.asarray(avg) + std = _np.asarray(std) + if avg.size != std.size: + return + self._curve_gp_pred_avg_p_std.receiveYWaveform(avg + 1.96*std) + self._curve_gp_pred_avg_m_std.receiveYWaveform(avg - 1.96*std) + + def _plot_bias_vs_injcurr(self, _): + bias = self._chn_bias.value + injcurr = self._chn_injcurr.value + if None in {bias, injcurr}: + return + self._curve_bias_vs_injcurr.receiveXWaveform(_np.array([bias])) + self._curve_bias_vs_injcurr.receiveYWaveform(_np.array([injcurr]))
+ + + +
+[docs] +class TopUpSettingsDialog(SiriusDialog): + """Top up settings dialog.""" + + def __init__(self, parent=None, device='', prefix=''): + """Init.""" + super().__init__(parent) + self._prefix = prefix + self._inj_dev = SiriusPVName(device) + self._inj_prefix = device.substitute(prefix=prefix) + self.setObjectName('ASApp') + self.setWindowTitle( + 'Injection Controls - Top Up Standby and Warm Up Settings') + self._setupUi() + self.setFocus(True) + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + title = QLabel( + '<h4>Top Up Standby and Warm Up Settings</h4>', self, + alignment=Qt.AlignCenter) + + pvname = self._inj_prefix.substitute(propty='TopUpPUStandbyEnbl-Sel') + self._sb_tupuenb = PyDMStateButton(self, pvname) + self._led_tupuenb = SiriusLedState( + self, pvname.substitute(propty_suffix='Sts')) + + pvname = self._inj_prefix.substitute(propty='TopUpPUWarmUpTime-SP') + self._sb_tuputim = SiriusSpinbox(self, pvname) + self._lb_tuputim = SiriusLabel( + self, pvname.substitute(propty_suffix='RB'), keep_unit=True) + self._lb_tuputim.showUnits = True + + pvname = self._inj_prefix.substitute(propty='TopUpLIWarmUpEnbl-Sel') + self._sb_tulienb = PyDMStateButton(self, pvname) + self._led_tulienb = SiriusLedState( + self, pvname.substitute(propty_suffix='Sts')) + + pvname = self._inj_prefix.substitute(propty='TopUpLIWarmUpTime-SP') + self._sb_tulitim = SiriusSpinbox(self, pvname) + self._lb_tulitim = SiriusLabel( + self, pvname.substitute(propty_suffix='RB'), keep_unit=True) + self._lb_tulitim.showUnits = True + + pvname = self._inj_prefix.substitute(propty='TopUpBOPSStandbyEnbl-Sel') + self._sb_tubopsenb = PyDMStateButton(self, pvname) + self._led_tubopsenb = SiriusLedState( + self, pvname.substitute(propty_suffix='Sts')) + + pvname = self._inj_prefix.substitute(propty='TopUpBOPSWarmUpTime-SP') + self._sb_tubopstim = SiriusSpinbox(self, pvname) + self._lb_tubopstim = SiriusLabel( + self, pvname.substitute(propty_suffix='RB'), keep_unit=True) + self._lb_tubopstim.showUnits = True + + pvname = self._inj_prefix.substitute(propty='TopUpBORFStandbyEnbl-Sel') + self._sb_tuborfenb = PyDMStateButton(self, pvname) + self._led_tuborfenb = SiriusLedState( + self, pvname.substitute(propty_suffix='Sts')) + + pvname = self._inj_prefix.substitute(propty='TopUpBORFWarmUpTime-SP') + self._sb_tuborftim = SiriusSpinbox(self, pvname) + self._lb_tuborftim = SiriusLabel( + self, pvname.substitute(propty_suffix='RB'), keep_unit=True) + self._lb_tuborftim.showUnits = True + + lay = QGridLayout(self) + lay.addWidget(title, 0, 0, 1, 5) + lay.addWidget(QLabel('Enable State'), 1, 1, 1, 2) + lay.addWidget(QLabel('Warm Up Time'), 1, 3, 1, 2) + lay.addWidget(QLabel('AS PU Standby'), 2, 0) + lay.addWidget(self._sb_tupuenb, 2, 1) + lay.addWidget(self._led_tupuenb, 2, 2) + lay.addWidget(self._sb_tuputim, 2, 3) + lay.addWidget(self._lb_tuputim, 2, 4) + lay.addWidget(QLabel('LI PU/RF Warm Up'), 3, 0) + lay.addWidget(self._sb_tulienb, 3, 1) + lay.addWidget(self._led_tulienb, 3, 2) + lay.addWidget(self._sb_tulitim, 3, 3) + lay.addWidget(self._lb_tulitim, 3, 4) + lay.addWidget(QLabel('BO PS Standby'), 4, 0) + lay.addWidget(self._sb_tubopsenb, 4, 1) + lay.addWidget(self._led_tubopsenb, 4, 2) + lay.addWidget(self._sb_tubopstim, 4, 3) + lay.addWidget(self._lb_tubopstim, 4, 4) + lay.addWidget(QLabel('BO RF Standby'), 5, 0) + lay.addWidget(self._sb_tuborfenb, 5, 1) + lay.addWidget(self._led_tuborfenb, 5, 2) + lay.addWidget(self._sb_tuborftim, 5, 3) + lay.addWidget(self._lb_tuborftim, 5, 4) + + self.setStyleSheet('QLabel{qproperty-alignment: AlignCenter;}')
+ + + +
+[docs] +class PUModeSettingsDialog(SiriusDialog): + """PU Mode settings dialog.""" + + def __init__(self, parent=None, device='', prefix=''): + """Init.""" + super().__init__(parent) + self._prefix = prefix + self._inj_dev = SiriusPVName(device) + self._inj_prefix = device.substitute(prefix=prefix) + self.setObjectName('ASApp') + self.setWindowTitle('Injection Controls - PU Mode Settings') + self._setupUi() + self.setFocus(True) + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + title = QLabel( + '<h4>PU Mode Settings</h4>', self, + alignment=Qt.AlignCenter) + + pvname = self._inj_prefix.substitute(propty='PUModeDeltaPosAng-SP') + self._sb_dltposang = SiriusSpinbox(self, pvname) + self._lb_dltposang = SiriusLabel( + self, pvname.substitute(propty_suffix='RB'), keep_unit=True) + self._lb_dltposang.showUnits = True + + pvname = self._inj_prefix.substitute(propty='PUModeDpKckrDlyRef-SP') + self._sb_pudlyref = SiriusSpinbox(self, pvname) + self._lb_pudlyref = SiriusLabel( + self, pvname.substitute(propty_suffix='RB'), keep_unit=True) + self._lb_pudlyref.showUnits = True + + pvname = self._inj_prefix.substitute(propty='PUModeDpKckrKick-SP') + self._sb_pukick = SiriusSpinbox(self, pvname) + self._lb_pukick = SiriusLabel( + self, pvname.substitute(propty_suffix='RB'), keep_unit=True) + self._lb_pukick.showUnits = True + + lay = QGridLayout(self) + lay.addWidget(title, 0, 0, 1, 5) + lay.addWidget(QLabel('Delta PosAng'), 1, 0) + lay.addWidget(self._sb_dltposang, 1, 1) + lay.addWidget(self._lb_dltposang, 1, 2) + lay.addWidget(QLabel('DpKckr Delay Ref.'), 2, 0) + lay.addWidget(self._sb_pudlyref, 2, 1) + lay.addWidget(self._lb_pudlyref, 2, 2) + lay.addWidget(QLabel('DpKckr Kick'), 3, 0) + lay.addWidget(self._sb_pukick, 3, 1) + lay.addWidget(self._lb_pukick, 3, 2) + + self.setStyleSheet('QLabel{qproperty-alignment: AlignCenter;}')
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_injection/killbeam_widgets.html b/_modules/siriushla/as_ap_injection/killbeam_widgets.html new file mode 100644 index 000000000..42aaa64fb --- /dev/null +++ b/_modules/siriushla/as_ap_injection/killbeam_widgets.html @@ -0,0 +1,219 @@ + + + + + + siriushla.as_ap_injection.killbeam_widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_injection.killbeam_widgets

+"""RF Kill Beam widgets."""
+
+import qtawesome as qta
+
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.namesys import SiriusPVName
+from siriuspy.injctrl.csdev import Const as _Const
+
+from ..widgets import SiriusConnectionSignal as _ConnSignal
+
+
+
+[docs] +class RFKillBeamButton(PyDMPushButton): + """Button to kill beam with RF.""" + + def __init__(self, parent=None, prefix=''): + + self.prefix = prefix + self._inj_prefix = SiriusPVName( + 'AS-Glob:AP-InjCtrl').substitute(prefix=prefix) + + super().__init__( + parent=parent, + init_channel=self._inj_prefix.substitute(propty='RFKillBeam-Cmd'), + icon=qta.icon('mdi.skull-outline'), label='', + pressValue=1) + self.initial_icon = self.icon() + + self.showConfirmDialog = True + self.confirmMessage = \ + 'This action will kill the stored beam.\n' \ + 'Are you sure you want to proceed?' + + self.setObjectName('rfkill') + self.setStyleSheet(""" + #rfkill{ + min-width:30px; max-width:30px; + min-height:30px; max-height:30px; + icon-size:25px;}""") + + self._pv_mon = _ConnSignal( + self._inj_prefix.substitute(propty='RFKillBeam-Mon')) + self._pv_mon.new_value_signal[int].connect(self._handle_enable_state) + + def _handle_enable_state(self, value): + if value == _Const.RFKillBeamMon.Idle: + self.setIcon(self.initial_icon) + self.setEnabled(True) + elif value == _Const.RFKillBeamMon.Kill: + self.setEnabled(False) + self.setIcon( + qta.icon('fa5s.spinner', animation=qta.Spin(self))) + else: + raise ValueError('strange RFKillBeam-Mon value')
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_injection/main.html b/_modules/siriushla/as_ap_injection/main.html new file mode 100644 index 000000000..b6a293636 --- /dev/null +++ b/_modules/siriushla/as_ap_injection/main.html @@ -0,0 +1,879 @@ + + + + + + siriushla.as_ap_injection.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_injection.main

+"""InjCtrl MainWindow."""
+
+from qtpy.QtCore import Qt, Slot, Signal, QEvent
+from qtpy.QtWidgets import QWidget, QLabel, QGridLayout, QGroupBox, \
+    QHBoxLayout, QVBoxLayout, QSizePolicy as QSzPlcy, QPushButton
+
+import qtawesome as qta
+
+from siriuspy.namesys import SiriusPVName
+from siriuspy.injctrl.csdev import Const as _Const
+
+from ..util import get_appropriate_color, connect_newprocess, connect_window
+from ..widgets import SiriusMainWindow, SiriusEnumComboBox, \
+    PyDMLogLabel, PyDMStateButton, SiriusSpinbox, \
+    SiriusConnectionSignal, SiriusLedState, SiriusLabel
+from ..as_ti_control import BucketList, EVGInjectionLed, EVGInjectionButton
+from ..as_ap_machshift import MachShiftLabel
+from .widgets import InjDiagLed, MonitorSummaryWidget, \
+    InjSysStbyControlWidget, ClockLabel, TaskStatusLabel
+from .auxiliary_dialogs import BiasFBDetailDialog, TopUpSettingsDialog, \
+    PUModeSettingsDialog
+
+
+
+[docs] +class InjCtrlWindow(SiriusMainWindow): + """InjCtrl Main Window.""" + + showMonitor = Signal() + showStatus = Signal() + showEgun = Signal() + + def __init__(self, parent=None, prefix=''): + """Init.""" + super().__init__(parent) + self._prefix = prefix + self._inj_dev = SiriusPVName('AS-Glob:AP-InjCtrl') + self._inj_prefix = self._inj_dev.substitute(prefix=prefix) + self.setWindowTitle('Injection Controls') + self.setObjectName('ASApp') + self.setWindowIcon( + qta.icon('fa5s.syringe', color=get_appropriate_color('AS'))) + + self._setupUi() + + self.setFocus(True) + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + self.title = QLabel( + '<h3>Injection Control<h3>', self, alignment=Qt.AlignCenter) + self.title.setStyleSheet('QLabel{max-height:1.6em;}') + + self.wid_comm = self._setupMainBarWidget() + self.wid_comm.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Fixed) + + self.wid_sett = self._setupSettingsWidget() + self.wid_sett.setSizePolicy( + QSzPlcy.Preferred, QSzPlcy.MinimumExpanding) + + self.wid_mon = self._setupMonitorWidget() + self.wid_log = self._setupLogWidget() + wid_row = QWidget() + wid_row.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Fixed) + hbox_row = QHBoxLayout(wid_row) + hbox_row.setContentsMargins(0, 0, 0, 0) + hbox_row.setStretch(0, 3) + hbox_row.setStretch(1, 5) + hbox_row.addWidget(self.wid_mon) + hbox_row.addWidget(self.wid_log) + + wid = QWidget(self) + lay = QVBoxLayout(wid) + lay.addWidget(self.title) + lay.addWidget(self.wid_comm) + lay.addWidget(self.wid_comm) + lay.addWidget(self.wid_sett) + lay.addWidget(wid_row) + lay.setStretch(1, 1) + lay.setStretch(2, 3) + lay.setStretch(3, 2) + self.setCentralWidget(wid) + + self._ch_injmode = SiriusConnectionSignal( + self._inj_prefix.substitute(propty='Mode-Sel')) + self._ch_injmode.new_value_signal[int].connect( + self._handle_injmode_settings_vis) + + # connect window signals + connect_newprocess( + self, 'sirius-hla-as-ap-monitor.py', + parent=self, signal=self.showMonitor) + connect_newprocess( + self, 'sirius-hla-si-ap-genstatus.py', + parent=self, signal=self.showStatus) + connect_newprocess( + self, 'sirius-hla-li-eg-control.py', + parent=self, signal=self.showEgun) + + def _setupMainBarWidget(self): + # Shift + machshift_pvname = SiriusPVName( + 'AS-Glob:AP-MachShift:Mode-Sel').substitute(prefix=self._prefix) + self._cb_shift = SiriusEnumComboBox(self, machshift_pvname) + self._lb_shift = MachShiftLabel(self, prefix=self._prefix) + self._lb_shift.setStyleSheet( + 'QLabel{max-height: 2em; min-width: 7em;}') + self.wid_shift = QGroupBox('Mach.Shift', self) + lay_shift = QVBoxLayout(self.wid_shift) + lay_shift.addWidget(self._cb_shift) + lay_shift.addWidget(self._lb_shift) + + # Injection System + self.wid_is_summ = InjSysStbyControlWidget(self, is_summary=True) + self.wid_injsys = QGroupBox('Inj.System', self) + lay_injsys = QGridLayout(self.wid_injsys) + lay_injsys.setContentsMargins(0, 0, 0, 0) + lay_injsys.addWidget(self.wid_is_summ, 0, 0) + self.wid_is_full = InjSysStbyControlWidget( + self, is_summary=False, handler=self.wid_is_summ._handler + ) + self.wid_is_full.setVisible(False) + lay_injsys.addWidget(self.wid_is_full, 0, 0) + self._icon_expd = qta.icon('fa5s.plus') + self._icon_comp = qta.icon('fa5s.minus') + self.bt_is_tgl = QPushButton(self._icon_expd, '', self) + self.bt_is_tgl.clicked.connect(self._handle_injsys_details_vis) + self.bt_is_tgl.setObjectName('bt') + self.bt_is_tgl.setStyleSheet(""" + #bt{ + min-width: 0.8em; max-width: 0.8em; + min-height: 0.8em; max-height: 0.8em; + icon-size:12px;} + """) + lay_injsys.addWidget( + self.bt_is_tgl, 0, 1, alignment=Qt.AlignRight | Qt.AlignBottom) + + # EGun + egun_dev = SiriusPVName( + 'LI-01:EG-TriggerPS').substitute(prefix=self._prefix) + self._sb_eguntrg = PyDMStateButton( + self, egun_dev.substitute(propty_name='enable')) + self._led_eguntrg = SiriusLedState( + self, egun_dev.substitute(propty_name='enablereal')) + self._led_eguntrg.setStyleSheet( + 'QLed{min-width: 1.29em; max-width: 1.29em;}') + self.wid_egun = self._create_groupwidget( + 'EGun Trig.', [self._sb_eguntrg, ], [self._led_eguntrg, ]) + + # Injection + self._pb_tiinj = EVGInjectionButton(self, self._prefix) + self._pb_topup = PyDMStateButton( + self, init_channel=self._inj_prefix.substitute( + propty='TopUpState-Sel')) + self._pb_topup.setVisible(False) + self._pb_accum = PyDMStateButton( + self, init_channel=self._inj_prefix.substitute( + propty='AccumState-Sel')) + self._pb_accum.setVisible(False) + self._led_injti = EVGInjectionLed(self, self._prefix) + self._lb_injcnt = SiriusLabel(self) + self._lb_injcnt.setToolTip( + 'Count injection pulses when Egun Trigger is enabled.') + ch_injcnt = SiriusPVName( + 'AS-Glob:AP-CurrInfo:InjCount-Mon').substitute(prefix=self._prefix) + self._lb_injcnt.channel = ch_injcnt + self._lb_injcnt.setStyleSheet('QLabel{max-width: 3.5em;}') + hbox_injsts = QHBoxLayout() + hbox_injsts.setContentsMargins(0, 0, 0, 0) + hbox_injsts.addWidget(self._led_injti) + hbox_injsts.addWidget(self._lb_injcnt) + self.wid_inj = QGroupBox('Injection', self) + lay_inj = QGridLayout(self.wid_inj) + lay_inj.setAlignment(Qt.AlignCenter) + lay_inj.addWidget(self._pb_tiinj, 0, 0) + lay_inj.addWidget(self._pb_topup, 0, 0) + lay_inj.addWidget(self._pb_accum, 0, 0) + lay_inj.addLayout(hbox_injsts, 1, 0) + + # Current + curr_pvname = SiriusPVName( + 'SI-Glob:AP-CurrInfo:Current-Mon').substitute(prefix=self._prefix) + self._lb_curr = SiriusLabel(self, curr_pvname) + self._lb_curr.showUnits = True + self._lb_curr.setStyleSheet(""" + QLabel{ + font-size: 18pt; qproperty-alignment: AlignCenter; + min-width: 5.5em; max-width: 5.5em; + }""") + self.wid_curr = QGroupBox('Current', self) + lay_curr = QHBoxLayout(self.wid_curr) + lay_curr.addWidget(self._lb_curr) + + # TopUp status + self._lb_tusts = SiriusLabel( + self, self._inj_prefix.substitute(propty='TopUpState-Sts')) + self._lb_tusts.setAlignment(Qt.AlignCenter) + self._lb_tusts.setStyleSheet('QLabel{max-height:2em;}') + self._ld_tunow = QLabel( + 'Now:', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self._lb_tunow = ClockLabel(self) + self._lb_tunow.setStyleSheet('QLabel{max-height:2em;}') + self._ld_tunxt = QLabel( + 'Next:', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self._lb_tunxt = SiriusLabel( + self, self._inj_prefix.substitute(propty='TopUpNextInj-Mon')) + self._lb_tunxt.displayFormat = SiriusLabel.DisplayFormat.Time + self._lb_tunxt.setAlignment(Qt.AlignCenter) + self._lb_tunxt.setStyleSheet('QLabel{max-height:2em;}') + self.wid_tusts = QGroupBox('Top-up status') + self.wid_tusts.setVisible(False) + lay_tusts = QGridLayout(self.wid_tusts) + lay_tusts.addWidget(self._lb_tusts, 0, 0, 1, 2) + lay_tusts.addWidget(self._ld_tunow, 1, 0) + lay_tusts.addWidget(self._lb_tunow, 1, 1) + lay_tusts.addWidget(self._ld_tunxt, 2, 0) + lay_tusts.addWidget(self._lb_tunxt, 2, 1) + + # Accum status + self._lb_acsts = SiriusLabel( + self, self._inj_prefix.substitute(propty='AccumState-Sts')) + self._lb_tusts.setAlignment(Qt.AlignCenter) + self._lb_tusts.setStyleSheet('QLabel{max-height:2em;}') + self.wid_acsts = QGroupBox('Accum status') + self.wid_acsts.setVisible(False) + lay_acsts = QGridLayout(self.wid_acsts) + lay_acsts.addWidget(self._lb_acsts, 0, 0) + + wid = QWidget() + lay = QGridLayout(wid) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(self.wid_shift, 0, 0) + lay.addWidget(self.wid_injsys, 0, 1) + lay.addWidget(self.wid_egun, 0, 2) + lay.addWidget(self.wid_inj, 0, 3) + lay.addWidget(self.wid_tusts, 0, 4) + lay.addWidget(self.wid_acsts, 0, 4) + lay.addWidget(self.wid_curr, 0, 5) + lay.setColumnStretch(0, 3) + lay.setColumnStretch(1, 2) + lay.setColumnStretch(2, 2) + lay.setColumnStretch(3, 2) + lay.setColumnStretch(4, 4) + lay.setColumnStretch(5, 3) + wid.setStyleSheet('.QLabel{min-height: 1em; max-height: 1em;}') + return wid + + def _setupSettingsWidget(self): + # group of labels to set the same stylesheet + labelsdesc, labelsmon = list(), list() + + # Mode + self._ld_injmode = QLabel('Mode', self) + labelsdesc.append(self._ld_injmode) + self._cb_injmode = SiriusEnumComboBox( + self, self._inj_prefix.substitute(propty='Mode-Sel')) + self._lb_injmode = SiriusLabel( + self, self._inj_prefix.substitute(propty='Mode-Sts')) + self._lb_injmode.showUnits = True + labelsmon.append(self._lb_injmode) + + # Accum Period + self._ld_accumper = QLabel('Accum. Period', self) + labelsdesc.append(self._ld_accumper) + self._sp_accumper = SiriusSpinbox( + self, self._inj_prefix.substitute(propty='AccumPeriod-SP')) + self._lb_accumper = SiriusLabel( + self, self._inj_prefix.substitute(propty='AccumPeriod-RB')) + self._lb_accumper.showUnits = True + labelsmon.append(self._lb_accumper) + self._ld_accumper.setVisible(False) + self._sp_accumper.setVisible(False) + self._lb_accumper.setVisible(False) + + # Target current + self._ld_currtgt = QLabel('Target Curr.', self) + labelsdesc.append(self._ld_currtgt) + self._sb_currtgt = SiriusSpinbox( + self, self._inj_prefix.substitute(propty='TargetCurrent-SP')) + self._lb_currtgt = SiriusLabel( + self, self._inj_prefix.substitute(propty='TargetCurrent-RB'), + keep_unit=True) + self._lb_currtgt.showUnits = True + labelsmon.append(self._lb_currtgt) + + self._pb_show_topup = QPushButton('v', self) + self._pb_show_topup.setToolTip('Show TopUp Configurations.') + self._pb_show_topup.clicked.connect(self._handle_topup_details_vis) + self._pb_show_topup.setStyleSheet('QPushButton{max-width: 0.8em;}') + + # mode specific configurations + self.wid_tudtls = self._setupTopUpModeWidget() + self.wid_tudtls.setVisible(False) + + # Mon + self._ld_injset = QLabel('Setup ok', self) + labelsdesc.append(self._ld_injset) + self._led_injset = InjDiagLed(self) + + # Type + self._ld_injtype = QLabel('Type', self) + labelsdesc.append(self._ld_injtype) + self._cb_injtype = SiriusEnumComboBox( + self, self._inj_prefix.substitute(propty='Type-Sel')) + self._lb_injtype = SiriusLabel( + self, self._inj_prefix.substitute(propty='Type-Sts')) + labelsmon.append(self._lb_injtype) + self._lb_injtype_mon = SiriusLabel( + self, self._inj_prefix.substitute(propty='Type-Mon')) + labelsmon.append(self._lb_injtype_mon) + self._ch_injtype = SiriusConnectionSignal( + self._inj_prefix.substitute(propty='Type-Sel')) + self._ch_injtype.new_value_signal[int].connect( + self._handle_injtype_settings_vis) + self._ind_injtype_mon = TaskStatusLabel( + self, self._inj_prefix.substitute(propty='TypeCmdSts-Mon')) + + # PUMode + self._ld_pumode = QLabel('PU Mode', self) + labelsdesc.append(self._ld_pumode) + self._cb_pumode = SiriusEnumComboBox( + self, self._inj_prefix.substitute(propty='PUMode-Sel')) + self._lb_pumode = SiriusLabel( + self, self._inj_prefix.substitute(propty='PUMode-Sts')) + labelsmon.append(self._lb_pumode) + self._lb_pumode_mon = SiriusLabel( + self, self._inj_prefix.substitute(propty='PUMode-Mon')) + labelsmon.append(self._lb_pumode_mon) + self._ch_pumode = SiriusConnectionSignal( + self._inj_prefix.substitute(propty='PUMode-Sel')) + self._ind_pumode_mon = TaskStatusLabel( + self, self._inj_prefix.substitute(propty='PUModeCmdSts-Mon')) + self._pb_pumdt = QPushButton(qta.icon('fa5s.ellipsis-v'), '', self) + self._pb_pumdt.setObjectName('btn') + self._pb_pumdt.setStyleSheet( + '#btn{min-width:18px;max-width:18px;icon-size:20px;}') + connect_window( + self._pb_pumdt, PUModeSettingsDialog, self, + device=self._inj_dev, prefix=self._prefix) + + # Single bunch bias voltage + self._ld_sbbias = QLabel('SB Bias Voltage', self) + labelsdesc.append(self._ld_sbbias) + self._sb_sbbias = SiriusSpinbox( + self, self._inj_prefix.substitute(propty='SglBunBiasVolt-SP')) + self._lb_sbbias = SiriusLabel( + self, self._inj_prefix.substitute(propty='SglBunBiasVolt-RB'), + keep_unit=True) + self._lb_sbbias.showUnits = True + labelsmon.append(self._lb_sbbias) + self._ld_sbbias.setVisible(False) + self._sb_sbbias.setVisible(False) + self._lb_sbbias.setVisible(False) + + # Multi bunch bias voltage + self._ld_mbbias = QLabel('MB Bias Volt.', self) + labelsdesc.append(self._ld_mbbias) + self._sb_mbbias = SiriusSpinbox( + self, self._inj_prefix.substitute(propty='MultBunBiasVolt-SP')) + self._lb_mbbias = SiriusLabel( + self, self._inj_prefix.substitute(propty='MultBunBiasVolt-RB'), + keep_unit=True) + self._lb_mbbias.showUnits = True + labelsmon.append(self._lb_mbbias) + + # bias voltage mon + ch_bias_mon = SiriusPVName('LI-01:EG-BiasPS').substitute( + prefix=self._prefix, propty_name='voltinsoft') + self._lb_bias_mon = SiriusLabel( + self, ch_bias_mon, keep_unit=True) + self._lb_bias_mon.showUnits = True + labelsmon.append(self._lb_bias_mon) + self._ind_bias_mon = TaskStatusLabel( + self, self._inj_prefix.substitute(propty='BiasVoltCmdSts-Mon')) + + # Filament current op value + self._ld_filaopcurr = QLabel('Fila.Op. Curr.', self) + labelsdesc.append(self._ld_filaopcurr) + self._sb_filaopcurr = SiriusSpinbox( + self, self._inj_prefix.substitute(propty='FilaOpCurr-SP')) + self._lb_filaopcurr = SiriusLabel( + self, self._inj_prefix.substitute(propty='FilaOpCurr-RB'), + keep_unit=True) + self._lb_filaopcurr.showUnits = True + labelsmon.append(self._lb_filaopcurr) + ch_filacurr_mon = SiriusPVName('LI-01:EG-FilaPS').substitute( + prefix=self._prefix, propty_name='currentinsoft') + self._lb_filaopcurr_mon = SiriusLabel( + self, ch_filacurr_mon, keep_unit=True) + self._lb_filaopcurr_mon.showUnits = True + labelsmon.append(self._lb_filaopcurr_mon) + self._ind_filaopcurr_mon = TaskStatusLabel( + self, self._inj_prefix.substitute(propty='FilaOpCurrCmdSts-Mon')) + + # High voltage op value + self._ld_hvopvolt = QLabel('HV.Op. Volt.', self) + labelsdesc.append(self._ld_hvopvolt) + self._sb_hvopvolt = SiriusSpinbox( + self, self._inj_prefix.substitute(propty='HVOpVolt-SP')) + self._lb_hvopvolt = SiriusLabel( + self, self._inj_prefix.substitute(propty='HVOpVolt-RB'), + keep_unit=True) + self._lb_hvopvolt.showUnits = True + labelsmon.append(self._lb_hvopvolt) + ch_hvvolt_mon = SiriusPVName('LI-01:EG-HVPS').substitute( + prefix=self._prefix, propty_name='voltinsoft') + self._lb_hvopvolt_mon = SiriusLabel( + self, ch_hvvolt_mon, keep_unit=True) + self._lb_hvopvolt_mon.showUnits = True + labelsmon.append(self._lb_hvopvolt_mon) + self._ind_hvopvolt_mon = TaskStatusLabel( + self, self._inj_prefix.substitute(propty='HVOpVoltCmdSts-Mon')) + + # header + ld_sp = QLabel('<h4>SP</h4>', self, alignment=Qt.AlignCenter) + ld_rb = QLabel('<h4>RB</h4>', self, alignment=Qt.AlignCenter) + ld_mon = QLabel('<h4>Mon</h4>', self, alignment=Qt.AlignCenter) + + # Bucket list + self._wid_bl = BucketList( + self, prefix=self._prefix, min_size=15, show_graph=True) + self._wid_bl.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.MinimumExpanding) + + wid1 = QWidget() + wid1.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Fixed) + glay1 = QGridLayout(wid1) + glay1.setAlignment(Qt.AlignTop) + glay1.addWidget(self._ld_injset, 0, 0) + glay1.addWidget(self._led_injset, 0, 1) + glay1.addWidget(self._ld_currtgt, 1, 0) + glay1.addWidget(self._sb_currtgt, 1, 1) + glay1.addWidget(self._lb_currtgt, 1, 2) + glay1.addWidget(self._ld_injmode, 2, 0) + glay1.addWidget(self._cb_injmode, 2, 1) + glay1.addWidget(self._lb_injmode, 2, 2) + glay1.addWidget(self._pb_show_topup, 2, 3) + glay1.addWidget(self._ld_accumper, 3, 0) + glay1.addWidget(self._sp_accumper, 3, 1) + glay1.addWidget(self._lb_accumper, 3, 2) + glay1.addWidget(self.wid_tudtls, 4, 0, 2, 4) + glay1.setColumnStretch(0, 5) + glay1.setColumnStretch(1, 3) + glay1.setColumnStretch(2, 3) + glay1.setColumnStretch(3, 1) + + wid2 = QWidget() + wid2.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Fixed) + glay2 = QGridLayout(wid2) + glay2.setAlignment(Qt.AlignTop) + glay2.addWidget(ld_sp, 0, 1) + glay2.addWidget(ld_rb, 0, 2) + glay2.addWidget(ld_mon, 0, 3) + glay2.addWidget(self._ld_injtype, 1, 0) + glay2.addWidget(self._cb_injtype, 1, 1) + glay2.addWidget(self._lb_injtype, 1, 2) + glay2.addWidget(self._lb_injtype_mon, 1, 3) + glay2.addWidget(self._ind_injtype_mon, 1, 5) + glay2.addWidget(self._ld_pumode, 2, 0) + glay2.addWidget(self._cb_pumode, 2, 1) + glay2.addWidget(self._lb_pumode, 2, 2) + glay2.addWidget(self._lb_pumode_mon, 2, 3) + glay2.addWidget(self._pb_pumdt, 2, 4) + glay2.addWidget(self._ind_pumode_mon, 2, 5) + glay2.addWidget(self._ld_sbbias, 3, 0) + glay2.addWidget(self._sb_sbbias, 3, 1) + glay2.addWidget(self._lb_sbbias, 3, 2) + glay2.addWidget(self._ld_mbbias, 3, 0) + glay2.addWidget(self._sb_mbbias, 3, 1) + glay2.addWidget(self._lb_mbbias, 3, 2) + glay2.addWidget(self._lb_bias_mon, 3, 3) + glay2.addWidget(self._ind_bias_mon, 3, 4) + glay2.addWidget(self._ld_filaopcurr, 4, 0) + glay2.addWidget(self._sb_filaopcurr, 4, 1) + glay2.addWidget(self._lb_filaopcurr, 4, 2) + glay2.addWidget(self._lb_filaopcurr_mon, 4, 3) + glay2.addWidget(self._ind_filaopcurr_mon, 4, 5) + glay2.addWidget(self._ld_hvopvolt, 5, 0) + glay2.addWidget(self._sb_hvopvolt, 5, 1) + glay2.addWidget(self._lb_hvopvolt, 5, 2) + glay2.addWidget(self._lb_hvopvolt_mon, 5, 3) + glay2.addWidget(self._ind_hvopvolt_mon, 5, 5) + glay2.setColumnStretch(0, 5) + glay2.setColumnStretch(1, 3) + glay2.setColumnStretch(2, 3) + glay2.setColumnStretch(3, 3) + glay2.setColumnStretch(4, 1) + glay2.setColumnStretch(5, 1) + + wid = QGroupBox('Settings') + lay = QGridLayout(wid) + lay.addWidget(wid1, 0, 0, alignment=Qt.AlignTop) + lay.addWidget(wid2, 0, 1, alignment=Qt.AlignTop) + lay.addWidget(self._wid_bl, 1, 0, 1, 2) + lay.setColumnStretch(0, 3) + lay.setColumnStretch(1, 4) + + for lbl in labelsdesc: + lbl.setStyleSheet(""" + QLabel{ + min-width: 7em; max-width: 7em; min-height: 1.5em; + qproperty-alignment: 'AlignRight | AlignVCenter'; + }""") + for lbl in labelsmon: + lbl.setStyleSheet("SiriusLabel{qproperty-alignment: AlignCenter;}") + + return wid + + def _setupTopUpModeWidget(self): + self._ld_tuperd = QLabel('TopUp Period', self) + self._sb_tuperd = SiriusSpinbox( + self, self._inj_prefix.substitute(propty='TopUpPeriod-SP')) + self._lb_tuperd = SiriusLabel( + self, self._inj_prefix.substitute(propty='TopUpPeriod-RB'), + keep_unit=True) + self._lb_tuperd.showUnits = True + + self._ld_tuoffs = QLabel('Head Start Time', self) + pvname = self._inj_prefix.substitute(propty='TopUpHeadStartTime-SP') + self._sb_tuoffs = SiriusSpinbox(self, pvname) + self._lb_tuoffs = SiriusLabel( + self, pvname.substitute(propty_suffix='RB'), keep_unit=True) + self._lb_tuoffs.showUnits = True + + self._ld_tunrpu = QLabel('Nr.Pulses', self) + self._sb_tunrpu = SiriusSpinbox( + self, self._inj_prefix.substitute(propty='TopUpNrPulses-SP')) + self._lb_tunrpu = SiriusLabel( + self, self._inj_prefix.substitute(propty='TopUpNrPulses-RB')) + self._lb_tunrpu.showUnits = True + + self._ld_tubiasfb = QLabel('Bias FB', self) + pvname = self._inj_prefix.substitute(propty='BiasFBLoopState-Sel') + self._sb_tubiasfb = PyDMStateButton(self, pvname) + self._lb_tubiasfb = SiriusLedState( + self, pvname.substitute(propty_suffix='Sts')) + self._pb_biasfb = QPushButton(qta.icon('fa5s.ellipsis-v'), '', self) + self._pb_biasfb.setObjectName('btn') + self._pb_biasfb.setStyleSheet( + '#btn{min-width:18px;max-width:18px;icon-size:20px;}') + connect_window( + self._pb_biasfb, BiasFBDetailDialog, self, + device=self._inj_dev, prefix=self._prefix) + + self._pb_tuset = QPushButton( + qta.icon('fa5s.ellipsis-h'), ' Standby && warm up settings', self) + self._pb_tuset.setObjectName('btn') + self._pb_tuset.setStyleSheet('#btn{icon-size:20px;}') + connect_window( + self._pb_tuset, TopUpSettingsDialog, self, + device=self._inj_dev, prefix=self._prefix) + + wid = QWidget() + lay = QGridLayout(wid) + lay.setContentsMargins(0, 6, 0, 0) + lay.setAlignment(Qt.AlignTop) + lay.addWidget(self._ld_tuperd, 0, 0) + lay.addWidget(self._sb_tuperd, 0, 1) + lay.addWidget(self._lb_tuperd, 0, 2) + lay.addWidget(self._ld_tuoffs, 1, 0) + lay.addWidget(self._sb_tuoffs, 1, 1) + lay.addWidget(self._lb_tuoffs, 1, 2) + lay.addWidget(self._ld_tunrpu, 2, 0) + lay.addWidget(self._sb_tunrpu, 2, 1) + lay.addWidget(self._lb_tunrpu, 2, 2) + lay.addWidget(self._ld_tubiasfb, 3, 0) + lay.addWidget(self._sb_tubiasfb, 3, 1) + lay.addWidget(self._lb_tubiasfb, 3, 2) + lay.addWidget(self._pb_biasfb, 3, 3) + lay.addWidget(self._pb_tuset, 4, 0, 1, 4) + lay.setColumnStretch(0, 3) + lay.setColumnStretch(1, 2) + lay.setColumnStretch(2, 2) + + wid.setStyleSheet(""" + .QLabel{ + min-width: 7em; max-width: 7em; min-height: 1.5em; + qproperty-alignment: 'AlignRight | AlignVCenter'; + } + SiriusLabel{ + qproperty-alignment: AlignCenter; + }""") + return wid + + def _setupLogWidget(self): + self._log = PyDMLogLabel( + self, self._inj_prefix.substitute(propty='Log-Mon'), + ['Remaining time', ]) + + wid = QGroupBox('Log') + lay = QHBoxLayout(wid) + lay.addWidget(self._log) + return wid + + def _setupMonitorWidget(self): + self.wid_mon = MonitorSummaryWidget(self) + + wid = QWidget(self) + lay = QGridLayout(wid) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(self.wid_mon, 0, 0) + return wid + + # ---- auxiliary commands ---- + + @Slot(int) + def _handle_injtype_settings_vis(self, new_type): + is_sb = new_type == _Const.InjType.SingleBunch + self._ld_sbbias.setVisible(is_sb) + self._sb_sbbias.setVisible(is_sb) + self._lb_sbbias.setVisible(is_sb) + self._ld_mbbias.setVisible(not is_sb) + self._sb_mbbias.setVisible(not is_sb) + self._lb_mbbias.setVisible(not is_sb) + self.centralWidget().adjustSize() + self.adjustSize() + + @Slot(int) + def _handle_injmode_settings_vis(self, new_mode): + is_topup = new_mode == _Const.InjMode.TopUp + is_accum = new_mode == _Const.InjMode.Accum + + self._handle_topup_details_vis(False, is_topup=is_topup) + self.wid_tusts.setVisible(is_topup) + self.wid_acsts.setVisible(is_accum) + + self._pb_topup.setVisible(is_topup) + self._pb_accum.setVisible(is_accum) + self._pb_tiinj.setVisible(not is_topup and not is_accum) + + self._ld_accumper.setVisible(is_accum) + self._sp_accumper.setVisible(is_accum) + self._lb_accumper.setVisible(is_accum) + + def _handle_topup_details_vis(self, val, is_topup=None): + _ = val + if is_topup is None: + show = self.wid_tudtls.isHidden() + else: + show = is_topup + self.wid_tudtls.setVisible(show) + text = '^' if show else 'v' + tooltip = ('Hide' if show else 'Show')+' TopUp Configurations.' + self._pb_show_topup.setText(text) + self._pb_show_topup.setToolTip(tooltip) + + def _handle_injsys_details_vis(self): + exp = self.wid_is_summ.isVisible() + icon = self._icon_comp if exp else self._icon_expd + self.sender().setIcon(icon) + self.wid_is_summ.setVisible(not exp) + self.wid_is_full.setVisible(exp) + self.centralWidget().adjustSize() + self.adjustSize() + + def _create_groupwidget(self, title, sp_wids, rb_wids, aux_wids=None): + hbox_sp = QHBoxLayout() + hbox_sp.setAlignment(Qt.AlignCenter) + hbox_sp.setContentsMargins(0, 0, 0, 0) + for wid in sp_wids: + hbox_sp.addWidget(wid) + + hbox_rb = QHBoxLayout() + hbox_rb.setAlignment(Qt.AlignCenter) + hbox_rb.setContentsMargins(0, 0, 0, 0) + for wid in rb_wids: + hbox_rb.addWidget(wid) + + box = QGroupBox(title, self) if title else QWidget(self) + lay = QVBoxLayout(box) + lay.setAlignment(Qt.AlignCenter) + if not isinstance(box, QGroupBox): + lay.setContentsMargins(0, 0, 0, 0) + lay.addLayout(hbox_sp) + lay.addLayout(hbox_rb) + + if aux_wids: + hbox_aux = QHBoxLayout() + hbox_aux.setAlignment(Qt.AlignCenter) + hbox_aux.setContentsMargins(0, 0, 0, 0) + for wid in aux_wids: + hbox_aux.addWidget(wid) + lay.addLayout(hbox_aux) + return box + + # ---- events ---- + +
+[docs] + def mouseDoubleClickEvent(self, event): + """Implement mouseDoubleClickEvent.""" + if event.button() == Qt.LeftButton: + if self.wid_curr.underMouse(): + self.showStatus.emit() + elif self.wid_shift.underMouse(): + self.showStatus.emit() + elif self.wid_egun.underMouse(): + self.showEgun.emit() + elif self.wid_mon.underMouse(): + self.showMonitor.emit() + super().mouseDoubleClickEvent(event)
+ + +
+[docs] + def changeEvent(self, event): + """Implement changeEvent.""" + if event.type() == QEvent.FontChange: + fontsize = self.app.font().pointSize() + self._lb_curr.setStyleSheet( + 'QLabel{' + ' font-size: '+str(fontsize+8)+'pt;' + ' qproperty-alignment: AlignCenter;' + ' min-width: 6em; max-width: 6em;' + '}') + self.ensurePolished()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_injection/widgets.html b/_modules/siriushla/as_ap_injection/widgets.html new file mode 100644 index 000000000..70d2f6cc4 --- /dev/null +++ b/_modules/siriushla/as_ap_injection/widgets.html @@ -0,0 +1,706 @@ + + + + + + siriushla.as_ap_injection.widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_injection.widgets

+"""Monitoring widgets."""
+
+from qtpy.QtGui import QPixmap, QIcon
+from qtpy.QtCore import Qt, Slot, Signal, QSize, QTimer
+from qtpy.QtWidgets import QWidget, QLabel, QGridLayout, QGroupBox, \
+    QHBoxLayout, QCheckBox, QMenu, QFrame, QSizePolicy as QSzPol, \
+    QPushButton
+
+import qtawesome as qta
+
+from pydm.widgets import PyDMPushButton
+from pydm.connection_inspector import ConnectionInspector
+
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.namesys import SiriusPVName
+from siriuspy.devices import InjSysStandbyHandler
+from siriuspy.clientarch import Time as _Time
+from siriuspy.injctrl.csdev import get_status_labels, Const as _Const
+
+from ..widgets import SiriusLedAlert, PyDMLedMultiChannel, PyDMLed, QLed, \
+    SiriusConnectionSignal
+from ..widgets.led import MultiChannelStatusDialog
+from ..widgets.dialog import StatusDetailDialog
+
+
+
+[docs] +class MonitorSummaryWidget(QWidget): + """Monitor Summary widget.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX): + """Init.""" + super().__init__(parent) + self.prefix = prefix + self._inj_dev = SiriusPVName('AS-Glob:AP-InjCtrl') + self._inj_prefix = self._inj_dev.substitute(prefix=prefix) + self._setupUi() + + def _setupUi(self): + monitor = QGroupBox('Monitor') + glay = QGridLayout(monitor) + glay.setAlignment(Qt.AlignTop) + glay.addWidget(QLabel('', self), 0, 0) + + sec_lbls = get_status_labels() + for col, sec in enumerate(sec_lbls): + lbl = QLabel(sec, self, alignment=Qt.AlignCenter) + glay.addWidget(lbl, 0, col+1) + sub_lbls = set() + for sec in sec_lbls: + sub_lbls.update(get_status_labels(sec)) + sub_lbls = sorted(sub_lbls) + for row, sub in enumerate(sub_lbls): + lbl = QLabel(sub, self, alignment=Qt.AlignCenter) + glay.addWidget(lbl, row+1, 0) + + row = len(sub_lbls) - 1 + line = QFrame(self) + line.setFrameShape(QFrame.HLine) + line.setFrameShadow(QFrame.Sunken) + glay.addWidget(line, row+2, 0, 1, len(sec_lbls)+1) + + glay.addWidget( + QLabel('All', self, alignment=Qt.AlignCenter), row+3, 0) + + for col, sec in enumerate(sec_lbls): + lbls = get_status_labels(sec) + for row, sub in enumerate(sub_lbls): + if sub not in lbls: + continue + bit = lbls.index(sub) + led = SiriusLedAlert( + self, self._inj_prefix.substitute( + propty='DiagStatus'+sec+'-Mon'), bit=bit) + glay.addWidget(led, row+1, col+1) + + bit = sec_lbls.index(sec) + led = SiriusLedAlert( + self, self._inj_prefix.substitute( + propty='DiagStatus-Mon'), bit=bit) + glay.addWidget(led, row+3, col+1) + + lay = QHBoxLayout(self) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(monitor)
+ + + +
+[docs] +class InjDiagLed(SiriusLedAlert): + """InjDiag Status Led.""" + + def __init__(self, parent, prefix=VACA_PREFIX, **kws): + init_channel = SiriusPVName( + 'AS-Glob:AP-InjCtrl:InjStatus-Mon').substitute(prefix=prefix) + self.labels = get_status_labels('Inj') + super().__init__(parent, init_channel, **kws) + self.offColor = self.LightGreen + self.onColor = self.Red + +
+[docs] + def mouseDoubleClickEvent(self, event): + """Reimplement mouseDoubleClickEvent.""" + if event.button() == Qt.LeftButton and self.labels: + self.msg = StatusDetailDialog( + parent=self.parent(), pvname=self.channel, + labels=self.labels, title='Injection Status') + self.msg.open() + super().mouseDoubleClickEvent(event)
+
+ + + +
+[docs] +class InjSysStbyLed(PyDMLedMultiChannel): + """Led to check whether several PVs are in stanby state.""" + + def __init__(self, parent=None, handler=None): + if not handler: + handler = InjSysStandbyHandler() + super().__init__(parent, handler.on_values) + self.stateColors = [PyDMLed.DarkGreen, PyDMLed.LightGreen, + PyDMLed.Yellow, PyDMLed.Gray] + + def _update_statuses(self): + if not self._connected: + state = 3 + else: + status_off = 0 + for status in self._address2status.values(): + if status == 'UNDEF' or not status: + status_off += 1 + if status_off == len(self._address2status.values()): + state = 0 + elif status_off > 0: + state = 2 + else: + state = 1 + self.setState(state) + +
+[docs] + def mouseDoubleClickEvent(self, ev): + pv_groups, texts = list(), list() + pvs_err, pvs_und = set(), set() + for k, v in self._address2conn.items(): + if not v: + pvs_und.add(k) + if pvs_und: + pv_groups.append(pvs_und) + texts.append('There are disconnected PVs!') + for k, v in self._address2status.items(): + if not v and k not in pvs_und: + pvs_err.add(k) + if pvs_err: + pv_groups.append(pvs_err) + texts.append( + 'The following PVs have value\n' + 'equivalent to off status!') + + if pv_groups: + msg = MultiChannelStatusDialog( + parent=self, pvs=pv_groups, + text=texts, fun_show_diff=self._show_diff) + msg.exec_() + QLed.mouseDoubleClickEvent(self, ev)
+
+ + + +
+[docs] +class InjSysStbyControlWidget(QWidget): + """Injection System Control Widget.""" + + expand = Signal() + + def __init__(self, parent=None, prefix=VACA_PREFIX, is_summary=False, + handler=None): + """Init.""" + super().__init__(parent) + self.prefix = prefix + self._inj_prefix = SiriusPVName( + 'AS-Glob:AP-InjCtrl').substitute(prefix=prefix) + self._is_summary = is_summary + self._last_comm = None + + self._handler = handler or InjSysStandbyHandler() + self._icon_off = qta.icon('mdi.power-off') + self._icon_on = qta.icon('mdi.power-on') + self._icon_check = qta.icon('fa5s.check') + self._pixmap_check = self._icon_check.pixmap( + self._icon_check.actualSize(QSize(16, 16))) + self._icon_not = qta.icon('fa5s.times') + self._pixmap_not = self._icon_not.pixmap( + self._icon_not.actualSize(QSize(16, 16))) + + self.menu = QMenu(self) + self.rstord_act = self.menu.addAction('Reset Commands') + self.rstord_act.triggered.connect(self._reset_commands_order) + + if is_summary: + self._setupSummary() + else: + self._setupFull() + + self.conn_act = self.menu.addAction('Show Connections...') + self.conn_act.triggered.connect(self._show_connections) + + self._ch_cmdsts = SiriusConnectionSignal( + self._inj_prefix.substitute(propty='InjSysCmdSts-Mon')) + + self._ch_off_order_sp = SiriusConnectionSignal( + self._inj_prefix.substitute(propty='InjSysTurnOffOrder-SP')) + self._ch_off_order_rb = SiriusConnectionSignal( + self._inj_prefix.substitute(propty='InjSysTurnOffOrder-RB')) + self._ch_on_order_sp = SiriusConnectionSignal( + self._inj_prefix.substitute(propty='InjSysTurnOnOrder-SP')) + self._ch_on_order_rb = SiriusConnectionSignal( + self._inj_prefix.substitute(propty='InjSysTurnOnOrder-RB')) + if not is_summary: + self._ch_cmdone = SiriusConnectionSignal( + self._inj_prefix.substitute(propty='InjSysCmdDone-Mon')) + + self._ch_cmdsts.new_value_signal[int].connect( + self._handle_cmdsts_buttons_enbl) + self._ch_off_order_rb.new_value_signal[str].connect( + self._handle_buttons_color) + self._ch_on_order_rb.new_value_signal[str].connect( + self._handle_buttons_color) + self._ch_off_order_rb.new_value_signal[str].connect( + self._handle_actions_state) + self._ch_on_order_rb.new_value_signal[str].connect( + self._handle_actions_state) + if not is_summary: + self._ch_cmdone.new_value_signal[str].connect( + self._handle_cmdone_labels) + self._ch_cmdsts.new_value_signal[int].connect( + self._handle_cmdsts_labels) + + def _setupSummary(self): + self._pb_off = PyDMPushButton( + self, label='', icon=self._icon_off, + init_channel=self._inj_prefix.substitute( + propty='InjSysTurnOff-Cmd'), + pressValue=0) + self._pb_off.setObjectName('bt') + self._pb_off.setStyleSheet( + '#bt{min-width:25px; max-width:25px; icon-size:20px;}') + self._pb_on = PyDMPushButton( + self, label='', icon=self._icon_on, + init_channel=self._inj_prefix.substitute( + propty='InjSysTurnOn-Cmd'), + pressValue=0) + self._pb_on.setObjectName('bt') + self._pb_on.setStyleSheet( + '#bt{min-width:25px; max-width:25px; icon-size:20px;}') + + self._led_sts = InjSysStbyLed(self, handler=self._handler) + self._led_sts.setStyleSheet( + 'QLed{min-width:1.29em; max-width:1.29em;}') + + lay = QGridLayout(self) + lay.setAlignment(Qt.AlignCenter) + lay.addWidget(self._pb_off, 0, 0) + lay.addWidget(self._pb_on, 0, 1) + lay.addWidget(self._led_sts, 1, 0, 1, 2, alignment=Qt.AlignCenter) + + # menu + for cmmtype in ['on', 'off']: + order = getattr(self._handler, cmmtype+'_order') + menu = QMenu('Select Turn '+cmmtype.upper()+' Commands', self) + setattr(self, cmmtype+'_menu', menu) + self.menu.addMenu(menu) + for cmm in order: + act = menu.addAction(self._handler.HANDLER_DESC[cmm]) + act.setObjectName(cmm) + act.setCheckable(True) + + def _setupFull(self): + lay = QGridLayout(self) + + lay.addWidget(QLabel('Off', self, alignment=Qt.AlignCenter), 0, 1) + lay.addWidget(QLabel('On', self, alignment=Qt.AlignCenter), 0, 2) + lay.addWidget(QLabel('Status', self, alignment=Qt.AlignCenter), 0, 3) + + self._checkbox_off = dict() + self._checkbox_on = dict() + self._labels_sts = dict() + for idx, name in enumerate(self._handler.DEF_ON_ORDER): + cb_off = QCheckBox(self) + cb_off.setObjectName(name) + self._checkbox_off[name] = cb_off + cb_on = QCheckBox(self) + cb_on.setObjectName(name) + self._checkbox_on[name] = cb_on + desc = self._handler.HANDLER_DESC[name] + splitd = desc.split('(') + lbl_txt = splitd[0] + tip = '' + if len(splitd) > 1: + lbl_txt, tip = splitd + lb_dsc = QLabel(lbl_txt, self, alignment=Qt.AlignLeft) + if tip: + lb_dsc.setToolTip(tip[:-1]) + lb_sts = QLabel('', self, alignment=Qt.AlignCenter) + lb_sts.setObjectName(name) + self._labels_sts[name] = lb_sts + lay.addWidget(lb_dsc, idx+1, 0) + lay.addWidget(cb_off, idx+1, 1, alignment=Qt.AlignCenter) + lay.addWidget(cb_on, idx+1, 2, alignment=Qt.AlignCenter) + lay.addWidget(lb_sts, idx+1, 3) + + self._pb_off = PyDMPushButton( + self, label='', icon=self._icon_off, + init_channel=self._inj_prefix.substitute( + propty='InjSysTurnOff-Cmd'), + pressValue=0) + self._pb_off.setObjectName('bt') + self._pb_off.setStyleSheet( + '#bt{min-width:25px; max-width:25px; icon-size:20px;}') + self._pb_on = PyDMPushButton( + self, label='', icon=self._icon_on, + init_channel=self._inj_prefix.substitute( + propty='InjSysTurnOn-Cmd'), + pressValue=0) + self._pb_on.setObjectName('bt') + self._pb_on.setStyleSheet( + '#bt{min-width:25px; max-width:25px; icon-size:20px;}') + + self._led_sts = InjSysStbyLed(self, handler=self._handler) + + lay.addWidget(self._pb_off, 6, 1) + lay.addWidget(self._pb_on, 6, 2) + lay.addWidget(self._led_sts, 6, 3) + + @Slot(int) + def _handle_cmdsts_buttons_enbl(self, new_sts): + if new_sts == _Const.InjSysCmdSts.On: + self._pb_on.setEnabled(False) + self._pb_on.setIcon(qta.icon( + 'fa5s.spinner', animation=qta.Spin(self._pb_on))) + self._pb_off.setEnabled(False) + elif new_sts == _Const.InjSysCmdSts.Off: + self._pb_on.setEnabled(False) + self._pb_off.setEnabled(False) + self._pb_off.setIcon(qta.icon( + 'fa5s.spinner', animation=qta.Spin(self._pb_off))) + else: + if not self._pb_on.isEnabled(): + self._pb_on.setEnabled(True) + self._pb_off.setEnabled(True) + self._pb_on.setIcon(self._icon_on) + self._pb_off.setIcon(self._icon_off) + + @Slot(str) + def _handle_cmdone_labels(self, new_done): + for name in self._handler.DEF_ON_ORDER: + lbl = self._labels_sts[name] + if name in new_done: + lbl.setPixmap(self._pixmap_check) + elif self._ch_cmdsts.value == _Const.InjSysCmdSts.Idle: + lbl.setPixmap(self._pixmap_not) + + @Slot(int) + def _handle_cmdsts_labels(self, new_sts): + if new_sts == _Const.InjSysCmdSts.On: + self._last_comm = new_sts + for name in self._handler.DEF_ON_ORDER: + if self._ch_on_order_rb.value is None: + break + lbl = self._labels_sts[name] + if name in self._ch_on_order_rb.value: + icon = qta.icon('fa5s.spinner') + pixmap = icon.pixmap(icon.actualSize(QSize(16, 16))) + lbl.setPixmap(pixmap) + else: + lbl.setPixmap(QPixmap()) + elif new_sts == _Const.InjSysCmdSts.Off: + self._last_comm = new_sts + for name in self._handler.DEF_OFF_ORDER: + if self._ch_off_order_rb.value is None: + break + lbl = self._labels_sts[name] + if name in self._ch_off_order_rb.value: + icon = qta.icon('fa5s.spinner') + pixmap = icon.pixmap(icon.actualSize(QSize(16, 16))) + lbl.setPixmap(pixmap) + else: + lbl.setPixmap(QPixmap()) + else: + done = self._ch_cmdone.value + for name in self._handler.DEF_ON_ORDER: + if done is None or name in done: + continue + lbl = self._labels_sts[name] + if self._last_comm == _Const.InjSysCmdSts.On and \ + name in self._ch_on_order_rb.value: + lbl.setPixmap(self._pixmap_not) + elif self._last_comm == _Const.InjSysCmdSts.Off and \ + name in self._ch_off_order_rb.value: + lbl.setPixmap(self._pixmap_not) + self._last_comm = None + + @Slot() + def _set_commands_order(self): + if self._is_summary: + if self.sender() in self.on_menu.actions(): + on_order = [ + a.objectName() for a in self.on_menu.actions() + if a.isChecked()] + self._ch_on_order_sp.send_value_signal[str].emit( + ','.join(on_order)) + elif self.sender() in self.off_menu.actions(): + off_order = [ + a.objectName() for a in self.off_menu.actions() + if a.isChecked()] + self._ch_off_order_sp.send_value_signal[str].emit( + ','.join(off_order)) + else: + if self.sender() in self._checkbox_on.values(): + checked = [ + w.objectName() for w in self._checkbox_on.values() + if w.isChecked()] + on_order = [ + h for h in self._handler.DEF_ON_ORDER if h in checked] + self._ch_on_order_sp.send_value_signal[str].emit( + ','.join(on_order)) + elif self.sender() in self._checkbox_off.values(): + checked = [ + w.objectName() for w in self._checkbox_off.values() + if w.isChecked()] + off_order = [ + h for h in self._handler.DEF_OFF_ORDER if h in checked] + self._ch_off_order_sp.send_value_signal[str].emit( + ','.join(off_order)) + + @Slot() + def _reset_commands_order(self): + self._ch_off_order_sp.send_value_signal[str].emit( + ','.join(self._handler.DEF_OFF_ORDER)) + self._ch_on_order_sp.send_value_signal[str].emit( + ','.join(self._handler.DEF_ON_ORDER)) + if self._is_summary: + for menu in [self.off_menu, self.on_menu]: + for act in menu.actions(): + act.toggled.disconnect() + act.setChecked(True) + act.toggled.connect(self._set_commands_order) + else: + for group in [self._checkbox_off, self._checkbox_on]: + for wid in group.values(): + wid.toggled.disconnect() + wid.setChecked(True) + wid.toggled.connect(self._set_commands_order) + + @Slot() + def _handle_buttons_color(self): + off_color = 'yellow' if self._ch_off_order_rb.value != \ + ','.join(self._handler.DEF_OFF_ORDER) else 'white' + self._pb_off.setStyleSheet( + '#bt{min-width:25px; max-width:25px; icon-size:20px;' + 'background-color: '+off_color+';}') + on_color = 'yellow' if self._ch_on_order_rb.value != \ + ','.join(self._handler.DEF_ON_ORDER) else 'white' + self._pb_on.setStyleSheet( + '#bt{min-width:25px; max-width:25px; icon-size:20px;' + 'background-color: '+on_color+';}') + + @Slot(str) + def _handle_actions_state(self, sts): + state = 'on' if 'On' in self.sender().address else 'off' + channel = getattr(self, '_ch_'+state+'_order_rb') + if channel.value is None: + return + + if self._is_summary: + group = getattr(self, state+'_menu').actions() + else: + group = getattr(self, '_checkbox_'+state).values() + for obj in group: + obj.disconnect() + ost = obj.objectName() in sts + obj.setChecked(ost) + obj.toggled.connect(self._set_commands_order) + +
+[docs] + def contextMenuEvent(self, event): + """Show a custom context menu.""" + self.menu.popup(self.mapToGlobal(event.pos()))
+ + + def _show_connections(self, checked): + """Show connections action.""" + _ = checked + conn = ConnectionInspector(self) + conn.show()
+ + + +
+[docs] +class ClockLabel(QLabel): + """Clock label.""" + + def __init__(self, parent=None): + """Init.""" + super().__init__(parent) + self._update_timer = QTimer(self) + self._update_timer.timeout.connect(self._update) + self._update_timer.setInterval(1000) + self._update_timer.start() + + def _update(self): + text = _Time.strftime(_Time.now(), '%H:%M:%S') + self.setText(text)
+ + + +
+[docs] +class TaskStatusLabel(QPushButton): + """Label to show if task is running.""" + + def __init__(self, parent=None, init_channel=None): + super().__init__(parent) + self._wait_icon = qta.icon('fa5s.spinner', animation=qta.Spin(self)) + self.setFlat(True) + self._channel = SiriusConnectionSignal(init_channel) + self._channel.new_value_signal[int].connect(self._update_icon) + self.setSizePolicy(QSzPol.Fixed, QSzPol.Fixed) + self.setMaximumSize(25, 25) + self.setStyleSheet('QPushButton:hover{border:0pt solid transparent;}') + + def _update_icon(self, status): + if status: + self.setIcon(self._wait_icon) + else: + self.setIcon(QIcon())
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_launcher/main.html b/_modules/siriushla/as_ap_launcher/main.html new file mode 100644 index 000000000..6dbc4d2c6 --- /dev/null +++ b/_modules/siriushla/as_ap_launcher/main.html @@ -0,0 +1,532 @@ + + + + + + siriushla.as_ap_launcher.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_launcher.main

+"""Interface to handle main operation commands."""
+
+import qtawesome as qta
+
+from qtpy.QtCore import Qt, Slot, Signal, QEvent
+from qtpy.QtWidgets import QWidget, QGroupBox, QPushButton, QLabel, \
+    QGridLayout, QApplication, QHBoxLayout
+
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.namesys import SiriusPVName
+from siriuspy.injctrl.csdev import Const as _InjConst
+
+from ..util import get_appropriate_color, connect_newprocess
+from ..widgets import SiriusMainWindow, PyDMStateButton, SiriusLabel, \
+    SiriusEnumComboBox, SiriusLedState, PyDMLogLabel, SiriusConnectionSignal, \
+    SiriusSpinbox
+from ..as_ti_control import BucketList, EVGInjectionLed, EVGInjectionButton
+from ..as_ap_machshift import MachShiftLabel
+from ..as_ap_injection import InjSysStbyControlWidget, InjDiagLed, \
+    MonitorSummaryWidget, ClockLabel
+from ..as_ap_injection import RFKillBeamButton
+from .menu import get_object
+
+
+
+[docs] +class MainLauncher(SiriusMainWindow): + """Main Launcher.""" + + showMonitor = Signal() + showStatus = Signal() + showEgun = Signal() + + def __init__(self, parent=None, prefix=VACA_PREFIX): + """Init.""" + super().__init__(parent) + self._prefix = prefix + + # window settings + self.setObjectName('ASApp') + self.setWindowTitle('Sirius Launcher') + self.setWindowIcon( + qta.icon('mdi.rocket', color=get_appropriate_color('AS'))) + + screens = QApplication.screens() + screen_idx = 3 if len(screens) == 8 else 0 + topleft = screens[screen_idx].geometry().topLeft() + self.move(topleft.x(), topleft.y()+20) + self.setWindowFlags(Qt.WindowStaysOnTopHint) + + # menubar + menubar = get_object(ismenubar=True) + menubar.setNativeMenuBar(False) + self.setMenuBar(menubar) + self._setupUi() + + # connect window signals + connect_newprocess( + self, 'sirius-hla-as-ap-monitor.py', + parent=self, signal=self.showMonitor) + connect_newprocess( + self, 'sirius-hla-si-ap-genstatus.py', + parent=self, signal=self.showStatus) + connect_newprocess( + self, 'sirius-hla-li-eg-control.py', + parent=self, signal=self.showEgun) + + # set focus policy + self.setFocus(True) + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + # Machine Shift + self.wid_shift = QGroupBox('Machine Shift') + machshift_pvname = SiriusPVName( + 'AS-Glob:AP-MachShift:Mode-Sel').substitute(prefix=self._prefix) + cbox_shift_mode = SiriusEnumComboBox(self, machshift_pvname) + label_shift_mode = MachShiftLabel(self, self._prefix) + label_shift_mode.label.setStyleSheet( + 'QLabel{max-height: 2em; min-width: 7em;}') + lay_shift = QGridLayout(self.wid_shift) + lay_shift.setVerticalSpacing(5) + lay_shift.setAlignment(Qt.AlignCenter) + lay_shift.addWidget(cbox_shift_mode, 1, 0) + lay_shift.addWidget(label_shift_mode, 2, 0) + + # Injection System + self.wid_injsys = QGroupBox('Inj.System') + wid_injsys = InjSysStbyControlWidget( + self, self._prefix, is_summary=True) + lay_injsys = QGridLayout(self.wid_injsys) + lay_injsys.setContentsMargins(0, 0, 0, 0) + lay_injsys.addWidget(wid_injsys) + + # Egun triggers + self.wid_egun = QGroupBox('Egun Trig.') + self.wid_egun.setStyleSheet('min-width: 5em;') + egun_dev = SiriusPVName( + 'LI-01:EG-TriggerPS').substitute(prefix=self._prefix) + but_egun_trigger = PyDMStateButton( + self, egun_dev.substitute(propty_name='enable')) + led_egun_trigger = SiriusLedState( + self, egun_dev.substitute(propty_name='enablereal')) + lay_egun = QGridLayout(self.wid_egun) + lay_egun.setVerticalSpacing(5) + lay_egun.addWidget(but_egun_trigger, 1, 0) + lay_egun.addWidget(led_egun_trigger, 2, 0) + + # injection control + injctrl_dev = SiriusPVName('AS-Glob:AP-InjCtrl') + injctrl_dev = injctrl_dev.substitute(prefix=self._prefix) + + self.wid_inject = QGroupBox('Injection') + self.ch_injmode = SiriusConnectionSignal( + injctrl_dev.substitute(propty='Mode-Sts')) + self.ch_injmode.new_value_signal[int].connect( + self._handle_injmode_settings_vis) + + # # Settings + label_sett = QLabel( + '<h4>Sett.</h4>', self, alignment=Qt.AlignCenter) + led_sett = InjDiagLed(self) + self.wid_injsett = QWidget() + lay_injsett = QGridLayout(self.wid_injsett) + lay_injsett.setContentsMargins(0, 0, 0, 0) + lay_injsett.setAlignment(Qt.AlignTop) + lay_injsett.addWidget(label_sett, 0, 0) + lay_injsett.addWidget(led_sett, 1, 0) + + # # Top-up status + label_tusts = QLabel( + '<h4>Status</h4>', self, alignment=Qt.AlignCenter) + label_tunow = ClockLabel(self) + label_tunow.setStyleSheet('max-height:2em;') + label_tunxt = SiriusLabel( + self, injctrl_dev.substitute(propty='TopUpNextInj-Mon')) + label_tunxt.displayFormat = SiriusLabel.DisplayFormat.Time + label_tunxt.setAlignment(Qt.AlignCenter) + label_tunxt.setStyleSheet('max-height:2em;') + self.wid_tusts = QWidget() + self.wid_tusts.setObjectName('wid') + self.wid_tusts.setStyleSheet("#wid{min-width: 8em; max-width: 8em;}") + lay_tusts = QGridLayout(self.wid_tusts) + lay_tusts.setContentsMargins(0, 0, 0, 0) + lay_tusts.setAlignment(Qt.AlignTop) + lay_tusts.addWidget(label_tusts, 0, 0, 1, 2) + lay_tusts.addWidget(QLabel('Now:', self), 1, 0) + lay_tusts.addWidget(label_tunow, 1, 1) + lay_tusts.addWidget(QLabel('Next:', self), 2, 0) + lay_tusts.addWidget(label_tunxt, 2, 1) + self.wid_tusts.setVisible(False) + + # # Control + label_inj = QLabel( + '<h4>Control</h4>', self, alignment=Qt.AlignCenter) + self.but_tiinj = EVGInjectionButton(self, self._prefix) + self.but_topup = PyDMStateButton( + self, injctrl_dev.substitute(propty='TopUpState-Sel')) + self.but_topup.setVisible(False) + self.but_accum = PyDMStateButton( + self, injctrl_dev.substitute(propty='AccumState-Sel')) + self.but_accum.setVisible(False) + lay_inject_sel = QGridLayout() + lay_inject_sel.setAlignment(Qt.AlignCenter) + lay_inject_sel.addWidget(self.but_tiinj, 0, 0) + lay_inject_sel.addWidget(self.but_topup, 0, 0) + lay_inject_sel.addWidget(self.but_accum, 0, 0) + led_injsts = EVGInjectionLed(self, self._prefix) + label_injcnt = SiriusLabel(self) + label_injcnt.setToolTip( + 'Count injection pulses when Egun Trigger is enabled.') + label_injcnt.channel = SiriusPVName( + 'AS-Glob:AP-CurrInfo:InjCount-Mon').substitute(prefix=self._prefix) + label_injcnt.setStyleSheet('QLabel{max-width: 3.5em;}') + lay_inject_sts = QHBoxLayout() + lay_inject_sts.setContentsMargins(0, 0, 0, 0) + lay_inject_sts.setAlignment(Qt.AlignTop) + lay_inject_sts.addWidget(led_injsts) + lay_inject_sts.addWidget(label_injcnt) + self.wid_injctrl = QWidget() + lay_injctrl = QGridLayout(self.wid_injctrl) + lay_injctrl.setContentsMargins(0, 0, 0, 0) + lay_injctrl.setAlignment(Qt.AlignTop) + lay_injctrl.addWidget(label_inj, 0, 2, alignment=Qt.AlignCenter) + lay_injctrl.addLayout(lay_inject_sel, 1, 2, alignment=Qt.AlignCenter) + lay_injctrl.addLayout(lay_inject_sts, 2, 2, alignment=Qt.AlignCenter) + + # # Injection Auxiliary section + self.wid_injlog = QGroupBox('Injection Log') + label_injlog = PyDMLogLabel( + self, injctrl_dev.substitute(propty='Log-Mon'), + replace=['Remaining time', ]) + lay_injlog = QGridLayout(self.wid_injlog) + lay_injlog.addWidget(label_injlog, 0, 0) + self.wid_injlog.setVisible(False) + + self.wid_mon = MonitorSummaryWidget(self, self._prefix) + self.wid_mon.setVisible(False) + + # # Target Current + self._ld_currtgt = QLabel( + '<h4>Target Curr.</h4>', self, alignment=Qt.AlignCenter) + self._sb_currtgt = SiriusSpinbox( + self, injctrl_dev.substitute(propty='TargetCurrent-SP')) + self._lb_currtgt = SiriusLabel( + self, injctrl_dev.substitute(propty='TargetCurrent-RB'), + keep_unit=True) + self._lb_currtgt.showUnits = True + self._wid_tcurr = QWidget() + lay_tcurr = QGridLayout(self._wid_tcurr) + lay_tcurr.setContentsMargins(0, 0, 0, 0) + lay_tcurr.setAlignment(Qt.AlignTop) + lay_tcurr.addWidget(self._ld_currtgt, 0, 0) + lay_tcurr.addWidget(self._sb_currtgt, 1, 0) + lay_tcurr.addWidget(self._lb_currtgt, 2, 0) + + # # Bucket List + self._bucket_list = BucketList(self, prefix=self._prefix, min_size=15) + + self.wid_fill = QWidget() + lay_fill = QGridLayout(self.wid_fill) + lay_fill.setContentsMargins(0, 0, 0, 0) + lay_fill.setHorizontalSpacing(9) + lay_fill.addWidget(self._wid_tcurr, 0, 0) + lay_fill.addWidget(self._bucket_list, 0, 1) + self.wid_fill.setVisible(False) + + pbt_aux = QPushButton('v', self) + pbt_aux.setToolTip('Show Injection Auxiliary section.') + pbt_aux.clicked.connect(self._toggle_show_injaux) + pbt_aux.setStyleSheet('QPushButton{max-width: 0.8em;}') + pbt_bl = QPushButton('>', self) + pbt_bl.setToolTip('Show bucket list and target current controls.') + pbt_bl.clicked.connect(self._toggle_show_bucketlist) + pbt_bl.setStyleSheet('QPushButton{max-width: 0.8em;}') + + lay_inj = QGridLayout(self.wid_inject) + lay_inj.setAlignment(Qt.AlignTop) + lay_inj.setVerticalSpacing(5) + lay_inj.setHorizontalSpacing(12) + lay_inj.addWidget(self.wid_injsett, 0, 0, 2, 1) + lay_inj.addWidget(self.wid_tusts, 0, 1, 2, 1) + lay_inj.addWidget(self.wid_injctrl, 0, 2, 2, 1) + lay_inj.addWidget(pbt_bl, 0, 3, alignment=Qt.AlignTop) + lay_inj.addWidget(pbt_aux, 1, 3, alignment=Qt.AlignBottom) + lay_inj.addWidget(self.wid_fill, 0, 4, 2, 1) + + # Current + curr_pvname = SiriusPVName( + 'SI-Glob:AP-CurrInfo:Current-Mon').substitute(prefix=self._prefix) + self.label_curr = SiriusLabel(self, curr_pvname) + self.label_curr.showUnits = True + self.label_curr.setStyleSheet(""" + QLabel{ + font-size: 18pt; qproperty-alignment: AlignCenter; + min-width: 6em; max-width: 6em; + }""") + self.wid_curr = QGroupBox('Current') + lay_curr = QHBoxLayout(self.wid_curr) + lay_curr.addWidget(self.label_curr) + + # RF Kill Beam + self.wid_rfkill = QGroupBox('RF Kill Beam') + self.wid_rfkill.setObjectName('RFKillBeam') + rfkill_bt = RFKillBeamButton(self, self._prefix) + rfkill_lay = QGridLayout(self.wid_rfkill) + rfkill_lay.addWidget(rfkill_bt) + + # menu buttons + self.wid_pbt = QPushButton('v', self) + self.wid_pbt.clicked.connect(self._toggle_show_menubutton) + self.wid_pbt.setStyleSheet('QPushButton{max-width: 0.8em;}') + self._menubutton = get_object(ismenubar=False, parent=self) + self._menubutton.layout().setContentsMargins(0, 0, 0, 0) + self._menubutton.layout().setSpacing(4) + self._menubutton.setVisible(False) + + hlay1 = QHBoxLayout() + hlay1.setContentsMargins(0, 0, 0, 0) + hlay1.addWidget(self.wid_shift) + hlay1.addWidget(self.wid_injsys) + hlay1.addWidget(self.wid_egun) + hlay1.addWidget(self.wid_inject) + hlay1.addWidget(self.wid_curr) + hlay1.addWidget(self.wid_rfkill) + + hlay2 = QHBoxLayout() + hlay2.setContentsMargins(0, 0, 0, 0) + hlay2.addWidget(self.wid_injlog) + hlay2.addWidget(self.wid_mon) + + cwid = QWidget(self) + lay = QGridLayout(cwid) + lay.addLayout(hlay1, 0, 0) + lay.addLayout(hlay2, 1, 0) + lay.addWidget(self._menubutton, 2, 0, 1, 2) + lay.addWidget( + self.wid_pbt, 0, 1, 2, 1, alignment=Qt.AlignRight | Qt.AlignBottom) + self.setCentralWidget(cwid) + + def _toggle_show_menubutton(self): + self._menubutton.setVisible(self._menubutton.isHidden()) + text = 'v' if self._menubutton.isHidden() else '^' + self.sender().setText(text) + self.centralWidget().adjustSize() + self.adjustSize() + + def _toggle_show_bucketlist(self): + show = self.wid_fill.isHidden() + self.wid_fill.setVisible(show) + text = '<' if show else '>' + tooltip = ('Hide' if show else 'Show')+' bucket list controls.' + self.sender().setText(text) + self.sender().setToolTip(tooltip) + self.sender().parent().adjustSize() + self.centralWidget().adjustSize() + self.adjustSize() + + def _toggle_show_injaux(self): + show = self.wid_mon.isHidden() + self.wid_mon.setVisible(show) + self.wid_injlog.setVisible(show) + text = '^' if show else 'v' + tooltip = ('Hide' if show else 'Show')+' Injection Auxiliary section.' + self.sender().setText(text) + self.sender().setToolTip(tooltip) + self.sender().parent().adjustSize() + self.centralWidget().adjustSize() + self.adjustSize() + + @Slot(int) + def _handle_injmode_settings_vis(self, new_mode): + is_topup = new_mode == _InjConst.InjMode.TopUp + is_accum = new_mode == _InjConst.InjMode.Accum + self.wid_tusts.setVisible(is_topup) + self.but_tiinj.setVisible(not is_topup and not is_accum) + self.but_topup.setVisible(is_topup) + self.but_accum.setVisible(is_accum) + +
+[docs] + def mouseDoubleClickEvent(self, event): + """Implement mouseDoubleClickEvent.""" + if event.button() == Qt.LeftButton: + if self.wid_curr.underMouse(): + self.showStatus.emit() + elif self.wid_shift.underMouse(): + self.showStatus.emit() + elif self.wid_egun.underMouse(): + self.showEgun.emit() + elif self.wid_mon.underMouse(): + self.showMonitor.emit() + super().mouseDoubleClickEvent(event)
+ + +
+[docs] + def changeEvent(self, event): + """Implement changeEvent.""" + if event.type() == QEvent.FontChange: + fontsize = self.app.font().pointSize() + self.label_curr.setStyleSheet( + 'QLabel{' + ' font-size: '+str(fontsize+8)+'pt;' + ' qproperty-alignment: AlignCenter;' + ' min-width: 6em; max-width: 6em;' + '}') + self.ensurePolished()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_launcher/menu.html b/_modules/siriushla/as_ap_launcher/menu.html new file mode 100644 index 000000000..beb1f9df3 --- /dev/null +++ b/_modules/siriushla/as_ap_launcher/menu.html @@ -0,0 +1,1160 @@ + + + + + + siriushla.as_ap_launcher.menu — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_launcher.menu

+#!/usr/bin/env python-sirius
+
+"""Mock application launcher."""
+import re as _re
+import subprocess as _sbp
+
+from epics import PV as _PV
+
+from qtpy.QtWidgets import QVBoxLayout, QMessageBox, QMenuBar, \
+    QMenu, QHBoxLayout, QWidget, QPushButton, QAction, QGroupBox, \
+    QInputDialog
+import qtawesome as qta
+
+from siriuspy.envars import VACA_PREFIX as _prefix
+from siriuspy.clientconfigdb import ConfigDBClient
+from siriuspy.search import PSSearch, IDSearch
+from siriuspy.namesys import SiriusPVName
+from siriuspy.oscilloscope import Scopes
+
+from siriushla import util
+from siriushla.widgets.windows import create_window_from_widget
+from siriushla.as_ap_configdb.pvsconfigs import SelectAndApplyPVsWidget
+from siriushla.as_di_scrns.list_scrns import get_scrn_list
+from siriushla.as_di_dccts.main import get_dcct_list
+from siriushla.si_ap_fofb import get_fofb_icon
+
+
+
+[docs] +def get_pushbutton(name, parent): + """.""" + wid = QPushButton(name, parent) + menu = QMenu(wid) + wid.setMenu(menu) + return menu
+ + + +
+[docs] +def get_object(ismenubar=True, parent=None): + """.""" + SUPER = QMenuBar if ismenubar else QWidget + LEVEL1 = QMenu if ismenubar else QGroupBox + LEVEL2M = QMenu if ismenubar else get_pushbutton + LEVEL2A = QAction if ismenubar else QPushButton + + class MainMenuBar(SUPER): + """Main launcher.""" + + def __init__(self, parent=None): + """Constructor.""" + super().__init__(parent=parent) + self._setup_ui() + self.setStyleSheet(""" + QPushButton{ + min-width:4.5em; max-width:4.5em; + min-height:1.5em; max-height:1.5em; + }""") + + def _setup_ui(self): + config = self._create_config_menu() + as_apps = self._create_as_menu() + li_apps = self._create_li_menu() + tb_apps = self._create_section_menu('TB', 'TB') + bo_apps = self._create_section_menu('BO', 'BO') + ts_apps = self._create_section_menu('TS', 'TS') + si_apps = self._create_section_menu('SI', 'SI') + id_apps = self._create_id_menu() + tool_apps = self._create_tool_menu() + it_apps = self._create_it_menu() + + self.add_object_to_level0(config) + self.add_object_to_level0(as_apps) + self.add_object_to_level0(li_apps) + self.add_object_to_level0(tb_apps) + self.add_object_to_level0(bo_apps) + self.add_object_to_level0(ts_apps) + self.add_object_to_level0(si_apps) + self.add_object_to_level0(id_apps) + self.add_object_to_level0(tool_apps) + self.add_object_to_level0(it_apps) + + def add_object_to_level0(self, widget): + if ismenubar: + self.addMenu(widget) + else: + lay = self.layout() + if not isinstance(lay, QVBoxLayout): + lay = QVBoxLayout(self) + self.setLayout(lay) + lay.addWidget(widget) + + def add_object_to_level1(self, pai, filho): + if ismenubar: + if isinstance(filho, QAction): + pai.addAction(filho) + else: + pai.addMenu(filho) + else: + lay = pai.layout() + if not isinstance(lay, QHBoxLayout): + pai.setLayout(QHBoxLayout(pai)) + lay = pai.layout() + if isinstance(filho, QMenu): + icon = filho.icon() + filho = filho.parent() + filho.setIcon(icon) + lay.addWidget(filho) + + def _create_config_menu(self): + pvsconfig = LEVEL1('Configs', self) + pvsconfig.setObjectName('Config') + + pvssave = LEVEL2A('Save', pvsconfig) + self.connect_newprocess( + pvssave, 'sirius-hla-as-ap-pvsconfigs-save.py') + pvsload = LEVEL2A('Load', pvsconfig) + self.connect_newprocess( + pvsload, 'sirius-hla-as-ap-pvsconfigs-load.py') + standby = LEVEL2A('Standby', pvsconfig) + signal = util.get_appropriate_signal(standby) + signal.connect(self._applyconfig) + turnoff = LEVEL2A('TurnOff', pvsconfig) + signal = util.get_appropriate_signal(turnoff) + signal.connect(self._applyconfig) + + self.add_object_to_level1(pvsconfig, pvssave) + self.add_object_to_level1(pvsconfig, pvsload) + self.add_object_to_level1(pvsconfig, standby) + self.add_object_to_level1(pvsconfig, turnoff) + return pvsconfig + + def _create_tool_menu(self): + menu = LEVEL1('Tools', self) + menu.setObjectName('ToolMenu') + + servconf = LEVEL2A('ConfigDB', menu) + self.connect_newprocess(servconf, 'sirius-hla-as-ap-configdb.py') + self.add_object_to_level1(menu, servconf) + + procserv = LEVEL2A('ProcServ', menu) + self.connect_newprocess( + procserv, 'sirius-hla-as-ap-pctrl', is_pydm=True) + self.add_object_to_level1(menu, procserv) + + chart = LEVEL2A('TimeChart', menu) + self.connect_newprocess(chart, 'timechart') + self.add_object_to_level1(menu, chart) + + macreport = LEVEL2A('Mach.Rep', menu) + self.connect_newprocess(macreport, 'sirius-hla-as-ap-macreport.py') + self.add_object_to_level1(menu, macreport) + + osci = LEVEL2M('Osc.View', menu) + asdifctdig = QAction('AS-DI-FCT', osci) + util.connect_newprocess( + asdifctdig, ['gvncviewer', Scopes.AS_DI_FCTDIG], + is_window=False) + asdifpmdig = QAction('AS-DI-FPM', osci) + util.connect_newprocess( + asdifpmdig, ['gvncviewer', Scopes.AS_DI_FPMDIG], + is_window=False) + lidiict = QAction('LI-DI-ICT', osci) + util.connect_newprocess( + lidiict, ['gvncviewer', Scopes.LI_DI_ICTOSC], + is_window=False) + lipumodltr = QAction('LI-PU-MODLTR', osci) + util.connect_newprocess( + lipumodltr, ['gvncviewer', Scopes.LI_PU_OSC_MODLTR], + is_window=False) + tbpuinjbo = QAction('TB-PU-InjBO', osci) + util.connect_newprocess( + tbpuinjbo, ['gvncviewer', Scopes.TB_PU_OSC_INJBO], + is_window=False) + tspuejebo = QAction('TS-PU-EjeBO', osci) + util.connect_newprocess( + tspuejebo, ['gvncviewer', Scopes.TS_PU_OSC_EJEBO], + is_window=False) + tspuinjsi = QAction('TS-PU-InjSI', osci) + util.connect_newprocess( + tspuinjsi, ['gvncviewer', Scopes.TS_PU_OSC_INJSI], + is_window=False) + sipuinjsi = QAction('SI-PU-InjSI', osci) + util.connect_newprocess( + sipuinjsi, ['gvncviewer', Scopes.SI_PU_OSC_INJSI], + is_window=False) + + osci.addAction(asdifctdig) + osci.addAction(asdifpmdig) + osci.addAction(lidiict) + osci.addAction(lipumodltr) + osci.addAction(tbpuinjbo) + osci.addAction(tspuejebo) + osci.addAction(tspuinjsi) + osci.addAction(sipuinjsi) + self.add_object_to_level1(menu, osci) + + try: + host = _sbp.getoutput('hostname') + exist_xrandr = not bool(_sbp.getoutput('xrandr | grep missing')) + hosts = {'lnls449-linux', 'lnls451-linux', 'lnls454-linux'} + except Exception: + return menu + if not exist_xrandr or host not in hosts: + return menu + + scrn = LEVEL2M('Screen Res.', menu) + resolutions = ['3840x2160', '2560x1440', '1920x1080'] + for res in resolutions: + act = QAction(res, scrn) + act.triggered.connect(self._change_resolution) + scrn.addAction(act) + self.add_object_to_level1(menu, scrn) + return menu + + def _create_as_menu(self): + menu = LEVEL1('AS', self) + menu.setObjectName('ASApp') + + genstatus = LEVEL2A('Status', menu) + genstatus.setIcon(qta.icon('mdi.view-split-vertical')) + self.connect_newprocess(genstatus, 'sirius-hla-si-ap-genstatus.py') + + monitor = LEVEL2A('Monitor', menu) + monitor.setIcon(qta.icon('mdi.monitor-dashboard')) + self.connect_newprocess(monitor, 'sirius-hla-as-ap-monitor.py') + + injection = LEVEL2A('Injection', menu) + injection.setIcon(qta.icon('fa5s.syringe')) + self.connect_newprocess(injection, 'sirius-hla-as-ap-injection.py') + + effmon = LEVEL2A('Efficiency', menu) + effmon.setIcon(qta.icon('mdi.percent-outline')) + self.connect_newprocess(effmon, 'sirius-hla-as-ap-effmon.py') + + timing = LEVEL2M('Timing', menu) + timing.setIcon(qta.icon('mdi.timer')) + timing.setObjectName('ASApp') + main = QAction('Main', timing) + main.setIcon(qta.icon('mdi.timer')) + self.connect_newprocess( + main, ['sirius-hla-as-ti-control.py', '-t', 'main']) + summary = QAction('Monitor', timing) + summary.setIcon(util.get_monitor_icon('mdi.timer')) + self.connect_newprocess( + summary, ['sirius-hla-as-ti-control.py', '-t', 'monitor']) + timing.addAction(main) + timing.addAction(summary) + + pwrsupply = LEVEL2M('PS', menu) + pwrsupply.setIcon(qta.icon('mdi.car-battery')) + pwrsupply.setObjectName('ASApp') + pscycle = QAction('Cycle', pwrsupply) + pscycle.setIcon(qta.icon('mdi.recycle')) + self.connect_newprocess(pscycle, 'sirius-hla-as-ps-cycle.py') + psdiag = QAction('Diag', pwrsupply) + psdiag.setIcon(qta.icon('mdi.stethoscope')) + self.connect_newprocess(psdiag, 'sirius-hla-as-ps-diag.py') + pscmd = QAction('Commands', pwrsupply) + pscmd.setIcon(qta.icon('mdi.format-list-numbered')) + self.connect_newprocess(pscmd, 'sirius-hla-as-ps-commands.py') + psgraph = QAction('Graph', pwrsupply) + psgraph.setIcon(qta.icon('mdi.chart-line')) + self.connect_newprocess(psgraph, 'sirius-hla-as-ps-graphmon.py') + psmonitor = QAction('Monitor', pwrsupply) + psmonitor.setIcon(util.get_monitor_icon('mdi.car-battery')) + self.connect_newprocess(psmonitor, 'sirius-hla-as-ps-monitor.py') + pwrsupply.addAction(pscycle) + pwrsupply.addAction(psdiag) + pwrsupply.addAction(pscmd) + pwrsupply.addAction(psgraph) + pwrsupply.addAction(psmonitor) + + pulsedps = self._set_pu_menu('as') + pulsedps.setIcon(qta.icon('mdi.current-ac')) + + rabpmmon = LEVEL2A('RaBPM Monitor', menu) + rabpmmon.setIcon(qta.icon('mdi.developer-board')) + self.connect_newprocess(rabpmmon, 'sirius-hla-as-ap-rabpmmon.py') + + vacuum = LEVEL2M('VA', menu) + vacuum.setIcon(qta.icon('mdi.network-outline', vflip=True)) + vacuum.setObjectName('ASApp') + agilent = QAction('Agilent', vacuum) + self.connect_newprocess( + agilent, 'sirius-hla-as-va-agilent4uhv', is_pydm=True) + mks = QAction('MKS', vacuum) + self.connect_newprocess( + mks, 'sirius-hla-as-va-mks937b', is_pydm=True) + gamma = QAction('Gamma Counters', vacuum) + self.connect_newprocess( + gamma, 'sirius-hla-as-ap-countingpru', is_pydm=True) + vacuum.addAction(agilent) + vacuum.addAction(mks) + vacuum.addAction(gamma) + + radmon = LEVEL2A('RAD', menu) + radmon.setIcon(qta.icon('fa5s.radiation')) + self.connect_newprocess(radmon, 'sirius-hla-as-ap-radmon.py') + + termo = LEVEL2A('Temp', menu) + termo.setIcon(qta.icon('fa5s.thermometer-half')) + self.connect_newprocess( + termo, 'sirius-hla-as-ap-mbtemp', is_pydm=True) + + optics = LEVEL2M('Optics', menu) + optics.setObjectName('ASApp') + energy_button = QAction('Energy Button', optics) + self.connect_newprocess( + energy_button, 'sirius-hla-as-ap-energybutton.py') + offconv = QAction('Offline Converter', optics) + self.connect_newprocess(offconv, 'sirius-hla-as-ap-magoffconv.py') + optics.addAction(energy_button) + optics.addAction(offconv) + + cryomon = LEVEL2A('Cryogenic Plant', menu) + cryomon.setIcon(qta.icon('fa5.snowflake')) + self.connect_newprocess(cryomon, 'sirius-hla-as-cr-control.py') + + self.add_object_to_level1(menu, genstatus) + self.add_object_to_level1(menu, monitor) + self.add_object_to_level1(menu, injection) + self.add_object_to_level1(menu, effmon) + self.add_object_to_level1(menu, timing) + self.add_object_to_level1(menu, pwrsupply) + self.add_object_to_level1(menu, pulsedps) + self.add_object_to_level1(menu, rabpmmon) + self.add_object_to_level1(menu, termo) + self.add_object_to_level1(menu, vacuum) + self.add_object_to_level1(menu, radmon) + self.add_object_to_level1(menu, optics) + self.add_object_to_level1(menu, cryomon) + return menu + + def _create_li_menu(self): + menu = LEVEL1('LI', self) + menu.setObjectName('LIApp') + launcher = LEVEL2A('Launcher', menu) + util.connect_newprocess( + launcher, 'sirius-hla-li-ap-launcher.sh', is_window=False) + + PS = self._set_ps_menu('li') + PS.setIcon(qta.icon('mdi.car-battery')) + + DIG = LEVEL2M('DI', self) + DIG.setObjectName('LIApp') + + bpms_menu = DIG.addMenu('BPMs') + bpms_menu.setIcon(qta.icon('mdi.currency-sign')) + bpms_menu.setObjectName('LIApp') + + bpm2 = QAction('BPM2', bpms_menu) + self.connect_newprocess( + bpm2, ["sirius-hla-li-di-bpms.py", 'LA-BI:BPM2']) + bpms_menu.addAction(bpm2) + bpm3 = QAction('BPM3', bpms_menu) + self.connect_newprocess( + bpm3, ["sirius-hla-li-di-bpms.py", 'LA-BI:BPM3']) + bpms_menu.addAction(bpm3) + + scrns = DIG.addAction('Screens') + scrns.setIcon(qta.icon('mdi.camera-metering-center')) + self.connect_newprocess(scrns, 'sirius-hla-li-di-scrns.py') + scrns.setObjectName('LIApp') + + mps = LEVEL2M('MPS', menu) + mps.setObjectName('LIApp') + mpsmon = QAction('Monitor', mps) + mpsmon.setIcon(qta.icon('mdi.monitor-dashboard')) + self.connect_newprocess(mpsmon, 'sirius-hla-li-ap-mpsmon.py') + mps.addAction(mpsmon) + + mpscon = QAction('Control', mps) + self.connect_newprocess(mpscon, 'sirius-hla-li-ap-mpscon.py') + mps.addAction(mpscon) + + egun = LEVEL2A('Egun', menu) + egun.setIcon(qta.icon('mdi.spotlight-beam')) + self.connect_newprocess(egun, 'sirius-hla-li-eg-control.py') + + mod = LEVEL2A('Modltrs', menu) + mod.setIcon(qta.icon('mdi.current-ac')) + self.connect_newprocess(mod, 'sirius-hla-li-pu-modltr.py') + + llrf = LEVEL2M('LLRF', menu) + llrf.setObjectName('LIApp') + llrf.setIcon(qta.icon('mdi.waves')) + llrfa = QAction('Main', llrf) + llrfa.setIcon(qta.icon('mdi.waves')) + self.connect_newprocess(llrfa, 'sirius-hla-li-rf-llrf.py') + llrf.addAction(llrfa) + + va = LEVEL2M('VA', menu) + va.setObjectName('LIApp') + va.setIcon(qta.icon('mdi.network-outline', vflip=True)) + vac = QAction('Control', va) + self.connect_newprocess(vac, 'sirius-hla-li-va-control.py') + va.addAction(vac) + + optics = LEVEL2M('Optics', menu) + optics.setObjectName('LIApp') + energy = QAction('Energy Meas', optics) + energy.setIcon(qta.icon('mdi.gauge')) + self.connect_newprocess(energy, 'sirius-hla-li-ap-energy.py') + emit = QAction('Emittance Meas', optics) + self.connect_newprocess(emit, 'sirius-hla-li-ap-emittance.py') + optics.addAction(energy) + optics.addAction(emit) + + self.add_object_to_level1(menu, PS) + self.add_object_to_level1(menu, DIG) + self.add_object_to_level1(menu, mps) + self.add_object_to_level1(menu, egun) + self.add_object_to_level1(menu, mod) + self.add_object_to_level1(menu, llrf) + self.add_object_to_level1(menu, launcher) + self.add_object_to_level1(menu, va) + self.add_object_to_level1(menu, optics) + return menu + + def _create_section_menu(self, name, sec): + sec = sec.lower() + menu = LEVEL1(name, self) + menu.setObjectName(sec.upper()+'App') + + PS = self._set_ps_menu(sec) + PS.setIcon(qta.icon('mdi.car-battery')) + self.add_object_to_level1(menu, PS) + + if sec in {'bo', 'si'}: + PU = self._set_pu_menu(sec) + PU.setIcon(qta.icon('mdi.current-ac')) + self.add_object_to_level1(menu, PU) + + RF = self._set_rf_menu(sec) + RF.setIcon(qta.icon('mdi.waves')) + self.add_object_to_level1(menu, RF) + + DIG = self._set_diagnostic_menu(sec) + self.add_object_to_level1(menu, DIG) + + VA = self._set_va_menu(sec) + self.add_object_to_level1(menu, VA) + + if sec == 'si': + INTLK = LEVEL2A('Orb.Intlk', menu) + INTLK.setIcon(qta.icon( + 'mdi.currency-sign', 'mdi.alarm-light', + options=[dict(scale_factor=1.1), dict(scale_factor=0.5)])) + self.connect_newprocess(INTLK, 'sirius-hla-si-ap-orbintlk.py') + self.add_object_to_level1(menu, INTLK) + + OPT = self._set_optics_menu(sec) + self.add_object_to_level1(menu, OPT) + + return menu + + def _create_id_menu(self): + menu = LEVEL1('ID', self) + menu.setObjectName('IDApp') + + All = LEVEL2A('All', menu) + self.connect_newprocess( + All, ['sirius-hla-si-id-control.py', '-isall']) + self.add_object_to_level1(menu, All) + + idlist = ['SI-06SB:ID-APU22', 'SI-07SP:ID-APU22', + 'SI-08SB:ID-IVU18', 'SI-09SA:ID-APU22', + 'SI-10SB:ID-DELTA52', 'SI-11SP:ID-APU58', + 'SI-14SB:ID-IVU18', 'SI-17SA:ID-APU22'] + for idname in idlist: + idname = SiriusPVName(idname) + beamline = IDSearch.conv_idname_2_beamline(idname) + text = '{0} - {1} ({2})'.format( + idname.dev, idname.sub, beamline) \ + if LEVEL2A == QAction else beamline + APU = LEVEL2A(text, menu) + self.connect_newprocess( + APU, ['sirius-hla-si-id-control.py', '-dev', idname]) + self.add_object_to_level1(menu, APU) + + return menu + + def _create_it_menu(self): + menu = LEVEL1('IT', self) + menu.setObjectName('ITApp') + + PS = self._set_ps_menu('it') + PS.setIcon(qta.icon('mdi.car-battery')) + self.add_object_to_level1(menu, PS) + + egun = LEVEL2A('Egun', menu) + egun.setIcon(qta.icon('mdi.spotlight-beam')) + self.connect_newprocess(egun, 'sirius-hla-it-eg-control.py') + self.add_object_to_level1(menu, egun) + + TI = LEVEL2A('Timing', menu) + TI.setIcon(qta.icon('mdi.timer')) + self.connect_newprocess(TI, 'sirius-hla-it-ti-control.py') + self.add_object_to_level1(menu, TI) + + Cam = LEVEL2A('Cam', menu) + Cam.setIcon(qta.icon('mdi.camera-outline')) + self.connect_newprocess(Cam, 'sirius-hla-it-di-vlight.py') + self.add_object_to_level1(menu, Cam) + + VA = self._set_va_menu('it') + self.add_object_to_level1(menu, VA) + + return menu + + def _set_optics_menu(self, sec): + optics = LEVEL2M('Optics', self) + optics.setObjectName(sec.upper()+'App') + + if sec in {'tb', 'ts'}: + launcher = QAction('Main', optics) + self.connect_newprocess( + launcher, 'sirius-hla-'+sec+'-ap-control.py') + optics.addAction(launcher) + elif sec == 'bo': + injbo = QAction('InjBO', optics) + self.connect_newprocess( + injbo, 'sirius-hla-bo-ap-injcontrol.py') + optics.addAction(injbo) + + sofb = QAction('SOFB', optics) + sofb.setIcon(qta.icon('fa5s.hammer')) + self.connect_newprocess(sofb, 'sirius-hla-'+sec+'-ap-sofb.py') + optics.addAction(sofb) + + if sec == 'si': + fofb = QAction('FOFB', optics) + fofb.setIcon(get_fofb_icon(color=False)) + self.connect_newprocess(fofb, 'sirius-hla-si-ap-fofb.py') + optics.addAction(fofb) + + if sec in {'tb', 'ts'}: + PosAng = QAction('PosAng', optics) + self.connect_newprocess( + PosAng, 'sirius-hla-'+sec+'-ap-posang.py') + optics.addAction(PosAng) + if 'tb' in sec: + Emittance = QAction('Emittance Meas', optics) + self.connect_newprocess( + Emittance, 'sirius-hla-tb-ap-emittance.py') + optics.addAction(Emittance) + if sec in {'bo', 'si'}: + TuneCorr = QAction('Tune Correction', optics) + icon = qta.icon('mdi.pulse', 'mdi.hammer', options=[ + dict(scale_factor=1.3, offset=(0.0, 0.05)), + dict(scale_factor=0.72, offset=(-0.1, -0.3), hflip=True)]) + TuneCorr.setIcon(icon) + self.connect_newprocess( + TuneCorr, 'sirius-hla-'+sec+'-ap-tunecorr.py') + optics.addAction(TuneCorr) + + ChromCorr = QAction('Chromaticity Correction', optics) + self.connect_newprocess( + ChromCorr, 'sirius-hla-'+sec+'-ap-chromcorr.py') + optics.addAction(ChromCorr) + + trajfit = QAction('Trajectory Fitting', optics) + self.connect_newprocess( + trajfit, 'sirius-hla-'+sec+'-ap-trajfit.py') + optics.addAction(trajfit) + if 'si' in sec: + CurrLT = QAction('Current and Lifetime', optics) + self.connect_newprocess( + CurrLT, 'sirius-hla-si-ap-currlt.py') + optics.addAction(CurrLT) + + coupm = QAction('Coupling Meas', optics) + self.connect_newprocess( + coupm, 'sirius-hla-si-ap-coupmeas.py') + optics.addAction(coupm) + if 'bo' in sec: + ChargeMon = QAction('Charge Monitor', optics) + self.connect_newprocess( + ChargeMon, 'sirius-hla-bo-ap-chargemon.py') + optics.addAction(ChargeMon) + + ramp = QAction('Ramp', optics) + ramp.setIcon(qta.icon('mdi.escalator', scale_factor=1.5)) + self.connect_newprocess(ramp, 'sirius-hla-bo-ap-ramp.py') + optics.addAction(ramp) + return optics + + def _set_diagnostic_menu(self, sec): + diag = LEVEL2M('DI', self) + diag.setObjectName(sec.upper()+'App') + BPMs = self._set_bpm_menu(sec) + act = QAction('BPMs', diag) + act.setIcon(qta.icon('mdi.currency-sign')) + act.setMenu(BPMs) + diag.addAction(act) + # diag.addMenu(BPMs) + if sec in {'tb', 'ts'}: + ICTs = QAction('ICTs', diag) + self.connect_newprocess(ICTs, 'sirius-hla-'+sec+'-di-icts.py') + diag.addAction(ICTs) + elif sec in {'bo', 'si'}: + DCCT = QMenu('DCCTs', diag) + DCCT.setObjectName(sec.upper()+'App') + DCCT.setIcon(qta.icon('mdi.current-dc')) + for dev in get_dcct_list(sec.upper()): + act_dev = DCCT.addAction(dev) + self.connect_newprocess( + act_dev, ['sirius-hla-as-di-dcct.py', dev]) + diag.addMenu(DCCT) + if 'tb' in sec: + Slits = QAction('Slits', diag) + self.connect_newprocess(Slits, 'sirius-hla-tb-di-slits.py') + diag.addAction(Slits) + if sec in {'bo', 'si'}: + Tune = QAction('Tune', diag) + Tune.setIcon(qta.icon('mdi.pulse', scale_factor=1.3)) + self.connect_newprocess(Tune, 'sirius-hla-'+sec+'-di-tune.py') + diag.addAction(Tune) + VLight = QAction('VLight', diag) + self.connect_newprocess( + VLight, 'sirius-hla-'+sec+'-di-vlight.py') + diag.addAction(VLight) + if 'si' not in sec: + Scrns = QMenu('Screens', diag) + Scrns.setIcon(qta.icon('mdi.camera-metering-center')) + Scrns.setObjectName(sec.upper()+'App') + for dev in get_scrn_list(sec.upper()): + act_dev = Scrns.addAction(dev) + self.connect_newprocess( + act_dev, ['sirius-hla-as-di-scrn.py', dev]) + diag.addMenu(Scrns) + else: + Scrap = QAction('Scrapers', diag) + self.connect_newprocess(Scrap, 'sirius-hla-si-di-scraps.py') + diag.addAction(Scrap) + + Dvf = QMenu('CAX DVFs', diag) + Dvf.setObjectName('SIApp') + + Dvf1 = Dvf.addAction('DVF 1') + self.connect_newprocess( + Dvf1, ['sirius-hla-bl-ap-imgproc.py', + 'CAX:A:BASLER01']) + + Dvf2 = Dvf.addAction('DVF 2') + self.connect_newprocess( + Dvf2, ['sirius-hla-bl-ap-imgproc.py', + 'CAX:B:BASLER01']) + + diag.addMenu(Dvf) + + BbB = QMenu('BbB', diag) + BbB.setObjectName(sec.upper()+'App') + + AllBbB = BbB.addAction('All') + self.connect_newprocess( + AllBbB, ['sirius-hla-si-di-bbb.py', '-dev', 'all']) + + for idc in ['Horizontal', 'Vertical', 'Longitudinal']: + dev_pref = 'SI-Glob:DI-BbBProc-'+idc[0] + act_dev = BbB.addAction(idc) + self.connect_newprocess( + act_dev, ['sirius-hla-si-di-bbb.py', '-dev', dev_pref]) + + diag.addMenu(BbB) + return diag + + def _set_bpm_menu(self, sec): + cmd = ['sirius-hla-as-di-bpm.py', sec] + menu = QMenu('BPMs', self) + menu.setObjectName(sec.upper()+'App') + menu.setIcon(qta.icon('mdi.currency-sign')) + if sec == 'si': + action = menu.addAction('Equalize Switching') + action.setIcon(qta.icon('mdi.approximately-equal-box')) + self.connect_newprocess( + action, 'sirius-hla-si-di-equalize_bpms_switching.py') + action = menu.addAction('Monitor') + action.setIcon(util.get_monitor_icon('mdi.currency-sign')) + self.connect_newprocess(action, cmd + ['-w', 'Monitor', ]) + menu2 = menu.addMenu('Acquisition Data') + menu2.setObjectName(sec.upper()+'App') + if sec in {'bo', 'si'}: + for mode in ('Antennas', 'Positions'): + menu3 = menu2.addMenu(mode) + menu3.setObjectName(sec.upper()+'App') + cmd2 = cmd + ['-m', mode] + self._create_bpm_actions(sec, menu3, 'AcqData', cmd2) + else: + for mode in ('Antennas', 'Positions'): + cmd2 = cmd + ['-m', mode] + self._create_bpm_actions( + sec, menu2, 'AcqData', cmd2, mode) + return menu + + def _create_bpm_actions(self, sec, menu, act, cmd, name=None): + cmd = cmd + ['-w', act] + if sec == 'bo': + for i in range(5): + action = menu.addAction('subsec {0:02d}-{1:02d}'.format( + 10*i+2, ((10*(i+1)+1)) % 50)) + self.connect_newprocess(action, cmd + ['-s', str(i+1)]) + elif sec == 'si': + for i in range(1, 21): + sub = '{0:02d}'.format(i) + action = menu.addAction('SI-' + sub) + self.connect_newprocess(action, cmd + ['-s', sub]) + else: + action = menu.addAction(name) + self.connect_newprocess(action, cmd) + + def _set_ps_menu(self, sec): + scr = 'sirius-hla-' + sec + '-ps-control.py' + psmenu = LEVEL2M('PS', self) + psmenu.setObjectName(sec.upper()+'App') + + if sec == 'it': + lens = QAction('Lens', psmenu) + self.connect_newprocess(lens, [scr, '--device', 'lens']) + psmenu.addAction(lens) + return psmenu + + all_dev = QAction( + 'All'+('' if sec != 'si' else ' Families'), psmenu) + self.connect_newprocess(all_dev, [scr, '--device', 'all']) + psmenu.addAction(all_dev) + + # dips + if sec != 'li': + dip = QAction('Dipoles', psmenu) + self.connect_newprocess(dip, [scr, '--device', 'dipole']) + psmenu.addAction(dip) + else: + spect = QAction('Spectrometer', psmenu) + self.connect_newprocess( + spect, [scr, '--device', 'spectrometer']) + psmenu.addAction(spect) + + # quads + quad = QAction('Quadrupoles', psmenu) + self.connect_newprocess(quad, [scr, '--device', 'quadrupole']) + psmenu.addAction(quad) + + # sext + if sec in {'bo', 'si'}: + sext = QAction('Sextupoles', psmenu) + self.connect_newprocess(sext, [scr, '--device', 'sextupole']) + psmenu.addAction(sext) + + ps_indiv = { + 'Correctors': { + 'device': 'corrector-slow', + 'graphs': {'All': 'C(H|V)', 'CH': 'CH', 'CV': 'CV'}, + }, + 'Trims': { + 'device': 'trim-quadrupole', + 'graphs': {'All': 'Q(F|D|[1-4]).*', 'QF': 'QF.*', + 'QD': 'QD.*', 'Q1,Q2,Q3&&Q4': 'Q[1-4].*'}, + }, + 'Skew Quadrupoles': { + 'device': 'skew-quadrupole', + 'graphs': {'All': 'QS'}, + }, + 'Fast Correctors': { + 'device': 'corrector-fast', + 'graphs': {'All': 'FC(H|V)', 'FCH': 'FCH', 'FCV': 'FCV'}, + }, + 'Septa Feedforward Correctors': { + 'device': 'corrector-septff', + 'graphs': { + 'All': 'FFC(H|V)', 'FFCH': 'FFCH', 'FFCV': 'FFCV', + }, + }, + } + if sec != 'li': + for pstype, data in ps_indiv.items(): + type_menu = psmenu.addMenu(pstype) + type_menu.setObjectName(sec.upper()+'App') + + if sec == 'si' and 'Feedforward' not in pstype: + all_menu = type_menu.addMenu('All') + all_menu.setObjectName(sec.upper()+'App') + elif 'Correctors' in pstype: + all_menu = type_menu + + # list + all_lst_act = QAction('List', all_menu) + self.connect_newprocess( + all_lst_act, [scr, '--device', data['device']]) + all_menu.addAction(all_lst_act) + + # graphs + if len(data['graphs']) > 1: + all_gph_menu = all_menu.addMenu('Graph') + all_gph_menu.setObjectName(sec.upper()+'App') + for label, filt in data['graphs'].items(): + act = QAction(label, all_gph_menu) + self.connect_newprocess( + act, ['sirius-hla-as-ps-graphmon.py', + '--section', sec.upper(), + '--device', filt]) + all_gph_menu.addAction(act) + else: + all_gph_act = QAction('Graph', all_menu) + self.connect_newprocess( + all_gph_act, + ['sirius-hla-as-ps-graphmon.py', + '--section', sec.upper(), '--device', + data['graphs']['All']]) + all_menu.addAction(all_gph_act) + + if sec != 'si' or 'Feedforward' in pstype: + break + + # subsectors + sec_menu = type_menu.addMenu('Subsectors') + sec_menu.setObjectName('SIApp') + for i in range(20): + act = sec_menu.addAction('SI-{:02d}'.format(i+1)) + self.connect_newprocess( + act, [scr, '--device', data['device'], + '--subsection', '{:02d}.*'.format(i+1)]) + + # trims fams + if pstype != 'Trims': + continue + + fam_all_menu = type_menu.addMenu('Families') + fam_all_menu.setObjectName('SIApp') + fams = PSSearch.get_psnames( + {'sec': 'SI', 'sub': 'Fam', 'dev': 'Q(D|F|[1-4]).*'}) + for fam in fams: + fam = SiriusPVName(fam) + fam_menu = fam_all_menu.addMenu(fam.dev) + fam_menu.setObjectName('SIApp') + act1 = QAction('List', fam_menu) + self.connect_newprocess( + act1, [scr, '--device', fam, '-istrim']) + fam_menu.addAction(act1) + act2 = QAction('Graph', fam_menu) + self.connect_newprocess( + act2, ['sirius-hla-as-ps-graphmon.py', + '--section', 'SI', '--device', fam.dev]) + fam_menu.addAction(act2) + else: + corrs = QAction('Correctors', psmenu) + self.connect_newprocess( + corrs, [scr, '--device', 'corrector-slow']) + psmenu.addAction(corrs) + lens = QAction('Lens', psmenu) + self.connect_newprocess(lens, [scr, '--device', 'lens']) + psmenu.addAction(lens) + slnd = QAction('Solenoids', psmenu) + self.connect_newprocess(slnd, [scr, '--device', 'solenoid']) + psmenu.addAction(slnd) + + if sec == 'bo': + skew = QAction('Skew Quadrupoles', psmenu) + self.connect_newprocess( + skew, [scr, '--device', 'skew-quadrupole']) + psmenu.addAction(skew) + + wfmerr = QAction('Waveform Error', psmenu) + self.connect_newprocess(wfmerr, 'sirius-hla-bo-ps-wfmerror.py') + psmenu.addAction(wfmerr) + + return psmenu + + def _set_pu_menu(self, sec): + pumenu = LEVEL2M('PU', self) + pumenu.setObjectName(sec.upper()+'App') + script = 'sirius-hla-' + sec + '-pu-control.py' + if sec == 'si': + pmag = QAction('Injection', pumenu) + self.connect_newprocess(pmag, [script, '-s', 'InjSI']) + pumenu.addAction(pmag) + pmag = QAction('Pingers', pumenu) + self.connect_newprocess(pmag, [script, '-s', 'PingSI']) + pumenu.addAction(pmag) + elif sec == 'bo': + pmag = QAction('Injection', pumenu) + self.connect_newprocess(pmag, [script, '-s', 'InjBO']) + pumenu.addAction(pmag) + pmag = QAction('Ejection', pumenu) + self.connect_newprocess(pmag, [script, '-s', 'EjeBO']) + pumenu.addAction(pmag) + elif sec == 'as': + pmag = QAction('InjBO, EjeBO, InjSI && PingSI', pumenu) + self.connect_newprocess( + pmag, 'sirius-hla-as-pu-control.py') + pumenu.addAction(pmag) + pmag = QAction('TB, BO, TS && SI', pumenu) + self.connect_newprocess( + pmag, ['sirius-hla-as-pu-control.py', '-g', 'sectors']) + pumenu.addAction(pmag) + return pumenu + + def _set_rf_menu(self, sec): + menu = LEVEL2M('RF', self) + menu.setObjectName(sec.upper()+'App') + + status = QAction('Main', menu) + status.setIcon(qta.icon('mdi.waves')) + self.connect_newprocess( + status, 'sirius-hla-'+sec.lower()+'-rf-control.py') + menu.addAction(status) + return menu + + def _set_va_menu(self, sec): + secl = sec.lower() + menu = LEVEL2M('VA', self) + menu.setIcon(qta.icon('mdi.network-outline', vflip=True)) + menu.setObjectName(sec.upper()+'App') + + if sec != 'it': + agilent = QAction('Agilent', menu) + self.connect_newprocess( + agilent, + 'sirius-hla-'+secl+'-va-agilent4uhv-overview', + is_pydm=True) + menu.addAction(agilent) + + mks = QAction('MKS', menu) + self.connect_newprocess( + mks, + 'sirius-hla-'+secl+'-va-mks937b-overview', + is_pydm=True) + menu.addAction(mks) + + return menu + + def connect_newprocess(self, button, cmd, is_pydm=False): + util.connect_newprocess(button, cmd, parent=self, is_pydm=is_pydm) + + def _applyconfig(self): + sender_text = self.sender().text() + if 'Standby' in sender_text: + config_name = 'standby' + elif 'TurnOff' in sender_text: + config_name = 'turnoff' + + ans = QMessageBox.question( + self, 'Are you Sure?', + "Do you really want to apply the Configuration '" + + config_name + "' to the machine?", + QMessageBox.Yes, QMessageBox.Cancel) + if ans != QMessageBox.Yes: + return + + current, ok = QInputDialog.getDouble( + self, 'Enter value: ', + 'Enter FilaPS standby current [A]\n' + 'or cancel to not set it: ', + value=0.7, min=0.0, max=1.5, decimals=3) + if ok: + fila_pv = _PV( + _prefix+'LI-01:EG-FilaPS:currentoutsoft', + connection_timeout=0.05) + fila_pv.get() # force connection + if fila_pv.connected: + fila_pv.put(current) + else: + QMessageBox.warning( + self, 'Message', + 'Could not connect to LI-01:EG-FilaPS!') + + client = ConfigDBClient() + + WinClass = create_window_from_widget( + SelectAndApplyPVsWidget, 'Select PVs to Apply Standby') + wind = WinClass(self, client) + wind.widget.settingFinished.connect(wind.close) + wind.widget.fill_config('global_config', config_name) + wind.exec_() + + def _change_resolution(self): + res = self.sender().text() + out = _sbp.getoutput('xrandr').splitlines() + disps = [o for o in out if ' connected' in o] + ds_names = [d.split(' ')[0] for d in disps] + + reg = '[0-9]{4}x[0-9]{4}\+([0-9]{1,4})\+[0-9]{1,4}' + ds_pos = [ + _re.findall(reg, d)[0] for di in disps + for d in di.split(' ') if _re.match(reg, d)] + + _, ds_names = list(zip(*sorted(zip(ds_pos, ds_names)))) + for i, name in enumerate(ds_names): + cmd = f'xrandr --auto --output {name:s} --mode {res:s}' + if i: + oname = ds_names[i-1] + cmd += f' --right-of {oname:s}' + _sbp.getoutput(cmd) + + return MainMenuBar(parent=parent)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_machshift/widgets.html b/_modules/siriushla/as_ap_machshift/widgets.html new file mode 100644 index 000000000..575f0242c --- /dev/null +++ b/_modules/siriushla/as_ap_machshift/widgets.html @@ -0,0 +1,208 @@ + + + + + + siriushla.as_ap_machshift.widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_machshift.widgets

+"""MachShift widgets."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGridLayout
+
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..widgets import SiriusLabel, SiriusFrame
+
+
+
+[docs] +class MachShiftLabel(QWidget): + """Machine Shift Label.""" + + def __init__(self, parent=None, prefix=''): + """Init.""" + super().__init__(parent) + + pvname = _PVName('AS-Glob:AP-MachShift:Mode-Sts') + pvname = pvname.substitute(prefix=prefix) + + self.label = SiriusLabel(self, pvname) + self.label.setAlignment(Qt.AlignCenter) + + color_list = [ + SiriusFrame.Yellow, # Users + SiriusFrame.MediumBlue, # Commissioning + SiriusFrame.DarkCyan, # Conditioning + SiriusFrame.Salmon, # Injection + SiriusFrame.LightBlue, # MachineStudy + SiriusFrame.MediumGreen, # Maintenance + SiriusFrame.LightGray, # Standby + SiriusFrame.DarkGray, # Shutdown + SiriusFrame.MediumBlue, # MachineStartup + SiriusFrame.LightSalmon, # BeamlineCommissioning + ] + self.frame = SiriusFrame( + self, pvname, + color_list=color_list, is_float=False) + self.frame.add_widget(self.label) + + lay = QGridLayout(self) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(self.frame)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_macreport/main.html b/_modules/siriushla/as_ap_macreport/main.html new file mode 100644 index 000000000..60a6fcec3 --- /dev/null +++ b/_modules/siriushla/as_ap_macreport/main.html @@ -0,0 +1,836 @@ + + + + + + siriushla.as_ap_macreport.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_macreport.main

+"""Machine reports."""
+
+import numpy as _np
+
+from qtpy.QtCore import Qt, Signal, QThread
+from qtpy.QtWidgets import QWidget, QGridLayout, QGroupBox, QTabWidget, \
+    QDateTimeEdit, QLabel, QPushButton, QListWidget, QListWidgetItem, \
+    QMessageBox, QSpacerItem, QSizePolicy as QSzPlcy
+
+import qtawesome as qta
+
+from siriuspy.clientarch import Time
+from siriuspy.machshift.macreport import MacReport
+
+from ..widgets import SiriusMainWindow, MatplotlibWidget, SiriusDialog
+
+
+
+[docs] +class MacReportWindow(SiriusMainWindow): + """Machine Report Window.""" + + def __init__(self, parent=None): + """Init.""" + super().__init__(parent) + self._macreport = MacReport() + self._macreport.connector.timeout = 5*60 + + self.setWindowIcon(qta.icon('fa5s.book', color='gray')) + self.setWindowTitle('Machine Reports') + + self._fsi = '{:8d}' + self._fs1 = '{:8.3f}' + self._fs2 = '{:8.3f} ± {:8.3f}' + self._fst1 = '{:02d}h{:02d}' + self._fst2 = '{:02d}h{:02d} ± {:02d}h{:02d}' + + self._update_task = None + + self._setupUi() + self.setFocusPolicy(Qt.StrongFocus) + self.setFocus(True) + + def _setupUi(self): + cwid = QWidget(self) + self.setCentralWidget(cwid) + + title = QLabel('<h3>Machine Reports</h3>', self, + alignment=Qt.AlignCenter) + + self._timesel_gbox = self._setupTimePeriodSelWidget() + self._timesel_gbox.setObjectName('timesel_gbox') + self._timesel_gbox.setStyleSheet( + "#timesel_gbox{min-height: 8em; max-height: 8em;}") + + self._progress_list = QListWidget(self) + self._progress_list.setObjectName('progress_list') + self._progress_list.setStyleSheet( + "#progress_list{min-height: 8em; max-height: 8em;}") + + self._reports_wid = QTabWidget(cwid) + self._reports_wid.setObjectName('ASTab') + self._reports_wid.addTab( + self._setupUserShiftStatsWidget(), 'User Shift Stats') + self._reports_wid.addTab( + self._setupLightSourceUsageStats(), 'Light Source Usage Stats') + self._reports_wid.addTab( + self._setupStoredCurrentStats(), 'Stored Current Stats') + + self._pb_showraw = QPushButton( + qta.icon('mdi.chart-line'), 'Show Raw Data', self) + self._pb_showraw.setEnabled(False) + self._pb_showraw.clicked.connect(self._show_raw_data) + + self._pb_showpvsd = QPushButton( + qta.icon('mdi.chart-line'), + 'Show Progrmd.vs.Delivered Hours', self) + self._pb_showpvsd.setEnabled(False) + self._pb_showpvsd.clicked.connect(self._show_progmd_vs_delivd) + + lay = QGridLayout(cwid) + lay.setVerticalSpacing(10) + lay.setHorizontalSpacing(10) + lay.setContentsMargins(18, 9, 18, 9) + lay.addWidget(title, 0, 0, 1, 3) + lay.addWidget(self._timesel_gbox, 1, 0) + lay.addWidget(self._progress_list, 1, 1, 1, 2, + alignment=Qt.AlignBottom) + lay.addWidget(self._reports_wid, 2, 0, 1, 3) + lay.addWidget(self._pb_showpvsd, 4, 0, alignment=Qt.AlignLeft) + lay.addWidget(self._pb_showraw, 4, 2, alignment=Qt.AlignRight) + + self._updateUserShiftStats(setup=True) + self._updateStoredCurrentStats(setup=True) + self._updateLightSourceUsageStats(setup=True) + + def _setupTimePeriodSelWidget(self): + tnow = Time.now() + + ld_tstart = QLabel('Time start: ') + self.dt_start = QDateTimeEdit(tnow-10*60, self) + self.dt_start.setCalendarPopup(True) + self.dt_start.setMinimumDate(Time(2020, 1, 1)) + self.dt_start.setDisplayFormat('dd/MM/yyyy hh:mm') + + ld_tstop = QLabel('Time stop: ') + self.dt_stop = QDateTimeEdit(tnow, self) + self.dt_stop.setCalendarPopup(True) + self.dt_stop.setMinimumDate(Time(2020, 1, 1)) + self.dt_stop.setDisplayFormat('dd/MM/yyyy hh:mm') + + self.pb_search = QPushButton(qta.icon('fa5s.search'), 'Search', self) + self.pb_search.clicked.connect(self._do_update) + self.pb_search.setObjectName('pb_search') + self.pb_search.setStyleSheet(""" + #pb_search{ + min-width:100px; max-width:100px; + min-height:25px; max-height:25px; + icon-size:20px;} + """) + + wid = QGroupBox('Select interval: ', self) + lay = QGridLayout(wid) + lay.addWidget(ld_tstart, 0, 0) + lay.addWidget(self.dt_start, 0, 1) + lay.addWidget(ld_tstop, 1, 0) + lay.addWidget(self.dt_stop, 1, 1) + lay.addWidget(self.pb_search, 2, 1, alignment=Qt.AlignRight) + return wid + + def _setupUserShiftStatsWidget(self): + self.lb_uspt = LbData('') + self.lb_usdt = LbData('') + self.lb_ustt = LbData('') + self.lb_uset = LbData('') + self.lb_uspc = LbData('') + self.lb_cav = LbData('') + self.lb_cbav = LbData('') + self.lb_ceav = LbData('') + self.lb_tft = LbData('') + self.lb_bdc = LbData('') + self.lb_mttr = LbData('') + self.lb_mtbf = LbData('') + self.lb_reli = LbData('') + self.lb_tsbt = LbData('') + self.lb_tubt = LbData('') + self.lb_mtbu = LbData('') + self.lb_rsbt = LbData('') + self.lb_itav = LbData('') + + wid = QWidget(self) + lay = QGridLayout(wid) + lay.setVerticalSpacing(0) + lay.setHorizontalSpacing(0) + lay.setAlignment(Qt.AlignTop) + lay.addItem(QSpacerItem(120, 1, QSzPlcy.Fixed, QSzPlcy.Ignored), 0, 0) + lay.addWidget(LbHHeader('Programmed Time (h)'), 0, 1) + lay.addWidget(self.lb_uspt, 0, 2) + lay.addWidget(LbHHeader('Delivered Time (h)'), 1, 1) + lay.addWidget(self.lb_usdt, 1, 2) + lay.addWidget(LbHHeader('Total Time (h)'), 2, 1) + lay.addWidget(self.lb_ustt, 2, 2) + lay.addWidget(LbHHeader('Extra Time (h)'), 3, 1) + lay.addWidget(self.lb_uset, 3, 2) + lay.addWidget(LbHHeader('# Programmed Shifts'), 4, 1) + lay.addWidget(self.lb_uspc, 4, 2) + lay.addWidget(LbHHeader('Current (avg ± std) (mA)'), 5, 1) + lay.addWidget(self.lb_cav, 5, 2) + lay.addWidget(LbHHeader( + 'Current at the Beg. of the Shift (avg ± std) (mA)'), 6, 1) + lay.addWidget(self.lb_cbav, 6, 2) + lay.addWidget(LbHHeader( + 'Current at the End of the Shift (avg ± std) (mA)'), 7, 1) + lay.addWidget(self.lb_ceav, 7, 2) + lay.addWidget(LbHHeader('Total Failures Time (h)'), 8, 1) + lay.addWidget(self.lb_tft, 8, 2) + lay.addWidget(LbHHeader('# Beam Dumps'), 9, 1) + lay.addWidget(self.lb_bdc, 9, 2) + lay.addWidget(LbHHeader('Time To Recover (avg ± std) (h)'), 10, 1) + lay.addWidget(self.lb_mttr, 10, 2) + lay.addWidget(LbHHeader('Time Between Failures (avg) (h)'), 11, 1) + lay.addWidget(self.lb_mtbf, 11, 2) + lay.addWidget(LbHHeader('Beam Reliability (%)'), 12, 1) + lay.addWidget(self.lb_reli, 12, 2) + lay.addWidget(LbHHeader('Total stable beam time (h)'), 13, 1) + lay.addWidget(self.lb_tsbt, 13, 2) + lay.addWidget(LbHHeader('Total unstable beam time (h)'), 14, 1) + lay.addWidget(self.lb_tubt, 14, 2) + lay.addWidget(LbHHeader( + 'Time between unstable beams (avg) (h)'), 15, 1) + lay.addWidget(self.lb_mtbu, 15, 2) + lay.addWidget(LbHHeader('Relative stable beam time (%)'), 16, 1) + lay.addWidget(self.lb_rsbt, 16, 2) + lay.addWidget(LbHHeader('Injection time (avg ± std) (h)'), 17, 1) + lay.addWidget(self.lb_itav, 17, 2) + lay.addItem(QSpacerItem(120, 1, QSzPlcy.Fixed, QSzPlcy.Ignored), 0, 3) + return wid + + def _updateUserShiftStats(self, setup=False): + w2r = { + 'uspt': ['usershift_progmd_time', ], + 'usdt': ['usershift_delivd_time', ], + 'ustt': ['usershift_total_time', ], + 'uset': ['usershift_extra_time', ], + 'uspc': ['usershift_progmd_count', ], + 'cav': ['usershift_current_average', + 'usershift_current_stddev'], + 'cbav': ['usershift_current_beg_average', + 'usershift_current_beg_stddev'], + 'ceav': ['usershift_current_end_average', + 'usershift_current_end_stddev'], + 'tft': ['usershift_total_failures_time', ], + 'bdc': ['usershift_beam_dump_count', ], + 'mttr': ['usershift_time_to_recover_average', + 'usershift_time_to_recover_stddev'], + 'mtbf': ['usershift_time_between_failures_average', ], + 'reli': ['usershift_beam_reliability', ], + 'tsbt': ['usershift_total_stable_beam_time', ], + 'tubt': ['usershift_total_unstable_beam_time', ], + 'mtbu': ['usershift_time_between_unstable_beams_average'], + 'rsbt': ['usershift_relative_stable_beam_time'], + 'itav': ['usershift_injection_time_average', + 'usershift_injection_time_stddev']} + + for wname, rname in w2r.items(): + wid = getattr(self, 'lb_'+wname) + items = [getattr(self._macreport, n) for n in rname] + if 'time' in rname[0] and 'relative' not in rname[0]: + if len(items) == 2: + if items[0] not in [None, _np.inf]: + hour1 = int(items[0]) + minu1 = int((items[0] - hour1)*60) + hour2 = int(items[1]) + minu2 = int((items[1] - hour2)*60) + items = [hour1, minu1, hour2, minu2] + str2fmt = self._fst2 + else: + str2fmt = self._fs1 + elif items[0] not in [None, _np.inf]: + hour = int(items[0]) + minu = int((items[0] - hour)*60) + items = [hour, minu] + str2fmt = self._fst1 + else: + str2fmt = self._fs1 + else: + str2fmt = getattr( + self, '_fsi' if 'count' in rname[0] + else '_fs'+str(len(rname))) + text = '' if any([i is None for i in items]) \ + else str2fmt.format(*items) + wid.setText(text) + if setup: + wid.setToolTip(getattr(MacReport, rname[0]).__doc__) + + def _setupStoredCurrentStats(self): + self.lb_user_mb_avg = LbData('') + self.lb_user_mb_intvl = LbData('') + self.lb_user_sb_avg = LbData('') + self.lb_user_sb_intvl = LbData('') + self.lb_user_tt_avg = LbData('') + self.lb_user_tt_intvl = LbData('') + self.lb_commi_mb_avg = LbData('') + self.lb_commi_mb_intvl = LbData('') + self.lb_commi_sb_avg = LbData('') + self.lb_commi_sb_intvl = LbData('') + self.lb_commi_tt_avg = LbData('') + self.lb_commi_tt_intvl = LbData('') + self.lb_condi_mb_avg = LbData('') + self.lb_condi_mb_intvl = LbData('') + self.lb_condi_sb_avg = LbData('') + self.lb_condi_sb_intvl = LbData('') + self.lb_condi_tt_avg = LbData('') + self.lb_condi_tt_intvl = LbData('') + self.lb_mstdy_mb_avg = LbData('') + self.lb_mstdy_mb_intvl = LbData('') + self.lb_mstdy_sb_avg = LbData('') + self.lb_mstdy_sb_intvl = LbData('') + self.lb_mstdy_tt_avg = LbData('') + self.lb_mstdy_tt_intvl = LbData('') + self.lb_stord_mb_avg = LbData('') + self.lb_stord_mb_intvl = LbData('') + self.lb_stord_sb_avg = LbData('') + self.lb_stord_sb_intvl = LbData('') + self.lb_stord_tt_avg = LbData('') + self.lb_stord_tt_intvl = LbData('') + + wid = QWidget(self) + lay = QGridLayout(wid) + lay.setVerticalSpacing(0) + lay.setHorizontalSpacing(0) + lay.setAlignment(Qt.AlignTop) + lay.addWidget(LbHHeader( + 'Current (avg ± std) (mA) (MB)'), 1, 0) + lay.addWidget(LbHHeader('Time in MB mode (h)'), 2, 0) + lay.addWidget(LbHHeader( + 'Current (avg ± std) (mA) (SB)'), 3, 0) + lay.addWidget(LbHHeader('Time in SB mode (h)'), 4, 0) + lay.addWidget(LbHHeader( + 'Current (avg ± std) (mA) (SB+MB)'), 5, 0) + lay.addWidget(LbHHeader('Total Time (h) (SB+MB)'), 6, 0) + lay.addWidget(LbVHeader('Users'), 0, 1) + lay.addWidget(self.lb_user_mb_avg, 1, 1) + lay.addWidget(self.lb_user_mb_intvl, 2, 1) + lay.addWidget(self.lb_user_sb_avg, 3, 1) + lay.addWidget(self.lb_user_sb_intvl, 4, 1) + lay.addWidget(self.lb_user_tt_avg, 5, 1) + lay.addWidget(self.lb_user_tt_intvl, 6, 1) + lay.addWidget(LbVHeader('Commissioning'), 0, 2) + lay.addWidget(self.lb_commi_mb_avg, 1, 2) + lay.addWidget(self.lb_commi_mb_intvl, 2, 2) + lay.addWidget(self.lb_commi_sb_avg, 3, 2) + lay.addWidget(self.lb_commi_sb_intvl, 4, 2) + lay.addWidget(self.lb_commi_tt_avg, 5, 2) + lay.addWidget(self.lb_commi_tt_intvl, 6, 2) + lay.addWidget(LbVHeader('Conditioning'), 0, 3) + lay.addWidget(self.lb_condi_mb_avg, 1, 3) + lay.addWidget(self.lb_condi_mb_intvl, 2, 3) + lay.addWidget(self.lb_condi_sb_avg, 3, 3) + lay.addWidget(self.lb_condi_sb_intvl, 4, 3) + lay.addWidget(self.lb_condi_tt_avg, 5, 3) + lay.addWidget(self.lb_condi_tt_intvl, 6, 3) + lay.addWidget(LbVHeader('Machine Study'), 0, 4) + lay.addWidget(self.lb_mstdy_mb_avg, 1, 4) + lay.addWidget(self.lb_mstdy_mb_intvl, 2, 4) + lay.addWidget(self.lb_mstdy_sb_avg, 3, 4) + lay.addWidget(self.lb_mstdy_sb_intvl, 4, 4) + lay.addWidget(self.lb_mstdy_tt_avg, 5, 4) + lay.addWidget(self.lb_mstdy_tt_intvl, 6, 4) + lay.addWidget(LbVHeader('All Stored Beam'), 0, 5) + lay.addWidget(self.lb_stord_mb_avg, 1, 5) + lay.addWidget(self.lb_stord_mb_intvl, 2, 5) + lay.addWidget(self.lb_stord_sb_avg, 3, 5) + lay.addWidget(self.lb_stord_sb_intvl, 4, 5) + lay.addWidget(self.lb_stord_tt_avg, 5, 5) + lay.addWidget(self.lb_stord_tt_intvl, 6, 5) + return wid + + def _updateStoredCurrentStats(self, setup=False): + shifttype = { + 'mstdy': 'machinestudy', + 'commi': 'commissioning', + 'condi': 'conditioning', + 'stord': 'ebeam', + 'user': 'users'} + fillmode = { + 'mb': 'multibunch', + 'sb': 'singlebunch', + 'tt': 'total'} + stats = { + 'avg': ['average', 'stddev'], + 'intvl': ['time', ]} + + for wsht, rsht in shifttype.items(): + for wfm, rfm in fillmode.items(): + for wstt, rstt in stats.items(): + wid = getattr(self, 'lb_'+wsht+'_'+wfm+'_'+wstt) + pname = 'current_'+rsht+'_'+rfm+'_' + items = [getattr(self._macreport, pname+i) + for i in rstt] + if 'time' in rstt[0] and items[0] is not None: + hour = int(items[0]) + minu = int((items[0] - hour)*60) + items = [hour, minu] + str2fmt = getattr( + self, '_fst1' if ('time' in rstt[0]) + else '_fs'+str(len(rstt))) + text = '' if any([i is None for i in items]) \ + else str2fmt.format(*items) + wid.setText(text) + if setup: + wid.setToolTip( + getattr(MacReport, pname + rstt[0]).__doc__) + + def _setupLightSourceUsageStats(self): + self.lb_mstdy_fail_intvl = LbData('') + self.lb_mstdy_fail_pcntl = LbData('') + self.lb_mstdy_oper_intvl = LbData('') + self.lb_mstdy_oper_pcntl = LbData('') + self.lb_mstdy_total_intvl = LbData('') + self.lb_mstdy_total_pcntl = LbData('') + self.lb_commi_fail_intvl = LbData('') + self.lb_commi_fail_pcntl = LbData('') + self.lb_commi_oper_intvl = LbData('') + self.lb_commi_oper_pcntl = LbData('') + self.lb_commi_total_intvl = LbData('') + self.lb_commi_total_pcntl = LbData('') + self.lb_condi_fail_intvl = LbData('') + self.lb_condi_fail_pcntl = LbData('') + self.lb_condi_oper_intvl = LbData('') + self.lb_condi_oper_pcntl = LbData('') + self.lb_condi_total_intvl = LbData('') + self.lb_condi_total_pcntl = LbData('') + self.lb_maint_fail_intvl = LbData('') + self.lb_maint_fail_pcntl = LbData('') + self.lb_maint_oper_intvl = LbData('') + self.lb_maint_oper_pcntl = LbData('') + self.lb_maint_total_intvl = LbData('') + self.lb_maint_total_pcntl = LbData('') + self.lb_user_fail_intvl = LbData('') + self.lb_user_fail_pcntl = LbData('') + self.lb_user_oper_intvl = LbData('') + self.lb_user_oper_pcntl = LbData('') + self.lb_user_total_intvl = LbData('') + self.lb_user_total_pcntl = LbData('') + self.lb_total_intvl = LbHHeader('Total Usage Time (h): - ') + + wid = QWidget(self) + lay = QGridLayout(wid) + lay.setVerticalSpacing(0) + lay.setHorizontalSpacing(0) + lay.setAlignment(Qt.AlignTop) + lay.addWidget(LbHHeader('Operational Time (h)'), 1, 0) + lay.addWidget(LbHHeader('Operational Percentage (%)'), 2, 0) + lay.addWidget(LbHHeader('Failures Time (h)'), 3, 0) + lay.addWidget(LbHHeader('Failures Percentage (%)'), 4, 0) + lay.addWidget(LbHHeader('Shift Time (h)'), 5, 0) + lay.addWidget(LbHHeader('Shift Percentage (%)'), 6, 0) + lay.addWidget(self.lb_total_intvl, 7, 0, 1, 6) + lay.addWidget(LbVHeader('Users'), 0, 1) + lay.addWidget(self.lb_user_oper_intvl, 1, 1) + lay.addWidget(self.lb_user_oper_pcntl, 2, 1) + lay.addWidget(self.lb_user_fail_intvl, 3, 1) + lay.addWidget(self.lb_user_fail_pcntl, 4, 1) + lay.addWidget(self.lb_user_total_intvl, 5, 1) + lay.addWidget(self.lb_user_total_pcntl, 6, 1) + lay.addWidget(LbVHeader('Commissioning'), 0, 2) + lay.addWidget(self.lb_commi_oper_intvl, 1, 2) + lay.addWidget(self.lb_commi_oper_pcntl, 2, 2) + lay.addWidget(self.lb_commi_fail_intvl, 3, 2) + lay.addWidget(self.lb_commi_fail_pcntl, 4, 2) + lay.addWidget(self.lb_commi_total_intvl, 5, 2) + lay.addWidget(self.lb_commi_total_pcntl, 6, 2) + lay.addWidget(LbVHeader('Conditioning'), 0, 3) + lay.addWidget(self.lb_condi_oper_intvl, 1, 3) + lay.addWidget(self.lb_condi_oper_pcntl, 2, 3) + lay.addWidget(self.lb_condi_fail_intvl, 3, 3) + lay.addWidget(self.lb_condi_fail_pcntl, 4, 3) + lay.addWidget(self.lb_condi_total_intvl, 5, 3) + lay.addWidget(self.lb_condi_total_pcntl, 6, 3) + lay.addWidget(LbVHeader('Machine Study'), 0, 4) + lay.addWidget(self.lb_mstdy_oper_intvl, 1, 4) + lay.addWidget(self.lb_mstdy_oper_pcntl, 2, 4) + lay.addWidget(self.lb_mstdy_fail_intvl, 3, 4) + lay.addWidget(self.lb_mstdy_fail_pcntl, 4, 4) + lay.addWidget(self.lb_mstdy_total_intvl, 5, 4) + lay.addWidget(self.lb_mstdy_total_pcntl, 6, 4) + lay.addWidget(LbVHeader('Maintenance'), 0, 5) + lay.addWidget(self.lb_maint_oper_intvl, 1, 5) + lay.addWidget(self.lb_maint_oper_pcntl, 2, 5) + lay.addWidget(self.lb_maint_fail_intvl, 3, 5) + lay.addWidget(self.lb_maint_fail_pcntl, 4, 5) + lay.addWidget(self.lb_maint_total_intvl, 5, 5) + lay.addWidget(self.lb_maint_total_pcntl, 6, 5) + return wid + + def _updateLightSourceUsageStats(self, setup=False): + shifttype = { + 'mstdy': 'machinestudy', + 'commi': 'commissioning', + 'condi': 'conditioning', + 'maint': 'maintenance', + 'user': 'users'} + intervaltype = { + 'fail': '_failures', + 'oper': '_operational', + 'total': ''} + for wst, rst in shifttype.items(): + for wit, rit in intervaltype.items(): + widt = getattr(self, 'lb_'+wst+'_'+wit+'_intvl') + tname = 'lsusage_'+rst+rit+'_time' + tval = getattr(self._macreport, tname) + if tval is None: + text = '' + else: + hour = int(tval) + minu = int((tval - hour)*60) + text = self._fst1.format(hour, minu) + widt.setText(text) + if setup: + widt.setToolTip(getattr(MacReport, tname).__doc__) + + widp = getattr(self, 'lb_'+wst+'_'+wit+'_pcntl') + pname = 'lsusage_'+rst+rit + pval = getattr(self._macreport, pname) + text = '' if pval is None else self._fs1.format(pval) + widp.setText(text) + if setup: + widp.setToolTip(getattr(MacReport, pname).__doc__) + + text = 'Total Usage Time (h): ' + if self._macreport.lsusage_total_time is not None: + val = self._macreport.lsusage_total_time + hour = int(val) + minu = int((val - hour)*60) + text += self._fst1.format(hour, minu) + self.lb_total_intvl.setText(text) + + def _do_update(self): + if self.sender().text() == 'Abort': + self._update_task.terminate() + now = Time.now().strftime('%Y/%m/%d-%H:%M:%S') + item = QListWidgetItem(now + ' Aborted.') + self._progress_list.addItem(item) + self._progress_list.scrollToBottom() + self._setup_search_button() + else: + if self.dt_start.dateTime() >= self.dt_stop.dateTime() or \ + self.dt_start.dateTime() > Time.now() or \ + self.dt_stop.dateTime() > Time.now(): + QMessageBox.warning( + self, 'Ops...', 'Insert a valid time interval.') + return + + self._macreport.timestamp_start = \ + self.dt_start.dateTime().toSecsSinceEpoch() + self._macreport.timestamp_stop = \ + self.dt_stop.dateTime().toSecsSinceEpoch() + + self._progress_list.clear() + self._pb_showraw.setEnabled(False) + self._pb_showpvsd.setEnabled(False) + self._setup_search_button() + + self._update_task = UpdateTask(self._macreport) + self._update_task.updated.connect(self._update_progress) + self._update_task.start() + + def _update_progress(self, message): + item = QListWidgetItem(message) + self._progress_list.addItem(item) + self._progress_list.scrollToBottom() + + if 'Collected' in message: + self._setup_search_button() + self._updateUserShiftStats() + self._updateStoredCurrentStats() + self._updateLightSourceUsageStats() + self._pb_showraw.setEnabled(True) + self._pb_showpvsd.setEnabled(True) + + def _setup_search_button(self): + if self.pb_search.text() == 'Abort': + self.pb_search.setIcon(qta.icon('fa5s.search')) + self.pb_search.setText('Search') + else: + self.pb_search.setIcon( + qta.icon('fa5s.spinner', animation=qta.Spin(self.pb_search))) + self.pb_search.setText('Abort') + + def _show_raw_data(self): + dialog = SiriusDialog() + dialog.setWindowTitle( + 'Machine Reports - Raw Data (' + + str(self._macreport.time_start) + ' -> ' + + str(self._macreport.time_stop) + ')') + dialog.setWindowIcon(self.windowIcon()) + fig = self._macreport.plot_raw_data() + wid = MatplotlibWidget(figure=fig) + lay = QGridLayout(dialog) + lay.addWidget(wid) + dialog.exec_() + + def _show_progmd_vs_delivd(self): + dialog = SiriusDialog() + dialog.setWindowTitle( + 'Machine Reports - Programmed vs. Delivered Hours (' + + str(self._macreport.time_start) + ' -> ' + + str(self._macreport.time_stop) + ')') + fig = self._macreport.plot_progmd_vs_delivd_hours() + wid = MatplotlibWidget(figure=fig) + lay = QGridLayout(dialog) + lay.addWidget(wid) + dialog.exec_()
+ + + +
+[docs] +class UpdateTask(QThread): + """Update task.""" + + updated = Signal(str) + + def __init__(self, macreport, parent=None): + """Init.""" + super().__init__(parent) + self.macreport = macreport + self.macreport.logger = self + self._quit_task = False + +
+[docs] + def exit_task(self): + """Set flag to quit thread.""" + self._quit_task = True
+ + +
+[docs] + def run(self): + """Run task.""" + if not self._quit_task: + self.macreport.update() + self.update('Collected data from archiver and machine schedule.')
+ + +
+[docs] + def update(self, message): + """Send log.""" + now = Time.now().strftime('%Y/%m/%d-%H:%M:%S') + self.updated.emit(now+' '+message)
+
+ + + +
+[docs] +class LbData(QLabel): + """Data label.""" + + def __init__(self, *args, **kwargs): + """Init.""" + super().__init__(*args, **kwargs) + self.setObjectName('lbdata') + self.setStyleSheet(""" + #lbdata{ + border: 1px solid gray; + min-height: 2em; max-height: 3em; + min-width: 8em; + qproperty-alignment: 'AlignVCenter | AlignRight'; + }""")
+ + + +
+[docs] +class LbVHeader(QLabel): + """Vertical Header label.""" + + def __init__(self, *args, **kwargs): + """Init.""" + super().__init__(*args, **kwargs) + self.setStyleSheet(""" + LbVHeader{ + border: 1px solid gray; + min-height: 2em; max-height: 3em; + min-width: 6em; + qproperty-alignment: 'AlignVCenter | AlignHCenter'; + font-weight: bold; + background-color: darkGray; + }""")
+ + + +
+[docs] +class LbHHeader(QLabel): + """Horizontal Header label.""" + + def __init__(self, *args, **kwargs): + """Init.""" + super().__init__(*args, **kwargs) + self.setStyleSheet(""" + LbHHeader{ + border: 1px solid gray; + min-height: 2em; max-height: 3em; + min-width: 6em; + qproperty-alignment: 'AlignVCenter | AlignLeft'; + font-weight: bold; + background-color: lightGray; + }""")
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_magoffconv/main.html b/_modules/siriushla/as_ap_magoffconv/main.html new file mode 100644 index 000000000..b2594a1df --- /dev/null +++ b/_modules/siriushla/as_ap_magoffconv/main.html @@ -0,0 +1,395 @@ + + + + + + siriushla.as_ap_magoffconv.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_magoffconv.main

+"""Normalizer interface module."""
+
+import re
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGroupBox, QComboBox, QLabel, \
+    QVBoxLayout, QHBoxLayout, QGridLayout, QSpacerItem, QMessageBox, \
+    QSizePolicy as QSzPlcy
+
+from siriushla.widgets import SiriusMainWindow, QDoubleSpinBoxPlus
+
+from siriuspy.search import MASearch
+from siriuspy.magnet.factory import NormalizerFactory
+
+
+Dipole = re.compile("^.*:MA-(B|Spect).*$")
+Quadrupole = re.compile("^.*Fam:MA-Q.*$")
+Sextupole = re.compile("^.*:MA-S.*$")
+Corrector = re.compile("^.*:MA-(CH|CV|FCH|FCV).*$")
+PulsedMagnet = re.compile("^.*:PM-.*$")
+Multipole = re.compile("^.*:(MA)-(Q|S|QS|CH|CV|FCH|FCV).*$")
+Trim = re.compile("^SI-.*[0-2][0-9].*:MA-Q(D|F|[1-4]).*$")
+
+
+
+[docs] +class MagOffConvApp(SiriusMainWindow): + """Offline converter interface.""" + + def __init__(self, parent=None): + """Init.""" + super().__init__(parent) + self._normalizer = None + self._last_edited = None + self._setupUi() + self.setWindowTitle('Offline Strength/Current Converter') + + def _setupUi(self): + # Layout to enter + matype_label = QLabel('Choose a magnet: ', self) + self._matype_cb = QComboBox(self) + self._matype_items = MASearch.get_pwrsupply_manames() + self._matype_cb.addItem('Select...') + self._matype_cb.addItems(self._matype_items) + self._matype_cb.setEditable(True) + self._matype_cb.setMaxVisibleItems(10) + self._matype_cb.currentIndexChanged.connect( + self._fill_normalizer_layout) + hlmatype = QHBoxLayout() + hlmatype.setAlignment(Qt.AlignLeft) + hlmatype.addWidget(matype_label) + hlmatype.addWidget(self._matype_cb) + + # Layout to enter normalizer data + self._lb_current = QLabel('Current [A]: ') + lb_arrow = QLabel('↔', self, alignment=Qt.AlignCenter) + lb_arrow.setStyleSheet('min-width:1.2em; max-width:1.2em;') + self._lb_strength = QLabel('Strength: ') + self._lb_energy = QLabel('Dipole Energy [GeV]: ') + self._lb_energy.setVisible(False) + self._lb_quadfam_kl = QLabel('Family KL [1/m]: ') + self._lb_quadfam_kl.setVisible(False) + + for name in ['_sb_current', '_sb_strength', + '_sb_energy', '_sb_quadfam_kl']: + setattr(self, name, QDoubleSpinBoxPlus()) + sb = getattr(self, name) + sb.setObjectName(name) + sb.setValue(0) + sb.setMinimum(-100000) + sb.setMaximum(100000) + sb.setDecimals(4) + sb.setStyleSheet("min-width:8em; max-width:8em;") + sb.editingFinished.connect(self._update_inputs) + if name in ['_sb_current', '_sb_strength']: + sb.setEnabled(False) + else: + sb.setVisible(False) + + norm_lay = QGridLayout() + norm_lay.setAlignment(Qt.AlignLeft) + norm_lay.setHorizontalSpacing(5) + norm_lay.addItem( + QSpacerItem(15, 1, QSzPlcy.Fixed, QSzPlcy.Ignored), 1, 0) + norm_lay.addWidget(self._lb_current, 0, 1) + norm_lay.addWidget(self._sb_current, 1, 1) + norm_lay.addWidget(lb_arrow, 0, 2, 2, 1) + norm_lay.addWidget(self._lb_strength, 0, 3) + norm_lay.addWidget(self._sb_strength, 1, 3) + norm_lay.addItem( + QSpacerItem(15, 1, QSzPlcy.Fixed, QSzPlcy.Ignored), 1, 4) + norm_lay.addWidget(self._lb_energy, 0, 5) + norm_lay.addWidget(self._sb_energy, 1, 5) + norm_lay.addItem( + QSpacerItem(15, 1, QSzPlcy.Fixed, QSzPlcy.Ignored), 1, 6) + norm_lay.addWidget(self._lb_quadfam_kl, 0, 7) + norm_lay.addWidget(self._sb_quadfam_kl, 1, 7) + self.norm_gb = QGroupBox('', self) + self.norm_gb.setLayout(norm_lay) + + # General layout + layout = QVBoxLayout() + layout.setSpacing(20) + layout.addWidget( + QLabel('<h2>Offline Strength/Current Converter</h2>', + self, alignment=Qt.AlignCenter)) + layout.addLayout(hlmatype) + layout.addWidget(self.norm_gb) + cw = QWidget(self) + cw.setObjectName('central_widget') + cw.setStyleSheet("""#central_widget{min-width:42em;}""") + cw.setLayout(layout) + self.setCentralWidget(cw) + self.setFocusPolicy(Qt.StrongFocus) + + def _fill_normalizer_layout(self, index): + text = self.sender().currentText() + if text not in self._matype_items: + QMessageBox.critical(self, 'Error', 'Enter a valid magnet name!') + self._sb_current.setEnabled(False) + self._sb_strength.setEnabled(False) + self._lb_energy.setVisible(False) + self._sb_energy.setVisible(False) + self._lb_quadfam_kl.setVisible(False) + self._sb_quadfam_kl.setVisible(False) + return + + # Reset all fields + self._sb_current.setValue(0) + self._sb_strength.setValue(0) + self._sb_energy.setValue(0) + self._sb_quadfam_kl.setValue(0) + + # Create normalizer and update limits if text is a valid magnet + if index != 0: + self._create_normalizer(text) + + # Update interface + enbl_current = False + enbl_strength = False + show_energy = False + show_quadfam_kl = False + if Dipole.match(text): + enbl_current = True + enbl_strength = True + elif Trim.match(text): + enbl_current = True + enbl_strength = True + show_energy = True + show_quadfam_kl = True + elif Multipole.match(text) or PulsedMagnet.match(text): + enbl_current = True + enbl_strength = True + show_energy = True + self._sb_current.setEnabled(enbl_current) + self._sb_strength.setEnabled(enbl_strength) + self._lb_energy.setVisible(show_energy) + self._sb_energy.setVisible(show_energy) + self._lb_quadfam_kl.setVisible(show_quadfam_kl) + self._sb_quadfam_kl.setVisible(show_quadfam_kl) + + # Update Strength label + if Dipole.match(text): + text_strength = 'Energy [GeV]: ' + elif Quadrupole.match(text): + text_strength = 'KL [1/m]: ' + elif Trim.match(text): + text_strength = 'KL (Fam + Trim) [1/m]: ' + elif Sextupole.match(text): + text_strength = 'SL [1/m²]: ' + elif Corrector.match(text): + text_strength = 'Kick [urad]: ' + elif PulsedMagnet.match(text): + text_strength = 'Kick [mrad]: ' + else: + text_strength = 'Strength: ' + self._lb_strength.setText(text_strength) + + # update limits, if necessary + self._update_inputs() + + def _create_normalizer(self, maname): + self._normalizer = NormalizerFactory.create(maname) + + def _update_inputs(self): + sender = self.sender().objectName() + if 'strength' in sender: + self._last_edited = 's' + elif 'current' in sender: + self._last_edited = 'c' + + strength = self._sb_strength.value() + current = self._sb_current.value() + quadfam_kl = None + energy = None + if self._sb_quadfam_kl.isVisible(): + quadfam_kl = self._sb_quadfam_kl.value() + if self._sb_energy.isVisible(): + energy = self._sb_energy.value() + + if self._last_edited == 's': + current = self._conv_strength2curr(strength, energy, quadfam_kl) + self._sb_current.setValue(current) + else: + strength = self._conv_curr2strength(current, energy, quadfam_kl) + self._sb_strength.setValue(strength) + + def _conv_curr2strength(self, current, energy=None, quadfam_kl=None): + if quadfam_kl is not None: + strength = self._normalizer.conv_current_2_strength( + currents=current, strengths_dipole=energy, + strengths_family=quadfam_kl) + elif energy is not None: + strength = self._normalizer.conv_current_2_strength( + currents=current, strengths_dipole=energy) + else: + strength = self._normalizer.conv_current_2_strength( + currents=current) + return strength + + def _conv_strength2curr(self, strength, energy=None, quadfam_kl=None): + if quadfam_kl is not None: + current = self._normalizer.conv_strength_2_current( + strengths=strength, strengths_dipole=energy, + strengths_family=quadfam_kl) + elif energy is not None: + current = self._normalizer.conv_strength_2_current( + strengths=strength, strengths_dipole=energy) + else: + current = self._normalizer.conv_strength_2_current( + strengths=strength) + return current
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_measure/energy_meas.html b/_modules/siriushla/as_ap_measure/energy_meas.html new file mode 100644 index 000000000..b5fd2fe1a --- /dev/null +++ b/_modules/siriushla/as_ap_measure/energy_meas.html @@ -0,0 +1,336 @@ + + + + + + siriushla.as_ap_measure.energy_meas — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_measure.energy_meas

+#!/usr/bin/env python-sirius
+
+import numpy as np
+
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QLabel, QGridLayout, QGroupBox, QFormLayout, \
+    QWidget, QVBoxLayout, QHBoxLayout, QPushButton
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from siriushla.widgets import SiriusSpinbox, PyDMStateButton, SiriusLabel, \
+    SiriusLedState, SiriusProcessImage, QSpinBoxPlus, SiriusTimePlot
+from siriushla.as_ti_control import HLTriggerSimple
+
+
+
+[docs] +class EnergyMeasure(QWidget): + """.""" + + def __init__(self, parent=None, prefix=_VACA_PREFIX): + """.""" + super().__init__(parent=parent) + self.prefix = prefix + self._setupUi() + self.setObjectName('LIApp') + + def _setupUi(self): + pref = _PVName('LI-Glob:AP-MeasEnergy').substitute(prefix=self.prefix) + self.plt_energy = SiriusTimePlot( + self, init_y_channels=[pref.substitute(propty='Energy-Mon')], + background=QColor('white')) + self.plt_energy.setLabel('left', text='Energy [MeV]') + self.plt_energy.setShowXGrid(True) + self.plt_energy.setShowYGrid(True) + c = self.plt_energy.curveAtIndex(0) + c.color = QColor('blue') + c.symbol = c.symbols['Circle'] + c.symbolSize = 10 + c.lineWidth = 3 + c.data_changed.connect(self._update_energy_stats) + self.plt_energy.setTimeSpan(100) + + self.plt_spread = SiriusTimePlot( + self, init_y_channels=[pref.substitute(propty='Spread-Mon')], + background=QColor('white')) + self.plt_spread.setLabel('left', text='Spread [%]') + self.plt_spread.setShowXGrid(True) + self.plt_spread.setShowYGrid(True) + c = self.plt_spread.curveAtIndex(0) + c.color = QColor('red') + c.symbol = c.symbols['Circle'] + c.symbolSize = 10 + c.lineWidth = 3 + c.data_changed.connect(self._update_spread_stats) + self.plt_spread.setTimeSpan(100) + + gb_ctrl = QGroupBox('Control', self) + hl_ctrl = QHBoxLayout(gb_ctrl) + + vl = QVBoxLayout() + wid = QWidget(gb_ctrl) + wid.setLayout(QHBoxLayout()) + btn = PyDMStateButton( + gb_ctrl, pref.substitute(propty='MeasureCtrl-Sel')) + led = SiriusLedState( + gb_ctrl, pref.substitute(propty='MeasureCtrl-Sts')) + wid.layout().addWidget(btn) + wid.layout().addWidget(led) + vl.addWidget(QLabel('Start/Stop Acq.', gb_ctrl)) + vl.addWidget(wid) + hl_ctrl.addLayout(vl) + + vl = QVBoxLayout() + wid = QWidget(gb_ctrl) + wid.setLayout(QHBoxLayout()) + spnbox = SiriusSpinbox(wid, _PVName( + 'LI-01:PS-Spect:Current-SP').substitute(prefix=self.prefix)) + lbl = SiriusLabel(wid, _PVName( + 'LI-01:PS-Spect:Current-Mon').substitute(prefix=self.prefix)) + wid.layout().addWidget(spnbox) + wid.layout().addWidget(lbl) + vl.addWidget(QLabel('Spectrometer Current [A]', gb_ctrl)) + vl.addWidget(wid) + hl_ctrl.addLayout(vl) + + gb_ener = QGroupBox('Properties', self) + fl_ener = QFormLayout(gb_ener) + + wid = QWidget(gb_ener) + wid.setLayout(QHBoxLayout()) + self.lb_ave_en = QLabel('0.000', wid) + self.lb_std_en = QLabel('0.000', wid) + wid.layout().addWidget(self.lb_ave_en) + wid.layout().addWidget(QLabel( + '<html><head/><body><p>&#177;</p></body></html>', wid)) + wid.layout().addWidget(self.lb_std_en) + fl_ener.addRow('Energy [MeV]', wid) + + wid = QWidget(gb_ener) + wid.setLayout(QHBoxLayout()) + self.lb_ave_sp = QLabel('0.000', wid) + self.lb_std_sp = QLabel('0.000', wid) + wid.layout().addWidget(self.lb_ave_sp) + wid.layout().addWidget(QLabel( + '<html><head/><body><p>&#177;</p></body></html>', wid)) + wid.layout().addWidget(self.lb_std_sp) + fl_ener.addRow('Spread [%]', wid) + + hl_span = QHBoxLayout() + hl_span.setSpacing(0) + self.spbox_npoints = QSpinBoxPlus(self) + self.spbox_npoints.setKeyboardTracking(False) + self.spbox_npoints.setMinimum(10) + self.spbox_npoints.setMaximum(200000) + self.spbox_npoints.setValue(100) + self.spbox_npoints.editingFinished.connect(self.nrpoints_edited) + hl_span.addWidget(QLabel('Choose TimeSpan [s]:', self)) + hl_span.addWidget(self.spbox_npoints) + self.pb_reset_data = QPushButton('Reset Data', self) + self.pb_reset_data.clicked.connect(self.pb_reset_data_clicked) + hl_span.addWidget(self.pb_reset_data) + + self.plt_image = SiriusProcessImage(self, device=pref) + + gb_trig = QGroupBox('Trigger', self) + hbl = QHBoxLayout(gb_trig) + hbl.addWidget(HLTriggerSimple( + parent=self, device='LI-Fam:TI-Scrn', prefix=self.prefix)) + gb_trig.setLayout(hbl) + + gl = QGridLayout(self) + gl.addLayout(hl_span, 0, 0, 1, 2) + gl.addWidget(self.plt_image, 0, 2, 3, 1) + gl.addWidget(self.plt_energy, 1, 0, 1, 2) + gl.addWidget(self.plt_spread, 2, 0, 1, 2) + gl.addWidget(gb_ctrl, 3, 0) + gl.addWidget(gb_ener, 3, 1) + gl.addWidget(gb_trig, 3, 2) + gl.setColumnStretch(0, 3) + gl.setColumnStretch(1, 2) + gl.setColumnStretch(2, 3) + + def _update_energy_stats(self): + c = self.plt_energy.curveAtIndex(0) + if c.points_accumulated: + ener = np.array(c.data_buffer[1, -c.points_accumulated:]) + self.lb_ave_en.setText('{:.3f}'.format(np.mean(ener))) + self.lb_std_en.setText('{:.3f}'.format(np.std(ener))) + + def _update_spread_stats(self): + c = self.plt_spread.curveAtIndex(0) + if c.points_accumulated: + sprd = np.array(c.data_buffer[1, -c.points_accumulated:]) + self.lb_ave_sp.setText('{:.3f}'.format(np.mean(sprd))) + self.lb_std_sp.setText('{:.3f}'.format(np.std(sprd))) + +
+[docs] + def nrpoints_edited(self): + val = self.spbox_npoints.value() + self.plt_energy.setTimeSpan(val) + self.plt_spread.setTimeSpan(val)
+ + +
+[docs] + def pb_reset_data_clicked(self): + """Reset buffers.""" + self.plt_energy._resetBuffers() + self.plt_spread._resetBuffers()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_monitor/main.html b/_modules/siriushla/as_ap_monitor/main.html new file mode 100644 index 000000000..9afe769fc --- /dev/null +++ b/_modules/siriushla/as_ap_monitor/main.html @@ -0,0 +1,225 @@ + + + + + + siriushla.as_ap_monitor.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_ap_monitor.main

+"""Sirius Monitor."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QLabel, QGridLayout
+
+from siriuspy.envars import VACA_PREFIX
+
+from ..as_ti_control import MonitorWindow as TIMonitor
+from ..li_ap_mps import MPSMonitor as LIMPSMonitor
+from ..as_ps_diag import PSMonitor
+from .util import get_label2devices, get_sec2dev_laypos
+
+
+
+[docs] +class SiriusMonitor(QWidget): + """Sirius Monitor.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX): + """Init.""" + super().__init__(parent) + self._prefix = prefix + self.setObjectName('ASApp') + self._setupUi() + + def _setupUi(self): + label = QLabel('<h3>Sirius Monitor</h3>', + alignment=Qt.AlignCenter) + label.setStyleSheet('max-height:1.29em;') + + self.wid_asmon = PSMonitor( + self, self._prefix, + get_label2devices_method=get_label2devices, + get_sec2devlaypos_method=get_sec2dev_laypos) + self.wid_asmon.title.setText('<h3>PS, PU & RF</h3>') + self.wid_asmon.setStyleSheet(""" + QLed{ + min-height: 0.98em; max-height: 0.98em; + min-width: 0.98em; max-width: 0.98em;}""") + + self.wid_timon = TIMonitor(self, self._prefix) + self.wid_timon.title.setText('<h3>TI</h3>') + self.wid_timon.setStyleSheet(""" + QLed{ + min-height: 0.98em; max-height: 0.98em; + min-width: 0.98em; max-width: 0.98em;}""") + + self.wid_mpsmon = LIMPSMonitor(self, self._prefix) + self.wid_mpsmon.title.setText('<h3>LI MPS</h3>') + self.wid_mpsmon.setObjectName('ASApp') + self.wid_mpsmon.setStyleSheet(""" + QLabel { qproperty-alignment: AlignCenter; } + QLed{ + min-height: 0.98em; max-height: 0.98em; + min-width: 0.98em; max-width: 0.98em;}""") + + layout = QGridLayout(self) + layout.setHorizontalSpacing(12) + layout.addWidget(label, 0, 0, 1, 3) + layout.addWidget(self.wid_asmon, 1, 0, alignment=Qt.AlignTop) + layout.addWidget(self.wid_timon, 1, 1, alignment=Qt.AlignTop) + layout.addWidget(self.wid_mpsmon, 1, 2, alignment=Qt.AlignTop)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_monitor/util.html b/_modules/siriushla/as_ap_monitor/util.html new file mode 100644 index 000000000..7301af171 --- /dev/null +++ b/_modules/siriushla/as_ap_monitor/util.html @@ -0,0 +1,200 @@ + + + + + + siriushla.as_ap_monitor.util — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_ap_monitor.util

+"""Util module."""
+
+from siriushla.as_ps_diag.util import \
+    get_label2devices as get_pslabel2devices, \
+    SEC2LABEL2SECPOS
+
+
+
+[docs] +def get_label2devices(sec): + data = dict() + data = get_pslabel2devices(sec).copy() + if sec == 'LI': + data['Egun'] = ['LI-01:EG-HVPS', 'LI-01:EG-FilaPS'] + data['RF'] = ['LI-01:RF-SHB', 'LI-01:RF-Kly-1', 'LI-01:RF-Kly-2'] + data['PU'] = ['LI-01:PU-Modltr-1', 'LI-01:PU-Modltr-2'] + elif sec == 'BO': + data['RF'] = ['BO-05D:RF-P5Cav', ] + elif sec == 'SI': + data['RF'] = ['SI-02SB:RF-P7Cav', ] + + return data
+ + + +
+[docs] +def get_sec2dev_laypos(sec, label): + SEC2LABEL2SECPOS['LI'].update({ + 'Egun': (0, 3, 1, 1), + 'PU': (0, 4, 1, 1), + 'RF': (1, 3, 1, 1)}) + SEC2LABEL2SECPOS['BO'].update({ + 'RF': (2, 1, 1, 1)}) + SEC2LABEL2SECPOS['SI'].update({ + 'RF': (0, 6, 1, 1)}) + return SEC2LABEL2SECPOS[sec][label]
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_opticscorr/custom_widgets.html b/_modules/siriushla/as_ap_opticscorr/custom_widgets.html new file mode 100644 index 000000000..8bfa7542b --- /dev/null +++ b/_modules/siriushla/as_ap_opticscorr/custom_widgets.html @@ -0,0 +1,217 @@ + + + + + + siriushla.as_ap_opticscorr.custom_widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_opticscorr.custom_widgets

+from pydm.widgets import PyDMLineEdit
+
+from siriuspy.opticscorr.csdev import Const as _Const
+from siriushla.widgets import SiriusLedAlert
+from siriushla.widgets.dialog import StatusDetailDialog
+from siriushla.as_ap_configdb import LoadConfigDialog as _LoadConfigDialog
+
+
+
+[docs] +class ConfigLineEdit(PyDMLineEdit): + +
+[docs] + def mouseReleaseEvent(self, _): + """Reimplement mouse release event.""" + if 'SI' in self.channel and 'Tune' in self.channel: + config_type = 'si_tunecorr_params' + elif 'BO' in self.channel and 'Tune' in self.channel: + config_type = 'bo_tunecorr_params' + elif 'SI' in self.channel and 'Chrom' in self.channel: + config_type = 'si_chromcorr_params' + elif 'BO' in self.channel and 'Chrom' in self.channel: + config_type = 'bo_chromcorr_params' + popup = _LoadConfigDialog(config_type) + popup.configname.connect(self._config_changed) + popup.exec_()
+ + + def _config_changed(self, configname): + self.setText(configname) + self.send_value() + self.value_changed(configname)
+ + + +
+[docs] +class StatusLed(SiriusLedAlert): + + def __init__(self, parent=None, init_channel='', labels=list()): + super().__init__(parent, init_channel=init_channel) + self.parent = parent + self.labels = labels + +
+[docs] + def mouseDoubleClickEvent(self, event): + msg = StatusDetailDialog( + parent=self.parent, pvname=self.channel, + labels=_Const.STATUS_LABELS) + msg.exec_() + super().mouseDoubleClickEvent(event)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_opticscorr/details.html b/_modules/siriushla/as_ap_opticscorr/details.html new file mode 100644 index 000000000..b865ac398 --- /dev/null +++ b/_modules/siriushla/as_ap_opticscorr/details.html @@ -0,0 +1,303 @@ + + + + + + siriushla.as_ap_opticscorr.details — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_opticscorr.details

+"""OpticsCorr details module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QPushButton, QGridLayout, QLabel, QSpacerItem, \
+    QAbstractItemView, QGroupBox, QSizePolicy as QSzPlcy, QHeaderView
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from siriushla.widgets import SiriusMainWindow, SiriusLabel, \
+    SiriusWaveformTable
+from .custom_widgets import ConfigLineEdit as _ConfigLineEdit
+
+
+
+[docs] +class CorrParamsDetailWindow(SiriusMainWindow): + """Correction parameters detail window.""" + + def __init__(self, acc, opticsparam, fams, parent=None, + prefix=_VACA_PREFIX): + """Class constructor.""" + super(CorrParamsDetailWindow, self).__init__(parent) + self._prefix = prefix + self._acc = acc + self._opticsparam = opticsparam.title() + self._fams = fams + self._nfam = len(self._fams) + self._intstrength = 'KL' if opticsparam == 'tune' else 'SL' + self.setWindowTitle(acc+' '+self._opticsparam+' Correction Parameters') + self.setObjectName(acc.upper() + 'App') + self._setupUi() + + def _setupUi(self): + ioc_prefix = _PVName(self._acc+'-Glob:AP-'+self._opticsparam+'Corr') + ioc_prefix = ioc_prefix.substitute(prefix=self._prefix) + + lay = QGridLayout() + + label_configname = QLabel('<h4>Configuration Name</h4>', self, + alignment=Qt.AlignCenter) + self.pydmlinedit_configname = _ConfigLineEdit( + self, ioc_prefix.substitute(propty='ConfigName-SP')) + self.pydmlinedit_configname.setStyleSheet( + """min-width:10em; max-width:10em;""") + + self.pydmlabel_configname = SiriusLabel( + self, ioc_prefix.substitute(propty='ConfigName-RB')) + + lay.addWidget(label_configname, 10, 1, 1, self._nfam) + lay.addWidget(self.pydmlinedit_configname, 11, self._nfam//2) + lay.addWidget(self.pydmlabel_configname, 11, self._nfam//2+1) + lay.addItem( + QSpacerItem(20, 10, QSzPlcy.Minimum, QSzPlcy.Fixed), 12, 1) + + label_matrix = QLabel('<h4>Matrix</h4>', self, + alignment=Qt.AlignCenter) + self.table_matrix = SiriusWaveformTable( + self, ioc_prefix.substitute(propty='RespMat-Mon')) + self.table_matrix.setObjectName('matrix') + self.table_matrix.setEnabled(False) + self.table_matrix.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + self.table_matrix.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + self.table_matrix.verticalHeader().setStyleSheet( + """min-width:1.5em; max-width:1.5em;""") + self.table_matrix.horizontalHeader().setStyleSheet( + """min-height:1.5em; max-height:1.5em;""") + self.table_matrix.setStyleSheet(""" + #matrix{ + min-width:valueem; min-height:5.84em; max-height:5.84em; + }""".replace('value', str(1.5+8*self._nfam))) + self.table_matrix.setEditTriggers(QAbstractItemView.NoEditTriggers) + self.table_matrix.setRowCount(2) + self.table_matrix.setColumnCount(self._nfam) + self.table_matrix.rowHeaderLabels = [' X', ' Y'] + self.table_matrix.columnHeaderLabels = self._fams + self.table_matrix.horizontalHeader().setSectionResizeMode( + QHeaderView.Stretch) + self.table_matrix.verticalHeader().setSectionResizeMode( + QHeaderView.Stretch) + self.table_matrix.setSizePolicy(QSzPlcy.MinimumExpanding, + QSzPlcy.Preferred) + + lay.addWidget(label_matrix, 13, 1, 1, self._nfam) + lay.addWidget(self.table_matrix, 14, 1, 1, self._nfam) + lay.addItem(QSpacerItem(20, 10, QSzPlcy.Minimum, QSzPlcy.Fixed), 15, 1) + + label_nomintstrength = QLabel( + '<h4>Nominal '+self._intstrength+'s</h4>', self, + alignment=Qt.AlignCenter) + self.table_nomintstrength = SiriusWaveformTable( + self, ioc_prefix.substitute( + propty='Nominal'+self._intstrength+'-Mon')) + self.table_nomintstrength.setObjectName('nom_strength') + self.table_nomintstrength.setEnabled(False) + self.table_nomintstrength.horizontalHeader().setSectionResizeMode( + QHeaderView.Stretch) + self.table_nomintstrength.verticalHeader().setSectionResizeMode( + QHeaderView.Stretch) + self.table_nomintstrength.setVerticalScrollBarPolicy( + Qt.ScrollBarAlwaysOff) + self.table_nomintstrength.setHorizontalScrollBarPolicy( + Qt.ScrollBarAlwaysOff) + self.table_nomintstrength.verticalHeader().setStyleSheet( + """min-width:1.5em; max-width:1.5em;""") + self.table_nomintstrength.horizontalHeader().setStyleSheet( + """min-height:1.5em; max-height:1.5em;""") + self.table_nomintstrength.setStyleSheet(""" + #nom_strength{ + min-width:valueem; min-height:3.67em; max-height:3.67em; + }""".replace('value', str(1.5+8*self._nfam))) + self.table_nomintstrength.setEditTriggers( + QAbstractItemView.NoEditTriggers) + self.table_nomintstrength.setRowCount(1) + self.table_nomintstrength.setColumnCount(self._nfam) + self.table_nomintstrength.rowHeaderLabels = [self._intstrength] + self.table_nomintstrength.columnHeaderLabels = self._fams + self.table_nomintstrength.setSizePolicy(QSzPlcy.MinimumExpanding, + QSzPlcy.Preferred) + + lay.addWidget(label_nomintstrength, 16, 1, 1, self._nfam) + lay.addWidget(self.table_nomintstrength, 17, 1, 1, self._nfam) + lay.addItem(QSpacerItem(20, 10, QSzPlcy.Minimum, QSzPlcy.Fixed), 18, 1) + + if self._opticsparam == 'Chrom': + label_nomchrom = QLabel('<h4>Nominal Chrom</h4>', self, + alignment=Qt.AlignCenter) + self.pydmlabel_nomchrom = SiriusLabel( + self, ioc_prefix.substitute(propty='NominalChrom-Mon')) + self.pydmlabel_nomchrom.setAlignment(Qt.AlignCenter) + + lay.addWidget(label_nomchrom, 19, 1, 1, self._nfam) + lay.addWidget(self.pydmlabel_nomchrom, 20, 1, 1, self._nfam) + + self.bt_apply = QPushButton('Ok', self) + self.bt_apply.clicked.connect(self.close) + lay.addWidget(self.bt_apply, 21, self._nfam) + + cwt = QGroupBox('Correction Parameters') + cwt.setLayout(lay) + self.setCentralWidget(cwt)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_opticscorr/main.html b/_modules/siriushla/as_ap_opticscorr/main.html new file mode 100644 index 000000000..09857715b --- /dev/null +++ b/_modules/siriushla/as_ap_opticscorr/main.html @@ -0,0 +1,752 @@ + + + + + + siriushla.as_ap_opticscorr.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_opticscorr.main

+"""OpticsCorr main module."""
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QLabel, QWidget, QGridLayout, QGroupBox, \
+    QPushButton, QVBoxLayout, QSpacerItem, QSizePolicy as QSzPly, \
+    QHBoxLayout
+import qtawesome as qta
+from pydm.widgets import PyDMPushButton, PyDMEnumComboBox, PyDMLineEdit
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.opticscorr.csdev import Const as _Const
+
+from siriushla import util as _hlautil
+from siriushla.widgets import SiriusMainWindow, PyDMLogLabel, SiriusSpinbox, \
+    PyDMStateButton, SiriusLabel
+from siriushla.as_ps_control import PSDetailWindow as _PSDetailWindow
+from .details import CorrParamsDetailWindow as _CorrParamsDetailWindow
+from .custom_widgets import StatusLed as _StatusLed, \
+    ConfigLineEdit as _ConfigLineEdit
+
+
+
+[docs] +class OpticsCorrWindow(SiriusMainWindow): + """Class to include some intelligence in the .ui files.""" + + def __init__(self, acc, opticsparam, parent=None, prefix=_VACA_PREFIX): + """Initialize some widgets.""" + super(OpticsCorrWindow, self).__init__(parent) + self.prefix = prefix + self.acc = acc.upper() + self.param = opticsparam + self.ioc_prefix = _PVName( + self.acc+'-Glob:AP-'+self.param.title()+'Corr') + self.ioc_prefix = self.ioc_prefix.substitute(prefix=self.prefix) + self.title = self.acc + ' ' + self.param.title() + ' Correction' + + if self.param == 'tune': + self.param_pv = 'DeltaTune{0}-{1}' + self.intstrength = 'KL' + self.intstrength_calcdesc = 'DeltaKL-Mon' + self.intstrength_calcpv = 'DeltaKL{}-Mon' + self.fams = list(_Const.SI_QFAMS_TUNECORR) if self.acc == 'SI' \ + else list(_Const.BO_QFAMS_TUNECORR) + elif self.param == 'chrom': + self.param_pv = 'Chrom{0}-{1}' + self.intstrength = 'SL' + self.intstrength_calcdesc = 'CalcSL-Mon' + self.intstrength_calcpv = 'SL{}-Mon' + self.fams = list(_Const.SI_SFAMS_CHROMCORR) if self.acc == 'SI' \ + else list(_Const.BO_SFAMS_CHROMCORR) + + self.setWindowTitle(self.title) + self.setObjectName(self.acc+'App') + self._setupUi() + self.setFocus(True) + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + label = QLabel('<h3>'+self.title+'</h3>', self) + label.setStyleSheet(""" + min-height:1.55em; max-height: 1.55em; + qproperty-alignment: 'AlignVCenter | AlignRight'; + background-color: qlineargradient(spread:pad, x1:1, y1:0.0227273, + x2:0, y2:0, stop:0 rgba(173, 190, 207, 255), + stop:1 rgba(213, 213, 213, 255));""") + + self.gb_status = QGroupBox('Status', self) + self.gb_status.setLayout(self._setupStatusLayout()) + + self.wid_optics = QWidget() + lay_optics = QGridLayout(self.wid_optics) + lay_optics.setContentsMargins(0, 0, 0, 0) + self.gb_optprm = QGroupBox( + 'ΔTune' if self.param == 'tune' else 'Chromaticity', self) + self.gb_optprm.setLayout(self._setupOpticsParamLayout()) + if self.param == 'tune': + self.pb_updref = PyDMPushButton( + self, label='Update Reference', pressValue=1, + init_channel=self.ioc_prefix.substitute(propty='SetNewRefKL-Cmd')) + self.pb_updref.setStyleSheet('min-height:2.4em; max-height:2.4em;') + lay_optics.addWidget(self.pb_updref, 0, 0, 1, 2) + lay_optics.addWidget(self.gb_optprm, 1, 0) + + if self.acc == 'SI': + self.gb_digmon = QGroupBox('Tune Monitor', self) + self.gb_digmon.setLayout(self._setupDigMonLayout()) + lay_optics.addWidget(self.gb_digmon, 1, 1) + lay_optics.setColumnStretch(0, 3) + lay_optics.setColumnStretch(1, 1) + else: + lay_optics.addWidget(self.gb_optprm, 0, 0) + + self.gb_fams = QGroupBox('Families', self) + self.gb_fams.setLayout(self._setupFamiliesLayout()) + self.gb_fams.setSizePolicy(QSzPly.Preferred, QSzPly.Expanding) + + self.gb_iocctrl = QGroupBox('IOC Control', self) + self.gb_iocctrl.setLayout(self._setupIOCControlLayout()) + + cwt = QWidget() + self.setCentralWidget(cwt) + if self.acc == 'SI': + vlay1 = QVBoxLayout() + vlay1.setAlignment(Qt.AlignTop) + vlay1.addWidget(self.wid_optics) + vlay1.addWidget(self.gb_fams) + lay = QGridLayout(cwt) + lay.addWidget(label, 0, 0, 1, 2) + lay.addLayout(vlay1, 1, 0, alignment=Qt.AlignTop) + lay.addWidget(self.gb_iocctrl, 1, 1) + lay.addWidget(self.gb_status, 2, 0, 1, 2) + lay.setColumnStretch(0, 1) + lay.setColumnStretch(1, 1) + lay.setRowStretch(0, 1) + lay.setRowStretch(1, 15) + lay.setRowStretch(2, 5) + else: + lay = QVBoxLayout(cwt) + lay.addWidget(label) + lay.addWidget(self.wid_optics) + lay.addWidget(self.gb_fams) + lay.addWidget(self.gb_iocctrl) + lay.addWidget(self.gb_status) + + self.setStyleSheet(""" + SiriusLabel{ + qproperty-alignment: AlignCenter; + }""") + + def _setupStatusLayout(self): + self.log_label = PyDMLogLabel( + self, self.ioc_prefix.substitute(propty='Log-Mon')) + + lay = QVBoxLayout() + lay.addWidget(self.log_label) + return lay + + def _setupOpticsParamLayout(self): + self.lb_x = QLabel('<h4>X</h4>', self, alignment=Qt.AlignCenter) + self.lb_y = QLabel('<h4>Y</h4>', self, alignment=Qt.AlignCenter) + self.lb_sp = QLabel('<h4>SP</h4>', self, alignment=Qt.AlignCenter) + self.lb_rb = QLabel('<h4>RB</h4>', self, alignment=Qt.AlignCenter) + self.lb_mon = QLabel( + '<h4>Estimative</h4>', self, alignment=Qt.AlignCenter) + + self.sb_paramx = SiriusSpinbox(self, self.ioc_prefix.substitute( + propty=self.param_pv.format('X', 'SP'))) + self.sb_paramy = SiriusSpinbox(self, self.ioc_prefix.substitute( + propty=self.param_pv.format('Y', 'SP'))) + + self.lb_paramx = SiriusLabel(self, self.ioc_prefix.substitute( + propty=self.param_pv.format('X', 'RB'))) + self.lb_paramy = SiriusLabel(self, self.ioc_prefix.substitute( + propty=self.param_pv.format('Y', 'RB'))) + + self.lb_prmmonx = SiriusLabel(self, self.ioc_prefix.substitute( + propty=self.param_pv.format('X', 'Mon'))) + self.lb_prmmony = SiriusLabel(self, self.ioc_prefix.substitute( + propty=self.param_pv.format('Y', 'Mon'))) + + self.bt_apply = PyDMPushButton( + self, label='Apply', pressValue=1, + init_channel=self.ioc_prefix.substitute( + propty='ApplyDelta-Cmd')) + + lay = QGridLayout() + lay.addWidget(self.lb_sp, 0, 1) + lay.addWidget(self.lb_rb, 0, 2) + lay.addWidget(self.lb_x, 1, 0) + lay.addWidget(self.sb_paramx, 1, 1) + lay.addWidget(self.lb_paramx, 1, 2) + lay.addWidget(self.lb_y, 2, 0) + lay.addWidget(self.sb_paramy, 2, 1) + lay.addWidget(self.lb_paramy, 2, 2) + lay.addWidget(self.lb_mon, 0, 3) + lay.addWidget(self.lb_prmmonx, 1, 3) + lay.addWidget(self.lb_prmmony, 2, 3) + lay.addWidget(self.bt_apply, 3, 1) + lay.setColumnStretch(0, 1) + lay.setColumnStretch(1, 5) + lay.setColumnStretch(2, 5) + lay.setColumnStretch(3, 5) + + if self.acc == 'SI' and self.param == 'chrom': + self._icon_absval = qta.icon( + 'mdi.alpha-a', 'mdi.alpha-b', 'mdi.alpha-s', options=[ + dict(scale_factor=1.5, offset=(-0.4, 0.0)), + dict(scale_factor=1.5, offset=(0.0, 0.0)), + dict(scale_factor=1.5, offset=(+0.4, 0.0))]) + self._icon_delta = qta.icon('mdi.delta') + self._is_setting = 'absolut' + self.pb_change_sp = QPushButton(self._icon_absval, '', self) + self.pb_change_sp.clicked.connect(self._change_chrom_sp) + + self.sb_paramx_delta = SiriusSpinbox( + self, self.ioc_prefix.substitute(propty='DeltaChromX-SP')) + self.sb_paramx_delta.setVisible(False) + + self.sb_paramy_delta = SiriusSpinbox( + self, self.ioc_prefix.substitute(propty='DeltaChromY-SP')) + self.sb_paramy_delta.setVisible(False) + + self.lb_paramx_delta = SiriusLabel( + self, self.ioc_prefix.substitute(propty='DeltaChromX-RB')) + self.lb_paramx_delta.setVisible(False) + self.lb_paramy_delta = SiriusLabel( + self, self.ioc_prefix.substitute(propty='DeltaChromY-RB')) + self.lb_paramy_delta.setVisible(False) + + self.lb_mon.setText('Implem.\nEstimative') + self.lb_mon.setStyleSheet('font-weight: bold;') + self.lb_calcmon = QLabel( + 'Calcd.\nEstimative', self, alignment=Qt.AlignCenter) + self.lb_calcmon.setStyleSheet('font-weight: bold;') + + self.lb_prmcalcmonx = SiriusLabel( + self, self.ioc_prefix.substitute(propty='CalcChromX-Mon')) + self.lb_prmcalcmony = SiriusLabel( + self, self.ioc_prefix.substitute(propty='CalcChromY-Mon')) + + lay.addWidget(self.pb_change_sp, 0, 0) + lay.addWidget(self.sb_paramx_delta, 1, 1) + lay.addWidget(self.sb_paramy_delta, 2, 1) + lay.addWidget(self.lb_paramx_delta, 1, 2) + lay.addWidget(self.lb_paramy_delta, 2, 2) + lay.addWidget(self.lb_calcmon, 0, 4) + lay.addWidget(self.lb_prmcalcmonx, 1, 4) + lay.addWidget(self.lb_prmcalcmony, 2, 4) + return lay + + def _setupDigMonLayout(self): + lb_x = QLabel('<h4>X</h4>', self, alignment=Qt.AlignCenter) + lb_y = QLabel('<h4>Y</h4>', self, alignment=Qt.AlignCenter) + self.lb_tunex = SiriusLabel(self, 'SI-Glob:DI-Tune-H:TuneFrac-Mon') + self.lb_tuney = SiriusLabel(self, 'SI-Glob:DI-Tune-V:TuneFrac-Mon') + + lay = QGridLayout() + lay.addWidget(lb_x, 0, 0) + lay.addWidget(self.lb_tunex, 0, 1) + lay.addWidget(lb_y, 1, 0) + lay.addWidget(self.lb_tuney, 1, 1) + lay.setColumnStretch(0, 1) + lay.setColumnStretch(1, 5) + return lay + + def _setupFamiliesLayout(self): + lay = QGridLayout() + + lb_family = QLabel('<h4>Family</h4>', self, alignment=Qt.AlignCenter) + lb_family.setStyleSheet('max-height:1.29em;') + lay.addWidget(lb_family, 0, 1) + + lb_rbdesc = QLabel('<h4>'+self.intstrength+'-RB</h4>', self, + alignment=Qt.AlignCenter) + lb_rbdesc.setStyleSheet('max-height:1.29em;') + lay.addWidget(lb_rbdesc, 0, 2) + + if self.param == 'tune': + lb_refdesc = QLabel('<h4>RefKL-Mon</h4>', self, + alignment=Qt.AlignCenter) + lb_refdesc.setStyleSheet('max-height:1.29em;') + lay.addWidget(lb_refdesc, 0, 3) + + lb_lastddesc = QLabel('<h4>'+self.intstrength_calcdesc+'</h4>', self, + alignment=Qt.AlignCenter) + lb_lastddesc.setStyleSheet('max-height:1.29em;') + lay.addWidget(lb_lastddesc, 0, 4) + + row = 1 + for fam in self.fams: + dev_name = _PVName(self.acc+'-Fam:PS-'+fam) + pref_name = dev_name.substitute(prefix=self.prefix) + + pbt = QPushButton(qta.icon('fa5s.list-ul'), '', self) + pbt.setObjectName('pbt') + pbt.setStyleSheet(""" + #pbt{ + min-width:25px; max-width:25px; + min-height:25px; max-height:25px; + icon-size:20px;}""") + _hlautil.connect_window( + pbt, _PSDetailWindow, parent=self, psname=dev_name) + lay.addWidget(pbt, row, 0) + + lb_name = QLabel(fam, self, alignment=Qt.AlignCenter) + lay.addWidget(lb_name, row, 1) + + lb_rb = SiriusLabel(self, pref_name.substitute( + propty=self.intstrength+'-RB')) + lay.addWidget(lb_rb, row, 2) + + if self.param == 'tune': + lb_ref = SiriusLabel(self, self.ioc_prefix.substitute( + propty='RefKL'+fam+'-Mon')) + lay.addWidget(lb_ref, row, 3) + + lb_calc = SiriusLabel(self, self.ioc_prefix.substitute( + propty=self.intstrength_calcpv.format(fam))) + lay.addWidget(lb_calc, row, 4) + row += 1 + return lay + + def _setupIOCControlLayout(self): + lay = QGridLayout() + + lb_sts = QLabel('<h4>Status</h4>', self) + self.led_sts = _StatusLed(self, self.ioc_prefix.substitute( + propty='Status-Mon')) + lay.addWidget(lb_sts, 0, 0) + lay.addWidget(self.led_sts, 0, 1, alignment=Qt.AlignLeft) + + lb_conf = QLabel('<h4>Configuration</h4>') + self.bt_dtls = QPushButton(qta.icon('fa5s.list-ul'), '', self) + _hlautil.connect_window( + self.bt_dtls, _CorrParamsDetailWindow, parent=self, + acc=self.acc, opticsparam=self.param, + prefix=self.prefix, fams=self.fams) + lay.addWidget(lb_conf, 2, 0, 1, 2) + lay.addWidget(self.bt_dtls, 2, 2, alignment=Qt.AlignRight) + + lb_cname = QLabel('Name', self) + self.le_cname = _ConfigLineEdit( + self, self.ioc_prefix.substitute( + propty='ConfigName-SP')) + self.lb_cname = SiriusLabel(self, self.ioc_prefix.substitute( + propty='ConfigName-RB')) + lay.addWidget(lb_cname, 3, 0) + lay.addWidget(self.le_cname, 3, 1, 1, 2) + lay.addWidget(self.lb_cname, 4, 1, 1, 2) + + row = 5 + if self.acc == 'SI': + lay.addItem( + QSpacerItem(1, 20, QSzPly.Ignored, QSzPly.Fixed), 5, 0) + row = 6 + + if self.param == 'chrom': + lb_meas_chrom = QLabel('<h4>Chrom. Measurement</h4>') + lay.addWidget(lb_meas_chrom, 6, 0, 1, 3) + + lb_meas_chrom_dfRF = QLabel('ΔFreq RF [Hz]', self) + self.sb_meas_chrom_dfRF = SiriusSpinbox( + self, self.ioc_prefix.substitute( + propty='MeasChromDeltaFreqRF-SP')) + self.lb_meas_chrom_dfRF = SiriusLabel( + self, self.ioc_prefix.substitute( + propty='MeasChromDeltaFreqRF-RB')) + lay.addWidget(lb_meas_chrom_dfRF, 7, 0) + lay.addWidget(self.sb_meas_chrom_dfRF, 7, 1) + lay.addWidget(self.lb_meas_chrom_dfRF, 7, 2) + + lb_meas_chrom_wait = QLabel('Wait Tune [s]', self) + self.sb_meas_chrom_wait = SiriusSpinbox( + self, self.ioc_prefix.substitute( + propty='MeasChromWaitTune-SP')) + self.lb_meas_chrom_wait = SiriusLabel( + self, self.ioc_prefix.substitute( + propty='MeasChromWaitTune-RB')) + lay.addWidget(lb_meas_chrom_wait, 8, 0) + lay.addWidget(self.sb_meas_chrom_wait, 8, 1) + lay.addWidget(self.lb_meas_chrom_wait, 8, 2) + + lb_meas_chrom_nrsteps = QLabel('Nr Steps', self) + self.sb_meas_chrom_nrsteps = SiriusSpinbox( + self, self.ioc_prefix.substitute( + propty='MeasChromNrSteps-SP')) + self.lb_meas_chrom_nrsteps = SiriusLabel( + self, self.ioc_prefix.substitute( + propty='MeasChromNrSteps-RB')) + lay.addWidget(lb_meas_chrom_nrsteps, 9, 0) + lay.addWidget(self.sb_meas_chrom_nrsteps, 9, 1) + lay.addWidget(self.lb_meas_chrom_nrsteps, 9, 2) + + lay.addItem( + QSpacerItem(1, 20, QSzPly.Ignored, QSzPly.Fixed), 10, 0) + + lb_meas_chrom_x = QLabel('Meas. Chrom X', self) + self.lb_meas_chrom_x = SiriusLabel( + self, self.ioc_prefix.substitute( + propty='MeasChromX-Mon')) + lay.addWidget(lb_meas_chrom_x, 11, 0) + lay.addWidget(self.lb_meas_chrom_x, 11, 1) + + lb_meas_chrom_y = QLabel('Meas. Chrom Y', self) + self.lb_meas_chrom_y = SiriusLabel( + self, self.ioc_prefix.substitute( + propty='MeasChromY-Mon')) + lay.addWidget(lb_meas_chrom_y, 12, 0) + lay.addWidget(self.lb_meas_chrom_y, 12, 1) + + lay.addItem( + QSpacerItem(1, 20, QSzPly.Ignored, QSzPly.Fixed), 13, 0) + + self.lb_meas_chrom_sts = SiriusLabel( + self, self.ioc_prefix.substitute( + propty='MeasChromStatus-Mon')) + self.bt_meas_chrom_start = PyDMPushButton( + self, icon=qta.icon('fa5s.play'), label='', + init_channel=self.ioc_prefix.substitute( + propty='MeasChrom-Cmd'), + pressValue=_Const.MeasCmd.Start) + self.bt_meas_chrom_start.setObjectName('start') + self.bt_meas_chrom_start.setStyleSheet( + '#start{min-width:25px; max-width:25px; icon-size:20px;}') + self.bt_meas_chrom_stop = PyDMPushButton( + self, icon=qta.icon('fa5s.stop'), label='', + init_channel=self.ioc_prefix.substitute( + propty='MeasChrom-Cmd'), + pressValue=_Const.MeasCmd.Stop) + self.bt_meas_chrom_stop.setObjectName('stop') + self.bt_meas_chrom_stop.setStyleSheet( + '#stop{min-width:25px; max-width:25px; icon-size:20px;}') + self.bt_meas_chrom_rst = PyDMPushButton( + self, icon=qta.icon('fa5s.sync'), label='', + init_channel=self.ioc_prefix.substitute( + propty='MeasChrom-Cmd'), + pressValue=_Const.MeasCmd.Reset) + self.bt_meas_chrom_rst.setObjectName('rst') + self.bt_meas_chrom_rst.setStyleSheet( + '#rst{min-width:25px; max-width:25px; icon-size:20px;}') + hbox_cmd = QHBoxLayout() + hbox_cmd.addWidget(self.bt_meas_chrom_start) + hbox_cmd.addWidget(self.bt_meas_chrom_stop) + hbox_cmd.addWidget(self.bt_meas_chrom_rst) + lay.addWidget(self.lb_meas_chrom_sts, 14, 0, 1, 2) + lay.addLayout(hbox_cmd, 14, 2) + + lay.addItem( + QSpacerItem(1, 20, QSzPly.Ignored, QSzPly.Fixed), 15, 0) + row = 15 + + # configuration measurement + lb_meas_conf = QLabel('<h4>Config. Measurement</h4>') + lay.addWidget(lb_meas_conf, row+1, 0, 1, 3) + + mag_type = 'Q' if self.param == 'tune' else 'S' + unit = '[1/m]' if self.param == 'tune' else '[1/m2]' + + pvn = self.ioc_prefix.substitute( + propty='MeasConfigDelta'+self.intstrength+'Fam'+mag_type+'F') + lb_meas_conf_dfamF = QLabel( + 'Fam. Δ'+self.intstrength+' '+mag_type+'F '+unit, self) + self.sb_meas_conf_dfamF = SiriusSpinbox( + self, pvn.substitute(propty_suffix='SP')) + self.lb_meas_conf_dfamF = SiriusLabel( + self, pvn.substitute(propty_suffix='RB')) + lay.addWidget(lb_meas_conf_dfamF, row+2, 0) + lay.addWidget(self.sb_meas_conf_dfamF, row+2, 1) + lay.addWidget(self.lb_meas_conf_dfamF, row+2, 2) + + pvn = self.ioc_prefix.substitute( + propty='MeasConfigDelta'+self.intstrength+'Fam'+mag_type+'D') + lb_meas_conf_dfamD = QLabel( + 'Fam. Δ'+self.intstrength+' '+mag_type+'D '+unit, self) + self.sb_meas_conf_dfamD = SiriusSpinbox( + self, pvn.substitute(propty_suffix='SP')) + self.lb_meas_conf_dfamD = SiriusLabel( + self, pvn.substitute(propty_suffix='RB')) + lay.addWidget(lb_meas_conf_dfamD, row+3, 0) + lay.addWidget(self.sb_meas_conf_dfamD, row+3, 1) + lay.addWidget(self.lb_meas_conf_dfamD, row+3, 2) + + lb_meas_conf_wait = QLabel('Wait [s]', self) + self.sb_meas_conf_wait = SiriusSpinbox( + self, self.ioc_prefix.substitute(propty='MeasConfigWait-SP')) + self.lb_meas_conf_wait = SiriusLabel( + self, self.ioc_prefix.substitute(propty='MeasConfigWait-RB')) + lay.addWidget(lb_meas_conf_wait, row+4, 0) + lay.addWidget(self.sb_meas_conf_wait, row+4, 1) + lay.addWidget(self.lb_meas_conf_wait, row+4, 2) + + lb_meas_conf_cname = QLabel('Name to save', self) + self.le_meas_conf_name = PyDMLineEdit( + self, self.ioc_prefix.substitute(propty='MeasConfigName-SP')) + self.lb_meas_conf_name = SiriusLabel( + self, self.ioc_prefix.substitute(propty='MeasConfigName-RB')) + lay.addWidget(lb_meas_conf_cname, row+5, 0) + lay.addWidget(self.le_meas_conf_name, row+5, 1, 1, 2) + lay.addWidget(self.lb_meas_conf_name, row+6, 1, 1, 2) + + lb_meas_conf_save = QLabel('Force Save', self) + self.bt_meas_conf_save = PyDMPushButton( + self, icon=qta.icon('mdi.content-save'), label='', + init_channel=self.ioc_prefix.substitute( + propty='MeasConfigSave-Cmd'), + pressValue=1) + self.bt_meas_conf_save.setObjectName('save') + self.bt_meas_conf_save.setStyleSheet( + '#save{min-width:25px; max-width:25px; icon-size:20px;}') + lay.addWidget(lb_meas_conf_save, row+7, 0) + lay.addWidget( + self.bt_meas_conf_save, row+7, 1, alignment=Qt.AlignLeft) + + lay.addItem( + QSpacerItem(1, 20, QSzPly.Ignored, QSzPly.Fixed), row+8, 0) + + self.lb_meas_conf_sts = SiriusLabel( + self, self.ioc_prefix.substitute( + propty='MeasConfigStatus-Mon')) + self.bt_meas_conf_start = PyDMPushButton( + self, icon=qta.icon('fa5s.play'), label='', + init_channel=self.ioc_prefix.substitute( + propty='MeasConfig-Cmd'), + pressValue=_Const.MeasCmd.Start) + self.bt_meas_conf_start.setObjectName('start') + self.bt_meas_conf_start.setStyleSheet( + '#start{min-width:25px; max-width:25px; icon-size:20px;}') + self.bt_meas_conf_stop = PyDMPushButton( + self, icon=qta.icon('fa5s.stop'), label='', + init_channel=self.ioc_prefix.substitute( + propty='MeasConfig-Cmd'), + pressValue=_Const.MeasCmd.Stop) + self.bt_meas_conf_stop.setObjectName('stop') + self.bt_meas_conf_stop.setStyleSheet( + '#stop{min-width:25px; max-width:25px; icon-size:20px;}') + self.bt_meas_conf_rst = PyDMPushButton( + self, icon=qta.icon('fa5s.sync'), label='', + init_channel=self.ioc_prefix.substitute( + propty='MeasConfig-Cmd'), + pressValue=_Const.MeasCmd.Reset) + self.bt_meas_conf_rst.setObjectName('rst') + self.bt_meas_conf_rst.setStyleSheet( + '#rst{min-width:25px; max-width:25px; icon-size:20px;}') + hbox_cmd = QHBoxLayout() + hbox_cmd.addWidget(self.bt_meas_conf_start) + hbox_cmd.addWidget(self.bt_meas_conf_stop) + hbox_cmd.addWidget(self.bt_meas_conf_rst) + lay.addWidget(self.lb_meas_conf_sts, row+9, 0, 1, 2) + lay.addLayout(hbox_cmd, row+9, 2) + + lay.addItem( + QSpacerItem(1, 20, QSzPly.Ignored, QSzPly.Fixed), row+10, 0) + + # correction settings + lb_corr = QLabel('<h4>Settings</h4>') + lay.addWidget(lb_corr, row+11, 0, 1, 3) + + lb_meth = QLabel('Method', self) + self.cb_method = PyDMEnumComboBox( + self, self.ioc_prefix.substitute(propty='CorrMeth-Sel')) + self.lb_method = SiriusLabel( + self, self.ioc_prefix.substitute(propty='CorrMeth-Sts')) + lay.addWidget(lb_meth, row+12, 0) + lay.addWidget(self.cb_method, row+12, 1) + lay.addWidget(self.lb_method, row+12, 2) + + lb_grp = QLabel('Grouping', self) + self.cb_group = PyDMEnumComboBox( + self, self.ioc_prefix.substitute(propty='CorrGroup-Sel')) + self.lb_group = SiriusLabel( + self, self.ioc_prefix.substitute(propty='CorrGroup-Sts')) + lay.addWidget(lb_grp, row+13, 0) + lay.addWidget(self.cb_group, row+13, 1) + lay.addWidget(self.lb_group, row+13, 2) + + if self.param == 'tune': + lb_sync = QLabel('Sync', self) + self.bt_sync = PyDMStateButton( + self, self.ioc_prefix.substitute(propty='SyncCorr-Sel')) + self.bt_sync.shape = 1 + self.lb_sync = SiriusLabel( + self, self.ioc_prefix.substitute(propty='SyncCorr-Sts')) + lay.addWidget(lb_sync, row+14, 0) + lay.addWidget(self.bt_sync, row+14, 1) + lay.addWidget(self.lb_sync, row+14, 2) + row = row + 15 + + lay.addItem( + QSpacerItem(1, 20, QSzPly.Ignored, QSzPly.Expanding), row, 0) + return lay + + def _change_chrom_sp(self): + cond = self._is_setting == 'absolut' + self._is_setting = 'delta' if cond else 'absolut' + icon = self._icon_delta if cond else self._icon_absval + textX = '<h4>Δ-SP</h4>' if cond else '<h4>SP</h4>' + textY = '<h4>Δ-RB</h4>' if cond else '<h4>RB</h4>' + self.sb_paramx.setVisible(not cond) + self.lb_paramx.setVisible(not cond) + self.sb_paramy.setVisible(not cond) + self.lb_paramy.setVisible(not cond) + self.sb_paramx_delta.setVisible(cond) + self.lb_paramx_delta.setVisible(cond) + self.sb_paramy_delta.setVisible(cond) + self.lb_paramy_delta.setVisible(cond) + self.pb_change_sp.setIcon(icon) + self.lb_sp.setText(textX) + self.lb_rb.setText(textY)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_posang/HLPosAng.html b/_modules/siriushla/as_ap_posang/HLPosAng.html new file mode 100644 index 000000000..3f435b7f2 --- /dev/null +++ b/_modules/siriushla/as_ap_posang/HLPosAng.html @@ -0,0 +1,692 @@ + + + + + + siriushla.as_ap_posang.HLPosAng — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_posang.HLPosAng

+#!/usr/bin/env python-sirius
+
+"""HLA as_ap_posang module."""
+
+from epics import PV as _PV
+from qtpy.QtWidgets import QGridLayout, QLabel, QGroupBox, QAbstractItemView, \
+    QSizePolicy as QSzPlcy, QSpacerItem, QPushButton, QHeaderView, QWidget, \
+    QMessageBox, QApplication, QHBoxLayout
+from qtpy.QtCore import Qt
+import qtawesome as qta
+from pydm.widgets import PyDMLineEdit, PyDMPushButton
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.posang.csdev import Const
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from siriushla import util as _hlautil
+from siriushla.widgets import SiriusMainWindow, PyDMLogLabel, SiriusLedAlert, \
+    PyDMSpinboxScrollbar, PyDMLedMultiChannel, SiriusConnectionSignal, \
+    SiriusLabel, SiriusWaveformTable, SiriusSpinbox, CALabel
+from siriushla.as_ps_control import PSDetailWindow as _PSDetailWindow
+from siriushla.as_pu_control import PUDetailWindow as _PUDetailWindow
+from siriushla.as_ap_configdb import LoadConfigDialog as _LoadConfigDialog
+
+
+
+[docs] +class PosAngCorr(SiriusMainWindow): + """Main Class.""" + + def __init__(self, parent=None, prefix='', tl=None): + """Class construc.""" + super(PosAngCorr, self).__init__(parent) + if not prefix: + self._prefix = _VACA_PREFIX + else: + self._prefix = prefix + self._tl = tl.upper() + base_name = _PVName('TL-Glob:AP-PosAng') + self.posang_prefix = base_name.substitute( + prefix=self._prefix, sec=self._tl) + self.setObjectName(self._tl+'App') + self.setWindowTitle(self._tl + ' Position and Angle Correction Window') + + if self._tl == 'TS': + self._is_chsept = False + ch3_pv = _PV(self.posang_prefix.substitute(propty='CH3-Cte'), + connection_timeout=1) + if not ch3_pv.wait_for_connection(): + self._is_chsept = True + + if tl == 'ts': + corr_h = (Const.TS_CORRH_POSANG_CHSEPT if self._is_chsept + else Const.TS_CORRH_POSANG_SEPTSEPT) + corr_v = Const.TS_CORRV_POSANG + elif tl == 'tb': + corr_h = Const.TB_CORRH_POSANG + corr_v = Const.TB_CORRV_POSANG + + self.corrs = dict() + self.corrs['CH1'] = _PVName(corr_h[0]) + self.corrs['CH2'] = _PVName(corr_h[1]) + if len(corr_h) == 3: + self.corrs['CH3'] = _PVName(corr_h[2]) + self.corrs['CV1'] = _PVName(corr_v[0]) + self.corrs['CV2'] = _PVName(corr_v[1]) + if len(corr_v) == 4: + self.corrs['CV3'] = _PVName(corr_v[2]) + self.corrs['CV4'] = _PVName(corr_v[3]) + + self._just_need_update = False + self._update_ref_action = False + self._my_input_widgets = list() + + pvname_injmode = _PVName("AS-Glob:AP-InjCtrl:Mode-Sts") + pvname_injmode = pvname_injmode.substitute(prefix=self._prefix) + pvname_stdby = _PVName("AS-Glob:AP-InjCtrl:TopUpPUStandbyEnbl-Sts") + pvname_stdby = pvname_stdby.substitute(prefix=self._prefix) + self.injctrl_enbl_rules = ( + '[{"name": "EnblRule", "property": "Enable", ' + + '"expression": "ch[1]!=1 or ch[1]==1 and not ch[0]",' + + '"channels": [{"channel": "' + pvname_stdby + + '", "trigger": true}, {"channel": "' + + pvname_injmode + '", "trigger": true}]}]') + self.injctrl_vis_rules = ( + '[{"name": "VisibleRule", "property": "Visible", ' + + '"expression": "ch[1] and ch[0]", ' + + '"channels": [{"channel": "' + pvname_stdby + + '", "trigger": true}, {"channel": "' + + pvname_injmode + '", "trigger": true}]}]') + + self._setupUi() + self.setFocus(True) + self.setFocusPolicy(Qt.StrongFocus) + + self._ask_message = QMessageBox(self) + self._ask_message.setWindowTitle('Message') + self._ask_message.setText( + 'The '+self._tl+' PosAng IOC indicates reference needs to ' + 'be updated! Do you want to update the reference?') + self._ask_message.setStandardButtons(QMessageBox.No | QMessageBox.Yes) + self._ask_message.setDefaultButton(QMessageBox.No) + self.app = QApplication.instance() + self.app.focusChanged.connect(self._spinbox_onfocus) + + def _setupUi(self): + cwt = QWidget(self) + self.setCentralWidget(cwt) + + # label + lab = QLabel( + '<h3>'+self._tl+' Position and Angle Correction</h3>', cwt) + lab.setStyleSheet(""" + min-height:1.55em; max-height: 1.55em; + qproperty-alignment: 'AlignVCenter | AlignRight'; + background-color: qlineargradient(spread:pad, x1:1, y1:0.0227273, + x2:0, y2:0, stop:0 rgba(173, 190, 207, 255), + stop:1 rgba(213, 213, 213, 255));""") + + # warning + self.lb_rule_warning = CALabel(self) + self.lb_rule_warning.setText( + "WARNING:Disable injection standby mode to change PosAng.") + if self._tl != 'TB': + self.lb_rule_warning.rules = self.injctrl_vis_rules + self.lb_rule_warning.setStyleSheet("color: yellow; font-weight: bold;") + + # update reference button + self.pb_updateref = PyDMPushButton( + self, 'Update Reference', pressValue=1, + init_channel=self.posang_prefix.substitute( + propty='SetNewRefKick-Cmd')) + if self._tl != 'TB': + self.pb_updateref.rules = self.injctrl_enbl_rules + self.pb_updateref.setStyleSheet( + 'min-height: 2.4em; max-height: 2.4em;') + self.led_needrefupdt = SiriusLedAlert( + self, self.posang_prefix.substitute(propty='NeedRefUpdate-Mon')) + self.ch_needrefupdt = SiriusConnectionSignal( + self.posang_prefix.substitute(propty='NeedRefUpdate-Mon')) + self.ch_needrefupdt.new_value_signal[int].connect( + self._handle_need_update_ref_led) + self.led_needrefupdt.setStyleSheet( + 'QLed{min-width: 1.29em; max-width: 1.29em;}') + box_ref = QHBoxLayout() + box_ref.setContentsMargins(0, 0, 0, 0) + box_ref.addWidget(self.pb_updateref) + box_ref.addWidget(self.led_needrefupdt) + + # delta setters + self.hgbox = QGroupBox('Horizontal', self) + self.hgbox.setLayout(self._setupDeltaControlLayout('x')) + + self.vgbox = QGroupBox('Vertical', self) + self.vgbox.setLayout(self._setupDeltaControlLayout('y')) + + # correctors + self.corrgbox = QGroupBox('Correctors', self) + self.corrgbox.setLayout(self._setupCorrectorsLayout()) + + # status + self.statgbox = QGroupBox('Correction Status', self) + self.statgbox.setLayout(self._setupStatusLayout()) + + glay = QGridLayout(cwt) + glay.setHorizontalSpacing(12) + glay.setVerticalSpacing(12) + glay.addWidget(lab, 0, 0, 1, 2) + glay.addWidget(self.lb_rule_warning, 1, 0, 1, 2) + glay.addLayout(box_ref, 2, 0, 1, 2) + glay.addWidget(self.hgbox, 3, 0) + glay.addWidget(self.vgbox, 3, 1) + glay.addWidget(self.corrgbox, 4, 0, 1, 2) + glay.addWidget(self.statgbox, 5, 0, 1, 2) + + # menu + act_settings = self.menuBar().addAction('Settings') + _hlautil.connect_window(act_settings, CorrParamsDetailWindow, + parent=self, tl=self._tl, prefix=self._prefix) + + # stlesheet + self.setStyleSheet(""" + SiriusSpinbox{ + min-width: 5em; max-width: 5em; + } + SiriusLabel, PyDMSpinboxScrollbar{ + min-width: 8em; max-width: 8em; + } + QPushButton{ + min-width: 8em; + } + QLabel{ + min-height: 1.35em; + qproperty-alignment: AlignCenter; + } + """) + + def _setupDeltaControlLayout(self, axis=''): + # pos + label_pos = QLabel("<h4>Δ"+axis+"</h4>", self) + sb_deltapos = SiriusSpinbox(self, self.posang_prefix.substitute( + propty='DeltaPos'+axis.upper()+'-SP')) + sb_deltapos.step_exponent = -2 + sb_deltapos.update_step_size() + if self._tl != 'TB': + sb_deltapos.rules = self.injctrl_enbl_rules + lb_deltapos = SiriusLabel(self, self.posang_prefix.substitute( + propty='DeltaPos'+axis.upper()+'-RB'), keep_unit=True) + lb_deltapos.showUnits = True + self._my_input_widgets.append(sb_deltapos) + # ang + label_ang = QLabel("<h4>Δ"+axis+"'</h4>", self) + sb_deltaang = SiriusSpinbox(self, self.posang_prefix.substitute( + propty='DeltaAng'+axis.upper()+'-SP')) + sb_deltaang.step_exponent = -2 + sb_deltaang.update_step_size() + if self._tl != 'TB': + sb_deltaang.rules = self.injctrl_enbl_rules + lb_deltaang = SiriusLabel(self, self.posang_prefix.substitute( + propty='DeltaAng'+axis.upper()+'-RB'), keep_unit=True) + lb_deltaang.showUnits = True + self._my_input_widgets.append(sb_deltaang) + + lay = QGridLayout() + lay.setVerticalSpacing(12) + lay.setHorizontalSpacing(12) + lay.addItem( + QSpacerItem(10, 0, QSzPlcy.Expanding, QSzPlcy.Ignored), 0, 0) + lay.addWidget(label_pos, 0, 1) + lay.addWidget(sb_deltapos, 0, 2) + lay.addWidget(lb_deltapos, 0, 3) + lay.addWidget(label_ang, 1, 1) + lay.addWidget(sb_deltaang, 1, 2) + lay.addWidget(lb_deltaang, 1, 3) + lay.addItem( + QSpacerItem(10, 0, QSzPlcy.Expanding, QSzPlcy.Ignored), 0, 4) + return lay + + def _setupCorrectorsLayout(self): + lay = QGridLayout() + lay.setVerticalSpacing(9) + lay.setHorizontalSpacing(9) + + label_kicksp = QLabel('<h4>Kick-SP</h4>', self) + label_kickrb = QLabel('<h4>Kick-RB</h4>', self) + label_kickref = QLabel('<h4>RefKick-Mon</h4>', self) + lay.addWidget(label_kicksp, 0, 2) + lay.addWidget(label_kickrb, 0, 3) + lay.addWidget(label_kickref, 0, 4) + + idx = 1 + for corrid, corr in self.corrs.items(): + pbt = QPushButton(qta.icon('fa5s.list-ul'), '', self) + pbt.setObjectName('pbt') + pbt.setStyleSheet(""" + #pbt{ + min-width:25px; max-width:25px; + min-height:25px; max-height:25px; + icon-size:20px;} + """) + if corr.dis == 'PU': + _hlautil.connect_window( + pbt, _PUDetailWindow, self, devname=corr) + else: + _hlautil.connect_window( + pbt, _PSDetailWindow, self, psname=corr) + lb_name = QLabel(corr, self) + le_sp = PyDMSpinboxScrollbar( + self, corr.substitute(prefix=self._prefix, propty='Kick-SP')) + le_sp.spinbox.setAlignment(Qt.AlignCenter) + le_sp.scrollbar.limitsFromPV = True + lb_rb = SiriusLabel(self, corr.substitute( + prefix=self._prefix, propty='Kick-RB'), keep_unit=True) + lb_rb.showUnits = True + lb_ref = SiriusLabel(self, self.posang_prefix.substitute( + propty='RefKick'+corrid+'-Mon'), keep_unit=True) + lb_ref.showUnits = True + + lay.addWidget(pbt, idx, 0, alignment=Qt.AlignTop) + lay.addWidget( + lb_name, idx, 1, alignment=Qt.AlignLeft | Qt.AlignTop) + lay.addWidget(le_sp, idx, 2, alignment=Qt.AlignTop) + lay.addWidget(lb_rb, idx, 3, alignment=Qt.AlignTop) + lay.addWidget(lb_ref, idx, 4, alignment=Qt.AlignTop) + idx += 1 + + lay.addItem( + QSpacerItem(0, 15, QSzPlcy.Preferred, QSzPlcy.Fixed), idx, 0) + + kckr = 'BO-01D:PU-InjKckr' if self._tl == 'TB' \ + else 'SI-01SA:PU-InjNLKckr' + self._kckr_name = _PVName(kckr) + lay.addItem(QSpacerItem(0, 8, QSzPlcy.Ignored, QSzPlcy.Fixed)) + pb_kckr = QPushButton(qta.icon('fa5s.list-ul'), '', self) + pb_kckr.setObjectName('pb') + pb_kckr.setStyleSheet(""" + #pb{ + min-width:25px; max-width:25px; + min-height:25px; max-height:25px; + icon-size:20px;} + """) + lb_kckr_name = QLabel(self._kckr_name, self) + _hlautil.connect_window( + pb_kckr, _PUDetailWindow, self, devname=self._kckr_name) + lb_kckr_sp = PyDMSpinboxScrollbar( + self, self._kckr_name.substitute( + prefix=self._prefix, propty='Kick-SP')) + lb_kckr_sp.scrollbar.limitsFromPV = True + lb_kckr_rb = SiriusLabel(self, self._kckr_name.substitute( + prefix=self._prefix, propty='Kick-RB'), keep_unit=True) + lb_kckr_rb.showUnits = True + lb_kckr_mn = SiriusLabel(self, self._kckr_name.substitute( + prefix=self._prefix, propty='Kick-Mon'), keep_unit=True) + lb_kckr_mn.showUnits = True + lay.addWidget(pb_kckr, idx+2, 0, alignment=Qt.AlignTop) + lay.addWidget( + lb_kckr_name, idx+2, 1, alignment=Qt.AlignLeft | Qt.AlignTop) + lay.addWidget(lb_kckr_sp, idx+2, 2, alignment=Qt.AlignTop) + lay.addWidget(lb_kckr_rb, idx+2, 3, alignment=Qt.AlignTop) + lay.addWidget(lb_kckr_mn, idx+2, 4, alignment=Qt.AlignTop) + + if self._tl == 'TB': + pref = self._prefix + ('-' if self._prefix else '') + lay.addItem(QSpacerItem(0, 8, QSzPlcy.Ignored, QSzPlcy.Fixed)) + + label_voltsp = QLabel('<h4>Amplitude-SP</h4>', self) + label_voltrb = QLabel('<h4>Amplitude-RB</h4>', self) + lay.addWidget(label_voltsp, idx+3, 2) + lay.addWidget(label_voltrb, idx+3, 3) + + lb_kly2_name = QLabel('Klystron 2', self) + le_kly2_sp = PyDMSpinboxScrollbar( + self, pref+'LA-RF:LLRF:KLY2:SET_AMP') + le_kly2_sp.spinbox.precisionFromPV = False + le_kly2_sp.spinbox.precision = 2 + le_kly2_sp.spinbox.setAlignment(Qt.AlignCenter) + le_kly2_sp.scrollbar.limitsFromPV = True + lb_kly2_rb = SiriusLabel( + self, pref+'LA-RF:LLRF:KLY2:GET_AMP', keep_unit=True) + lb_kly2_rb.precisionFromPV = False + lb_kly2_rb.precision = 2 + lb_kly2_rb.showUnits = True + lay.addWidget(lb_kly2_name, idx+4, 1, + alignment=Qt.AlignLeft | Qt.AlignTop) + lay.addWidget(le_kly2_sp, idx+4, 2, alignment=Qt.AlignTop) + lay.addWidget(lb_kly2_rb, idx+4, 3, alignment=Qt.AlignTop) + return lay + + def _setupStatusLayout(self): + self.log = PyDMLogLabel( + self, self.posang_prefix.substitute(propty='Log-Mon')) + self.lb_sts0 = QLabel(Const.STATUSLABELS[0], self) + self.led_sts0 = SiriusLedAlert( + self, self.posang_prefix.substitute(propty='Status-Mon'), bit=0) + self.lb_sts1 = QLabel(Const.STATUSLABELS[1], self) + self.led_sts1 = SiriusLedAlert( + self, self.posang_prefix.substitute(propty='Status-Mon'), bit=1) + self.lb_sts2 = QLabel(Const.STATUSLABELS[2], self) + self.led_sts2 = SiriusLedAlert( + self, self.posang_prefix.substitute(propty='Status-Mon'), bit=2) + self.lb_sts3 = QLabel(Const.STATUSLABELS[3], self) + self.led_sts3 = SiriusLedAlert( + self, self.posang_prefix.substitute(propty='Status-Mon'), bit=3) + self.pb_config = PyDMPushButton( + self, label='Config Correctors', pressValue=1, + init_channel=self.posang_prefix.substitute(propty='ConfigPS-Cmd')) + + lay = QGridLayout() + lay.setVerticalSpacing(12) + lay.setHorizontalSpacing(12) + lay.addWidget(self.log, 0, 0, 6, 1) + lay.addWidget(self.lb_sts0, 1, 2) + lay.addWidget(self.led_sts0, 1, 1) + lay.addWidget(self.lb_sts1, 2, 2) + lay.addWidget(self.led_sts1, 2, 1) + lay.addWidget(self.lb_sts2, 3, 2) + lay.addWidget(self.led_sts2, 3, 1) + lay.addWidget(self.lb_sts3, 4, 2) + lay.addWidget(self.led_sts3, 4, 1) + lay.addWidget(self.pb_config, 5, 1, 1, 2) + + if self._tl == 'TS': + ch1pvn = self.posang_prefix.substitute(propty='CH1-Cte') + self.led_corrtype = PyDMLedMultiChannel( + self, {ch1pvn: self.corrs['CH1']}) + self.lb_corrtype = QLabel( + 'Control ' + ('CH-Sept' if self._is_chsept else 'Sept-Sept')) + lay.addWidget(self.led_corrtype, 0, 1) + lay.addWidget(self.lb_corrtype, 0, 2) + return lay + + def _handle_need_update_ref_led(self, value): + self._just_need_update = bool(value) + + def _spinbox_onfocus(self, old_focus, new_focus): + if not self._update_ref_action and not self._just_need_update: + return + + if self.led_needrefupdt.value != 0: + if new_focus in self._my_input_widgets and self._just_need_update: + ans = self._ask_message.exec_() + if ans == QMessageBox.No: + self._update_ref_action = False + else: + self._update_ref_action = True + self.pb_updateref.sendValue() + self._just_need_update = False
+ + + +
+[docs] +class CorrParamsDetailWindow(SiriusMainWindow): + """Correction parameters detail window.""" + + def __init__(self, tl, parent=None, prefix=None): + """Class constructor.""" + super(CorrParamsDetailWindow, self).__init__(parent) + self._tl = tl + self._prefix = prefix + self.posang_prefix = _PVName(self._tl+'-Glob:AP-PosAng') + self.posang_prefix = self.posang_prefix.substitute(prefix=prefix) + self.setObjectName(tl.upper()+'App') + self.setWindowTitle( + self._tl + ' Position and Angle Correction Parameters') + self._setupUi() + + def _setupUi(self): + label_configname = QLabel('<h4>Configuration Name</h4>', self, + alignment=Qt.AlignCenter) + self.pydmlinedit_configname = _ConfigLineEdit( + self, self.posang_prefix.substitute(propty='ConfigName-SP')) + self.pydmlabel_configname = SiriusLabel( + self, self.posang_prefix.substitute(propty='ConfigName-RB')) + + label_matrix_x = QLabel('<h4>Matrix X</h4>', self, + alignment=Qt.AlignCenter) + self.table_matrix_x = SiriusWaveformTable( + self, self.posang_prefix.substitute(propty='RespMatX-Mon')) + self.table_matrix_x.setObjectName('table_matrix_x') + self.table_matrix_x.setStyleSheet(""" + #table_matrix_x{ + min-width:12em; max-width:12em; + min-height:4.65em; max-height:4.65em;}""") + self.table_matrix_x.setEditTriggers(QAbstractItemView.NoEditTriggers) + self.table_matrix_x.setRowCount(2) + self.table_matrix_x.setColumnCount(2) + self.table_matrix_x.horizontalHeader().setSectionResizeMode( + QHeaderView.Stretch) + self.table_matrix_x.horizontalHeader().setVisible(False) + self.table_matrix_x.verticalHeader().setSectionResizeMode( + QHeaderView.Stretch) + self.table_matrix_x.verticalHeader().setVisible(False) + self.table_matrix_x.setSizePolicy( + QSzPlcy.MinimumExpanding, QSzPlcy.Preferred) + + columns = 2 if self._tl == 'TB' else 4 + width = 12 if self._tl == 'TB' else 24 + label_matrix_y = QLabel('<h4>Matrix Y</h4>', self, + alignment=Qt.AlignCenter) + self.table_matrix_y = SiriusWaveformTable( + self, self.posang_prefix.substitute(propty='RespMatY-Mon')) + self.table_matrix_y.setObjectName('table_matrix_y') + self.table_matrix_y.setStyleSheet(""" + #table_matrix_y{ + min-width:valem; max-width:valem; + min-height:4.65em; max-height:4.65em;}""".replace( + 'val', str(width))) + self.table_matrix_y.setEditTriggers(QAbstractItemView.NoEditTriggers) + self.table_matrix_y.setRowCount(2) + self.table_matrix_y.setColumnCount(columns) + self.table_matrix_y.horizontalHeader().setSectionResizeMode( + QHeaderView.Stretch) + self.table_matrix_y.horizontalHeader().setVisible(False) + self.table_matrix_y.verticalHeader().setSectionResizeMode( + QHeaderView.Stretch) + self.table_matrix_y.verticalHeader().setVisible(False) + self.table_matrix_y.setSizePolicy( + QSzPlcy.MinimumExpanding, QSzPlcy.Preferred) + + self.bt_apply = QPushButton('Ok', self) + self.bt_apply.clicked.connect(self.close) + + lay = QGridLayout() + lay.addItem( + QSpacerItem(20, 10, QSzPlcy.Minimum, QSzPlcy.Expanding), 0, 0) + lay.addWidget(label_configname, 1, 0, 1, columns) + lay.addWidget(self.pydmlinedit_configname, 2, 0, 1, columns) + lay.addWidget(self.pydmlabel_configname, 3, 0, 1, columns) + lay.addItem( + QSpacerItem(20, 10, QSzPlcy.Minimum, QSzPlcy.Expanding), 4, 0) + lay.addWidget(label_matrix_x, 5, 0, 1, columns) + lay.addWidget(self.table_matrix_x, 6, (columns/2)-1, 1, columns) + lay.addItem( + QSpacerItem(20, 10, QSzPlcy.Minimum, QSzPlcy.Expanding), 7, 0) + lay.addWidget(label_matrix_y, 8, 0, 1, columns) + lay.addWidget(self.table_matrix_y, 9, 0, 1, columns) + lay.addItem( + QSpacerItem(20, 10, QSzPlcy.Minimum, QSzPlcy.Expanding), 10, 0) + lay.addWidget(self.bt_apply, 11, columns-1) + for i in range(columns): + lay.setColumnStretch(i, 1) + self.centralwidget = QGroupBox('Correction Parameters') + self.centralwidget.setLayout(lay) + self.setCentralWidget(self.centralwidget) + + self.setStyleSheet(""" + SiriusLabel{ + min-width:valem; max-width:valem; + }""".replace('val', str(width)))
+ + + +class _ConfigLineEdit(PyDMLineEdit): + """Configuration line edit.""" + + def mouseReleaseEvent(self, _): + """Reimplement mouseReleaseEvent.""" + if 'TB' in self.channel: + config_type = 'tb_posang_respm' + elif 'TS' in self.channel: + config_type = 'ts_posang_respm' + popup = _LoadConfigDialog(config_type) + popup.configname.connect(self._config_changed) + popup.exec_() + + def _config_changed(self, configname): + self.setText(configname) + self.send_value() + self.value_changed(configname) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_radmon/main.html b/_modules/siriushla/as_ap_radmon/main.html new file mode 100644 index 000000000..526647923 --- /dev/null +++ b/_modules/siriushla/as_ap_radmon/main.html @@ -0,0 +1,519 @@ + + + + + + siriushla.as_ap_radmon.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_ap_radmon.main

+"""Rad Monitor."""
+
+import re as _re
+import time as _time
+from functools import partial as _part
+import numpy as np
+
+from qtpy.QtCore import Qt, QEvent, QTimer
+from qtpy.QtGui import QColor, QPalette
+from qtpy.QtWidgets import QWidget, QLabel, QCheckBox, QGridLayout, \
+    QApplication, QVBoxLayout, QSizePolicy as QSzPol, QMenu, QHBoxLayout
+
+import qtawesome as qta
+
+from pydm.connection_inspector import ConnectionInspector
+
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.clientarch.time import Time
+from siriuspy.epics import PV
+from ..widgets import SiriusAlarmFrame, SiriusTimePlot, SiriusLabel
+from ..util import get_appropriate_color
+
+
+
+[docs] +class RadTotDoseMonitor(QWidget): + """RAD Total Dose Rate Monitor.""" + + REF_TOT_DOSE = 0.5 # µSv/h + SENSOR2LOC = { + 'Thermo12': 'Thermo 12 (SI-01, hall eixo 16)', + 'ELSE': 'ELSE (SI-01, hall eixo 17)', + 'Thermo8': 'Thermo 8 (SI-01, hall eixo 18)', + 'Thermo10': 'Thermo 10 (SI-01, chicane 1)', + 'Berthold': 'Berthold (corredor de serviço, eixo 19)', + 'Thermo9': 'Thermo 9 (SI-02, hall eixo 20)', + 'Thermo13': 'Thermo 13 (SI-06, hall eixo 31)', + 'Thermo7': 'Thermo 7 (SI-08-IA-08, eixo 37)', + 'Thermo16': 'Thermo 16 (SI-08, hall eixo 38)', + 'Thermo2': 'Thermo 2 (SI-09-IA-09, eixo 40)', + 'Thermo1': 'Thermo 1 (SI-10, hall eixo 43)', + 'Thermo15': 'Thermo 15 (SI-12, hall eixo 50)', + 'Thermo14': 'Thermo 14 (SI-14, hall eixo 55)', + 'Thermo4': 'Thermo 4 (SI-14-IA-14, eixo 57)', + 'Thermo6': 'Thermo 6 (SI-15, hall eixo 59)', + 'Thermo3': 'Thermo 3 (SI-17, hall eixo 04)', + 'Thermo5': 'Thermo 5 (SI-19, hall eixo 10)', + 'Thermo11': 'Thermo 11 (SI-20, hall eixo 14)', + } + + def __init__(self, parent=None, prefix=VACA_PREFIX): + super().__init__(parent) + self._prefix = prefix + + # define aux objects + self._channels = dict() + self._curves = dict() + self._cb_show = dict() + self._pvs_labels = dict() + self._desc_labels = dict() + + # configure window + self.setObjectName('ASApp') + self.setWindowTitle('RAD: Total Dose Monitor') + color = get_appropriate_color('AS') + self.setWindowIcon(qta.icon('fa5s.radiation', color=color)) + + # define data + self._mon2loco, self._locn2mon, self._mon2pos = dict(), dict(), dict() + self._mon2locv = {m: None for m in self.SENSOR2LOC} + for mon in self.SENSOR2LOC: + pvname = self._prefix + ('-' if self._prefix else '') + pvname += 'RAD:' + mon + ':Location-Cte.VAL$' + self._mon2loco[mon] = PV(pvname, callback=self._update_location) + self._locn2mon[pvname] = mon + self._mon2locn = {v: k for k, v in self._locn2mon.items()} + + _t0 = _time.time() + while _time.time() - _t0 < 10: # wait location to be read + _time.sleep(0.1) + if all([v is not None for v in self._mon2locv.values()]): + break + else: + # if not connected, use hardcoded locations + for mon in self.SENSOR2LOC: + if self._mon2locv[mon] is None: + print(mon) + self._update_location( + self._mon2locn[mon], self.SENSOR2LOC[mon]) + + self._mon_order = [ + m[0] for m in sorted(self._mon2pos.items(), key=lambda x: x[1])] + + cmap = { + 'x': np.linspace(0, 1, 12), + 'r': [1.0, 0.6, 0.0, 0.0, 0.0, 0.0, 0.8, 0.2, 0.5, 1.0, 1.0, 1.0], + 'g': [0.0, 0.0, 0.0, 0.4, 1.0, 0.2, 0.8, 0.2, 0.0, 0.0, 0.5, 1.0], + 'b': [1.0, 0.6, 0.3, 1.0, 1.0, 0.0, 0.8, 0.2, 0.0, 0.0, 0.0, 0.0], + } + xeval = np.linspace(0, 1, len(self.SENSOR2LOC)) + reval = np.interp(xeval, cmap['x'], cmap['r'])*255 + geval = np.interp(xeval, cmap['x'], cmap['g'])*255 + beval = np.interp(xeval, cmap['x'], cmap['b'])*255 + self._colors = [(r, g, b) for r, g, b in zip(reval, geval, beval)] + + # define app font size + self.app = QApplication.instance() + font = self.app.font() + font.setPointSize(44) + self.app.setFont(font) + + # setup window + self._setupUi() + + # define focus policy + self.setFocusPolicy(Qt.StrongFocus) + + # set initial size + if self.app.primaryScreen().geometry().width() >= 1920: + self.resize(1920, 1080) + + def _setupUi(self): + # timeplot + self.title_plot = QLabel( + 'Total Dose Rate (γ + n) [µSv/h]', self, alignment=Qt.AlignCenter) + self.title_plot.setStyleSheet( + 'QLabel{font-size: 52pt; font-weight: bold;}') + + timespan = 30*60 # [s] + self.timeplot = SiriusTimePlot( + parent=self, background='w', show_tooltip=True) + self.timeplot.timeSpan = timespan + self.timeplot.bufferSize = 4*60*60*10 + self.timeplot.autoRangeY = True + self.timeplot.minYRange = 0.0 + self.timeplot.showXGrid = True + self.timeplot.showYGrid = True + self.timeplot.maxRedrawRate = 2 + color = QColor(30, 30, 30) + self.timeplot.plotItem.getAxis('bottom').setPen(color) + self.timeplot.plotItem.getAxis('bottom').setGrid(255) + self.timeplot.plotItem.getAxis('bottom').setTextPen(color) + self.timeplot.plotItem.getAxis('left').setPen(color) + self.timeplot.plotItem.getAxis('left').setGrid(255) + self.timeplot.plotItem.getAxis('left').setTextPen(color) + self.timeplot.setLabel('left', text='Dose Rate [µSv/h]') + self.timeplot.setObjectName('timeplot') + self.timeplot.setStyleSheet( + '#timeplot{min-width:12em; min-height: 10em;}') + self.timeplot.bufferReset.connect(self._fill_refline) + self.timeplot.timeSpanChanged.connect(self._fill_refline) + t_end = Time.now() + t_init = t_end - timespan + + widplot = QWidget() + widplot.setSizePolicy(QSzPol.Expanding, QSzPol.Expanding) + layplot = QGridLayout(widplot) + layplot.setHorizontalSpacing(10) + layplot.setVerticalSpacing(10) + layplot.addWidget(self.title_plot, 0, 0) + layplot.addWidget(self.timeplot, 1, 0) + + # panel + self.title_grid = QLabel( + 'Integrated Dose in 4h [µSv]', self, alignment=Qt.AlignCenter) + self.title_grid.setStyleSheet( + 'QLabel{font-size: 52pt; font-weight: bold;}') + self.lb_warn = QLabel('Restart\nwindow') + self.lb_warn.setStyleSheet('color: red; border: 0.1em solid red;') + self.lb_warn.setVisible(False) + laytitle = QHBoxLayout() + laytitle.addWidget(self.title_grid, 6) + laytitle.addWidget(self.lb_warn, 1) + + widgrid = QWidget() + widgrid.setSizePolicy(QSzPol.Maximum, QSzPol.Expanding) + self.pannel = widgrid + laygrid = QGridLayout(widgrid) + laygrid.setHorizontalSpacing(10) + laygrid.setVerticalSpacing(10) + colnum = 3 + laygrid.addLayout(laytitle, 0, 0, 1, colnum) + + for i, mon in enumerate(self._mon_order): + local = self._mon2locv[mon] + color = self._colors[i] + pvname = self._prefix + ('-' if self._prefix else '') + pvname += 'RAD:' + mon + ':TotalDoseRate' + row, col = i // colnum + 1, i % colnum + + coloro = QColor(color) if isinstance(color, str) \ + else QColor(*color) + self.timeplot.addYChannel( + pvname, name=pvname, color=coloro, lineWidth=6) + curve = self.timeplot.curveAtIndex(-1) + self._curves[mon] = curve + self.timeplot.fill_curve_with_archdata( + self._curves[mon], pvname, + t_init=t_init.get_iso8601(), t_end=t_end.get_iso8601()) + + cbx = QCheckBox(self) + cbx.setChecked(True) + cbx.stateChanged.connect(curve.setVisible) + cbx.setSizePolicy(QSzPol.Maximum, QSzPol.Maximum) + pal = cbx.palette() + pal.setColor(QPalette.Base, coloro) + pal.setColor(QPalette.Text, Qt.white) + cbx.setPalette(pal) + self._cb_show[mon] = cbx + + lbl = SiriusLabel(self, pvname + ':Dose', keep_unit=True) + lbl.alarmSensitiveBorder = False + lbl.setStyleSheet('QLabel{font-size: 52pt;}') + lbl.showUnits = True + self._pvs_labels[mon] = lbl + + frame = SiriusAlarmFrame(self, pvname + ':Dose') + frame.add_widget(cbx) + frame.add_widget(lbl) + + desc = QLabel(local, self, alignment=Qt.AlignCenter) + desc.setSizePolicy(QSzPol.Preferred, QSzPol.Maximum) + desc.setStyleSheet( + 'QLabel{background-color:black; color:white;font-size:26pt;}') + self._desc_labels[mon] = desc + + wid = QWidget() + wid.setObjectName('wid') + wid.setStyleSheet( + '#wid{border: 1px solid black; ' + 'min-width: 7.5em; max-width: 7.5em;}') + widlay = QVBoxLayout(wid) + widlay.setSpacing(0) + widlay.setContentsMargins(1, 1, 1, 1) + widlay.addWidget(frame) + widlay.addWidget(desc) + + laygrid.addWidget(wid, row, col) + + laygrid.setColumnStretch(0, 1) + laygrid.setColumnStretch(1, 1) + laygrid.setColumnStretch(2, 1) + + self.timeplot.addYChannel( + 'Reference', color='black', lineWidth=6, lineStyle=Qt.DashLine) + self.refline = self.timeplot.curveAtIndex(-1) + self._fill_refline() + + lay = QGridLayout(self) + lay.setSpacing(20) + lay.addWidget(widplot, 0, 0) + lay.addWidget(widgrid, 0, 1) + + self.setStyleSheet(""" + SiriusLabel{ + qproperty-alignment: AlignCenter; font-weight: bold; + } + QCheckBox::indicator { + width: 0.7em; + height: 0.7em; + }""") + + self._timer = QTimer() + self._timer.timeout.connect(self._update_graph_ref) + self._timer.setInterval(2000) + self._timer.start() + + # ---------- events ---------- + +
+[docs] + def changeEvent(self, event): + """Implement change event to get font size changes.""" + if event.type() == QEvent.FontChange and self._pvs_labels: + fontsize = self.app.font().pointSize() + + # title + self.title_plot.setStyleSheet( + 'QLabel{font-size: '+str(fontsize + 8) + + 'pt; font-weight: bold;}') + self.title_grid.setStyleSheet( + 'QLabel{font-size: '+str(fontsize + 8) + + 'pt; font-weight: bold;}') + + # labels + for lbl in self._pvs_labels.values(): + lbl.setStyleSheet( + 'QLabel{font-size: '+str(fontsize + 8) + + 'pt; min-width: 7em;}') + for desc in self._desc_labels.values(): + desc.setStyleSheet( + 'QLabel{background-color:black; color:white;' + 'font-size:'+str(fontsize - 18)+'pt;}') + + self.ensurePolished()
+ + +
+[docs] + def contextMenuEvent(self, event): + """Implement context menu to add auxiliary actions.""" + pos = self.mapToGlobal(event.pos()) + if not self.pannel.underMouse(): + return + menu = QMenu(self) + show = menu.addAction('Show all curves') + show.triggered.connect(_part(self._set_checkbox_state, True)) + hide = menu.addAction('Hide all curves') + hide.triggered.connect(_part(self._set_checkbox_state, False)) + conn = menu.addAction('Show Connections...') + conn.triggered.connect(self._show_connections) + menu.popup(pos)
+ + + # ---------- private methods ---------- + + def _fill_refline(self): + basecurve = self.timeplot.curveAtIndex(0) + timebuffer = basecurve.data_buffer[0] + firstvalid = (timebuffer != 0).argmax() + if timebuffer[firstvalid] == 0: + timebuffer = np.array([Time.now().timestamp(), ]) + else: + timebuffer = timebuffer[firstvalid:] + valuebuffer = [RadTotDoseMonitor.REF_TOT_DOSE]*timebuffer.size + self.timeplot.fill_curve_buffer( + self.refline, timebuffer, valuebuffer) + + def _update_graph_ref(self): + self.refline.receiveNewValue(RadTotDoseMonitor.REF_TOT_DOSE) + self.refline.redrawCurve() + + def _show_connections(self, checked): + """Show connections action.""" + _ = checked + conn = ConnectionInspector(self) + conn.show() + + def _set_checkbox_state(self, state): + for cbx in self._cb_show.values(): + cbx.setChecked(state) + + def _update_location(self, pvname, value, **kws): + if not isinstance(value, str): + value = bytes(value).decode('utf-8') + value = value.replace('corredor', 'corr.') # abbreviations + mon = self._locn2mon[pvname] + if self._mon2locv[mon] is not None and self._mon2locv[mon] != value: + self.lb_warn.setVisible(True) + return + self._mon2locv[mon] = value + sec = 1 if 'corr.' in value.split(',')[0]\ + else float(_re.findall(r'SI-(\d+)', value)[0]) + axi = 18.5 if 'chicane 1' in value.split(',')[-1]\ + else float(_re.findall(r'eixo (\d+)', value)[0]) + self._mon2pos[mon] = 100*sec+axi
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/graphics/base.html b/_modules/siriushla/as_ap_sofb/graphics/base.html new file mode 100644 index 000000000..3f952d862 --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/graphics/base.html @@ -0,0 +1,859 @@ + + + + + + siriushla.as_ap_sofb.graphics.base — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_sofb.graphics.base

+"""Control the Orbit Graphic Displnay."""
+
+from datetime import datetime as _datetime
+from functools import partial as _part
+import numpy as _np
+
+from qtpy.QtWidgets import QWidget, QFileDialog, QLabel, QCheckBox, \
+    QVBoxLayout, QHBoxLayout, QSizePolicy, QGroupBox, QPushButton, QComboBox, \
+    QToolTip, QGridLayout, QDoubleSpinBox
+from qtpy.QtCore import Qt, QTimer, QThread, Signal, QObject
+from qtpy.QtGui import QColor
+from pyqtgraph import mkBrush, mkPen, InfiniteLine, functions
+import qtawesome as qta
+
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.sofb.csdev import SOFBFactory
+
+from siriushla.widgets import SiriusConnectionSignal as _ConnSig, \
+    SiriusWaveformPlot
+
+
+
+[docs] +class BaseWidget(QWidget): + """.""" + + DEFAULT_DIR = '/home/sirius/shared/screens-iocs' + + def __init__(self, parent, device, ctrls, names, is_orb, prefix='', + acc='SI'): + """.""" + super(BaseWidget, self).__init__(parent) + self.setObjectName(acc.upper()+'App') + self.EXT = f'.{acc.lower()}dorb' + self.EXT_FLT = f'Sirius Delta Orbit Files (*.{acc.lower()}dorb)' + self.line_names = names + self.prefix = prefix + self.device = _PVName(device) + self.devpref = self.device.substitute(prefix=prefix) + self.controls = ctrls + self._csorb = SOFBFactory.create(acc) + self.update_rate = 2.1 # Hz + self.last_dir = self.DEFAULT_DIR + self.is_orb = is_orb + self.timer = QTimer() + self.thread = QThread() + self.updater = [] + self.graph = {'x': None, 'y': None} + for _ in self.line_names: + upd = UpdateGraph(ctrls, is_orb, acc) + upd.moveToThread(self.thread) + self.timer.timeout.connect(upd.update_graphic) + self.updater.append(upd) + + self.setupui() + self.connect_signals() + + self.chn_loopstate = _ConnSig( + self.devpref.substitute(propty='LoopState-Sts')) + + prefx, prefy = ('BPMX', 'BPMY') if self.is_orb else ('CH', 'CV') + self.enbl_pvs = { + 'x': _ConnSig(self.devpref.substitute(propty=prefx+'EnblList-RB')), + 'y': _ConnSig(self.devpref.substitute(propty=prefy+'EnblList-RB'))} + for pln, signal in self.enbl_pvs.items(): + sig = signal.new_value_signal[_np.ndarray] + for upd in self.updater: + sig.connect(_part(upd.set_enbl_list, pln)) + + self.enbl_pvs_set = { + 'x': _ConnSig(self.devpref.substitute(propty=prefx+'EnblList-SP')), + 'y': _ConnSig(self.devpref.substitute(propty=prefy+'EnblList-SP'))} + + self.thread.start() + self.timer.start(1000/self.update_rate) + + @property + def acc(self): + """.""" + return self._csorb.acc + + @property + def acc_idx(self): + """.""" + return self._csorb.acc_idx + + @property + def isring(self): + """.""" + return self._csorb.isring + +
+[docs] + def channels(self): + """.""" + chans = list(self.enbl_pvs.values()) + chans.extend(self.enbl_pvs_set.values()) + return chans
+ + +
+[docs] + def setupui(self): + """.""" + vbl = QVBoxLayout(self) + vbl.setAlignment(Qt.AlignCenter) + + graphx = self.uigetgraph('x', (45, 15)) + graphy = self.uigetgraph('y', (45, 15)) + suf = 'Orbit' if self.is_orb else 'Correctors' + lab = QLabel( + '<h2>' + self.acc + ' - Horizontal ' + suf + '</h2>', + self, alignment=Qt.AlignLeft) + lab.setStyleSheet("""min-height:1.5em; max-height:1.5em;""") + self.hbl_nameh = QHBoxLayout() + vbl.addLayout(self.hbl_nameh) + self.hbl_nameh.addWidget(lab) + self.hbl_nameh.addStretch(1) + vbl.addWidget(graphx) + vbl.addSpacing(30) + lab = QLabel( + '<h2>' + self.acc + ' - Vertical ' + suf + '</h2>', + self, alignment=Qt.AlignLeft) + lab.setStyleSheet("""min-height:1.5em; max-height:1.5em;""") + self.hbl_namev = QHBoxLayout() + vbl.addLayout(self.hbl_namev) + self.hbl_namev.addWidget(lab) + self.hbl_namev.addStretch(1) + self.hbl_namev.addWidget(QLabel('Graphic Update Rate [Hz]:')) + updt_rate = QDoubleSpinBox(self) + updt_rate.setDecimals(1) + updt_rate.setSingleStep(0.1) + updt_rate.setValue(self.update_rate) + updt_rate.setRange(0.5, 10) + updt_rate.valueChanged.connect(self._change_update_rate) + self.hbl_namev.addWidget(updt_rate) + vbl.addWidget(graphy) + self.graph = {'x': graphx, 'y': graphy} + + self.hbl = QHBoxLayout() + vbl.addLayout(self.hbl) + self.hbl.addStretch(6) + for i, _ in enumerate(self.line_names): + grpbx = self.uicreate_groupbox(i) + grpbx.setObjectName('GroupBox'+str(i)) + self.hbl.addWidget(grpbx) + self.hbl.addStretch(6)
+ + + def _change_update_rate(self, value): + self.graph['x'].maxRedrawRate = value + 0.1 + self.graph['y'].maxRedrawRate = value + 0.1 + self.timer.setInterval(1000/value) # [ms] + +
+[docs] + def uigetgraph(self, pln, size): + """.""" + graph = Graph(self) + graph.doubleclick.connect(_part(self._set_enable_list, pln)) + graph.plotItem.scene().sigMouseMoved.connect( + _part(self._show_tooltip, pln=pln)) + if self.is_orb: + xlabel = 'BPM ' + elif pln.lower().endswith('x'): + xlabel = 'CH ' + else: + xlabel = 'CV ' + xlabel += 'Position' + graph.setLabel('bottom', text=xlabel, units='m') + lab = 'Orbit' if self.is_orb else 'Kick Angle' + unit = 'm' if self.is_orb else 'rad' + graph.setLabel('left', text=lab, units=unit) + graph.setObjectName(lab.replace(' ', '')+pln) + + for i, lname in enumerate(self.line_names): + opts = dict( + y_channel='A', + x_channel='B', + name=lname, + color=self._get_color(pln, i), + redraw_mode=2, + lineStyle=1, + lineWidth=2 if i else 3, + symbol='o', + symbolSize=10) + graph.addChannel(**opts) + pen = mkPen(opts['color'], width=opts['lineWidth']) + pen.setStyle(4) + cpstd = InfiniteLine(pos=0.0, pen=pen, angle=0) + self.updater[i].ave_pstd[pln].connect(cpstd.setValue) + graph.addItem(cpstd) + cmstd = InfiniteLine(pos=0.0, pen=pen, angle=0) + self.updater[i].ave_mstd[pln].connect(cmstd.setValue) + graph.addItem(cmstd) + pen.setStyle(2) + cave = InfiniteLine(pos=0.0, pen=pen, angle=0) + self.updater[i].ave[pln].connect(cave.setValue) + graph.addItem(cave) + cdta = graph.curveAtIndex(-1) + self.updater[i].data_sig[pln].connect( + _part(self._update_waveform, cdta, pln, i)) + cdta.setVisible(not i) + cdta.curve.setZValue(-4*i) + cdta.scatter.setZValue(-4*i) + for j, cur in enumerate((cpstd, cmstd, cave), 1): + cur.setZValue(-4*i - j) + cur.setVisible(False) + graph.plotItem.legend.removeItem('') + graph.setStyleSheet(""" + #{0}{{ + min-width:{1}em; + min-height:{2}em; + }}""".format(lab.replace(' ', '')+pln, size[0], size[1])) + return graph
+ + +
+[docs] + def uicreate_groupbox(self, idx): + """.""" + grpbx = QGroupBox(self.line_names[idx], self) + grpbx.setCheckable(True) + grpbx.setChecked(not idx) + grpbx.toggled.connect(self.updater[idx].set_visible) + vbl = QVBoxLayout(grpbx) + gdl = QGridLayout() + gdl.setSpacing(4) + vbl.addLayout(gdl) + + if self.is_orb: + lbl_orb = self.uicreate_label('Show', grpbx) + lbl_ref = self.uicreate_label('as diff to:', grpbx) + cbx_ref = self.uicreate_combobox(grpbx, 'ref', idx) + cbx_orb = self.uicreate_combobox(grpbx, 'val', idx) + gdl.addWidget(lbl_orb, 0, 0) + gdl.addWidget(lbl_ref, 1, 0) + gdl.addWidget(cbx_orb, 0, 1) + gdl.addWidget(cbx_ref, 1, 1) + + pb_save = QPushButton('', grpbx) + pb_save.clicked.connect(_part(self._save_difference, idx)) + pb_save.setObjectName('butt') + pb_save.setStyleSheet('#butt {max-width: 40px; icon-size: 35px;}') + pb_save.setIcon(qta.icon('fa5.save')) + pb_save.setToolTip('Save diff to file') + gdl.addWidget(pb_save, 0, 2, 2, 1) + + unit = 'm' if self.is_orb else 'rad' + for pln in ('x', 'y'): + wid = QWidget(grpbx) + vbl.addWidget(wid) + vbl.setSpacing(2) + hbl = QHBoxLayout(wid) + hbl.setSpacing(0) + cbx = QCheckBox('{0:s}:'.format(pln.upper()), wid) + cbx.setObjectName(pln + 'checkbox') + cbx.setChecked(False) + hbl.addWidget(cbx) + + lab_avg = Label(unit, '-100.00 mrad', wid) + self.updater[idx].ave[pln].connect(lab_avg.setFloat) + lab_avg.setStyleSheet("""min-width:4.5em;""") + lab_avg.setAlignment(Qt.AlignRight) + hbl.addWidget(lab_avg) + hbl.addWidget(QLabel( + " <html><head/><body><p>&#177;</p></body></html> ", wid)) + lab_std = Label(unit, '100.00 mrad', wid) + self.updater[idx].std[pln].connect(lab_std.setFloat) + lab_std.setStyleSheet("""min-width:4.5em;""") + lab_std.setAlignment(Qt.AlignLeft) + hbl.addWidget(lab_std) + + hbl.addWidget(QLabel('(pp. ', wid)) + lab_p2p = Label(unit, '100.00 mrad', wid) + self.updater[idx].p2p[pln].connect(lab_p2p.setFloat) + lab_p2p.setStyleSheet("""min-width:4.5em;""") + lab_p2p.setAlignment(Qt.AlignLeft) + hbl.addWidget(lab_p2p) + hbl.addWidget(QLabel(')', wid)) + return grpbx
+ + +
+[docs] + def uicreate_combobox(self, parent, orb_tp, idx): + """.""" + combo = QComboBox(parent) + combo.setObjectName('ComboBox_' + orb_tp + str(idx)) + sz_pol = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) + combo.setSizePolicy(sz_pol) + combo.setMaxVisibleItems(10) + for name in sorted(self.controls.keys()): + combo.addItem(name) + combo.addItem('Zero') + combo.currentTextChanged.connect(_part( + self.updater[idx].some_changed, orb_tp)) + combo.setCurrentIndex(0) + return combo
+ + +
+[docs] + def uicreate_label(self, lab, parent): + """.""" + label = QLabel(lab, parent) + sz_pol = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Preferred) + label.setSizePolicy(sz_pol) + label.setStyleSheet("""min-width:2.5em;""") + label.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) + return label
+ + +
+[docs] + def connect_signals(self): + """.""" + for i in range(len(self.line_names)): + grpbx = self.findChild(QGroupBox, 'GroupBox' + str(i)) + for pln in ('x', 'y'): + curve = self.graph[pln].curveAtIndex(i) + lines = self.graph[pln].plotItem.items + lines = [x for x in lines if isinstance(x, InfiniteLine)] + cbx = grpbx.findChild(QCheckBox, pln + 'checkbox') + grpbx.toggled.connect(curve.setVisible) + grpbx.toggled.connect(cbx.setChecked) + for j in range(3): + cbx.toggled.connect(lines[3*i + j].setVisible)
+ + + def _get_color(self, pln, idx): + cor = idx * 255 + cor //= len(self.line_names) + cor += 0 + return QColor(255, cor, 0) if pln == 'y' else QColor(0, cor, 255) + + def _show_tooltip(self, pos, pln='x'): + unit = 'rad' + if self.is_orb: + names = self._csorb.bpm_nicknames + posi = self._csorb.bpm_pos + unit = 'm' + elif pln == 'x': + names = self._csorb.ch_nicknames + posi = self._csorb.ch_pos + else: + names = self._csorb.cv_nicknames + posi = self._csorb.cv_pos + + graph = self.graph[pln] + curve = graph.curveAtIndex(0) + posx = curve.scatter.mapFromScene(pos).x() + if self._csorb.isring: + posx = posx % self._csorb.circum + ind = _np.argmin(_np.abs(_np.array(posi)-posx)) + posy = curve.scatter.mapFromScene(pos).y() + + sca, prf = functions.siScale(posy) + txt = '{0:s}, y = {1:.3f} {2:s}'.format( + names[ind], sca*posy, prf+unit) + QToolTip.showText( + graph.mapToGlobal(pos.toPoint()), + txt, graph, graph.geometry(), 500) + + def _set_enable_list(self, pln, idx): + # do not write in enable list when loop is closed + if self.chn_loopstate: + return + val = self.enbl_pvs[pln].getvalue() + val[idx] = not val[idx] + self.enbl_pvs_set[pln].send_value_signal[_np.ndarray].emit(val) + + def _update_enable_list(self, pln, array, curve=None, idx=None): + # cor = (255, 255, 255) + # cor = (0, 200, 0) + cor = (0, 0, 0) + offbrs = mkBrush(*cor) + offpen = mkPen(*cor) + offsimb = 's' + simb = 'o' + offsz = 15 + size = 10 + trcs = [] + if curve is None: + for i in range(len(self.line_names)): + trcs.append((i, self.graph[pln].curveAtIndex(i))) + else: + trcs.append((idx, curve)) + for i, trc in trcs: + cor = self._get_color(pln, i) + brs = mkBrush(cor) + pen = mkPen(cor) + brss, pens, simbs, sizes = [], [], [], [] + for v in array: + if v: + brss.append(brs) + pens.append(pen) + simbs.append(simb) + sizes.append(size) + else: + brss.append(offbrs) + pens.append(offpen) + simbs.append(offsimb) + sizes.append(offsz) + trc.opts['symbolBrush'] = brss + trc.opts['symbolPen'] = pens + # trc.opts['symbol'] = simbs # pyqtgraph bug does not allow this + trc.opts['symbolSize'] = sizes + + def _update_waveform(self, curve, plane, idx, data): + bpm_pos = self._csorb.bpm_pos + if not self.is_orb and plane == 'x': + bpm_pos = self._csorb.ch_pos + elif not self.is_orb and plane == 'y': + bpm_pos = self._csorb.cv_pos + bpm_pos = _np.array(bpm_pos) + + data = _np.asarray(data) + enbl = _np.asarray(self.enbl_pvs[plane].value, dtype=bool) + if enbl is not None and enbl.size > 1: + sz = min(enbl.size, data.size) + self._update_enable_list(plane, enbl[:sz], curve, idx) + nring = sz // bpm_pos.size + if nring > 1: + bpm_pos = [ + bpm_pos + i*self._csorb.circum for i in range(nring)] + bpm_pos = _np.hstack(bpm_pos) + curve.receiveXWaveform(bpm_pos) + curve.receiveYWaveform(data[:sz]) + else: + curve.receiveXWaveform(bpm_pos) + curve.receiveYWaveform(data) + + def _save_difference(self, idx): + updater = self.updater[idx] + valx = updater.vectors['val']['x'] + refx = updater.vectors['ref']['x'] + valy = updater.vectors['val']['y'] + refy = updater.vectors['ref']['y'] + if valx is None or refx is None or valy is None or refy is None: + return + sz = min(valx.size, refx.size, valy.size, refy.size) + diffx = valx[:sz] - refx[:sz] + diffy = valy[:sz] - refy[:sz] + header = '# This is an orbit variation, not a pure orbit. \n' + header += '# ' + _datetime.now().strftime('%Y/%m/%d-%H:%M:%S') + '\n' + header += '# ' + 'BPMX [um] BPMY [um] Name' + '\n' + filename = QFileDialog.getSaveFileName( + caption='Define a File Name to Save the Orbit', + directory=self.last_dir, filter=self.EXT_FLT) + fname = filename[0] + if not fname: + return + fname += '' if fname.endswith(self.EXT) else self.EXT + data = _np.array([diffx, diffy, self._csorb.bpm_names], dtype=object) + _np.savetxt( + fname, data.T, header=header, fmt='%+18.8e %+18.8e %s') + self.last_dir = fname.rsplit('/', 1)[0]
+ + + +
+[docs] +class UpdateGraph(QObject): + """Worker to update graphics.""" + avex = Signal([float]) + stdx = Signal([float]) + p2px = Signal([float]) + ave_pstdx = Signal([float]) + ave_mstdx = Signal([float]) + data_sigx = Signal([_np.ndarray]) + ref_sigx = Signal([_np.ndarray]) + avey = Signal([float]) + stdy = Signal([float]) + p2py = Signal([float]) + ave_pstdy = Signal([float]) + ave_mstdy = Signal([float]) + data_sigy = Signal([_np.ndarray]) + ref_sigy = Signal([_np.ndarray]) + + UNIT = 1e-6 # orbit is in um and strength in urad + + def __init__(self, ctrls, is_orb, acc='SI'): + """Initialize object.""" + super().__init__() + self.ctrls = ctrls + self.acc = acc + self._csorb = SOFBFactory.create(acc) + self.is_orb = is_orb + self._isvisible = True + text = sorted(ctrls)[0] + self.current_text = {'val': text, 'ref': text} + self.ave = {'x': self.avex, 'y': self.avey} + self.p2p = {'x': self.p2px, 'y': self.p2py} + self.std = {'x': self.stdx, 'y': self.stdy} + self.ave_pstd = {'x': self.ave_pstdx, 'y': self.ave_pstdy} + self.ave_mstd = {'x': self.ave_mstdx, 'y': self.ave_mstdy} + self.data_sig = {'x': self.data_sigx, 'y': self.data_sigy} + self.raw_ref_sig = {'x': self.ref_sigx, 'y': self.ref_sigy} + self.slots = { + 'val': { + 'x': _part(self._update_vectors, 'val', 'x'), + 'y': _part(self._update_vectors, 'val', 'y')}, + 'ref': { + 'x': _part(self._update_vectors, 'ref', 'x'), + 'y': _part(self._update_vectors, 'ref', 'y')}} + nbpms = self._csorb.nr_bpms + szx = nbpms if self.is_orb else self._csorb.nr_ch + szy = nbpms if self.is_orb else self._csorb.nr_cv + self.vectors = { + 'val': { + 'x': _np.zeros(szx, dtype=float), + 'y': _np.zeros(szy, dtype=float)}, + 'ref': { + 'x': _np.zeros(szx, dtype=float), + 'y': _np.zeros(szy, dtype=float)}} + self.enbl_list = { + 'x': _np.ones(szx, dtype=bool), + 'y': _np.ones(szy, dtype=bool)} + sig_x = self.ctrls[self.current_text['ref']]['x']['signal'] + sig_y = self.ctrls[self.current_text['ref']]['y']['signal'] + sig_x[_np.ndarray].connect(self.slots['ref']['x']) + sig_y[_np.ndarray].connect(self.slots['ref']['y']) + sig_x = self.ctrls[self.current_text['val']]['x']['signal'] + sig_y = self.ctrls[self.current_text['val']]['y']['signal'] + sig_x[_np.ndarray].connect(self.slots['val']['x']) + sig_y[_np.ndarray].connect(self.slots['val']['y']) + +
+[docs] + def some_changed(self, orb_tp, text): + """.""" + if text not in (self.ctrls.keys() | {'Zero'}): + return + slot_x = self.slots[orb_tp]['x'] + slot_y = self.slots[orb_tp]['y'] + + if self.current_text[orb_tp] != 'Zero': + sig_x = self.ctrls[self.current_text[orb_tp]]['x']['signal'] + sig_y = self.ctrls[self.current_text[orb_tp]]['y']['signal'] + sig_x[_np.ndarray].disconnect(slot_x) + sig_y[_np.ndarray].disconnect(slot_y) + + self.current_text[orb_tp] = text + if self.current_text[orb_tp] != 'Zero': + sig_x = self.ctrls[text]['x']['signal'] + sig_y = self.ctrls[text]['y']['signal'] + sig_x[_np.ndarray].connect(slot_x) + sig_y[_np.ndarray].connect(slot_y) + slot_y(self.ctrls[text]['y']['getvalue']()) + slot_x(self.ctrls[text]['x']['getvalue']()) + else: + if self.vectors[orb_tp]['x'] is not None: + slot_x(self.vectors[orb_tp]['x']*0) + if self.vectors[orb_tp]['y'] is not None: + slot_y(self.vectors[orb_tp]['y']*0)
+ + +
+[docs] + def set_visible(self, boo): + """.""" + self._isvisible = boo
+ + +
+[docs] + def set_enbl_list(self, pln, enbls): + """.""" + self.enbl_list[pln] = _np.array(enbls, dtype=bool)
+ + + def _update_vectors(self, orb_tp, pln, orb): + self.vectors[orb_tp][pln] = orb + if orb_tp == 'ref' and orb is not None: + self.raw_ref_sig[pln].emit(orb) + +
+[docs] + def update_graphic(self, pln=None): + """.""" + if not self._isvisible: + return + plns = ('x', 'y') if pln is None else (pln, ) + for pln in plns: + orb = self.vectors['val'][pln] + ref = self.vectors['ref'][pln] + if orb is None or ref is None: + return + sz = min(orb.size, ref.size) + diff = (orb[:sz] - ref[:sz]) * self.UNIT + + enbl = self.enbl_list[pln] + if enbl is not None: + sz = min(sz, enbl.size) + mask = diff[:sz][enbl[:sz]] + else: + mask = diff + ave = float(mask.mean()) if mask.size > 0 else 0.0 + p2p = float(mask.max() - mask.min()) if mask.size > 1 else 0.0 + std = float(mask.std(ddof=1)) if mask.size > 1 else 0.0 + + self.data_sig[pln].emit(diff) + self.ave[pln].emit(ave) + self.std[pln].emit(std) + self.p2p[pln].emit(p2p) + self.ave_pstd[pln].emit(ave-std) + self.ave_mstd[pln].emit(ave+std)
+
+ + + +
+[docs] +class Label(QLabel): + """.""" + + FMT = '{0:.2f}' + + def __init__(self, unit, *args, **kwargs): + """.""" + super().__init__(*args, **kwargs) + self.unit = unit + +
+[docs] + def setFloat(self, val): + """.""" + sc, prf = functions.siScale(val) + val *= sc + text = self.FMT.format(val) + text += ' ' + prf + self.unit + super().setText(text)
+
+ + + +
+[docs] +class Graph(SiriusWaveformPlot): + """.""" + + doubleclick = Signal(int) + + def __init__(self, *args, **kwargs): + """.""" + super().__init__(*args, **kwargs) + self.setObjectName('graph') + self.setStyleSheet('#graph {min-height: 13em; min-width: 20em;}') + self.maxRedrawRate = 2 + self.mouseEnabledX = True + self.setShowXGrid(True) + self.setShowYGrid(True) + self.setBackgroundColor(QColor(255, 255, 255)) + self.setShowLegend(True) + self.setAutoRangeX(True) + self.setAutoRangeY(True) + self.setMinXRange(0.0) + self.setMaxXRange(1.0) + self.setAxisColor(QColor(0, 0, 0)) + self.plotItem.getAxis('bottom').setStyle(tickTextOffset=15) + self.plotItem.getAxis('left').setStyle(tickTextOffset=5) + +
+[docs] + def mouseDoubleClickEvent(self, ev): + """.""" + if ev.button() == Qt.LeftButton: + posx = self.curveAtIndex(0).xData + vb = self.plotItem.getViewBox() + pos = vb.mapSceneToView(ev.pos()) + i = _np.argmin(_np.abs(posx-pos.x())) + self.doubleclick.emit(i) + super().mouseDoubleClickEvent(ev)
+
+ + + +
+[docs] +class InfLine(InfiniteLine): + """.""" + + def __init__(self, conv=1, pos=None, **kwargs): + """.""" + if pos is not None: + pos *= conv + super().__init__(pos=pos, **kwargs) + self.conv = conv + +
+[docs] + def setValue(self, value): + """.""" + super().setValue(value*self.conv)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/graphics/correctors.html b/_modules/siriushla/as_ap_sofb/graphics/correctors.html new file mode 100644 index 000000000..b3e36277d --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/graphics/correctors.html @@ -0,0 +1,340 @@ + + + + + + siriushla.as_ap_sofb.graphics.correctors — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_sofb.graphics.correctors

+"""Control the Correctors Graphic Displnay."""
+
+from pyqtgraph import mkPen
+from qtpy.QtWidgets import QCheckBox, QLabel, QHBoxLayout, QGroupBox, \
+    QSizePolicy as QSzPol
+from qtpy.QtGui import QColor
+from siriushla.widgets import SiriusConnectionSignal as _ConnSig, SiriusLabel
+from siriushla.as_ap_sofb.graphics.base import BaseWidget, InfLine
+
+
+
+[docs] +class CorrectorsWidget(BaseWidget): + + def __init__(self, parent, device, prefix='', ctrls=dict(), acc='SI'): + self._chans = [] + if not ctrls: + self._chans, ctrls = self.get_default_ctrls(device, prefix) + + names = ('DeltaKicks', 'Kicks', 'FOFB Download', 'Ref Kicks') + super().__init__(parent, device, ctrls, names, False, prefix, acc) + + self.updater[0].some_changed('val', 'Delta Kicks') + self.updater[0].some_changed('ref', 'Zero') + self.updater[1].some_changed('val', 'Kicks') + self.updater[1].some_changed('ref', 'Zero') + self.updater[2].some_changed('val', 'FOFB Download') + self.updater[2].some_changed('ref', 'Zero') + self.updater[3].some_changed('val', 'Ref Kicks') + self.updater[3].some_changed('ref', 'Zero') + + if acc in {'SI', 'BO'}: + self.add_RF_kicks() + self.add_kicklimits_curves() + +
+[docs] + def add_RF_kicks(self): + grpbx = QGroupBox('RF', self) + vbl = QHBoxLayout(grpbx) + self.hbl_nameh.addWidget(grpbx) + + hbl = QHBoxLayout() + vbl.addLayout(hbl) + lbl = QLabel('Frequency', grpbx) + hbl.addWidget(lbl) + lbl = SiriusLabel( + grpbx, + self.devpref.substitute(propty='KickRF-Mon'), + keep_unit=True, + ) + lbl.showUnits = True + lbl.setSizePolicy(QSzPol.Fixed, QSzPol.Preferred) + lbl.setStyleSheet('min-width: 8em;') + hbl.addWidget(lbl) + + hbl = QHBoxLayout() + vbl.addLayout(hbl) + lbl = QLabel('Delta Freq.', grpbx) + hbl.addWidget(lbl) + lbl = SiriusLabel( + grpbx, self.devpref.substitute(propty='DeltaKickRF-Mon') + ) + lbl.showUnits = True + lbl.setSizePolicy(QSzPol.Fixed, QSzPol.Preferred) + lbl.setStyleSheet('min-width: 6em;') + hbl.addWidget(lbl)
+ + +
+[docs] + def add_kicklimits_curves(self): + grpbx = QGroupBox('Show Kick Limits', self) + vbl = QHBoxLayout(grpbx) + self.hbl_namev.addStretch(1) + self.hbl_namev.addWidget(grpbx) + chcbox1 = QCheckBox('Kicks', grpbx) + chcbox2 = QCheckBox('Delta Kicks', grpbx) + chcbox1.setChecked(True) + chcbox2.setChecked(True) + vbl.addWidget(chcbox1) + vbl.addWidget(chcbox2) + + chcboxs = (chcbox1, chcbox2) + names = ('Max Kicks', 'Max dKickx') + pvs = ('MaxKick', 'MaxDeltaKick') + stys = (4, 2) + wids = (3, 2) + plns = ('x', 'y') + corrs = ('CH', 'CV') + for chb, name, pvi, sty, wid in zip(chcboxs, names, pvs, stys, wids): + pen = mkPen(QColor(0, 0, 0)) + pen.setStyle(sty) + pen.setWidth(wid) + for pln, corr in zip(plns, corrs): + maxkick = InfLine( + conv=1e-6, pos=0.0, pen=pen, angle=0, name=name) + minkick = InfLine(conv=-1e-6, pos=0.0, pen=pen, angle=0) + self.graph[pln].addItem(maxkick) + self.graph[pln].addItem(minkick) + chan = _ConnSig( + self.devpref.substitute(propty=pvi + corr + '-RB')) + self._chans.append(chan) + chan.new_value_signal[float].connect(maxkick.setValue) + chan.new_value_signal[float].connect(minkick.setValue) + chb.toggled.connect(maxkick.setVisible) + chb.toggled.connect(minkick.setVisible) + chb.setChecked(False)
+ + +
+[docs] + def channels(self): + chans = super().channels() + chans.extend(self._chans) + return chans
+ + +
+[docs] + @staticmethod + def get_default_ctrls(device, prefix=''): + basename = device.substitute(prefix=prefix) + chans = [ + _ConnSig(basename.substitute(propty='DeltaKickCH-Mon')), + _ConnSig(basename.substitute(propty='DeltaKickCV-Mon')), + _ConnSig(basename.substitute(propty='KickCH-Mon')), + _ConnSig(basename.substitute(propty='KickCV-Mon')), + _ConnSig(basename.substitute(propty='FOFBDownloadKicksCH-Mon')), + _ConnSig(basename.substitute(propty='FOFBDownloadKicksCV-Mon')), + _ConnSig(basename.substitute(propty='RefKickCH-Mon')), + _ConnSig(basename.substitute(propty='RefKickCV-Mon')), + ] + ctrls = { + 'Delta Kicks': { + 'x': { + 'signal': chans[0].new_value_signal, + 'getvalue': chans[0].getvalue, + }, + 'y': { + 'signal': chans[1].new_value_signal, + 'getvalue': chans[1].getvalue, + } + }, + 'Kicks': { + 'x': { + 'signal': chans[2].new_value_signal, + 'getvalue': chans[2].getvalue, + }, + 'y': { + 'signal': chans[3].new_value_signal, + 'getvalue': chans[3].getvalue, + } + }, + 'FOFB Download': { + 'x': { + 'signal': chans[4].new_value_signal, + 'getvalue': chans[4].getvalue, + }, + 'y': { + 'signal': chans[5].new_value_signal, + 'getvalue': chans[5].getvalue, + } + }, + 'Ref Kicks': { + 'x': { + 'signal': chans[6].new_value_signal, + 'getvalue': chans[6].getvalue, + }, + 'y': { + 'signal': chans[7].new_value_signal, + 'getvalue': chans[7].getvalue, + } + }, + } + return chans, ctrls
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/graphics/orbit.html b/_modules/siriushla/as_ap_sofb/graphics/orbit.html new file mode 100644 index 000000000..719c2fa61 --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/graphics/orbit.html @@ -0,0 +1,700 @@ + + + + + + siriushla.as_ap_sofb.graphics.orbit — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_sofb.graphics.orbit

+"""Control the Orbit Graphic Displnay."""
+
+from functools import partial as _part
+import numpy as _np
+from pyqtgraph import functions
+from qtpy.QtWidgets import QWidget, QLabel, QVBoxLayout, QPushButton, \
+    QHBoxLayout, QGroupBox, QComboBox, QToolTip, QGridLayout
+from qtpy.QtCore import Qt, Signal
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.sofb.csdev import SOFBFactory
+import siriushla.util as _util
+from siriushla.widgets.windows import create_window_from_widget
+from siriushla.widgets import SiriusSpectrogramView, SiriusLabel, \
+    SiriusConnectionSignal as _ConnSig
+
+from .base import BaseWidget, Graph
+from .correctors import CorrectorsWidget
+
+
+
+[docs] +class OrbitWidget(BaseWidget): + """.""" + + def __init__(self, parent, device, prefix='', ctrls=None, acc='SI'): + """.""" + self._chans = [] + self._csorb = SOFBFactory.create(acc) + if not ctrls: + self._chans, ctrls = self.get_default_ctrls( + device, prefix, acc=acc.upper()) + + names = ['Line {0:d}'.format(i+1) for i in range(2)] + super().__init__(parent, device, ctrls, names, True, prefix, acc) + + txt1, txt2 = 'IOC-SPassOrb', 'IOC-RefOrb' + if self.acc == 'SI': + txt1 = 'IOC-SlowOrb' + elif self.acc == 'BO': + txt1 = 'IOC-MTurnOrb' + + self.updater[0].some_changed('val', txt1) + self.updater[0].some_changed('ref', txt2) + cb1 = self.findChild(QComboBox, 'ComboBox_val0') + cb2 = self.findChild(QComboBox, 'ComboBox_ref0') + it1 = cb1.findText(txt1) + it2 = cb2.findText(txt2) + cb1.setCurrentIndex(it1) + cb2.setCurrentIndex(it2) + + self.add_buttons_for_images() + +
+[docs] + def add_buttons_for_images(self): + """.""" + grpbx = QGroupBox('Other Graphs', self) + gdl = QGridLayout(grpbx) + gdl.setSpacing(2) + self.hbl_nameh.addWidget(grpbx) + + btn = QPushButton('Corrs', grpbx) + gdl.addWidget(btn, 0, 0) + Window = create_window_from_widget( + CorrectorsWidget, title=self.acc + ' - Correctors') + _util.connect_window( + btn, Window, self, device=self.device, + prefix=self.prefix, acc=self.acc) + + if self.isring: + btn = QPushButton('MTurn Orb', grpbx) + gdl.addWidget(btn, 0, 1) + Window = create_window_from_widget( + MultiTurnWidget, title='Multi Turn') + _util.connect_window( + btn, Window, self, sigs=self.updater[0].raw_ref_sig, + device=self.device, prefix=self.prefix, csorb=self._csorb) + + btn = QPushButton('MTurn Sum', grpbx) + gdl.addWidget(btn, 0, 2) + Window = create_window_from_widget( + MultiTurnSumWidget, title='Multi Turn Sum') + _util.connect_window( + btn, Window, self, device=self.device, prefix=self.prefix, + csorb=self._csorb) + + if self.acc != 'BO': + btn = QPushButton('SingPass Sum', grpbx) + gdl.addWidget(btn, 0, 3) + Window = create_window_from_widget( + SinglePassSumWidget, title='Single Pass Sum') + _util.connect_window( + btn, Window, self, device=self.device, prefix=self.prefix, + csorb=self._csorb)
+ + +
+[docs] + def channels(self): + """.""" + chans = super().channels() + chans.extend(self._chans) + return chans
+ + +
+[docs] + @staticmethod + def get_default_ctrls(device, prefix='', acc='SI'): + """.""" + pvs = ['RefOrbX-RB', 'RefOrbY-RB'] + orbs = ['IOC-RefOrb', ] + if acc.upper() != 'BO': + pvs.extend(['SPassOrbX-Mon', 'SPassOrbY-Mon']) + orbs.append('IOC-SPassOrb') + if acc.upper() == 'SI': + pvs.extend(['SlowOrbX-Mon', 'SlowOrbY-Mon']) + orbs.append('IOC-SlowOrb') + if acc.upper() in {'SI', 'BO'}: + pvs.extend(['MTurnIdxOrbX-Mon', 'MTurnIdxOrbY-Mon']) + orbs.append('IOC-MTurnOrb') + + chans = [_ConnSig(device.substitute(prefix=prefix, propty=pv)) + for pv in pvs] + ctrls = dict() + pvs = iter(chans) + for orb in orbs: + pvi = next(pvs) + pvj = next(pvs) + ctrls[orb] = { + 'x': { + 'signal': pvi.new_value_signal, + 'getvalue': pvi.getvalue}, + 'y': { + 'signal': pvj.new_value_signal, + 'getvalue': pvj.getvalue}} + return chans, ctrls
+
+ + + +
+[docs] +class MultiTurnWidget(QWidget): + """.""" + + def __init__(self, parent, sigs, device, prefix, csorb): + """.""" + super().__init__(parent) + self._csorb = csorb + self.prefix = prefix + self.device = _PVName(device) + self.devpref = self.device.substitute(prefix=prefix) + self.setObjectName(csorb.acc + 'App') + self.setupui() + self.sigs = sigs + self.fun2setref = { + 'x': _part(self.setreforbits, 'x'), + 'y': _part(self.setreforbits, 'y')} + +
+[docs] + def showEvent(self, _): + """.""" + for pln, sig in self.sigs.items(): + sig.connect(self.fun2setref[pln])
+ + +
+[docs] + def hideEvent(self, _): + """.""" + for pln, sig in self.sigs.items(): + try: + sig.disconnect(self.fun2setref[pln]) + except TypeError: + pass
+ + +
+[docs] + def setupui(self): + """.""" + hbl = QHBoxLayout(self) + self.spectx = MultiTurnSumWidget( + self, device=self.device, prefix=self.prefix, + orbtype='X', csorb=self._csorb) + self.specty = MultiTurnSumWidget( + self, device=self.device, prefix=self.prefix, + orbtype='Y', csorb=self._csorb) + hbl.addWidget(self.spectx) + hbl.addSpacing(50) + hbl.addWidget(self.specty)
+ + +
+[docs] + def setreforbits(self, pln, orb): + """.""" + if pln.lower() == 'x': + self.spectx.spect.setreforbit(orb) + else: + self.specty.spect.setreforbit(orb)
+
+ + + +
+[docs] +class MultiTurnSumWidget(QWidget): + """.""" + + ratio_sum_avg = Signal(str) + ratio_sum_std = Signal(str) + + def __init__(self, parent, device, prefix='', orbtype='sum', csorb=None): + """.""" + super().__init__(parent) + self.prefix = prefix + self.device = _PVName(device) + self.devpref = self.device.substitute(prefix=prefix) + self.orbtype = orbtype.lower() + self._csorb = csorb + self.setObjectName(self.device.sec+'App') + self.multiturnidx = _ConnSig( + self.devpref.substitute(propty='MTurnIdx-SP')) + self.setupui() + +
+[docs] + def setupui(self): + """.""" + vbl = QVBoxLayout(self) + if self.orbtype.startswith('sum'): + img_propty = 'MTurnSum-Mon' + orb_propty = 'MTurnIdxSum-Mon' + unit = 'count' + color = 'black' + elif self.orbtype.startswith('x'): + img_propty = 'MTurnOrbX-Mon' + orb_propty = 'MTurnIdxOrbX-Mon' + unit = 'm' + color = 'blue' + else: + img_propty = 'MTurnOrbY-Mon' + orb_propty = 'MTurnIdxOrbY-Mon' + unit = 'm' + color = 'red' + lbl_text = img_propty.split('-')[0] + + self.spect = Spectrogram( + parent=self, + device=self.device, + prefix=self.prefix, + image_channel=self.devpref.substitute(propty=img_propty), + xaxis_channel=self.devpref.substitute(propty='BPMPosS-Mon'), + yaxis_channel=self.devpref.substitute(propty='MTurnTime-Mon')) + self.spect.new_data_sig.connect(self.update_graph) + self.spect.normalizeData = True + self.spect.yaxis.setLabel('Time', units='s') + self.spect.xaxis.setLabel('BPM Position', units='m') + self.spect.colorbar.label_format = '{:<8.1f}' + lab = QLabel(lbl_text + ' Orbit', self, alignment=Qt.AlignCenter) + lab.setStyleSheet("font-weight: bold;") + vbl.addWidget(lab) + vbl.addWidget(self.spect) + + vbl.addStretch() + lab = QLabel( + 'Average ' + lbl_text + ' vs Time', self, alignment=Qt.AlignCenter) + lab.setStyleSheet("font-weight: bold;") + hbl = QHBoxLayout() + hbl.addStretch() + hbl.addWidget(lab) + hbl.addStretch() + if self.orbtype.startswith('sum'): + hbl.addWidget(QLabel(' Eff [%] =', self)) + ratio_avg = QLabel('000.0', self, alignment=Qt.AlignRight) + ratio_std = QLabel('000.0', self, alignment=Qt.AlignLeft) + hbl.addWidget(ratio_avg, alignment=Qt.AlignRight) + hbl.addWidget(QLabel( + '<html><head/><body><p>&#177;</p></body></html>', self)) + hbl.addWidget(ratio_std, alignment=Qt.AlignLeft) + hbl.addStretch() + self.ratio_sum_avg.connect(ratio_avg.setText) + self.ratio_sum_std.connect(ratio_std.setText) + vbl.addLayout(hbl) + + graph = Graph(self) + graph.setLabel('bottom', text='Time', units='s') + graph.setLabel('left', text='Avg ' + lbl_text, units=unit) + opts = dict( + y_channel='A', + x_channel=self.devpref.substitute(propty='MTurnTime-Mon'), + name='', + color=color, + redraw_mode=2, + lineStyle=1, + lineWidth=3, + symbol='o', + symbolSize=10) + graph.addChannel(**opts) + graph.setShowLegend(False) + graph.plotItem.scene().sigMouseMoved.connect(self._show_tooltip_time) + self.curve = graph.curveAtIndex(0) + self.graph_time = graph + vbl.addWidget(graph) + + if not self.orbtype.startswith('sum'): + return + + vbl.addStretch() + wid = QWidget(self) + lab = QLabel( + lbl_text + ' orbit at index:', wid, + alignment=Qt.AlignRight | Qt.AlignVCenter) + lab.setStyleSheet("font-weight: bold;") + pdmlab = SiriusLabel( + wid, self.devpref.substitute(propty='MTurnIdx-RB')) + pdmlab.setAlignment(Qt.AlignLeft | Qt.AlignVCenter) + pdmlab.setStyleSheet('min-width:4em;') + wid.setLayout(QHBoxLayout()) + wid.layout().addStretch() + wid.layout().addWidget(lab) + wid.layout().addWidget(pdmlab) + wid.layout().addStretch() + vbl.addWidget(wid) + graph = Graph(self) + vbl.addWidget(graph) + graph.setLabel('bottom', text='BPM Position', units='m') + graph.setLabel('left', text='Sum', units='count') + opts = dict( + y_channel=self.devpref.substitute(propty=orb_propty), + x_channel=self.devpref.substitute(propty='BPMPosS-Mon'), + name='', + color=color, + redraw_mode=2, + lineStyle=1, + lineWidth=3, + symbol='o', + symbolSize=10) + graph.addChannel(**opts) + graph.setShowLegend(False) + graph.plotItem.scene().sigMouseMoved.connect(self._show_tooltip) + self.graph = graph
+ + +
+[docs] + def mouseDoubleClickEvent(self, ev): + """.""" + if ev.button() != Qt.LeftButton: + return super().mouseDoubleClickEvent(ev) + graph = self.graph_time + curve = graph.curveAtIndex(0) + posx = curve.scatter.mapFromScene(ev.pos()).x() + times = curve.getData()[0] + if times is None: + return super().mouseDoubleClickEvent(ev) + ind = _np.argmin(_np.abs(times-posx)) + self.multiturnidx.send_value_signal[int].emit(int(ind)) + super().mouseDoubleClickEvent(ev)
+ + + def _show_tooltip(self, pos): + names = self._csorb.bpm_nicknames + posi = self._csorb.bpm_pos + unit = 'count' + + graph = self.graph + curve = graph.curveAtIndex(0) + posx = curve.scatter.mapFromScene(pos).x() + if self._csorb.isring: + posx = posx % self._csorb.circum + ind = _np.argmin(_np.abs(_np.array(posi)-posx)) + posy = curve.scatter.mapFromScene(pos).y() + + sca, prf = functions.siScale(posy) + txt = '{0:s}, y = {1:.3f} {2:s}'.format( + names[ind], sca*posy, prf+unit) + QToolTip.showText( + graph.mapToGlobal(pos.toPoint()), + txt, graph, graph.geometry(), 500) + + def _show_tooltip_time(self, pos): + graph = self.graph_time + curve = graph.curveAtIndex(0) + posx = curve.scatter.mapFromScene(pos).x() + times = curve.getData()[0] + if times is None: + return + ind = _np.argmin(_np.abs(times-posx)) + txt = f'index = {ind:d}' + QToolTip.showText( + graph.mapToGlobal(pos.toPoint()), + txt, graph, graph.geometry(), 500) + +
+[docs] + def update_graph(self, data): + """.""" + scale = 1e-6 + if self.orbtype.startswith('sum'): + scale = 1 + datay = scale*data.mean(axis=1) + self.curve.receiveYWaveform(datay) + if self.orbtype.startswith('sum') and datay.size > 6: + ratios = datay[-5:]/datay[0]*100 + self.ratio_sum_avg.emit(f'{ratios.mean():.1f}') + self.ratio_sum_std.emit(f'{ratios.std():.1f}')
+
+ + + +
+[docs] +class Spectrogram(SiriusSpectrogramView): + """.""" + + new_data_sig = Signal(_np.ndarray) + + def __init__(self, device, prefix='', **kwargs): + """.""" + self._reforb = None + super().__init__(**kwargs) + self.setObjectName('graph') + self.setStyleSheet('#graph {min-height: 15em; min-width: 20em;}') + self.prefix = prefix + self.device = _PVName(device) + self.devpref = self.device.substitute(prefix=prefix) + self.multiturnidx = _ConnSig( + self.devpref.substitute(propty='MTurnIdx-SP')) + +
+[docs] + def channels(self): + """.""" + chans = super().channels() + chans.append(self.multiturnidx) + return chans
+ + +
+[docs] + def setreforbit(self, orb): + """.""" + self._reforb = orb + self.needs_redraw = True
+ + +
+[docs] + def process_image(self, img): + """.""" + if self._reforb is not None and img.shape[1] == self._reforb.size: + img = img - self._reforb[None, :] + self.new_data_sig.emit(img) + return img
+ + +
+[docs] + def mouseDoubleClickEvent(self, ev): + """.""" + if ev.button() == Qt.LeftButton: + pos = self._image_item.mapFromDevice(ev.pos()) + if pos.y() > 0 and pos.y() <= self._image_item.height(): + self.multiturnidx.send_value_signal[int].emit(int(pos.y())) + super().mouseDoubleClickEvent(ev)
+
+ + + +
+[docs] +class SinglePassSumWidget(QWidget): + """.""" + + def __init__(self, parent, device, csorb, prefix=''): + """.""" + super().__init__(parent) + self.prefix = prefix + self.device = _PVName(device) + self.devpref = self.device.substitute(prefix=prefix) + self.setObjectName(csorb.acc+'App') + self._csorb = csorb + self.setupui() + +
+[docs] + def setupui(self): + """.""" + vbl = QVBoxLayout(self) + + lab = QLabel('SinglePass Sum BPMs', self, alignment=Qt.AlignCenter) + lab.setStyleSheet("font-weight: bold;") + vbl.addWidget(lab) + + graph = Graph(self) + vbl.addWidget(graph) + graph.setLabel('bottom', text='BPM Position', units='m') + graph.setLabel('left', text='Sum', units='count') + opts = dict( + y_channel=self.devpref.substitute(propty='SPassSum-Mon'), + x_channel=self.devpref.substitute(propty='BPMPosS-Mon'), + name='', + color='black', + redraw_mode=2, + lineStyle=1, + lineWidth=3, + symbol='o', + symbolSize=10) + graph.addChannel(**opts) + graph.plotItem.scene().sigMouseMoved.connect(self._show_tooltip) + graph.setShowLegend(False) + self.graph = graph
+ + + def _show_tooltip(self, pos): + names = self._csorb.bpm_nicknames + posi = self._csorb.bpm_pos + unit = 'count' + + graph = self.graph + curve = graph.curveAtIndex(0) + posx = curve.scatter.mapFromScene(pos).x() + if self._csorb.isring: + posx = posx % self._csorb.circum + ind = _np.argmin(_np.abs(_np.array(posi)-posx)) + posy = curve.scatter.mapFromScene(pos).y() + + sca, prf = functions.siScale(posy) + txt = '{0:s}, y = {1:.3f} {2:s}'.format( + names[ind], sca*posy, prf+unit) + QToolTip.showText( + graph.mapToGlobal(pos.toPoint()), + txt, graph, graph.geometry(), 500)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/graphics/respmat.html b/_modules/siriushla/as_ap_sofb/graphics/respmat.html new file mode 100644 index 000000000..e47aa0347 --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/graphics/respmat.html @@ -0,0 +1,372 @@ + + + + + + siriushla.as_ap_sofb.graphics.respmat — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_sofb.graphics.respmat

+"""Control the Orbit Graphic Display."""
+from functools import partial as _part
+
+import numpy as _np
+from pyqtgraph import mkPen
+# from pyqtgraph import functions
+from qtpy.QtWidgets import QWidget, QLabel, QVBoxLayout, QHBoxLayout, \
+    QToolTip
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QColor
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.sofb.csdev import SOFBFactory
+from siriushla.widgets import SiriusConnectionSignal as _ConnSig, QSpinBoxPlus
+from .base import Graph, InfLine
+
+
+
+[docs] +class ShowMatrixWidget(QWidget): + + def __init__(self, parent, device, acc, prefix=''): + super().__init__(parent) + self.prefix = prefix + self.device = _PVName(device) + self.devpref = self.device.substitute(prefix=prefix) + self.acc = acc.upper() + self.setObjectName(self.acc+'App') + self._csorb = SOFBFactory.create(acc) + self._inflines = [] + self.setupui() + self.mat = _ConnSig(self.devpref.substitute(propty='RespMat-Mon')) + self.mat.new_value_signal[_np.ndarray].connect(self._update_graph) + self._update_horizontal(None) + self._update_graph(None) + +
+[docs] + def setupui(self): + vbl = QVBoxLayout(self) + + lab = QLabel('Response Matrix', self, alignment=Qt.AlignCenter) + lab.setStyleSheet("font-weight: bold;") + vbl.addWidget(lab) + + graph = Graph(self) + vbl.addWidget(graph) + + self.spbox = QSpinBoxPlus(self) + self.spbox.setMaximum(1000) + self.spbox.setValue(80) + self.spbox.setKeyboardTracking(False) + self.spbox.editingFinished.connect(self._update_graph) + + hbl = QHBoxLayout() + vbl.addLayout(hbl) + hbl.addWidget(QLabel('Lines spacing:', self)) + hbl.addWidget(self.spbox) + hbl.addStretch() + + graph.setShowLegend(False) + graph.setLabel('bottom', text='BPM Position', units='m') + graph.setLabel('left', text='Matrix', units='m/rad') + for i in range(self._csorb.nr_corrs): + color = 'blue' + if i >= self._csorb.nr_ch: + color = 'red' + if i >= self._csorb.nr_ch+self._csorb.nr_cv: + color = 'black' + opts = dict( + y_channel='', + x_channel='', # self.devpref.substitute(propty='BPMPosS-Mon'), + name='', + color=color, + redraw_mode=2, + lineStyle=1, + lineWidth=3, + symbol='o', + symbolSize=10) + graph.addChannel(**opts) + graph.plotItem.scene().sigMouseMoved.connect(self._show_tooltip) + self.graph = graph
+ + + def _show_tooltip(self, pos): + names = self._csorb.bpm_nicknames + cname = self._csorb.ch_nicknames + self._csorb.cv_nicknames + if self._csorb.isring: + cname += ['RF', ] + posi = self._csorb.bpm_pos + + graph = self.graph + curve = graph.curveAtIndex(0) + posx = curve.scatter.mapFromScene(pos).x() + if self._csorb.isring: + posx = posx % self._csorb.circum + ind = _np.argmin(_np.abs(_np.array(posi)-posx)) + posy = curve.scatter.mapFromScene(pos).y() + + indy = int(posy // self.spbox.value()) + indy = max(min(indy, len(cname)-1), 0) + # sca, prf = functions.siScale(posy) + txt = 'BPM = {0:s}, Corr = {1:s}'.format(names[ind], cname[indy]) + QToolTip.showText( + graph.mapToGlobal(pos.toPoint()), + txt, graph, graph.geometry(), 500) + + def _update_graph(self, *args): + sep = self.spbox.value() + val = self.mat.value + if val is None: + return + val = val.reshape(-1, self._csorb.nr_corrs) + for i in range(self._csorb.nr_corrs): + cur = self.graph.curveAtIndex(i) + cur.receiveYWaveform(sep*i + val[:, i]) + + def _update_horizontal(self, _): + val = 1 + bpm_pos = _np.array(self._csorb.bpm_pos) + bpm_pos = [bpm_pos + i*self._csorb.circum for i in range(2*val)] + bpm_pos = _np.hstack(bpm_pos) + for i in range(self._csorb.nr_corrs): + cur = self.graph.curveAtIndex(i) + cur.receiveXWaveform(bpm_pos) + + for cur in self._inflines: + self.graph.removeItem(cur) + self._inflines = [] + for i in range(2*val+1): + dic = {'style': 2, 'width': 2, 'color': '000'} + if i == val: + dic = {'style': 1, 'width': 3, 'color': '000'} + pen = mkPen(**dic) + line = InfLine(pos=i*self._csorb.circum+bpm_pos[0]/2, pen=pen) + self._inflines.append(line) + self.graph.addItem(line)
+ + + +
+[docs] +class SingularValues(QWidget): + + def __init__(self, parent, device, prefix=''): + super().__init__(parent) + self.prefix = prefix + self.device = _PVName(device) + self.devpref = self.device.substitute(prefix=prefix) + self.setObjectName(self.device.sec+'App') + self._chan = _ConnSig( + self.devpref.substitute(propty='NrSingValues-Mon')) + self.setupui() + +
+[docs] + def setupui(self): + vbl = QVBoxLayout(self) + vbl.setAlignment(Qt.AlignCenter) + lab = QLabel('Singular Values', self, alignment=Qt.AlignCenter) + lab.setStyleSheet("font-weight: bold;") + vbl.addWidget(lab) + graph = Graph() + graph.setShowLegend(False) + graph.plotItem.setLogMode(y=True) + graph.setLabel('left', text='Singular Values', units='m/rad') + graph.setLabel('bottom', text='Index') + graph.setShowLegend(True) + vbl.addWidget(graph) + opts = dict( + name='Processed', + y_channel=self.devpref.substitute(propty='SingValues-Mon'), + color='black', + redraw_mode=2, + lineStyle=1, + lineWidth=2, + symbol='o', + symbolSize=10) + graph.addChannel(**opts) + cur = graph.curveAtIndex(0) + cur.setSymbolBrush(0, 0, 0) + + opts = dict( + name='Raw', + y_channel=self.devpref.substitute(propty='SingValuesRaw-Mon'), + color='blue', + redraw_mode=2, + lineStyle=1, + lineWidth=2, + symbol='o', + symbolSize=10) + graph.addChannel(**opts) + + pen = mkPen(QColor(150, 150, 150)) + pen.setStyle(2) + pen.setWidth(3) + line = InfLine(pos=0, pen=pen, angle=90) + graph.addItem(line) + self._chan.new_value_signal[int].connect(_part(self.setValue, line)) + + graph.setObjectName('graph_singvalues') + graph.setStyleSheet( + "#graph_singvalues{min-width:30em; min-height:22m;}")
+ + +
+[docs] + def setValue(self, line, value): + line.setValue(value-0.8)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/ioc_control/base.html b/_modules/siriushla/as_ap_sofb/ioc_control/base.html new file mode 100644 index 000000000..6c2c64ad1 --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/ioc_control/base.html @@ -0,0 +1,437 @@ + + + + + + siriushla.as_ap_sofb.ioc_control.base — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_sofb.ioc_control.base

+"""Define Controllers for the orbits displayed in the graphic."""
+
+from functools import partial as _part
+import numpy as _np
+from qtpy.QtCore import Qt, Signal
+from qtpy.QtWidgets import QWidget, QHBoxLayout, QSizePolicy, QComboBox, \
+    QVBoxLayout
+from pydm.widgets import PyDMEnumComboBox
+from pydm.widgets.base import PyDMPrimitiveWidget
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.sofb.csdev import SOFBFactory
+from siriuspy.clientconfigdb import ConfigDBClient
+from siriushla.widgets import SiriusSpinbox, PyDMStateButton, SiriusLedState,\
+    SiriusLabel
+from siriushla.as_ap_configdb import LoadConfigDialog
+
+
+
+[docs] +class BaseObject: + """Base object.""" + + def __init__(self, device, prefix='', acc='SI'): + """Init.""" + self.prefix = prefix + self.device = _PVName(device) + self.devpref = self.device.substitute(prefix=prefix) + self._csorb = SOFBFactory.create(acc) + + @property + def acc(self): + """Accelerator.""" + return self._csorb.acc + + @property + def acc_idx(self): + """Accelerator index.""" + return self._csorb.acc_idx + + @property + def isring(self): + """Whether accelerator is a ring.""" + return self._csorb.isring
+ + + +
+[docs] +class BaseWidget(BaseObject, QWidget): + """Base widget.""" + + def __init__(self, parent, device, prefix='', acc='SI'): + """Init.""" + BaseObject.__init__(self, device, prefix, acc) + QWidget.__init__(self, parent) + self.setObjectName(acc.upper()+'App') + +
+[docs] + def create_pair( + self, parent, pvname, device=None, is_vert=False, rules=None): + """.""" + device = device or self.device + basename = _PVName(device).substitute( + prefix=self.prefix, propty_name=pvname) + wid = QWidget(parent) + if is_vert: + lay = QVBoxLayout(wid) + else: + lay = QHBoxLayout(wid) + lay.setContentsMargins(0, 0, 0, 0) + pdm_spbx = SiriusSpinbox(wid, basename.substitute(propty_suffix='SP')) + if rules is not None: + pdm_spbx.rules = rules + pdm_lbl = SiriusLabel(wid, basename.substitute(propty_suffix='RB')) + pdm_lbl.setAlignment(Qt.AlignCenter) + lay.addWidget(pdm_spbx) + lay.addWidget(pdm_lbl) + wid.sp_wid = pdm_spbx + wid.rb_wid = pdm_lbl + return wid
+ + +
+[docs] + def create_pair_sel( + self, parent, pvname, device=None, is_vert=False, rules=None): + """.""" + device = device or self.device + basename = _PVName(device).substitute( + prefix=self.prefix, propty_name=pvname) + wid = QWidget(parent) + if is_vert: + lay = QVBoxLayout(wid) + else: + lay = QHBoxLayout(wid) + lay.setContentsMargins(0, 0, 0, 0) + pdm_cbbx = PyDMEnumComboBox( + wid, basename.substitute(propty_suffix='Sel')) + if rules is not None: + pdm_cbbx.rules = rules + pdm_lbl = SiriusLabel(wid, basename.substitute(propty_suffix='Sts')) + pdm_lbl.setAlignment(Qt.AlignCenter) + lay.addWidget(pdm_cbbx) + lay.addWidget(pdm_lbl) + wid.sp_wid = pdm_cbbx + wid.rb_wid = pdm_lbl + return wid
+ + +
+[docs] + def create_pair_butled( + self, parent, pvname, device=None, is_vert=False, rules=None): + """.""" + device = device or self.device + basename = _PVName(device).substitute( + prefix=self.prefix, propty_name=pvname) + wid = QWidget(parent) + if is_vert: + lay = QVBoxLayout(wid) + else: + lay = QHBoxLayout(wid) + lay.setContentsMargins(0, 0, 0, 0) + spnt = PyDMStateButton(wid, basename.substitute(propty_suffix='Sel')) + if rules is not None: + spnt.rules = rules + rdb = SiriusLedState(wid, basename.substitute(propty_suffix='Sts')) + lay.addWidget(spnt) + lay.addWidget(rdb) + wid.sp_wid = spnt + wid.rb_wid = rdb + return wid
+
+ + + +
+[docs] +class BaseCombo(QComboBox, PyDMPrimitiveWidget): + """.""" + + configname = Signal(str) + + def __init__( + self, parent, ctrls, setpoint=None, readback=None, acc='SI'): + """.""" + QComboBox.__init__(self, parent) + PyDMPrimitiveWidget.__init__(self) + self.setpoint = setpoint or dict() + self.readback = readback or dict() + self.ctrls = ctrls + self._csorb = SOFBFactory.create(acc) + self._config_type = acc.lower() + '_orbit' + self._client = ConfigDBClient(config_type=self._config_type) + self.orbits = { + 'x': _np.zeros(self._csorb.nr_bpms, dtype=float), + 'y': _np.zeros(self._csorb.nr_bpms, dtype=float)} + self.signals_to_watch = dict() + self.slots = { + 'x': _part(self._watch_if_changed, 'x'), + 'y': _part(self._watch_if_changed, 'y')} + + self.setup_ui() + self.connect_signals() + + @property + def acc(self): + """.""" + return self._csorb.acc + + @property + def acc_idx(self): + """.""" + return self._csorb.acc_idx + + @property + def isring(self): + """.""" + return self._csorb.isring + +
+[docs] + def channels(self): + """.""" + chans = list(self.readback.values()) + chans += list(self.setpoint.values()) + return chans
+ + +
+[docs] + def connect_signals(self): + """.""" + for pln in ('x', 'y'): + self.readback[pln].new_value_signal[_np.ndarray].connect( + _part(self.ioc_orbit_changed, pln))
+ + +
+[docs] + def setup_ui(self, add_items=None): + """.""" + sz_pol = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed) + self.setSizePolicy(sz_pol) + add_items = add_items or [] + add_items.extend(['Zero', 'ServConf']) + for item in add_items: + self.addItem(item) + for reg in sorted(self.ctrls.keys()): + self.addItem(reg) + self.addItem('Out of Date') + self.setCurrentIndex(self.count()-1) + self.activated.connect(self._item_selected)
+ + + def _item_selected(self, index): + text = self.itemText(index) + self._selection_changed(text) + + def _selection_changed(self, text, sigs=None): + sigs = sigs or dict() + if not text.lower().startswith('servconf'): + self.configname.emit('') + if text.lower().startswith('zero'): + for pln in ('x', 'y'): + if self.orbits[pln] is not None: + self.orbits[pln] *= 0 + self.setpoint[pln].send_value_signal[_np.ndarray].emit( + self.orbits[pln]) + elif text.lower().startswith('servconf'): + win = LoadConfigDialog(self._config_type, self) + confname, status = win.exec_() + if not status: + return + data = self._client.get_config_value(confname) + self.configname.emit(confname) + for pln in ('x', 'y'): + self.orbits[pln] = _np.array(data[pln]) + self.setpoint[pln].send_value_signal[_np.ndarray].emit( + self.orbits[pln]) + elif text in self.ctrls: + for pln in ('x', 'y'): + orb = self.ctrls[text][pln]['getvalue']() + if orb is None: + return + self.orbits[pln] = orb + sigs[pln] = self.ctrls[text][pln]['signal'] + self.setpoint[pln].send_value_signal[_np.ndarray].emit( + self.orbits[pln]) + for pln in ('x', 'y'): + if self.signals_to_watch: + self.signals_to_watch[pln].disconnect(self.slots[pln]) + if sigs: + sigs[pln].connect(self.slots[pln]) + self.signals_to_watch = sigs + +
+[docs] + def ioc_orbit_changed(self, pln, orb): + """.""" + self._orbit_changed(pln, orb)
+ + + def _watch_if_changed(self, pln, orb): + self._orbit_changed(pln, orb) + + def _orbit_changed(self, pln, orb): + myorb = self.orbits[pln] + if myorb is not None and myorb.size == orb.size and \ + _np.allclose(orb, myorb, rtol=1e-7): + return + self.setCurrentIndex(self.count()-1) + self.configname.emit('')
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/ioc_control/drive_window.html b/_modules/siriushla/as_ap_sofb/ioc_control/drive_window.html new file mode 100644 index 000000000..1fced3fc6 --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/ioc_control/drive_window.html @@ -0,0 +1,234 @@ + + + + + + siriushla.as_ap_sofb.ioc_control.drive_window — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_sofb.ioc_control.drive_window

+"""Define Controllers for the orbits displayed in the graphic."""
+
+from qtpy.QtWidgets import QLabel, QGroupBox, QFormLayout, QVBoxLayout, \
+    QHBoxLayout, QGridLayout
+
+from ...widgets import SiriusLabel
+from . import BaseWidget
+
+
+
+[docs] +class DriveControl(BaseWidget): + """.""" + + def __init__(self, parent, device, prefix='', acc='SI'): + """.""" + super().__init__(parent, device, prefix=prefix, acc=acc) + self.setupui() + +
+[docs] + def setupui(self): + """.""" + self.setLayout(QGridLayout()) + ctrls = self._get_controls_widget(self) + self.layout().addWidget(ctrls, 0, 0)
+ + + def _get_controls_widget(self, parent): + gpbx = QGroupBox('Drive Controls', parent) + gpbx_lay = QVBoxLayout(gpbx) + + fbl = QFormLayout() + fbl.setHorizontalSpacing(9) + gpbx_lay.addLayout(fbl) + + lbl = QLabel('State', gpbx) + wid = self.create_pair_butled(gpbx, 'DriveState') + fbl.addRow(lbl, wid) + lbl = QLabel('Type', gpbx) + wid = self.create_pair_sel(gpbx, 'DriveType') + fbl.addRow(lbl, wid) + lbl = QLabel('Freq. Divisor', gpbx) + wid = self.create_pair(gpbx, 'DriveFreqDivisor') + fbl.addRow(lbl, wid) + lbl = QLabel('Number of Cycles', gpbx) + wid = self.create_pair(gpbx, 'DriveNrCycles') + fbl.addRow(lbl, wid) + lbl = QLabel('Amplitude [urad]', gpbx) + wid = self.create_pair(gpbx, 'DriveAmplitude') + fbl.addRow(lbl, wid) + lbl = QLabel('Phase [°]', gpbx) + wid = self.create_pair(gpbx, 'DrivePhase') + fbl.addRow(lbl, wid) + lbl = QLabel('Corrector Index', gpbx) + wid = self.create_pair(gpbx, 'DriveCorrIndex') + fbl.addRow(lbl, wid) + lbl = QLabel('BPM Index', gpbx) + wid = self.create_pair(gpbx, 'DriveBPMIndex') + fbl.addRow(lbl, wid) + + hlay = QHBoxLayout() + hlay.addWidget(QLabel('Frequency [Hz]: ')) + hlay.addWidget(SiriusLabel( + self, self.devpref.substitute(propty='DriveFrequency-Mon'))) + hlay.addStretch() + hlay.addWidget(QLabel('Duration [s]: ')) + hlay.addWidget(SiriusLabel( + self, self.devpref.substitute(propty='DriveDuration-Mon'))) + gpbx_lay.addLayout(hlay) + return gpbx
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/ioc_control/kicks_config.html b/_modules/siriushla/as_ap_sofb/ioc_control/kicks_config.html new file mode 100644 index 000000000..0bc2d9b5f --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/ioc_control/kicks_config.html @@ -0,0 +1,325 @@ + + + + + + siriushla.as_ap_sofb.ioc_control.kicks_config — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_sofb.ioc_control.kicks_config

+"""Define Controllers for the orbits displayed in the graphic."""
+
+from qtpy.QtWidgets import QFormLayout, QHBoxLayout, QLabel, QVBoxLayout, \
+    QGroupBox, QPushButton, QWidget, QTabWidget, QGridLayout
+import qtawesome as qta
+
+from pydm.widgets import PyDMPushButton
+
+from ...util import connect_window
+from ...widgets import SiriusLedAlert, SiriusLabel, SiriusLedState
+from ...widgets.windows import create_window_from_widget
+from ...as_ti_control import HLTriggerDetailed
+
+from .base import BaseWidget
+from .status import StatusWidget
+
+
+
+[docs] +class KicksConfigWidget(BaseWidget): + + def __init__(self, parent, device, prefix='', acc='SI'): + super().__init__(parent, device, prefix=prefix, acc=acc) + self.setupui() + +
+[docs] + def setupui(self): + self.setLayout(QVBoxLayout()) + + names = ('Maximum Kicks', 'Maximum Delta Kicks') + tabs = ('Max \u03b8', 'Max \u0394\u03b8') + pvnames = ('MaxKick', 'MaxDeltaKick') + unitss = (('[urad]', '[urad]'), ('[urad]', '[urad]')) + planes = ('CH', 'CV') + if self.acc in {'SI', 'BO'}: + unitss = ( + ('[urad]', '[urad]', None), + ('[urad]', '[urad]', '[Hz]'), ) + planes = ('CH', 'CV', 'RF') + + tabw = QTabWidget(self) + tabw.setObjectName(self.acc+'Tab') + tabw.setStyleSheet(""" + #{0}Tab::pane {{ + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }}""".format(self.acc)) + self.layout().addWidget(tabw) + for tab, pvname, units in zip(tabs, pvnames, unitss): + grpbx = QWidget(tabw) + grpbx.setObjectName('gbx') + fbl = QFormLayout(grpbx) + for unit, pln in zip(units, planes): + if unit is None: + continue + lbl = QLabel(pln+' '+unit+' ', grpbx) + lbl.setObjectName('lbl') + lbl.setStyleSheet('#lbl{min-height:1em;}') + wid = self.create_pair(grpbx, pvname+pln) + wid.setObjectName('wid') + wid.setStyleSheet('#wid{min-height:1.2em;}') + fbl.addRow(lbl, wid) + tabw.addTab(grpbx, tab) + for i, name in enumerate(names): + tabw.setTabToolTip(i, name) + if self.acc == 'SI': + det_wid = self.get_details_widget(tabw) + tabw.addTab(det_wid, 'Details') + tabw.setCurrentIndex(2)
+ + +
+[docs] + def get_details_widget(self, parent): + """.""" + det_wid = QWidget(parent) + det_wid.setObjectName('gbx') + det_lay = QGridLayout(det_wid) + + syn_wid = self.create_pair_butled(det_wid, 'CorrSync', is_vert=False) + syn_wid.rb_wid.stateColors = [ + syn_wid.rb_wid.DarkGreen, + syn_wid.rb_wid.LightGreen, + syn_wid.rb_wid.LightGreen, + syn_wid.rb_wid.LightGreen + ] + syn_lab = SiriusLabel(det_wid, self.device+':CorrSync-Sts') + syn_wid.layout().setContentsMargins(0, 1, 0, 1) + det_lay.addWidget(QLabel('Synchronization', det_wid), 0, 0) + det_lay.addWidget(syn_wid, 0, 1) + det_lay.addWidget(syn_lab, 0, 2) + + del_wid = self.create_pair( + det_wid, 'Delay', device='SI-Glob:TI-Mags-Corrs', is_vert=False) + del_det = QPushButton(qta.icon('fa5s.ellipsis-h'), '', det_wid) + del_det.setToolTip('Open details') + del_det.setObjectName('detail') + del_det.setStyleSheet( + "#detail{min-width:25px; max-width:25px; icon-size:20px;}") + trg_w = create_window_from_widget( + HLTriggerDetailed, + title='SI-Glob:TI-Mags-Corrs Detailed Settings', is_main=True) + connect_window( + del_det, trg_w, parent=None, device='SI-Glob:TI-Mags-Corrs', + prefix=self.prefix) + del_lay = QGridLayout() + del_lay.addWidget(QLabel('Trigger Delay', det_wid), 0, 0) + del_lay.addWidget(del_wid, 0, 1) + del_lay.addWidget(del_det, 0, 2) + det_lay.addLayout(del_lay, 2, 0, 1, 3) + + return det_wid
+ + +
+[docs] + def get_status_widget(self, parent): + """.""" + if self.acc not in {'TS', 'TB'}: + conf = PyDMPushButton( + parent, pressValue=1, + init_channel=self.devpref.substitute(propty='CorrConfig-Cmd')) + rules = ( + '[{"name": "EnblRule", "property": "Enable", ' + + '"expression": "not ch[0]", "channels": [{"channel": "' + + self.devpref.substitute(propty='LoopState-Sts') + + '", "trigger": true}]}]') + conf.rules = rules + conf.setToolTip('Refresh Configurations') + conf.setIcon(qta.icon('fa5s.sync')) + conf.setObjectName('conf') + conf.setStyleSheet( + '#conf{min-width:25px; max-width:25px; icon-size:20px;}') + + sts = QPushButton('', parent) + sts.setIcon(qta.icon('fa5s.list-ul')) + sts.setToolTip('Open Detailed Status View') + sts.setObjectName('sts') + sts.setStyleSheet( + '#sts{min-width:25px; max-width:25px; icon-size:20px;}') + Window = create_window_from_widget( + StatusWidget, title='Correctors Status') + connect_window( + sts, Window, self, device=self.device, + prefix=self.prefix, acc=self.acc, is_orb=False) + + pdm_led = SiriusLedAlert( + parent, self.devpref.substitute(propty='CorrStatus-Mon')) + + lbl = QLabel('Correctors Status:', parent) + hbl = QHBoxLayout() + hbl.setSpacing(9) + hbl.addWidget(lbl) + hbl.addStretch() + hbl.addWidget(pdm_led) + hbl.addWidget(sts) + if self.acc not in {'TS', 'TB'}: + hbl.addWidget(conf) + return hbl
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/ioc_control/main.html b/_modules/siriushla/as_ap_sofb/ioc_control/main.html new file mode 100644 index 000000000..e4a73c75e --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/ioc_control/main.html @@ -0,0 +1,837 @@ + + + + + + siriushla.as_ap_sofb.ioc_control.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_sofb.ioc_control.main

+"""Define Controllers for the orbits displayed in the graphic."""
+
+import numpy as _np
+from qtpy.QtWidgets import QLabel, QGroupBox, QPushButton, QFormLayout, \
+    QVBoxLayout, QHBoxLayout, QGridLayout, QWidget, QTabWidget, QSpacerItem
+from qtpy.QtCore import Qt
+import qtawesome as qta
+
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ...widgets import SiriusConnectionSignal as _ConnSig, SiriusLabel, \
+    SiriusLedAlert, SiriusSpinbox, PyDMStateButton, SiriusLedState
+from ...widgets.windows import create_window_from_widget
+from ... import util as _util
+
+from .status import StatusWidget
+from .kicks_config import KicksConfigWidget
+from .orbit_acquisition import AcqControlWidget
+from .respmat import RespMatWidget
+from .base import BaseWidget, BaseCombo
+
+
+
+[docs] +class SOFBControl(BaseWidget): + """.""" + + def __init__(self, parent, device, ctrls, prefix='', acc='SI'): + """.""" + super().__init__(parent, device, prefix=prefix, acc=acc) + self.ctrls = ctrls + self.setupui() + +
+[docs] + def setupui(self): + """.""" + vbl = QVBoxLayout(self) + tabw = QTabWidget(self) + tabw.setObjectName(self.acc+'Tab') + vbl.addWidget(tabw) + + main_wid = self.get_main_widget(tabw) + tabw.addTab(main_wid, 'Main') + + wid = AcqControlWidget( + tabw, self.device, prefix=self.prefix, acc=self.acc) + tabw.addTab(wid, 'Trig. Acq. Control')
+ + +
+[docs] + def get_main_widget(self, parent): + """.""" + main_wid = QWidget(parent) + vbl = QVBoxLayout() + main_wid.setLayout(vbl) + + tabw = QGroupBox('Orbit', main_wid) + tabw.setLayout(QHBoxLayout()) + orb_wid = self.get_orbit_widget(tabw) + tabw.layout().addWidget(orb_wid) + + corr_wid = self.get_correction_widget(main_wid) + mat_wid = RespMatWidget(main_wid, self.device, self.prefix, self.acc) + + vbl.addWidget(tabw) + vbl.addStretch() + vbl.addWidget(corr_wid) + vbl.addStretch() + vbl.addWidget(mat_wid) + return main_wid
+ + +
+[docs] + def get_orbit_widget(self, parent): + """.""" + rules = ( + '[{"name": "EnblRule", "property": "Enable", ' + + '"expression": "not ch[0]", "channels": [{"channel": "' + + self.devpref.substitute(propty='LoopState-Sts') + + '", "trigger": true}]}]') + + orb_wid = QWidget(parent) + orb_wid.setObjectName('grp') + orb_wid.setStyleSheet('#grp{min-height: 11em; max-height: 15em;}') + orb_wid.setLayout(QGridLayout()) + + conf = PyDMPushButton( + orb_wid, pressValue=1, + init_channel=self.devpref.substitute(propty='TrigAcqConfig-Cmd')) + conf.rules = rules + conf.setToolTip('Refresh Configurations') + conf.setIcon(qta.icon('fa5s.sync')) + conf.setObjectName('conf') + conf.setStyleSheet( + '#conf{min-width:25px; max-width:25px; icon-size:20px;}') + + sts = QPushButton('', orb_wid) + sts.setIcon(qta.icon('fa5s.list-ul')) + sts.setToolTip('Open Detailed Status View') + sts.setObjectName('sts') + sts.setStyleSheet( + '#sts{min-width:25px; max-width:25px; icon-size:20px;}') + icon = qta.icon( + 'fa5s.hammer', color=_util.get_appropriate_color(self.acc)) + window = create_window_from_widget( + StatusWidget, title='Orbit Status', icon=icon) + _util.connect_window( + sts, window, orb_wid, device=self.device, + prefix=self.prefix, acc=self.acc, is_orb=True) + + pdm_led = SiriusLedAlert( + orb_wid, self.devpref.substitute(propty='OrbStatus-Mon')) + + lbl = QLabel('Status:', orb_wid) + hbl = QHBoxLayout() + hbl.setSpacing(9) + hbl.addStretch() + hbl.addWidget(lbl) + hbl.addWidget(pdm_led) + hbl.addWidget(sts) + hbl.addWidget(conf) + orb_wid.layout().addLayout(hbl, 0, 0, 1, 2) + + if self.acc == 'SI': + lbl = QLabel('SOFB Mode', orb_wid) + wid = self.create_pair_sel(orb_wid, 'SOFBMode', rules=rules) + orb_wid.layout().addWidget(lbl, 1, 0, alignment=Qt.AlignVCenter) + orb_wid.layout().addWidget(wid, 1, 1) + + orb_wid.layout().setRowStretch(2, 3) + + lbl = QLabel('RefOrb:', orb_wid) + combo = RefControl( + self, self.device, self.ctrls, prefix=self.prefix, acc=self.acc) + combo.rules = rules + lbl2 = QLabel('', orb_wid) + combo.configname.connect(lbl2.setText) + vbl_ref = QVBoxLayout() + vbl_ref.addWidget(combo) + vbl_ref.addWidget(lbl2) + orb_wid.layout().addWidget(lbl, 3, 0, alignment=Qt.AlignVCenter) + orb_wid.layout().addLayout(vbl_ref, 3, 1) + + lbl = QLabel('Num. Pts.', orb_wid) + stp = SiriusSpinbox( + orb_wid, self.devpref.substitute(propty='SmoothNrPts-SP')) + rdb = SiriusLabel( + orb_wid, self.devpref.substitute(propty='SmoothNrPts-RB')) + rdb.setAlignment(Qt.AlignLeft | Qt.AlignVCenter) + slsh = QLabel('/', orb_wid, alignment=Qt.AlignCenter) + slsh.setStyleSheet('min-width:0.7em; max-width:0.7em;') + cnt = SiriusLabel( + orb_wid, self.devpref.substitute(propty='BufferCount-Mon')) + cnt.setAlignment(Qt.AlignRight | Qt.AlignVCenter) + cnt.setToolTip('Current Buffer Size') + rst = PyDMPushButton( + orb_wid, pressValue=1, + init_channel=self.devpref.substitute(propty='SmoothReset-Cmd')) + rst.setToolTip('Reset Buffer') + rst.setIcon(qta.icon('mdi.delete-empty')) + rst.setObjectName('rst') + rst.setStyleSheet( + '#rst{min-width:25px; max-width:25px; icon-size:20px;}') + hbl = QHBoxLayout() + hbl.addWidget(stp) + hbl.addWidget(cnt) + hbl.addWidget(slsh) + hbl.addWidget(rdb) + hbl.addWidget(rst) + orb_wid.layout().addWidget(lbl, 4, 0, alignment=Qt.AlignVCenter) + orb_wid.layout().addLayout(hbl, 4, 1) + + lbl = QLabel('Smooth Method', orb_wid, alignment=Qt.AlignCenter) + wid = self.create_pair_sel(orb_wid, 'SmoothMethod', rules=rules) + orb_wid.layout().addWidget(lbl, 5, 0, alignment=Qt.AlignVCenter) + orb_wid.layout().addWidget(wid, 5, 1) + + orb_wid.layout().setColumnStretch(1, 2) + return orb_wid
+ + +
+[docs] + def get_correction_widget(self, parent): + """.""" + corr_wid = QGroupBox('Correction', parent) + lay = QVBoxLayout(corr_wid) + lay.setContentsMargins(0, 6, 0, 6) + + if self.acc == 'SI': + lbl = QLabel('Auto Correction State:', corr_wid) + wid = self.create_pair_butled(corr_wid, 'LoopState') + hbl = QHBoxLayout() + hbl.setContentsMargins(6, 6, 6, 0) + hbl.addWidget(lbl) + hbl.addWidget(wid) + lay.addLayout(hbl) + + corr_tab = QTabWidget(corr_wid) + corr_tab.setObjectName(self.acc+'Tab') + lay.addWidget(corr_tab) + + if self.acc == 'SI': + auto_wid = self.get_auto_correction_widget(corr_tab) + corr_tab.addTab(auto_wid, 'Loop') + + man_wid = self.get_manual_correction_widget(corr_tab) + corr_tab.addTab(man_wid, 'Manual') + + kicks_wid = KicksConfigWidget( + parent, self.device, prefix=self.prefix, acc=self.acc) + corr_tab.addTab(kicks_wid, 'Kicks') + + if self.acc == 'SI': + fofb_wid = self.get_fofb_widget(corr_tab) + corr_tab.addTab(fofb_wid, 'FOFB') + + if self.acc != 'BO': + hbl = kicks_wid.get_status_widget(corr_wid) + hbl.setContentsMargins(6, 0, 6, 6) + lay.addLayout(hbl) + return corr_wid
+ + +
+[docs] + def get_fofb_widget(self, parent): + """.""" + wid = QWidget(parent) + wid.setObjectName('grp') + gdl = QGridLayout(wid) + gdl.setAlignment(Qt.AlignTop) + + headers = [ + 'Description', 'Setpoint', 'Status', 'Monitor', '%'] + for col, text in enumerate(headers): + lbl = QLabel(text, wid, alignment=Qt.AlignHCenter) + lbl.setStyleSheet('QLabel{max-height: 1.2em;}') + gdl.addWidget(lbl, 0, col+1) + + props = [ + 'FOFBDownloadKicks', 'FOFBUpdateRefOrb', + 'FOFBNullSpaceProj', 'FOFBZeroDistortionAtBPMs'] + desc = [ + 'Download Kicks', 'Update RefOrb', + 'Project in Kernel', 'Zero Distortion'] + vislist = list() + for i, (prop, des) in enumerate(zip(props, desc)): + lbl = QLabel(des, wid) + spt = PyDMStateButton( + wid, self.devpref.substitute(propty=prop+'-Sel')) + rdb = SiriusLedState( + wid, self.devpref.substitute(propty=prop+'-Sts')) + mon = SiriusLedState( + wid, self.devpref.substitute(propty=prop+'-Mon')) + wids = [lbl, spt, rdb, mon] + gdl.addWidget(lbl, i+1, 0, 1, 2) + gdl.addWidget(spt, i+1, 2) + gdl.addWidget(rdb, i+1, 3) + gdl.addWidget(mon, i+1, 4) + if prop in ['FOFBDownloadKicks', 'FOFBUpdateRefOrb']: + sbp = SiriusSpinbox( + wid, self.devpref.substitute(propty=prop+'Perc-SP')) + rbp = SiriusLabel( + wid, self.devpref.substitute(propty=prop+'Perc-RB')) + rbp.showUnits = False + gdl2 = QGridLayout() + gdl2.setContentsMargins(0, 0, 0, 0) + gdl2.addWidget(sbp, 0, 0) + gdl2.addWidget(rbp, 1, 0) + gdl.addLayout(gdl2, i+1, 5) + wids.extend([sbp, rbp]) + if prop != 'FOFBDownloadKicks': + vislist.extend(wids) + for w in wids: + w.setVisible(False) + + btmore = QPushButton(qta.icon('fa5s.angle-down'), '', self) + btmore.setToolTip('Show advanced SOFB <-> FOFB interaction options') + btmore.setStyleSheet( + 'QPushButton{max-height:0.8em; max-width:1.6em;}') + btmore.clicked.connect(self._handle_fofb_options_vis) + btmore.visItems = vislist + btmore.setFlat(True) + gdl.addWidget(btmore, 0, 0, alignment=Qt.AlignLeft) + + return wid
+ + +
+[docs] + def get_manual_correction_widget(self, parent): + """.""" + man_wid = QWidget(parent) + man_wid.setObjectName('grp') + gdl = QGridLayout(man_wid) + gdl.setSpacing(9) + + calc = PyDMPushButton( + man_wid, '', pressValue=1, + init_channel=self.devpref.substitute(propty='CalcDelta-Cmd')) + calc.setIcon(qta.icon('mdi.calculator-variant')) + calc.setToolTip('Calculate Kicks') + calc.setObjectName('button') + calc.setStyleSheet('#button {\ + min-height: 45px; min-width: 45px;\ + max-height: 45px; max-width: 45px;\ + icon-size: 40px;}') + rules = ( + '[{"name": "EnblRule", "property": "Enable", ' + + '"expression": "not ch[0]", "channels": [{"channel": "' + + self.devpref.substitute(propty='LoopState-Sts') + + '", "trigger": true}]}]') + calc.rules = rules + + if self.acc == 'BO': + gdl.addWidget(calc, 1, 1) + gdl.setColumnStretch(0, 2) + gdl.setColumnStretch(2, 2) + gdl.setRowStretch(0, 2) + gdl.setRowStretch(2, 2) + return man_wid + + rules = '' + if self.isring: + exp = 'not ch[0]' + ch = '{"channel": "' + self.devpref.substitute( + propty='LoopState-Sts') + '", "trigger": true},' + rules = ( + '[{"name": "EnblRule", "property": "Enable", ' + + '"expression": "'+exp+'", "channels": ['+ch + + '", "trigger": true}]}]') + + lst = [ + ('All', self._csorb.ApplyDelta.All), + ('CH', self._csorb.ApplyDelta.CH), + ('CV', self._csorb.ApplyDelta.CV)] + if self.acc in {'SI', 'BO'}: + lst.append(('RF', self._csorb.ApplyDelta.RF)) + btns = dict() + for itm, val in lst: + btn = PyDMPushButton( + man_wid, ' '+itm, pressValue=val, + init_channel=self.devpref.substitute(propty='ApplyDelta-Cmd')) + btn.rules = rules + btn.setIcon(qta.icon('fa5s.hammer')) + btn.setToolTip('Apply ' + itm) + btn.setObjectName('button') + btn.setStyleSheet('#button {\ + min-height: 25px; min-width: 45px;\ + max-height: 25px;\ + icon-size: 20px;}') + if self.acc == 'BO': + btn.setVisible(False) + btns[itm] = btn + + gdl.addWidget(calc, 0, 0, 2, 1) + gdl.addWidget(btns['CH'], 0, 1) + gdl.addWidget(btns['CV'], 0, 2) + if self.acc in {'SI', 'BO'}: + gdl.addWidget(btns['RF'], 0, 3) + gdl.addWidget(btns['All'], 1, 1, 1, 3) + else: + gdl.addWidget(btns['All'], 1, 1, 1, 2) + gdl.setColumnMinimumWidth(0, 60) + + grpbx = QWidget(man_wid) + grpbx.setObjectName('gbx') + if self.acc in {'SI', 'BO'}: + planes = ('CH', 'CV', 'RF') + gdl.addWidget(grpbx, 2, 0, 1, 4) + else: + planes = ('CH', 'CV') + gdl.addWidget(grpbx, 2, 0, 1, 3) + fbl = QFormLayout(grpbx) + for pln in planes: + lbl = QLabel(pln+' [%] ', grpbx) + lbl.setObjectName('lbl') + lbl.setStyleSheet('#lbl{min-height:1em;}') + wid = self.create_pair(grpbx, 'ManCorrGain'+pln) + wid.setObjectName('wid') + wid.setStyleSheet('#wid{min-height:1.2em;}') + if self.acc == 'BO': + lbl.setVisible(False) + wid.setVisible(False) + fbl.addRow(lbl, wid) + + vlay = QVBoxLayout() + vlay.addStretch() + gdl.addLayout(vlay, 3, 0) + return man_wid
+ + +
+[docs] + def get_auto_correction_widget(self, parent): + """.""" + auto_wid = QWidget(parent) + vbl2 = QVBoxLayout(auto_wid) + + tabw = QTabWidget(auto_wid) + tabw.setObjectName(self.acc+'Tab') + tabw.setStyleSheet(""" + #{0}Tab::pane {{ + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }}""".format(self.acc)) + vbl2.addWidget(tabw) + + # Add Main Tab + gpbx = QWidget(tabw) + gpbx_lay = QVBoxLayout(gpbx) + tabw.addTab(gpbx, 'Main') + + fbl = QFormLayout() + fbl.setHorizontalSpacing(9) + gpbx_lay.addLayout(fbl) + + lbl = QLabel('Freq. [Hz]', gpbx) + wid = self.create_pair(gpbx, 'LoopFreq') + fbl.addRow(lbl, wid) + + lbl = QLabel('Max. Orb. Distortion [um]', gpbx) + wid = self.create_pair(gpbx, 'LoopMaxOrbDistortion') + fbl.addRow(lbl, wid) + + wid = QWidget(gpbx) + wid.setLayout(QHBoxLayout()) + pbtn = QPushButton('Loop Performance', wid) + pbtn.setIcon(qta.icon('mdi.poll')) + wid.layout().addStretch() + wid.layout().addWidget(pbtn) + icon = qta.icon( + 'fa5s.hammer', color=_util.get_appropriate_color(self.acc)) + wind = create_window_from_widget( + PerformanceWidget, title='Loop Performance', icon=icon) + _util.connect_window( + pbtn, wind, self, device=self.device, prefix=self.prefix) + fbl.addRow(wid) + + # Add PID Tab + gpbx = QWidget(tabw) + gpbx_lay = QGridLayout(gpbx) + gpbx_lay.setSpacing(1) + tabw.addTab(gpbx, 'PID') + + gpbx_lay.addWidget(QLabel('CH', gpbx), 1, 0) + gpbx_lay.addWidget(QLabel('CV', gpbx), 2, 0) + tmpl = 'LoopPID{:s}{:s}' + pairs = [] + for i, k in enumerate(('Kp', 'Ki', 'Kd'), 1): + gpbx_lay.addWidget( + QLabel(k, gpbx), 0, i, alignment=Qt.AlignCenter) + pair = self.create_pair(wid, tmpl.format(k, 'CH'), is_vert=True) + pairs.append(pair) + gpbx_lay.addWidget(pair, 1, i) + pair = self.create_pair(wid, tmpl.format(k, 'CV'), is_vert=True) + pairs.append(pair) + gpbx_lay.addWidget(pair, 2, i) + if self.acc in {'SI', 'BO'}: + pair = self.create_pair( + wid, tmpl.format(k, 'RF'), is_vert=True) + pairs.append(pair) + gpbx_lay.addWidget(pair, 3, i) + if self.acc in {'SI', 'BO'}: + gpbx_lay.addWidget(QLabel('RF', gpbx), 3, 0) + + pbc = QPushButton('SP') + pbc.setStyleSheet('max-width:2.2em;') + gpbx_lay.addWidget(pbc, 0, 0) + pbc.setCheckable(True) + pbc.setChecked(False) + pbc.toggled.connect( + lambda x: pbc.setText('RB' if x else 'SP')) + for pair in pairs: + pair.rb_wid.setVisible(False) + pbc.toggled.connect(pair.rb_wid.setVisible) + pbc.toggled.connect(pair.sp_wid.setHidden) + gpbx_lay.setRowStretch(4, 2) + return auto_wid
+ + + def _handle_fofb_options_vis(self): + btn = self.sender() + tooltip = btn.toolTip() + vis = 'Hide' in tooltip + if vis: + tooltip = tooltip.replace('Hide', 'Show') + else: + tooltip = tooltip.replace('Show', 'Hide') + iconname = 'fa5s.angle-down' if vis else 'fa5s.angle-up' + btn.setIcon(qta.icon(iconname)) + btn.setToolTip(tooltip) + for item in btn.visItems: + item.setVisible(not vis) + self.adjustSize()
+ + + +
+[docs] +class RefControl(BaseCombo): + """.""" + + def __init__(self, parent, device, ctrls, prefix='', acc='SI'): + """.""" + setpoint = dict() + readback = dict() + basename = _PVName(device).substitute(prefix=prefix) + setpoint['x'] = _ConnSig(basename.substitute(propty='RefOrbX-SP')) + setpoint['y'] = _ConnSig(basename.substitute(propty='RefOrbY-SP')) + readback['x'] = _ConnSig(basename.substitute(propty='RefOrbX-RB')) + readback['y'] = _ConnSig(basename.substitute(propty='RefOrbY-RB')) + super().__init__(parent, ctrls, setpoint, readback, acc) + + def _selection_changed(self, text): + sigs = dict() + if text.lower().startswith('bba_orb'): + data = self._client.get_config_value('bba_orb') + for pln in ('x', 'y'): + self.orbits[pln] = _np.array(data[pln]) + self.setpoint[pln].send_value_signal[_np.ndarray].emit( + self.orbits[pln]) + elif text.lower().startswith('ref_orb'): + data = self._client.get_config_value('ref_orb') + for pln in ('x', 'y'): + self.orbits[pln] = _np.array(data[pln]) + self.setpoint[pln].send_value_signal[_np.ndarray].emit( + self.orbits[pln]) + super()._selection_changed(text, sigs) + +
+[docs] + def setup_ui(self): + """.""" + if self.acc == 'SI': + super().setup_ui(['bba_orb', 'ref_orb']) + else: + super().setup_ui()
+
+ + + +
+[docs] +class PerformanceWidget(QWidget): + """.""" + + def __init__(self, parent, device, prefix=''): + """.""" + super().__init__(parent) + self.prefix = prefix + self.device = _PVName(device) + self.setObjectName(self.device.sec+'App') + self._setupui() + + def _setupui(self): + def lamb(x): + return self.device.substitute(prefix=self.prefix, propty=x) + + lbl_main = QLabel( + '<h3>Loop Performance</h3>', self, alignment=Qt.AlignCenter) + + lbl_prnt = QLabel( + 'Number of Iter. Between Updates', self, alignment=Qt.AlignCenter) + spb = SiriusSpinbox(self, lamb('LoopPrintEveryNumIters-SP')) + ldrb = SiriusLabel(self, lamb('LoopPrintEveryNumIters-RB')) + slsh = QLabel('/', self, alignment=Qt.AlignCenter) + slsh.setStyleSheet('min-width:0.7em; max-width:0.7em;') + ldmon = SiriusLabel(self, lamb('LoopNumIters-Mon')) + + lbl_tout = QLabel( + 'SlowOrb\nTimeouts', self, alignment=Qt.AlignCenter) + ld_tout = SiriusLabel(self, lamb('SlowOrbTimeoutCnt-Mon')) + ld_tout.showUnits = True + ld_tout.setAlignment(Qt.AlignCenter) + + lbl_rate = QLabel( + 'Effective\nRate', self, alignment=Qt.AlignCenter) + ld_rate = SiriusLabel(self, lamb('LoopEffectiveRate-Mon')) + ld_rate.showUnits = True + + lay_niter = QGridLayout() + lay_niter.addWidget(lbl_prnt, 0, 0, 1, 4, alignment=Qt.AlignCenter) + lay_niter.addWidget(spb, 1, 0) + lay_niter.addWidget(ldrb, 1, 1) + lay_niter.addWidget(slsh, 1, 2) + lay_niter.addWidget(ldmon, 1, 3) + lay_niter.addWidget(lbl_tout, 0, 4, alignment=Qt.AlignCenter) + lay_niter.addWidget(ld_tout, 1, 4) + lay_niter.addWidget(lbl_rate, 0, 5, alignment=Qt.AlignCenter) + lay_niter.addWidget(ld_rate, 1, 5) + + lbl_iters = QLabel('Iterations [%]:', self) + lbl_ok = QLabel('OK', self, alignment=Qt.AlignCenter) + lbl_tout = QLabel('Timeout', self, alignment=Qt.AlignCenter) + lbl_diff = QLabel('Diff', self, alignment=Qt.AlignCenter) + ld_ok = SiriusLabel(self, lamb('LoopPerfItersOk-Mon')) + ld_tout = SiriusLabel(self, lamb('LoopPerfItersTOut-Mon')) + ld_diff = SiriusLabel(self, lamb('LoopPerfItersDiff-Mon')) + lay_iters = QGridLayout() + lay_iters.addWidget(lbl_iters, 1, 0) + lay_iters.addWidget(lbl_ok, 0, 1) + lay_iters.addWidget(lbl_tout, 0, 2) + lay_iters.addWidget(lbl_diff, 0, 3) + lay_iters.addWidget(ld_ok, 1, 1, alignment=Qt.AlignCenter) + lay_iters.addWidget(ld_tout, 1, 2, alignment=Qt.AlignCenter) + lay_iters.addWidget(ld_diff, 1, 3, alignment=Qt.AlignCenter) + + lbl_psd = QLabel('# of PSs with Diffs:', self) + lbl_avg = QLabel('AVG', self, alignment=Qt.AlignCenter) + lbl_std = QLabel('STD', self, alignment=Qt.AlignCenter) + lbl_max = QLabel('MAX', self, alignment=Qt.AlignCenter) + ld_avg = SiriusLabel(self, lamb('LoopPerfDiffNrPSAvg-Mon')) + ld_std = SiriusLabel(self, lamb('LoopPerfDiffNrPSStd-Mon')) + ld_max = SiriusLabel(self, lamb('LoopPerfDiffNrPSMax-Mon')) + lay_psd = QGridLayout() + lay_psd.addWidget(lbl_psd, 1, 0) + lay_psd.addWidget(lbl_avg, 0, 1) + lay_psd.addWidget(lbl_std, 0, 2) + lay_psd.addWidget(lbl_max, 0, 3) + lay_psd.addWidget(ld_avg, 1, 1, alignment=Qt.AlignCenter) + lay_psd.addWidget(ld_std, 1, 2, alignment=Qt.AlignCenter) + lay_psd.addWidget(ld_max, 1, 3, alignment=Qt.AlignCenter) + + lbl_tim = QLabel('Duration Statistics', self, alignment=Qt.AlignCenter) + lbl_unt = QLabel('[ms]', self, alignment=Qt.AlignCenter) + lbl_avg = QLabel('AVG', self, alignment=Qt.AlignCenter) + lbl_std = QLabel('STD', self, alignment=Qt.AlignCenter) + lbl_min = QLabel('MIN', self, alignment=Qt.AlignCenter) + lbl_max = QLabel('MAX', self, alignment=Qt.AlignCenter) + lbl_avg.setStyleSheet('min-width: 5em;') + lbl_std.setStyleSheet('min-width: 5em;') + lbl_min.setStyleSheet('min-width: 5em;') + lbl_max.setStyleSheet('min-width: 5em;') + lay_tim = QGridLayout() + lay_tim.addWidget(lbl_tim, 0, 0, 1, 5) + lay_tim.addWidget(lbl_unt, 1, 0) + lay_tim.addWidget(lbl_avg, 1, 1) + lay_tim.addWidget(lbl_std, 1, 2) + lay_tim.addWidget(lbl_min, 1, 3) + lay_tim.addWidget(lbl_max, 1, 4) + + labs = [ + 'Get Orbit', 'Calculate', 'Process', 'Apply', 'Total'] + nms = ['GetO', 'Calc', 'Proc', 'App', 'Tot'] + for i, (nm, lab) in enumerate(zip(nms, labs)): + lbl = QLabel(lab, self) + lay_tim.addWidget(lbl, i+2, 0) + for j, ld in enumerate(['Avg', 'Std', 'Min', 'Max']): + ld_ = SiriusLabel( + self, lamb(f'LoopPerfTim{nm:s}{ld:s}-Mon')) + lay_tim.addWidget(ld_, i+2, j+1, alignment=Qt.AlignCenter) + + lay = QGridLayout(self) + lay.addLayout(lay_niter, 0, 0) + lay.addItem(QSpacerItem(1, 20), 1, 0) + lay.addWidget(lbl_main, 2, 0) + lay.addItem(QSpacerItem(1, 20), 3, 0) + lay.addLayout(lay_iters, 4, 0) + lay.addItem(QSpacerItem(1, 20), 5, 0) + lay.addLayout(lay_psd, 6, 0) + lay.addItem(QSpacerItem(1, 20), 7, 0) + lay.addLayout(lay_tim, 8, 0) + lay.setRowStretch(1, 2) + lay.setRowStretch(3, 2) + lay.setRowStretch(5, 2) + lay.setRowStretch(7, 2)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/ioc_control/orbit_acquisition.html b/_modules/siriushla/as_ap_sofb/ioc_control/orbit_acquisition.html new file mode 100644 index 000000000..629764f6a --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/ioc_control/orbit_acquisition.html @@ -0,0 +1,418 @@ + + + + + + siriushla.as_ap_sofb.ioc_control.orbit_acquisition — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_sofb.ioc_control.orbit_acquisition

+"""Define Controllers for the orbits displayed in the graphic."""
+
+from qtpy.QtWidgets import QLabel, QGroupBox, QFormLayout, \
+    QVBoxLayout, QHBoxLayout, QPushButton, QWidget, QTabWidget, QCheckBox
+from qtpy.QtCore import Qt
+import qtawesome as qta
+from pydm.widgets import PyDMPushButton
+from siriushla.util import connect_window
+from siriushla.widgets import SiriusLedAlert, SiriusLabel
+from siriushla.widgets.windows import create_window_from_widget
+from siriushla.as_ti_control import HLTriggerSimple as _HLTriggerSimple
+
+from siriushla.as_ap_sofb.ioc_control.base import BaseWidget
+from siriushla.as_ap_sofb.ioc_control.status import StatusWidget
+
+
+
+[docs] +class AcqControlWidget(BaseWidget): + + def __init__(self, parent, device, prefix='', acc='SI'): + super().__init__(parent, device, prefix=prefix, acc=acc) + self.setupui() + name = acc + 'App' + self.setObjectName(name) + self.setStyleSheet("#"+name+"{min-width:20em; min-height:40em;}") + +
+[docs] + def setupui(self): + vbl = QVBoxLayout(self) + + self.details = QCheckBox('Details', self) + vbl.addWidget(self.details, alignment=Qt.AlignRight) + + grp_bx = self._get_acq_commom_params_grpbx() + vbl.addWidget(grp_bx) + vbl.addStretch() + + tabw = QTabWidget(self) + tabw.setObjectName(self.acc+'Tab') + tabw.setStyleSheet(""" + #{0}Tab::pane {{ + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }}""".format(self.acc)) + if self.acc != 'BO': + grp_bx = self._get_single_pass_acq_grpbx() + tabw.addTab(grp_bx, 'SinglePass') + if self.isring: + grp_bx = self._get_multturn_acq_grpbx() + tabw.addTab(grp_bx, 'MultiTurn') + tabw.setCurrentIndex(1) + vbl.addWidget(tabw) + vbl.addStretch() + + tabw = QTabWidget(self) + tabw.setObjectName(self.acc+'Tab') + tabw.setStyleSheet(""" + #{0}Tab::pane {{ + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }}""".format(self.acc)) + self._set_detailed(tabw) + grp_bx = _HLTriggerSimple( + parent=tabw, device=self._csorb.trigger_acq_name, + prefix=self.prefix, src=True) + tabw.addTab(grp_bx, 'External Trigger') + vbl.addWidget(tabw)
+ + + def _set_detailed(self, wids): + if not isinstance(wids, (list, tuple)): + wids = [wids] + + for wid in wids: + wid.setVisible(False) + self.details.stateChanged.connect(wid.setVisible) + + def _get_acq_commom_params_grpbx(self): + grp_bx = QGroupBox('Common Parameters', self) + fbl = QFormLayout(grp_bx) + + lbl = QLabel('Non-linear Corr.', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair_butled(grp_bx, 'PolyCalibration') + fbl.addRow(lbl, wid) + self._set_detailed([lbl, wid]) + + lab = QLabel('Sync. Injection', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair_butled(grp_bx, 'SyncWithInjection-Sel') + fbl.addRow(lab, wid) + self._set_detailed([lab, wid]) + + lab = QLabel('Test Data', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair_butled(grp_bx, 'TestDataEnbl-Sel') + fbl.addRow(lab, wid) + self._set_detailed([lab, wid]) + + lbl = QLabel('Channel Rate', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair_sel(grp_bx, 'TrigAcqChan') + fbl.addRow(lbl, wid) + + lbl = QLabel('Repeat', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair_butled(grp_bx, 'TrigAcqRepeat') + fbl.addRow(lbl, wid) + self._set_detailed([lbl, wid]) + + if self.isring: + lbl = QLabel('Nr of Shots', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair(grp_bx, 'TrigNrShots') + fbl.addRow(lbl, wid) + self._set_detailed([lbl, wid]) + + lbl = QLabel('SamplesPre', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair(grp_bx, 'TrigNrSamplesPre') + fbl.addRow(lbl, wid) + lbl = QLabel('SamplesPost', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair(grp_bx, 'TrigNrSamplesPost') + fbl.addRow(lbl, wid) + + lbl = QLabel('Acquisition:', grp_bx, alignment=Qt.AlignCenter) + strt = PyDMPushButton( + grp_bx, label='', + init_channel=self.devpref.substitute(propty='TrigAcqCtrl-Sel'), + pressValue=self._csorb.TrigAcqCtrl.Start) + strt.setToolTip('Start Acquisition') + strt.setIcon(qta.icon('fa5s.play')) + strt.setObjectName('strt') + strt.setStyleSheet( + '#strt{min-width:25px; max-width:25px; icon-size:20px;}') + stop = PyDMPushButton( + grp_bx, label='', + init_channel=self.devpref.substitute(propty='TrigAcqCtrl-Sel'), + pressValue=self._csorb.TrigAcqCtrl.Stop) + stop.setToolTip('Stop Acquisition') + stop.setIcon(qta.icon('fa5s.stop')) + stop.setObjectName('stop') + stop.setStyleSheet( + '#stop{min-width:25px; max-width:25px; icon-size:20px;}') + + pdmlbl = SiriusLabel( + grp_bx, self.devpref.substitute(propty='TrigAcqCtrl-Sts')) + pdmlbl.setObjectName('pdmlbl') + pdmlbl.setStyleSheet( + '#pdmlbl{min-width:6em; max-width:6em;}') + pdmlbl.setAlignment(Qt.AlignCenter) + hbl = QHBoxLayout() + fbl.addRow(hbl) + hbl.addStretch() + hbl.addWidget(lbl) + hbl.addWidget(strt) + hbl.addWidget(stop) + hbl.addWidget(pdmlbl) + + conf = PyDMPushButton( + grp_bx, pressValue=1, + init_channel=self.devpref.substitute(propty='TrigAcqConfig-Cmd')) + conf.setToolTip('Resend Configurations') + conf.setIcon(qta.icon('fa5s.sync')) + conf.setObjectName('conf') + conf.setStyleSheet( + '#conf{min-width:25px; max-width:25px; icon-size:20px;}') + + sts = QPushButton('', grp_bx) + sts.setIcon(qta.icon('fa5s.list-ul')) + sts.setToolTip('Open Detailed Status View') + sts.setObjectName('sts') + sts.setStyleSheet( + '#sts{min-width:25px; max-width:25px; icon-size:20px;}') + Window = create_window_from_widget( + StatusWidget, title='Orbit Status') + connect_window( + sts, Window, grp_bx, device=self.device, + prefix=self.prefix, acc=self.acc, is_orb=True) + + pdm_led = SiriusLedAlert( + grp_bx, self.devpref.substitute(propty='OrbStatus-Mon')) + + lbl = QLabel('Status:', grp_bx) + hbl = QHBoxLayout() + hbl.setSpacing(9) + hbl.addStretch() + hbl.addWidget(lbl) + hbl.addWidget(pdm_led) + hbl.addWidget(sts) + hbl.addWidget(conf) + fbl.addRow(hbl) + + return grp_bx + + def _get_multturn_acq_grpbx(self): + grp_bx = QWidget(self) + fbl = QFormLayout(grp_bx) + lbl = QLabel('Downsampling', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair(grp_bx, 'MTurnDownSample') + fbl.addRow(lbl, wid) + + lbl = QLabel('Index', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair(grp_bx, 'MTurnIdx') + fbl.addRow(lbl, wid) + + lbl = QLabel('Index Time', grp_bx, alignment=Qt.AlignCenter) + wid = QWidget(grp_bx) + pdm_lbl = SiriusLabel( + wid, self.devpref.substitute(propty='MTurnIdxTime-Mon')) + pdm_lbl.showUnits = True + pdm_lbl.setAlignment(Qt.AlignCenter) + conf = PyDMPushButton( + wid, pressValue=1, + init_channel=self.devpref.substitute(propty='MTurnAcquire-Cmd')) + conf.setToolTip('Update MTurn PVs') + conf.setIcon(qta.icon('fa5s.sync')) + conf.setObjectName('conf') + conf.setStyleSheet( + '#conf{min-width:25px; max-width:25px; icon-size:20px;}') + hbl = QHBoxLayout(wid) + hbl.addWidget(pdm_lbl) + hbl.addWidget(conf) + fbl.addRow(lbl, wid) + + lbl = QLabel('TbT Mask', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair_butled(grp_bx, 'MTurnUseMask') + fbl.addRow(lbl, wid) + self._set_detailed([lbl, wid]) + + lbl = QLabel('Mask Begin', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair(grp_bx, 'MTurnMaskSplBeg') + fbl.addRow(lbl, wid) + self._set_detailed([lbl, wid]) + + lbl = QLabel('Mask End', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair(grp_bx, 'MTurnMaskSplEnd') + fbl.addRow(lbl, wid) + self._set_detailed([lbl, wid]) + return grp_bx + + def _get_single_pass_acq_grpbx(self): + grp_bx = QWidget(self) + fbl = QFormLayout(grp_bx) + lbl = QLabel('Avg Turns', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair(grp_bx, 'SPassAvgNrTurns') + fbl.addRow(lbl, wid) + + lbl = QLabel('Mask Begin', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair(grp_bx, 'SPassMaskSplBeg') + fbl.addRow(lbl, wid) + self._set_detailed([lbl, wid]) + + lbl = QLabel('Mask End', grp_bx, alignment=Qt.AlignCenter) + wid = self.create_pair(grp_bx, 'SPassMaskSplEnd') + fbl.addRow(lbl, wid) + self._set_detailed([lbl, wid]) + return grp_bx
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/ioc_control/respmat.html b/_modules/siriushla/as_ap_sofb/ioc_control/respmat.html new file mode 100644 index 000000000..656c0fe77 --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/ioc_control/respmat.html @@ -0,0 +1,537 @@ + + + + + + siriushla.as_ap_sofb.ioc_control.respmat — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_sofb.ioc_control.respmat

+"""Define Controllers for the orbits displayed in the graphic."""
+
+import pathlib as _pathlib
+from datetime import datetime as _datetime
+import numpy as _np
+from qtpy.QtWidgets import QFileDialog, QGroupBox, QPushButton, QFormLayout, \
+    QGridLayout, QVBoxLayout, QHBoxLayout, QMessageBox, QLabel, QWidget, \
+    QTabWidget
+from qtpy.QtCore import Qt
+import qtawesome as qta
+
+from pydm.widgets import PyDMPushButton, PyDMCheckbox
+from siriuspy.sofb.csdev import ConstTLines
+from siriuspy.clientconfigdb import ConfigDBClient, ConfigDBException
+from siriushla.widgets.windows import create_window_from_widget
+from siriushla.widgets import SiriusLedState, SiriusEnumComboBox, \
+    SiriusConnectionSignal as _ConnSig, SiriusLabel, CAPushButton
+from siriushla.util import connect_window, get_appropriate_color, \
+    connect_newprocess
+from siriushla.as_ap_configdb import LoadConfigDialog, SaveConfigDialog
+
+from .respmat_enbllist import SelectionMatrix
+from .base import BaseWidget
+from ..graphics import SingularValues
+
+
+
+[docs] +class RespMatWidget(BaseWidget): + + DEFAULT_DIR = _pathlib.Path.home().as_posix() + + def __init__(self, parent, device, prefix='', acc='SI'): + super().__init__(parent, device, prefix=prefix, acc=acc) + self._enblrule = None + if acc == 'SI': + self._enblrule = ( + '[{"name": "EnblRule", "property": "Enable", ' + + '"expression": "not ch[0]", "channels": [{"channel": "' + + self.devpref.substitute(propty='LoopState-Sts') + + '", "trigger": true}]}]') + + self.setupui() + self._config_type = acc.lower() + '_orbcorr_respm' + self._client = ConfigDBClient(config_type=self._config_type) + self.EXT = self._csorb.respmat_fname.split('.')[1] + self.EXT_FLT = 'RespMat Files (*.{})'.format(self.EXT) + self.last_dir = self.DEFAULT_DIR + + self._respmat_sp = _ConnSig( + self.devpref.substitute(propty='RespMat-SP')) + self._respmat_rb = _ConnSig( + self.devpref.substitute(propty='RespMat-RB')) + +
+[docs] + def setupui(self): + """.""" + gbox = QGroupBox('Matrix', self) + gbox.setObjectName('grbx') + vbl = QVBoxLayout(gbox) + vbl.setContentsMargins(0, 6, 0, 0) + + tabw = QTabWidget(gbox) + tabw.setObjectName(self.acc+'Tab') + vbl.addWidget(tabw) + main_wid = self.get_main_widget(tabw) + tabw.addTab(main_wid, 'Main') + svs_wid = self.get_singular_values_widget(tabw) + tabw.addTab(svs_wid, 'SVs') + if self.acc != 'BO': + meas_wid = self.get_measurement_widget(tabw) + tabw.addTab(meas_wid, 'Meas') + + lay = QVBoxLayout() + lay.setContentsMargins(0, 0, 0, 0) + self.setLayout(lay) + lay.addWidget(gbox)
+ + +
+[docs] + def get_main_widget(self, parent): + main_wid = QWidget(parent) + main_lay = QVBoxLayout(main_wid) + + sel_gp = QGroupBox('Sel.') + sel_gp.setLayout(QHBoxLayout()) + sel_gp.layout().setContentsMargins(0, 0, 0, 0) + sel_wid = self.get_selection_lists_widget(sel_gp) + sel_gp.layout().addWidget(sel_wid) + main_lay.addWidget(sel_gp) + + svld_gp = QGroupBox('Load and Save') + svld_gp.setLayout(QHBoxLayout()) + svld_gp.layout().setContentsMargins(0, 0, 0, 0) + svld_wid = self.get_saveload_widget(svld_gp) + svld_gp.layout().addWidget(svld_wid) + main_lay.addWidget(svld_gp) + + return main_wid
+ + +
+[docs] + def get_selection_lists_widget(self, parent): + """.""" + sel_wid = QWidget(parent) + sel_lay = QHBoxLayout(sel_wid) + + icon = qta.icon('fa5s.hammer', color=get_appropriate_color(self.acc)) + window = create_window_from_widget( + SelectionMatrix, + title=self.acc + ' - SOFB - Corrs and BPMs selection', + icon=icon) + btn = QPushButton('', sel_wid) + btn.setObjectName('btn') + btn.setIcon(qta.icon('fa5s.tasks')) + btn.setToolTip('Open window to select BPMs and correctors') + btn.setStyleSheet( + '#btn{min-width:3.8em; max-width:3.8em;\ + min-height:2em; max-height:2em; icon-size:25px;}') + connect_window( + btn, window, None, device=self.device, + prefix=self.prefix, acc=self.acc, rules=self._enblrule) + sel_lay.addWidget(btn) + + lay = QVBoxLayout() + sel_lay.addStretch() + sel_lay.addLayout(lay) + + pdm_cbx = SiriusEnumComboBox( + sel_wid, self.devpref.substitute(propty='RespMatMode-Sel')) + pdm_cbx.rules = self._enblrule + pdm_lbl = SiriusLabel( + sel_wid, self.devpref.substitute(propty='RespMatMode-Sts')) + hlay = QHBoxLayout() + hlay.addWidget(pdm_cbx) + hlay.addWidget(pdm_lbl) + lay.addLayout(hlay) + + if self.acc in {'SI', 'BO'}: + hlay = QHBoxLayout() + lay.addLayout(hlay) + pdm_chbx = PyDMCheckbox( + sel_wid, self.devpref.substitute(propty='RFEnbl-Sel')) + pdm_chbx.rules = self._enblrule + pdm_chbx.setText('use RF') + pdm_led = SiriusLedState( + sel_wid, self.devpref.substitute(propty='RFEnbl-Sts')) + hlay.addWidget(pdm_chbx) + hlay.addWidget(pdm_led) + + btn = QPushButton('', sel_wid) + btn.setToolTip('Visualize RespMat') + btn.setIcon(qta.icon('mdi.chart-line')) + btn.setObjectName('btn') + btn.setStyleSheet('#btn{max-width:40px; icon-size:40px;}') + connect_newprocess( + btn, [f'sirius-hla-{self.acc.lower():s}-ap-sofb.py', '--matrix']) + sel_lay.addWidget(btn) + + return sel_wid
+ + +
+[docs] + def get_singular_values_widget(self, parent): + """.""" + svs_wid = QWidget(parent) + svs_lay = QGridLayout(svs_wid) + + lbl = QLabel('Min. SV: ') + wid = self.create_pair( + svs_wid, 'MinSingValue', rules=self._enblrule) + svs_lay.addWidget(lbl, 0, 0) + svs_lay.addWidget(wid, 0, 1) + + lbl = QLabel('Tikhonov: ') + wid = self.create_pair( + svs_wid, 'TikhonovRegConst', rules=self._enblrule) + svs_lay.addWidget(lbl, 1, 0) + svs_lay.addWidget(wid, 1, 1) + + lbl = QLabel('Nr Sing Vals') + lbls = SiriusLabel( + svs_wid, self.devpref.substitute(propty='NrSingValues-Mon')) + btn = QPushButton('', svs_wid) + btn.setToolTip('Check Singular Values') + btn.setIcon(qta.icon('mdi.chart-line')) + btn.setObjectName('btn') + btn.setStyleSheet('#btn{max-width:30px; icon-size:30px;}') + hbl = QHBoxLayout() + hbl.addWidget(btn) + hbl.addStretch() + hbl.addWidget(lbl) + hbl.addWidget(lbls) + svs_lay.addLayout(hbl, 2, 0, 1, 2) + + Window = create_window_from_widget( + SingularValues, title='Check Singular Values') + connect_window( + btn, Window, svs_wid, device=self.device, prefix=self.prefix) + + return svs_wid
+ + +
+[docs] + def get_measurement_widget(self, parent): + """.""" + meas_wid = QWidget(parent) + meas_lay = QVBoxLayout(meas_wid) + + strt = PyDMPushButton( + meas_wid, + init_channel=self.devpref.substitute(propty="MeasRespMat-Cmd"), + pressValue=ConstTLines.MeasRespMatCmd.Start) + strt.rules = self._enblrule + strt.setToolTip('Start Measurement') + strt.setIcon(qta.icon('fa5s.play')) + strt.setObjectName('strt') + strt.setStyleSheet( + '#strt{min-width:25px; max-width:25px; icon-size:20px;}') + stop = PyDMPushButton( + meas_wid, + init_channel=self.devpref.substitute(propty="MeasRespMat-Cmd"), + pressValue=ConstTLines.MeasRespMatCmd.Stop) + stop.rules = self._enblrule + stop.setToolTip('Stop Measurement') + stop.setIcon(qta.icon('fa5s.stop')) + stop.setObjectName('stop') + stop.setStyleSheet( + '#stop{min-width:25px; max-width:25px; icon-size:20px;}') + rst = PyDMPushButton( + meas_wid, + init_channel=self.devpref.substitute(propty="MeasRespMat-Cmd"), + pressValue=ConstTLines.MeasRespMatCmd.Reset) + rst.rules = self._enblrule + rst.setToolTip('Reset Measurement Status') + rst.setIcon(qta.icon('fa5s.sync')) + rst.setObjectName('conf') + rst.setStyleSheet( + '#conf{min-width:25px; max-width:25px; icon-size:20px;}') + lbl = SiriusLabel( + meas_wid, self.devpref.substitute(propty='MeasRespMat-Mon')) + lbl.setAlignment(Qt.AlignCenter) + hbl = QHBoxLayout() + hbl.setSpacing(8) + meas_lay.addLayout(hbl) + hbl.addWidget(strt) + hbl.addWidget(stop) + hbl.addWidget(rst) + hbl.addStretch() + hbl.addWidget(lbl) + + fml = QFormLayout() + meas_lay.addSpacing(20) + meas_lay.addLayout(fml) + lbl = QLabel('CH [urad]', meas_wid) + wid = self.create_pair( + meas_wid, 'MeasRespMatKickCH', rules=self._enblrule) + fml.addRow(lbl, wid) + lbl = QLabel('CV [urad]', meas_wid) + wid = self.create_pair( + meas_wid, 'MeasRespMatKickCV', rules=self._enblrule) + fml.addRow(lbl, wid) + if self.acc in {'SI', 'BO'}: + lbl = QLabel('RF [Hz]', meas_wid) + wid = self.create_pair( + meas_wid, 'MeasRespMatKickRF', rules=self._enblrule) + fml.addRow(lbl, wid) + lbl = QLabel('Wait [s]', meas_wid) + lbl.setToolTip('Time to wait between kicks') + wid = self.create_pair( + meas_wid, 'MeasRespMatWait', rules=self._enblrule) + fml.addRow(lbl, wid) + + return meas_wid
+ + +
+[docs] + def get_saveload_widget(self, parent): + """.""" + svld_wid = QWidget(parent) + svld_lay = QGridLayout(svld_wid) + + lbl = QLabel('Load:', svld_wid) + svld_lay.addWidget(lbl, 0, 0, alignment=Qt.AlignRight) + pbtn = CAPushButton('', svld_wid) + pbtn.rules = self._enblrule + pbtn.setIcon(qta.icon('mdi.file-upload-outline')) + pbtn.setToolTip('Load RespMat from file') + pbtn.clicked.connect(self._load_respmat_from_file) + svld_lay.addWidget(pbtn, 0, 1) + pbtn = CAPushButton('', svld_wid) + pbtn.rules = self._enblrule + pbtn.setIcon(qta.icon('mdi.cloud-upload-outline')) + pbtn.setToolTip('Load RespMat from ServConf') + pbtn.clicked.connect(self._open_load_config_servconf) + svld_lay.addWidget(pbtn, 0, 2) + + lbl = QLabel('Save:', svld_wid) + svld_lay.addWidget(lbl, 0, 3, alignment=Qt.AlignRight) + pbtn = QPushButton('', svld_wid) + pbtn.setIcon(qta.icon('mdi.file-download-outline')) + pbtn.setToolTip('Save RespMat to file') + pbtn.clicked.connect(self._save_respmat_to_file) + svld_lay.addWidget(pbtn, 0, 4) + pbtn = QPushButton('', svld_wid) + pbtn.setIcon(qta.icon('mdi.cloud-download-outline')) + pbtn.setToolTip('Save RespMat to ServConf') + pbtn.clicked.connect(self._open_save_config_servconf) + svld_lay.addWidget(pbtn, 0, 5) + self.respmat_label = QLabel('') + svld_lay.addWidget(self.respmat_label, 1, 0, 1, 5) + + svld_lay.setRowStretch(2, 10) + return svld_wid
+ + + def _save_respmat_to_file(self, _): + header = '# ' + _datetime.now().strftime('%Y/%m/%d-%H:%M:%S') + '\n' + if self.acc in {'SI', 'BO'}: + header += '# (BPMX, BPMY) [um] x (CH, CV, RF) [urad, Hz]' + '\n' + else: + header += '# (BPMX, BPMY) [um] x (CH, CV) [urad]' + '\n' + filename = QFileDialog.getSaveFileName( + caption='Define a File Name to Save the Response Matrix', + directory=self.last_dir, + filter=self.EXT_FLT) + fname = filename[0] + if not fname: + return + fname += '' if fname.endswith(self.EXT) else ('.' + self.EXT) + respm = self._respmat_rb.getvalue() + respm = respm.reshape(-1, self._csorb.nr_corrs) + _np.savetxt(fname, respm, header=header) + + def _load_respmat_from_file(self): + filename = QFileDialog.getOpenFileName( + caption='Select a Response Matrix File.', + directory=self.last_dir, + filter=self.EXT_FLT) + if not filename[0]: + return + respm = _np.loadtxt(filename[0]) + self._respmat_sp.send_value_signal[_np.ndarray].emit(respm.flatten()) + self.respmat_label.setText('Loaded from file: \n\n' + filename[0]) + + def _open_load_config_servconf(self): + win = LoadConfigDialog(self._config_type, self) + win.configname.connect(self._set_respm) + win.show() + + def _set_respm(self, confname): + data = self._client.get_config_value(confname) + self._respmat_sp.send_value_signal[_np.ndarray].emit( + _np.array(data).flatten()) + self.respmat_label.setText('Loaded from ServConf: \n\n' + confname) + + def _open_save_config_servconf(self): + win = SaveConfigDialog(self._config_type, self) + win.configname.connect(self._save_respm) + win.show() + + def _save_respm(self, confname): + val = self._respmat_rb.getvalue() + val = val.reshape(-1, self._csorb.nr_corrs) + try: + self._client.insert_config(confname, val.tolist()) + except (ConfigDBException, TypeError) as err: + QMessageBox.warning(self, 'Warning', str(err), QMessageBox.Ok)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/ioc_control/respmat_enbllist.html b/_modules/siriushla/as_ap_sofb/ioc_control/respmat_enbllist.html new file mode 100644 index 000000000..c5068adae --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/ioc_control/respmat_enbllist.html @@ -0,0 +1,384 @@ + + + + + + siriushla.as_ap_sofb.ioc_control.respmat_enbllist — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_sofb.ioc_control.respmat_enbllist

+"""Create the Selection Matrices for BPMs and Correctors."""
+
+from functools import partial as _part
+
+import numpy as np
+
+from qtpy.QtCore import QSize
+from qtpy.QtWidgets import QHBoxLayout, \
+    QSizePolicy, QWidget, QDialog, QTabWidget
+
+from pydm.widgets.base import PyDMWidget
+
+from siriushla.widgets import SiriusLedAlert, QLed, \
+    SiriusConnectionSignal as _ConnSignal, \
+    SelectionMatrixWidget as SelectionWidget
+from siriushla.as_ap_sofb.ioc_control.base import BaseObject, BaseWidget
+
+
+
+[docs] +class SingleSelMatrix(BaseObject, SelectionWidget, PyDMWidget): + """Create the Selection Matrices for BPMs and Correctors.""" + + def __init__(self, parent, dev, device, prefix='', acc='SI', rules=None): + """Initialize the matrix data of the specified dev.""" + + # initialize BaseObject + BaseObject.__init__(self, device, prefix=prefix, acc=acc) + self.dev = dev + bpm_pos = np.array(self._csorb.bpm_pos) + bpm_name = self._csorb.bpm_names + bpm_nknm = self._csorb.bpm_nicknames + self.devpos = { + 'BPMX': bpm_pos, + 'BPMY': bpm_pos, + 'CH': self._csorb.ch_pos, + 'CV': self._csorb.cv_pos} + self.devotpl = { + 'BPMX': 'BPMY', 'BPMY': 'BPMX', 'CH': 'CV', 'CV': 'CH'} + self.devnames = { + 'BPMX': (bpm_name, bpm_nknm), + 'BPMY': (bpm_name, bpm_nknm), + 'CH': (self._csorb.ch_names, self._csorb.ch_nicknames), + 'CV': (self._csorb.cv_names, self._csorb.cv_nicknames)} + + # initialize SelectionWidget + SelectionWidget.__init__( + self, parent=parent, title=dev + "List", + has_bothplanes=dev.lower().startswith('bpm'), + rules=rules) + + # initialize PyDMWidget + init_channel = self.devpref.substitute(propty=self.dev+'EnblList-RB') + PyDMWidget.__init__(self, init_channel=init_channel) + + self.pv_sp = _ConnSignal(init_channel.replace('-RB', '-SP')) + self.pv_otpl = _ConnSignal(self.devpref.substitute( + propty=self.devotpl[self.dev]+'EnblList-SP')) + + # connect signals and slots + self.applyChangesClicked.connect(self.send_value) + self.applyBothPlanesClicked.connect(_part(self.send_value, other=True)) + +
+[docs] + def sizeHint(self): + """Return the base size of the widget.""" + return QSize(500, 1200)
+ + + # --- SelectionWidget specific methods --- + +
+[docs] + def get_headers(self): + _, nicks = self.devnames[self.dev] + if self.acc == 'BO': + top_headers = ['{0:02d}'.format(i) for i in range(1, 11)] + if self.dev.startswith('C'): + top_headers = top_headers[::2] + side_headers = [ + '01-10', '11-20', '21-30', '31-40', '41-50', '01-10'] + if nicks[-1][:2] != '01': + side_headers = side_headers[:-1] + elif self.acc == 'SI': + top_headers = sorted({nick[2:] for nick in nicks}) + top_headers = top_headers[-2:] + top_headers[:-2] + side_headers = sorted({nick[:2] for nick in nicks}) + side_headers.append(side_headers[0]) + else: + top_headers = nicks + side_headers = [' '] + return top_headers, side_headers
+ + +
+[docs] + def get_widgets(self): + widgets = list() + sz_polc = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) + for idx in range(len(self.devnames[self.dev][0])): + wid = QWidget(self.parent()) + led = SiriusLedAlert() + led.setParent(wid) + led.setSizePolicy(sz_polc) + tooltip = self.devnames[self.dev][1][idx] + tooltip += '; Pos = {0:5.1f} m'.format(self.devpos[self.dev][idx]) + led.setToolTip(tooltip) + hbl = QHBoxLayout(wid) + hbl.setContentsMargins(0, 0, 0, 0) + hbl.addWidget(led) + widgets.append(wid) + return widgets
+ + +
+[docs] + def get_positions(self): + top_headers, side_headers = self.headers + positions = list() + for idx in range(len(self.devnames[self.dev][0])): + _, nicks = self.devnames[self.dev] + rsize, hsize, i = len(nicks), len(side_headers), 0 + if self.dev.lower().startswith('bpm'): + i = (idx // rsize) * hsize + if self.acc == 'BO': + sec = int(nicks[idx][:2]) + j = ((sec-1) % 10) + 1 + j = top_headers.index('{0:02d}'.format(j)) + if not (idx+1) % rsize and sec == 1: + i += hsize - 1 + else: + i += (sec-1) // 10 + elif self.acc == 'SI': + j = top_headers.index(nicks[idx][2:]) + if not (idx+1) % rsize: + i += hsize-1 + else: + i += ((idx % rsize) + 1) // len(top_headers) + else: + j = idx + positions.append((i, j)) + return positions
+ + + # --- PyDMWidget specific methods --- + +
+[docs] + def send_value(self, other=False): + if self.value is None: + return + value = self.value.copy() + for i in range(value.size): + wid = self.widgets[i] + led = wid.findChild(QLed) + if led.isSelected(): + value[i] = not value[i] + led.setSelected(False) + self.pv_sp.send_value_signal[np.ndarray].emit(value) + if other: + self.pv_otpl.send_value_signal[np.ndarray].emit(value)
+ + +
+[docs] + def value_changed(self, new_val): + if not isinstance(new_val, np.ndarray): + return + + super(SingleSelMatrix, self).value_changed(new_val) + + _, side_header_wids = self.header_widgets + for i, wid in enumerate(self.widgets): + led = wid.findChild(QLed) + if i < self.value.size: + wid.setVisible(True) + led.state = not self.value[i] + else: + wid.setVisible(False) + rsize = self.value.size / len(self.widgets) + ini = int(len(side_header_wids) * rsize) + for i, head in enumerate(side_header_wids): + head.setVisible(i < ini) + self.adjustSize() + parent = self.parent() + while parent is not None: + parent.adjustSize() + if isinstance(parent, QDialog): + break + parent = parent.parent()
+ + +
+[docs] + def connection_changed(self, new_conn): + super(SingleSelMatrix, self).connection_changed(new_conn) + for wid in self.widgets: + led = wid.findChild(QLed) + led.setEnabled(new_conn)
+
+ + + +
+[docs] +class SelectionMatrix(BaseWidget): + + def __init__(self, parent, device, prefix='', acc='SI', rules=None): + super().__init__(parent, device, prefix=prefix, acc=acc) + tab = QTabWidget(self) + tab.setObjectName(self.acc.upper() + 'Tab') + hbl = QHBoxLayout(self) + hbl.addWidget(tab) + hbl.setContentsMargins(0, 0, 0, 0) + + for dev in ('BPMX', 'BPMY', 'CH', 'CV'): + wid = SingleSelMatrix( + tab, dev, self.device, prefix=self.prefix, acc=self.acc, + rules=rules) + tab.addTab(wid, dev)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/ioc_control/status.html b/_modules/siriushla/as_ap_sofb/ioc_control/status.html new file mode 100644 index 000000000..fdb141a0a --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/ioc_control/status.html @@ -0,0 +1,234 @@ + + + + + + siriushla.as_ap_sofb.ioc_control.status — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_sofb.ioc_control.status

+"""Define Controllers for the orbits displayed in the graphic."""
+
+from qtpy.QtWidgets import QLabel, QGroupBox, QVBoxLayout, QFormLayout, \
+    QHBoxLayout
+from pydm.widgets import PyDMPushButton
+import qtawesome as qta
+
+from siriushla.widgets import SiriusLedAlert
+from siriushla.as_ap_sofb.ioc_control.base import BaseWidget
+
+
+
+[docs] +class StatusWidget(BaseWidget): + + def __init__(self, parent, device, prefix='', acc='SI', is_orb=False): + super().__init__(parent, device, prefix=prefix, acc=acc) + self.is_orb = is_orb + self.setupui() + +
+[docs] + def setupui(self): + vbl = QVBoxLayout(self) + + tip = 'Configure ' + ('Acquisition' if self.is_orb else 'Correctors') + pv = 'TrigAcqConfig-Cmd' if self.is_orb else 'CorrConfig-Cmd' + conf = PyDMPushButton( + self, init_channel=self.devpref.substitute(propty=pv), + pressValue=1) + conf.setToolTip(tip) + conf.setIcon(qta.icon('fa5s.sync')) + conf.setObjectName('conf') + conf.setStyleSheet( + '#conf{min-width:25px; max-width:25px; icon-size:20px;}') + vbl.addWidget(conf) + + pv = 'Orb' if self.is_orb else 'Corr' + pdm_led = SiriusLedAlert( + self, self.devpref.substitute(propty=pv+'Status-Mon')) + + hbl = QHBoxLayout() + hbl.setSpacing(9) + hbl.addWidget(pdm_led) + hbl.addWidget(QLabel('Global Status', self)) + hbl.addStretch() + hbl.addWidget(conf) + vbl.addLayout(hbl) + + grpbx = self.creategroupbox() + vbl.addWidget(grpbx)
+ + +
+[docs] + def creategroupbox(self): + wid = QGroupBox('Detailed Status', self) + fbl = QFormLayout(wid) + if self.is_orb: + items = self._csorb.StsLblsOrb._fields + name = 'Orb' + else: + items = self._csorb.StsLblsCorr._fields + name = 'Corr' + channel = self.devpref.substitute(propty=name + 'Status-Mon') + for bit, label in enumerate(items): + led = SiriusLedAlert(self, channel, bit) + lab = QLabel(label, self) + fbl.addRow(led, lab) + return wid
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/main.html b/_modules/siriushla/as_ap_sofb/main.html new file mode 100644 index 000000000..c3c2afc97 --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/main.html @@ -0,0 +1,345 @@ + + + + + + siriushla.as_ap_sofb.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_ap_sofb.main

+"""Main module of the Application Interface."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QDockWidget, QSizePolicy, QVBoxLayout, \
+    QPushButton, QHBoxLayout, QMenu, QMenuBar, QAction
+import qtawesome as qta
+
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.sofb.csdev import SOFBFactory
+
+from .. import util as _util
+from ..widgets import SiriusMainWindow
+from ..widgets import PyDMLogLabel
+from ..widgets.windows import create_window_from_widget
+from ..as_di_bpms import SelectBPMs
+
+from .orbit_register import OrbitRegisters
+from .graphics import OrbitWidget
+from .ioc_control import SOFBControl, DriveControl
+
+
+
+[docs] +class MainWindow(SiriusMainWindow): + def __init__(self, parent=None, prefix='', acc='SI'): + super().__init__(parent=parent) + self.prefix = prefix + self.device = _PVName(acc + '-Glob:AP-SOFB') + self.devpref = self.device.substitute(prefix=prefix) + self._csorb = SOFBFactory.create(acc) + self.setupui() + self.setObjectName(acc+'App') + self.setWindowIcon( + qta.icon('fa5s.hammer', color=_util.get_appropriate_color(acc))) + + @property + def acc(self): + return self._csorb.acc + + @property + def acc_idx(self): + return self._csorb.acc_idx + + @property + def isring(self): + return self._csorb.isring + +
+[docs] + def setupui(self): + self.setWindowModality(Qt.WindowModal) + self.setWindowTitle(self.acc + " - SOFB") + self.setDocumentMode(False) + self.setDockNestingEnabled(True) + + self.ioc_log = self._create_log_docwidget() + self.orbit_regist = self._create_orbit_registers() + self.sofb_control = self._create_ioc_controllers() + + self.addDockWidget(Qt.LeftDockWidgetArea, self.ioc_log) + self.addDockWidget(Qt.LeftDockWidgetArea, self.orbit_regist) + self.addDockWidget(Qt.RightDockWidgetArea, self.sofb_control) + + mwid = self._create_central_widget() + self.setCentralWidget(mwid) + + self._create_menus()
+ + + def _create_central_widget(self): + ctrls = self.orb_regtr.get_registers_control() + chans, ctr = OrbitWidget.get_default_ctrls( + self.device, self.prefix, self.acc) + self._channels = chans + ctrls.update(ctr) + return OrbitWidget(self, self.device, self.prefix, ctrls, self.acc) + + def _create_orbit_registers(self): + # Create Context Menus for Registers and + # assign them to the clicked signal + wid = QDockWidget(self) + wid.setWindowTitle("Orbit Registers") + sz_pol = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) + sz_pol.setVerticalStretch(1) + wid.setSizePolicy(sz_pol) + wid.setFloating(False) + wid.setFeatures(QDockWidget.AllDockWidgetFeatures) + wid.setAllowedAreas(Qt.AllDockWidgetAreas) + wid.setObjectName('doc_OrbReg') + wid.setStyleSheet("#doc_OrbReg{min-width:20em; min-height:14em;}") + + wid_cont = OrbitRegisters(self, self.device, self.prefix, self.acc, 7) + wid.setWidget(wid_cont) + self.orb_regtr = wid_cont + return wid + + def _create_ioc_controllers(self): + docwid = QDockWidget(self) + docwid.setWindowTitle("IOC Control") + sz_pol = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) + sz_pol.setVerticalStretch(1) + docwid.setSizePolicy(sz_pol) + docwid.setFloating(False) + docwid.setFeatures(QDockWidget.AllDockWidgetFeatures) + docwid.setAllowedAreas(Qt.AllDockWidgetAreas) + + ctrls = self.orb_regtr.get_registers_control() + wid = SOFBControl(self, self.device, ctrls, self.prefix, self.acc) + docwid.setWidget(wid) + return docwid + + def _create_log_docwidget(self): + docwid = QDockWidget(self) + docwid.setWindowTitle('IOC Log') + sz_pol = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) + docwid.setSizePolicy(sz_pol) + docwid.setFloating(False) + docwid.setObjectName('doc_IOCLog') + docwid.setStyleSheet("#doc_IOCLog{min-width:20em; min-height:30em;}") + wid_cont = QWidget() + docwid.setWidget(wid_cont) + vbl = QVBoxLayout(wid_cont) + vbl.setContentsMargins(0, 0, 0, 0) + pdm_log = PyDMLogLabel( + wid_cont, init_channel=self.devpref.substitute(propty='Log-Mon')) + pdm_log.setAlternatingRowColors(True) + pdm_log.maxCount = 2000 + vbl.addWidget(pdm_log) + hbl = QHBoxLayout() + vbl.addLayout(hbl) + hbl.addStretch() + pbtn = QPushButton('Clear Log', wid_cont) + pbtn.clicked.connect(pdm_log.clear) + hbl.addWidget(pbtn) + hbl.addStretch() + return docwid + + def _create_menus(self): + menubar = QMenuBar(self) + menubar.setNativeMenuBar(False) + + menuopen = QMenu('Open', menubar) + actions = ( + ("&SOFB Control", "SOFB Control", '', True, self.sofb_control), + ("IOC &Log", "IOC Log", '', True, self.ioc_log), + ("&Registers", "Orbit Registers", '', True, self.orbit_regist)) + self.setMenuBar(menubar) + for name, tool, short, check, doc in actions: + action = QAction(name, self) + action.setToolTip(tool) + action.setShortcut(short) + action.setCheckable(check) + action.setChecked(check) + action.setEnabled(True) + action.setVisible(True) + action.toggled.connect(doc.setVisible) + doc.visibilityChanged.connect(action.setChecked) + menuopen.addAction(action) + menubar.addAction(menuopen.menuAction()) + + if self.acc == 'SI': + actdrive = QAction('Drive Control', menubar) + Window = create_window_from_widget( + DriveControl, title='Drive Control') + _util.connect_window( + actdrive, Window, parent=self, device=self.device, + prefix=self.prefix, acc=self.acc) + menubar.addAction(actdrive) + + actbpm = QAction('Show BPM List', menubar) + Window = create_window_from_widget(SelectBPMs, title='BPM List') + _util.connect_window( + actbpm, Window, self, prefix=self.prefix, + bpm_list=self._csorb.bpm_names) + menubar.addAction(actbpm) + + if self.isring: + acttrajfit = QAction('Open Traj. Fit', menubar) + _util.connect_newprocess( + acttrajfit, + [f'sirius-hla-{self.acc.lower()}-ap-trajfit.py', ]) + menubar.addAction(acttrajfit)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ap_sofb/orbit_register.html b/_modules/siriushla/as_ap_sofb/orbit_register.html new file mode 100644 index 000000000..fc498a7c2 --- /dev/null +++ b/_modules/siriushla/as_ap_sofb/orbit_register.html @@ -0,0 +1,779 @@ + + + + + + siriushla.as_ap_sofb.orbit_register — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ap_sofb.orbit_register

+"""Creates the Contextes Menus for the Register."""
+
+from functools import partial as _part
+from datetime import datetime as _datetime
+import numpy as _np
+from qtpy.QtWidgets import QMenu, QFileDialog, QWidget, QMessageBox, \
+    QScrollArea, QLabel, QPushButton, QSizePolicy, QGridLayout, QVBoxLayout, \
+    QHBoxLayout, QDialog, QComboBox, QLineEdit
+from qtpy.QtCore import Signal, Qt
+from qtpy.QtGui import QDoubleValidator
+import qtawesome as qta
+
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.sofb.csdev import SOFBFactory
+from siriuspy.sofb.utils import si_calculate_bump as _calculate_bump
+from siriuspy.clientconfigdb import ConfigDBClient, ConfigDBException
+from siriushla.as_ap_configdb import LoadConfigDialog, SaveConfigDialog
+from siriushla.widgets import SiriusConnectionSignal as _ConnSig, \
+    QDoubleSpinBoxPlus
+
+
+
+[docs] +class OrbitRegisters(QWidget): + """.""" + + def __init__(self, parent, device, prefix='', acc=None, nr_registers=9): + """.""" + super(OrbitRegisters, self).__init__(parent) + self._nr_registers = nr_registers + self.prefix = prefix + self.device = _PVName(device) + self.devpref = self.device.substitute(prefix=prefix) + self.acc = acc.upper() + self._orbits = { + 'ref': [ + _ConnSig(self.devpref.substitute(propty='RefOrbX-RB')), + _ConnSig(self.devpref.substitute(propty='RefOrbY-RB'))], + 'bpm': [ + _ConnSig(self.devpref.substitute(propty='BPMOffsetX-Mon')), + _ConnSig(self.devpref.substitute(propty='BPMOffsetY-Mon'))], + 'mat': _ConnSig(self.devpref.substitute(propty='RespMat-RB')), + } + if self.acc in {'TB', 'TS', 'SI'}: + self._orbits['sp'] = [ + _ConnSig(self.devpref.substitute(propty='SPassOrbX-Mon')), + _ConnSig(self.devpref.substitute(propty='SPassOrbY-Mon'))] + if self.acc in {'SI', 'BO'}: + self._orbits['mti'] = [ + _ConnSig(self.devpref.substitute(propty='MTurnIdxOrbX-Mon')), + _ConnSig(self.devpref.substitute(propty='MTurnIdxOrbY-Mon'))] + if self.acc == 'SI': + self._orbits['orb'] = [ + _ConnSig(self.devpref.substitute(propty='SlowOrbX-Mon')), + _ConnSig(self.devpref.substitute(propty='SlowOrbY-Mon'))] + + self.setupui() + +
+[docs] + def channels(self): + """.""" + chans = [] + for v in self._orbits.values(): + chans.extend(v) + return chans
+ + +
+[docs] + def setupui(self): + """.""" + gdl = QGridLayout(self) + gdl.setContentsMargins(0, 0, 0, 0) + + scr_ar = QScrollArea(self) + gdl.addWidget(scr_ar, 0, 0, 1, 1) + scr_ar.setSizeAdjustPolicy(QScrollArea.AdjustToContentsOnFirstShow) + scr_ar.setWidgetResizable(True) + + scr_ar_wid = QWidget() + scr_ar.setWidget(scr_ar_wid) + scr_ar_wid.setObjectName('scr_ar_wid') + scr_ar_wid.setStyleSheet(""" + #scr_ar_wid{ + min-width:40em; min-height:10em; + background-color: transparent; + }""") + hbl = QHBoxLayout(scr_ar_wid) + hbl.setContentsMargins(0, 0, 0, 0) + + vbl = QVBoxLayout() + hbl.addLayout(vbl) + + self.registers = [] + for i in range(self._nr_registers): + reg = OrbitRegister( + self, self.device, self._orbits, i+1, + prefix=self.prefix, acc=self.acc) + vbl.addWidget(reg) + self.registers.append(reg)
+ + +
+[docs] + def get_registers_control(self): + """.""" + ctrls = dict() + for reg in self.registers: + ctrls[reg.name] = dict() + ctrls[reg.name]['x'] = dict() + ctrls[reg.name]['x']['signal'] = reg.new_orbx_signal + ctrls[reg.name]['x']['getvalue'] = reg.getorbx + ctrls[reg.name]['y'] = dict() + ctrls[reg.name]['y']['signal'] = reg.new_orby_signal + ctrls[reg.name]['y']['getvalue'] = reg.getorby + return ctrls
+
+ + + +
+[docs] +class OrbitRegister(QWidget): + """Create the Context Menu for the Registers.""" + + DEFAULT_DIR = '/home/sirius/shared/screens-iocs' + + MAX_BUMP_CURR = 10 # [mA] + + new_orbx_signal = Signal(_np.ndarray) + new_orby_signal = Signal(_np.ndarray) + new_string_signal = Signal(str) + + def __init__(self, parent, device, orbits, idx, prefix='', acc='SI'): + """Initialize the Context Menu.""" + super(OrbitRegister, self).__init__(parent) + self.idx = idx + self.prefix = prefix + self.device = _PVName(device) + self.devpref = self.device.substitute(prefix=prefix) + text = acc.lower() + 'orb' + self.setObjectName(text+str(idx)) + self.EXT = (f'.{acc.lower()}orb', f'.{acc.lower()}dorb') + self.EXT_FLT = f'Sirius Orbit Files (*.{text});;' +\ + f'Sirius Delta Orbit Files (*.{acc.lower()}dorb)' + self._config_type = acc.lower() + '_orbit' + self._client = ConfigDBClient(config_type=self._config_type) + self._csorb = SOFBFactory.create(acc.upper()) + self.string_status = 'Empty' + self.name = 'Register {0:d}'.format(self.idx) + self._chn_curr = _ConnSig( + _PVName('SI-Glob:AP-CurrInfo:Current-Mon').substitute( + prefix=prefix)) + + self.setup_ui() + + self._orbits = orbits + self.last_dir = self.DEFAULT_DIR + self.filename = '' + self._orbx = _np.zeros(self._csorb.nr_bpms) + self._orby = _np.zeros(self._csorb.nr_bpms) + + self.new_string_signal.emit(self.string_status) + +
+[docs] + def getorbx(self): + """Return the horizontal orbit.""" + return self._orbx.copy()
+ + + orbx = property(fget=getorbx) + +
+[docs] + def getorby(self): + """Return the Vertical orbit.""" + return self._orby.copy()
+ + + orby = property(fget=getorby) + +
+[docs] + def setup_ui(self): + """Set up Ui of Context Menu.""" + self.setStyleSheet(""" + #{}{{ + min-width:11.29em; + }}""".format(self.objectName())) + hbl = QHBoxLayout(self) + + btn = QPushButton(self.name, self) + hbl.addWidget(btn) + btn.setEnabled(True) + btn.setAutoDefault(False) + + lbl = QLabel(self) + hbl.addWidget(lbl) + sz_pol = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) + sz_pol.setHorizontalStretch(1) + lbl.setSizePolicy(sz_pol) + lbl.setMouseTracking(True) + lbl.setAcceptDrops(True) + lbl.setTextInteractionFlags(Qt.TextEditorInteraction) + self.new_string_signal.connect(lbl.setText) + + menu = QMenu(btn) + btn.setContextMenuPolicy(Qt.CustomContextMenu) + btn.setMenu(menu) + btn.clicked.connect(btn.showMenu) + + act = menu.addAction('Get From &File') + act.setIcon(qta.icon('mdi.file-download-outline')) + act.triggered.connect(self._load_orbit_from_file) + act = menu.addAction('Get From &ServConf') + act.setIcon(qta.icon('mdi.cloud-download-outline')) + act.triggered.connect(self._load_orbit_from_servconf) + menu2 = menu.addMenu('Get from &IOC') + menu2.setIcon(qta.icon('mdi.download-network-outline')) + if self._csorb.acc == 'SI': + act = menu2.addAction('&SlowOrb') + act.setIcon(qta.icon('mdi.turtle')) + act.triggered.connect(_part(self._register_orbit, 'orb')) + if self._csorb.isring: + act = menu2.addAction('&MTurnOrb') + act.setIcon(qta.icon('mdi.alarm-multiple')) + act.triggered.connect(_part(self._register_orbit, 'mti')) + if self._csorb.acc.upper() != 'BO': + act = menu2.addAction('S&PassOrb') + act.setIcon(qta.icon('mdi.clock-fast')) + act.triggered.connect(_part(self._register_orbit, 'sp')) + act = menu2.addAction('&RefOrb') + act.triggered.connect(_part(self._register_orbit, 'ref')) + act = menu2.addAction('&BPM Offsets') + act.setIcon(qta.icon('mdi.currency-sign')) + act.triggered.connect(_part(self._register_orbit, 'bpm')) + act = menu2.addAction('RespMat') + act.setIcon(qta.icon('mdi.matrix')) + act.triggered.connect(self._open_matrix_sel) + act = menu.addAction('&Edit Orbit') + act.setIcon(qta.icon('mdi.table-edit')) + act.triggered.connect(self._edit_orbit) + if self._csorb.acc == 'SI': + act = menu.addAction('Create &Bump') + act.setIcon(qta.icon( + 'mdi.chart-bell-curve', scale_factor=1.2, offset=(-0.2, 0.2))) + act.triggered.connect(self._create_bump) + act = menu.addAction('&Clear') + act.setIcon(qta.icon('mdi.delete-empty')) + act.triggered.connect(self._reset_orbit) + act = menu.addAction('Save To File') + act.setIcon(qta.icon('mdi.file-upload-outline')) + act.triggered.connect(self._save_orbit_to_file) + act = menu.addAction('Save To ServConf') + act.setIcon(qta.icon('mdi.cloud-upload-outline')) + act.triggered.connect(self._save_orbit_to_servconf)
+ + + def _reset_orbit(self): + zer = _np.zeros(self._orbx.shape) + self._update_and_emit('Empty', zer, zer.copy(), '') + + def _register_orbit(self, flag, _): + pvx, pvy = self._orbits.get(flag, (None, None)) + if not pvx or not pvy: + self._update_and_emit('Error: wrong specification.') + return + if not pvx.connected or not pvy.connected: + self._update_and_emit( + 'Error: PV {0:s} not connected.'.format(pvx.address)) + return + self._update_and_emit( + 'Orbit Registered.', pvx.getvalue(), pvy.getvalue()) + + def _open_matrix_sel(self): + wid = QDialog(self) + wid.setObjectName(self._csorb.acc+'App') + wid.setLayout(QVBoxLayout()) + + cbbox = QComboBox(wid) + cbbox.setEditable(True) + cbbox.setMaxVisibleItems(10) + corrnames = self._csorb.ch_names + self._csorb.cv_names + if self._csorb.acc in {'SI', 'BO'}: + corrnames.append('RF') + cbbox.addItems(corrnames) + wid.layout().addWidget(QLabel('Choose the corrector:', wid)) + wid.layout().addWidget(cbbox) + + ledit = QDoubleSpinBoxPlus(wid) + ledit.setMinimum(float('-inf')) + ledit.setMaximum(float('inf')) + ledit.setValue(1.0) + wid.layout().addWidget(QLabel('Choose the Kick [urad]:', wid)) + wid.layout().addWidget(ledit) + ledit.valueChanged.connect(_part(self._accept_mat_sel, ledit, cbbox)) + cbbox.currentIndexChanged.connect( + _part(self._accept_mat_sel, ledit, cbbox)) + + hlay = QHBoxLayout() + cancel = QPushButton('Cancel', wid) + confirm = QPushButton('Ok', wid) + cancel.clicked.connect(wid.reject) + confirm.clicked.connect(wid.accept) + confirm.clicked.connect(_part(self._accept_mat_sel, ledit, cbbox)) + confirm.setDefault(True) + hlay.addStretch() + hlay.addWidget(cancel) + hlay.addStretch() + hlay.addWidget(confirm) + hlay.addStretch() + wid.layout().addLayout(hlay) + res = wid.exec_() + + if res != QDialog.Accepted: + self._reset_orbit() + + def _accept_mat_sel(self, ledit, cbbox, _): + idx = cbbox.currentIndex() + corr = cbbox.currentText() + kick = ledit.value() + pvm = self._orbits.get('mat') + if pvm is None or not pvm.connected: + self._update_and_emit( + 'Error: PV {0:s} not connected.'.format(pvm.address)) + return + val = pvm.getvalue() + orbs = val.reshape(-1, self._csorb.nr_corrs)[:, idx] + orbx = orbs[:len(orbs)//2] * kick + orby = orbs[len(orbs)//2:] * kick + self._update_and_emit( + 'RespMat: {0:s}'.format(corr), orbx, orby) + + def _edit_orbit(self): + orbx = self.orbx + orby = self.orby + + wid = QDialog(self) + wid.setObjectName(self._csorb.acc+'App') + wid.setLayout(QVBoxLayout()) + + hbl = QHBoxLayout() + wid.layout().addLayout(hbl) + hbl.addWidget(QLabel('X = ', wid)) + multx = QLineEdit(wid) + multx.setValidator(QDoubleValidator()) + multx.setText('1.0') + # multx.setAlignment(Qt.AlignVCenter | Qt.AlignRight) + multx.setAlignment(Qt.AlignCenter) + multx.setStyleSheet('max-width:5em;') + hbl.addWidget(multx) + hbl.addWidget(QLabel('*X + ', wid)) + addx = QLineEdit(wid) + addx.setValidator(QDoubleValidator()) + addx.setText('0.0') + addx.setAlignment(Qt.AlignCenter) + addx.setStyleSheet('max-width:5em;') + hbl.addWidget(addx) + hbl.addWidget(QLabel(' [um]', wid)) + + hbl = QHBoxLayout() + wid.layout().addLayout(hbl) + hbl.addWidget(QLabel('Y = ', wid)) + multy = QLineEdit(wid) + multy.setValidator(QDoubleValidator()) + multy.setText('1.0') + # multy.setAlignment(Qt.AlignVCenter | Qt.AlignRight) + multy.setAlignment(Qt.AlignCenter) + multy.setStyleSheet('max-width:5em;') + hbl.addWidget(multy) + hbl.addWidget(QLabel('*Y + ', wid)) + addy = QLineEdit(wid) + addy.setValidator(QDoubleValidator()) + addy.setText('0.0') + addy.setAlignment(Qt.AlignCenter) + addy.setStyleSheet('max-width:5em;') + hbl.addWidget(addy) + hbl.addWidget(QLabel(' [um]', wid)) + + hlay = QHBoxLayout() + cancel = QPushButton('Cancel', wid) + confirm = QPushButton('Ok', wid) + confirm.setDefault(True) + cancel.clicked.connect(wid.reject) + confirm.clicked.connect(wid.accept) + hlay.addStretch() + hlay.addWidget(cancel) + hlay.addStretch() + hlay.addWidget(confirm) + hlay.addStretch() + wid.layout().addLayout(hlay) + res = wid.exec_() + + if res != QDialog.Accepted: + return + mltx = float(multx.text()) + mlty = float(multy.text()) + plusx = float(addx.text()) + plusy = float(addy.text()) + orbx = mltx * orbx + plusx + orby = mlty * orby + plusy + txt = '' + txt += f'multx = {mltx:5.1f} offx = {plusx:7.1f}\n' + txt += f'multy = {mlty:5.1f} offy = {plusy:7.1f}' + self._update_and_emit(txt, orbx, orby) + + def _create_bump(self): + curr = self._chn_curr.value + if curr is None: + QMessageBox.warning( + self, 'Warning', 'Could not read current value.', + QMessageBox.Ok) + elif curr > OrbitRegister.MAX_BUMP_CURR: + ans = QMessageBox.question( + self, 'Are you Sure?', + f'Stored current is above {OrbitRegister.MAX_BUMP_CURR}mA ' + + f'({curr:.2f}mA),\nare you sure you want to continue?', + QMessageBox.Yes, QMessageBox.Cancel) + if ans != QMessageBox.Yes: + return + + def _add_entry(index): + cbox = self.sender() + text = cbox.itemText(index) + if not text.startswith('other'): + return + win = LoadConfigDialog(self._config_type, self) + confname, status = win.exec_() + if not status: + cbox.setCurrentIndex(0) + return + cbox.insertItem(index, confname) + cbox.setCurrentIndex(index) + + wid = QDialog(self) + wid.setObjectName(self._csorb.acc+'App') + lay = QGridLayout() + wid.setLayout(lay) + + row = 0 + lay.addWidget(QLabel('Base Orbit ', wid), row, 0) + orbcombo = QComboBox(wid) + orbcombo.addItems(['Register', 'ref_orb', 'bba_orb', 'other...']) + orbcombo.setCurrentIndex(1) + orbcombo.activated.connect(_add_entry) + lay.addWidget(orbcombo, row, 1) + + row += 1 + lay.addWidget(QLabel('Section', wid), row, 0) + sscombo = QComboBox(wid) + ssnames = [f'{d:02d}' for d in range(1, 21)] + sscombo.addItems(ssnames) + sscombo.setMaxVisibleItems(7) + sscombo.setStyleSheet('QComboBox{combobox-popup: 0;}') + lay.addWidget(sscombo, row, 1) + + row += 1 + lay.addWidget(QLabel('Subsection', wid), row, 0) + sbcombo = QComboBox(wid) + names = ['SS', 'C1', 'C2', 'BC'] + sbcombo.addItems(names) + sbcombo.setMaxVisibleItems(5) + sbcombo.setStyleSheet('QComboBox{combobox-popup: 0;}') + lay.addWidget(sbcombo, row, 1) + + row += 1 + lay.addWidget(QLabel('\u03B8<sub>x</sub> [urad]', wid), row, 0) + angx = QLineEdit(wid) + angx.setValidator(QDoubleValidator()) + angx.setText('0.0') + angx.setAlignment(Qt.AlignCenter) + angx.setStyleSheet('max-width:5em;') + lay.addWidget(angx, row, 1) + + row += 1 + lay.addWidget(QLabel('X [um] ', wid), row, 0) + posx = QLineEdit(wid) + posx.setValidator(QDoubleValidator()) + posx.setText('0.0') + posx.setAlignment(Qt.AlignCenter) + posx.setStyleSheet('max-width:5em;') + lay.addWidget(posx, row, 1) + + row += 1 + lay.addWidget(QLabel('\u03B8<sub>y</sub> [urad]', wid), row, 0) + angy = QLineEdit(wid) + angy.setValidator(QDoubleValidator()) + angy.setText('0.0') + angy.setAlignment(Qt.AlignCenter) + angy.setStyleSheet('max-width:5em;') + lay.addWidget(angy, row, 1) + + row += 1 + lay.addWidget(QLabel('Y [um] ', wid), row, 0) + posy = QLineEdit(wid) + posy.setValidator(QDoubleValidator()) + posy.setText('0.0') + posy.setAlignment(Qt.AlignCenter) + posy.setStyleSheet('max-width:5em;') + lay.addWidget(posy, row, 1) + + row += 1 + hlay = QHBoxLayout() + cancel = QPushButton('Cancel', wid) + confirm = QPushButton('Ok', wid) + confirm.setDefault(True) + cancel.clicked.connect(wid.reject) + confirm.clicked.connect(wid.accept) + hlay.addStretch() + hlay.addWidget(cancel) + hlay.addStretch() + hlay.addWidget(confirm) + hlay.addStretch() + wid.layout().addLayout(hlay, row, 0, 1, 2) + res = wid.exec_() + if res != QDialog.Accepted: + return + + index = orbcombo.currentIndex() + confname = orbcombo.itemText(index) + if not index: + orbx = _np.array(self.orbx) + orby = _np.array(self.orby) + elif index == orbcombo.count()-1: + return + else: + orbs = self._client.get_config_value(confname) + orbx = _np.array(orbs['x']) + orby = _np.array(orbs['y']) + + agx = float(angx.text()) + agy = float(angy.text()) + psx = float(posx.text()) + psy = float(posy.text()) + sec = sscombo.currentText() + sub = sbcombo.currentText() + if sub == 'SS': + sub = 'SA' + if not int(sec) % 2: + sub = 'SB' + elif not (int(sec)+1) % 4: + sub = 'SP' + orbx, orby = _calculate_bump(orbx, orby, sec+sub, agx, agy, psx, psy) + + txt = f'Bump@{sec+sub}; ref={confname}; ' + txt += f'ax={agx:.1f} ay={agy:.1f} dx={psx:.1f} dy={psy:.1f}' + self._update_and_emit(txt, orbx, orby) + + def _save_orbit_to_file(self, _): + header = '# ' + _datetime.now().strftime('%Y/%m/%d-%H:%M:%S') + '\n' + header += '# ' + 'BPMX [um] BPMY [um] Name' + '\n' + filename = QFileDialog.getSaveFileName( + caption='Define a File Name to Save the Orbit', + directory=self.last_dir, + filter=self.EXT_FLT) + fname = filename[0] + if not fname: + return + fname += '' if fname.endswith(self.EXT) else self.EXT[0] + data = _np.array( + [self.orbx, self.orby, self._csorb.bpm_names], dtype=object) + _np.savetxt( + fname, data.T, header=header, fmt='%+18.8e %+18.8e %s') + self._update_and_emit('Orbit Saved: ', self.orbx, self.orby, fname) + + def _load_orbit_from_file(self): + filename = QFileDialog.getOpenFileName( + caption='Select an Orbit File.', directory=self.last_dir, + filter=self.EXT_FLT) + if not filename[0]: + return + orbx, orby = _np.loadtxt(filename[0], unpack=True, usecols=(0, 1)) + self._update_and_emit('Orbit Loaded: ', orbx, orby, filename[0]) + + def _load_orbit_from_servconf(self): + win = LoadConfigDialog(self._config_type, self) + win.configname.connect(self._set_orbit) + win.show() + + def _set_orbit(self, confname): + data = self._client.get_config_value(confname) + self._update_and_emit( + 'Orbit Loaded: '+confname, + _np.array(data['x']), _np.array(data['y'])) + + def _save_orbit_to_servconf(self): + win = SaveConfigDialog(self._config_type, self) + win.configname.connect(self._save_orbit) + win.show() + + def _save_orbit(self, confname): + data = {'x': self._orbx.tolist(), 'y': self.orby.tolist()} + try: + self._client.insert_config(confname, data) + except (ConfigDBException, TypeError) as err: + QMessageBox.warning(self, 'Warning', str(err), QMessageBox.Ok) + + def _update_and_emit(self, string, orbx=None, orby=None, fname=''): + if orbx is None or orby is None: + self.string_status = string + self.new_string_signal.emit(self.string_status) + return + self._orbx = orbx + self._orby = orby + pure_name = '' + path = self.last_dir + if fname: + path, pure_name = fname.rsplit('/', 1) + self.string_status = string + pure_name + self.filename = fname + self.last_dir = path + self.new_orbx_signal.emit(orbx) + self.new_orby_signal.emit(orby) + self.new_string_signal.emit(self.string_status)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_bpms/base.html b/_modules/siriushla/as_di_bpms/base.html new file mode 100644 index 000000000..847e9bf89 --- /dev/null +++ b/_modules/siriushla/as_di_bpms/base.html @@ -0,0 +1,477 @@ + + + + + + siriushla.as_di_bpms.base — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_di_bpms.base

+"""Base module."""
+
+from functools import partial as _part
+import numpy as np
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QHBoxLayout, QVBoxLayout, QCheckBox, \
+    QFormLayout, QGroupBox, QLabel, QSizePolicy as QSzPlcy
+from qtpy.QtGui import QColor
+
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from siriushla.widgets import SiriusConnectionSignal, SiriusLabel, \
+    SiriusSpinbox, SiriusTimePlot, SiriusWaveformPlot, SiriusLedState, \
+    SiriusLedAlert, PyDMStateButton, SiriusEnumComboBox, SiriusPushButton, \
+    SiriusLineEdit, pydmwidget_factory
+
+
+
+[docs] +class BaseWidget(QWidget): + + def __init__(self, parent=None, prefix='', bpm='', data_prefix=''): + super().__init__(parent) + self.prefix = prefix + self.bpm = _PVName(bpm) + self.is_pbpm = self.bpm.dev == 'PBPM' + self.setObjectName(self.bpm.sec+'App') + self.data_prefix = data_prefix + self._chans = [] + +
+[docs] + def channels(self): + return self._chans
+ + +
+[docs] + def get_pvname(self, propty, is_data=True): + addr = self.bpm.substitute( + prefix=self.prefix, + propty=(self.data_prefix if is_data else '')+propty) + return addr
+ + + def _create_formlayout_groupbox(self, title, props): + if title: + grpbx = CustomGroupBox(title, self) + else: + grpbx = QWidget(self) + fbl = QFormLayout(grpbx) + grpbx.layoutf = fbl + fbl.setLabelAlignment(Qt.AlignVCenter) + for prop in props: + if len(prop) == 2: + pvs, txt = prop + isdata, prec, widgets = True, None, None + elif len(prop) == 3: + pvs, txt, aux = prop + if isinstance(aux, bool): + isdata, prec, widgets = aux, None, None + elif isinstance(aux, int): + isdata, prec, widgets = True, aux, None + elif isinstance(aux, dict): + isdata = aux.get('isdata', True) + prec = aux.get('prec', None) + widgets = aux.get('widgets', None) + else: + isdata, prec, widgets = True, None, aux + + if isinstance(pvs, str): + pv1 = pvs + pv2 = pv1.replace('-SP', '-RB').replace('-Sel', '-Sts') + pvs = [pv1, ] + if pv2 != pv1: + pvs.append(pv2) + else: + pv1 = pvs[0] + + if widgets is None: + if pv2 != pv1: + if pv1.endswith('-SP'): + widgets = ['spin', 'label'] + else: + widgets = ['combo', 'label'] + else: + widgets = ['label', ] + + lab = QLabel(txt) + lab.setObjectName(pv1.split('-')[0]) + lab.setStyleSheet("min-width:10em;") + + hbl = QHBoxLayout() + for i, wid in enumerate(widgets): + hbl.addWidget(self._get_widget(wid, pvs[i], isdata, prec)) + + fbl.addRow(lab, hbl) + + return grpbx + + def _get_widget(self, widtype, pvname, isdata, prec): + pvname = self.get_pvname(pvname, is_data=isdata) + + if widtype == 'combo': + wid = SiriusEnumComboBox(self, pvname) + wid.setStyleSheet("QWidget{min-width:5em;}") + elif widtype == 'spin': + wid = SiriusSpinbox(self, pvname) + wid.setStyleSheet("QWidget{min-width:5em;}") + if prec is not None: + wid.precisionFromPV = False + wid.precision = prec + elif widtype == 'lineedit': + wid = SiriusLineEdit(self, pvname) + wid.setStyleSheet("QWidget{min-width:5em;}") + wid.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Preferred) + if prec is not None: + wid.precisionFromPV = False + wid.precision = prec + elif widtype == 'label': + wid = SiriusLabel(self, pvname) + wid.showUnits = True + if prec is not None: + wid.precisionFromPV = False + wid.precision = prec + wid.setStyleSheet("QLabel{min-width:6em;}") + elif widtype == 'ledstate': + wid = SiriusLedState(self, pvname) + elif widtype == 'ledalert': + wid = SiriusLedAlert(self, pvname) + elif widtype == 'statebutton': + wid = PyDMStateButton(self, pvname) + elif isinstance(widtype, (list, tuple)): + if widtype[0] == 'pushbutton': + kws = dict( + label=widtype[1], icon=widtype[2], + pressValue=widtype[3] if len(widtype) > 3 else 1, + init_channel=pvname) + if len(widtype) > 4: + kws['releaseValue'] = widtype[4] + wid = SiriusPushButton(self, **kws) + wid.setDefault(False) + wid.setAutoDefault(False) + elif widtype[0] == 'ledstate': + wid = SiriusLedState(self, pvname) + wid.offColor = widtype[1] + wid.onColor = widtype[2] + elif widtype[0] == 'ledalert': + wid = SiriusLedAlert(self, pvname) + wid.offColor = widtype[1] + wid.onColor = widtype[2] + else: + raise NotImplementedError(f'widget not defined for type {widtype}') + wid.setObjectName(str(pvname).replace('-', '')) + return wid + +
+[docs] + def basic_rule(self, channel, flag, val=0): + chan = self.get_pvname(channel) + opr = '==' if flag else '!=' + val = str(val) + rules = ( + '[{"name": "VisRule", "property": "Visible", ' + + '"expression": "ch[0] '+opr+' '+val+'", "channels": ' + + '[{"channel": "'+chan+'", "trigger": true}]}]') + return rules
+
+ + + +CustomGroupBox = pydmwidget_factory(QGroupBox, pydm_class='primi') + + +
+[docs] +def get_custom_widget_class(CLASS): + class MyWidget(CLASS): + + def __init__(self, parent=None, **kws): + """Initialize object.""" + super().__init__(parent=parent, **kws) + self.setFocusPolicy(Qt.StrongFocus) + + def wheelEvent(self, event): + """Reimplement wheel event to ignore event when out of focus.""" + if not self.hasFocus(): + event.ignore() + else: + super().wheelEvent(event) + return MyWidget
+ + + +
+[docs] +class BaseGraph(BaseWidget): + CLASS = get_custom_widget_class(SiriusWaveformPlot) + DATA_CLASS = np.ndarray + + def __init__(self, parent=None, prefix='', bpm='', data_prefix=''): + super().__init__( + parent, prefix=prefix, bpm=bpm, data_prefix=data_prefix) + self.graph = self.CLASS(self) + self.setupgraph(self.graph) + self.setupui() + +
+[docs] + def setupgraph(self, graph): + graph.mouseEnabledX = True + graph.setShowXGrid(True) + graph.setShowYGrid(True) + graph.setBackgroundColor(QColor(255, 255, 255)) + graph.setAutoRangeX(True) + graph.setAutoRangeY(True) + graph.setMinXRange(0.0) + graph.setMaxXRange(1.0) + graph.setAxisColor(QColor(0, 0, 0)) + graph.plotItem.getAxis('bottom').setStyle(tickTextOffset=15) + graph.plotItem.getAxis('left').setStyle( + tickTextOffset=5, autoExpandTextSpace=False, tickTextWidth=30)
+ + +
+[docs] + def setupui(self): + hbl = QHBoxLayout(self) + hbl.addWidget(self.graph) + self.vbl = QVBoxLayout() + hbl.addItem(self.vbl) + self.vbl.addStretch()
+ + +
+[docs] + def setLabel(self, *args, **kwargs): + self.graph.setLabel(*args, **kwargs)
+ + +
+[docs] + def curveAtIndex(self, *args): + return self.graph.curveAtIndex(*args)
+ + + def _add_channel(self, name): + cdta = self.graph.curveAtIndex(-1) + cbx = QCheckBox(name, self) + plt = cbx.palette() + plt.setColor(plt.WindowText, cdta.color) + cbx.setPalette(plt) + cbx.setChecked(True) + self.vbl.addWidget(cbx) + self.vbl.addStretch() + cbx.toggled.connect(cdta.setVisible) + + def _add_scale(self, channel, scale): + cdta = self.graph.curveAtIndex(-1) + chan = SiriusConnectionSignal(channel) + chan.new_value_signal[self.DATA_CLASS].connect( + _part(self._apply_scale, cdta, scale)) + self._chans.append(chan) + + def _apply_scale(self, cdta, scale, value): + if self.DATA_CLASS == np.ndarray: + cdta.receiveYWaveform(value*scale) + else: + cdta.receiveNewValue(value*scale)
+ + + +
+[docs] +class GraphWave(BaseGraph): + +
+[docs] + def addChannel(self, **opts): + scale = opts.pop('add_scale', None) + self.graph.addChannel(**opts) + name = opts.get('name', '') + self._add_channel(name) + if scale: + channel = opts.get('y_channel', '') + self._add_scale(channel, scale)
+
+ + + +
+[docs] +class GraphTime(BaseGraph): + CLASS = get_custom_widget_class(SiriusTimePlot) + DATA_CLASS = float + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.graph.timeSpan = 100 + +
+[docs] + def addYChannel(self, **opts): + scale = opts.pop('add_scale', None) + ychan = opts['y_channel'] + if scale: + opts['y_channel'] = 'A' + self.graph.addYChannel(**opts) + if scale: + self._add_scale(ychan, scale) + name = opts.get('name', '') + self._add_channel(name)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_bpms/list_bpms.html b/_modules/siriushla/as_di_bpms/list_bpms.html new file mode 100644 index 000000000..2893e85b7 --- /dev/null +++ b/_modules/siriushla/as_di_bpms/list_bpms.html @@ -0,0 +1,382 @@ + + + + + + siriushla.as_di_bpms.list_bpms — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_di_bpms.list_bpms

+import re
+from qtpy.QtWidgets import QWidget, QVBoxLayout, QScrollArea, QLineEdit, \
+    QLabel, QHBoxLayout, QGridLayout, QPushButton
+from qtpy.QtCore import Qt, Slot
+from siriushla.as_di_bpms.base import BaseWidget, GraphTime, GraphWave, \
+    get_custom_widget_class
+from siriushla.widgets import PyDMLedMultiChannel
+from siriushla.util import connect_newprocess
+
+
+
+[docs] +class BPMSummary(BaseWidget): + + def __init__(self, parent=None, prefix='', bpm=''): + super().__init__(parent=parent, prefix=prefix, bpm=bpm) + self.setObjectName(self.bpm.sec+'App') + self.setupui() + +
+[docs] + def setupui(self): + hbl = QHBoxLayout(self) + hbl.setContentsMargins(0, 0, 0, 0) + chan2vals = {'RFFEasyn.CNCT': 1, 'ADCAD9510PllStatus-Mon': 1} + chan2vals = {self.get_pvname(k): v for k, v in chan2vals.items()} + led = PyDMLedMultiChannel(self, channels2values=chan2vals) + led.setToolTip(self.bpm) + hbl.addWidget(led) + connect_newprocess( + led, ['sirius-hla-as-di-bpm.py', '-p', self.prefix, self.bpm], + parent=self, signal=led.clicked)
+
+ + + +
+[docs] +class SelectBPMs(BaseWidget): + + def __init__(self, parent=None, prefix='', bpm_list=[]): + super().__init__(parent=parent, prefix=prefix, bpm='') + self.bpm_dict = {bpm: '' for bpm in bpm_list} + self.setObjectName(bpm_list[0][:2] + 'App') + is_si = all(map(lambda x: x.sec, bpm_list)) + self.ncols = 8 if is_si else 10 + self.setupui() + +
+[docs] + def setupui(self): + vbl = QVBoxLayout(self) + lab = QLabel('<h2>BPMs List</h2>', alignment=Qt.AlignCenter) + vbl.addWidget(lab) + vbl.addSpacing(20) + + search = QLineEdit(parent=self) + search.setPlaceholderText("Search for BPMs...") + search.textEdited.connect(self._filter_bpms) + vbl.addWidget(search) + + scarea = QScrollArea(self) + scarea.setSizeAdjustPolicy(scarea.AdjustToContents) + scarea.setWidgetResizable(True) + + scr_ar_wid = QWidget() + scr_ar_wid.setObjectName('scrollarea') + scr_ar_wid.setStyleSheet( + '#scrollarea {background-color: transparent;}') + gdl = QGridLayout(scr_ar_wid) + for i, bpm in enumerate(sorted(self.bpm_dict.keys())): + widb = BPMSummary(scr_ar_wid, prefix=self.prefix, bpm=bpm) + gdl.addWidget(widb, i // self.ncols, i % self.ncols) + self.bpm_dict[bpm] = widb + + vbl.addWidget(scarea) + scarea.setWidget(scr_ar_wid) + self.scarea = scarea
+ + + @Slot(str) + def _filter_bpms(self, text): + """Filter power supply widgets based on text inserted at line edit.""" + try: + pattern = re.compile(text, re.I) + except Exception: # Ignore malformed patterns? + pattern = re.compile("malformed") + + for bpm, wid in self.bpm_dict.items(): + wid.setVisible(bool(pattern.search(bpm))) + # Sroll to top + self.scarea.verticalScrollBar().setValue(0)
+ + + +
+[docs] +class AcqDataSummary(BaseWidget): + + def __init__(self, parent=None, prefix='', bpm_list=[], mode='pos'): + super().__init__( + parent=parent, prefix=prefix, bpm='', data_prefix='GEN') + self.bpm_dict = {bpm: '' for bpm in bpm_list} + self.mode = mode.lower() + self._name = bpm_list[0][:2] + 'App' + self.setObjectName(self._name) + self.setStyleSheet('#'+self._name+'{min-width:65em;min-height:38em;}') + self.setupui() + +
+[docs] + def setupui(self): + vbl = QVBoxLayout(self) + lab = QLabel('<h2>BPMs List</h2>', alignment=Qt.AlignCenter) + vbl.addWidget(lab) + vbl.addSpacing(20) + + hbl = QHBoxLayout() + search = QLineEdit(parent=self) + search.setPlaceholderText("Search for BPMs...") + search.textEdited.connect(self._filter_bpms) + hbl.addWidget(search) + hbl.addStretch() + self.btnautorange = QPushButton('Auto Range graphics', self) + hbl.addWidget(self.btnautorange) + vbl.addItem(hbl) + + sa_class = get_custom_widget_class(QScrollArea) + scarea = sa_class(self) + scarea.setSizeAdjustPolicy(scarea.AdjustToContents) + scarea.setWidgetResizable(True) + + wid = QWidget() + wid.setObjectName('scrollarea') + wid.setStyleSheet('#scrollarea {background-color: transparent;}') + gdl = QGridLayout(wid) + gdl.setSpacing(15) + for i, bpm in enumerate(sorted(self.bpm_dict.keys())): + widb = QWidget(wid) + vbl2 = QVBoxLayout(widb) + vbl2.addWidget(QLabel( + '<h3>'+bpm+'</h3>', alignment=Qt.AlignCenter)) + wbpm = self.create_graph(widb, bpm=bpm, typ=self.mode) + vbl2.addWidget(wbpm) + gdl.addWidget(widb, i // 3, i % 3) + self.bpm_dict[bpm] = widb + self.gdl = gdl + vbl.addWidget(scarea) + scarea.setWidget(wid) + self.scarea = scarea
+ + +
+[docs] + def create_graph(self, wid, bpm, typ='pos'): + text, unit, names, colors = self._get_properties(typ) + if typ.startswith('pos'): + unit = unit[1:] + + graph = GraphWave( + wid, prefix=self.prefix, bpm=bpm, + data_prefix=self.data_prefix) + graph.maxRedrawRate = 2.1 + graph.graph.plotItem.vb.autoRange() + self.btnautorange.clicked.connect(graph.graph.plotItem.vb.autoRange) + graph.setObjectName('MultiTurnDataGraph') + graph.setLabel('left', text=text, units=unit) + for name, cor in zip(names, colors): + opts = dict( + y_channel=name+'Data', + name=name, + color=cor, + lineStyle=1, + lineWidth=1) # NOTE: If > 1: very low performance + opts['y_channel'] = graph.get_pvname(opts['y_channel']) + if typ.startswith('pos'): + graph.addChannel(add_scale=1e-9, **opts) + else: + graph.addChannel(**opts) + graph.setObjectName('graph') + graph.setStyleSheet('#graph{min-width: 18em; min-height: 12em;}') + return graph
+ + + def _get_properties(self, typ): + if typ.startswith('pos'): + text = 'Positions' + unit = 'nm' + names = ('PosX', 'PosY', 'PosQ', 'Sum') + colors = ('blue', 'red', 'green', 'black') + else: + text = 'Antennas' + unit = 'count' + names = ('AmplA', 'AmplB', 'AmplC', 'AmplD') + colors = ('blue', 'red', 'green', 'magenta') + return text, unit, names, colors + + @Slot(str) + def _filter_bpms(self, text): + """Filter power supply widgets based on text inserted at line edit.""" + try: + pattern = re.compile(text, re.I) + except Exception: + return + + for i in range(self.gdl.rowCount()): + for j in range(self.gdl.columnCount()): + self.gdl.removeItem(self.gdl.itemAtPosition(i, j)) + wids = [] + for bpm, wid in self.bpm_dict.items(): + mat = bool(pattern.search(bpm)) + wid.setVisible(mat) + if mat: + wids.append(wid) + + for i, wid in enumerate(wids): + self.gdl.addWidget(wid, i // 3, i % 3) + # Sroll to top + self.scarea.verticalScrollBar().setValue(0)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_bpms/main.html b/_modules/siriushla/as_di_bpms/main.html new file mode 100644 index 000000000..93f0509bb --- /dev/null +++ b/_modules/siriushla/as_di_bpms/main.html @@ -0,0 +1,271 @@ + + + + + + siriushla.as_di_bpms.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_di_bpms.main

+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QHBoxLayout, QVBoxLayout, QPushButton, QLabel
+from siriushla import util
+from siriushla.widgets import PyDMLedMultiChannel
+from siriushla.widgets.windows import create_window_from_widget
+from siriushla.as_di_bpms.base import BaseWidget, CustomGroupBox
+from siriushla.as_di_bpms.settings import ParamsSettings
+from siriushla.as_di_bpms.monit import MonitData
+from siriushla.as_di_bpms.trig_acq_config import BPMGENAcquisition, \
+    BPMPMAcquisition, PBPMGENAcquisition, PBPMPMAcquisition
+from siriushla.si_ap_orbintlk import BPMOrbIntlkDetailWindow
+
+
+
+[docs] +class BPMMain(BaseWidget): + + def __init__(self, parent=None, prefix='', bpm=''): + super().__init__(parent=parent, prefix=prefix, bpm=bpm) + self.setupui() + +
+[docs] + def setupui(self): + self.layoutv = QVBoxLayout(self) + lab = QLabel('<h2>'+self.bpm+'</h2>', self, alignment=Qt.AlignCenter) + self.layoutv.addWidget(lab) + self.layoutv.addSpacing(30) + + grpbx = CustomGroupBox('BPM General Status', self) + hbl = QHBoxLayout(grpbx) + hbl.addSpacing(10) + hbl.addStretch() + if not self.is_pbpm: + chan2vals = {'RFFEasyn.CNCT': 1, 'ADCAD9510PllStatus-Mon': 1} + chan2vals = {self.get_pvname(k): v for k, v in chan2vals.items()} + led = PyDMLedMultiChannel(self, channels2values=chan2vals) + hbl.addWidget(led) + hbl.addSpacing(10) + hbl.addStretch() + pbt = QPushButton('Open Settings') + Window = create_window_from_widget( + ParamsSettings, title=self.bpm+': Settings') + util.connect_window( + pbt, Window, parent=grpbx, prefix=self.prefix, bpm=self.bpm) + hbl.addWidget(pbt) + hbl.addSpacing(10) + hbl.addStretch() + self.layoutv.addWidget(grpbx) + self.layoutv.addSpacing(20) + self.layoutv.addStretch() + + grpbx = CustomGroupBox('Triggered Acquisitions', self) + hbl = QHBoxLayout(grpbx) + hbl.addSpacing(10) + hbl.addStretch() + pbt = QPushButton('General') + Window = PBPMGENAcquisition if self.is_pbpm else BPMGENAcquisition + util.connect_window( + pbt, Window, parent=grpbx, prefix=self.prefix, bpm=self.bpm) + hbl.addWidget(pbt) + hbl.addSpacing(10) + hbl.addStretch() + pbt = QPushButton('PostMortem') + Window = PBPMPMAcquisition if self.is_pbpm else BPMPMAcquisition + util.connect_window( + pbt, Window, parent=grpbx, prefix=self.prefix, bpm=self.bpm) + hbl.addWidget(pbt) + hbl.addSpacing(10) + hbl.addStretch() + self.layoutv.addWidget(grpbx) + self.layoutv.addSpacing(20) + self.layoutv.addStretch() + + grpbx = self._create_formlayout_groupbox('Monitoring', ( + ('PosX-Mon', 'Position X'), + ('PosY-Mon', 'Position Y'), + ('PosQ-Mon', 'Position Q'), + ('Sum-Mon', 'Sum'))) + hbl = QHBoxLayout() + hbl.addStretch() + pbt = QPushButton('Open Graphics', grpbx) + hbl.addWidget(pbt) + hbl.addStretch() + Window = create_window_from_widget( + MonitData, title=self.bpm+': Monit Data') + util.connect_window( + pbt, Window, parent=grpbx, prefix=self.prefix, bpm=self.bpm) + grpbx.layoutf.addRow(hbl) + grpbx.layoutf.setSpacing(10) + self.layoutv.addWidget(grpbx) + self.layoutv.addSpacing(20) + self.layoutv.addStretch() + + if self.bpm.sec not in ['TB', 'BO', 'TS']: + grpbx = CustomGroupBox('Orbit Interlock', self) + hbl = QHBoxLayout(grpbx) + pbt = QPushButton('Open Interlock Settings', grpbx) + util.connect_window( + pbt, BPMOrbIntlkDetailWindow, parent=grpbx, + prefix=self.prefix, device=self.bpm) + hbl.addStretch() + hbl.addWidget(pbt) + hbl.addStretch() + self.layoutv.addWidget(grpbx) + self.layoutv.addSpacing(20) + self.layoutv.addStretch()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_bpms/monit.html b/_modules/siriushla/as_di_bpms/monit.html new file mode 100644 index 000000000..ae1df6431 --- /dev/null +++ b/_modules/siriushla/as_di_bpms/monit.html @@ -0,0 +1,216 @@ + + + + + + siriushla.as_di_bpms.monit — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_di_bpms.monit

+from qtpy.QtWidgets import QVBoxLayout
+from siriushla.as_di_bpms.base import BaseWidget, GraphTime
+
+
+
+[docs] +class MonitData(BaseWidget): + + def __init__(self, parent=None, prefix='', bpm=''): + super().__init__(parent, prefix=prefix, bpm=bpm) + self.setupui() + +
+[docs] + def setupui(self): + vbl = QVBoxLayout(self) + + graph = GraphTime(parent=self, prefix=self.prefix, bpm=self.bpm) + vbl.addWidget(graph) + graph.setLabel('left', text='Positions', units='m') + + dt = ( + ('PosX-Mon', 'blue'), + ('PosY-Mon', 'red'), + ('PosQ-Mon', 'green'), + ('Sum-Mon', 'black')) + for name, cor in dt: + opts = dict( + y_channel=self.get_pvname(name), + name=name[:-4], + color=cor, + lineStyle=1, + lineWidth=1) # NOTE: If > 1: very low performance + graph.addYChannel(add_scale=1e-9, **opts) + + graph = GraphTime(parent=self, prefix=self.prefix, bpm=self.bpm) + vbl.addWidget(graph) + graph.setLabel('left', text='Antennas', units='au') + + dt = ( + ('AmplA-Mon', 'blue'), + ('AmplB-Mon', 'red'), + ('AmplC-Mon', 'green'), + ('AmplD-Mon', 'magenta')) + for name, cor in dt: + opts = dict( + y_channel=self.get_pvname(name, False), + name=name[:-4], + color=cor, + lineStyle=1, + lineWidth=1) # NOTE: If > 1: very low performance + graph.addYChannel(**opts)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_bpms/settings.html b/_modules/siriushla/as_di_bpms/settings.html new file mode 100644 index 000000000..03f6c8944 --- /dev/null +++ b/_modules/siriushla/as_di_bpms/settings.html @@ -0,0 +1,696 @@ + + + + + + siriushla.as_di_bpms.settings — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_di_bpms.settings

+"""BPM Settings."""
+
+from qtpy.QtWidgets import QHBoxLayout, QVBoxLayout, QGridLayout, \
+    QLabel, QPushButton, QGroupBox, QWidget, QScrollArea
+from qtpy.QtCore import Qt
+
+from siriuspy.diagbeam.bpm.csdev import Const as _csbpm
+
+from siriushla import util
+from siriushla.widgets import PyDMStateButton, SiriusLedState, \
+    SiriusLedAlert, SiriusWaveformLineEdit, SiriusLabel
+from siriushla.widgets.windows import create_window_from_widget
+from siriushla.as_di_bpms.base import BaseWidget, CustomGroupBox
+from siriushla.common.afc_acq_core import PhysicalTriggers, LogicalTriggers
+
+
+
+[docs] +class ParamsSettings(BaseWidget): + + def __init__(self, parent=None, prefix='', bpm=''): + super().__init__(parent=parent, prefix=prefix, bpm=bpm) + self.setupui() + +
+[docs] + def setupui(self): + vbl = QVBoxLayout(self) + lab = QLabel('<h2>' + self.bpm + ' Settings</h2>') + lab.setAlignment(Qt.AlignCenter) + vbl.addWidget(lab) + vbl.addSpacing(10) + + hbl = QHBoxLayout() + hbl.setSpacing(15) + hbl.addStretch() + if not self.is_pbpm: + grpbx = CustomGroupBox('Status', self) + gdl = QGridLayout(grpbx) + props = ( + ('RFFEasyn.CNCT', 'RFFE Connected'), + ('ADCAD9510PllStatus-Mon', 'ADC Clock Synched')) + for i, prop in enumerate(props): + led = SiriusLedState(grpbx, init_channel=self.get_pvname(prop[0])) + led.setOffColor(led.Red) + lab = QLabel(prop[1], grpbx) + gdl.addWidget(led, i, 0) + gdl.addWidget(lab, i, 1) + hbl.addWidget(grpbx) + hbl.addStretch() + + grpbx = CustomGroupBox('Advanced Settings', self) + vbl2 = QVBoxLayout(grpbx) + vbl2.setSpacing(10) + pbt = QPushButton(self.bpm.dev) + Window = create_window_from_widget( + BPMAdvancedSettings, title=self.bpm+' Advanced Settings') + util.connect_window( + pbt, Window, parent=grpbx, prefix=self.prefix, bpm=self.bpm) + vbl2.addWidget(pbt) + if not self.is_pbpm: + pbt = QPushButton('RFFE') + Window = create_window_from_widget( + RFFEAdvancedSettings, title=self.bpm+':RFFE Advanced Settings') + util.connect_window( + pbt, Window, parent=grpbx, prefix=self.prefix, bpm=self.bpm) + vbl2.addWidget(pbt) + pbt = QPushButton('Hardware') + Window = create_window_from_widget( + PBPMHardwareSettings if self.is_pbpm else BPMHardwareSettings, + title=self.bpm+': Hardware Settings') + util.connect_window( + pbt, Window, parent=grpbx, prefix=self.prefix, bpm=self.bpm) + vbl2.addWidget(pbt) + hbl.addWidget(grpbx) + hbl.addStretch() + vbl.addItem(hbl) + vbl.addSpacing(20) + vbl.addStretch() + + grpbx = self._create_formlayout_groupbox('Offset Parameters', ( + ('PosQOffset-SP', 'Offset PosQ', ['lineedit', 'label']), + ('PosXOffset-SP', 'Offset PosX', ['lineedit', 'label']), + ('PosYOffset-SP', 'Offset PosY', ['lineedit', 'label']))) + vbl.addWidget(grpbx) + vbl.addSpacing(20) + vbl.addStretch() + grpbx = self._create_formlayout_groupbox('Gain Parameters', ( + ('PosKq-SP', 'Gain PosQ', ['lineedit', 'label']), + ('PosKsum-SP', 'Gain Sum', ['lineedit', 'label']), + ('PosKx-SP', 'Gain PosX', ['lineedit', 'label']), + ('PosKy-SP', 'Gain PosY', ['lineedit', 'label']))) + vbl.addWidget(grpbx) + vbl.addSpacing(20) + vbl.addStretch() + if not self.is_pbpm: + grpbx = self._create_formlayout_groupbox('Informations', ( + ('INFOHarmonicNumber-RB', 'Harmonic Number'), + ('INFOMONITRate-RB', 'Monitor Rate'), + ('INFOFAcqRate-RB', 'FAcq Rate'), + ('INFOFOFBRate-RB', 'FOFB Rate'), + ('INFOTbTRate-RB', 'TbT Rate')), + ) + vbl.addWidget(grpbx) + vbl.addSpacing(20) + vbl.addStretch() + title = ('' if self.is_pbpm else 'RFFE and ') + 'Switching Settings' + formlist = (('SwMode-Sel', 'Switching Mode'), ) + if not self.is_pbpm: + formlist += (('RFFEAtt-SP', 'RFFE Attenuation'), ) + grpbx = self._create_formlayout_groupbox(title, formlist) + vbl.addWidget(grpbx) + vbl.addSpacing(20) + vbl.addStretch()
+
+ + + +
+[docs] +class BPMAdvancedSettings(BaseWidget): + + def __init__(self, parent=None, prefix='', bpm=''): + super().__init__(parent=parent, prefix=prefix, bpm=bpm) + self.setupui() + +
+[docs] + @staticmethod + def get_acqrate_props(rate): + items = list() + if rate == 'Monit': + items.append(('MONITUpdtTime-SP', 'Update Time', False)) + if rate != 'FOFB': + items.append(( + f'{rate}PhaseSyncDly-SP', 'Delay', + {'isdata': False, 'widgets': ['lineedit', 'label']} + )) + items.extend([ + (f'{rate}PhaseSyncEn-Sel', 'Sync Enable', + {'isdata': False, 'widgets': ['statebutton', 'ledstate']}), + ((f'{rate}PhaseDesyncCnt-Mon', f'{rate}PhaseDesyncCntRst-Cmd'), + 'Desync. Count', + { + 'isdata': False, + 'widgets': ['label', ('pushbutton', 'Reset Count', None, 1, 0)] + }), + (f'{rate}DataMaskEn-Sel', 'Data Mask Enable', + {'isdata': False, 'widgets': ['statebutton', 'ledstate']}), + ]) + if rate == 'FOFB': + items.extend([ + (f'{rate}DataMaskSamples-SP', 'Data Mask Samples', + {'isdata': False, 'widgets': ['lineedit', 'label']}), + ]) + else: + items.extend([ + (f'{rate}DataMaskSamplesBeg-SP', 'Data Mask Samples Begin', + {'isdata': False, 'widgets': ['lineedit', 'label']}), + (f'{rate}DataMaskSamplesEnd-SP', 'Data Mask Samples End', + {'isdata': False, 'widgets': ['lineedit', 'label']}), + ]) + return items
+ + +
+[docs] + def setupui(self): + gdl = QGridLayout(self) + lab = QLabel('<h2>' + self.bpm + ' Advanced Settings</h2>') + lab.setAlignment(Qt.AlignCenter) + gdl.addWidget(lab, 0, 0, 1, 4) + + conflist = ( + ('SwMode-Sel', 'Mode'), + ('SwPhaseSyncEn-Sel', 'Sync Enable', ['statebutton', 'ledstate']), + ('SwDeswapDly-SP', 'Delay', ['lineedit', 'label']), + ('SwDivClk-SP', 'Division Clock', ['lineedit', 'label']), + ('', '', ()), + ('', '<h4>Antenna Gains</h4>', ()), + ('SwDirGainA-SP', 'Direct Gain A', 12), + ('SwDirGainB-SP', 'Direct Gain B', 12), + ('SwDirGainC-SP', 'Direct Gain C', 12), + ('SwDirGainD-SP', 'Direct Gain D', 12), + ('SwInvGainA-SP', 'Inverse Gain A', 12), + ('SwInvGainB-SP', 'Inverse Gain B', 12), + ('SwInvGainC-SP', 'Inverse Gain C', 12), + ('SwInvGainD-SP', 'Inverse Gain D', 12), + ) + if self.is_pbpm: + conflist += ( + ('', '', ()), + ('', '<h4>Antenna Offsets</h4>', ()), + ('SwDirOffsetA-SP', 'Direct Offset A'), + ('SwDirOffsetB-SP', 'Direct Offset B'), + ('SwDirOffsetC-SP', 'Direct Offset C'), + ('SwDirOffsetD-SP', 'Direct Offset D'), + ('SwInvOffsetA-SP', 'Inverse Offset A'), + ('SwInvOffsetB-SP', 'Inverse Offset B'), + ('SwInvOffsetC-SP', 'Inverse Offset C'), + ('SwInvOffsetD-SP', 'Inverse Offset D'), + ) + + grpbx = self._create_formlayout_groupbox('Switching', conflist) + + if self.is_pbpm: + gdl.addWidget(grpbx, 1, 0, 4, 2) + rate2pos = { + 'Monit': (1, 2, 1, 2), + 'FAcq': (2, 2, 1, 2), + 'FOFB': (3, 2, 1, 2), + 'TbT': (4, 2, 1, 2), + } + else: + gdl.addWidget(grpbx, 1, 0, 2, 2) + rate2pos = { + 'Monit': (3, 0, 1, 2), + 'FAcq': (1, 2, 1, 2), + 'FOFB': (2, 2, 1, 2), + 'TbT': (3, 2, 1, 2), + } + + for rate, pos in rate2pos.items(): + items = self.get_acqrate_props(rate) + grpbx = self._create_formlayout_groupbox(rate, items) + gdl.addWidget(grpbx, *pos) + + hrow = QHBoxLayout() + hrow.setContentsMargins(0, 0, 0, 0) + + grpbx = TriggersLauncherWidget( + self, prefix=self.prefix, bpm=self.bpm, acqcores=['GEN', 'PM']) + hrow.addWidget(grpbx) + + if not self.is_pbpm: + grpbx = CustomGroupBox('ACQ Polynomials', self) + hbl = QHBoxLayout(grpbx) + hbl.setSpacing(10) + hbl.addStretch() + pbt = QPushButton('Settings') + Window = create_window_from_widget( + PolySettings, title=self.bpm+': ACQ Polynomials' + ) + util.connect_window( + pbt, Window, parent=self, prefix=self.prefix, bpm=self.bpm + ) + hbl.addWidget(pbt) + hbl.addStretch() + hrow.addWidget(grpbx) + + gdl.addLayout(hrow, 5, 0, 1, 4) + + gdl.setColumnStretch(0, 1) + gdl.setColumnStretch(1, 1) + gdl.setColumnStretch(2, 1) + gdl.setColumnStretch(3, 1)
+
+ + + +
+[docs] +class TriggersLauncherWidget(BaseWidget): + + def __init__( + self, parent=None, prefix='', bpm='', acqcores=['ACQ', 'PM']): + super().__init__(parent=parent, prefix=prefix, bpm=bpm) + self.acqcores = acqcores + self.setupui() + +
+[docs] + def setupui(self): + grpbx = CustomGroupBox('Triggers Configuration', self) + hbl = QHBoxLayout(grpbx) + hbl.setSpacing(10) + hbl.addStretch() + pbt = QPushButton('Physical Triggers') + wind = create_window_from_widget( + PhysicalTriggers, title=self.bpm+': Physical Triggers') + util.connect_window( + pbt, wind, parent=self, prefix=self.prefix, device=self.bpm) + hbl.addWidget(pbt) + hbl.addStretch() + if 'GEN' in self.acqcores: + pbt = QPushButton('General Logical Triggers') + wind = create_window_from_widget( + LogicalTriggers, title=self.bpm+': General Logical Triggers') + util.connect_window( + pbt, wind, parent=self, prefix=self.prefix, device=self.bpm, + names=_csbpm.LogTrigIntern._fields, trig_tp='_GEN') + hbl.addWidget(pbt) + hbl.addStretch() + if 'PM' in self.acqcores: + pbt = QPushButton('Post-Mortem Logical Triggers') + wind = create_window_from_widget( + LogicalTriggers, + title=self.bpm+': Post-Mortem Logical Triggers') + util.connect_window( + pbt, wind, parent=self, prefix=self.prefix, device=self.bpm, + trig_tp='_PM') + hbl.addWidget(pbt) + hbl.addStretch() + + gdl = QGridLayout(self) + gdl.setContentsMargins(0, 9, 0, 0) + gdl.addWidget(grpbx)
+
+ + + +
+[docs] +class PolySettings(BaseWidget): + + def __init__(self, parent=None, prefix='', bpm=''): + super().__init__(parent=parent, prefix=prefix, bpm=bpm) + self.setupui() + +
+[docs] + def setupui(self): + wid = QWidget(self) + wid.setObjectName('wid') + wid.setStyleSheet('#wid{background-color: transparent;}') + gdl = QGridLayout(wid) + + lab = QLabel('<h2>' + self.bpm + ' ACQ Polynomials</h2>') + lab.setAlignment(Qt.AlignCenter) + gdl.addWidget(lab, 0, 0) + + for idx, coeff in enumerate(['X', 'Y', 'Q', 'SUM']): + grpbx = self._create_coeff_group(coeff) + gdl.addWidget(grpbx, idx+1, 0) + + sc_area = QScrollArea() + sc_area.setStyleSheet('QScrollArea{min-width: 30em;}') + sc_area.setWidgetResizable(True) + sc_area.setWidget(wid) + + lay = QHBoxLayout(self) + lay.addWidget(sc_area)
+ + + def _create_coeff_group(self, coeff): + enblctl = 'XY' if coeff in ['X', 'Y'] else coeff.capitalize() + + ldc_enbl = QLabel('Enable: ', self) + but_enbl = PyDMStateButton( + self, self.get_pvname(f'{enblctl}PosCal-Sel')) + led_enbl = SiriusLedState( + self, self.get_pvname(f'{enblctl}PosCal-Sts')) + + ldc_gen = QLabel('GEN: ', self) + but_gen = SiriusWaveformLineEdit( + self, self.get_pvname(f'GEN_Poly{coeff}ArrayCoeff-SP')) + lbl_gen = SiriusLabel( + self, self.get_pvname(f'GEN_Poly{coeff}ArrayCoeff-RB')) + + ldc_generr = QLabel('Check Error: ', self) + led_generr = SiriusLedAlert( + self, self.get_pvname(f'GEN_Poly{enblctl}ASubCalc.SEVR')) + + ldc_pm = QLabel('PM: ', self) + but_pm = SiriusWaveformLineEdit( + self, self.get_pvname(f'PM_Poly{coeff}ArrayCoeff-SP')) + lbl_pm = SiriusLabel( + self, self.get_pvname(f'PM_Poly{coeff}ArrayCoeff-RB')) + + ldc_pmerr = QLabel('Check Error: ', self) + led_pmerr = SiriusLedAlert( + self, self.get_pvname(f'PM_Poly{enblctl}ASubCalc.SEVR')) + + grpbx = QGroupBox(coeff + ' Coeff.', self) + lay = QGridLayout(grpbx) + lay.addWidget(ldc_enbl, 0, 0) + lay.addWidget(but_enbl, 0, 1) + lay.addWidget(led_enbl, 0, 2) + lay.addWidget(ldc_gen, 1, 0) + lay.addWidget(ldc_generr, 1, 6) + lay.addWidget(led_generr, 1, 7) + lay.addWidget(but_gen, 2, 0, 1, 8) + lay.addWidget(lbl_gen, 3, 0, 1, 8) + lay.addWidget(ldc_pm, 4, 0) + lay.addWidget(ldc_pmerr, 4, 6) + lay.addWidget(led_pmerr, 4, 7) + lay.addWidget(but_pm, 5, 0, 1, 8) + lay.addWidget(lbl_pm, 6, 0, 1, 8) + return grpbx
+ + + +
+[docs] +class RFFEAdvancedSettings(BaseWidget): + + def __init__(self, parent=None, prefix='', bpm=''): + super().__init__(parent=parent, prefix=prefix, bpm=bpm) + self.setupui() + +
+[docs] + def setupui(self): + gdl = QGridLayout(self) + lab = QLabel('<h2>' + self.bpm + ':RFFE Advanced Settings</h2>') + lab.setAlignment(Qt.AlignCenter) + gdl.addWidget(lab, 0, 0, 1, 2) + + grpbx = self._create_formlayout_groupbox('General', ( + ('RFFEAtt-SP', 'Attenuation'), + ('RFFETempCtl-SP', 'Temp. Control', ['statebutton', 'ledstate']), + )) + gdl.addWidget(grpbx, 1, 0, 1, 2) + + for i, pair in enumerate(['AC', 'BD']): + grpbx = self._create_formlayout_groupbox(pair, ( + (f'RFFETemp{pair}-Mon', 'Temperature'), + (f'RFFEPidSp{pair}-SP', 'PID Setpoint', + ['lineedit', 'label']), + (f'RFFEHeater{pair}-SP', 'Heater'), + (f'RFFEPid{pair}Kp-SP', 'PID Kp'), + (f'RFFEPid{pair}Ti-SP', 'PID Ti'), + (f'RFFEPid{pair}Td-SP', 'PID Td'), + )) + gdl.addWidget(grpbx, 2, i)
+
+ + + +
+[docs] +class BPMHardwareSettings(BaseWidget): + + def __init__(self, parent=None, prefix='', bpm=''): + super().__init__(parent=parent, prefix=prefix, bpm=bpm) + self.setupui() + +
+[docs] + def setupui(self): + lay = QGridLayout(self) + + lab = QLabel( + '<h2>'+self.bpm+' FMC250 Settings</h2>', self, + alignment=Qt.AlignCenter) + lay.addWidget(lab, 0, 0, 1, 2) + + vlay0 = QVBoxLayout() + vlay0.setContentsMargins(0, 0, 0, 0) + vlay0.addWidget(self._setupADCCommonWidget()) + vlay0.addWidget(self._setupActiveClockWidget()) + vlay0.addWidget(self._setupAD9510PLLWidget()) + + vlay1 = QVBoxLayout() + vlay1.setContentsMargins(0, 0, 0, 0) + vlay1.addWidget(self._setupADCsWidget()) + + lay.addLayout(vlay0, 1, 0) + lay.addLayout(vlay1, 1, 1)
+ + + def _setupADCCommonWidget(self): + return self._create_formlayout_groupbox('ADC Common', ( + ('ADCTrigDir-Sel', 'Trigger Direction'), + ('ADCTrigTerm-Sel', 'Trigger Termination'), + ('ADCTestDataEn-Sel', 'Enable test data', + ['statebutton', 'ledstate']), + )) + + def _setupAD9510PLLWidget(self): + return self._create_formlayout_groupbox('AD9510 PLL', ( + ('ADCAD9510PllStatus-Mon', 'PLL Status', + [('ledstate', SiriusLedState.Red, SiriusLedState.LightGreen)]), + ('ADCAD9510Defaults-Sel', 'Reset', + [('pushbutton', 'Reset', None, 1, 0)]), + ('ADCAD9510ADiv-SP', 'A divider', ['lineedit', 'label']), + ('ADCAD9510BDiv-SP', 'B divider', ['lineedit', 'label']), + ('ADCAD9510RDiv-SP', 'R divider', ['lineedit', 'label']), + )) + + def _setupActiveClockWidget(self): + return self._create_formlayout_groupbox('Active Clock', ( + ('INFOClkFreq-SP', 'Clock Frequency [Hz]', ['lineedit', 'label']), + ('ADCSi57xOe-Sel', 'Osc. output enable', + ['statebutton', 'ledstate']), + ('ADCSi57xFreq-SP', 'Osc. Frequency [Hz]', ['lineedit', 'label']), + ('ADCClkSel-Sel', 'Reference Clock'), + )) + + def _setupADCsWidget(self): + proplist = ( + ('ActiveClkRstAdcs-Sel', 'Reset', + [('pushbutton', 'Reset', None, 1, 0)]), + ) + for chan in range(4): + proplist += ( + ('', '', ()), + ('', f'<h4>Channel {chan}</h4>', ()), + (f'ADC{chan}Temp-Mon', 'Temp. code'), + (f'ADC{chan}TestMode-SP', 'Test mode', ['lineedit', ]), + (f'ADC{chan}RstModes-Sel', 'Reset Mode', ['combo']), + (f'ADC{chan}CalStatus-Mon', 'Calibration Done', ['ledstate']), + ) + return self._create_formlayout_groupbox('ADCs', proplist)
+ + + +
+[docs] +class PBPMHardwareSettings(BaseWidget): + + def __init__(self, parent=None, prefix='', bpm=''): + super().__init__(parent=parent, prefix=prefix, bpm=bpm) + self.setupui() + +
+[docs] + def setupui(self): + lay = QGridLayout(self) + + lab = QLabel( + '<h2>'+self.bpm+' Hardware Settings</h2>', self, + alignment=Qt.AlignCenter) + lay.addWidget(lab, 0, 0, 1, 2) + + lay.addWidget(self._setupFMCPICOWidget(), 1, 0)
+ + + def _setupFMCPICOWidget(self): + return self._create_formlayout_groupbox( + 'FMCPICO', + ((f'FMCPICORngR{i}-Sel', f'RNG R{i}') for i in range(4)) + )
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_bpms/trig_acq_config.html b/_modules/siriushla/as_di_bpms/trig_acq_config.html new file mode 100644 index 000000000..9d23fff1a --- /dev/null +++ b/_modules/siriushla/as_di_bpms/trig_acq_config.html @@ -0,0 +1,361 @@ + + + + + + siriushla.as_di_bpms.trig_acq_config — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_di_bpms.trig_acq_config

+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QVBoxLayout, QWidget, \
+    QLabel, QGridLayout, QSizePolicy as QSzPlcy, QTabWidget
+from siriushla.as_di_bpms.base import BaseWidget
+from siriushla.as_di_bpms.settings import BPMAdvancedSettings
+from siriushla.common.afc_acq_core.trig_acq_config import AcqBaseWindow
+
+
+
+[docs] +class BPMBaseTriggeredAcquisition(AcqBaseWindow, BaseWidget): + """BPM Base Triggered Acquisition window.""" + + def __init__(self, parent=None, prefix='', bpm=''): + AcqBaseWindow.__init__(self, parent=parent, prefix=prefix, device=bpm) + BaseWidget.__init__( + self, parent=parent, prefix=prefix, bpm=bpm, + data_prefix=self.ACQCORE, + ) + self._setupUi() + + def _setupUi(self): + self.title = QLabel( + '<h2>'+self.device.substitute(propty_name=self.ACQCORE) + + ' Acquisitions </h2>', alignment=Qt.AlignCenter) + self.title.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + + self.wid_basic = self._basicSettingsWidget() + self.wid_trig = self._triggersWidget() + self.wid_graph = self._graphsWidget() + self.wid_advcd = self._advancedSettingsWidget() + + wid = QWidget() + lay = QGridLayout(wid) + lay.addWidget(self.title, 0, 0, 1, 2) + lay.addWidget(self.wid_graph, 1, 0, 3, 1) + lay.addWidget(self.wid_basic, 1, 1) + lay.addWidget(self.wid_advcd, 2, 1) + lay.addWidget(self.wid_trig, 3, 1) + lay.setColumnStretch(0, 4) + lay.setColumnStretch(1, 1) + self.setCentralWidget(wid) + + def _graphsWidget(self): + # Antennas + gp_ant = self._create_graph( + 'Antennas', + { + f'{self.device}:{self.ACQCORE}Ampl{ant}Data': f'Ant {ant}' + for ant in ('A', 'B', 'C', 'D') + }, + colors=('blue', 'red', 'green', 'magenta'), + ) + # Positions + gp_pos = self._create_graph( + 'Positions', + { + f'{self.device}:{self.ACQCORE}{data}Data': f'{data}' + for data in ('PosX', 'PosY', 'PosQ', 'Sum') + }, + colors=('blue', 'red', 'green', 'black'), + ) + + wid = QTabWidget(self) + wid.setObjectName(self.sec+'Tab') + wid.setStyleSheet(""" + #{}Tab::pane {{ + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }}""".format(self.sec)) + wid.addTab(gp_ant, 'Antennas') + wid.addTab(gp_pos, 'Positions') + return wid + + def _advancedSettingsWidget(self): + tabwid = QTabWidget(self) + tabwid.setObjectName(self.sec+'Tab') + tabwid.setStyleSheet(""" + #{}Tab::pane {{ + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }}""".format(self.sec)) + + # rates settings + wid_ratesconf = QTabWidget(self) + for rate in ['FOFB', 'TbT', 'FAcq']: + items = BPMAdvancedSettings.get_acqrate_props(rate) + grpbx = self._create_formlayout_groupbox('', items) + wid_ratesconf.addTab(grpbx, rate) + tabwid.addTab(wid_ratesconf, 'Acq.Rate Config.') + + # data triggered settings + wid_datatrig = self._create_formlayout_groupbox( + '', ( + ('DataTrigChan-Sel', 'Type of Rate as Trigger'), + ('TriggerDataSel-SP', 'Channel'), + ('TriggerDataPol-Sel', 'Slope'), + ('TriggerDataThres-SP', 'Threshold'), + ('TriggerDataHyst-SP', 'Hysteresis') + )) + tabwid.addTab(wid_datatrig, 'Auto Trig. Config.') + + return tabwid + + def _ratesConfigWidget(self): + tabwid = QTabWidget(self) + for rate in ['FOFB', 'TbT', 'FAcq']: + items = BPMAdvancedSettings.get_acqrate_props(rate) + grpbx = self._create_formlayout_groupbox('', items) + tabwid.addTab(grpbx, rate) + return tabwid
+ + + +
+[docs] +class BPMGENAcquisition(BPMBaseTriggeredAcquisition): + """BPM General Triggered Acquisition window""" + + ACQCORE = 'GEN'
+ + + +
+[docs] +class BPMPMAcquisition(BPMBaseTriggeredAcquisition): + """BPM Post Mortem Triggered Acquisition window""" + + ACQCORE = 'PM'
+ + + +
+[docs] +class PBPMBaseTriggeredAcquisition(AcqBaseWindow): + """Photon BPM Base Triggered Acquisition window.""" + + def __init__(self, parent=None, prefix='', bpm=''): + super().__init__(parent=parent, prefix=prefix, device=bpm) + self._setupUi() + + def _setupUi(self): + self.title = QLabel( + '<h2>'+self.device.substitute(propty_name=self.ACQCORE) + + ' Acquisitions < /h2 >', alignment=Qt.AlignCenter) + self.title.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + + self.wid_basic = self._basicSettingsWidget() + self.wid_trig = self._triggersWidget() + self.wid_graph = self._graphsWidget() + + wid = QWidget() + lay = QGridLayout(wid) + lay.addWidget(self.title, 0, 0, 1, 2) + lay.addWidget(self.wid_graph, 1, 0, 2, 1) + lay.addWidget(self.wid_basic, 1, 1) + lay.addWidget(self.wid_trig, 2, 1) + lay.setColumnStretch(0, 3) + lay.setColumnStretch(1, 1) + lay.setRowStretch(0, 3) + lay.setRowStretch(1, 1) + self.setCentralWidget(wid) + + def _graphsWidget(self): + # Antennas + gp_ant = self._create_graph( + 'Antennas', + { + f'{self.device}:{self.ACQCORE}Ampl{ant}Data': f'Ant {ant}' + for ant in ('A', 'B', 'C', 'D') + }, + colors=('blue', 'red', 'green', 'magenta'), + ) + + wid = QWidget() + lay = QVBoxLayout(wid) + lay.addWidget(gp_ant) + return wid
+ + + +
+[docs] +class PBPMGENAcquisition(PBPMBaseTriggeredAcquisition): + """PBPM General Triggered Acquisition window""" + + ACQCORE = 'GEN'
+ + + +
+[docs] +class PBPMPMAcquisition(PBPMBaseTriggeredAcquisition): + """PBPM Post Mortem Triggered Acquisition window""" + + ACQCORE = 'PM'
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_dccts/graphics.html b/_modules/siriushla/as_di_dccts/graphics.html new file mode 100644 index 000000000..a6bb38fc0 --- /dev/null +++ b/_modules/siriushla/as_di_dccts/graphics.html @@ -0,0 +1,603 @@ + + + + + + siriushla.as_di_dccts.graphics — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_di_dccts.graphics

+"""DCCT graphics module."""
+
+import numpy as np
+
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QWidget, QLabel, QPushButton, QGridLayout, \
+    QHBoxLayout, QGroupBox, QComboBox, QSizePolicy as QSzPly, \
+    QVBoxLayout, QCheckBox, QMenu
+
+import qtawesome as qta
+
+from siriuspy.namesys import SiriusPVName
+from siriuspy.diagbeam.dcct.csdev import Const as _DCCTc
+from siriuspy.search import LLTimeSearch as _LLTimeSearch
+from siriushla.widgets import SiriusConnectionSignal as SignalChannel, \
+    SiriusTimePlot, QSpinBoxPlus, SiriusWaveformPlot, SiriusLabel
+
+
+
+[docs] +class DCCTMonitor(QWidget): + """DCCT data monitoring.""" + + def __init__(self, parent=None, prefix='', device=''): + """Initialize object.""" + super().__init__(parent) + self.prefix = prefix + self.device = SiriusPVName(device) + self.use_raw = self.device.sec == 'BO' + self.dcct_prefix = self.device.substitute(prefix=prefix) + + self.acqmode_channel = SignalChannel( + self.dcct_prefix.substitute(propty='MeasMode-Sel')) + self.acqmode_channel.new_value_signal[int].connect(self.updateParams) + self.normalnrsamp_channel = SignalChannel( + self.dcct_prefix.substitute(propty='SampleCnt-RB')) + self.normalnrsamp_channel.new_value_signal[int].connect( + self.updateParams) + self.fastnrsamp_channel = SignalChannel( + self.dcct_prefix.substitute(propty='FastSampleCnt-RB')) + self.fastnrsamp_channel.new_value_signal[int].connect( + self.updateParams) + self._acq_mode = None + self._acq_normalnrsamp = None + self._acq_fastnrsamp = None + + self._downsampling = 1 + self._smooth_method = 'Average' + self._smooth_nracq = 1 + self._smooth_buffer = list() + + self._setupUi() + + def _setupUi(self): + self.currhist = self._setupTimeHistory() + self.currhist.setVisible(not self.use_raw) + self.rawreads = self._setupRawReadings() + self.rawreads.setVisible(self.use_raw) + + self.pb_vis = QPushButton(self) + self.pb_vis.setStyleSheet( + 'QPushButton{min-width: 0.8em; max-width: 0.8em;}') + self.menu_vis = QMenu() + self.switch_act = self.menu_vis.addAction( + 'Switch to '+('Time History' if self.use_raw else 'Raw Readings')) + self.switch_act.triggered.connect(self._handle_data_visualization) + self.pb_vis.setMenu(self.menu_vis) + + self.setStyleSheet(""" + .QLabel{max-height:1.5em;} + PyDMWaveformPlot, PyDMTimePlot{min-width:30em; min-height:20em;} + """) + + lay = QGridLayout(self) + lay.setContentsMargins(0, 0, 0, 0) + lay.setHorizontalSpacing(0) + lay.addWidget(self.pb_vis, 0, 0, alignment=Qt.AlignTop | Qt.AlignLeft) + lay.addWidget(self.currhist, 0, 1) + lay.addWidget(self.rawreads, 0, 1) + + def _setupTimeHistory(self): + self.label_currhist = QLabel( + '<h3>Current History</h3>', self, alignment=Qt.AlignCenter) + + self.timegraph = SiriusTimePlot(self) + self.timegraph.timeSpan = 600 + channel = self.dcct_prefix.substitute(propty='Current-Mon') + self.timegraph.addYChannel( + y_channel=channel, name='Current History', color='blue', + lineWidth=1, lineStyle=Qt.SolidLine) + self.timegraph.autoRangeX = True + self.timegraph.autoRangeY = True + self.timegraph.backgroundColor = QColor(255, 255, 255) + self.timegraph.showLegend = False + self.timegraph.showXGrid = True + self.timegraph.showYGrid = True + self.timegraph.setLabel('left', text='Current [mA]') + self.timecurve = self.timegraph.curveAtIndex(0) + + wid = QWidget() + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop) + lay.setRowStretch(0, 1) + lay.setRowStretch(1, 9) + lay.addWidget(self.label_currhist, 0, 0) + lay.addWidget(self.timegraph, 1, 0) + return wid + + def _setupRawReadings(self): + self.label_waveread = QLabel( + '<h3>Current Raw Readings</h3>', self, alignment=Qt.AlignCenter) + + self.wavegraph = SiriusWaveformPlot(self) + channel = 'FAKE:Readings' + self.rawreadings_channel = SignalChannel( + self.dcct_prefix.substitute(propty='RawReadings-Mon')) + self.rawreadings_channel.new_value_signal[np.ndarray].connect( + self._updateRawBuffer) + self.wavegraph.addChannel( + y_channel=channel, name='Current Raw Readings', color='blue', + lineWidth=2, lineStyle=Qt.SolidLine) + self.wavegraph.setLabel('left', text='Current [mA]') + self.wavegraph.setLabel('bottom', text='Index') + self.wavegraph.autoRangeX = True + self.wavegraph.autoRangeY = True + self.wavegraph.backgroundColor = QColor(255, 255, 255) + self.wavegraph.showLegend = False + self.wavegraph.showXGrid = True + self.wavegraph.showYGrid = True + self.wavecurve = self.wavegraph.curveAtIndex(0) + + wid = QWidget() + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop) + lay.setRowStretch(0, 1) + lay.setRowStretch(1, 9) + lay.addWidget(self.label_waveread, 0, 0) + lay.addWidget(self.wavegraph, 1, 0) + + # Smoothing + evgname = SiriusPVName(_LLTimeSearch.get_evg_name()) + self._evnt_dly = SignalChannel(evgname.substitute( + prefix=self.prefix, propty='LinacDelay-RB')) + self._evnt_dly.new_value_signal[float].connect(self.updateRawXAxis) + self._trig_dly = SignalChannel( + self.dcct_prefix.substitute(dis='TI', propty='Delay-RB')) + self._trig_dly.new_value_signal[float].connect(self.updateRawXAxis) + self._smpl_cnt = SignalChannel( + self.dcct_prefix.substitute(propty='FastSampleCnt-RB')) + self._smpl_cnt.new_value_signal[float].connect(self.updateRawXAxis) + self._meas_per = SignalChannel( + self.dcct_prefix.substitute(propty='FastMeasPeriod-RB')) + self._meas_per.new_value_signal[float].connect(self.updateRawXAxis) + + self.cb_timeaxis = QCheckBox('Use time axis', self) + self.cb_timeaxis.setChecked(True) + self.cb_timeaxis.stateChanged.connect(self.updateRawXAxis) + self.cb_timeaxis.setLayoutDirection(Qt.RightToLeft) + lay.addWidget(self.cb_timeaxis, 2, 0, alignment=Qt.AlignLeft) + lay.setRowStretch(2, 1) + + l_smoothmethod = QLabel('Method: ', self) + self.cb_smoothmethod = QComboBox(self) + self.cb_smoothmethod.addItems(['Average', 'Median']) + self.cb_smoothmethod.currentTextChanged.connect( + self.setRawSmoothMethod) + + l_smoothnracq = QLabel('Nr.Acqs.: ', self) + self.sb_smoothnracq = QSpinBoxPlus(self) + self.sb_smoothnracq.setValue(1) + self.sb_smoothnracq.valueChanged.connect( + self.setRawSmoothNrAcq) + + l_smoothbuff = QLabel('Buffer Size: ', self) + l_smoothbuff.setSizePolicy(QSzPly.Minimum, QSzPly.Preferred) + self.label_buffsize = QLabel('', self) + self.label_buffsize.setStyleSheet( + 'min-width:3em; max-width:3em;') + self.pb_resetbuff = QPushButton( + qta.icon('mdi.delete-empty'), '', self) + self.pb_resetbuff.setToolTip('Reset buffer') + self.pb_resetbuff.setObjectName('resetbuff') + self.pb_resetbuff.setStyleSheet( + "#resetbuff{min-width:25px; max-width:25px; icon-size:20px;}") + self.pb_resetbuff.clicked.connect(self.resetRawBuffer) + hlay_buff = QHBoxLayout() + hlay_buff.addWidget(self.label_buffsize) + hlay_buff.addWidget(self.pb_resetbuff) + + l_down = QLabel('Downsampling: ', self) + self.sb_down = QSpinBoxPlus(self) + self.sb_down.setValue(1) + self.sb_down.valueChanged.connect(self.setRawDownsampling) + + gbox_smooth = QGroupBox('Smoothing of Readings') + glay_smooth = QGridLayout(gbox_smooth) + glay_smooth.addWidget(l_smoothmethod, 0, 0) + glay_smooth.addWidget(self.cb_smoothmethod, 0, 1) + glay_smooth.addWidget(l_smoothnracq, 1, 0) + glay_smooth.addWidget(self.sb_smoothnracq, 1, 1) + glay_smooth.addWidget(QLabel(''), 0, 2) + glay_smooth.addWidget(l_smoothbuff, 0, 3) + glay_smooth.addLayout(hlay_buff, 0, 4, 1, 2) + glay_smooth.addWidget(l_down, 1, 3) + glay_smooth.addWidget(self.sb_down, 1, 4, 1, 2) + glay_smooth.setColumnStretch(0, 10) + glay_smooth.setColumnStretch(1, 10) + glay_smooth.setColumnStretch(2, 2) + glay_smooth.setColumnStretch(3, 10) + glay_smooth.setColumnStretch(4, 5) + glay_smooth.setColumnStretch(5, 5) + lay.addWidget(gbox_smooth, 3, 0) + lay.setRowStretch(3, 3) + gbox_smooth.setStyleSheet(""" + .QLabel{ + qproperty-alignment: 'AlignVCenter | AlignRight';} + QPushButton{ + min-width:3em; max-width:3em;}""") + + return wid + + def _updateRawBuffer(self, raw): + if raw is None: + return + samp = self._acq_fastnrsamp \ + if self._acq_mode == _DCCTc.MeasModeSel.Fast \ + else self._acq_normalnrsamp + if not samp: + return + samp -= samp % self._downsampling + if samp < 1: + return + data = raw[:samp] + + self._smooth_buffer.append(data) + if len(self._smooth_buffer) > self._smooth_nracq: + self._smooth_buffer.pop(0) + + self._updateRawCurve() + + def _updateRawCurve(self): + buff = np.array(self._smooth_buffer, dtype=float) + self.label_buffsize.setText(str(self.smoothBufferSize)) + + if not len(buff): + return + if len(buff) > 1: + if self._smooth_method == 'Average': + fdata = np.mean(buff, axis=0) + elif self._smooth_method == 'Median': + fdata = np.median(buff, axis=0) + else: + fdata = buff[0] + + down = self._downsampling + if down > 1: + fdata = np.mean(fdata.reshape(-1, down), axis=1) + + self.wavecurve.receiveYWaveform(fdata) + self.wavecurve.redrawCurve() + +
+[docs] + def setRawDownsampling(self, new_value): + """Update number of samples to use in downsampling.""" + self._downsampling = new_value + self.resetRawBuffer()
+ + +
+[docs] + def setRawSmoothMethod(self, new_method): + """Update method to perform raw readings smoothing.""" + self._smooth_method = new_method + self._updateRawCurve()
+ + +
+[docs] + def setRawSmoothNrAcq(self, new_value): + """Update number of samples to use in smoothing.""" + self._smooth_nracq = new_value + exc = len(self._smooth_buffer) - self._smooth_nracq + if exc > 0: + for i in range(exc): + self._smooth_buffer.pop(0)
+ + + @property + def smoothBufferSize(self): + """Smoothing buffer length.""" + return len(self._smooth_buffer) + +
+[docs] + def resetRawBuffer(self): + """Reset smoothing buffer.""" + self._smooth_buffer = list() + self._updateRawCurve()
+ + +
+[docs] + def updateParams(self, new_value): + """Handle control visualization according to mode.""" + address = self.sender().address + if 'Mode' in address: + self._acq_mode = new_value + elif 'Fast' in address: + self._acq_fastnrsamp = new_value + else: + self._acq_normalnrsamp = new_value + self.resetRawBuffer()
+ + +
+[docs] + def updateRawXAxis(self): + """Update X axis of waveform graph.""" + smpl = self._smpl_cnt.getvalue() + if self.cb_timeaxis.checkState(): + evnt = self._evnt_dly.getvalue() + trig = self._trig_dly.getvalue() + peri = self._meas_per.getvalue() + + if any([val is None for val in [evnt, trig, smpl, peri]]): + return + + init = (evnt+trig)/1e3 + endt = init + peri*1e3 + + xdata = np.linspace(init, endt, smpl) + xlabel = 'Time [ms]' + else: + xdata = np.arange(0, smpl) + xlabel = 'Index' + self.wavegraph.setLabel('bottom', text=xlabel) + self.wavecurve.receiveXWaveform(xdata)
+ + + def _handle_data_visualization(self): + show_raw = 'Raw' in self.sender().text() + self.sender().setText('Switch to ' + ( + 'Time History' if show_raw else 'Raw Readings')) + self.currhist.setVisible(not show_raw) + self.rawreads.setVisible(show_raw)
+ + + +
+[docs] +class EffMonitor(QWidget): + """Efficiency Graph.""" + + def __init__(self, parent=None, prefix='', section=''): + """Initialize object.""" + super().__init__(parent) + self.prefix = prefix + self.section = section + if self.section == 'BO': + self._label = 'Booster Ramp' + self._pvname = SiriusPVName( + 'BO-Glob:AP-CurrInfo:RampEff-Mon').substitute( + prefix=self.prefix) + else: + self._label = 'Injection' + self._pvname = SiriusPVName( + 'SI-Glob:AP-CurrInfo:InjEff-Mon').substitute( + prefix=self.prefix) + self._wavEff = list() + self._inj_idx = 0 + self._eje_idx = -1 + self._init_indices = False + self._setupUi() + + def _setupUi(self): + label = QLabel('<h3>'+self._label+' Efficiency</h3>', self, + alignment=Qt.AlignCenter) + + self.graph = SiriusTimePlot(self) + self.graph.timeSpan = 1000 # [s] + self.graph.addYChannel( + y_channel=self._pvname, name='Efficiency', + color='blue', lineWidth=2, lineStyle=Qt.SolidLine, + symbol='o', symbolSize=2) + self.graph.setAutoRangeX(True) + self.graph.setAutoRangeY(True) + self.graph.backgroundColor = QColor(255, 255, 255) + self.graph.showLegend = False + self.graph.showXGrid = True + self.graph.showYGrid = True + self.graph.maxRedrawRate = 2 + self.graph.setLabel('left', text='Efficiency [%]') + leftAxis = self.graph.getAxis('left') + leftAxis.setStyle(autoExpandTextSpace=False, tickTextWidth=25) + self.curve = self.graph.curveAtIndex(0) + + l_eff = QLabel('<h4>Efficiency:</h4>', self) + self.label_eff = SiriusLabel(self, self._pvname) + self.label_eff.showUnits = True + + hbox_eff = QHBoxLayout() + hbox_eff.addStretch() + hbox_eff.addWidget(l_eff) + hbox_eff.addWidget(self.label_eff) + hbox_eff.addStretch() + + if self.section == 'BO': + l_injcurr = QLabel('Injected:', self) + self.label_injcurr = SiriusLabel(self, SiriusPVName( + 'BO-Glob:AP-CurrInfo:Current150MeV-Mon').substitute( + prefix=self.prefix)) + self.label_injcurr.showUnits = True + + l_ejecurr = QLabel('Ejected:', self) + self.label_ejecurr = SiriusLabel(self, SiriusPVName( + 'BO-Glob:AP-CurrInfo:Current3GeV-Mon').substitute( + prefix=self.prefix)) + self.label_ejecurr.showUnits = True + + hbox_eff.addWidget(l_injcurr) + hbox_eff.addWidget(self.label_injcurr) + hbox_eff.addStretch() + hbox_eff.addWidget(l_ejecurr) + hbox_eff.addWidget(self.label_ejecurr) + hbox_eff.addStretch() + + lay = QVBoxLayout() + lay.addWidget(label) + lay.addWidget(self.graph) + lay.addLayout(hbox_eff) + self.setLayout(lay) + self.setStyleSheet(""" + SiriusLabel{ + qproperty-alignment:'AlignCenter'; + min-width:5em; max-width:5em;} + PyDMTimePlot{ + min-width:30em; min-height:20em;} + """)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_dccts/main.html b/_modules/siriushla/as_di_dccts/main.html new file mode 100644 index 000000000..37924829c --- /dev/null +++ b/_modules/siriushla/as_di_dccts/main.html @@ -0,0 +1,302 @@ + + + + + + siriushla.as_di_dccts.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_di_dccts.main

+"""DCCT Monitor Windows."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QLabel, QVBoxLayout, \
+    QPushButton, QHBoxLayout
+import qtawesome as qta
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.namesys import SiriusPVName
+from siriushla.widgets import SiriusMainWindow
+from siriushla import util
+from siriushla.as_di_dccts.graphics import DCCTMonitor, EffMonitor
+from siriushla.as_di_dccts.settings import DCCTSettings
+
+
+
+[docs] +def get_dcct_list(sec): + if sec == 'SI': + return ['SI-13C4:DI-DCCT', 'SI-14C4:DI-DCCT'] + else: + return ['BO-35D:DI-DCCT', ]
+ + + +
+[docs] +class DCCTMain(SiriusMainWindow): + """DCCT Main Window.""" + + def __init__(self, parent=None, prefix='', device=''): + """Initialize.""" + super().__init__(parent) + self.prefix = prefix + self.device = SiriusPVName(device) + self.section = self.device.sec + self.setObjectName(self.section+'App') + self.setWindowTitle(device) + self.setWindowIcon( + qta.icon('mdi.current-dc', + color=util.get_appropriate_color(self.section))) + self._setupUi() + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + self.title = QLabel('<h3>'+self.device+'</h3>', + alignment=Qt.AlignCenter) + + self.curr_graph = DCCTMonitor(self, self.prefix, self.device) + self.settings = DCCTSettings(self, self.prefix, self.device) + hbox_dcct = QHBoxLayout() + hbox_dcct.addWidget(self.curr_graph) + hbox_dcct.addWidget(self.settings) + + self.pb_showsett = QPushButton('<', self) + self.pb_showsett.setObjectName('showsett') + self.pb_showsett.setToolTip('Hide settings') + self.pb_showsett.setStyleSheet( + '#showsett{min-width:0.7em;max-width:0.7em;}') + self.pb_showsett.released.connect(self._handle_settings_vis) + + self.pb_showeff = QPushButton('v', self) + self.pb_showeff.setObjectName('showeff') + self.pb_showeff.setToolTip('Show efficiency graph') + self.pb_showeff.setStyleSheet( + '#showeff{min-width:0.7em;max-width:0.7em;}') + self.pb_showeff.released.connect(self._handle_efficiency_vis) + + hbox_visi = QHBoxLayout() + hbox_visi.addStretch() + hbox_visi.addWidget(self.pb_showsett) + hbox_visi.addWidget(self.pb_showeff) + + self.eff_graph = EffMonitor(self, self.prefix, self.section) + self.eff_graph.setVisible(False) + + cw = QWidget() + self.setCentralWidget(cw) + lay = QVBoxLayout(cw) + lay.setSpacing(10) + lay.addWidget(self.title) + lay.addLayout(hbox_dcct) + lay.addLayout(hbox_visi) + lay.addWidget(self.eff_graph) + + def _handle_settings_vis(self): + vis = self.settings.isVisible() + text = '>' if vis else '<' + ttip = 'Show' if vis else 'Hide' + self.pb_showsett.setText(text) + self.pb_showsett.setToolTip(ttip+' settings') + self.settings.setVisible(not vis) + self.sender().parent().adjustSize() + self.centralWidget().adjustSize() + self.adjustSize() + + def _handle_efficiency_vis(self): + vis = self.eff_graph.isVisible() + text = 'v' if vis else '^' + ttip = 'Show' if vis else 'Hide' + self.pb_showeff.setText(text) + self.pb_showeff.setToolTip(ttip+' efficiency graph') + self.eff_graph.setVisible(not vis) + self.sender().parent().adjustSize() + self.centralWidget().adjustSize() + self.adjustSize()
+ + + +
+[docs] +class SISelectDCCT(QWidget): + """Select Screens.""" + + def __init__(self, parent=None, prefix=_VACA_PREFIX): + """Init.""" + super().__init__(parent=parent) + self.prefix = prefix + self.setObjectName('SIApp') + self.dcct_list = get_dcct_list('SI') + self.setWindowTitle('Select a DCCT') + self.setWindowIcon( + qta.icon('mdi.current-dc', color=util.get_appropriate_color('SI'))) + self._setupUi() + + def _setupUi(self): + vlay = QVBoxLayout(self) + vlay.setSpacing(15) + self.setLayout(vlay) + + lab = QLabel('<h2>Sirius DCCT List</h2>', + alignment=Qt.AlignCenter) + vlay.addWidget(lab) + + for dcct in self.dcct_list: + pbt = QPushButton(dcct) + pbt.setStyleSheet("""min-width:10em;""") + util.connect_window(pbt, DCCTMain, parent=None, + prefix=self.prefix, device=dcct) + vlay.addWidget(pbt)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_dccts/settings.html b/_modules/siriushla/as_di_dccts/settings.html new file mode 100644 index 000000000..b9ca12ac0 --- /dev/null +++ b/_modules/siriushla/as_di_dccts/settings.html @@ -0,0 +1,743 @@ + + + + + + siriushla.as_di_dccts.settings — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_di_dccts.settings

+"""DCCT settings module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QLabel, QPushButton, QGroupBox, \
+    QGridLayout, QHBoxLayout, QVBoxLayout, QFormLayout, QSpacerItem, \
+    QSizePolicy as QSzPly
+import qtawesome as qta
+
+from pydm.widgets import PyDMEnumComboBox, PyDMPushButton
+
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.diagbeam.dcct.csdev import Const as _DCCTc, get_dcct_database
+from siriuspy.epics import PV as _PV
+
+from siriushla.widgets.windows import create_window_from_widget
+from siriushla.widgets import PyDMStateButton, SiriusConnectionSignal, \
+    SiriusLedState, SiriusLedAlert, SiriusLabel, SiriusSpinbox
+from siriushla import util as _hlautil
+from siriushla.as_ti_control.hl_trigger import HLTriggerSimple
+
+
+
+[docs] +class DCCTSettings(QWidget): + """DCCT Settings Main Widget.""" + + def __init__(self, parent=None, prefix='', device=''): + """Initialize.""" + super().__init__(parent) + self.prefix = prefix + self.device = _PVName(device) + self.dcct_prefix = device.substitute(prefix=self.prefix) + self._setupUi() + + def _setupUi(self): + lay = QVBoxLayout() + lay.addWidget(QLabel('<h3>Settings</h3>', self, + alignment=Qt.AlignHCenter | Qt.AlignBottom)) + lay.setStretch(0, 1) + + # Measure + l_reliablemeas = QLabel('Reliability: ') + self.led_ReliableMeas = SiriusLedAlert( + self, self.dcct_prefix.substitute(propty='ReliableMeas-Mon')) + + l_curr = QLabel('Current [mA]: ', self, alignment=Qt.AlignRight) + self.label_current = SiriusLabel( + self, self.dcct_prefix.substitute(propty='Current-Mon')) + self.led_StoredEBeam = SiriusLedState( + self, self.dcct_prefix.substitute(propty='StoredEBeam-Mon')) + hlay_current = QHBoxLayout() + hlay_current.addWidget(self.label_current) + hlay_current.addWidget(self.led_StoredEBeam) + + l_enbl = QLabel('Enable:', self) + self.pydmstatebutton_Enbl = PyDMStateButton( + self, self.dcct_prefix.substitute(propty='Enbl-Sel')) + self.pydmstatebutton_Enbl.shape = 1 + self.led_Enbl = SiriusLedState( + self, self.dcct_prefix.substitute(propty='Enbl-Sts')) + hlay_enbl = QHBoxLayout() + hlay_enbl.addWidget(self.pydmstatebutton_Enbl) + hlay_enbl.addWidget(self.led_Enbl) + + l_meastrig = QLabel('Trigger Source:', self) + self.pydmenumcombobox_MeasTrg = PyDMEnumComboBox( + self, self.dcct_prefix.substitute(propty='MeasTrg-Sel')) + self.pydmlabel_MeasTrg = SiriusLabel( + self, self.dcct_prefix.substitute(propty='MeasTrg-Sts')) + hlay_meastrig = QHBoxLayout() + hlay_meastrig.addWidget(self.pydmenumcombobox_MeasTrg) + hlay_meastrig.addWidget(self.pydmlabel_MeasTrg) + + if 'SI' in self.device: + l_range = QLabel('Range: ', self) + self.pydmenumcombobox_Range = PyDMEnumComboBox( + self, self.dcct_prefix.substitute(propty='Range-Sel')) + self.pydmlabel_Range = SiriusLabel( + self, self.dcct_prefix.substitute(propty='Range-Sts')) + hlay_range = QHBoxLayout() + hlay_range.addWidget(self.pydmenumcombobox_Range) + hlay_range.addWidget(self.pydmlabel_Range) + hlay_range.setContentsMargins(0, 0, 0, 0) + + l_measmode = QLabel('Mode: ', self) + self.pydmenumcombobox_MeasMode = PyDMEnumComboBox( + self, self.dcct_prefix.substitute(propty='MeasMode-Sel')) + self.pydmlabel_MeasMode = SiriusLabel( + self, self.dcct_prefix.substitute(propty='MeasMode-Sts')) + hlay_measmode = QHBoxLayout() + hlay_measmode.addWidget(self.pydmenumcombobox_MeasMode) + hlay_measmode.addWidget(self.pydmlabel_MeasMode) + hlay_measmode.setContentsMargins(0, 0, 0, 0) + + glay_mode = QGridLayout() + self.normalmode_widget = self._setupMeasSettingsWidget('Normal') + self.fastmode_widget = self._setupMeasSettingsWidget('Fast') + glay_mode.addWidget(self.normalmode_widget, 0, 0) + glay_mode.addWidget(self.fastmode_widget, 0, 0) + glay_mode.setContentsMargins(0, 0, 0, 0) + self.mode_channel = SiriusConnectionSignal( + self.dcct_prefix.substitute(propty='MeasMode-Sel')) + self.mode_channel.new_value_signal.connect(self._showMeasModeSettings) + + # Details + self.pb_details = QPushButton(qta.icon('fa5s.ellipsis-h'), '', self) + self.pb_details.setToolTip('Open details') + self.pb_details.setObjectName('detail') + self.pb_details.setStyleSheet( + "#detail{min-width:25px; max-width:25px; icon-size:20px;}") + detail_window = create_window_from_widget( + DCCTSettingsDetails, title=self.device+' Settings Details') + _hlautil.connect_window( + self.pb_details, detail_window, + self, prefix=self.prefix, device=self.device) + + gbox_gen = QGroupBox('Measure') + glay_gen = QGridLayout(gbox_gen) + glay_gen.setAlignment(Qt.AlignVCenter) + glay_gen.addWidget(l_curr, 0, 0) + glay_gen.addLayout(hlay_current, 0, 1) + glay_gen.addWidget(l_reliablemeas, 1, 0) + glay_gen.addWidget(self.led_ReliableMeas, 1, 1, alignment=Qt.AlignLeft) + glay_gen.addWidget(l_enbl, 2, 0) + glay_gen.addLayout(hlay_enbl, 2, 1) + glay_gen.addWidget(l_meastrig, 3, 0) + glay_gen.addLayout(hlay_meastrig, 3, 1) + if 'SI' in self.device: + glay_gen.addWidget(l_range, 4, 0) + glay_gen.addLayout(hlay_range, 4, 1) + glay_gen.addWidget(l_measmode, 5, 0) + glay_gen.addLayout(hlay_measmode, 5, 1) + glay_gen.addLayout(glay_mode, 6, 0, 1, 2) + glay_gen.addWidget(self.pb_details, 7, 0, 1, 2, + alignment=Qt.AlignRight) + gbox_gen.setStyleSheet(""" + .QLabel{ + qproperty-alignment: 'AlignVCenter | AlignRight'; + min-width: 6em;} + PyDMLed{ + min-width: 6em;}""") + lay.addWidget(gbox_gen) + lay.setStretch(1, 7) + + # Trigger + self.trigger_widget = QGroupBox('Trigger') + hbl = QHBoxLayout(self.trigger_widget) + hbl.addWidget(HLTriggerSimple( + self.trigger_widget, device=self.device.substitute(dis='TI'), + prefix=self.prefix)) + lay.addWidget(self.trigger_widget) + lay.setStretch(2, 3) + + self.setLayout(lay) + self.setStyleSheet(""" + QSpinBox, QComboBox, QPushButton, + SiriusSpinbox, PyDMEnumComboBox, SiriusLabel{ + min-width:6em; max-width:6em;} + .QLabel{max-height:1.5em;}""") + + def _setupMeasSettingsWidget(self, mode): + if mode == 'Normal': + prefix = self.dcct_prefix + visible = True + elif mode == 'Fast': + prefix = self.dcct_prefix.substitute(propty_name=mode) + visible = False + + l_smpcnt = QLabel('Sample Count: ', self) + spinbox_SampleCnt = SiriusSpinbox( + self, prefix.substitute(propty=prefix.propty_name+'SampleCnt-SP')) + label_SampleCnt = SiriusLabel( + self, prefix.substitute(propty=prefix.propty_name+'SampleCnt-RB')) + hlay_smpcnt = QHBoxLayout() + hlay_smpcnt.addWidget(spinbox_SampleCnt) + hlay_smpcnt.addWidget(label_SampleCnt) + + l_measperiod = QLabel('Period [s]: ', self) + spinbox_MeasPeriod = SiriusSpinbox( + self, prefix.substitute(propty=prefix.propty_name+'MeasPeriod-SP')) + label_MeasPeriod = SiriusLabel( + self, prefix.substitute(propty=prefix.propty_name+'MeasPeriod-RB')) + hlay_measperiod = QHBoxLayout() + hlay_measperiod.addWidget(spinbox_MeasPeriod) + hlay_measperiod.addWidget(label_MeasPeriod) + + flay_modesettings = QFormLayout() + flay_modesettings.addRow(l_smpcnt, hlay_smpcnt) + flay_modesettings.addRow(l_measperiod, hlay_measperiod) + flay_modesettings.setContentsMargins(0, 0, 0, 0) + modesettings = QWidget(self) + modesettings.setLayout(flay_modesettings) + modesettings.setVisible(visible) + return modesettings + + def _showMeasModeSettings(self, value): + if value == _DCCTc.MeasModeSel.Normal: + self.normalmode_widget.setVisible(True) + self.fastmode_widget.setVisible(False) + elif value == _DCCTc.MeasModeSel.Fast: + self.normalmode_widget.setVisible(False) + self.fastmode_widget.setVisible(True)
+ + + +
+[docs] +class DCCTSettingsDetails(QWidget): + """DCCT Settings Details Widget.""" + + def __init__(self, parent=None, prefix='', device=''): + """Initialize object.""" + super().__init__(parent) + self.prefix = prefix + self.device = _PVName(device) + if 'BO' in device: + self.setObjectName('BOApp') + else: + self.setObjectName('SIApp') + self.dcct_prefix = device.substitute(prefix=self.prefix) + self._db = get_dcct_database() + self._setupUi() + + def _setupUi(self): + self.gbox_reliablemeas = self._setupReliableMeasWidget() + + self.gbox_generalsettings = self._setupGeneralSettingsWidget() + + self.gbox_trigger = self._setupTriggerWidget() + + self.gbox_config = self._setupConfigurationWidget() + + self.gbox_normalmode = self._setupMeasSettingsWidget('Normal') + self.gbox_fastmode = self._setupMeasSettingsWidget('Fast') + lay_mode = QGridLayout() + lay_mode.addWidget(self.gbox_normalmode, 0, 0) + lay_mode.addWidget(self.gbox_fastmode, 0, 0) + self.mode_channel = SiriusConnectionSignal( + self.dcct_prefix.substitute(propty='MeasMode-Sel')) + self.mode_channel.new_value_signal.connect(self._showMeasModeSettings) + + lay = QGridLayout() + lay.addWidget( + QLabel('<h3>'+self.device+' Settings Details</h3>', self, + alignment=Qt.AlignCenter), 0, 0, 1, 2) + lay.addWidget(self.gbox_reliablemeas, 1, 0) + lay.addWidget(self.gbox_generalsettings, 2, 0) + lay.addWidget(self.gbox_config, 3, 0) + lay.addWidget(self.gbox_trigger, 3, 1) + lay.addLayout(lay_mode, 1, 1, 2, 1) + lay.setVerticalSpacing(15) + lay.setHorizontalSpacing(15) + lay.setRowStretch(0, 1) + lay.setRowStretch(1, 3) + lay.setRowStretch(2, 7) + lay.setRowStretch(3, 2) + self.setLayout(lay) + + self.setStyleSheet(""" + SiriusSpinbox, SiriusLabel{ + min-width:6em; max-width:6em; + qproperty-alignment: AlignCenter;} + PyDMLedMultiChannel, PyDMStateButton, PyDMEnumComboBox{ + min-width:6em; max-width:6em;}""") + + def _setupReliableMeasWidget(self): + gbox_reliablemeas = QGroupBox('Measure Reliability Status', self) + gbox_reliablemeas.setStyleSheet(""" + .QLabel{min-height:1.29em; max-height:1.29em;} + """) + + lay_reliablemeas = QGridLayout(gbox_reliablemeas) + relmeas_count = self._db['ReliableMeasLabels-Cte']['count'] + self.relmeas_labels = list() + for idx in range(relmeas_count): + led = SiriusLedAlert( + parent=self, init_channel=self.dcct_prefix.substitute( + propty='ReliableMeas-Mon'), bit=idx) + lay_reliablemeas.addWidget(led, idx, 0) + lbl = QLabel('', self) + self.relmeas_labels.append(lbl) + lay_reliablemeas.addWidget(lbl, idx, 1) + lay_reliablemeas.setColumnStretch(0, 1) + lay_reliablemeas.setColumnStretch(1, 10) + + self.reliablemeas_channel = _PV( + self.dcct_prefix.substitute(propty='ReliableMeasLabels-Cte'), + callback=self._updateReliableMeasLabels) + + return gbox_reliablemeas + + def _setupGeneralSettingsWidget(self): + gbox_generalsettings = QGroupBox('General Measurement Settings', self) + + l_enbl = QLabel('Enable:', self) + self.pydmstatebutton_Enbl = PyDMStateButton( + self, self.dcct_prefix.substitute(propty='Enbl-Sel')) + self.pydmstatebutton_Enbl.shape = 1 + self.led_Enbl = SiriusLedState( + self, self.dcct_prefix.substitute(propty='Enbl-Sts')) + hlay_enbl = QHBoxLayout() + hlay_enbl.addWidget(self.pydmstatebutton_Enbl) + hlay_enbl.addWidget(self.led_Enbl) + + l_meastrig = QLabel('Trigger Source: ', self) + self.pydmenumcombobox_MeasTrg = PyDMEnumComboBox( + self, self.dcct_prefix.substitute(propty='MeasTrg-Sel')) + self.pydmlabel_MeasTrg = SiriusLabel( + self, self.dcct_prefix.substitute(propty='MeasTrg-Sts')) + hlay_meastrig = QHBoxLayout() + hlay_meastrig.addWidget(self.pydmenumcombobox_MeasTrg) + hlay_meastrig.addWidget(self.pydmlabel_MeasTrg) + + l_trigmiss = QLabel('Trigger Is Missing?', self) + self.led_TrgMiss = SiriusLedAlert( + self, self.dcct_prefix.substitute(propty='TrgIsMissing-Mon')) + hlay_trigmiss = QHBoxLayout() + hlay_trigmiss.addWidget(self.led_TrgMiss) + hlay_trigmiss.setAlignment(Qt.AlignLeft) + + l_range = QLabel('Range: ', self) + self.pydmenumcombobox_Range = PyDMEnumComboBox( + self, self.dcct_prefix.substitute(propty='Range-Sel')) + self.pydmlabel_Range = SiriusLabel( + self, self.dcct_prefix.substitute(propty='Range-Sts')) + hlay_range = QHBoxLayout() + hlay_range.addWidget(self.pydmenumcombobox_Range) + hlay_range.addWidget(self.pydmlabel_Range) + + l_lowlimenbl = QLabel('Low Beam Current Detection: ', self) + self.pydmstatebutton_LowLimEnbl = PyDMStateButton( + self, self.dcct_prefix.substitute(propty='LowLimEnbl-Sel')) + self.pydmstatebutton_LowLimEnbl.shape = 1 + self.pydmlabel_LowLimEnbl = SiriusLabel( + self, self.dcct_prefix.substitute(propty='LowLimEnbl-Sts')) + hlay_lowlimenbl = QHBoxLayout() + hlay_lowlimenbl.addWidget(self.pydmstatebutton_LowLimEnbl) + hlay_lowlimenbl.addWidget(self.pydmlabel_LowLimEnbl) + + l_currthold = QLabel('Current Threshold [mA]: ', self) + self.pydmspinbox_CurrThold = SiriusSpinbox( + self, self.dcct_prefix.substitute(propty='CurrThold-SP')) + self.pydmlabel_CurrThold = SiriusLabel( + self, self.dcct_prefix.substitute(propty='CurrThold-RB')) + hlay_currthold = QHBoxLayout() + hlay_currthold.addWidget(self.pydmspinbox_CurrThold) + hlay_currthold.addWidget(self.pydmlabel_CurrThold) + + l_hfreject = QLabel('High Frequency Rejection: ', self) + self.pydmstatebutton_HFReject = PyDMStateButton( + self, self.dcct_prefix.substitute(propty='HFReject-Sel')) + self.pydmstatebutton_HFReject.shape = 1 + self.pydmlabel_HFReject = SiriusLabel( + self, self.dcct_prefix.substitute(propty='HFReject-Sts')) + hlay_hfreject = QHBoxLayout() + hlay_hfreject.addWidget(self.pydmstatebutton_HFReject) + hlay_hfreject.addWidget(self.pydmlabel_HFReject) + + l_measmode = QLabel('Mode: ', self) + self.pydmenumcombobox_MeasMode = PyDMEnumComboBox( + self, self.dcct_prefix.substitute(propty='MeasMode-Sel')) + self.pydmlabel_MeasMode = SiriusLabel( + self, self.dcct_prefix.substitute(propty='MeasMode-Sts')) + hlay_measmode = QHBoxLayout() + hlay_measmode.addWidget(self.pydmenumcombobox_MeasMode) + hlay_measmode.addWidget(self.pydmlabel_MeasMode) + + flay_generalsettings = QFormLayout() + flay_generalsettings.setLabelAlignment(Qt.AlignRight) + flay_generalsettings.setFormAlignment(Qt.AlignCenter) + flay_generalsettings.addRow(l_enbl, hlay_enbl) + flay_generalsettings.addRow(l_meastrig, hlay_meastrig) + flay_generalsettings.addRow(l_trigmiss, hlay_trigmiss) + flay_generalsettings.addRow(l_range, hlay_range) + flay_generalsettings.addItem( + QSpacerItem(1, 10, QSzPly.Ignored, QSzPly.Preferred)) + flay_generalsettings.addRow(l_lowlimenbl, hlay_lowlimenbl) + flay_generalsettings.addRow(l_currthold, hlay_currthold) + flay_generalsettings.addRow(l_hfreject, hlay_hfreject) + flay_generalsettings.addItem( + QSpacerItem(1, 10, QSzPly.Ignored, QSzPly.Preferred)) + flay_generalsettings.addRow(l_measmode, hlay_measmode) + gbox_generalsettings.setLayout(flay_generalsettings) + return gbox_generalsettings + + def _setupMeasSettingsWidget(self, mode): + if mode == 'Normal': + prefix = self.dcct_prefix + visible = True + elif mode == 'Fast': + prefix = self.dcct_prefix.substitute(propty_name=mode) + visible = False + + gbox_modesettings = QGroupBox(mode+' Measurement Mode Settings', self) + + l_smpcnt = QLabel('Sample Count: ', self) + spinbox_SampleCnt = SiriusSpinbox( + self, prefix.substitute(propty=prefix.propty_name+'SampleCnt-SP')) + label_SampleCnt = SiriusLabel( + self, prefix.substitute(propty=prefix.propty_name+'SampleCnt-RB')) + hlay_smpcnt = QHBoxLayout() + hlay_smpcnt.addWidget(spinbox_SampleCnt) + hlay_smpcnt.addWidget(label_SampleCnt) + + l_measperiod = QLabel('Period [s]: ', self) + spinbox_MeasPeriod = SiriusSpinbox( + self, prefix.substitute(propty=prefix.propty_name+'MeasPeriod-SP')) + label_MeasPeriod = SiriusLabel( + self, prefix.substitute(propty=prefix.propty_name+'MeasPeriod-RB')) + hlay_measperiod = QHBoxLayout() + hlay_measperiod.addWidget(spinbox_MeasPeriod) + hlay_measperiod.addWidget(label_MeasPeriod) + + l_measupdateperiod = QLabel('Measured Period [s]: ', self) + label_MeasUpdatePeriod = SiriusLabel( + self, self.dcct_prefix.substitute(propty='MeasUpdatePeriod-Mon')) + + l_imped = QLabel('Impedance: ', self) + enumcombobox_Imped = PyDMEnumComboBox( + self, prefix.substitute(propty=prefix.propty_name+'Imped-Sel')) + label_Imped = SiriusLabel( + self, prefix.substitute(propty=prefix.propty_name+'Imped-Sts')) + hlay_imped = QHBoxLayout() + hlay_imped.addWidget(enumcombobox_Imped) + hlay_imped.addWidget(label_Imped) + + l_offset = QLabel('Relative Offset Enable: ', self) + statebutton_RelEnbl = PyDMStateButton( + self, prefix.substitute(propty=prefix.propty_name+'RelEnbl-Sel')) + statebutton_RelEnbl.shape = 1 + statebutton_RelEnbl.setStyleSheet('min-width:6em; max-width:6em;') + label_RelEnbl = SiriusLabel( + self, prefix.substitute(propty=prefix.propty_name+'RelEnbl-Sts')) + hlay_offset = QHBoxLayout() + hlay_offset.addWidget(statebutton_RelEnbl) + hlay_offset.addWidget(label_RelEnbl) + + l_rellvl = QLabel('Relative Offset Level [V]: ', self) + spinbox_RelLvl = SiriusSpinbox( + self, prefix.substitute(propty=prefix.propty_name+'RelLvl-SP')) + label_RelLvl = SiriusLabel( + self, prefix.substitute(propty=prefix.propty_name+'RelLvl-RB')) + label_RelLvl.precisionFromPV = False + label_RelLvl.precision = 9 + pushbutton_RelAcq = PyDMPushButton( + parent=self, label='Acquire Offset', pressValue=1, + init_channel=prefix.substitute( + propty=prefix.propty_name+'RelAcq-Cmd')) + pushbutton_RelAcq.setAutoDefault(False) + pushbutton_RelAcq.setDefault(False) + hlay_rellvl = QHBoxLayout() + hlay_rellvl.addWidget(spinbox_RelLvl) + hlay_rellvl.addWidget(label_RelLvl) + hlay_rellvl.addWidget(pushbutton_RelAcq) + + flay_modesettings = QFormLayout() + flay_modesettings.setLabelAlignment(Qt.AlignRight) + flay_modesettings.setFormAlignment(Qt.AlignHCenter) + flay_modesettings.addRow(l_smpcnt, hlay_smpcnt) + flay_modesettings.addRow(l_measperiod, hlay_measperiod) + flay_modesettings.addRow(l_measupdateperiod, label_MeasUpdatePeriod) + flay_modesettings.addRow(l_imped, hlay_imped) + flay_modesettings.addRow(l_offset, hlay_offset) + flay_modesettings.addRow(l_rellvl, hlay_rellvl) + + if mode == 'Normal': + l_linesync = QLabel('Line Synchronization: ', self) + statebutton_LineSync = PyDMStateButton(self, prefix.substitute( + propty=prefix.propty_name+'LineSync-Sel')) + statebutton_LineSync.shape = 1 + statebutton_LineSync.setStyleSheet('min-width:6em; max-width:6em;') + label_LineSync = SiriusLabel(self, prefix.substitute( + propty=prefix.propty_name+'LineSync-Sts')) + hlay_linesync = QHBoxLayout() + hlay_linesync.addWidget(statebutton_LineSync) + hlay_linesync.addWidget(label_LineSync) + + label_avg = QLabel('<h4>Average Filter</h4>', self) + l_avgenbl = QLabel('Enable: ', self) + statebutton_AvgFilterEnbl = PyDMStateButton( + self, prefix.substitute( + propty=prefix.propty_name+'AvgFilterEnbl-Sel')) + statebutton_AvgFilterEnbl.shape = 1 + label_AvgFilterEnbl = SiriusLabel(self, prefix.substitute( + propty=prefix.propty_name+'AvgFilterEnbl-Sts')) + hlay_avgenbl = QHBoxLayout() + hlay_avgenbl.addWidget(statebutton_AvgFilterEnbl) + hlay_avgenbl.addWidget(label_AvgFilterEnbl) + + l_avgcnt = QLabel('Samples: ', self) + spinbox_AvgFilterCount = SiriusSpinbox(self, prefix.substitute( + propty=prefix.propty_name+'AvgFilterCnt-SP')) + label_AvgFilterCount = SiriusLabel(self, prefix.substitute( + propty=prefix.propty_name+'AvgFilterCnt-RB')) + hlay_avgcnt = QHBoxLayout() + hlay_avgcnt.addWidget(spinbox_AvgFilterCount) + hlay_avgcnt.addWidget(label_AvgFilterCount) + + l_avgtyp = QLabel('Type: ', self) + enumcombobox_AvgFilterTyp = PyDMEnumComboBox( + self, self.dcct_prefix.substitute(propty='AvgFilterTyp-Sel')) + label_AvgFilterTyp = SiriusLabel( + self, self.dcct_prefix.substitute(propty='AvgFilterTyp-Sts')) + hlay_avgtyp = QHBoxLayout() + hlay_avgtyp.addWidget(enumcombobox_AvgFilterTyp) + hlay_avgtyp.addWidget(label_AvgFilterTyp) + + l_avgwin = QLabel('Noise window size [%]: ', self) + spinbox_AvgFilterWind = SiriusSpinbox(self, prefix.substitute( + propty=prefix.propty_name+'AvgFilterWind-SP')) + label_AvgFilterWind = SiriusLabel(self, prefix.substitute( + propty=prefix.propty_name+'AvgFilterWind-RB')) + hlay_avgwin = QHBoxLayout() + hlay_avgwin.addWidget(spinbox_AvgFilterWind) + hlay_avgwin.addWidget(label_AvgFilterWind) + + flay_modesettings.addRow(l_linesync, hlay_linesync) + flay_modesettings.addRow(QLabel('')) + flay_modesettings.addRow(label_avg) + flay_modesettings.addRow(l_avgenbl, hlay_avgenbl) + flay_modesettings.addRow(l_avgcnt, hlay_avgcnt) + flay_modesettings.addRow(l_avgtyp, hlay_avgtyp) + flay_modesettings.addRow(l_avgwin, hlay_avgwin) + + gbox_modesettings.setLayout(flay_modesettings) + gbox_modesettings.setVisible(visible) + gbox_modesettings.setStyleSheet(""" + SiriusSpinbox, SiriusLabel{ + min-width:6em; max-width:6em; + qproperty-alignment: AlignCenter;} + PyDMLedMultiChannel, PyDMStateButton, PyDMEnumComboBox{ + min-width:6em; max-width:6em;}""") + return gbox_modesettings + + def _setupConfigurationWidget(self): + statebutton_Test = PyDMStateButton( + self, self.dcct_prefix.substitute(propty='Test-Sel')) + statebutton_Test.shape = 1 + statebutton_Test.setStyleSheet('min-width:6em; max-width:6em;') + label_Test = SiriusLabel(self, self.dcct_prefix.substitute( + propty='Test-Sts')) + hlay_test = QHBoxLayout() + hlay_test.addWidget(statebutton_Test) + hlay_test.addWidget(label_Test) + + self.bt_dl = PyDMPushButton( + parent=self, pressValue=1, icon=qta.icon('fa5s.sync'), + init_channel=self.dcct_prefix.substitute(propty='Download-Cmd')) + self.bt_dl.setObjectName('bt_dl') + self.bt_dl.setStyleSheet( + '#bt_dl{min-width:25px; max-width:25px; icon-size:20px;}') + + gbox_test = QGroupBox('Configurations') + lay = QFormLayout(gbox_test) + lay.setLabelAlignment(Qt.AlignRight) + lay.setFormAlignment(Qt.AlignCenter) + lay.addRow('Enable test current: ', hlay_test) + lay.addRow('Download Configurations: ', self.bt_dl) + return gbox_test + + def _setupTriggerWidget(self): + gbox_trigger = QGroupBox('Trigger', self) + hbl = QHBoxLayout(gbox_trigger) + hbl.addWidget(HLTriggerSimple( + gbox_trigger, device=self.device.substitute(dis='TI'), + prefix=self.prefix)) + return gbox_trigger + + def _updateReliableMeasLabels(self, pvname, value, **kwargs): + if value: + for idx, lbl in enumerate(self.relmeas_labels): + lbl.setText(value[idx]) + + def _showMeasModeSettings(self, value): + if value == _DCCTc.MeasModeSel.Normal: + self.gbox_normalmode.setVisible(True) + self.gbox_fastmode.setVisible(False) + elif value == _DCCTc.MeasModeSel.Fast: + self.gbox_normalmode.setVisible(False) + self.gbox_fastmode.setVisible(True)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_icts/ICT_monitor.html b/_modules/siriushla/as_di_icts/ICT_monitor.html new file mode 100644 index 000000000..7e8009891 --- /dev/null +++ b/_modules/siriushla/as_di_icts/ICT_monitor.html @@ -0,0 +1,830 @@ + + + + + + siriushla.as_di_icts.ICT_monitor — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_di_icts.ICT_monitor

+#!/usr/bin/env python-sirius
+"""HLA TB and TS ICT monitoring Window."""
+
+import os as _os
+import numpy as np
+
+from qtpy.uic import loadUi
+from qtpy.QtCore import Slot, Qt
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QFormLayout, QGridLayout, QHBoxLayout, \
+    QVBoxLayout, QSizePolicy as QSzPlcy, QLabel, QPushButton,\
+    QSpacerItem, QGroupBox, QWidget
+import qtawesome as qta
+
+from pydm.widgets import PyDMEnumComboBox, PyDMPushButton
+from pydm.widgets.waveformplot import WaveformCurveItem
+from pydm.utilities.macro import substitute_in_file as _substitute_in_file
+
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.epics import PV
+
+from siriushla.widgets import SiriusMainWindow, SiriusDialog, \
+    SiriusLedAlert, PyDMStateButton, PyDMLedMultiChannel, QSpinBoxPlus, \
+    SiriusWaveformPlot, SiriusLabel, SiriusSpinbox
+from siriushla.widgets.windows import create_window_from_widget
+from siriushla import util
+from siriushla.as_ti_control.hl_trigger import HLTriggerDetailed
+
+POINTS_TO_PLOT = 500
+TL_2_ICTS = {
+    'TB': [_PVName('TB-02:DI-ICT'), _PVName('TB-04:DI-ICT')],
+    'TS': [_PVName('TS-01:DI-ICT'), _PVName('TS-04:DI-ICT')],
+}
+
+
+
+[docs] +class ICTSummary(QWidget): + """ICT Monitor Summary.""" + + def __init__(self, parent=None, prefix=_VACA_PREFIX, tl=''): + super().__init__(parent) + self.prefix = prefix + self.tl = tl.upper() + self.icts = TL_2_ICTS[self.tl] + self._setupUi() + + def _setupUi(self): + lay = QGridLayout() + lay.setVerticalSpacing(20) + lay.setHorizontalSpacing(12) + + base_name = _PVName('TL-Glob:AP-CurrInfo:TranspEff-Mon') + self.lb_transpeff = SiriusLabel( + self, base_name.substitute(prefix=self.prefix, sec=self.tl)) + self.lb_transpeff.setAlignment(Qt.AlignCenter) + lay_transpeff = QVBoxLayout() + lay_transpeff.addWidget(QLabel('<h4>Transport Efficiency [%]</h4>', + self, alignment=Qt.AlignCenter)) + lay_transpeff.addWidget(self.lb_transpeff) + lay.addLayout(lay_transpeff, 0, 0, 1, 2) + + for col, ict in enumerate(self.icts): + txt_status = QLabel('Status: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + led_status = SiriusLedAlert(self, ict.substitute( + prefix=self.prefix, propty='ReliableMeas-Mon')) + led_status.setObjectName(ict+'_status') + txt_charge = QLabel( + 'Charge: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + lb_charge = SiriusLabel( + self, ict.substitute(prefix=self.prefix, propty='Charge-Mon')) + lb_charge.setObjectName(ict+'_charge') + lb_charge.setStyleSheet('max-width: 10em;') + lay_ict = QGridLayout() + lay_ict.addWidget(QLabel(ict, self, alignment=Qt.AlignCenter), + 0, 0, 1, 2) + lay_ict.addWidget(txt_status, 1, 0) + lay_ict.addWidget(led_status, 1, 1, alignment=Qt.AlignLeft) + lay_ict.addWidget(txt_charge, 2, 0) + lay_ict.addWidget(lb_charge, 2, 1) + lay.addLayout(lay_ict, 1, col) + + lay.setRowStretch(0, 2) + lay.setRowStretch(1, 3) + lay.setColumnStretch(0, 1) + lay.setColumnStretch(1, 1) + self.setLayout(lay)
+ + + +
+[docs] +class ICTMonitoring(SiriusMainWindow): + """Class to create ICTs History Monitor Window.""" + + def __init__(self, tl, parent=None, prefix=None): + """Create graphs.""" + super(ICTMonitoring, self).__init__(parent) + # Set transport line + self.tl = tl.upper() + self.prefix = prefix + self.icts = TL_2_ICTS[self.tl] + + tmp_file = _substitute_in_file( + _os.path.abspath(_os.path.dirname(__file__))+'/ui_ictmon.ui', + {'TL': self.tl, 'ICT1': self.icts[0], 'ICT2': self.icts[1], + 'PREFIX': prefix + ('-' if prefix else '')}) + self.setWindowTitle(self.tl+' ICTs Monitor') + self.centralwidget = loadUi(tmp_file) + self.setObjectName(self.tl+'App') + self.centralwidget.setObjectName(self.tl+'App') + self.setCentralWidget(self.centralwidget) + + # Add curves accordingly + self.centralwidget.PyDMTimePlot_Charge.addYChannel( + y_channel=self.icts[0].substitute( + prefix=self.prefix, propty='Charge-Mon'), + name='Charge '+self.icts[0], color='red', lineWidth=2) + self.centralwidget.PyDMTimePlot_Charge.addYChannel( + y_channel=self.icts[1].substitute( + prefix=self.prefix, propty='Charge-Mon'), + name='Charge '+self.icts[1], color='blue', lineWidth=2) + self.centralwidget.PyDMWaveformPlot_ChargeHstr.addChannel( + y_channel=self.icts[0].substitute( + prefix=self.prefix, propty='ChargeHstr-Mon'), + name='Charge History '+self.icts[0], color='red', lineWidth=2) + self.centralwidget.PyDMWaveformPlot_ChargeHstr.addChannel( + y_channel=self.icts[1].substitute( + prefix=self.prefix, propty='ChargeHstr-Mon'), + name='Charge History '+self.icts[1], color='blue', lineWidth=2) + + # Connect signals to controls curves visibility + self.centralwidget.checkBox.stateChanged.connect( + self._setICT1CurveVisibility) + self.centralwidget.checkBox_2.stateChanged.connect( + self._setICT2CurveVisibility) + + # Add menu + menu = self.menuBar().addMenu('Settings') + for ict in self.icts: + act = menu.addAction(ict) + util.connect_window( + act, _ICTSettings, parent=self, prefix=prefix, device=ict) + + self.centralwidget.setStyleSheet(""" + #tabWidget{ + min-width:40em; + min-height:28em;} + #label_window{ + font-size:1.1em; + font-weight:bold; + qproperty-alignment: 'AlignVCenter | AlignRight'; + background-color: qlineargradient(spread:pad, + x1:1, y1:0.0227273, x2:0, y2:0, + stop:0 rgba(173, 190, 207, 255), + stop:1 rgba(213, 213, 213, 255)); + min-height:1.29em; max-height:1.29em; + }""") + + @Slot(int) + def _setICT1CurveVisibility(self, value): + """Set curves visibility.""" + self.centralwidget.PyDMTimePlot_Charge._curves[0].setVisible(value) + self.centralwidget.PyDMWaveformPlot_ChargeHstr._curves[0].setVisible( + value) + + @Slot(int) + def _setICT2CurveVisibility(self, value): + """Set curves visibility.""" + self.centralwidget.PyDMTimePlot_Charge._curves[1].setVisible(value) + self.centralwidget.PyDMWaveformPlot_ChargeHstr._curves[1].setVisible( + value)
+ + + +class _ICTSettings(SiriusDialog): + """Auxiliar window to diagnosis settings.""" + + def __init__(self, parent, prefix, device): + """Initialize object.""" + super().__init__(parent) + self.prefix = prefix + self.device = device + self.ict_prefix = _PVName(device).substitute(prefix=self.prefix) + self.ict_trig_digi_prefix = self.ict_prefix.substitute( + sub='Fam', dis='TI', idx='Digit') + self.ict_trig_integ_prefix = self.ict_prefix.substitute( + sub='Fam', dis='TI', idx='Integ') + self.setWindowTitle(self.ict_prefix+' Settings') + self.setObjectName(self.ict_prefix.sec+'App') + self._setupUi() + + def _setupUi(self): + l_ictacq = QLabel('<h3>'+self.ict_prefix+' Settings</h3>', self, + alignment=Qt.AlignCenter) + + self.gbox_reliablemeas = self._setupReliableMeasWidget() + self.gbox_generalsettings = self._setupICTGeneralSettingsWidget() + + self.bt_cal = QPushButton('ICT Calibration', self) + dialog = create_window_from_widget( + _ICTCalibration, title=self.ict_prefix+' Calibration') + util.connect_window(self.bt_cal, dialog, parent=self, + ict_prefix=self.ict_prefix) + self.bt_cal.setAutoDefault(False) + self.bt_cal.setDefault(False) + hlay_cal = QHBoxLayout() + hlay_cal.addItem(QSpacerItem(4, 2, QSzPlcy.Expanding, QSzPlcy.Fixed)) + hlay_cal.addWidget(self.bt_cal) + + self.setStyleSheet(""" + SiriusSpinbox{ + min-width:7.10em; max-width:7.10em; + min-height:1.29em; max-height:1.29em; + qproperty-alignment: AlignCenter; + } + PyDMEnumComboBox{ + min-width:7.10em; max-width:7.10em; + min-height:1.29em; max-height:1.29em; + } + PyDMLed{ + min-width:1.29em; max-width:1.29em; + min-height:1.29em; max-height:1.29em; + }""") + + lay = QVBoxLayout() + lay.addStretch() + lay.addWidget(l_ictacq) + lay.addStretch() + lay.addWidget(self.gbox_reliablemeas) + lay.addStretch() + lay.addWidget(self.gbox_generalsettings) + lay.addStretch() + lay.addLayout(hlay_cal) + lay.addStretch() + lay.setSpacing(20) + self.setLayout(lay) + + def _setupReliableMeasWidget(self): + self.reliablemeas_channel = PV( + self.ict_prefix.substitute(propty='ReliableMeasLabels-Cte'), + callback=self._updateReliableMeasLabels) + + gbox_reliablemeas = QGroupBox('ICT Measure Reliability Status', self) + gbox_reliablemeas.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Fixed) + + self.label_reliablemeas0 = QLabel('', self) + self.led_ReliableMeas0 = SiriusLedAlert( + self, self.ict_prefix.substitute(propty='ReliableMeas-Mon'), + bit=0) + self.label_reliablemeas1 = QLabel('', self) + self.led_ReliableMeas1 = SiriusLedAlert( + self, self.ict_prefix.substitute(propty='ReliableMeas-Mon'), + bit=1) + self.label_reliablemeas2 = QLabel('', self) + self.led_ReliableMeas2 = SiriusLedAlert( + self, self.ict_prefix.substitute(propty='ReliableMeas-Mon'), + bit=2) + lay_reliablemeas = QGridLayout() + lay_reliablemeas.addWidget(self.led_ReliableMeas0, 0, 0) + lay_reliablemeas.addWidget(self.label_reliablemeas0, 0, 1) + lay_reliablemeas.addWidget(self.led_ReliableMeas1, 1, 0) + lay_reliablemeas.addWidget(self.label_reliablemeas1, 1, 1) + lay_reliablemeas.addWidget(self.led_ReliableMeas2, 2, 0) + lay_reliablemeas.addWidget(self.label_reliablemeas2, 2, 1) + gbox_reliablemeas.setLayout(lay_reliablemeas) + return gbox_reliablemeas + + def _setupICTGeneralSettingsWidget(self): + gbox_generalsettings = QGroupBox('ICT Measurement Settings', self) + + l_sampletrg = QLabel('Trigger Source: ', self) + self.pydmenumcombobox_SampleTrg = PyDMEnumComboBox( + self, self.ict_prefix.substitute(propty='SampleTrg-Sel')) + self.pydmlabel_SampleTrg = SiriusLabel( + self, self.ict_prefix.substitute(propty='SampleTrg-Sts')) + hlay_sampletrg = QHBoxLayout() + hlay_sampletrg.addWidget(self.pydmenumcombobox_SampleTrg) + hlay_sampletrg.addWidget(self.pydmlabel_SampleTrg) + + # Digitizer trigger + label_Digi = QLabel('<h4>Digitizer: </h4>', self) + + l_DigiSts = QLabel('Status: ', self) + self.led_DigiSts = PyDMLedMultiChannel( + parent=self, + channels2values={ + self.ict_trig_digi_prefix.substitute(propty='State-Sts'): 1, + self.ict_trig_digi_prefix.substitute(propty='Status-Mon'): 0}) + self.pb_DigiDetails = QPushButton( + qta.icon('fa5s.ellipsis-h'), '', self) + self.pb_DigiDetails.setObjectName('trgdigidtls') + self.pb_DigiDetails.setStyleSheet( + "#trgdigidtls{min-width:25px; max-width:25px; icon-size:20px;}") + self.pb_DigiDetails.setAutoDefault(False) + self.pb_DigiDetails.setDefault(False) + trg_w = create_window_from_widget( + HLTriggerDetailed, is_main=True, + title=self.ict_trig_digi_prefix+' Detailed Settings') + util.connect_window( + self.pb_DigiDetails, trg_w, parent=self, + device=self.ict_trig_digi_prefix, prefix=self.prefix) + l_DigiDelay = QLabel('Delay: ', self) + self.pydmspinbox_DigiDelay = SiriusSpinbox( + self, self.ict_trig_digi_prefix.substitute(propty='Delay-SP')) + self.pydmlabel_DigiDelay = SiriusLabel( + self, self.ict_trig_digi_prefix.substitute(propty='Delay-RB')) + l_DigiDuration = QLabel('Duration: ', self) + self.pydmspinbox_DigiDuration = SiriusSpinbox( + self, self.ict_trig_digi_prefix.substitute(propty='Duration-SP')) + self.pydmlabel_DigiDuration = SiriusLabel( + self, self.ict_trig_digi_prefix.substitute(propty='Duration-RB')) + lay_Digi = QGridLayout() + lay_Digi.addWidget(l_DigiSts, 0, 0) + lay_Digi.addWidget(self.led_DigiSts, 0, 1, alignment=Qt.AlignLeft) + lay_Digi.addWidget(self.pb_DigiDetails, 0, 2, alignment=Qt.AlignLeft) + lay_Digi.addWidget(l_DigiDelay, 1, 0) + lay_Digi.addWidget(self.pydmspinbox_DigiDelay, 1, 1) + lay_Digi.addWidget(self.pydmlabel_DigiDelay, 1, 2) + lay_Digi.addWidget(l_DigiDuration, 2, 0) + lay_Digi.addWidget(self.pydmspinbox_DigiDuration, 2, 1) + lay_Digi.addWidget(self.pydmlabel_DigiDuration, 2, 2) + + # Integrator trigger + label_Inte = QLabel('<h4>Integrator: </h4>', self) + + l_IntegSts = QLabel('Status: ', self) + self.led_IntegSts = PyDMLedMultiChannel( + parent=self, + channels2values={ + self.ict_trig_integ_prefix.substitute(propty='State-Sts'): 1, + self.ict_trig_integ_prefix.substitute(propty='Status-Mon'): 0}) + self.pb_IntegDetails = QPushButton( + qta.icon('fa5s.ellipsis-h'), '', self) + self.pb_IntegDetails.setObjectName('trgdigidtls') + self.pb_IntegDetails.setStyleSheet( + "#trgdigidtls{min-width:25px; max-width:25px; icon-size:20px;}") + self.pb_IntegDetails.setAutoDefault(False) + self.pb_IntegDetails.setDefault(False) + trg_w = create_window_from_widget( + HLTriggerDetailed, is_main=True, + title=self.ict_trig_integ_prefix+' Detailed Settings') + util.connect_window( + self.pb_IntegDetails, trg_w, parent=self, + device=self.ict_trig_integ_prefix, prefix=self.prefix) + l_IntegDelay = QLabel('Delay: ', self) + self.pydmspinbox_IntegDelay = SiriusSpinbox( + self, self.ict_trig_digi_prefix.substitute(propty='Delay-SP')) + self.pydmlabel_IntegDelay = SiriusLabel( + self, self.ict_trig_digi_prefix.substitute(propty='Delay-RB')) + l_IntegDuration = QLabel('Delay: ', self) + self.pydmspinbox_IntegDuration = SiriusSpinbox( + self, self.ict_trig_digi_prefix.substitute(propty='Duration-SP')) + self.pydmlabel_IntegDuration = SiriusLabel( + self, self.ict_trig_digi_prefix.substitute(propty='Duration-RB')) + lay_Integ = QGridLayout() + lay_Integ.addWidget(l_IntegSts, 0, 0) + lay_Integ.addWidget(self.led_IntegSts, 0, 1, alignment=Qt.AlignLeft) + lay_Integ.addWidget(self.pb_IntegDetails, 0, 2, alignment=Qt.AlignLeft) + lay_Integ.addWidget(l_IntegDelay, 1, 0) + lay_Integ.addWidget(self.pydmspinbox_IntegDelay, 1, 1) + lay_Integ.addWidget(self.pydmlabel_IntegDelay, 1, 2) + lay_Integ.addWidget(l_IntegDuration, 2, 0) + lay_Integ.addWidget(self.pydmspinbox_IntegDuration, 2, 1) + lay_Integ.addWidget(self.pydmlabel_IntegDuration, 2, 2) + + l_thold = QLabel('Threshold [nC]: ', self) + self.pydmspinbox_Threshold = SiriusSpinbox( + self, self.ict_prefix.substitute(propty='Threshold-SP')) + self.pydmlabel_Threshold = SiriusLabel( + self, self.ict_prefix.substitute(propty='Threshold-RB')) + hlay_thold = QHBoxLayout() + hlay_thold.addWidget(self.pydmspinbox_Threshold) + hlay_thold.addWidget(self.pydmlabel_Threshold) + + flay = QFormLayout() + flay.addRow(l_sampletrg, hlay_sampletrg) + flay.addItem(QSpacerItem(1, 10, QSzPlcy.Ignored, QSzPlcy.Fixed)) + flay.addRow(QLabel('<h4>Triggers</h4>')) + flay.addRow(label_Digi, lay_Digi) + flay.addItem(QSpacerItem(1, 10, QSzPlcy.Ignored, QSzPlcy.Fixed)) + flay.addRow(label_Inte, lay_Integ) + flay.addItem(QSpacerItem(1, 10, QSzPlcy.Ignored, QSzPlcy.Fixed)) + flay.addRow(l_thold, hlay_thold) + flay.setFormAlignment(Qt.AlignCenter) + flay.setLabelAlignment(Qt.AlignRight) + gbox_generalsettings.setLayout(flay) + return gbox_generalsettings + + def _updateReliableMeasLabels(self, pvname, value, **kwars): + if value: + self.label_reliablemeas0.setText(value[0]) + self.label_reliablemeas1.setText(value[1]) + self.label_reliablemeas2.setText(value[2]) + + +class _ICTCalibration(QWidget): + + def __init__(self, parent, ict_prefix): + """Initialize object.""" + super().__init__(parent) + self.ict_prefix = ict_prefix + self.setObjectName(ict_prefix.sec+'App') + self._setupUi() + + def _setupUi(self): + label_cal = QLabel('<h3>'+self.ict_prefix+' Calibration</h3>', self, + alignment=Qt.AlignCenter) + lay_meassettings = self._setupMeasSettingsLayout() + [self.graph_rawread, lay_graphsettings] = self._setupGraph() + + glay = QGridLayout() + glay.addWidget(label_cal, 0, 0, 1, 2) + glay.addWidget(QLabel('<h4>Measurement Settings</h4>', self, + alignment=Qt.AlignCenter), 1, 0) + glay.addLayout(lay_meassettings, 2, 0, alignment=Qt.AlignCenter) + glay.addLayout(lay_graphsettings, 3, 0) + glay.addWidget(QLabel('<h4>RawReadings Monitor</h4>', self, + alignment=Qt.AlignCenter), 1, 1) + glay.addWidget(self.graph_rawread, 2, 1, 2, 1) + self.setLayout(glay) + style = '#' + self.objectName() + """{ + min-width:65em; + min-height:34em;} + SiriusSpinbox{ + min-width:7.10em; max-width:7.10em; + min-height:1.29em; max-height:1.29em; + qproperty-alignment: AlignCenter;\n} + PyDMStateButton{ + min-width:7.10em; max-width:7.10em; + min-height:1.29em; max-height:1.29em;\n} + PyDMEnumComboBox{ + min-width:7.10em; max-width:7.10em; + min-height:1.29em; max-height:1.29em;\n} + SiriusLabel{ + min-width:7.10em; max-width:7.10em; + min-height:1.29em; max-height:1.29em; + qproperty-alignment: AlignCenter;\n} + QPushButton{ + min-width:14.2em;\nmax-width:14.2em;\n}""" + self.setStyleSheet(style) + glay.setRowStretch(0, 4) + glay.setRowStretch(1, 2) + glay.setRowStretch(2, 24) + glay.setRowStretch(3, 4) + + def _setupMeasSettingsLayout(self): + l_thold = QLabel('Charge Threshold [nC]: ', self) + self.pydmspinbox_Threshold = SiriusSpinbox( + self, self.ict_prefix.substitute(propty='Threshold-SP')) + self.pydmlabel_Threshold = SiriusLabel( + self, self.ict_prefix.substitute(propty='Threshold-RB')) + hlay_thold = QHBoxLayout() + hlay_thold.addWidget(self.pydmspinbox_Threshold) + hlay_thold.addWidget(self.pydmlabel_Threshold) + + l_hfreject = QLabel('High Frequency Rejection: ', self) + self.pydmstatebutton_HFReject = PyDMStateButton( + self, self.ict_prefix.substitute(propty='HFReject-Sel')) + self.pydmstatebutton_HFReject.shape = 1 + self.pydmlabel_HFReject = SiriusLabel( + self, self.ict_prefix.substitute(propty='HFReject-Sts')) + hlay_hfreject = QHBoxLayout() + hlay_hfreject.addWidget(self.pydmstatebutton_HFReject) + hlay_hfreject.addWidget(self.pydmlabel_HFReject) + + l_2ndreaddy = QLabel('2nd Read Delay [s]: ', self) + self.pydmspinbox_2ndReadDly = SiriusSpinbox( + self, self.ict_prefix.substitute(propty='2ndReadDly-SP')) + self.pydmlabel_2ndReadDly = SiriusLabel( + self, self.ict_prefix.substitute(propty='2ndReadDly-RB')) + hlay_2ndreaddy = QHBoxLayout() + hlay_2ndreaddy.addWidget(self.pydmspinbox_2ndReadDly) + hlay_2ndreaddy.addWidget(self.pydmlabel_2ndReadDly) + + l_samplecnt = QLabel('Sample Count: ', self) + self.pydmspinbox_SampleCnt = SiriusSpinbox( + self, self.ict_prefix.substitute(propty='SampleCnt-SP')) + self.pydmlabel_SampleCnt = SiriusLabel( + self, self.ict_prefix.substitute(propty='SampleCnt-RB')) + hlay_samplecnt = QHBoxLayout() + hlay_samplecnt.addWidget(self.pydmspinbox_SampleCnt) + hlay_samplecnt.addWidget(self.pydmlabel_SampleCnt) + + l_aperture = QLabel('Aperture [us]: ', self) + self.pydmspinbox_Aperture = SiriusSpinbox( + self, self.ict_prefix.substitute(propty='Aperture-SP')) + self.pydmlabel_Aperture = SiriusLabel( + self, self.ict_prefix.substitute(propty='Aperture-RB')) + hlay_aperture = QHBoxLayout() + hlay_aperture.addWidget(self.pydmspinbox_Aperture) + hlay_aperture.addWidget(self.pydmlabel_Aperture) + + l_samplerate = QLabel('Sample Rate [rdgs/s]: ', self) + self.pydmspinbox_SampleRate = SiriusSpinbox( + self, self.ict_prefix.substitute(propty='SampleRate-SP')) + self.pydmlabel_SampleRate = SiriusLabel( + self, self.ict_prefix.substitute(propty='SampleRate-RB')) + hlay_samplerate = QHBoxLayout() + hlay_samplerate.addWidget(self.pydmspinbox_SampleRate) + hlay_samplerate.addWidget(self.pydmlabel_SampleRate) + + l_imped = QLabel('Impedance: ', self) + self.pydmstatebutton_Imped = PyDMEnumComboBox( + self, self.ict_prefix.substitute(propty='Imped-Sel')) + self.pydmstatebutton_Imped.shape = 1 + self.pydmlabel_Imped = SiriusLabel( + self, self.ict_prefix.substitute(propty='Imped-Sts')) + hlay_imped = QHBoxLayout() + hlay_imped.addWidget(self.pydmstatebutton_Imped) + hlay_imped.addWidget(self.pydmlabel_Imped) + + l_bcmrange = QLabel('BCM Range [V]: ', self) + self.pydmspinbox_BCMRange = SiriusSpinbox( + self, self.ict_prefix.substitute(propty='BCMRange-SP')) + + l_range = QLabel('Range: ', self) + self.pydmenumcombobox_Range = PyDMEnumComboBox( + self, self.ict_prefix.substitute(propty='Range-Sel')) + self.pydmlabel_Range = SiriusLabel( + self, self.ict_prefix.substitute(propty='Range-Sts')) + hlay_range = QHBoxLayout() + hlay_range.addWidget(self.pydmenumcombobox_Range) + hlay_range.addWidget(self.pydmlabel_Range) + + l_calenbl = QLabel('Calibration Enable: ', self) + self.pydmstatebutton_CalEnbl = PyDMStateButton( + self, self.ict_prefix.substitute(propty='CalEnbl-Sel')) + self.pydmstatebutton_CalEnbl.shape = 1 + self.pydmlabel_CalEnbl = SiriusLabel( + self, self.ict_prefix.substitute(propty='CalEnbl-Sts')) + hlay_calenbl = QHBoxLayout() + hlay_calenbl.addWidget(self.pydmstatebutton_CalEnbl) + hlay_calenbl.addWidget(self.pydmlabel_CalEnbl) + + l_calcharge = QLabel('Calibration Charge: ', self) + self.pydmenumcombobox_CalCharge = PyDMEnumComboBox( + self, self.ict_prefix.substitute(propty='CalCharge-Sel')) + self.pydmlabel_CalCharge = SiriusLabel( + self, self.ict_prefix.substitute(propty='CalCharge-Sts')) + hlay_calcharge = QHBoxLayout() + hlay_calcharge.addWidget(self.pydmenumcombobox_CalCharge) + hlay_calcharge.addWidget(self.pydmlabel_CalCharge) + + l_download = QLabel('Download to hardware ', self) + self.pydmpushbutton_Download = PyDMPushButton( + self, label='', icon=qta.icon('fa5s.download'), pressValue=1, + init_channel=self.ict_prefix.substitute(propty='Download-Cmd')) + self.pydmpushbutton_Download.setObjectName('download') + self.pydmpushbutton_Download.setStyleSheet( + "#download{min-width:25px; max-width:25px; icon-size:20px;}") + self.pydmpushbutton_Download.setAutoDefault(False) + self.pydmpushbutton_Download.setDefault(False) + + flay = QFormLayout() + flay.addRow(l_thold, hlay_thold) + flay.addRow(l_hfreject, hlay_hfreject) + flay.addItem(QSpacerItem(1, 20, QSzPlcy.Ignored, QSzPlcy.Preferred)) + flay.addRow(l_2ndreaddy, hlay_2ndreaddy) + flay.addItem(QSpacerItem(1, 20, QSzPlcy.Ignored, QSzPlcy.Preferred)) + flay.addRow(l_samplecnt, hlay_samplecnt) + flay.addRow(l_aperture, hlay_aperture) + flay.addRow(l_samplerate, hlay_samplerate) + flay.addRow(l_imped, hlay_imped) + flay.addItem(QSpacerItem(1, 20, QSzPlcy.Ignored, QSzPlcy.Preferred)) + flay.addRow(l_bcmrange, self.pydmspinbox_BCMRange) + flay.addRow(l_range, hlay_range) + flay.addItem(QSpacerItem(1, 20, QSzPlcy.Ignored, QSzPlcy.Preferred)) + flay.addRow(l_calenbl, hlay_calenbl) + flay.addRow(l_calcharge, hlay_calcharge) + flay.addItem(QSpacerItem(1, 20, QSzPlcy.Ignored, QSzPlcy.Preferred)) + flay.addRow(l_download, self.pydmpushbutton_Download) + flay.addItem(QSpacerItem(1, 20, QSzPlcy.Ignored, QSzPlcy.Preferred)) + flay.setLabelAlignment(Qt.AlignRight) + return flay + + def _setupGraph(self): + graph_rawread = _MyWaveformPlot(self) + graph_rawread.setObjectName('graph_rawread') + graph_rawread.autoRangeX = True + graph_rawread.autoRangeY = True + graph_rawread.backgroundColor = QColor(255, 255, 255) + graph_rawread.showLegend = True + graph_rawread.showXGrid = True + graph_rawread.showYGrid = True + graph_rawread.setStyleSheet(""" + #graph_rawread{min-width:36em;\nmin-height:28em;}""") + graph_rawread.setLabel('left', text='Raw Readings', color='gray') + graph_rawread.setLabel('bottom', text='Index', color='gray') + graph_rawread.addChannel( + y_channel=self.ict_prefix.substitute(propty='RawPulse-Mon'), + name='RawPulse', color='blue', lineWidth=2, lineStyle=Qt.SolidLine) + graph_rawread.addChannel( + y_channel=self.ict_prefix.substitute(propty='RawNoise-Mon'), + name='RawNoise', color='red', lineWidth=2, lineStyle=Qt.SolidLine) + leftAxis = graph_rawread.getAxis('left') + leftAxis.setStyle(autoExpandTextSpace=False, tickTextWidth=25) + self.curvePulse = graph_rawread.curveAtIndex(0) + self.curveNoise = graph_rawread.curveAtIndex(1) + + label_graphsettings = QLabel('<h4>Graph Settings</h4>', self, + alignment=Qt.AlignHCenter) + l_plot = QLabel('Plot first', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + l_points = QLabel(' points ', self) + self.sb_nrpoints = QSpinBoxPlus(self) + self.sb_nrpoints.setMinimum(0) + self.sb_nrpoints.setMaximum(1000) + self.sb_nrpoints.setValue(POINTS_TO_PLOT) + self.sb_nrpoints.setStyleSheet(""" + min-width:7.10em;\nmax-width:7.10em;\n + min-height:1.29em;\nmax-height:1.29em;\n""") + self.sb_nrpoints.editingFinished.connect(self._set_nrpoints) + glay_graphpoints = QGridLayout() + glay_graphpoints.addWidget(label_graphsettings, 0, 0, 1, 3) + glay_graphpoints.addWidget(l_plot, 1, 0) + glay_graphpoints.addWidget(self.sb_nrpoints, 1, 1) + glay_graphpoints.addWidget(l_points, 1, 2) + return [graph_rawread, glay_graphpoints] + + def _set_nrpoints(self): + global POINTS_TO_PLOT + POINTS_TO_PLOT = self.sb_nrpoints.value() + + +class _MyWaveformCurveItem(WaveformCurveItem): + + def redrawCurve(self): + if self.y_waveform is None: + return + if self.x_waveform is None: + self.setData(y=self.y_waveform[0:POINTS_TO_PLOT].astype(np.float_)) + return + if self.x_waveform.shape[0] > self.y_waveform.shape[0]: + self.x_waveform = self.x_waveform[:self.y_waveform.shape[0]] + elif self.x_waveform.shape[0] < self.y_waveform.shape[0]: + self.y_waveform = self.y_waveform[:self.x_waveform.shape[0]] + self.setData(x=self.x_waveform[0:POINTS_TO_PLOT].astype(np.float_), + y=self.y_waveform[0:POINTS_TO_PLOT].astype(np.float_)) + self.needs_new_x = True + self.needs_new_y = True + + +class _MyWaveformPlot(SiriusWaveformPlot): + + def addChannel(self, y_channel=None, x_channel=None, name=None, + color=None, lineStyle=None, lineWidth=None, + symbol=None, symbolSize=None, redraw_mode=None): + """Reimplement to use _MyWaveformCurveItem.""" + plot_opts = {} + plot_opts['symbol'] = symbol + if symbolSize is not None: + plot_opts['symbolSize'] = symbolSize + if lineStyle is not None: + plot_opts['lineStyle'] = lineStyle + if lineWidth is not None: + plot_opts['lineWidth'] = lineWidth + if redraw_mode is not None: + plot_opts['redraw_mode'] = redraw_mode + self._needs_redraw = False + curve = _MyWaveformCurveItem( + y_addr=y_channel, x_addr=x_channel, name=name, + color=color, **plot_opts) + self.channel_pairs[(y_channel, x_channel)] = curve + self.addCurve(curve, curve_color=color) + curve.data_changed.connect(self.set_needs_redraw) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_scrns/list_scrns.html b/_modules/siriushla/as_di_scrns/list_scrns.html new file mode 100644 index 000000000..348670b4b --- /dev/null +++ b/_modules/siriushla/as_di_scrns/list_scrns.html @@ -0,0 +1,240 @@ + + + + + + siriushla.as_di_scrns.list_scrns — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_di_scrns.list_scrns

+"""Screens list."""
+
+from qtpy.QtWidgets import QWidget, QLabel, QPushButton, \
+    QVBoxLayout, QHBoxLayout
+from qtpy.QtCore import Qt
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriushla import util
+
+
+
+[docs] +def get_scrn_list(sec): + if sec == 'TB': + return ['TB-01:DI-Scrn-1', 'TB-01:DI-Scrn-2', + 'TB-02:DI-Scrn-1', 'TB-02:DI-Scrn-2', + 'TB-03:DI-Scrn', 'TB-04:DI-Scrn'] + elif sec == 'BO': + return ['BO-01D:DI-Scrn-1', 'BO-01D:DI-Scrn-2', + 'BO-02U:DI-Scrn'] + elif sec == 'TS': + return ['TS-01:DI-Scrn', 'TS-02:DI-Scrn', + 'TS-03:DI-Scrn', 'TS-04:DI-Scrn-1', + 'TS-04:DI-Scrn-2', 'TS-04:DI-Scrn-3']
+ + + +
+[docs] +class ScrnSummary(QWidget): + """Screen Summary.""" + + def __init__(self, parent=None, prefix=_VACA_PREFIX, scrn=''): + """Init.""" + super().__init__(parent=parent) + self._prefix = prefix + self._scrn = scrn + self._setupUi() + + def _setupUi(self): + hlay = QHBoxLayout(self) + hlay.addStretch() + pbt = QPushButton(self._scrn) + pbt.setStyleSheet("""min-width:10em;""") + util.connect_newprocess( + pbt, ['sirius-hla-as-di-scrn.py', '-p', self._prefix, self._scrn], + parent=self) + hlay.addWidget(pbt) + hlay.addStretch()
+ + + +
+[docs] +class SelectScrns(QWidget): + """Select Screens.""" + + def __init__(self, parent=None, prefix=_VACA_PREFIX, sec=''): + """Init.""" + super().__init__(parent=parent) + self._prefix = prefix + self._sec = sec + self.scrn_list = get_scrn_list(self._sec) + self.setObjectName(sec+'App') + self._setupUi() + + def _setupUi(self): + vlay = QVBoxLayout(self) + vlay.setSpacing(15) + self.setLayout(vlay) + + lab = QLabel('<h2>' + self._sec + ' Screens List</h2>', + alignment=Qt.AlignCenter) + vlay.addWidget(lab) + + for scrn in self.scrn_list: + scrn_wid = ScrnSummary(self, prefix=self._prefix, scrn=scrn) + vlay.addWidget(scrn_wid)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_scrns/main.html b/_modules/siriushla/as_di_scrns/main.html new file mode 100644 index 000000000..1079c0771 --- /dev/null +++ b/_modules/siriushla/as_di_scrns/main.html @@ -0,0 +1,806 @@ + + + + + + siriushla.as_di_scrns.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_di_scrns.main

+"""SiriusScrnView widget."""
+
+import os
+import time
+from threading import Thread
+from datetime import datetime
+import numpy as np
+from qtpy.QtWidgets import QGridLayout, QHBoxLayout, QFormLayout, QVBoxLayout,\
+    QSpacerItem, QWidget, QGroupBox, QCheckBox, QComboBox, QPushButton, \
+    QLabel, QMessageBox, QSizePolicy as QSzPlcy, QFileDialog, QTabWidget
+from qtpy.QtCore import Qt, Slot, Signal
+import qtawesome as qta
+
+from pydm.widgets import PyDMEnumComboBox, PyDMPushButton
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.namesys import SiriusPVName
+
+from siriushla import util
+from siriushla.widgets import PyDMLed, SiriusConnectionSignal, QSpinBoxPlus, \
+    SiriusLabel
+from siriushla.common.cam_basler import \
+    SiriusImageView as _SiriusImageView, \
+    create_propty_layout as _create_propty_layout
+from siriushla.as_di_scrns.scrn_details import \
+    ScrnSettingsDetails as _ScrnSettingsDetails
+from siriushla.as_ti_control import HLTriggerSimple
+
+
+
+[docs] +class SiriusScrnView(QWidget): + """ + Class to read Sirius screen cameras image data. + + To allow saving a grid correctly, control calibrationgrid_flag, which + indicates if the screen is in calibration grid position. + You can control it by using the method/Slot updateCalibrationGridFlag. + """ + + save_files = Signal() + + def __init__(self, parent=None, prefix=_VACA_PREFIX, device=None): + """Initialize object.""" + QWidget.__init__(self, parent=parent) + self.prefix = prefix + self.device = SiriusPVName(device) + self.scrn_prefix = self.device.substitute(prefix=prefix) + self._receivedData = False + self.setObjectName(self.scrn_prefix.sec+'App') + + self.screen_type_conn = SiriusConnectionSignal( + self.scrn_prefix.substitute(propty='ScrnType-Sts')) + self.screen_type_conn.new_value_signal.connect( + self.updateCalibrationGridFlag) + self._calibrationgrid_flag = self.screen_type_conn.getvalue() + self.save_files.connect(self._saveGridLocalFiles) + self.ch_ImgROIHeight = SiriusConnectionSignal( + self.scrn_prefix.substitute(propty='ImgROIHeight-RB')) + self.ch_ImgROIWidth = SiriusConnectionSignal( + self.scrn_prefix.substitute(propty='ImgROIWidth-RB')) + self.ch_ImgROIOffsetX = SiriusConnectionSignal( + self.scrn_prefix.substitute(propty='ImgROIOffsetX-RB')) + self.ch_ImgROIOffsetY = SiriusConnectionSignal( + self.scrn_prefix.substitute(propty='ImgROIOffsetY-RB')) + + self._setupUi() + self.setFocus(True) + self.setFocusPolicy(Qt.StrongFocus) + self._loadCalibrationGrid(default=True) + + @property + def calibrationgrid_flag(self): + """Indicate if the screen device is in calibration grid position.""" + return self._calibrationgrid_flag + +
+[docs] + @Slot(int) + def updateCalibrationGridFlag(self, new_state): + """Update calibrationgrid_flag property.""" + self._calibrationgrid_flag = new_state + if new_state == 1: + self.pushbutton_savegrid.setEnabled(True) + else: + self.pushbutton_savegrid.setEnabled(False)
+ + + def _setupUi(self): + self.cameraview_widget = QWidget() + self.cameraview_widget.setLayout(self._cameraviewLayout()) + + self.settings_widget = QWidget(self) + self.settings_widget.setLayout(self._settingsLayout()) + self.settings_widget.setStyleSheet(""" + .QLabel{ + min-width: 5em;} + QLabel{ + qproperty-alignment: AlignCenter;}""") + + self.calibrationgrid_widget = QWidget(self) + self.calibrationgrid_widget.setLayout(self._calibrationgridLayout()) + self.calibrationgrid_widget.setSizePolicy( + QSzPlcy.Expanding, QSzPlcy.Expanding) + self.calibrationgrid_widget.layout().setAlignment(Qt.AlignHCenter) + self.tab = QTabWidget(self) + self.tab.setStyleSheet(""" + QTabWidget::pane { + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }""") + self.tab.addTab(self.settings_widget, 'Camera Settings') + self.tab.addTab(self.calibrationgrid_widget, 'Calibration') + + self.statistics_groupBox = QGroupBox('Statistics', self) + self.statistics_groupBox.setLayout(self._statisticsLayout()) + self.statistics_groupBox.setSizePolicy( + QSzPlcy.Expanding, QSzPlcy.Expanding) + self.statistics_groupBox.setStyleSheet(""" + .QLabel{ + min-width:0.28em; max-width:0.28em; + min-height:1.29em; max-height:1.29em;} + QLabel{ + qproperty-alignment: AlignCenter;} + PyDMWidget{ + min-width:4.84em; max-width:4.84em; + min-height:1.29em; max-height:1.29em;}""") + + self.trigger_groupBox = QGroupBox('Trigger', self) + if 'TB' in self.device or 'BO' in self.device: + trg_prefix = 'AS-Fam:TI-Scrn-TBBO' + elif 'TS' in self.device: + trg_prefix = 'TS-Fam:TI-Scrn' + hbl = QHBoxLayout(self.trigger_groupBox) + hbl.addWidget(HLTriggerSimple( + parent=self.trigger_groupBox, device=trg_prefix, + prefix=self.prefix)) + self.trigger_groupBox.setLayout(hbl) + self.trigger_groupBox.setStyleSheet(""" + PyDMWidget{ + min-width:4.84em; max-width:4.84em; + min-height:1.29em; max-height:1.29em;}""") + + vlay = QVBoxLayout() + vlay.addWidget(self.statistics_groupBox) + vlay.addWidget(self.trigger_groupBox) + vlay.setSpacing(10) + + lay = QGridLayout(self) + lay.setHorizontalSpacing(10) + lay.setVerticalSpacing(10) + lay.addWidget(self.cameraview_widget, 0, 0, 1, 2) + lay.addWidget(self.tab, 1, 0) + lay.addLayout(vlay, 1, 1) + lay.setRowStretch(0, 15) + lay.setRowStretch(1, 7) + + def _cameraviewLayout(self): + label = QLabel(self.device, self) + label.setStyleSheet("""font-weight: bold;max-height:1.29em;""") + label.setAlignment(Qt.AlignCenter) + self.image_view = _SiriusImageView( + parent=self, + image_channel=self.scrn_prefix.substitute( + propty='ImgData-Mon'), + width_channel=self.scrn_prefix.substitute( + propty='ImgROIWidth-RB'), + offsetx_channel=self.scrn_prefix.substitute( + propty='ImgROIOffsetX-RB'), + offsety_channel=self.scrn_prefix.substitute( + propty='ImgROIOffsetY-RB'), + maxwidth_channel=self.scrn_prefix.substitute( + propty='ImgMaxWidth-Cte'), + maxheight_channel=self.scrn_prefix.substitute( + propty='ImgMaxHeight-Cte')) + self.image_view.setObjectName('ScrnView') + self.image_view.normalizeData = True + self.image_view.readingOrder = self.image_view.Clike + self.image_view.maxRedrawRate = 15 + self.image_view.setStyleSheet(""" + #ScrnView{min-width:30em; min-height:24em;}""") + self.image_view.failToSaveGrid.connect(self._showFailToSaveGridMsg) + self.image_view.receivedData.connect(self._setReceivedDataFlag) + + lay = QGridLayout() + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(label, 0, 1) + lay.addItem(QSpacerItem(40, 2, QSzPlcy.Preferred, QSzPlcy.Fixed), 1, 1) + lay.addWidget(self.image_view, 2, 1) + return lay + + def _calibrationgridLayout(self): + self.checkBox_showgrid = QCheckBox('Show', self) + self.checkBox_showgrid.setEnabled(False) + self.checkBox_showgrid.setStyleSheet(""" + min-width:4em; max-width:4em; + min-height:1.29em; max-height:1.29em;""") + self.checkBox_showgrid.toggled.connect( + self.image_view.showCalibrationGrid) + self.pushbutton_savegrid = QPushButton('Save', self) + self.pushbutton_savegrid.setEnabled(False) + self.pushbutton_savegrid.setStyleSheet(""" + min-width:4em; max-width:4em; + min-height:1.29em; max-height:1.29em;""") + self.pushbutton_savegrid.clicked.connect(self._saveCalibrationGrid) + self.pushbutton_loadgrid = QPushButton('Load', self) + self.pushbutton_loadgrid.setStyleSheet(""" + min-width:4em; max-width:4em; + min-height:1.29em; max-height:1.29em;""") + self.pushbutton_loadgrid.clicked.connect(self._loadCalibrationGrid) + hbox_grid = QHBoxLayout() + hbox_grid.addWidget(self.checkBox_showgrid) + hbox_grid.addWidget(self.pushbutton_savegrid) + hbox_grid.addWidget(self.pushbutton_loadgrid) + + lb = QLabel('Show levels <') + lb.setStyleSheet("min-width:7em;max-width:7em;") + self.spinbox_gridfilterfactor = QSpinBoxPlus() + self.spinbox_gridfilterfactor.setMaximum(100) + self.spinbox_gridfilterfactor.setMinimum(0) + self.spinbox_gridfilterfactor.setValue( + self.image_view.calibration_grid_filterfactor) + self.spinbox_gridfilterfactor.editingFinished.connect( + self._setCalibrationGridFilterFactor) + self.spinbox_gridfilterfactor.setStyleSheet(""" + min-width:4em; max-width:4em;""") + hbox_filter = QHBoxLayout() + hbox_filter.setSpacing(0) + hbox_filter.addWidget(lb) + hbox_filter.addWidget(self.spinbox_gridfilterfactor) + hbox_filter.addWidget(QLabel(' %')) + + lb = QLabel('Remove border: ') + lb.setStyleSheet("min-width:7em;max-width:7em;") + self.spinbox_removeborder = QSpinBoxPlus() + self.spinbox_removeborder.setMaximum(512) + self.spinbox_removeborder.setMinimum(0) + self.spinbox_removeborder.setValue( + self.image_view.calibration_grid_removeborder) + self.spinbox_removeborder.editingFinished.connect( + self._setCalibrationGridBorder2Remove) + self.spinbox_removeborder.setStyleSheet(""" + min-width:4em; max-width:4em;""") + hbox_remove = QHBoxLayout() + hbox_remove.setSpacing(0) + hbox_remove.addWidget(lb) + hbox_remove.addWidget(self.spinbox_removeborder) + hbox_remove.addWidget(QLabel(' px')) + + hbox_EnblLED = _create_propty_layout( + parent=self, prefix=self.scrn_prefix, propty='EnblLED', + propty_type='enbldisabl', width=4.68) + + lay = QFormLayout() + lay.addItem(QSpacerItem(1, 10, QSzPlcy.Ignored, QSzPlcy.Preferred)) + lay.addRow(' Grid: ', hbox_grid) + lay.addItem(QSpacerItem(1, 10, QSzPlcy.Ignored, QSzPlcy.Preferred)) + lay.addRow(' ', hbox_filter) + lay.addRow(' ', hbox_remove) + lay.addItem(QSpacerItem(1, 20, QSzPlcy.Ignored, QSzPlcy.Preferred)) + lay.addRow(' LED: ', hbox_EnblLED) + lay.addItem(QSpacerItem(1, 10, QSzPlcy.Ignored, QSzPlcy.Preferred)) + lay.setLabelAlignment(Qt.AlignRight) + lay.setFormAlignment(Qt.AlignCenter) + return lay + + def _settingsLayout(self): + label_CamEnbl = QLabel('Enable: ', self) + hbox_CamEnbl = _create_propty_layout( + parent=self, prefix=self.scrn_prefix, propty='CamEnbl', + propty_type='enbldisabl') + + label_CamAcqPeriod = QLabel('Acquire\nPeriod [s]:', self) + hbox_CamAcqPeriod = _create_propty_layout( + parent=self, prefix=self.scrn_prefix, propty='CamAcqPeriod', + propty_type='sprb', width=5.0) + + label_CamExposureTime = QLabel('Exposure\nTime [us]:', self) + hbox_CamExposureTime = _create_propty_layout( + parent=self, prefix=self.scrn_prefix, propty='CamExposureTime', + propty_type='sprb', width=5.0) + + label_CamGain = QLabel('Gain[dB]:', self) + hbox_CamGain = _create_propty_layout( + parent=self, prefix=self.scrn_prefix, propty='CamGain', width=5.0, + propty_type='sprb') + + label_AutoGain = QLabel('Auto Gain: ', self) + self.pb_autogain = PyDMPushButton( + label='', icon=qta.icon('mdi.auto-fix'), + parent=self, pressValue=1, + init_channel=self.scrn_prefix.substitute(propty='CamAutoGain-Cmd')) + self.pb_autogain.setObjectName('autog') + self.pb_autogain.setStyleSheet( + "#autog{min-width:25px; max-width:25px; icon-size:20px;}") + + cam_prefix = SiriusPVName(self.scrn_prefix).substitute(dev='ScrnCam') + label_Reset = QLabel('Reset: ', self) + self.pb_dtl = PyDMPushButton( + label='', icon=qta.icon('fa5s.sync'), + parent=self, pressValue=1, + init_channel=cam_prefix.substitute(propty='Rst-Cmd')) + self.pb_dtl.setObjectName('reset') + self.pb_dtl.setStyleSheet( + "#reset{min-width:25px; max-width:25px; icon-size:20px;}") + + self.pb_details = QPushButton(qta.icon('fa5s.ellipsis-h'), '', self) + self.pb_details.setToolTip('More settings') + self.pb_details.setObjectName('detail') + self.pb_details.setStyleSheet( + "#detail{min-width:25px; max-width:25px; icon-size:20px;}") + self.pb_details.setSizePolicy(QSzPlcy.Expanding, QSzPlcy.Preferred) + util.connect_window(self.pb_details, _ScrnSettingsDetails, + parent=self, prefix=self.prefix, + device=self.device) + + hbox_aux = QHBoxLayout() + hbox_aux.addWidget(self.pb_dtl, alignment=Qt.AlignLeft) + hbox_aux.addWidget(self.pb_details, alignment=Qt.AlignRight) + + lay = QFormLayout() + lay.setFormAlignment(Qt.AlignCenter) + lay.addRow(label_CamEnbl, hbox_CamEnbl) + lay.addRow(label_CamAcqPeriod, hbox_CamAcqPeriod) + lay.addRow(label_CamExposureTime, hbox_CamExposureTime) + lay.addRow(label_CamGain, hbox_CamGain) + lay.addRow(label_AutoGain, self.pb_autogain) + lay.addRow(label_Reset, hbox_aux) + return lay + + def _statisticsLayout(self): + # - Method + label_Method = QLabel('CalcMethod:', self) + label_Method.setStyleSheet("min-width:7em;") + + self.comboBox_Method = QComboBox(self) + self.comboBox_Method.addItem('DimFei', 0) + self.comboBox_Method.addItem('NDStats', 1) + self.comboBox_Method.setCurrentIndex(0) + self.comboBox_Method.setStyleSheet(""" + QComboBox::item {height: 1em;} + QComboBox{min-width:6em;}""") + self.comboBox_Method.currentIndexChanged.connect( + self._handleShowStatistics) + + # - Centroid + label_Centroid = QLabel('Centroid [mm]: ', self) + label_Centroid.setStyleSheet("min-width:7em;") + label_i_Center = QLabel('(', self) + self.lb_CenterXDimFei = SiriusLabel( + parent=self, init_channel=self.scrn_prefix.substitute( + propty='CenterXDimFei-Mon')) + self.lb_CenterXDimFei.setStyleSheet( + 'min-width:4em; max-width:4em;') + self.lb_CenterXNDStats = SiriusLabel( + parent=self, init_channel=self.scrn_prefix.substitute( + propty='CenterXNDStats-Mon')) + self.lb_CenterXNDStats.setStyleSheet( + 'min-width:4em; max-width:4em;') + self.lb_CenterXNDStats.setVisible(False) + label_m_Center = QLabel(',', self) + self.lb_CenterYDimFei = SiriusLabel( + parent=self, init_channel=self.scrn_prefix.substitute( + propty='CenterYDimFei-Mon')) + self.lb_CenterYDimFei.setStyleSheet( + 'min-width:4em; max-width:4em;') + self.lb_CenterYNDStats = SiriusLabel( + parent=self, init_channel=self.scrn_prefix.substitute( + propty='CenterYNDStats-Mon')) + self.lb_CenterYNDStats.setStyleSheet( + 'min-width:4em; max-width:4em;') + self.lb_CenterYNDStats.setVisible(False) + label_f_Center = QLabel(')', self) + + # - Sigma + label_Sigma = QLabel('Sigma [mm]: ', self) + label_Sigma.setStyleSheet("min-width:7em;") + label_i_Sigma = QLabel('(', self) + self.lb_SigmaXDimFei = SiriusLabel( + parent=self, init_channel=self.scrn_prefix.substitute( + propty='SigmaXDimFei-Mon')) + self.lb_SigmaXDimFei.setStyleSheet( + 'min-width:4em; max-width:4em;') + self.lb_SigmaXNDStats = SiriusLabel( + parent=self, init_channel=self.scrn_prefix.substitute( + propty='SigmaXNDStats-Mon')) + self.lb_SigmaXNDStats.setStyleSheet( + 'min-width:4em; max-width:4em;') + self.lb_SigmaXNDStats.setVisible(False) + label_m_Sigma = QLabel(',', self) + self.lb_SigmaYDimFei = SiriusLabel( + parent=self, init_channel=self.scrn_prefix.substitute( + propty='SigmaYDimFei-Mon')) + self.lb_SigmaYDimFei.setStyleSheet( + 'min-width:4em; max-width:4em;') + self.lb_SigmaYNDStats = SiriusLabel( + parent=self, init_channel=self.scrn_prefix.substitute( + propty='SigmaYNDStats-Mon')) + self.lb_SigmaYNDStats.setStyleSheet( + 'min-width:4em; max-width:4em;') + self.lb_SigmaYNDStats.setVisible(False) + label_f_Sigma = QLabel(')', self) + + # - Theta + label_Theta = QLabel('Theta [rad]: ') + label_Theta.setStyleSheet("min-width:7em;") + label_i_Theta = QLabel('(', self) + self.lb_ThetaDimFei = SiriusLabel( + parent=self, init_channel=self.scrn_prefix.substitute( + propty='ThetaDimFei-Mon')) + self.lb_ThetaDimFei.setStyleSheet("max-width:12em;") + self.lb_ThetaNDStats = SiriusLabel( + parent=self, init_channel=self.scrn_prefix.substitute( + propty='ThetaNDStats-Mon')) + self.lb_ThetaNDStats.setStyleSheet("max-width:12em;") + self.lb_ThetaNDStats.setVisible(False) + label_f_Theta = QLabel(')', self) + + lay = QGridLayout() + lay.addWidget(label_Method, 1, 1, 1, 3) + lay.addWidget(self.comboBox_Method, 1, 3, 1, 3) + lay.addWidget(label_Centroid, 3, 1, alignment=Qt.AlignCenter) + lay.addWidget(label_i_Center, 3, 2) + lay.addWidget(self.lb_CenterXDimFei, 3, 3) + lay.addWidget(self.lb_CenterXNDStats, 3, 3) + lay.addWidget(label_m_Center, 3, 4) + lay.addWidget(self.lb_CenterYDimFei, 3, 5) + lay.addWidget(self.lb_CenterYNDStats, 3, 5) + lay.addWidget(label_f_Center, 3, 6) + lay.addWidget(label_Sigma, 5, 1, alignment=Qt.AlignCenter) + lay.addWidget(label_i_Sigma, 5, 2) + lay.addWidget(self.lb_SigmaXDimFei, 5, 3) + lay.addWidget(self.lb_SigmaXNDStats, 5, 3) + lay.addWidget(label_m_Sigma, 5, 4) + lay.addWidget(self.lb_SigmaYDimFei, 5, 5) + lay.addWidget(self.lb_SigmaYNDStats, 5, 5) + lay.addWidget(label_f_Sigma, 5, 6) + lay.addWidget(label_Theta, 7, 1, alignment=Qt.AlignCenter) + lay.addWidget(label_i_Theta, 7, 2) + lay.addWidget(self.lb_ThetaDimFei, 7, 3, 1, 3) + lay.addWidget(self.lb_ThetaNDStats, 7, 3, 1, 3) + lay.addWidget(label_f_Theta, 7, 6) + return lay + + def _handleShowStatistics(self, visible): + self.lb_CenterXDimFei.setVisible(not visible) + self.lb_CenterXNDStats.setVisible(visible) + self.lb_CenterYDimFei.setVisible(not visible) + self.lb_CenterYNDStats.setVisible(visible) + self.lb_ThetaDimFei.setVisible(not visible) + self.lb_ThetaNDStats.setVisible(visible) + self.lb_SigmaXDimFei.setVisible(not visible) + self.lb_SigmaXNDStats.setVisible(visible) + self.lb_SigmaYDimFei.setVisible(not visible) + self.lb_SigmaYNDStats.setVisible(visible) + + def _saveCalibrationGrid(self): + t = Thread(target=self._saveCalibrationGrid_thread, daemon=True) + t.start() + + def _saveCalibrationGrid_thread(self): + roi_h = float(self.ch_ImgROIHeight.value) + roi_w = float(self.ch_ImgROIWidth.value) + roi_offsetx = float(self.ch_ImgROIOffsetX.value) + roi_offsety = float(self.ch_ImgROIOffsetY.value) + + cond = roi_h != float(self.image_view.image_maxheight) or \ + roi_w != float(self.image_view.image_maxwidth) or \ + roi_offsetx != 0 or roi_offsety != 0 + if cond: + # Disable camera acquisition and wait for disabling + self.PyDMStateButton_CamEnbl.send_value_signal[int].emit(0) + state = self.SiriusLedState_CamEnbl.state + while state == 1: + time.sleep(0.1) + state = self.SiriusLedState_CamEnbl.state + + # Change ROI to get entire image + self.ch_ImgROIHeight.send_value_signal[float].emit( + float(self.image_view.image_maxheight)) + self.ch_ImgROIWidth.send_value_signal[float].emit( + float(self.image_view.image_maxwidth)) + self.ch_ImgROIOffsetX.send_value_signal[float].emit(0) + self.ch_ImgROIOffsetY.send_value_signal[float].emit(0) + + # Enable led and wait for status + self.PyDMStateButton_EnblLED.send_value_signal[int].emit(1) + while not self.SiriusLedState_EnblLED.state: + time.sleep(0.1) + + # Enable camera acquisition and wait for receiveing first frame + self._receivedData = False + self.PyDMStateButton_CamEnbl.send_value_signal[int].emit(1) + while not self._receivedData: + time.sleep(0.1) + + # Save grid + self.image_view.saveCalibrationGrid() + + if cond: + # Disable camera acquisition and wait for disabling + self.PyDMStateButton_CamEnbl.send_value_signal[int].emit(0) + state = self.SiriusLedState_CamEnbl.state + while state == 1: + time.sleep(0.1) + state = self.SiriusLedState_CamEnbl.state + + # Change ROI to original size + self.ch_ImgROIHeight.send_value_signal[float].emit(roi_h) + self.ch_ImgROIWidth.send_value_signal[float].emit(roi_w) + self.ch_ImgROIOffsetX.send_value_signal[float].emit(roi_offsetx) + self.ch_ImgROIOffsetY.send_value_signal[float].emit(roi_offsety) + + # Enable camera acquisition + self.PyDMStateButton_CamEnbl.send_value_signal[int].emit(1) + + # Enable showing saved grid + time.sleep(0.1) + self.checkBox_showgrid.setEnabled(True) + self.save_files.emit() + + def _saveGridLocalFiles(self): + home = os.path.expanduser('~') + folder_month = datetime.now().strftime('%Y-%m') + folder_day = datetime.now().strftime('%Y-%m-%d') + path = os.path.join( + home, 'shared', 'screens-iocs', folder_month, folder_day) + if not os.path.exists(path): + os.makedirs(path) + fn, _ = QFileDialog.getSaveFileName( + self, 'Save Grid As...', path + '/' + self.device + + datetime.now().strftime('_%Y-%m-%d_%Hh%Mmin'), '*.npy') + if not fn: + return False + + path_default = os.path.join(home, 'shared', 'screens-iocs', 'default') + if not os.path.exists(path_default): + os.makedirs(path_default) + fn_default = path_default + '/' + self.device + + grid = self.image_view.calibrationGrid + width = self.image_view.imageWidth + data = np.append(width, grid) + np.save(fn, data) + np.save(fn_default, data) + + def _loadCalibrationGrid(self, default=False): + home = os.path.expanduser('~') + if not default: + folder_month = datetime.now().strftime('%Y-%m') + path = os.path.join( + home, 'shared', 'screens-iocs', folder_month) + fn, _ = QFileDialog.getOpenFileName( + self, 'Load Grid...', path, '*.npy') + if not fn: + return + if self.device not in fn: + ans = QMessageBox.question( + self, 'Warning', + 'The name of the selected file does not contain the name' + + ' of this screen. Are you sure you\'re loading this grid?', + QMessageBox.Yes, QMessageBox.Cancel) + if ans == QMessageBox.Cancel: + return + else: + path = os.path.join( + home, 'shared', 'screens-iocs', 'default') + fn = path + '/' + self.device + '.npy' + + try: + data = np.load(fn) + self.image_view.calibrationGrid = data + except Exception as e: + if not default: + QMessageBox.critical( + self, 'Error', + 'Could not load calibration grid from file '+fn+'. ' + + '\nError message: '+str(e), + QMessageBox.Ok) + return + + # Enable showing saved grid + self.checkBox_showgrid.setEnabled(True) + + def _setReceivedDataFlag(self): + self._receivedData = True + + def _setCalibrationGridFilterFactor(self): + self.image_view.set_calibration_grid_filterfactor( + self.spinbox_gridfilterfactor.value()) + + def _setCalibrationGridBorder2Remove(self): + self.image_view.set_calibration_grid_border2remove( + self.spinbox_removeborder.value()) + + @Slot() + def _showFailToSaveGridMsg(self): + QMessageBox.warning(self, 'Warning', + 'Could not save calibration grid!', + QMessageBox.Ok)
+ + + +
+[docs] +class IndividualScrn(QWidget): + """Individual Screen.""" + + def __init__(self, parent=None, prefix=_VACA_PREFIX, scrn=''): + """Init.""" + super().__init__(parent=parent) + self._prefix = prefix + self._scrn = SiriusPVName(scrn) + self._scrn_pref = self._scrn.substitute(prefix=prefix) + self.setObjectName(self._scrn.sec+'App') + self._setupUi() + + def _setupUi(self): + self.scrn_view = SiriusScrnView(prefix=self._prefix, device=self._scrn) + self.cb_scrntype = PyDMEnumComboBox( + self, self._scrn_pref.substitute(propty='ScrnType-Sel')) + self.l_scrntype = SiriusLabel( + self, self._scrn_pref.substitute(propty='ScrnType-Sts')) + self.led_scrntype = PyDMLed( + self, self._scrn_pref.substitute(propty='ScrnType-Sts'), + color_list=[PyDMLed.LightGreen, PyDMLed.Red, PyDMLed.Red, + PyDMLed.Yellow]) + self.led_scrntype.shape = 2 + + lay = QGridLayout() + lay.addWidget(QLabel('<h3>Screen View</h3>', + self, alignment=Qt.AlignCenter), 0, 0, 1, 4) + lay.addItem(QSpacerItem(20, 20, QSzPlcy.Fixed, QSzPlcy.Fixed), 1, 0) + lay.addWidget(QLabel('Select Screen Type: ', self, + alignment=Qt.AlignRight), 2, 0) + lay.addWidget(self.cb_scrntype, 2, 1) + lay.addWidget(self.l_scrntype, 2, 2) + lay.addWidget(self.led_scrntype, 2, 3) + + lay.addItem(QSpacerItem(20, 40, QSzPlcy.Fixed, QSzPlcy.Fixed), 4, 0) + lay.addWidget(self.scrn_view, 5, 0, 1, 4) + self.setLayout(lay)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_scrns/scrn_calib.html b/_modules/siriushla/as_di_scrns/scrn_calib.html new file mode 100644 index 000000000..e1b822d83 --- /dev/null +++ b/_modules/siriushla/as_di_scrns/scrn_calib.html @@ -0,0 +1,336 @@ + + + + + + siriushla.as_di_scrns.scrn_calib — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_di_scrns.scrn_calib

+"""SiriusScrnView widget."""
+
+from qtpy.QtWidgets import QFormLayout, QSizePolicy as QSzPlcy, QVBoxLayout, \
+                           QSpacerItem, QGroupBox, QLabel
+from qtpy.QtCore import Qt
+from siriuspy.namesys import SiriusPVName
+from siriushla.widgets.windows import SiriusDialog
+from siriushla.common.cam_basler import \
+    create_propty_layout as _create_propty_layout
+
+
+
+[docs] +class ScrnCalibrationSettings(SiriusDialog): + """Scrn Calibration Settings Dialog.""" + + def __init__(self, parent=None, device=None, prefix=None): + """Init.""" + super().__init__(parent=parent) + self.prefix = prefix + self.device = SiriusPVName(device) + self.scrn_prefix = self.device.substitute(prefix=self.prefix) + self.setWindowTitle('Screen Calibration') + self.setObjectName(self.scrn_prefix.sec+'App') + self._setupUi() + + def _setupUi(self): + label = QLabel('<h3>'+self.scrn_prefix+' Calibration</h3>', self, + alignment=Qt.AlignCenter) + + positioning = QGroupBox('Positioning', self) + positioning.setStyleSheet(""" + .QLabel{ + min-width:16em;\nmax-width:16em; + qproperty-alignment: AlignRight;\n}""") + positioning.setLayout(self._setupPositionLayout()) + + LED = QGroupBox('LED Brightness', self) + LED.setStyleSheet(""" + .QLabel{ + min-width:11em;\nmax-width:11em; + qproperty-alignment: AlignRight;\n}""") + LED.setLayout(self._setupLEDLayout()) + + Img = QGroupBox('Statistics Unit Conversion (Pixels→mm)', self) + Img.setStyleSheet(""" + .QLabel{ + min-width:12em;\nmax-width:12em; + qproperty-alignment: AlignRight;\n}""") + Img.setLayout(self._setupImageCalibLayout()) + + vlay = QVBoxLayout() + vlay.addWidget(label) + vlay.addItem( + QSpacerItem(1, 10, QSzPlcy.Fixed, QSzPlcy.MinimumExpanding)) + vlay.addWidget(positioning) + vlay.addItem( + QSpacerItem(1, 10, QSzPlcy.Fixed, QSzPlcy.MinimumExpanding)) + vlay.addWidget(LED) + vlay.addItem( + QSpacerItem(1, 10, QSzPlcy.Fixed, QSzPlcy.MinimumExpanding)) + vlay.addWidget(Img) + self.setLayout(vlay) + + def _setupPositionLayout(self): + label_AcceptedErr = QLabel('Error Tolerance [mm]: ', self) + hbox_AcceptedErr = _create_propty_layout( + parent=self, prefix=self.scrn_prefix, propty='AcceptedErr', + propty_type='sprb') + + label_FluorScrnPos = QLabel('Fluorescent Screen Position [mm]: ', self) + hbox_FluorScrnPos = _create_propty_layout( + parent=self, prefix=self.scrn_prefix, propty='FluorScrnPos', + propty_type='sprb', cmd={'label': 'Get Position', + 'pressValue': 1, + 'name': 'GetFluorScrnPos'}) + + label_CalScrnPos = QLabel('Calibration Screen Position [mm]: ', self) + hbox_CalScrnPos = _create_propty_layout( + parent=self, prefix=self.scrn_prefix, propty='CalScrnPos', + propty_type='sprb', cmd={'label': 'Get Position', + 'pressValue': 1, + 'name': 'GetCalScrnPos'}) + + label_NoneScrnPos = QLabel('Receded Screen Position [mm]: ', self) + hbox_NoneScrnPos = _create_propty_layout( + parent=self, prefix=self.scrn_prefix, propty='NoneScrnPos', + propty_type='sprb', cmd={'label': 'Get Position', + 'pressValue': 1, + 'name': 'GetNoneScrnPos'}) + + flay_pos = QFormLayout() + flay_pos.addItem( + QSpacerItem(1, 10, QSzPlcy.Fixed, QSzPlcy.MinimumExpanding)) + flay_pos.addRow(label_AcceptedErr, hbox_AcceptedErr) + flay_pos.addRow(label_FluorScrnPos, hbox_FluorScrnPos) + flay_pos.addRow(label_CalScrnPos, hbox_CalScrnPos) + flay_pos.addRow(label_NoneScrnPos, hbox_NoneScrnPos) + flay_pos.addItem( + QSpacerItem(1, 10, QSzPlcy.Fixed, QSzPlcy.MinimumExpanding)) + flay_pos.setLabelAlignment(Qt.AlignRight) + flay_pos.setFormAlignment(Qt.AlignCenter) + return flay_pos + + def _setupLEDLayout(self): + label_LedPwrLvl = QLabel('Intensity [%]: ', self) + hbox_LedPwrLvl = _create_propty_layout( + parent=self, prefix=self.scrn_prefix, propty='LEDPwrLvl', + propty_type='sprb') + + label_LedPwrScaleFactor = QLabel('Power Scale Factor: ', self) + hbox_LedPwrScaleFactor = _create_propty_layout( + parent=self, prefix=self.scrn_prefix, propty='LEDPwrScaleFactor', + propty_type='sprb') + + label_LedThold = QLabel('Voltage Threshold [V]: ', self) + hbox_LedThold = _create_propty_layout( + parent=self, prefix=self.scrn_prefix, propty='LEDThold', + propty_type='sprb') + + flay_LED = QFormLayout() + flay_LED.addItem( + QSpacerItem(1, 10, QSzPlcy.Fixed, QSzPlcy.MinimumExpanding)) + flay_LED.addRow(label_LedPwrLvl, hbox_LedPwrLvl) + flay_LED.addRow(label_LedPwrScaleFactor, hbox_LedPwrScaleFactor) + flay_LED.addRow(label_LedThold, hbox_LedThold) + flay_LED.addItem( + QSpacerItem(1, 10, QSzPlcy.Fixed, QSzPlcy.MinimumExpanding)) + flay_LED.setLabelAlignment(Qt.AlignRight) + flay_LED.setFormAlignment(Qt.AlignCenter) + return flay_LED + + def _setupImageCalibLayout(self): + cam_prefix = SiriusPVName(self.scrn_prefix).substitute(dev='ScrnCam') + + label_ImgScaleFactorX = QLabel('Scale Factor X: ', self) + hbox_ImgScaleFactorX = _create_propty_layout( + parent=self, prefix=cam_prefix, propty='ScaleFactorX', + propty_type='sprb') + + label_ImgScaleFactorY = QLabel('Scale Factor Y: ', self) + hbox_ImgScaleFactorY = _create_propty_layout( + parent=self, prefix=cam_prefix, propty='ScaleFactorY', + propty_type='sprb') + + label_ImgCenterOffsetX = QLabel('Center Offset X [pixels]: ', self) + hbox_ImgCenterOffsetX = _create_propty_layout( + parent=self, prefix=cam_prefix, propty='CenterOffsetX', + propty_type='sprb') + + label_ImgCenterOffsetY = QLabel('Center Offset Y [pixels]: ', self) + hbox_ImgCenterOffsetY = _create_propty_layout( + parent=self, prefix=cam_prefix, propty='CenterOffsetY', + propty_type='sprb') + + label_ImgThetaOffset = QLabel('Theta Offset [pixels]: ', self) + hbox_ImgThetaOffset = _create_propty_layout( + parent=self, prefix=cam_prefix, propty='ThetaOffset', + propty_type='sprb') + + flay_Img = QFormLayout() + flay_Img.addItem( + QSpacerItem(1, 10, QSzPlcy.Fixed, QSzPlcy.MinimumExpanding)) + flay_Img.addRow(label_ImgScaleFactorX, hbox_ImgScaleFactorX) + flay_Img.addRow(label_ImgScaleFactorY, hbox_ImgScaleFactorY) + flay_Img.addRow(label_ImgCenterOffsetX, hbox_ImgCenterOffsetX) + flay_Img.addRow(label_ImgCenterOffsetY, hbox_ImgCenterOffsetY) + flay_Img.addRow(label_ImgThetaOffset, hbox_ImgThetaOffset) + flay_Img.addItem( + QSpacerItem(1, 10, QSzPlcy.Fixed, QSzPlcy.MinimumExpanding)) + flay_Img.setLabelAlignment(Qt.AlignRight) + flay_Img.setFormAlignment(Qt.AlignCenter) + return flay_Img
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_scrns/scrn_details.html b/_modules/siriushla/as_di_scrns/scrn_details.html new file mode 100644 index 000000000..7aab916d7 --- /dev/null +++ b/_modules/siriushla/as_di_scrns/scrn_details.html @@ -0,0 +1,246 @@ + + + + + + siriushla.as_di_scrns.scrn_details — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_di_scrns.scrn_details

+"""SiriusScrnView widget."""
+
+from qtpy.QtWidgets import QGridLayout, QFormLayout, \
+    QWidget, QGroupBox, QLabel, QPushButton, QVBoxLayout
+from qtpy.QtCore import Qt
+
+from siriuspy.namesys import SiriusPVName
+
+from siriushla import util
+
+from siriushla.widgets import SiriusMainWindow, SiriusLabel
+from siriushla.common.cam_basler import \
+    BaslerCamSettings as _BaslerCamSettings
+from siriushla.as_di_scrns.scrn_calib import \
+    ScrnCalibrationSettings as _ScrnCalibrationSettings
+
+
+
+[docs] +class ScrnSettingsDetails(SiriusMainWindow): + """Scrn Settings Details Window.""" + + def __init__(self, parent=None, device=None, prefix=None): + """Init.""" + super().__init__(parent=parent) + self.prefix = prefix + self.device = SiriusPVName(device) + self.scrn_prefix = self.device.substitute(prefix=prefix) + self.setWindowTitle('Screen Settings Details') + self.setObjectName(self.scrn_prefix.sec+'App') + self.centralwidget = QWidget(self) + self._setupUi() + self.setCentralWidget(self.centralwidget) + + def _setupUi(self): + label = QLabel('<h3>'+self.scrn_prefix+' Settings</h3>', self, + alignment=Qt.AlignCenter) + + gbox_general = QGroupBox('Low Level Devices Prefixes', self) + gbox_general.setLayout(self._setupGeneralInfoLayout()) + + gbox_cam = QGroupBox('Camera Settings', self) + gbox_cam.setLayout(self._setupCamSettingsLayout()) + + bt_cal = QPushButton('Screen Calibration', self) + util.connect_window(bt_cal, _ScrnCalibrationSettings, + parent=self, prefix=self.prefix, + device=self.device) + + lay = QVBoxLayout() + lay.setSpacing(15) + lay.addWidget(label) + lay.addWidget(gbox_general) + lay.addWidget(gbox_cam) + lay.addWidget(bt_cal, alignment=Qt.AlignRight) + self.centralwidget.setLayout(lay) + + def _setupGeneralInfoLayout(self): + label_MtrPrefix = QLabel('Motor Prefix: ', self) + self.lb_MtrPrefix = SiriusLabel( + self, self.scrn_prefix.substitute(propty='MtrCtrlPrefix-Cte')) + self.lb_MtrPrefix.setStyleSheet( + """max-width:14.20em; max-height:1.29em;""") + + label_CamPrefix = QLabel('Camera Prefix: ', self) + self.lb_CamPrefix = SiriusLabel( + self, self.scrn_prefix.substitute(propty='CamPrefix-Cte')) + self.lb_CamPrefix.setStyleSheet( + """max-width:14.20em; max-height:1.29em;""") + + flay = QFormLayout() + flay.addRow(label_MtrPrefix, self.lb_MtrPrefix) + flay.addRow(label_CamPrefix, self.lb_CamPrefix) + flay.setLabelAlignment(Qt.AlignRight) + flay.setFormAlignment(Qt.AlignCenter) + return flay + + def _setupCamSettingsLayout(self): + lay = QGridLayout() + camdev = self.device.substitute(dev='ScrnCam') + self._cam_settings = _BaslerCamSettings(self, camdev, self.prefix) + lay.addWidget(self._cam_settings, 0, 0) + return lay
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_tune/controls.html b/_modules/siriushla/as_di_tune/controls.html new file mode 100644 index 000000000..2f983d544 --- /dev/null +++ b/_modules/siriushla/as_di_tune/controls.html @@ -0,0 +1,663 @@ + + + + + + siriushla.as_di_tune.controls — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_di_tune.controls

+from qtpy.QtGui import QPalette
+from qtpy.QtCore import Qt, QEvent
+from qtpy.QtWidgets import QWidget, QLabel, QPushButton, QGridLayout, \
+    QFormLayout, QHBoxLayout, QSpacerItem, QSizePolicy as QSzPlcy, \
+    QTabWidget, QVBoxLayout, QApplication
+import qtawesome as qta
+
+from pydm.widgets import PyDMLineEdit, PyDMEnumComboBox, PyDMPushButton
+
+from siriuspy.namesys import SiriusPVName
+import siriushla.util as util
+from siriushla.widgets import PyDMLedMultiChannel, PyDMLed, PyDMStateButton, \
+    SiriusStringComboBox, SiriusLedState, SiriusConnectionSignal, \
+    SiriusLabel, SiriusSpinbox
+from .details import TuneDetails, SITuneMarkerDetails
+from .util import marker_color
+
+
+
+[docs] +class TuneControls(QWidget): + """Tune Controls.""" + + def __init__(self, parent=None, prefix='', section='', orientation='H', + background=None): + """Init.""" + super().__init__(parent) + self.prefix = prefix + self.section = section.upper() + self.orientation = orientation + self.device = SiriusPVName('AC-Glob:DI-Tune-O') + self.device = self.device.substitute( + sec=self.section, idx=self.orientation, prefix=self.prefix) + if self.section == 'BO': + self.trigger = SiriusPVName('BO-Glob:TI-TuneProc') + self.background = background + self._setupUi() + + def _setupUi(self): + # # Measurement + if self.section == 'SI': + # Tune + label_tunefreq = QLabel('Tune Frequency') + self.lb_tunefreq = SiriusLabel(self) + self.lb_tunefreq._unit = 'kHz' + self.lb_tunefreq.showUnits = True + self.lb_tunefreq.precisionFromPV = False + self.lb_tunefreq.precision = 3 + self.tunefreq_currval = 0.0 + self.freqrevn_currval = 0.0 + self.tunefreq_ch = SiriusConnectionSignal( + self.device.substitute(propty='TuneFreq-Mon')) + self.tunefreq_ch.new_value_signal[float].connect( + self._calc_tunefreq) + self.freqrevn_ch = SiriusConnectionSignal( + self.device.substitute(propty='FreqRevN-Mon')) + self.freqrevn_ch.new_value_signal[float].connect( + self._calc_tunefreq) + self.lb_tunefreq.setStyleSheet('min-width:8em;max-width:8em;') + label_tunefrac = QLabel('Tune Fraction') + self.lb_tunefrac = SiriusLabel( + self, self.device.substitute(propty='TuneFrac-Mon')) + self.lb_tunefrac.precisionFromPV = False + self.lb_tunefrac.precision = 4 + + # Acquisition + lbl_acq = QLabel('Acquisition', self) + self.bt_acq = PyDMStateButton( + self, self.device.substitute(propty='SpecAnaGetSpec-Sel')) + self.bt_acq.shape = 1 + self.led_acq = SiriusLedState( + self, self.device.substitute(propty='SpecAnaGetSpec-Sts')) + hbox_acq = QHBoxLayout() + hbox_acq.addWidget(self.bt_acq) + hbox_acq.addWidget(self.led_acq) + + # Drive Enable + lbl_drive = QLabel('Excitation', self) + self.bt_drive = PyDMStateButton( + self, self.device.substitute(propty='Enbl-Sel')) + self.bt_drive.shape = 1 + value = 0b111 if self.section == 'BO' else 1 + self.led_drive = PyDMLedMultiChannel( + parent=self, channels2values={ + self.device.substitute(propty='Enbl-Sts'): value}) + self.led_drive.setOffColor(PyDMLed.DarkGreen) + hbox_drive = QHBoxLayout() + hbox_drive.addWidget(self.bt_drive) + hbox_drive.addWidget(self.led_drive) + + if self.section == 'BO': + # Frame Count + lbl_acqcnt = QLabel('Frame Count', self) + dev = self.device.substitute(dev='TuneProc') + self.lb_acqcnt = SiriusLabel( + self, dev.substitute(propty='FrameCount-Mon')) + self.lb_acqcnt.setAlignment(Qt.AlignCenter) + self.led_acqcnt = PyDMLedMultiChannel(parent=self) + self.trigNrPulseChannel = SiriusConnectionSignal( + self.trigger.substitute( + prefix=self.prefix, propty='NrPulses-RB')) + self.trigNrPulseChannel.new_value_signal[int].connect( + self._updateNrAcq) + hbox_acqcnt = QHBoxLayout() + hbox_acqcnt.addWidget(self.lb_acqcnt) + hbox_acqcnt.addWidget(self.led_acqcnt) + + # Nr. Samples p/ spec + lbl_nrsmp = QLabel('Nr. Samples p/ Spec.', self) + self.lb_nrsmp = SiriusLabel( + parent=self, init_channel=self.device.substitute( + dev='TuneProc', propty_name='SwePts', + propty_suffix='RB')) + + if self.section == 'SI': + # Acquisition Time + lbl_acqtime = QLabel('Acq. Time', self) + self.cb_acqtime = PyDMEnumComboBox( + parent=self, init_channel=self.device.substitute( + dev='TuneProc', propty_name='Trace', + propty_suffix='Mon', field='SCAN')) + + # Sweep timeEnbl- + lbl_swetime = QLabel('Sweep Time [ms]', self) + self.lb_swetime = SiriusLabel( + parent=self, + init_channel=self.device.substitute( + dev='TuneProc', propty_name='SweTime', + propty_suffix='Mon')) + + # Span + lbl_span = QLabel('Span [kHz]', self) + self.le_span = PyDMLineEdit( + self, self.device.substitute(propty='Span-SP')) + self.le_span.precisionFromPV = True + self.lb_span = SiriusLabel( + self, self.device.substitute(propty='Span-RB')) + hbox_span = QHBoxLayout() + hbox_span.addWidget(self.le_span) + hbox_span.addWidget(self.lb_span) + + # RBW + lbl_rbw = QLabel('RBW', self) + if self.section == 'BO': + self.cb_rbw = PyDMEnumComboBox( + self, self.device.substitute(propty='SpecAnaRBW-Sel')) + else: + items = ['1 Hz', '2 Hz', '3 Hz', '5 Hz', + '10 Hz', '20 Hz', '30 Hz', '50 Hz', + '100 Hz', '200 Hz', '300 Hz', '500 Hz', + '1 kHz', '2 kHz', '3 kHz', '5 kHz', '6.25 kHz', + '10 kHz', '20 kHz', '30 kHz', '50 kHz', + '100 kHz', '200 kHz', '300 kHz', '500 kHz', + '1 MHz', '2 MHz', '3 MHz', '5 MHz', '10 MHz'] + self.cb_rbw = SiriusStringComboBox( + self, self.device.substitute(propty='SpecAnaRBW-Sel'), + items=items) + self.lb_rbw = SiriusLabel( + self, self.device.substitute(propty='SpecAnaRBW-Sts')) + hbox_rbw = QHBoxLayout() + hbox_rbw.addWidget(self.cb_rbw) + hbox_rbw.addWidget(self.lb_rbw) + + # Harmonic + lbl_h = QLabel('Harmonic (n)', self) + self.sb_h = SiriusSpinbox( + self, self.device.substitute(propty='RevN-SP')) + self.sb_h.precisionFromPV = True + self.lb_h = SiriusLabel( + self, self.device.substitute(propty='RevN-RB')) + hbox_h = QHBoxLayout() + hbox_h.addWidget(self.sb_h) + hbox_h.addWidget(self.lb_h) + + # Harmonic Frequency + lbl_Fh = QLabel('Harm. Freq. [kHz]', self) + self.lb_Fh = SiriusLabel(parent=self) + self.lb_Fh.setToolTip('Frf/(h*n)') + self.lb_Fh.channel = self.device.substitute(propty='FreqRevN-Mon') + + # Frequency Offset + lbl_foff = QLabel('Freq. Offset [kHz]', self) + self.sb_foff = SiriusSpinbox( + self, self.device.substitute(propty='FreqOff-SP')) + self.sb_foff.precisionFromPV = True + self.lb_foff = SiriusLabel( + self, self.device.substitute(propty='FreqOff-RB')) + hbox_foff = QHBoxLayout() + hbox_foff.addWidget(self.sb_foff) + hbox_foff.addWidget(self.lb_foff) + + # Center Frequency + lbl_Fc = QLabel('Center Freq. [MHz]', self) + self.le_Fc = PyDMLineEdit( + self, self.device.substitute(propty='CenterFreq-SP')) + self.le_Fc.precisionFromPV = True + self.lb_Fc = SiriusLabel( + self, self.device.substitute(propty='CenterFreq-RB')) + hbox_Fc = QHBoxLayout() + hbox_Fc.addWidget(self.le_Fc) + hbox_Fc.addWidget(self.lb_Fc) + + # Lock Center Freq. + lbl_autoFc = QLabel('Lock Center Freq. ', self) + self.bt_autoFc = PyDMStateButton( + self, self.device.substitute(propty='CenterFreqAuto-Sel')) + self.bt_autoFc.shape = 1 + self.led_autoFc = SiriusLedState( + self, self.device.substitute(propty='CenterFreqAuto-Sts')) + hbox_autoFc = QHBoxLayout() + hbox_autoFc.addWidget(self.bt_autoFc) + hbox_autoFc.addWidget(self.led_autoFc) + + if self.section == 'BO': + # # ROI + # StartX + lbl_roistartx = QLabel('Start X [MHz]', self) + self.le_roistartx = PyDMLineEdit( + self, self.device.substitute(propty='ROIOffsetX-SP')) + self.le_roistartx.precisionFromPV = True + self.lb_roistartx = SiriusLabel( + self, self.device.substitute(propty='ROIOffsetX-RB')) + hbox_roistartx = QHBoxLayout() + hbox_roistartx.addWidget(self.le_roistartx) + hbox_roistartx.addWidget(self.lb_roistartx) + + # Width + lbl_roiwidth = QLabel('Width [MHz]', self) + self.le_roiwidth = PyDMLineEdit( + self, self.device.substitute(propty='ROIWidth-SP')) + self.le_roiwidth.precisionFromPV = True + self.lb_roiwidth = SiriusLabel( + self, self.device.substitute(propty='ROIWidth-RB')) + hbox_roiwidth = QHBoxLayout() + hbox_roiwidth.addWidget(self.le_roiwidth) + hbox_roiwidth.addWidget(self.lb_roiwidth) + + # StartY + lbl_roistarty = QLabel('Start Y [ms]', self) + self.le_roistarty = PyDMLineEdit( + self, self.device.substitute(propty='ROIOffsetY-SP')) + self.le_roistarty.precisionFromPV = True + self.lb_roistarty = SiriusLabel( + self, self.device.substitute(propty='ROIOffsetY-RB')) + hbox_roistarty = QHBoxLayout() + hbox_roistarty.addWidget(self.le_roistarty) + hbox_roistarty.addWidget(self.lb_roistarty) + + # Height + lbl_roiheight = QLabel('Height [ms]', self) + self.le_roiheight = PyDMLineEdit( + self, self.device.substitute(propty='ROIHeight-SP')) + self.le_roiheight.precisionFromPV = True + self.lb_roiheight = SiriusLabel( + self, self.device.substitute(propty='ROIHeight-RB')) + hbox_roiheight = QHBoxLayout() + hbox_roiheight.addWidget(self.le_roiheight) + hbox_roiheight.addWidget(self.lb_roiheight) + + # Auto adjust + lbl_roiauto = QLabel('Auto Positioning', self) + self.bt_roiauto = PyDMStateButton( + self, self.device.substitute(propty='ROIAuto-Sel')) + self.bt_roiauto.shape = 1 + self.led_roiauto = SiriusLedState( + self, self.device.substitute(propty='ROIAuto-Sts')) + hbox_roiauto = QHBoxLayout() + hbox_roiauto.addWidget(self.bt_roiauto) + hbox_roiauto.addWidget(self.led_roiauto) + else: + tab_markers = QTabWidget(self) + tab_markers.setStyleSheet(""" + QTabWidget::pane { + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + } + QTabBar::tab:first { + background-color: transparent; + } + QTabBar::tab:last { + background-color: transparent; + }""") + # # Markers + for mtyp in ['', 'D']: + wid_markers = QWidget() + grid_markers = QGridLayout(wid_markers) + bt_dsblmark = PyDMPushButton( + parent=self, icon=qta.icon('mdi.window-close'), + pressValue=1) + bt_dsblmark.setToolTip( + 'Disable All '+('Delta ' if mtyp else '')+'Markers') + bt_dsblmark.channel = self.device.substitute( + dev='TuneProc', propty_name=mtyp+'MarkAOff', + propty_suffix='Cmd') + bt_dsblmark.setObjectName('mark_dsbl') + grid_markers.addWidget(bt_dsblmark, 0, 0) + grid_markers.addWidget( + QLabel('Enable', self, alignment=Qt.AlignHCenter), + 0, 1, 1, 2) + grid_markers.addWidget( + QLabel('Auto Max', self, alignment=Qt.AlignHCenter), + 0, 3, 1, 2) + + for i in range(1, 5): + bt_enbl = PyDMStateButton( + self, self.device.substitute( + dev='TuneProc', propty_name='Enbl'+mtyp+'Mark' + + str(i), propty_suffix='Sel')) + bt_enbl.setStyleSheet('min-width:2.5em; max-width:2.5em;') + led_enbl = SiriusLedState( + self, self.device.substitute( + dev='TuneProc', propty_name='Enbl'+mtyp+'Mark' + + str(i), propty_suffix='Sts')) + bt_max = PyDMStateButton( + self, self.device.substitute( + dev='TuneProc', propty_name='Enbl'+mtyp+'MaxAuto' + + str(i), propty_suffix='Sel')) + bt_max.setStyleSheet('min-width:2.5em;max-width:2.5em;') + led_max = SiriusLedState( + self, self.device.substitute( + dev='TuneProc', propty_name='Enbl'+mtyp+'MaxAuto' + + str(i), propty_suffix='Sts')) + color = marker_color[mtyp+'Mark'][self.orientation][str(i)] + pb_m = QPushButton( + qta.icon('mdi.record-circle-outline', color=color), + str(i), self) + pb_m.setObjectName('mark_dtl') + util.connect_window( + pb_m, SITuneMarkerDetails, self, + prefix=self.prefix, orientation=self.orientation, + index=i, background=self.background, + isdelta=bool(mtyp)) + grid_markers.addWidget(pb_m, i, 0) + grid_markers.addWidget( + bt_enbl, i, 1, alignment=Qt.AlignRight) + grid_markers.addWidget( + led_enbl, i, 2, alignment=Qt.AlignLeft) + grid_markers.addWidget( + bt_max, i, 3, alignment=Qt.AlignRight) + grid_markers.addWidget( + led_max, i, 4, alignment=Qt.AlignLeft) + tab_markers.addTab( + wid_markers, ('Delta' if mtyp else '')+'Markers') + + # Details + self.pb_details = QPushButton(qta.icon('fa5s.ellipsis-h'), '', self) + self.pb_details.setObjectName('detail') + util.connect_window(self.pb_details, TuneDetails, parent=self, + prefix=self.prefix, section=self.section, + orientation=self.orientation, + background=self.background) + hbox_details = QHBoxLayout() + hbox_details.addStretch() + hbox_details.addWidget(self.pb_details) + + # layout + lay = QFormLayout(self) + lay.setLabelAlignment(Qt.AlignRight) + lay.setFormAlignment(Qt.AlignCenter) + if self.section == 'SI': + lay.addRow(QLabel('<h4>Measure</h4>')) + lay.addRow(label_tunefreq, self.lb_tunefreq) + lay.addRow(label_tunefrac, self.lb_tunefrac) + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addRow(QLabel('<h4>Measurement Settings</h4>')) + lay.addRow(lbl_acq, hbox_acq) + lay.addRow(lbl_drive, hbox_drive) + if self.section == 'BO': + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addRow(lbl_acqcnt, hbox_acqcnt) + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addRow(lbl_nrsmp, self.lb_nrsmp) + if self.section == 'SI': + lay.addRow(lbl_acqtime, self.cb_acqtime) + lay.addRow(lbl_swetime, self.lb_swetime) + lay.addRow(lbl_span, hbox_span) + lay.addRow(lbl_rbw, hbox_rbw) + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addRow(lbl_h, hbox_h) + lay.addRow(lbl_Fh, self.lb_Fh) + lay.addRow(lbl_foff, hbox_foff) + lay.addRow(lbl_Fc, hbox_Fc) + lay.addRow(lbl_autoFc, hbox_autoFc) + if self.section == 'BO': + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addRow(QLabel('<h4>ROI</h4>')) + lay.addRow(lbl_roistartx, hbox_roistartx) + lay.addRow(lbl_roiwidth, hbox_roiwidth) + lay.addRow(lbl_roistarty, hbox_roistarty) + lay.addRow(lbl_roiheight, hbox_roiheight) + lay.addRow(lbl_roiauto, hbox_roiauto) + lay.addRow(hbox_details) + if self.section == 'SI': + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addRow(tab_markers) + + self.setStyleSheet(""" + QLed{ + min-width:1.29em; max-width:1.29em; + } + #mark_dsbl{ + min-width:25px; max-width:25px; icon-size:20px; + } + #detail, #mark_dtl{ + min-width:35px; max-width:35px; icon-size:20px; + } + SiriusLabel, SiriusSpinbox, PyDMStateButton, + PyDMLineEdit, PyDMEnumComboBox{ + min-width:6em; max-width:6em; + }""") + pal = self.palette() + pal.setColor(QPalette.Background, self.background) + self.setAutoFillBackground(True) + self.setPalette(pal) + + def _updateNrAcq(self, new_value): + dev = self.device.substitute(dev='TuneProc') + self.led_acqcnt.set_channels2values( + {dev.substitute(propty='FrameCount-Mon'): new_value}) + + def _calc_tunefreq(self, val): + address = self.sender().address + if 'TuneFreq' in address: + self.tunefreq_currval = val + elif 'FreqRevN' in address: + self.freqrevn_currval = val + delta = self.tunefreq_currval - self.freqrevn_currval*1e3 + delta /= 1e3 + self.lb_tunefreq.value_changed(delta)
+ + + +
+[docs] +class SITuneMonitor(QWidget): + + def __init__(self, parent=None, prefix='', description='long', + use_color_labels=True): + super().__init__(parent) + self.prefix = prefix + self.app = QApplication.instance() + self.description = description + self.use_color_labels = use_color_labels + if self.description == 'long': + self.hdesc = '<h4> Horizontal </h4>' + self.vdesc = '<h4> Vertical </h4>' + else: + self.hdesc = '<h3> Tune-H </h3>' + self.vdesc = '<h3> Tune-V </h3>' + self._setupUi() + + def _setupUi(self): + lay_tune = QGridLayout(self) + + self.ld_tunefrach = QLabel(self.hdesc, self, alignment=Qt.AlignHCenter) + self.lb_tunefrach = SiriusLabel(self, SiriusPVName( + 'SI-Glob:DI-Tune-H:TuneFrac-Mon').substitute(prefix=self.prefix)) + self.lb_tunefrach.precisionFromPV = False + self.lb_tunefrach.precision = 4 + self.lb_tunefrach.setAlignment(Qt.AlignHCenter) + self.lb_tunefrach.setStyleSheet('QLabel{font-size: 30pt;}') + wid_tuneh = QWidget() + wid_tuneh.setObjectName('wid_tuneh') + if self.use_color_labels: + wid_tuneh.setStyleSheet('background-color:#B3E5FF;') + vbox_tuneh = QVBoxLayout(wid_tuneh) + vbox_tuneh.addWidget(self.ld_tunefrach) + vbox_tuneh.addWidget(self.lb_tunefrach) + lay_tune.addWidget(wid_tuneh, 0, 0) + + self.ld_tunefracv = QLabel(self.vdesc, self, alignment=Qt.AlignHCenter) + self.lb_tunefracv = SiriusLabel(self, SiriusPVName( + 'SI-Glob:DI-Tune-V:TuneFrac-Mon').substitute(prefix=self.prefix)) + self.lb_tunefracv.precisionFromPV = False + self.lb_tunefracv.precision = 4 + self.lb_tunefracv.setAlignment(Qt.AlignHCenter) + self.lb_tunefracv.setStyleSheet('QLabel{font-size: 30pt;}') + wid_tunev = QWidget() + wid_tunev.setObjectName('wid_tunev') + if self.use_color_labels: + wid_tunev.setStyleSheet('background-color:#FFB3B3;') + vbox_tunev = QVBoxLayout(wid_tunev) + vbox_tunev.setAlignment(Qt.AlignHCenter) + vbox_tunev.addWidget(self.ld_tunefracv) + vbox_tunev.addWidget(self.lb_tunefracv) + lay_tune.addWidget(wid_tunev, 0, 1) + +
+[docs] + def changeEvent(self, event): + if event.type() == QEvent.FontChange and self.description == 'long': + fontsize = self.app.font().pointSize() + 20 + self.lb_tunefrach.setStyleSheet( + 'QLabel{font-size: '+str(fontsize)+'pt;}') + self.lb_tunefracv.setStyleSheet( + 'QLabel{font-size: '+str(fontsize)+'pt;}') + + self.ensurePolished()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_tune/details.html b/_modules/siriushla/as_di_tune/details.html new file mode 100644 index 000000000..f267d2e2a --- /dev/null +++ b/_modules/siriushla/as_di_tune/details.html @@ -0,0 +1,828 @@ + + + + + + siriushla.as_di_tune.details — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_di_tune.details

+
+from qtpy.QtGui import QPalette
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QLabel, QFormLayout, QHBoxLayout, QVBoxLayout, \
+    QGridLayout, QGroupBox, QWidget, QSpacerItem, QSizePolicy as QSzPlcy
+import qtawesome as qta
+from pydm.widgets import PyDMEnumComboBox, PyDMPushButton, PyDMLineEdit
+
+from siriuspy.namesys import SiriusPVName
+from siriushla.widgets import PyDMLedMultiChannel, SiriusMainWindow, \
+    PyDMStateButton, SiriusLedState, SiriusConnectionSignal, PyDMLed, \
+    SiriusStringComboBox, SiriusLabel, SiriusSpinbox
+from siriushla.as_ti_control import HLTriggerSimple
+
+
+
+[docs] +class TuneDetails(SiriusMainWindow): + """Tune Details.""" + + def __init__(self, parent=None, prefix='', section='', orientation='H', + background=None): + """Init.""" + super().__init__(parent) + self.prefix = prefix + self.section = section.upper() + self.orientation = orientation + self.device = SiriusPVName('AC-Glob:DI-Tune-O') + self.device = self.device.substitute( + sec=self.section, idx=self.orientation, prefix=self.prefix) + if self.section == 'BO': + self.trigger = SiriusPVName('BO-Glob:TI-TuneProc') + self.background = background + self.setWindowTitle(self.device + ' Detailed Settings') + self.setObjectName(self.section + 'App') + self._setupUi() + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + cw = QWidget(self) + self.setCentralWidget(cw) + + # title + self.title_label = QLabel( + '<h3>Tune '+self.orientation+' Detailed Settings<h3>', self) + self.title_label.setObjectName('title') + pal = self.title_label.palette() + pal.setColor(QPalette.Background, self.background) + self.title_label.setAutoFillBackground(True) + self.title_label.setPalette(pal) + + # measurement + self.meas_gbox = QGroupBox('Measurement', self) + self.meas_gbox.setLayout(self._measLayout()) + + # config + self.config_gbox = QGroupBox('Configuration', self) + self.config_gbox.setLayout(self._configLayout()) + + if self.section == 'BO': + # trigger + self.trg_gbox = QGroupBox('Trigger', self) + self.trg_gbox.setLayout(QHBoxLayout()) + self.trg_gbox.layout().addWidget(HLTriggerSimple( + self.trg_gbox, + device='BO-Glob:TI-TuneProc', prefix=self.prefix, + duration=True, nrpulses=True)) + # spectrogram view + self.spec_gbox = QGroupBox('Spectrogram View', self) + self.spec_gbox.setLayout(self._specViewLayout()) + # roi + self.roi_gbox = QGroupBox('ROI', self) + self.roi_gbox.setLayout(self._roiLayout()) + + vbox = QVBoxLayout() + vbox.addWidget(self.trg_gbox) + vbox.addWidget(self.spec_gbox) + vbox.addWidget(self.roi_gbox) + vbox.addWidget(self.config_gbox) + + lay = QGridLayout(cw) + lay.addWidget(self.title_label, 0, 0, 1, 2) + lay.addWidget(self.meas_gbox, 1, 0) + lay.addLayout(vbox, 1, 1) + else: + lay = QVBoxLayout(cw) + lay.addWidget(self.title_label) + lay.addWidget(self.meas_gbox) + lay.addWidget(self.config_gbox) + + self.setStyleSheet(""" + QLed{ + min-width:1.29em; max-width:1.29em; + } + #title { + min-height:1.29em; max-height:1.29em; + qproperty-alignment: "AlignVCenter | AlignHCenter"; + } + SiriusLabel, SiriusSpinbox, PyDMEnumComboBox, + PyDMStateButton{ + min-width:6em; max-width:6em; + }""") + + def _measLayout(self): + # Acquisition + lbl_acq = QLabel('Acquisition', self) + self.bt_acq = PyDMStateButton( + self, self.device.substitute(propty='SpecAnaGetSpec-Sel')) + self.bt_acq.shape = 1 + self.led_acq = SiriusLedState( + self, self.device.substitute(propty='SpecAnaGetSpec-Sts')) + hbox_acq = QHBoxLayout() + hbox_acq.addWidget(self.bt_acq) + hbox_acq.addWidget(self.led_acq) + + # Excitation + lbl_drive = QLabel('Excitation', self) + self.bt_drive = PyDMStateButton( + self, self.device.substitute(propty='Enbl-Sel')) + self.bt_drive.shape = 1 + value = 0b111 if self.section == 'BO' else 1 + self.led_drive = PyDMLedMultiChannel( + parent=self, channels2values={ + self.device.substitute(propty='Enbl-Sts'): value}) + self.led_drive.setOffColor(PyDMLed.DarkGreen) + hbox_drive = QHBoxLayout() + hbox_drive.addWidget(self.bt_drive) + hbox_drive.addWidget(self.led_drive) + + # Excitation Status Detailed + gbox_enblsts = QGridLayout() + lbl_enblsts = QLabel('Excitation\nEnable Status\nDetailed', self, + alignment=Qt.AlignVCenter | Qt.AlignRight) + if self.section == 'BO': + # # Carrier Generator + self.led_carrier = SiriusLedState( + self, self.device.substitute(propty='EnblCarrierGen-Sts')) + gbox_enblsts.addWidget(self.led_carrier, 0, 0) + gbox_enblsts.addWidget(QLabel('Carrier Generator'), 0, 1) + # # Noise Generator + self.led_noise = SiriusLedState( + self, self.device.substitute(propty='EnblNoiseGen-Sts')) + gbox_enblsts.addWidget(self.led_noise, 1, 0) + gbox_enblsts.addWidget(QLabel('Noise Generator'), 1, 1) + else: + # # Noise Generator + self.led_trkgen = SiriusLedState( + self, self.device.substitute(propty='SpecAnaTrkGen-Sts')) + gbox_enblsts.addWidget(self.led_trkgen, 1, 0) + gbox_enblsts.addWidget(QLabel('Tracking Generator'), 1, 1) + # # Amplifier + self.led_amp = SiriusLedState( + self, self.device.substitute(propty='EnblAmp-Sts')) + gbox_enblsts.addWidget(self.led_amp, 2, 0) + gbox_enblsts.addWidget(QLabel('Amplifier'), 2, 1) + + if self.section == 'BO': + # Frame Count + lbl_acqcnt = QLabel('Frame Count', self) + dev = self.device.substitute(dev='TuneProc') + self.lb_acqcnt = SiriusLabel( + self, dev.substitute(propty='FrameCount-Mon')) + self.lb_acqcnt.setAlignment(Qt.AlignCenter) + self.led_acqcnt = PyDMLedMultiChannel(parent=self) + self.trigNrPulseChannel = SiriusConnectionSignal( + self.trigger.substitute( + prefix=self.prefix, propty='NrPulses-RB')) + self.trigNrPulseChannel.new_value_signal[int].connect( + self._updateNrAcq) + hbox_acqcnt = QHBoxLayout() + hbox_acqcnt.addWidget(self.lb_acqcnt) + hbox_acqcnt.addWidget(self.led_acqcnt) + + # Nr. Samples p/ spec + lbl_nrsmp = QLabel('Nr. Samples p/ Spec.', self) + self.lb_nrsmp = SiriusLabel( + parent=self, init_channel=self.device.substitute( + dev='TuneProc', propty_name='SwePts', + propty_suffix='RB')) + + if self.section == 'SI': + # Acquisition Time + lbl_acqtime = QLabel('Acq. Time', self) + self.cb_acqtime = PyDMEnumComboBox( + parent=self, init_channel=self.device.substitute( + dev='TuneProc', propty_name='Trace', + propty_suffix='Mon', field='SCAN')) + + # Sweep time + lbl_swetime = QLabel('Sweep Time [ms]', self) + self.lb_swetime = SiriusLabel( + parent=self, + init_channel=self.device.substitute( + dev='TuneProc', propty_name='SweTime', + propty_suffix='Mon')) + + # Span + lbl_span = QLabel('Span [kHz]', self) + self.le_span = PyDMLineEdit( + self, self.device.substitute(propty='Span-SP')) + self.le_span.precisionFromPV = True + self.lb_span = SiriusLabel( + self, self.device.substitute(propty='Span-RB')) + hbox_span = QHBoxLayout() + hbox_span.addWidget(self.le_span) + hbox_span.addWidget(self.lb_span) + + # RBW + lbl_rbw = QLabel('RBW', self) + if self.section == 'BO': + self.cb_rbw = PyDMEnumComboBox( + self, self.device.substitute(propty='SpecAnaRBW-Sel')) + else: + items = ['1 Hz', '2 Hz', '3 Hz', '5 Hz', + '10 Hz', '20 Hz', '30 Hz', '50 Hz', + '100 Hz', '200 Hz', '300 Hz', '500 Hz', + '1 kHz', '2 kHz', '3 kHz', '5 kHz', '6.25 kHz', + '10 kHz', '20 kHz', '30 kHz', '50 kHz', + '100 kHz', '200 kHz', '300 kHz', '500 kHz', + '1 MHz', '2 MHz', '3 MHz', '5 MHz', '10 MHz'] + self.cb_rbw = SiriusStringComboBox( + self, self.device.substitute(propty='SpecAnaRBW-Sel'), + items=items) + self.lb_rbw = SiriusLabel( + self, self.device.substitute(propty='SpecAnaRBW-Sts')) + hbox_rbw = QHBoxLayout() + hbox_rbw.addWidget(self.cb_rbw) + hbox_rbw.addWidget(self.lb_rbw) + + # Harmonic + lbl_h = QLabel('Harmonic (n)', self) + self.sb_h = SiriusSpinbox( + self, self.device.substitute(propty='RevN-SP')) + self.sb_h.precisionFromPV = True + self.lb_h = SiriusLabel( + self, self.device.substitute(propty='RevN-RB')) + hbox_h = QHBoxLayout() + hbox_h.addWidget(self.sb_h) + hbox_h.addWidget(self.lb_h) + + # Harmonic Frequency + lbl_Fh = QLabel('Harm. Freq. [kHz]', self) + self.lb_Fh = SiriusLabel(parent=self) + self.lb_Fh.setToolTip('Frf/(h*n)') + self.lb_Fh.channel = self.device.substitute(propty='FreqRevN-Mon') + + # Frequency Offset + lbl_foff = QLabel('Frequency Offset [kHz]', self) + self.sb_foff = SiriusSpinbox( + self, self.device.substitute(propty='FreqOff-SP')) + self.sb_foff.precisionFromPV = True + self.lb_foff = SiriusLabel( + self, self.device.substitute(propty='FreqOff-RB')) + hbox_foff = QHBoxLayout() + hbox_foff.addWidget(self.sb_foff) + hbox_foff.addWidget(self.lb_foff) + + # Center Frequency + lbl_Fc = QLabel('Center Frequency [MHz]', self) + self.le_Fc = PyDMLineEdit( + self, self.device.substitute(propty='CenterFreq-SP')) + self.le_Fc.precisionFromPV = True + self.lb_Fc = SiriusLabel( + self, self.device.substitute(propty='CenterFreq-RB')) + hbox_Fc = QHBoxLayout() + hbox_Fc.addWidget(self.le_Fc) + hbox_Fc.addWidget(self.lb_Fc) + + # Lock Center Freq. + lbl_autoFc = QLabel('Lock Center Frequency ', self) + self.bt_autoFc = PyDMStateButton( + self, self.device.substitute(propty='CenterFreqAuto-Sel')) + self.bt_autoFc.shape = 1 + self.led_autoFc = SiriusLedState( + self, self.device.substitute(propty='CenterFreqAuto-Sts')) + hbox_autoFc = QHBoxLayout() + hbox_autoFc.addWidget(self.bt_autoFc) + hbox_autoFc.addWidget(self.led_autoFc) + + # Amplifier Gain + lbl_drivegain = QLabel('Amplifier Gain [dB]', self) + self.sb_drivegain = SiriusSpinbox( + self, self.device.substitute(propty='AmpGain-SP')) + self.sb_drivegain.precisionFromPV = True + self.lb_drivegain = SiriusLabel( + self, self.device.substitute(propty='AmpGain-RB')) + hbox_drivegain = QHBoxLayout() + hbox_drivegain.addWidget(self.sb_drivegain) + hbox_drivegain.addWidget(self.lb_drivegain) + + if self.section == 'BO': + # Auto Configure Excitation + lbl_driveauto = QLabel('Auto Config. Excit.', self) + self.bt_driveauto = PyDMStateButton( + self, self.device.substitute(propty='DriveAuto-Sel')) + self.bt_driveauto.shape = 1 + self.led_driveauto = SiriusLedState( + self, self.device.substitute(propty='DriveAuto-Sts')) + hbox_driveauto = QHBoxLayout() + hbox_driveauto.addWidget(self.bt_driveauto) + hbox_driveauto.addWidget(self.led_driveauto) + + # Noise Amplitude + lbl_noiseamp = QLabel('Noise Amplitude [V]', self) + self.sb_noiseamp = SiriusSpinbox( + self, self.device.substitute(propty='NoiseAmpl-SP')) + self.sb_noiseamp.precisionFromPV = True + self.lb_noiseamp = SiriusLabel( + self, self.device.substitute(propty='NoiseAmpl-RB')) + hbox_noiseamp = QHBoxLayout() + hbox_noiseamp.addWidget(self.sb_noiseamp) + hbox_noiseamp.addWidget(self.lb_noiseamp) + else: + # Noise Amplitude + lbl_trkgenlvl = QLabel('Trk. Gen. Power [dBm]', self) + self.sb_trkgenlvl = PyDMLineEdit( + self, self.device.substitute(propty='SpecAnaTrkGenLvl-SP')) + self.lb_trkgenlvl = SiriusLabel( + self, self.device.substitute(propty='SpecAnaTrkGenLvl-RB')) + hbox_trkgenlvl = QHBoxLayout() + hbox_trkgenlvl.addWidget(self.sb_trkgenlvl) + hbox_trkgenlvl.addWidget(self.lb_trkgenlvl) + + # Spectrum Acquisition + lbl_getspec = QLabel('Spectrum Acq.', self) + self.cb_getspec = PyDMStateButton( + parent=self, init_channel=self.device.substitute( + dev='TuneProc', propty_name='GetSpectrum', + propty_suffix='Sel')) + self.cb_getspec.shape = 1 + self.lb_getspec = PyDMLed( + parent=self, init_channel=self.device.substitute( + dev='TuneProc', propty_name='GetSpectrum', + propty_suffix='Sts')) + hbox_getspec = QHBoxLayout() + hbox_getspec.addWidget(self.cb_getspec) + hbox_getspec.addWidget(self.lb_getspec) + + lay = QFormLayout() + lay.setLabelAlignment(Qt.AlignRight) + lay.setFormAlignment(Qt.AlignCenter) + lay.addRow(lbl_acq, hbox_acq) + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addRow(lbl_drive, hbox_drive) + lay.addRow(lbl_enblsts, gbox_enblsts) + if self.section == 'BO': + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addRow(lbl_acqcnt, hbox_acqcnt) + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addRow(lbl_nrsmp, self.lb_nrsmp) + if self.section == 'SI': + lay.addRow(lbl_acqtime, self.cb_acqtime) + lay.addRow(lbl_swetime, self.lb_swetime) + lay.addRow(lbl_span, hbox_span) + lay.addRow(lbl_rbw, hbox_rbw) + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addRow(lbl_h, hbox_h) + lay.addRow(lbl_Fh, self.lb_Fh) + lay.addRow(lbl_foff, hbox_foff) + lay.addRow(lbl_Fc, hbox_Fc) + lay.addRow(lbl_autoFc, hbox_autoFc) + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addRow(lbl_drivegain, hbox_drivegain) + if self.section == 'BO': + lay.addRow(lbl_driveauto, hbox_driveauto) + lay.addRow(lbl_noiseamp, hbox_noiseamp) + else: + lay.addRow(lbl_trkgenlvl, hbox_trkgenlvl) + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addRow(lbl_getspec, hbox_getspec) + return lay + + def _configLayout(self): + self.bt_rst = PyDMPushButton( + parent=self, init_channel=self.device.substitute(propty='Rst-Cmd'), + pressValue=1, icon=qta.icon('fa5s.sync')) + self.bt_rst.setObjectName('bt_rst') + self.bt_rst.setStyleSheet( + '#bt_rst{min-width:25px; max-width:25px; icon-size:20px;}') + lay = QFormLayout() + lay.setLabelAlignment(Qt.AlignRight) + lay.setFormAlignment(Qt.AlignCenter) + lay.addRow('Restore Default', self.bt_rst) + return lay + + def _specViewLayout(self): + dev = self.device.substitute(dev='TuneProc') + + # Mode + lbl_mode = QLabel('Mode', self) + self.cb_mode = PyDMEnumComboBox( + self, dev.substitute(propty='SpecMode-Sel')) + self.lb_mode = SiriusLabel( + self, dev.substitute(propty='SpecMode-Sts')) + hbox_mode = QHBoxLayout() + hbox_mode.addWidget(self.cb_mode) + hbox_mode.addWidget(self.lb_mode) + + # Time window + lbl_timewdw = QLabel('Time Window [ms]', self) + self.le_timewdw = PyDMLineEdit( + self, dev.substitute(propty='SpecTime-SP')) + self.le_timewdw.precisionFromPV = True + self.lb_timewdw = SiriusLabel( + self, dev.substitute(propty='SpecTime-RB')) + hbox_timewdw = QHBoxLayout() + hbox_timewdw.addWidget(self.le_timewdw) + hbox_timewdw.addWidget(self.lb_timewdw) + + lay = QFormLayout() + lay.setLabelAlignment(Qt.AlignRight) + lay.setFormAlignment(Qt.AlignCenter) + lay.addRow(lbl_mode, hbox_mode) + lay.addRow(lbl_timewdw, hbox_timewdw) + return lay + + def _roiLayout(self): + # StartX + lbl_roistartx = QLabel('Start X [MHz]', self) + self.le_roistartx = PyDMLineEdit( + self, self.device.substitute(propty='ROIOffsetX-SP')) + self.le_roistartx.precisionFromPV = True + self.lb_roistartx = SiriusLabel( + self, self.device.substitute(propty='ROIOffsetX-RB')) + hbox_roistartx = QHBoxLayout() + hbox_roistartx.addWidget(self.le_roistartx) + hbox_roistartx.addWidget(self.lb_roistartx) + + # Width + lbl_roiwidth = QLabel('Width [MHz]', self) + self.le_roiwidth = PyDMLineEdit( + self, self.device.substitute(propty='ROIWidth-SP')) + self.le_roiwidth.precisionFromPV = True + self.lb_roiwidth = SiriusLabel( + self, self.device.substitute(propty='ROIWidth-RB')) + hbox_roiwidth = QHBoxLayout() + hbox_roiwidth.addWidget(self.le_roiwidth) + hbox_roiwidth.addWidget(self.lb_roiwidth) + + # StartY + lbl_roistarty = QLabel('Start Y [ms]', self) + self.le_roistarty = PyDMLineEdit( + self, self.device.substitute(propty='ROIOffsetY-SP')) + self.le_roistarty.precisionFromPV = True + self.lb_roistarty = SiriusLabel( + self, self.device.substitute(propty='ROIOffsetY-RB')) + hbox_roistarty = QHBoxLayout() + hbox_roistarty.addWidget(self.le_roistarty) + hbox_roistarty.addWidget(self.lb_roistarty) + + # Height + lbl_roiheight = QLabel('Height [ms]', self) + self.le_roiheight = PyDMLineEdit( + self, self.device.substitute(propty='ROIHeight-SP')) + self.le_roiheight.precisionFromPV = True + self.lb_roiheight = SiriusLabel( + self, self.device.substitute(propty='ROIHeight-RB')) + hbox_roiheight = QHBoxLayout() + hbox_roiheight.addWidget(self.le_roiheight) + hbox_roiheight.addWidget(self.lb_roiheight) + + # Auto adjust + lbl_roiauto = QLabel('Auto Positioning', self) + self.bt_roiauto = PyDMStateButton( + self, self.device.substitute(propty='ROIAuto-Sel')) + self.bt_roiauto.shape = 1 + self.led_roiauto = SiriusLedState( + self, self.device.substitute(propty='ROIAuto-Sts')) + hbox_roiauto = QHBoxLayout() + hbox_roiauto.addWidget(self.bt_roiauto) + hbox_roiauto.addWidget(self.led_roiauto) + + lay = QFormLayout() + lay.setLabelAlignment(Qt.AlignRight) + lay.setFormAlignment(Qt.AlignCenter) + lay.addRow(lbl_roistartx, hbox_roistartx) + lay.addRow(lbl_roiwidth, hbox_roiwidth) + lay.addRow(lbl_roistarty, hbox_roistarty) + lay.addRow(lbl_roiheight, hbox_roiheight) + lay.addRow(lbl_roiauto, hbox_roiauto) + return lay + + def _updateNrAcq(self, new_value): + dev = self.device.substitute(dev='TuneProc') + self.led_acqcnt.set_channels2values( + {dev.substitute(propty='FrameCount-Mon'): new_value})
+ + + +
+[docs] +class SITuneMarkerDetails(SiriusMainWindow): + """SI Tune Marker Details.""" + + def __init__(self, parent=None, prefix='', orientation='', index=1, + isdelta=False, background=None): + super().__init__(parent) + self.prefix = prefix + self.orientation = orientation + self.idx = str(index) + self.mtyp = 'D' if isdelta else '' + self.dev = SiriusPVName('SI-Glob:DI-TuneProc-O') + self.dev = self.dev.substitute(prefix=prefix, idx=self.orientation) + self.background = background + self.title = ( + self.dev.device_name + + (' ' if self.mtyp == '' else ' Delta ') + + 'Marker '+self.idx+' Settings') + self.setWindowTitle(self.title) + self.setObjectName('SIApp') + self._setupUi() + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + cw = QWidget(self) + self.setCentralWidget(cw) + lay = QFormLayout(cw) + lay.setLabelAlignment(Qt.AlignRight) + lay.setFormAlignment(Qt.AlignCenter) + + # title + self.title_label = QLabel( + '<h3>'+self.title+'<h3>', self, alignment=Qt.AlignCenter) + self.title_label.setObjectName('title') + pal = self.title_label.palette() + pal.setColor(QPalette.Background, self.background) + self.title_label.setAutoFillBackground(True) + self.title_label.setPalette(pal) + lay.addRow(self.title_label) + + label_enbl = QLabel('Enable: ', self) + self.bt_enbl = PyDMStateButton(self, self.dev.substitute( + propty='Enbl'+self.mtyp+'Mark'+self.idx+'-Sel')) + self.bt_enbl.shape = 1 + self.led_enbl = SiriusLedState(self, self.dev.substitute( + propty='Enbl'+self.mtyp+'Mark'+self.idx+'-Sts')) + hbox_enbl = QHBoxLayout() + hbox_enbl.addWidget(self.bt_enbl) + hbox_enbl.addWidget(self.led_enbl) + lay.addRow(label_enbl, hbox_enbl) + + label_enblautomax = QLabel('Auto Max Peak: ', self) + ch_enblautomax = self.dev.substitute( + propty='Enbl'+self.mtyp+'MaxAuto'+self.idx+'-Sel') + self.enblAutoMaxChannel = SiriusConnectionSignal(ch_enblautomax) + self.enblAutoMaxChannel.new_value_signal[int].connect( + self._handle_values_visibility) + self.bt_enblautomax = PyDMStateButton(self, ch_enblautomax) + self.bt_enblautomax.shape = 1 + self.led_enblautomax = SiriusLedState(self, self.dev.substitute( + propty='Enbl'+self.mtyp+'MaxAuto'+self.idx+'-Sts')) + hbox_enblautomax = QHBoxLayout() + hbox_enblautomax.addWidget(self.bt_enblautomax) + hbox_enblautomax.addWidget(self.led_enblautomax) + lay.addRow(label_enblautomax, hbox_enblautomax) + + label_x = QLabel(' X: ', self) + self.sb_x = PyDMLineEdit(self, self.dev.substitute( + propty=self.mtyp+'MarkX'+self.idx+'-SP')) + self.lb_x = SiriusLabel(self, self.dev.substitute( + propty=self.mtyp+'MarkX'+self.idx+'-RB')) + hbox_x = QHBoxLayout() + hbox_x.addWidget(self.sb_x) + hbox_x.addWidget(self.lb_x) + lay.addRow(label_x, hbox_x) + + label_y = QLabel(' Y: ', self) + self.lb_y = SiriusLabel(self, self.dev.substitute( + propty=self.mtyp+'MarkY'+self.idx+'-Mon')) + hbox_y = QHBoxLayout() + hbox_y.addWidget(self.lb_y) + if self.mtyp == 'D': + self.lb_dynamicY = SiriusLabel(self, self.dev.substitute( + propty='DynamicDX'+self.idx+'-Mon')) + self.lb_dynamicY.setVisible(False) + hbox_y.addWidget(self.lb_dynamicY) + lay.addRow(label_y, hbox_y) + + self.pb_max = PyDMPushButton( + parent=self, label='Mark Max Peak', pressValue=1, + init_channel=self.dev.substitute( + propty=self.mtyp+'MarkMax'+self.idx+'-Cmd')) + self.pb_maxnext = PyDMPushButton( + parent=self, label='Mark Max Next', pressValue=1, + init_channel=self.dev.substitute( + propty=self.mtyp+'MarkMaxNext'+self.idx+'-Cmd')) + self.pb_maxright = PyDMPushButton( + parent=self, label='Mark Max Right', pressValue=1, + init_channel=self.dev.substitute( + propty=self.mtyp+'MarkMaxRight'+self.idx+'-Cmd')) + self.pb_maxleft = PyDMPushButton( + parent=self, label='Mark Max Left', pressValue=1, + init_channel=self.dev.substitute( + propty=self.mtyp+'MarkMaxLeft'+self.idx+'-Cmd')) + vbox_cmd = QVBoxLayout() + vbox_cmd.addWidget(self.pb_max) + vbox_cmd.addWidget(self.pb_maxnext) + vbox_cmd.addWidget(self.pb_maxright) + vbox_cmd.addWidget(self.pb_maxleft) + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addRow(vbox_cmd) + + if self.mtyp == '' and self.idx == '1': + lay.addItem(QSpacerItem(1, 6, QSzPlcy.Ignored, QSzPlcy.Fixed)) + + label_enblautomin = QLabel('Enable Auto Min: ', self) + self.bt_enblautomin = PyDMStateButton( + self, self.dev.substitute(propty='EnblMinAuto-Sel')) + self.bt_enblautomin.shape = 1 + self.led_enblautomin = SiriusLedState( + self, self.dev.substitute(propty='EnblMinAuto-Sts')) + hbox_enblautomin = QHBoxLayout() + hbox_enblautomin.addWidget(self.bt_enblautomin) + hbox_enblautomin.addWidget(self.led_enblautomin) + lay.addRow(label_enblautomin, hbox_enblautomin) + + label_enbllimit = QLabel('Enable Mark Limit: ', self) + self.bt_enbllimit = PyDMStateButton( + self, self.dev.substitute(propty='EnblMarkLimit-Sel')) + self.bt_enbllimit.shape = 1 + self.led_enbllimit = SiriusLedState( + self, self.dev.substitute(propty='EnblMarkLimit-Sts')) + hbox_enbllimit = QHBoxLayout() + hbox_enbllimit.addWidget(self.bt_enbllimit) + hbox_enbllimit.addWidget(self.led_enbllimit) + lay.addRow(label_enbllimit, hbox_enbllimit) + + label_limright = QLabel('Mark Limit Right: ', self) + self.sb_limright = PyDMLineEdit( + self, self.dev.substitute(propty='MarkLimitRight-SP')) + self.lb_limright = SiriusLabel( + self, self.dev.substitute(propty='MarkLimitRight-RB')) + hbox_limright = QHBoxLayout() + hbox_limright.addWidget(self.sb_limright) + hbox_limright.addWidget(self.lb_limright) + lay.addRow(label_limright, hbox_limright) + + label_limleft = QLabel('Mark Limit Left: ', self) + self.sb_limleft = PyDMLineEdit( + self, self.dev.substitute(propty='MarkLimitLeft-SP')) + self.lb_limleft = SiriusLabel( + self, self.dev.substitute(propty='MarkLimitLeft-RB')) + hbox_limleft = QHBoxLayout() + hbox_limleft.addWidget(self.sb_limleft) + hbox_limleft.addWidget(self.lb_limleft) + lay.addRow(label_limleft, hbox_limleft) + + self.setStyleSheet(""" + QLed{ + min-width:1.29em; max-width:1.29em; + } + #title { + min-height:1.29em; max-height:1.29em; + qproperty-alignment: "AlignVCenter | AlignHCenter"; + } + SiriusLabel, SiriusSpinbox, PyDMEnumComboBox, + PyDMStateButton{ + min-width:6em; max-width:6em; + }""") + + def _handle_values_visibility(self, value): + self.sb_x.setVisible(not value) + if self.mtyp == 'D': + self.lb_y.setVisible(not value) + self.lb_dynamicY.setVisible(value)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_tune/main.html b/_modules/siriushla/as_di_tune/main.html new file mode 100644 index 000000000..4b6835d44 --- /dev/null +++ b/_modules/siriushla/as_di_tune/main.html @@ -0,0 +1,335 @@ + + + + + + siriushla.as_di_tune.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_di_tune.main

+from qtpy.QtGui import QColor
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QTabWidget, QVBoxLayout, \
+    QLabel, QGroupBox, QHBoxLayout, QPushButton
+import qtawesome as qta
+from siriuspy.envars import VACA_PREFIX
+from siriushla import util
+from siriushla.widgets import SiriusMainWindow
+from siriushla.as_ti_control import HLTriggerSimple
+from .spectrogram import BOTuneSpectrogramControls
+from .spectra import TuneSpectraControls
+from .controls import TuneControls, SITuneMonitor
+
+
+
+[docs] +class Tune(SiriusMainWindow): + """Tune Window.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX, section=''): + super().__init__(parent) + self.prefix = prefix + self.section = section.upper() + self.setObjectName(self.section+'App') + self.setWindowTitle(self.section+' Tune') + self.setWindowIcon( + qta.icon('mdi.pulse', + color=util.get_appropriate_color(self.section))) + self._setupUi() + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + label = QLabel('<h2>'+self.section+' Tune<h2>', self, + alignment=Qt.AlignHCenter) + label.setObjectName('label') + label.setStyleSheet('#label{min-height: 1.29em; max-height: 1.29em;}') + + if self.section == 'SI': + # Tune + self.wid_tune_mon = SITuneMonitor(self, self.prefix) + + # Settings + self.tabCtrl = QTabWidget(self) + hcolor = QColor(179, 229, 255) + vcolor = QColor(255, 179, 179) + self.ctrlH = TuneControls(parent=self, prefix=self.prefix, + section=self.section, orientation='H', + background=hcolor) + self.tabCtrl.addTab(self.ctrlH, 'Horizontal') + self.ctrlV = TuneControls(parent=self, prefix=self.prefix, + section=self.section, orientation='V', + background=vcolor) + self.tabCtrl.addTab(self.ctrlV, 'Vertical') + self.tabCtrl.setStyleSheet(""" + QTabWidget::pane { + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + } + QTabBar::tab:first { + background-color: #B3E5FF; + } + QTabBar::tab:last { + background-color: #FFB3B3; + } + """) + self.settings = QWidget() + vbox_sett = QVBoxLayout(self.settings) + vbox_sett.addWidget(self.tabCtrl) + + # Spectra view + self.spectra_view = TuneSpectraControls( + self, self.prefix, self.section) + self.spectra_view.setObjectName('spectra_view') + + if self.section == 'BO': + self.trig_gbox = QGroupBox('Trigger', self) + self.trig_gbox.setLayout(QHBoxLayout()) + self.trig_gbox.layout().addWidget(HLTriggerSimple( + self.trig_gbox, + device='BO-Glob:TI-TuneProc', + prefix=self.prefix, + duration=True, nrpulses=True)) + vbox_sett.addWidget(self.trig_gbox) + + # Sepctrograms + self.specH = BOTuneSpectrogramControls( + parent=self, prefix=self.prefix, orientation='H', + title='<h3>Horizontal</h3>', background=hcolor) + self.specH.setObjectName('specH') + self.specV = BOTuneSpectrogramControls( + parent=self, prefix=self.prefix, orientation='V', + title='<h3>Vertical</h3>', background=vcolor) + self.specV.setObjectName('specV') + vbox_meas = QVBoxLayout() + vbox_meas.addWidget(self.specH) + vbox_meas.addSpacing(10) + vbox_meas.addWidget(self.specV) + + # Connect signals + self.specH.spectrogram.idx2send_changed.connect( + self.specV.update_idx2plot) + self.specH.sb_idx2plot.editingFinished.connect( + self.specV.update_idx2plot) + self.specH.pb_resetbuff.clicked.connect( + self.specV.spectrogram.resetBuffer) + self.specH.sb_buffsz.editingFinished.connect( + self.specV.update_buffsize) + self.specV.spectrogram.idx2send_changed.connect( + self.specH.update_idx2plot) + self.specV.sb_idx2plot.editingFinished.connect( + self.specH.update_idx2plot) + self.specV.pb_resetbuff.clicked.connect( + self.specH.spectrogram.resetBuffer) + self.specV.sb_buffsz.editingFinished.connect( + self.specH.update_buffsize) + self.specH.spectrogram.new_data.connect( + self.spectra_view.spectra.receiveDataH) + self.specV.spectrogram.new_data.connect( + self.spectra_view.spectra.receiveDataV) + + self.pb_showsett = QPushButton('>', self) + self.pb_showsett.setObjectName('showsett') + self.pb_showsett.setToolTip('Hide settings') + self.pb_showsett.setStyleSheet( + '#showsett{min-width:0.7em;max-width:0.7em;}') + self.pb_showsett.released.connect(self._handle_settings_vis) + hbox_vis = QHBoxLayout() + hbox_vis.addWidget(self.pb_showsett, alignment=Qt.AlignLeft) + + self.setStyleSheet( + "#specH, #specV {min-width:40em; min-height: 18em;}" + "#spectra_view {min-width:40em; min-height: 36em;}" + "#wid_tuneh, #wid_tunev {border:2px solid gray;}") + + cw = QWidget(self) + self.setCentralWidget(cw) + lay = QVBoxLayout(cw) + if self.section == 'BO': + hbox = QHBoxLayout() + hbox.addWidget(self.settings) + hbox.addLayout(vbox_meas) + hbox.addWidget(self.spectra_view) + hbox.setStretch(0, 1) + hbox.setStretch(1, 1) + hbox.setStretch(2, 1) + + lay.addWidget(label) + lay.addLayout(hbox) + lay.addLayout(hbox_vis) + else: + hbox = QHBoxLayout() + hbox.addWidget(self.settings) + hbox.addWidget(self.spectra_view) + hbox.setStretch(0, 1) + hbox.setStretch(1, 1) + + lay.addWidget(label) + lay.addWidget(self.wid_tune_mon) + lay.addLayout(hbox) + lay.addLayout(hbox_vis) + + def _handle_settings_vis(self): + vis = self.settings.isVisible() + text = '<' if vis else '>' + ttip = 'Show' if vis else 'Hide' + self.pb_showsett.setText(text) + self.pb_showsett.setToolTip(ttip+' settings') + self.settings.setVisible(not vis) + self.sender().parent().adjustSize() + self.centralWidget().adjustSize() + self.adjustSize()
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_tune/spectra.html b/_modules/siriushla/as_di_tune/spectra.html new file mode 100644 index 000000000..524b57786 --- /dev/null +++ b/_modules/siriushla/as_di_tune/spectra.html @@ -0,0 +1,594 @@ + + + + + + siriushla.as_di_tune.spectra — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_di_tune.spectra

+import os
+from datetime import datetime
+import time
+from functools import partial as _part
+import numpy as np
+
+from qtpy.QtGui import QColor
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGridLayout, QHBoxLayout, QVBoxLayout, \
+    QComboBox, QCheckBox, QLabel, QPushButton, QMenu, QSpacerItem, \
+    QSizePolicy as QSzPlcy, QFileDialog
+import qtawesome as qta
+
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from siriushla.widgets import SiriusConnectionSignal, SiriusWaveformPlot
+from .util import marker_color
+
+
+
+[docs] +class TuneSpectraView(SiriusWaveformPlot): + """Tune Spectra View.""" + + def __init__(self, parent=None, prefix='', section=''): + """Init.""" + super().__init__(parent) + self.prefix = prefix + self.section = section + + self.autoRangeX = True + self.autoRangeY = True + self.showXGrid = True + self.showYGrid = True + self.axisColor = QColor(0, 0, 0) + self.backgroundColor = QColor(255, 255, 255) + self.showLegend = False + leftAxis = self.getAxis('left') + leftAxis.setStyle(autoExpandTextSpace=False, tickTextWidth=25) + leftAxis.setLabel('Tune', color='gray') + + self.x_channel = 'Tune' + + self.addChannel( + y_channel='FAKE:SpectrumH', name='Tune H', + redraw_mode=2, color='blue', lineWidth=2, lineStyle=Qt.SolidLine) + self.curveH = self.curveAtIndex(0) + self.curveH.x_channels = { + 'Tune': SiriusConnectionSignal(_PVName( + self.section+'-Glob:DI-Tune-H:TuneFracArray-Mon').substitute( + prefix=self.prefix)), + 'Freq': SiriusConnectionSignal(_PVName( + self.section+'-Glob:DI-Tune-H:FreqArray-Mon').substitute( + prefix=self.prefix)) + } + self.curveH.setVisible(True) + + self.addChannel( + y_channel='FAKE:SpectrumV', name='Tune V', + redraw_mode=2, color='red', lineWidth=2, lineStyle=Qt.SolidLine) + self.curveV = self.curveAtIndex(1) + self.curveV.x_channels = { + 'Tune': SiriusConnectionSignal(_PVName( + self.section+'-Glob:DI-Tune-V:TuneFracArray-Mon').substitute( + prefix=self.prefix)), + 'Freq': SiriusConnectionSignal(_PVName( + self.section+'-Glob:DI-Tune-V:FreqArray-Mon').substitute( + prefix=self.prefix)) + } + self.curveV.setVisible(True) + + if self.section == 'SI': + self.maxRedrawRate = 5 + self.curveH_y_channel = SiriusConnectionSignal(_PVName( + 'SI-Glob:DI-TuneProc-H:Trace-Mon').substitute( + prefix=self.prefix)) + self.curveH_y_channel.new_value_signal[np.ndarray].connect( + self.receiveDataH) + self.curveV_y_channel = SiriusConnectionSignal(_PVName( + 'SI-Glob:DI-TuneProc-V:Trace-Mon').substitute( + prefix=self.prefix)) + self.curveV_y_channel.new_value_signal[np.ndarray].connect( + self.receiveDataV) + self.freqrevH_channel = SiriusConnectionSignal(_PVName( + 'SI-Glob:DI-Tune-H:FreqRev-Mon').substitute( + prefix=self.prefix)) + self.freqrevV_channel = SiriusConnectionSignal(_PVName( + 'SI-Glob:DI-Tune-V:FreqRev-Mon').substitute( + prefix=self.prefix)) + self.freqrevnH_channel = SiriusConnectionSignal(_PVName( + 'SI-Glob:DI-Tune-H:FreqRevN-Mon').substitute( + prefix=self.prefix)) + self.freqrevnV_channel = SiriusConnectionSignal(_PVName( + 'SI-Glob:DI-Tune-V:FreqRevN-Mon').substitute( + prefix=self.prefix)) + self.revnH_channel = SiriusConnectionSignal(_PVName( + 'SI-Glob:DI-Tune-H:RevN-RB').substitute( + prefix=self.prefix)) + self.revnV_channel = SiriusConnectionSignal(_PVName( + 'SI-Glob:DI-Tune-V:RevN-RB').substitute( + prefix=self.prefix)) + + self.markers = dict() + ci = 2 + for ax in ['H', 'V']: + self.markers[ax] = dict() + for mtyp in ['', 'D']: + for i in range(1, 5): + si = str(i) + mark_dict = dict() + ch_enbl = SiriusConnectionSignal(_PVName( + 'SI-Glob:DI-TuneProc-'+ax+':Enbl'+mtyp + + 'Mark'+si+'-Sts').substitute(prefix=self.prefix)) + ch_enbl.orientation = ax + ch_enbl.idx = si + ch_enbl.new_value_signal[int].connect( + self._update_markers_enable) + mark_dict['Enbl'] = ch_enbl + + ch_x = SiriusConnectionSignal(_PVName( + 'SI-Glob:DI-TuneProc-'+ax+':'+mtyp+'MarkX'+si + + 'Disp-Mon').substitute(prefix=self.prefix)) + ch_x.orientation = ax + ch_x.idx = si + ch_x.axis = 'X' + ch_x.new_value_signal[float].connect( + self._update_markers_value) + mark_dict['X'] = ch_x + + ch_y = SiriusConnectionSignal(_PVName( + 'SI-Glob:DI-TuneProc-'+ax+':'+mtyp+'MarkY'+si + + ('' if mtyp == '' else 'Disp')+'-Mon').substitute( + prefix=self.prefix)) + ch_y.orientation = ax + ch_y.idx = si + ch_y.axis = 'Y' + ch_y.new_value_signal[float].connect( + self._update_markers_value) + mark_dict['Y'] = ch_y + + self.addChannel( + y_channel='FAKE:'+mtyp+'MarkY', + x_channel='FAKE:'+mtyp+'MarkX', + name=mtyp+'Mark '+si, redraw_mode=2, + color=marker_color[mtyp+'Mark'][ax][si], + lineWidth=2, lineStyle=1, + symbol='o', symbolSize=10) + mark_dict['curve'] = self.curveAtIndex(ci) + ci += 1 + self.markers[ax][mtyp+'Mark'+si] = mark_dict + +
+[docs] + def toggleXChannel(self): + """Toggle X channel between FreqArray and TuneFracArray.""" + self.x_channel = 'Tune' if 'Tune' in self.sender().currentText() \ + else 'Freq' + if self.section == 'SI': + for ori, markers in self.markers.items(): + for name, data in markers.items(): + if data['Enbl'].connected: + curve = getattr(self, 'curve'+ori) + show = curve.isVisible() and data['Enbl'].value + self._update_marker_value( + data['X'].value, ori, name, 'X') + self._update_marker_value( + data['Y'].value, ori, name, 'Y') + else: + show = False + data['curve'].setVisible(show)
+ + +
+[docs] + def showTuneH(self, show): + """Whether to show or not curve of Tune H.""" + self.curveH.setVisible(show) + if self.section == 'SI': + for name, data in self.markers['H'].items(): + if data['Enbl'].connected: + show = bool(show) and data['Enbl'].value + else: + show = False + data['curve'].setVisible(show)
+ + +
+[docs] + def showTuneV(self, show): + """Whether to show or not curve of Tune V.""" + self.curveV.setVisible(show) + if self.section == 'SI': + for name, data in self.markers['V'].items(): + if data['Enbl'].connected: + show = bool(show) and data['Enbl'].value + else: + show = False + data['curve'].setVisible(show)
+ + +
+[docs] + def receiveDataH(self, data): + """Update curve H.""" + self.curveH.receiveXWaveform( + self.curveH.x_channels[self.x_channel].value) + self.curveH.receiveYWaveform(data)
+ + +
+[docs] + def receiveDataV(self, data): + """Update curve V.""" + self.curveV.receiveXWaveform( + self.curveV.x_channels[self.x_channel].value) + self.curveV.receiveYWaveform(data)
+ + + def _update_markers_enable(self, value): + address = self.sender().address + mtyp = 'DMark' if 'DMark' in address else 'Mark' + idx = self.sender().idx + ori = self.sender().orientation + curve = getattr(self, 'curve'+ori) + show = (value and curve.isVisible()) + self.markers[ori][mtyp+idx]['curve'].setVisible(show) + + def _update_markers_value(self, value): + address = self.sender().address + mtyp = 'DMark' if 'DMark' in address else 'Mark' + idx = self.sender().idx + ori = self.sender().orientation + axis = self.sender().axis + self._update_marker_value(value, ori, mtyp+idx, axis) + + def _update_marker_value(self, value, ori, name, axis): + func = getattr(self.markers[ori][name]['curve'], + 'receive'+axis+'Waveform') + if self.x_channel == 'Tune' and axis == 'X': + fr_ch = getattr(self, 'freqrev'+ori+'_channel') + fr = fr_ch.value + fh_ch = getattr(self, 'freqrevn'+ori+'_channel') + fh = fh_ch.value + h_ch = getattr(self, 'revn'+ori+'_channel') + h = h_ch.value + if not fr or not h or not fh: + self.markers[ori][name]['curve'].setVisible(False) + return + else: + if getattr(self, 'curve'+ori).isVisible() and\ + self.markers[ori][name]['Enbl'].value: + self.markers[ori][name]['curve'].setVisible(True) + value = (value*1e6 - fh*1e3)/fr + h + func(np.array([value, ]))
+ + + +
+[docs] +class TuneSpectraControls(QWidget): + """Tune Spectra Controls.""" + + def __init__(self, parent=None, prefix='', section=''): + """Init.""" + super().__init__(parent) + self.prefix = prefix + self.section = section + self._setupUi() + + def _setupUi(self): + self.spectra = TuneSpectraView(self, self.prefix, self.section) + + lb_show_trace = QLabel('Show') + self.cb_show_x = QCheckBox('H', self) + self.cb_show_x.setStyleSheet('color: blue;') + self.cb_show_x.setChecked(True) + self.cb_show_x.stateChanged.connect(self.spectra.showTuneH) + self.cb_show_y = QCheckBox('V', self) + self.cb_show_y.setStyleSheet('color: red;') + self.cb_show_y.setChecked(True) + self.cb_show_y.stateChanged.connect(self.spectra.showTuneV) + + self.cb_choose_x = QComboBox(self) + self.cb_choose_x.addItem('Tune Frac.') + self.cb_choose_x.addItem('Frequency') + self.cb_choose_x.currentIndexChanged.connect( + self.spectra.toggleXChannel) + self.cb_choose_x.currentIndexChanged.connect( + self._toggle_registers_axis) + + # Registers + self.registers = {i: None for i in range(4)} + self.spectra.curveReg = [None, None, None, None] + self.cb_reg = {i: QCheckBox(self) for i in range(4)} + self.bt_reg = {i: QPushButton('Register '+str(i), self) + for i in range(4)} + self.lb_reg = {i: QLabel('Empty') for i in range(4)} + self.bt_save = {i: QPushButton(qta.icon('fa5s.save'), '', self) + for i in range(4)} + self.colors = ['cyan', 'darkGreen', 'magenta', 'darkRed'] + self.registers_widget = QWidget() + glay_reg = QGridLayout(self.registers_widget) + shift = 2 if self.section == 'BO' else 18 + for i in range(4): + # checks + self.spectra.addChannel( + y_channel='FAKE:Register'+str(i), name='Register '+str(i), + redraw_mode=2, color=self.colors[i], + lineWidth=2, lineStyle=Qt.SolidLine) + self.spectra.curveReg[i] = self.spectra.curveAtIndex(i+shift) + self.spectra.curveReg[i].setVisible(False) + self.cb_reg[i].setStyleSheet( + 'min-width:1.2em; max-width:1.2em;' + 'min-height:1.29em; color:'+self.colors[i]+';') + self.cb_reg[i].stateChanged.connect(_part(self._show_curve, i)) + glay_reg.addWidget(self.cb_reg[i], i, 0, alignment=Qt.AlignLeft) + # buttons + self.bt_reg[i].setStyleSheet('min-width:5em; max-width:5em;') + self.bt_reg[i].setMenu(QMenu()) + self.bt_reg[i].menu().addAction( + 'Save Tune H', _part(self._registerData, i, 'H')) + self.bt_reg[i].menu().addAction( + 'Save Tune V', _part(self._registerData, i, 'V')) + self.bt_reg[i].menu().addAction( + 'Clear', _part(self._clear_register, i)) + glay_reg.addWidget(self.bt_reg[i], i, 1, alignment=Qt.AlignLeft) + # label + self.lb_reg[i].setMouseTracking(True) + self.lb_reg[i].setTextInteractionFlags(Qt.TextEditorInteraction) + self.lb_reg[i].setStyleSheet( + 'min-height:1.29em; min-width: 20em; max-width: 20em;') + glay_reg.addWidget(self.lb_reg[i], i, 2, alignment=Qt.AlignLeft) + glay_reg.addItem( + QSpacerItem(i, 1, QSzPlcy.Expanding, QSzPlcy.Ignored), i, 3) + # save button + self.bt_save[i].clicked.connect(_part(self._export_data, i)) + glay_reg.addWidget(self.bt_save[i], i, 4, alignment=Qt.AlignRight) + + self.pb_showregs = QPushButton('^', self) + self.pb_showregs.setObjectName('showregs') + self.pb_showregs.setToolTip('Hide registers') + self.pb_showregs.setStyleSheet( + '#showregs{min-width:1em;max-width:1em;}') + self.pb_showregs.released.connect(self._handle_registers_vis) + + hbox_ctrls = QHBoxLayout() + hbox_ctrls.setContentsMargins(0, 0, 0, 0) + hbox_ctrls.setSpacing(6) + hbox_ctrls.addWidget(lb_show_trace, alignment=Qt.AlignLeft) + hbox_ctrls.addWidget(self.cb_show_x, alignment=Qt.AlignLeft) + hbox_ctrls.addWidget(self.cb_show_y, alignment=Qt.AlignLeft) + hbox_ctrls.addStretch() + hbox_ctrls.addWidget(QLabel('X Axis: '), alignment=Qt.AlignRight) + hbox_ctrls.addWidget(self.cb_choose_x, alignment=Qt.AlignRight) + hbox_ctrls.addItem(QSpacerItem(15, 1, QSzPlcy.Fixed, QSzPlcy.Ignored)) + hbox_ctrls.addWidget(self.pb_showregs, alignment=Qt.AlignLeft) + + lay = QVBoxLayout(self) + lay.setSpacing(10) + lay.setContentsMargins(10, 6, 6, 6) + lay.addWidget(self.spectra) + lay.addLayout(hbox_ctrls) + lay.addWidget(self.registers_widget) + + def _registerData(self, idx, tune): + curve = self.spectra.curveH if tune == 'H' else self.spectra.curveV + latest_freq = curve.x_channels['Freq'].value + latest_tune = curve.x_channels['Tune'].value + self.registers[idx] = [latest_tune, latest_freq, curve.latest_y] + self.lb_reg[idx].setText( + 'Tune '+tune+' at '+time.strftime( + '%d/%m/%Y %H:%M:%S', time.localtime(time.time()))) + self._show_curve(idx, self.cb_reg[idx].checkState()) + + def _clear_register(self, idx): + self._show_curve(idx, False) + self.lb_reg[idx].setText('Empty') + self.registers[idx] = None + + def _show_curve(self, i, show): + if not self.registers[i]: + self.spectra.curveReg[i].receiveXWaveform([]) + self.spectra.curveReg[i].receiveYWaveform([]) + self.spectra.curveReg[i].redrawCurve() + return + if show: + self.spectra.curveReg[i].receiveXWaveform( + self.registers[i][self.cb_choose_x.currentIndex()]) + self.spectra.curveReg[i].receiveYWaveform(self.registers[i][2]) + self.spectra.curveReg[i].redrawCurve() + self.spectra.curveReg[i].setVisible(True) + else: + self.spectra.curveReg[i].setVisible(False) + + def _toggle_registers_axis(self, idx): + for i in range(4): + if self.registers[i] is None: + continue + self.spectra.curveReg[i].receiveXWaveform(self.registers[i][idx]) + self.spectra.curveReg[i].receiveYWaveform(self.registers[i][2]) + self.spectra.curveReg[i].redrawCurve() + + def _export_data(self, idx): + if not self.registers[idx]: + return + + home = os.path.expanduser('~') + folder_month = datetime.now().strftime('%Y-%m') + folder_day = datetime.now().strftime('%Y-%m-%d') + path = os.path.join( + home, 'shared', 'screens-iocs', folder_month, folder_day) + if not os.path.exists(path): + os.makedirs(path) + fn, _ = QFileDialog.getSaveFileName(self, 'Save as...', path, '*.txt') + if not fn: + return False + if not fn.endswith('.txt'): + fn += '.txt' + + data = np.array([self.registers[idx][0], self.registers[idx][1]]).T + np.savetxt(fn, data) + + def _handle_registers_vis(self): + vis = self.registers_widget.isVisible() + text = 'v' if vis else '^' + ttip = 'Show' if vis else 'Hide' + self.pb_showregs.setText(text) + self.pb_showregs.setToolTip(ttip+' registers') + self.registers_widget.setVisible(not vis) + self.spectra.adjustSize() + self.adjustSize()
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_tune/spectrogram.html b/_modules/siriushla/as_di_tune/spectrogram.html new file mode 100644 index 000000000..2b86891b3 --- /dev/null +++ b/_modules/siriushla/as_di_tune/spectrogram.html @@ -0,0 +1,444 @@ + + + + + + siriushla.as_di_tune.spectrogram — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_di_tune.spectrogram

+import numpy as np
+
+from qtpy.QtGui import QPalette, QColor
+from qtpy.QtCore import Qt, Slot, Signal
+from qtpy.QtWidgets import QWidget, QGridLayout, QHBoxLayout, \
+    QComboBox, QCheckBox, QLabel, QPushButton
+import qtawesome as qta
+
+from siriuspy.namesys import SiriusPVName
+from siriushla.widgets import SiriusSpectrogramView, QSpinBoxPlus
+
+
+
+[docs] +class BOTuneSpectrogram(SiriusSpectrogramView): + """BO Tune Spectrogram View.""" + + new_data = Signal(np.ndarray) + buffer_curr_size = Signal(str) + buffer_data_size = Signal(int) + buffer_size_changed = Signal(int) + idx2send_changed = Signal(int) + + def __init__(self, parent=None, prefix='', orientation='H', + background='w'): + """Init.""" + self.prefix = prefix + self.orientation = orientation + self.device = SiriusPVName('BO-Glob:DI-Tune-O') + self.device = self.device.substitute( + prefix=self.prefix, idx=orientation) + image_channel = self.device.substitute( + dev='TuneProc', propty='SpecArray-Mon') + xaxis_channel = self.device.substitute(propty='TuneFracArray-Mon') + yaxis_channel = self.device.substitute(propty='TimeArray-Mon') + roioffx_channel = self.device.substitute(propty='ROIOffXConv-RB') + roioffy_channel = self.device.substitute(propty='ROIOffYConv-RB') + roiwidth_channel = self.device.substitute(propty='ROIWidthConv-RB') + roiheight_channel = self.device.substitute(propty='ROIHeightConv-RB') + super().__init__(parent=parent, + image_channel=image_channel, + xaxis_channel=xaxis_channel, + yaxis_channel=yaxis_channel, + roioffsetx_channel=roioffx_channel, + roioffsety_channel=roioffy_channel, + roiwidth_channel=roiwidth_channel, + roiheight_channel=roiheight_channel, + background=background) + self.normalizeData = True + self.ROIColor = QColor('cyan') + self.format_tooltip = '{0:.3f}, {1:.3f}' + self._idx2send = 0 + self.buffer = list() + self.last_data = None + self.nravgs = 1 + +
+[docs] + @Slot(np.ndarray) + def image_value_changed(self, new_image): + """Reimplement image_value_changed slot.""" + if new_image is None or new_image.size == 0: + return + spec_size = self._image_height*self._image_width + self.image_waveform = new_image[:spec_size] + self.needs_redraw = True
+ + +
+[docs] + def process_image(self, image): + """Process data.""" + # Flip data in X axis + image = np.flip(image, 0) + + # Truncate image + if self.nravgs > 1 and len(self.buffer) >= 1: + last_buff_shape = self.buffer[-1].shape + image_shape = image.shape + aux = np.zeros(last_buff_shape) + if last_buff_shape > image_shape: + aux[:image_shape[0], :image_shape[1]] += image + elif last_buff_shape < image_shape: + aux += image[:last_buff_shape[0], :last_buff_shape[1]] + else: + aux += image + image = aux + + # Manage buffer + self.buffer.append(image) + if len(self.buffer) > self.nravgs: + self.buffer.pop(0) + self.buffer_curr_size.emit(str(len(self.buffer))) + + # Perform average + image = np.mean(self.buffer, axis=0) + + # update last data + self.last_data = image + last_data_size = self.last_data.shape[0]-1 + self.buffer_data_size.emit(last_data_size) + if not self._idx2send > last_data_size: + # Emit spectrum data + self.new_data.emit(image[self._idx2send, :]) + + # Return image + return image
+ + +
+[docs] + def toggleXChannel(self): + """Toggle X channel between FreqArray and TuneFracArray.""" + if 'TuneFracArray' in self._xaxischannel.address: + new_ch = 'FreqArray-Mon' + elif 'FreqArray' in self._xaxischannel.address: + new_ch = 'TuneFracArray-Mon' + # TODO: remove this command when bug in Tune is resolved + self.resetBuffer() + self.xAxisChannel = self.device.substitute(propty=new_ch)
+ + +
+[docs] + def setBufferSize(self, new_size): + """Set number of averages, or, buffer size.""" + if new_size >= 1: + self.nravgs = new_size + while len(self.buffer) > self.nravgs: + self.buffer.pop(0) + self.buffer_size_changed.emit(self.nravgs)
+ + +
+[docs] + def resetBuffer(self): + """Reset buffer.""" + self.buffer = list()
+ + +
+[docs] + def getDataIndex(self): + """Return index of the spectrogram to send in new_data signal.""" + return self._idx2send
+ + +
+[docs] + def setIndex2Send(self, new_idx): + """Set index of the spectrogram to send in new_data signal.""" + max_idx = self.buffer[-1].shape[0] - 1 + if new_idx > max_idx: + self._idx2send = max_idx + else: + self._idx2send = new_idx + self.new_data.emit(self.last_data[self._idx2send, :])
+ + +
+[docs] + def mouseDoubleClickEvent(self, ev): + if ev.button() == Qt.LeftButton: + pos = self._image_item.mapFromDevice(ev.pos()) + if not self._image_item.height(): + pass + elif pos.y() > 0 and pos.y() <= self._image_item.height() and\ + pos.x() > 0 and pos.x() <= self._image_item.width(): + self._idx2send = int(pos.y()) + self.idx2send_changed.emit(self._idx2send) + if self.last_data is not None: + self.new_data.emit(self.last_data[self._idx2send, :]) + super().mouseDoubleClickEvent(ev)
+
+ + + +
+[docs] +class BOTuneSpectrogramControls(QWidget): + """Booster Tune Spectrogram Controls.""" + + def __init__(self, parent=None, prefix='', orientation='H', + title='', background='w'): + """Init.""" + super().__init__(parent) + self.prefix = prefix + self.orientation = orientation + self.title = title + self.background = background + self._setupUi() + + def _setupUi(self): + self.lb_title = QLabel(self.title, self, alignment=Qt.AlignCenter) + + self.spectrogram = BOTuneSpectrogram( + self, self.prefix, self.orientation) + + self.cb_show_roi = QCheckBox('Show ROI', self) + self.cb_show_roi.stateChanged.connect(self.spectrogram.showROI) + self.cb_show_roi.setChecked(True) + + self.sb_idx2plot = QSpinBoxPlus(self) + self.sb_idx2plot.editingFinished.connect(self.update_idx2plot) + self.lb_idx2plot = QLabel('0') + self.spectrogram.idx2send_changed.connect(self.update_idx2plot) + self.spectrogram.buffer_data_size.connect(self.sb_idx2plot.setMaximum) + + self.sb_buffsz = QSpinBoxPlus(self) + self.sb_buffsz.setValue(1) + self.sb_buffsz.setMinimum(1) + self.sb_buffsz.setMaximum(100) + self.sb_buffsz.editingFinished.connect(self.update_buffsize) + self.lb_buffsz = QLabel('1', self) + self.lb_buffsz.setStyleSheet('min-width:1.29em;max-width:1.29em;') + self.spectrogram.buffer_curr_size.connect(self.lb_buffsz.setText) + self.pb_resetbuff = QPushButton( + qta.icon('mdi.delete-empty'), '', self) + self.pb_resetbuff.setToolTip('Reset buffer') + self.pb_resetbuff.setObjectName('resetbuff') + self.pb_resetbuff.setStyleSheet( + "#resetbuff{min-width:25px; max-width:25px; icon-size:20px;}") + self.pb_resetbuff.clicked.connect(self.spectrogram.resetBuffer) + + self.cb_choose_x = QComboBox(self) + self.cb_choose_x.addItem('Tune Frac.') + self.cb_choose_x.addItem('Frequency') + self.cb_choose_x.currentIndexChanged.connect( + self.spectrogram.toggleXChannel) + + hbox_ctrls = QHBoxLayout() + hbox_ctrls.setContentsMargins(0, 0, 0, 0) + hbox_ctrls.setSpacing(6) + hbox_ctrls.addWidget(self.cb_show_roi) + hbox_ctrls.addStretch() + hbox_ctrls.addWidget(QLabel('Plot Index:'), alignment=Qt.AlignLeft) + hbox_ctrls.addWidget(self.sb_idx2plot, alignment=Qt.AlignLeft) + hbox_ctrls.addWidget(self.lb_idx2plot, alignment=Qt.AlignLeft) + hbox_ctrls.addStretch() + hbox_ctrls.addWidget(QLabel('Buff.:'), alignment=Qt.AlignLeft) + hbox_ctrls.addWidget(self.sb_buffsz, alignment=Qt.AlignLeft) + hbox_ctrls.addWidget(self.lb_buffsz, alignment=Qt.AlignLeft) + hbox_ctrls.addWidget(self.pb_resetbuff, alignment=Qt.AlignLeft) + hbox_ctrls.addStretch() + hbox_ctrls.addWidget(QLabel('X Axis:'), alignment=Qt.AlignRight) + hbox_ctrls.addWidget(self.cb_choose_x, alignment=Qt.AlignRight) + + pal = self.palette() + pal.setColor(QPalette.Background, self.background) + self.setAutoFillBackground(True) + self.setPalette(pal) + + lay = QGridLayout(self) + lay.setHorizontalSpacing(9) + lay.setVerticalSpacing(6) + lay.setContentsMargins(6, 6, 6, 6) + lay.addWidget(self.lb_title, 0, 0, 1, 2) + lay.addWidget(self.spectrogram, 1, 0) + lay.addLayout(hbox_ctrls, 2, 0, 1, 2) + +
+[docs] + def update_idx2plot(self, value=None): + if value is None: + value = self.sender().value() + self.sb_idx2plot.blockSignals(True) + self.sb_idx2plot.setValue(value) + self.lb_idx2plot.setText(str(value)) + self.spectrogram.setIndex2Send(value) + self.sb_idx2plot.blockSignals(False)
+ + +
+[docs] + def update_buffsize(self): + value = self.sender().value() + self.sb_buffsz.blockSignals(True) + self.sb_buffsz.setValue(value) + self.spectrogram.setBufferSize(value) + self.sb_buffsz.blockSignals(False)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_di_vlight/main.html b/_modules/siriushla/as_di_vlight/main.html new file mode 100644 index 000000000..fa80cfee6 --- /dev/null +++ b/_modules/siriushla/as_di_vlight/main.html @@ -0,0 +1,322 @@ + + + + + + siriushla.as_di_vlight.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_di_vlight.main

+"""VLightCam Widget."""
+
+from qtpy.QtWidgets import QWidget, QLabel, QVBoxLayout, QHBoxLayout, \
+    QGroupBox, QFormLayout, QSizePolicy as QSzPlcy, QPushButton
+from qtpy.QtCore import Qt
+from pydm.widgets import PyDMPushButton
+import qtawesome as qta
+
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from siriushla import util
+from siriushla.common.cam_basler import SiriusImageView, create_propty_layout,\
+    BaslerCamSettings
+from siriushla.widgets.windows import create_window_from_widget
+
+
+
+[docs] +def conv_sec_2_device(sec): + if sec == 'BO': + return 'BO-50U:DI-VLightCam' + elif sec == 'SI': + return 'SI-01C2FE:DI-VLightCam' + elif sec == 'IT': + return 'IT-EGH:DI-Cam' + else: + raise ValueError('device not defined for section {}'.format(sec))
+ + + +
+[docs] +class VLightCamView(QWidget): + """VLight Cam Viewer.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX, section=''): + """Init.""" + super().__init__(parent) + self.prefix = prefix + self.section = section.upper() + self.device = _PVName(conv_sec_2_device(self.section)) + self.cam_prefix = self.device.substitute(prefix=prefix) + self.setObjectName(self.section + 'App') + self.setWindowTitle(self.device + ' View') + self._setupUi() + + def _setupUi(self): + label = QLabel('<h2>'+self.device+' View</h2>', self, + alignment=Qt.AlignCenter) + + self.cam_viewer = SiriusImageView( + parent=self, + image_channel=self.cam_prefix.substitute(propty='Data-Mon'), + width_channel=self.cam_prefix.substitute(propty='AOIWidth-RB'), + offsetx_channel=self.cam_prefix.substitute(propty='AOIOffsetX-RB'), + offsety_channel=self.cam_prefix.substitute(propty='AOIOffsetY-RB'), + maxwidth_channel=self.cam_prefix.substitute( + propty='SensorWidth-Cte'), + maxheight_channel=self.cam_prefix.substitute( + propty='SensorHeight-Cte')) + self.cam_viewer.readingOrder = self.cam_viewer.ReadingOrder.Clike + self.cam_viewer.setObjectName('camview') + self.cam_viewer.setStyleSheet(""" + #camview{min-width:42em; min-height:32em;}""") + + self.settings = QGroupBox('Settings', self) + self.settings.setLayout(self._setupSettingsLayout()) + + lay = QVBoxLayout(self) + lay.addWidget(label) + lay.addWidget(self.cam_viewer) + lay.addWidget(self.settings) + + def _setupSettingsLayout(self): + label_CamEnbl = QLabel('Enable:', self) + hbox_CamEnbl = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='Enbl', propty_type='enbldisabl', width=3) + + label_FrameCnt = QLabel('Frame Count:', self) + hbox_FrameCnt = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='FrameCnt', propty_type='mon') + + label_Conn = QLabel('Connection:', self) + hbox_Conn = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='Connection', propty_type='mon') + + label_Reset = QLabel('Reset Camera:', self) + self.pb_dtl = PyDMPushButton( + label='', icon=qta.icon('fa5s.sync'), + parent=self, pressValue=1, + init_channel=self.cam_prefix.substitute(propty='Rst-Cmd')) + self.pb_dtl.setObjectName('reset') + self.pb_dtl.setStyleSheet( + "#reset{min-width:25px; max-width:25px; icon-size:20px;}") + + flay_sts = QFormLayout() + flay_sts.setSpacing(6) + flay_sts.setFormAlignment(Qt.AlignHCenter) + flay_sts.setLabelAlignment(Qt.AlignRight) + flay_sts.addRow(label_CamEnbl, hbox_CamEnbl) + flay_sts.addRow(label_FrameCnt, hbox_FrameCnt) + flay_sts.addRow(label_Conn, hbox_Conn) + flay_sts.addRow(label_Reset, self.pb_dtl) + + label_AcqMode = QLabel('Acq. Mode:', self) + hbox_AcqMode = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='AcqMode', propty_type='enum') + + label_AcqPeriod = QLabel('Acq. Period [s]:', self) + hbox_AcqPeriod = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='AcqPeriod', propty_type='sprb') + + label_ExpTime = QLabel('Exp. Time [us]:', self) + hbox_ExpTime = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='ExposureTime', propty_type='sprb') + + label_Gain = QLabel('Gain [dB]:', self) + hbox_Gain = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='Gain', propty_type='sprb', + cmd={'label': '', 'pressValue': 1, 'width': '25', 'height': '25', + 'icon': qta.icon('mdi.auto-fix'), 'icon-size': '20', + 'toolTip': 'Auto Gain', 'name': 'AutoGain'}) + + flay_ctrl = QFormLayout() + flay_ctrl.setSpacing(6) + flay_ctrl.setFormAlignment(Qt.AlignHCenter) + flay_ctrl.setLabelAlignment(Qt.AlignRight) + flay_ctrl.addRow(label_AcqMode, hbox_AcqMode) + flay_ctrl.addRow(label_AcqPeriod, hbox_AcqPeriod) + flay_ctrl.addRow(label_ExpTime, hbox_ExpTime) + flay_ctrl.addRow(label_Gain, hbox_Gain) + + self.pb_details = QPushButton(qta.icon('fa5s.ellipsis-h'), '', self) + self.pb_details.setToolTip('More settings') + self.pb_details.setObjectName('detail') + self.pb_details.setStyleSheet( + "#detail{min-width:25px; max-width:25px; icon-size:20px;}") + self.pb_details.setSizePolicy(QSzPlcy.Expanding, QSzPlcy.Preferred) + MyWindow = create_window_from_widget( + BaslerCamSettings, title=self.device+' Settings Details', + is_main=True) + util.connect_window(self.pb_details, MyWindow, + parent=self, prefix=self.prefix, + device=self.device) + + lay = QHBoxLayout() + lay.setSpacing(20) + lay.addLayout(flay_sts) + lay.addLayout(flay_ctrl) + lay.addWidget(self.pb_details, alignment=Qt.AlignTop) + return lay
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_commands/main.html b/_modules/siriushla/as_ps_commands/main.html new file mode 100644 index 000000000..a3c37e2e8 --- /dev/null +++ b/_modules/siriushla/as_ps_commands/main.html @@ -0,0 +1,1523 @@ + + + + + + siriushla.as_ps_commands.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_commands.main

+"""Window to test power supplies."""
+
+import re as _re
+from functools import partial as _part
+
+from qtpy.QtCore import Qt, QTimer
+from qtpy.QtWidgets import QFrame, QGridLayout, QVBoxLayout, QHBoxLayout, \
+    QSizePolicy, QGroupBox, QPushButton, QListWidget, QLabel, QApplication, \
+    QMessageBox, QTabWidget, QWidget, QInputDialog, QAbstractItemView, \
+    QComboBox, QStackedLayout
+from qtpy.QtGui import QKeySequence
+import qtawesome as qta
+
+from siriuspy.search import PSSearch
+from siriuspy.namesys import SiriusPVName as PVName
+from siriuspy.pwrsupply.csdev import Const as _PSC, ETypes as _PSE
+
+from ..util import get_appropriate_color, connect_newprocess, \
+    run_newprocess
+from ..widgets import SiriusMainWindow, PVNameTree
+from ..widgets.windows import create_window_from_widget
+from ..widgets.dialog import ProgressDialog
+from ..as_ti_control import HLTriggerDetailed
+
+from .tasks import CreateTesters, \
+    CheckComm, CheckStatus, \
+    ResetIntlk, CheckIntlk, \
+    SetSOFBMode, CheckSOFBMode, \
+    SetIDFFMode, CheckIDFFMode, \
+    SetOpMode, CheckOpMode, \
+    SetPwrState, CheckPwrState, CheckInitOk, \
+    SetPulse, CheckPulse, \
+    CheckCtrlLoop, \
+    SetCapBankVolt, CheckCapBankVolt, \
+    SetCurrent, CheckCurrent, \
+    SetVoltage, CheckVoltage, \
+    SetTriggerState, CheckTriggerState
+
+
+
+[docs] +class PSCmdWindow(SiriusMainWindow): + """PS commands window.""" + + def __init__(self, parent=None): + """Constructor.""" + super().__init__(parent) + self.setWindowTitle('Power Supply Commands') + self.setObjectName('ASApp') + cor = get_appropriate_color(section='AS') + self.setWindowIcon(qta.icon('mdi.format-list-numbered', color=cor)) + + # auxiliar data for initializing SI Fam PS + self._si_fam_psnames = PSSearch.get_psnames( + filters={'sec': 'SI', 'sub': 'Fam', 'dis': 'PS'}) + + # auxiliary data for SI fast correctors + self._si_fastcorrs = PSSearch.get_psnames( + filters={'sec': 'SI', 'dis': 'PS', 'dev': 'FC.*'}) + + self._needs_update_setup = False + self._setup_ui() + self._update_setup_timer = QTimer(self) + self._update_setup_timer.timeout.connect(self._update_setup) + self._update_setup_timer.setInterval(250) + self._update_setup_timer.start() + + def _setup_ui(self): + # setup central widget + self.central_widget = QFrame() + self.central_widget.setStyleSheet(""" + #OkList { + background-color: #eafaea; + } + #NokList { + background-color: #ffebe6; + } + QLabel{ + max-height: 1.29em; + } + QTabWidget::pane { + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }""") + self.setCentralWidget(self.central_widget) + + self.title = QLabel( + '<h3>Power Supply Commands</h3>', self, alignment=Qt.AlignCenter) + + # data + cmddata = { + 'PS': { + 'Selection': { + 'devices': self._get_ps_tree_names(), + 'levels': ('sec', 'mag_group'), + }, + 'Test': { + 'Check': { + 'Check Communication': { + 'cmd': self._check_comm, + 'tooltip': 'Check PS and DCLinks communication ' + 'status (verify invalid alarms and, ' + 'if LI, the value of Connected-Mon PV)', + }, + }, + 'Prepare': { + 'Disable PS triggers': { + 'cmd': _part( + self._set_check_trigger_state, 'PS', 'dsbl'), + }, + 'Turn Off SOFBMode': { + 'cmd': _part(self._set_check_fbp_sofbmode, 'off'), + }, + 'Turn Off IDFFMode': { + 'cmd': _part(self._set_check_fbp_idffmode, 'off'), + }, + 'Set PS and DCLinks to SlowRef': { + 'cmd': self._set_check_opmode_slowref, + }, + 'Set PS Current to zero': { + 'cmd': self._set_zero_ps, + }, + 'Reset PS and DCLinks': { + 'cmd': _part(self._reset_intlk, 'PS'), + }, + 'Prepare SI Fam DCLinks': { + 'cmd': self._prepare_sidclinks, + }, + 'Initialize SI Fam PS': { + 'cmd': self._set_check_pwrstateinit, + }, + }, + 'Config DCLinks': { + 'Turn DCLinks On': { + 'cmd': _part( + self._set_check_pwrstate_dclinks, 'on'), + }, + 'Check DCLinks CtrlLoop': { + 'cmd': _part(self._check_ctrlloop, 'dclink'), + }, + 'Set DCLinks Voltage': { + 'cmd': self._set_check_dclinks_capvolt, + }, + }, + 'Test': { + 'Turn PS On': { + 'cmd': _part( + self._set_check_pwrstate, 'PS', 'on', True), + }, + 'Check PS CtrlLoop': { + 'cmd': _part(self._check_ctrlloop, 'pwrsupply'), + }, + 'Set PS Current to test value': { + 'cmd': self._set_test_ps, + }, + 'Set PS Current to zero': { + 'cmd': self._set_zero_ps, + }, + }, + 'Restore': { + 'Restore PS triggers': { + 'cmd': _part(self._restore_triggers_state, 'PS'), + }, + }, + }, + 'Turn Off': { + 'Check': { + 'Check Communication': { + 'cmd': self._check_comm, + 'tooltip': 'Check PS and DCLinks communication ' + 'status (verify invalid alarms and, ' + 'if LI, the value of Connected-Mon PV)', + }, + }, + 'Prepare': { + 'Disable PS triggers': { + 'cmd': _part( + self._set_check_trigger_state, 'PS', 'dsbl'), + }, + 'Turn Off SOFBMode': { + 'cmd': _part(self._set_check_fbp_sofbmode, 'off'), + }, + 'Turn Off IDFFMode': { + 'cmd': _part(self._set_check_fbp_idffmode, 'off'), + }, + 'Set PS and DCLinks to SlowRef': { + 'cmd': self._set_check_opmode_slowref, + }, + 'Set PS Current to zero': { + 'cmd': self._set_zero_ps, + }, + 'Reset PS and DCLinks': { + 'cmd': _part(self._reset_intlk, 'PS'), + }, + }, + 'Turn Off': { + 'Turn PS Off': { + 'cmd': _part( + self._set_check_pwrstate, 'PS', 'off', True), + }, + 'Turn DCLinks Off': { + 'cmd': _part( + self._set_check_pwrstate_dclinks, 'off'), + }, + }, + }, + 'Turn On': { + 'Check': { + 'Check Communication': { + 'cmd': self._check_comm, + 'tooltip': 'Check PS and DCLinks communication ' + 'status (verify invalid alarms and, ' + 'if LI, the value of Connected-Mon PV)', + }, + }, + 'Prepare': { + 'Disable PS triggers': { + 'cmd': _part( + self._set_check_trigger_state, 'PS', 'dsbl'), + }, + 'Turn Off SOFBMode': { + 'cmd': _part(self._set_check_fbp_sofbmode, 'off'), + }, + 'Turn Off IDFFMode': { + 'cmd': _part(self._set_check_fbp_idffmode, 'off'), + }, + 'Reset PS and DCLinks': { + 'cmd': _part(self._reset_intlk, 'PS'), + }, + 'Prepare SI Fam DCLinks': { + 'cmd': self._prepare_sidclinks, + }, + 'Initialize SI Fam PS': { + 'cmd': self._set_check_pwrstateinit, + }, + }, + 'Config DCLinks': { + 'Turn DCLinks On': { + 'cmd': _part( + self._set_check_pwrstate_dclinks, 'on'), + }, + 'Check DCLinks CtrlLoop': { + 'cmd': _part(self._check_ctrlloop, 'dclink'), + }, + 'Set DCLinks Voltage': { + 'cmd': self._set_check_dclinks_capvolt, + }, + }, + 'Turn On': { + 'Turn PS On': { + 'cmd': _part( + self._set_check_pwrstate, 'PS', 'on', True), + }, + 'Check PS CtrlLoop': { + 'cmd': _part(self._check_ctrlloop, 'pwrsupply'), + }, + }, + 'Restore': { + 'Restore PS triggers': { + 'cmd': _part(self._restore_triggers_state, 'PS'), + }, + }, + }, + 'Auxiliary Commands': { + 'Show Status Summary': { + 'cmd': _part(self._check_status, 'PS'), + 'tooltip': 'Check PS and DCLinks interlock status' + ' and, if powered on, check if it is ' + 'following reference', + }, + 'Set PS Current': { + 'cmd': self._set_check_current, + }, + 'Set PS OpMode': { + 'cmd': self._set_check_opmode, + }, + }, + }, + 'PU': { + 'Selection': { + 'devices': self._get_pu_tree_names(), + 'levels': ('sec', ), + }, + 'Test': { + 'Prepare': { + 'Set PU Voltage to zero': { + 'cmd': _part(self._set_zero_pu, False), + }, + 'Reset PU': { + 'cmd': _part(self._reset_intlk, 'PU'), + }, + }, + 'Test': { + 'Turn PU On': { + 'cmd': _part( + self._set_check_pwrstate, 'PU', 'on', True), + }, + 'Enable PU Pulse': { + 'cmd': _part(self._set_check_pulse, 'on'), + }, + 'Enable PU triggers': { + 'cmd': _part( + self._set_check_trigger_state, 'PU', 'on'), + }, + 'Set PU Voltage to test value': { + 'cmd': self._set_test_pu, + }, + 'Set PU Voltage to zero': { + 'cmd': _part(self._set_zero_pu, True), + }, + }, + 'Restore': { + 'Restore PU triggers': { + 'cmd': _part(self._restore_triggers_state, 'PU'), + }, + }, + }, + 'Turn Off': { + 'Prepare': { + 'Set PU Voltage to zero': { + 'cmd': _part(self._set_zero_pu, False), + }, + 'Reset PU': { + 'cmd': _part(self._reset_intlk, 'PU'), + }, + }, + 'Turn Off': { + 'Disable PU Pulse': { + 'cmd': _part(self._set_check_pulse, 'off'), + }, + 'Turn PU Off': { + 'cmd': _part( + self._set_check_pwrstate, 'PU', 'off', True), + }, + }, + }, + 'Turn On': { + 'Prepare': { + 'Reset PU': { + 'cmd': _part(self._reset_intlk, 'PU'), + }, + }, + 'Turn On': { + 'Turn PU On': { + 'cmd': _part( + self._set_check_pwrstate, 'PU', 'on', True), + }, + 'Enable PU Pulse': { + 'cmd': _part(self._set_check_pulse, 'on'), + }, + }, + }, + 'Auxiliary Commands': { + 'Show Status Summary': { + 'cmd': _part(self._check_status, 'PU'), + 'tooltip': 'Check PU interlock status and, if ' + 'powered on, check if it is following ' + 'voltage setpoint' + }, + } + }, + } + procedures = sorted( + {proc for data in cmddata.values() for proc in data}) + procedures.remove('Selection') + procedures.remove('Auxiliary Commands') + init_index = procedures.index('Test') + + # menu + self.menu = self.menuBar() + + self.act_cycle = self.menu.addAction('Open Cycle Window') + connect_newprocess( + self.act_cycle, 'sirius-hla-as-ps-cycle.py', parent=self) + + self.aux_comm = self.menu.addMenu('Auxiliary Commands') + for group, props in cmddata.items(): + menu = self.aux_comm.addMenu(group) + for cmd, data in props['Auxiliary Commands'].items(): + act = menu.addAction(cmd) + act.triggered.connect(_part(self._set_lastcomm, group)) + act.triggered.connect(data['cmd']) + if 'tooltip' in data: + act.setToolTip(data['tooltip']) + + # selection and commands + self.wid_procs = QWidget(self) + + self.ld_procs = QLabel( + 'Select a procedure: ', self, alignment=Qt.AlignRight) + self.cb_procs = QComboBox(self) + self.cb_procs.addItems(procedures) + self.cb_procs.setCurrentIndex(init_index) + self.tab = QTabWidget(self) + self.tab.setObjectName('ASTab') + + lay_procs = QGridLayout(self.wid_procs) + lay_procs.addWidget(self.ld_procs, 0, 0, alignment=Qt.AlignRight) + lay_procs.addWidget(self.cb_procs, 0, 1, alignment=Qt.AlignLeft) + lay_procs.addWidget(self.tab, 1, 0, 1, 2) + + self.seltrees = dict() + self.buttons = dict() + for group, props in cmddata.items(): + self.buttons[group] = dict() + + # select + selection = props['Selection'] + tree = PVNameTree( + items=selection['devices'], + tree_levels=selection['levels'], + parent=self, + ) + tree.setStyleSheet(".QLabel{min-width: 8.5em;}") + tree.tree.setHeaderHidden(True) + tree.setSizePolicy( + QSizePolicy.Preferred, QSizePolicy.Preferred) + tree.tree.setColumnCount(1) + tree.tree.doubleClicked.connect(self._open_detail) + tree.tree.itemChanged.connect( + self._handle_checked_items_changed) + self.seltrees[group] = tree + + gbox_select = QGroupBox('Select '+group+': ', self) + gbox_select.setObjectName('select') + gbox_select.setStyleSheet(""" + #select{ + border-top: 0px solid transparent; + border-left: 0px solid transparent; + border-bottom: 0px solid transparent; + }""") + lay_select = QVBoxLayout(gbox_select) + lay_select.addWidget(tree) + + # commands + gbox_comm = QGroupBox('Commands', self) + gbox_comm.setObjectName('comm') + gbox_comm.setStyleSheet( + '#comm{border: 0px solid transparent;}') + stack_procs = QStackedLayout(gbox_comm) + self.cb_procs.currentIndexChanged.connect( + stack_procs.setCurrentIndex) + for proc in procedures: + wid_comm = QWidget() + lay_comm = QVBoxLayout(wid_comm) + lay_comm.setContentsMargins(20, 9, 20, 9) + cmdidx, cmdbuttons = 1, list() + for cmdgroup, cmdlist in props[proc].items(): + label = QLabel( + '<h4>'+cmdgroup+'</h4>', self, + alignment=Qt.AlignCenter) + lay_comm.addWidget(label) + for cmd, data in cmdlist.items(): + btn = QPushButton(str(cmdidx) + '. ' + cmd, self) + btn.setSizePolicy( + QSizePolicy.Minimum, QSizePolicy.Maximum) + btn.clicked.connect(_part(self._set_lastcomm, group)) + btn.clicked.connect(data['cmd']) + if 'tooltip' in data: + btn.setToolTip(data['tooltip']) + cmdbuttons.append(btn) + if 'SI Fam' in cmd: + btn.setVisible(False) + else: + cmdidx += 1 + lay_comm.addWidget(btn) + lay_comm.addWidget(QLabel('')) + self.buttons[group][proc] = cmdbuttons + stack_procs.addWidget(wid_comm) + stack_procs.setCurrentIndex(init_index) + + wid = QWidget(self) + lay = QGridLayout(wid) + lay.setContentsMargins(0, 9, 0, 0) + lay.setHorizontalSpacing(0) + lay.addWidget(gbox_select, 0, 0) + lay.addWidget(gbox_comm, 0, 1) + lay.setColumnStretch(0, 1) + lay.setColumnStretch(1, 1) + self.tab.addTab(wid, group) + + # lists + self.label_lastcomm = QLabel('Last Command: ', self) + self.ok_ps = QListWidget(self) + self.ok_ps.setObjectName('OkList') + self.ok_ps.doubleClicked.connect(self._open_detail) + self.ok_ps.setSelectionMode(QAbstractItemView.MultiSelection) + self.ok_ps.setToolTip( + 'Select rows and press Ctrl+C to copy and Esc to deselect.') + self.nok_ps = QListWidget(self) + self.nok_ps.setObjectName('NokList') + self.nok_ps.doubleClicked.connect(self._open_detail) + self.nok_ps.setSelectionMode(QAbstractItemView.MultiSelection) + self.nok_ps.setToolTip( + 'Select rows and press Ctrl+C to copy and Esc to deselect.') + self.clearlists_bt = QPushButton('Clear', self) + self.clearlists_bt.clicked.connect(self._clear_lastcomm) + self.ok_ps_aux_list = list() + self.nok_ps_aux_list = list() + hbox = QHBoxLayout() + hbox.addWidget(self.label_lastcomm) + hbox.addWidget(self.clearlists_bt, alignment=Qt.AlignRight) + list_layout = QGridLayout() + list_layout.setContentsMargins(0, 0, 0, 0) + list_layout.setVerticalSpacing(6) + list_layout.setHorizontalSpacing(9) + list_layout.addLayout(hbox, 0, 0, 1, 2) + list_layout.addWidget(QLabel('<h4>Ok</h4>', self, + alignment=Qt.AlignCenter), 1, 0) + list_layout.addWidget(self.ok_ps, 2, 0) + list_layout.addWidget(QLabel('<h4>Failed</h4>', self, + alignment=Qt.AlignCenter), 1, 1) + list_layout.addWidget(self.nok_ps, 2, 1) + + # layout + lay = QGridLayout() + lay.setHorizontalSpacing(15) + lay.setVerticalSpacing(5) + lay.addWidget(self.title, 0, 0, 1, 3) + lay.addWidget(self.wid_procs, 1, 0) + lay.addLayout(list_layout, 1, 1) + lay.setColumnStretch(0, 2) + lay.setColumnStretch(1, 2) + lay.setRowStretch(0, 2) + lay.setRowStretch(1, 18) + self.central_widget.setLayout(lay) + + # ---------- commands ------------ + + def _check_comm(self): + self.ok_ps.clear() + self.nok_ps.clear() + devices = self._get_selected_ps() + if not devices: + return + dclinks = self._get_related_dclinks( + devices, include_regatrons=True) + devices.extend(dclinks) + + task0 = CreateTesters(devices, parent=self) + task1 = CheckComm(devices, parent=self) + task1.itemDone.connect(self._log) + + labels = ['Connecting to devices...', + 'Checking PS and DCLinks Comm. Status...'] + tasks = [task0, task1] + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _check_status(self, dev_type): + self.ok_ps.clear() + self.nok_ps.clear() + if dev_type == 'PS': + devices = self._get_selected_ps() + if not devices: + return + dclinks = self._get_related_dclinks( + devices, include_regatrons=True) + devices.extend(dclinks) + label1 = 'Reading PS and DCLinks Status...' + elif dev_type == 'PU': + devices = self._get_selected_pu() + if not devices: + return + label1 = 'Reading PU Status...' + + task0 = CreateTesters(devices, parent=self) + task1 = CheckStatus(devices, parent=self) + task1.itemDone.connect(self._log) + + labels = ['Connecting to devices...', label1] + tasks = [task0, task1] + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_check_trigger_state(self, dev_type, state): + self.ok_ps.clear() + self.nok_ps.clear() + if dev_type == 'PS': + devices = self._get_selected_ps() + elif dev_type == 'PU': + devices = self._get_selected_pu() + if not devices: + return + + task1 = SetTriggerState( + parent=self, dis=dev_type, state=state, devices=devices) + task2 = CheckTriggerState( + parent=self, dis=dev_type, state=state, devices=devices) + task2.itemDone.connect(self._log) + tasks = [task1, task2] + + labels = ['Disabling '+dev_type+' triggers...', + 'Checking '+dev_type+' trigger states...'] + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_check_opmode_slowref(self): + self.ok_ps.clear() + self.nok_ps.clear() + devices = self._get_selected_ps() + if not devices: + return + dclinks = self._get_related_dclinks(devices) + devices.extend(dclinks) + devices = [dev for dev in devices if 'LI-' not in dev] + devsot = [dev for dev in devices if dev.dev not in ('FCH', 'FCV')] + devsfc = [dev for dev in devices if dev.dev in ('FCH', 'FCV')] + + task0 = CreateTesters(devices, parent=self) + task1 = SetOpMode(devsot, state=_PSC.OpMode.SlowRef, parent=self) + task2 = SetOpMode(devsfc, state=_PSC.OpModeFOFBSel.manual, parent=self) + task3 = CheckOpMode( + devsot, + state=[_PSC.States.SlowRef, _PSC.States.Off, + _PSC.States.Interlock, _PSC.States.Initializing], + parent=self) + task3.itemDone.connect(self._log) + task4 = CheckOpMode( + devsfc, state=_PSC.OpModeFOFBSts.manual, parent=self) + task4.itemDone.connect(self._log) + + labels = ['Connecting to devices...', + 'Setting PS OpMode to SlowRef...', + 'Setting FC PS OpMode to manual...', + 'Checking PS OpMode...', + 'Checking FC PS OpMode...'] + tasks = [task0, task1, task2, task3, task4] + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _reset_intlk(self, dev_type): + self.ok_ps.clear() + self.nok_ps.clear() + if dev_type == 'PS': + devices = self._get_selected_ps() + if not devices: + return + dclinks = self._get_related_dclinks( + devices, include_regatrons=True) + devices.extend(dclinks) + dev_label = 'PS and DCLinks' + elif dev_type == 'PU': + devices = self._get_selected_pu() + if not devices: + return + dev_label = 'PU' + devices_rst = { + dev for dev in devices if dev.sec != 'LI'} + + task0 = CreateTesters(devices, parent=self) + task1 = ResetIntlk(devices_rst, parent=self) + task2 = CheckIntlk(devices, parent=self) + task2.itemDone.connect(self._log) + tasks = [task0, task1, task2] + + labels = ['Connecting to devices...', + 'Reseting '+dev_label+'...', + 'Checking '+dev_label+' Interlocks...'] + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_check_pwrstate(self, dev_type, state, show=True): + self.ok_ps.clear() + self.nok_ps.clear() + if isinstance(dev_type, list): + devices = list(dev_type) + dev_type = PVName(devices[0]).dis + else: + if dev_type == 'PS': + devices = self._get_selected_ps() + elif dev_type == 'PU': + devices = self._get_selected_pu() + if not devices: + return + + if state == 'on' and dev_type == 'PS': + dev2ctrl = list(set(devices) - set(self._si_fam_psnames)) + else: + dev2ctrl = devices + + task0 = CreateTesters(devices, parent=self) + task1 = SetPwrState(dev2ctrl, state=state, parent=self) + task2 = CheckPwrState(devices, state=state, is_test=True, parent=self) + task2.itemDone.connect(_part(self._log, show=show)) + tasks = [task0, task1, task2] + + labels = ['Connecting to devices...', + 'Turning '+dev_type+' '+state+'...', + 'Checking '+dev_type+' powered '+state+'...'] + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _prepare_sidclinks(self): + self.ok_ps.clear() + self.nok_ps.clear() + selected = self._get_selected_ps() + ps2check = [ps for ps in selected if ps in self._si_fam_psnames] + dclinks = self._get_related_dclinks(ps2check, include_regatrons=True) + if not ps2check: + return + + # if power state is on, do nothing + self.ok_ps_aux_list.clear() + self.nok_ps_aux_list.clear() + self._check_pwrstate(ps2check, state='on', is_test=False, show=False) + if set(self.ok_ps_aux_list) == set(ps2check): + for dev in dclinks: + self._log(dev, True) + return + + ps2act = list(self.nok_ps_aux_list) # act in PS off + dcl2act = self._get_related_dclinks(ps2act, include_regatrons=True) + # print('act', ps2act, dcl2act) + + # if need initializing, check if DCLinks are turned off + self.ok_ps_aux_list.clear() + self.nok_ps_aux_list.clear() + self._check_pwrstate(dcl2act, state='off', is_test=False, show=False) + if not self.nok_ps_aux_list: + for dev in dclinks: + self._log(dev, True) + return + + dcl2ctrl = list(self.nok_ps_aux_list) # control DCLink on + dcl_ok = set(dclinks) - set(dcl2ctrl) + ps2ctrl = set() # get related psnames + for dcl in dcl2ctrl: + pss = PSSearch.conv_dclink_2_psname(dcl) + ps2ctrl.update(pss) + # print('ctrl', ps2ctrl, dcl2ctrl) + + # if some DCLink is on, make sure related PS are turned off + self.ok_ps_aux_list.clear() + self.nok_ps_aux_list.clear() + self._check_pwrstate(ps2ctrl, state='off', is_test=False, show=False) + if self.nok_ps_aux_list: + ps2ctrl = list(self.nok_ps_aux_list) + + self.ok_ps_aux_list.clear() + self.nok_ps_aux_list.clear() + self._set_zero_ps(ps2ctrl, show=False) + + self.ok_ps_aux_list.clear() + self.nok_ps_aux_list.clear() + self._set_check_pwrstate(dev_type=ps2ctrl, state='off', show=False) + + if self.nok_ps_aux_list: + for dev in self.ok_ps_aux_list: + self._log(dev, True) + for dev in self.nok_ps_aux_list: + self._log(dev, False) + text = 'The listed PS seems to be taking too\n'\ + 'long to turn off.\n'\ + 'Try to execute this step once again.' + QMessageBox.warning(self, 'Message', text) + return + + # finally, turn DCLinks off + self._set_check_pwrstate_dclinks( + state='off', devices=dcl2ctrl, ps2check=ps2ctrl) + # log DCLinks Ok + for dev in dcl_ok: + self._log(dev, True) + + def _set_check_pwrstateinit(self): + self.ok_ps.clear() + self.nok_ps.clear() + selected = self._get_selected_ps() + devices = [ps for ps in selected if ps in self._si_fam_psnames] + if not devices: + return + + # if power state is on, do nothing + self.ok_ps_aux_list.clear() + self.nok_ps_aux_list.clear() + self._check_pwrstate(devices, state='on', is_test=False, show=False) + if len(self.ok_ps_aux_list) == len(devices): + for dev in self.ok_ps_aux_list: + self._log(dev, True) + return + + # if need initializing, check if DCLinks are turned off before continue + ps_ok = list(self.ok_ps_aux_list) + ps2ctrl = list(self.nok_ps_aux_list) # check PS off + dcl2check = self._get_related_dclinks(ps2ctrl, include_regatrons=True) + # print('set_check_pwrstateinit', ps2ctrl) + + self.ok_ps_aux_list.clear() + self.nok_ps_aux_list.clear() + self._check_pwrstate(dcl2check, state='off', is_test=False, show=False) + if self.nok_ps_aux_list: + for dev in self.ok_ps_aux_list: + self._log(dev, True) + for dev in self.nok_ps_aux_list: + self._log(dev, False) + QMessageBox.critical( + self, 'Message', + 'Make sure related DCLinks are turned\n' + 'off before initialize SI Fam PS!') + return + + # list in Ok PS already on + for dev in ps_ok: + self._log(dev, True) + + # then, initialize SI Fam PS + task0 = CreateTesters(ps2ctrl, parent=self) + task1 = SetPwrState(ps2ctrl, state='on', parent=self) + task2 = CheckOpMode( + ps2ctrl, state=_PSC.States.Initializing, parent=self) + task2.itemDone.connect(self._log) + tasks = [task0, task1, task2] + + labels = ['Connecting to devices...', + 'Initializing SI Fam PS...', + 'Checking SI Fam PS initialized...'] + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_check_pulse(self, state): + self.ok_ps.clear() + self.nok_ps.clear() + devices = self._get_selected_pu() + if not devices: + return + + task0 = CreateTesters(devices, parent=self) + task1 = SetPulse(devices, state=state, parent=self) + task2 = CheckPulse(devices, state=state, parent=self) + task2.itemDone.connect(self._log) + tasks = [task0, task1, task2] + + labels = ['Connecting to devices...', + 'Turning PU Pulse '+state+'...', + 'Checking PU Pulse '+state+'...'] + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_check_pwrstate_dclinks(self, state, devices=list(), + ps2check=list()): + self.ok_ps.clear() + self.nok_ps.clear() + if not devices: + pwrsupplies = self._get_selected_ps() + if not pwrsupplies: + return + devices = self._get_related_dclinks( + pwrsupplies, include_regatrons=True) + ps2check = set() + for dev in devices: + ps2check.update(PSSearch.conv_dclink_2_psname(dev)) + if not devices: + return + + if state == 'off': + self.ok_ps_aux_list.clear() + self.nok_ps_aux_list.clear() + self._check_pwrstate(ps2check, state='offintlk', show=False) + if self.nok_ps_aux_list: + for dev in self.ok_ps_aux_list: + self._log(dev, True) + for dev in self.nok_ps_aux_list: + self._log(dev, False) + QMessageBox.critical( + self, 'Message', + 'Make sure all related power supplies\n' + 'are turned off before turning DCLinks off!') + return + + task0 = CreateTesters(devices, parent=self) + task1 = SetPwrState(devices, state=state, parent=self) + task2 = CheckPwrState(devices, state=state, is_test=True, parent=self) + tasks = [task0, task1, task2] + + labels = ['Connecting to DCLinks...', + 'Turning DCLinks '+state+'...', + 'Checking DCLinks powered '+state+'...'] + + if state == 'on': + task3 = CheckInitOk(devices, parent=self) + task3.itemDone.connect(self._log) + tasks.append(task3) + labels.append('Wait DCLinks initialize...') + else: + task2.itemDone.connect(self._log) + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _check_pwrstate(self, devices, state, is_test=True, show=True): + self.ok_ps.clear() + self.nok_ps.clear() + + task0 = CreateTesters(devices, parent=self) + + if state == 'offintlk': + text = 'off or interlock' + task1 = CheckOpMode( + devices, state=[_PSC.States.Off, _PSC.States.Interlock], + parent=self) + else: + text = state + task1 = CheckPwrState( + devices, state=state, is_test=is_test, parent=self) + task1.itemDone.connect(_part(self._log, show=show)) + tasks = [task0, task1] + + labels = ['Connecting to devices...', + 'Checking devices powered '+text+'...'] + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _check_ctrlloop(self, dev_type='pwrsupply'): + self.ok_ps.clear() + self.nok_ps.clear() + pwrsupplies = self._get_selected_ps() + if not pwrsupplies: + return + if dev_type == 'pwrsupply': + devices = { + dev for dev in pwrsupplies if dev.sec != 'LI' and + dev.dev not in ('FCH', 'FCV')} + else: + devices = self._get_related_dclinks(pwrsupplies) + if not devices: + return + + task0 = CreateTesters(devices, parent=self) + task1 = CheckCtrlLoop(devices, parent=self) + task1.itemDone.connect(self._log) + labels = ['Connecting to devices...', + 'Checking CtrlLoop state...'] + tasks = [task0, task1] + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_check_dclinks_capvolt(self): + self.ok_ps.clear() + self.nok_ps.clear() + pwrsupplies = self._get_selected_ps() + if not pwrsupplies: + return + devices = self._get_related_dclinks( + pwrsupplies, include_regatrons=True) + dev_exc_regatrons = { + dev for dev in devices + if PSSearch.conv_psname_2_psmodel(dev) != 'REGATRON_DCLink'} + if not devices: + return + + task0 = CreateTesters(devices, parent=self) + task1 = SetCapBankVolt(dev_exc_regatrons, parent=self) + task2 = CheckCapBankVolt(devices, parent=self) + task2.itemDone.connect(self._log) + labels = ['Connecting to devices...', + 'Setting capacitor bank voltage...', + 'Checking capacitor bank voltage...'] + tasks = [task0, task1, task2] + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_check_fbp_sofbmode(self, state): + self.ok_ps.clear() + self.nok_ps.clear() + devices = self._get_selected_ps() + devices = [dev for dev in devices + if PSSearch.conv_psname_2_psmodel(dev) == 'FBP'] + if not devices: + return + + task0 = CreateTesters(devices, parent=self) + task1 = SetSOFBMode(devices, state=state, parent=self) + task2 = CheckSOFBMode(devices, state=state, parent=self) + task2.itemDone.connect(self._log) + tasks = [task0, task1, task2] + + labels = ['Connecting to devices...', + 'Turning PS SOFBMode '+state+'...', + 'Checking PS SOFBMode '+state+'...'] + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_check_fbp_idffmode(self, state): + self.ok_ps.clear() + self.nok_ps.clear() + devices = self._get_selected_ps() + devices = [dev for dev in devices + if PSSearch.conv_psname_2_psmodel(dev) == 'FBP'] + if not devices: + return + + task0 = CreateTesters(devices, parent=self) + task1 = SetIDFFMode(devices, state=state, parent=self) + task2 = CheckIDFFMode(devices, state=state, parent=self) + task2.itemDone.connect(self._log) + tasks = [task0, task1, task2] + + labels = ['Connecting to devices...', + 'Turning PS IDFFMode '+state+'...', + 'Checking PS IDFFMode '+state+'...'] + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_test_ps(self): + self.ok_ps.clear() + self.nok_ps.clear() + devices = self._get_selected_ps() + if not devices: + return + + task0 = CreateTesters(devices, parent=self) + task1 = SetCurrent(devices, is_test=True, parent=self) + task2 = CheckCurrent(devices, is_test=True, parent=self) + task2.itemDone.connect(self._log) + tasks = [task0, task1, task2] + + labels = ['Connecting to devices...', + 'Testing PS... Setting current...', + 'Testing PS... Checking current value...'] + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_zero_ps(self, devices=list(), show=True): + self.ok_ps.clear() + self.nok_ps.clear() + if not devices: + devices = self._get_selected_ps() + if not devices: + return + + task0 = CreateTesters(devices, parent=self) + task1 = SetCurrent(devices, parent=self) + task2 = CheckCurrent(devices, parent=self) + task2.itemDone.connect(_part(self._log, show=show)) + tasks = [task0, task1, task2] + + labels = ['Connecting to devices...', + 'Setting current to zero...', + 'Checking current value...'] + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_check_current(self): + self.ok_ps.clear() + self.nok_ps.clear() + devices = self._get_selected_ps() + if not devices: + return + + value, res = QInputDialog.getDouble( + self, "Setpoint Input", "Insert current setpoint: ") + if not res: + return + + task0 = CreateTesters(devices, parent=self) + task1 = SetCurrent(devices, value=value, parent=self) + task2 = CheckCurrent(devices, value=value, parent=self) + task2.itemDone.connect(self._log) + tasks = [task0, task1, task2] + + labels = ['Connecting to devices...', + 'Setting current...', + 'Checking current value...'] + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_check_opmode(self): + self.ok_ps.clear() + self.nok_ps.clear() + devices = self._get_selected_ps() + devices = [ + dev for dev in devices if dev.sec != 'LI' and + dev.dev not in ('FCH', 'FCV')] + if not devices: + return + + state, res = QInputDialog.getItem( + self, "OpMode Input", "Select OpMode: ", + _PSE.OPMODES, editable=False) + if not res: + return + state2set = getattr(_PSC.OpMode, state) + state2check = getattr(_PSC.States, state) + + task0 = CreateTesters(devices, parent=self) + task1 = SetOpMode(devices, state=state2set, parent=self) + task2 = CheckOpMode(devices, state=state2check, parent=self) + task2.itemDone.connect(self._log) + + labels = ['Connecting to devices...', + 'Setting PS OpMode to '+state+'...', + 'Checking PS OpMode in '+state+'...'] + tasks = [task0, task1, task2] + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_test_pu(self): + self.ok_ps.clear() + self.nok_ps.clear() + devices = self._get_selected_pu() + if not devices: + return + + task0 = CreateTesters(devices, parent=self) + task1 = SetVoltage(devices, is_test=True, parent=self) + task2 = CheckVoltage(devices, is_test=True, parent=self) + task2.itemDone.connect(self._log) + tasks = [task0, task1, task2] + + labels = ['Connecting to devices...', + 'Testing PU... Setting voltage...', + 'Testing PU... Checking voltage value...'] + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _set_zero_pu(self, check=True): + self.ok_ps.clear() + self.nok_ps.clear() + devices = self._get_selected_pu() + if not devices: + return + + task0 = CreateTesters(devices, parent=self) + task1 = SetVoltage(devices, parent=self) + tasks = [task0, task1] + + labels = ['Connecting to devices...', + 'Setting voltage to zero...'] + + if check: + task2 = CheckVoltage(devices, parent=self) + task2.itemDone.connect(self._log) + tasks.append(task2) + labels.append('Checking voltage value...') + else: + task1.itemDone.connect(self._log) + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + def _restore_triggers_state(self, dev_type): + self.ok_ps.clear() + self.nok_ps.clear() + if dev_type == 'PS': + devices = self._get_selected_ps() + elif dev_type == 'PU': + devices = self._get_selected_pu() + if not devices: + return + + task1 = SetTriggerState( + parent=self, restore_initial_value=True, dis=dev_type, + devices=devices) + task2 = CheckTriggerState( + parent=self, restore_initial_value=True, dis=dev_type, + devices=devices) + task2.itemDone.connect(self._log) + tasks = [task1, task2] + + labels = ['Restoring '+dev_type+' trigger states...', + 'Checking '+dev_type+' trigger states...'] + + dlg = ProgressDialog(labels, tasks, self) + dlg.exec_() + + # ---------- log updates ----------- + + def _set_lastcomm(self, dev_type): + sender_text = self.sender().text() + self.label_lastcomm.setText( + 'Last Command: '+dev_type+' - '+sender_text) + + def _clear_lastcomm(self): + self.ok_ps.clear() + self.nok_ps.clear() + self.label_lastcomm.setText('Last Command: ') + + def _log(self, name, status, show=True): + if show: + if status: + self.ok_ps.addItem(name) + else: + self.nok_ps.addItem(name) + else: + if status: + self.ok_ps_aux_list.append(name) + else: + self.nok_ps_aux_list.append(name) + + # ---------- device control ---------- + + def _get_ps_tree_names(self): + # add LI, TB, BO, TS + psnames = PSSearch.get_psnames({'sec': '(LI|TB|BO|TS)', 'dis': 'PS'}) + # add SI Fams + psnames.extend(PSSearch.get_psnames( + {'sec': 'SI', 'sub': 'Fam', 'dis': 'PS', 'dev': '(B.*|Q.*|S.*)'})) + # add SI Corrs + psnames.extend(PSSearch.get_psnames( + {'sec': 'SI', 'sub': '[0-2][0-9].*', 'dis': 'PS', + 'dev': '(LCH|CH|CV)'})) + # add SI QTrims + psnames.extend(PSSearch.get_psnames( + {'sec': 'SI', 'sub': '[0-2][0-9].*', 'dis': 'PS', + 'dev': '(QD.*|QF.*|Q[1-4])'})) + # add SI QSkews + psnames.extend(PSSearch.get_psnames( + {'sec': 'SI', 'dis': 'PS', 'dev': 'QS'})) + # add SI Fast Corrs + psnames.extend(PSSearch.get_psnames( + {'sec': 'SI', 'sub': '(?!01M).*', 'dis': 'PS', 'dev': 'FC.*'})) + # add SI SeptaFF Corrs + psnames.extend(PSSearch.get_psnames( + {'sec': 'SI', 'dis': 'PS', 'dev': 'FFC.*'})) + return psnames + + def _get_pu_tree_names(self): + punames = PSSearch.get_psnames({ + 'sec': '(TB|BO|TS|SI)', 'dis': 'PU', 'dev': '.*(Kckr|Sept)', + 'propty_name': '(?!:CCoil).*'}) + return punames + + def _get_selected_ps(self): + devices = self.seltrees['PS'].checked_items() + if not devices: + QMessageBox.critical(self, 'Message', 'No power supply selected!') + return False + devices = [PVName(dev) for dev in devices] + return devices + + def _get_selected_pu(self): + devices = self.seltrees['PU'].checked_items() + if not devices: + QMessageBox.critical( + self, 'Message', 'No pulsed power supply selected!') + return False + devices = [PVName(dev) for dev in devices] + return devices + + def _get_related_dclinks(self, psnames, include_regatrons=False): + if isinstance(psnames, str): + psnames = [psnames, ] + alldclinks = set() + for name in psnames: + if 'LI' in name: + continue + dclinks = PSSearch.conv_psname_2_dclink(name) + if dclinks: + dclink_model = PSSearch.conv_psname_2_psmodel(dclinks[0]) + if dclink_model != 'REGATRON_DCLink': + alldclinks.update(dclinks) + elif include_regatrons: + for dcl in dclinks: + dcl_typ = PSSearch.conv_psname_2_pstype(dcl) + if dcl_typ == 'as-dclink-regatron-master': + alldclinks.add(dcl) + alldclinks = [PVName(dev) for dev in alldclinks] + return alldclinks + + def _open_detail(self, index): + name = PVName(index.data()) + if name.dis == 'TI': + app = QApplication.instance() + wind = create_window_from_widget( + HLTriggerDetailed, title=name, is_main=True) + app.open_window(wind, parent=self, **{'device': name}) + return + elif not _re.match('.*-.*:.*-.*', name): + if index.model().rowCount(index) == 1: + name = PVName(index.child(0, 0).data()) + else: + return + if name.dis == 'PS': + run_newprocess(['sirius-hla-as-ps-detail.py', name]) + elif name.dis == 'PU': + run_newprocess(['sirius-hla-as-pu-detail.py', name]) + + # ---------- update setup ---------- + + def _handle_checked_items_changed(self, item): + devname = PVName(item.data(0, Qt.DisplayRole)) + if not _re.match('.*-.*:.*-.*', devname): + return + state2set = item.checkState(0) + + # ensure power supplies that share dclinks are checked together + if devname in self._si_fam_psnames: + dclinks = PSSearch.conv_psname_2_dclink(devname) + if dclinks: + psname2check = set() + for dcl in dclinks: + relps = PSSearch.conv_dclink_2_psname(dcl) + relps.remove(devname) + psname2check.update(relps) + self.seltrees['PS'].tree.blockSignals(True) + for psn in psname2check: + item2check = self.seltrees['PS']._item_map[psn] + if item2check.checkState(0) != state2set: + item2check.setData(0, Qt.CheckStateRole, state2set) + self.seltrees['PS'].tree.blockSignals(False) + + self._needs_update_setup = True + + def _update_setup(self): + if not self._needs_update_setup: + return + self._needs_update_setup = False + + # show/hide buttons to initialize SI Fam PS + has_sifam = False + for psn in self._si_fam_psnames: + item = self.seltrees['PS']._item_map[psn] + has_sifam |= item.checkState(0) != 0 + + for proc in self.buttons['PS']: + index = 1 + for but in self.buttons['PS'][proc]: + if 'SI Fam' in but.text(): + but.setVisible(has_sifam) + if not has_sifam: + continue + oldtext = but.text() + newtext = str(index) + '.' + oldtext.split('.')[1] + but.setText(newtext) + index += 1 + + # ---------- events ---------- + +
+[docs] + def keyPressEvent(self, evt): + """Implement keyPressEvent.""" + if evt.matches(QKeySequence.Copy): + if self.ok_ps.underMouse(): + items = self.ok_ps.selectedItems() + elif self.nok_ps.underMouse(): + items = self.nok_ps.selectedItems() + items = '\n'.join([i.text() for i in items]) + QApplication.clipboard().setText(items) + if evt.key() == Qt.Key_Escape: + if self.ok_ps.underMouse(): + items = self.ok_ps.clearSelection() + elif self.nok_ps.underMouse(): + items = self.nok_ps.clearSelection() + super().keyPressEvent(evt)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_commands/tasks.html b/_modules/siriushla/as_ps_commands/tasks.html new file mode 100644 index 000000000..eba0a64e0 --- /dev/null +++ b/_modules/siriushla/as_ps_commands/tasks.html @@ -0,0 +1,834 @@ + + + + + + siriushla.as_ps_commands.tasks — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_commands.tasks

+"""."""
+
+from copy import deepcopy as _dcopy
+import time as _time
+
+from qtpy.QtCore import Signal, QThread
+
+from siriuspy.search import HLTimeSearch as _HLTimeSearch, \
+    PSSearch as _PSSearch
+from siriuspy.csdev import Const
+from siriuspy.namesys import Filter, SiriusPVName as _PVName
+from siriuspy.devices.pstesters import \
+    TesterDCLink, TesterDCLinkFBP, TesterPS, TesterPSLinac, \
+    TesterPSFBP, TesterPSFOFB, TesterDCLinkRegatron, DEFAULT_CAP_BANK_VOLT, \
+    TesterPUKckr, TesterPUSept, Triggers
+
+
+TIMEOUT_CHECK = 10
+TIMEOUT_SLEEP = 0.1
+TIMEOUT_CONN = 0.5
+
+
+
+[docs] +class BaseTask(QThread): + """Base Task.""" + + _testers = dict() + currentItem = Signal(str) + itemDone = Signal(str, bool) + completed = Signal() + + def __init__(self, devices, state=None, is_test=False, value=None, + parent=None): + """Constructor.""" + super().__init__(parent) + self._devices = devices + self._state = state + self._is_test = is_test + self._value = value + self._quit_task = False + +
+[docs] + def size(self): + """Task size.""" + return len(self._devices)
+ + +
+[docs] + def exit_task(self): + """Set quit flag.""" + self._quit_task = True
+ + +
+[docs] + def run(self): + """Run task.""" + if not self._quit_task: + self.function() + self.completed.emit()
+ + +
+[docs] + def function(self): + """Must be reimplemented in each class.""" + raise NotImplementedError
+ + + def _set(self, method, **kwargs): + """Set.""" + for dev in self._devices: + self.currentItem.emit(dev) + tester = BaseTask._testers[dev] + if not tester.wait_for_connection(TIMEOUT_CONN): + self.itemDone.emit(dev, False) + continue + func = getattr(tester, method) + func(**kwargs) + self.itemDone.emit(dev, True) + if self._quit_task: + break + + def _check(self, method, timeout=TIMEOUT_CHECK, **kwargs): + """Check.""" + need_check = _dcopy(self._devices) + _t0 = _time.time() + while _time.time() - _t0 < timeout: + for dev in self._devices: + if dev not in need_check: + continue + tester = BaseTask._testers[dev] + if not tester.wait_for_connection(TIMEOUT_CONN): + continue + func = getattr(tester, method) + if func(**kwargs): + self.currentItem.emit(dev) + need_check.remove(dev) + self.itemDone.emit(dev, True) + if self._quit_task: + break + if (not need_check) or (self._quit_task): + break + _time.sleep(TIMEOUT_SLEEP) + for dev in need_check: + self.currentItem.emit(dev) + self.itemDone.emit(dev, False)
+ + + +
+[docs] +class CreateTesters(BaseTask): + """Create Testers.""" + +
+[docs] + def function(self): + for dev in self._devices: + self.currentItem.emit(dev) + if dev not in BaseTask._testers: + devname = _PVName(dev) + if devname.sec == 'LI': + tester = TesterPSLinac(dev) + elif _PSSearch.conv_psname_2_psmodel(dev) == 'FOFB_PS': + tester = TesterPSFOFB(dev) + elif _PSSearch.conv_psname_2_psmodel(dev) == 'FBP_DCLink': + tester = TesterDCLinkFBP(dev) + elif 'bo-dclink' in _PSSearch.conv_psname_2_pstype(dev): + tester = TesterDCLink(dev) + elif _PSSearch.conv_psname_2_psmodel(dev) == 'REGATRON_DCLink': + tester = TesterDCLinkRegatron(dev) + elif _PSSearch.conv_psname_2_psmodel(dev) == 'FBP': + tester = TesterPSFBP(dev) + elif devname.dis == 'PS': + tester = TesterPS(dev) + elif devname.dis == 'PU' and 'Kckr' in devname.dev: + tester = TesterPUKckr(dev) + elif devname.dis == 'PU' and 'Sept' in devname.dev: + tester = TesterPUSept(dev) + else: + raise NotImplementedError( + 'There is no Tester defined to '+dev+'.') + BaseTask._testers[dev] = tester + self.itemDone.emit(dev, True) + if self._quit_task: + break
+
+ + + +
+[docs] +class CheckComm(BaseTask): + """Check communication status.""" + +
+[docs] + def function(self): + """Check communication status.""" + self._check(method='check_comm')
+
+ + + +
+[docs] +class CheckStatus(BaseTask): + """Check Status.""" + +
+[docs] + def function(self): + """Check status.""" + self._check(method='check_status')
+
+ + + +
+[docs] +class ResetIntlk(BaseTask): + """Reset Interlocks.""" + +
+[docs] + def function(self): + """Reset.""" + self._set(method='reset') + if Filter.process_filters( + pvnames=self._devices, filters={'sec': 'SI', 'sub': 'Fam'}): + _time.sleep(2.0)
+
+ + + +
+[docs] +class CheckIntlk(BaseTask): + """Check Interlocks.""" + +
+[docs] + def function(self): + """Check interlocks.""" + self._check(method='check_intlk')
+
+ + + +
+[docs] +class SetSOFBMode(BaseTask): + """Set PS SOFBMode.""" + +
+[docs] + def function(self): + """Set PS SOFBMode.""" + self._set(method='set_sofbmode', state=self._state)
+
+ + + +
+[docs] +class CheckSOFBMode(BaseTask): + """Check PS SOFBMode.""" + +
+[docs] + def function(self): + """Check PS SOFBMode.""" + self._check(method='check_sofbmode', state=self._state)
+
+ + + +
+[docs] +class CheckIDFFMode(BaseTask): + """Check PS IDFFMode.""" + +
+[docs] + def function(self): + """Check PS IDFFMode.""" + self._check(method='check_idffmode', state=self._state)
+
+ + + +
+[docs] +class SetIDFFMode(BaseTask): + """Set PS IDFFMode.""" + +
+[docs] + def function(self): + """Set PS IDFFMode.""" + self._set(method='set_idffmode', state=self._state)
+
+ + + +
+[docs] +class SetOpMode(BaseTask): + """Set PS OpMode.""" + +
+[docs] + def function(self): + """Set PS OpMode.""" + self._set(method='set_opmode', state=self._state)
+
+ + + +
+[docs] +class CheckOpMode(BaseTask): + """Check PS OpMode.""" + +
+[docs] + def function(self): + """Check PS OpMode.""" + self._check(method='check_opmode', state=self._state)
+
+ + + +
+[docs] +class SetPwrState(BaseTask): + """Set PS PwrState.""" + +
+[docs] + def function(self): + """Set PS PwrState.""" + self._set(method='set_pwrstate', state=self._state) + + # NOTE: in turn regatrons off, wait for related PS to update readings + regatrons_idcs = ['1A', '1B', '2A', '2B', '3A', '3B', '4A', '4B'] + if self._state == 'off': + if any([_PVName(dev).idx in regatrons_idcs + for dev in self._devices]): + _time.sleep(15)
+
+ + + +
+[docs] +class CheckPwrState(BaseTask): + """Check PS PwrState.""" + +
+[docs] + def function(self): + """Check PS PwrState.""" + timeout = 5 + if not self._is_test: + timeout = 2 + elif self._state == 'on': + if ('SI-Fam:PS-B1B2-1' in self._devices or + 'SI-Fam:PS-B1B2-2' in self._devices): + timeout = 15 + elif self._state == 'off': + pstype2psnames = _PSSearch.get_pstype_2_psnames_dict() + regatrons = pstype2psnames['as-dclink-regatron-master'] + if set(regatrons) & set(self._devices): + timeout = 15 + self._check( + method='check_pwrstate', state=self._state, timeout=timeout)
+
+ + + +
+[docs] +class SetPulse(BaseTask): + """Set PU Pulse.""" + +
+[docs] + def function(self): + """Set PU Pulse.""" + self._set(method='set_pulse', state=self._state)
+
+ + + +
+[docs] +class CheckPulse(BaseTask): + """Check PU Pulse.""" + +
+[docs] + def function(self): + """Check PU Pulse.""" + self._check(method='check_pulse', state=self._state, + timeout=TIMEOUT_CHECK)
+
+ + + +
+[docs] +class CheckInitOk(BaseTask): + """Check if PS initialized.""" + +
+[docs] + def function(self): + """Check PS initialized.""" + self._check(method='check_init_ok', timeout=3*TIMEOUT_CHECK)
+
+ + + +
+[docs] +class SetCtrlLoop(BaseTask): + """Set PS CtrlLoop.""" + +
+[docs] + def function(self): + """Set PS CtrlLoop.""" + self._set(method='set_ctrlloop')
+
+ + + +
+[docs] +class CheckCtrlLoop(BaseTask): + """Check PS CtrlLoop.""" + +
+[docs] + def function(self): + """Check PS CtrlLoop.""" + self._check(method='check_ctrlloop')
+
+ + + +
+[docs] +class SetCapBankVolt(BaseTask): + """Set capacitor bank voltage.""" + +
+[docs] + def function(self): + """Set DCLink Capacitor Bank Voltage.""" + self._set(method='set_capvolt')
+
+ + + +
+[docs] +class CheckCapBankVolt(BaseTask): + """Check capacitor bank voltage.""" + +
+[docs] + def function(self): + """Check DCLink Capacitor Bank Voltage.""" + psn = {k for k in DEFAULT_CAP_BANK_VOLT if k != 'FBP_DCLink'} + if any(n in self._devices for n in psn): + timeout = 6*TIMEOUT_CHECK + else: + timeout = TIMEOUT_CHECK + self._check(method='check_capvolt', timeout=timeout)
+
+ + + +
+[docs] +class SetCurrent(BaseTask): + """Set current value.""" + +
+[docs] + def function(self): + """Set PS Current.""" + self._set(method='set_current', test=self._is_test, value=self._value)
+
+ + + +
+[docs] +class CheckCurrent(BaseTask): + """Check current value.""" + +
+[docs] + def function(self): + """Check PS Current.""" + psn = {'SI-Fam:PS-B1B2-1', 'SI-Fam:PS-B1B2-2'} + if any(n in self._devices for n in psn): + timeout = 4.1*TIMEOUT_CHECK + else: + timeout = 2.1*TIMEOUT_CHECK + self._check(method='check_current', + timeout=timeout, + test=self._is_test, + value=self._value)
+
+ + + +
+[docs] +class SetVoltage(BaseTask): + """Set voltage value.""" + +
+[docs] + def function(self): + """Set PU Voltage.""" + self._set(method='set_voltage', test=self._is_test)
+
+ + + +
+[docs] +class CheckVoltage(BaseTask): + """Check voltage value.""" + +
+[docs] + def function(self): + """Check PU Voltage.""" + if self._is_test: + timeout = 10 + else: + if 'BO-48D:PU-EjeKckr' in self._devices: + timeout = 45 + elif 'SI-01SA:PU-InjNLKckr' in self._devices: + timeout = 35 + elif 'SI-01SA:PU-InjDpKckr' in self._devices: + timeout = 17 + else: + timeout = 10 + self._check(method='check_voltage', timeout=timeout, + test=self._is_test)
+
+ + + +
+[docs] +class TriggerTask(QThread): + """Base task to handle triggers.""" + + initial_triggers_state = dict() + + currentItem = Signal(str) + itemDone = Signal(str, bool) + completed = Signal() + + def __init__(self, parent=None, restore_initial_value=False, + dis='PS', state='on', devices=None): + """Constructor.""" + super().__init__(parent) + self._dis = dis + filt = {'dev': 'Mags'} if dis == 'PS' else {'dev': '.*(Kckr|Sept).*'} + self._triggers = _HLTimeSearch.get_hl_triggers(filters=filt) + self._connectors = Triggers(self._triggers) + self._connectors.wait_for_connection(TIMEOUT_CONN) + + for trig in self._triggers: + if trig not in TriggerTask.initial_triggers_state.keys(): + value = self._connectors.triggers[trig].state + TriggerTask.initial_triggers_state[trig] = value + + if restore_initial_value: + self.trig2val = { + k: v for k, v in TriggerTask.initial_triggers_state.items() + if k in self._triggers} + else: + val = Const.DsblEnbl.Enbl if state == 'on' else Const.DsblEnbl.Dsbl + self.trig2val = {trig: val for trig in self._triggers} + + self._devices = devices + self._trig2ctrl = self._get_trigger_by_psname(self._devices) + + self._quit_task = False + +
+[docs] + def size(self): + """Task size.""" + return len(self._triggers)
+ + +
+[docs] + def exit_task(self): + """Set quit flag.""" + self._quit_task = True
+ + +
+[docs] + def run(self): + """Run task.""" + if not self._quit_task: + self.function() + self.completed.emit()
+ + +
+[docs] + def function(self): + """Function to implement.""" + raise NotImplementedError
+ + + def _get_trigger_by_psname(self, devices): + """Return triggers corresponding to devices.""" + devices = set(devices) + triggers = set() + if self._dis == 'PS': + for trig in self._triggers: + channels_set = set(_HLTimeSearch.get_hl_trigger_channels(trig)) + dev_set = {ch.device_name for ch in channels_set} + if devices & dev_set: + triggers.add(trig) + else: + for dev in devices: + trig = _PVName(dev).substitute(dis='TI') + triggers.add(trig) + return triggers + + def _set(self): + for trig in self._trig2ctrl: + self.currentItem.emit(trig) + conn = self._connectors.triggers[trig] + val = self.trig2val[trig] + if not conn.wait_for_connection(TIMEOUT_CONN): + self.itemDone.emit(trig, False) + continue + if val is not None: + conn.state = val + self.itemDone.emit(trig, True) + + def _check(self): + need_check = _dcopy(self._trig2ctrl) + _t0 = _time.time() + while _time.time() - _t0 < TIMEOUT_CHECK/2: + for trig in self._trig2ctrl: + if trig not in need_check: + continue + conn = self._connectors.triggers[trig] + val = self.trig2val[trig] + if not conn.wait_for_connection(TIMEOUT_CONN): + continue + if conn.state == val: + self.currentItem.emit(trig) + self.itemDone.emit(trig, True) + need_check.remove(trig) + if self._quit_task: + break + if (not need_check) or (self._quit_task): + break + _time.sleep(TIMEOUT_SLEEP) + for trig in need_check: + self.currentItem.emit(trig) + self.itemDone.emit(trig, False)
+ + + +
+[docs] +class SetTriggerState(TriggerTask): + """Set magnet trigger state.""" + +
+[docs] + def function(self): + self._set()
+
+ + + +
+[docs] +class CheckTriggerState(TriggerTask): + """Check magnet trigger state.""" + +
+[docs] + def function(self): + self._check()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/PSControlWindow.html b/_modules/siriushla/as_ps_control/PSControlWindow.html new file mode 100644 index 000000000..a3778e25c --- /dev/null +++ b/_modules/siriushla/as_ps_control/PSControlWindow.html @@ -0,0 +1,244 @@ + + + + + + siriushla.as_ps_control.PSControlWindow — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.PSControlWindow

+"""Defines a class to control a set of a device from a given class."""
+import qtawesome as qta
+
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.search import PSSearch
+from siriushla.util import connect_window, get_appropriate_color, \
+    connect_newprocess
+from siriushla.widgets import SiriusMainWindow
+from .control_widget.ControlWidgetFactory import ControlWidgetFactory
+from .PSDetailWindow import PSDetailWindow
+from .PSTrimWindow import PSTrimWindow
+
+
+
+[docs] +class PSControlWindow(SiriusMainWindow): + """Base window to show devices of a section in tabs.""" + + def __init__(self, section, device, subsection=None, parent=None): + """Class constructor.""" + super(PSControlWindow, self).__init__(parent) + self.setObjectName(section+'App') + self._section = section + self._device = device + self._subsection = subsection + icon = qta.icon( + 'mdi.car-battery', color=get_appropriate_color(section)) + self.setWindowIcon(icon) + + self._setup_ui() + + sec2label = { + 'LI': 'Linac ', + 'TB': 'Linac to Booster ', + 'BO': 'Booster ', + 'TS': 'Booster to Storage Ring ', + 'SI': 'Storage Ring ', + 'IT': 'Injector Test '} + dev2label = { + "dipole": "Dipoles", + "spectrometer": "Spectrometer", + "quadrupole": "Quadrupoles", + "sextupole": "Sextupoles", + "solenoid": "Solenoids", + "corrector-slow": "Slow Correctors", + "corrector-fast": "Fast Correctors", + "corrector-septff": "Septa FF Correctors", + "skew-quadrupole": "Quadrupoles Skew", + "trim-quadrupole": "Trims", + "lens": "Lens", + } + self.setWindowTitle( + sec2label[section] + + (dev2label[device] if device else '') + + ' Power Supplies ' + + ('- Subsection '+subsection if subsection else '')) + + def _setup_ui(self): + self.widget = ControlWidgetFactory.factory( + parent=self, section=self._section, + subsection=self._subsection, device=self._device) + self._connect_buttons(self.widget) + self.setCentralWidget(self.widget) + + def _connect_buttons(self, widget): + for w in widget.get_summary_widgets(): + detail_bt = w.get_detail_button() + psname = detail_bt.text() + if not psname: + psname = detail_bt.toolTip() + psname = _PVName(psname) + if PSSearch.conv_psname_2_psmodel(psname) == 'REGATRON_DCLink': + connect_newprocess( + w, ['sirius-hla-as-ps-regatron-individual', + '-dev', psname], parent=self, is_pydm=True) + else: + connect_window(detail_bt, PSDetailWindow, self, psname=psname) + + trim_bt = w.get_trim_button() + if trim_bt is not None: + connect_window(trim_bt, PSTrimWindow, self, device=psname)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/PSDetailWindow.html b/_modules/siriushla/as_ps_control/PSDetailWindow.html new file mode 100644 index 000000000..ddc66f642 --- /dev/null +++ b/_modules/siriushla/as_ps_control/PSDetailWindow.html @@ -0,0 +1,247 @@ + + + + + + siriushla.as_ps_control.PSDetailWindow — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.PSDetailWindow

+"""Define a window with detailed controls for a given magnet."""
+
+from qtpy.QtWidgets import QPushButton, QMenu, QAction
+import qtawesome as qta
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.search import PSSearch
+from siriushla.util import connect_window, connect_newprocess, \
+    get_appropriate_color
+from siriushla.widgets import SiriusMainWindow
+from .detail_widget.DetailWidgetFactory import DetailWidgetFactory
+
+
+
+[docs] +class PSDetailWindow(SiriusMainWindow): + """Window to control a detailed widget.""" + + def __init__(self, psname, parent=None, psmodel=None, pstype=None): + """Init UI.""" + super(PSDetailWindow, self).__init__(parent) + if isinstance(psname, str): + self._psname = [_PVName(psname), ] + else: + self._psname = [_PVName(psn) for psn in psname] + self._psmodel = psmodel + self._pstype = pstype + name = self._psname[0] + self._is_dclink = 'dclink' in name.lower() + secs = {'AS', 'LI', 'TB', 'BO', 'TS', 'SI', 'IT'} + if name.sub.endswith(('SA', 'SB', 'SP', 'ID')): + sec = 'ID' + elif name.sec in secs: + sec = name.sec + elif name.idx[:2] in secs: + sec = name.idx[:2] + else: + sec = 'AS' + self.setObjectName(sec+'App') + icon = qta.icon( + 'mdi.car-battery', color=get_appropriate_color(sec)) + self.setWindowIcon(icon) + self._setup_ui() + + def _setup_ui(self): + if self._is_dclink: + self.setWindowTitle('DCLinks Window') + else: + self.setWindowTitle(self._psname[0]) + # Set window layout + self.widget = DetailWidgetFactory.factory( + self._psname, parent=self, + psmodel=self._psmodel, pstype=self._pstype) + self._connect_buttons(self.widget) + self.setCentralWidget(self.widget) + + def _connect_buttons(self, widget): + w = widget.findChild(QPushButton, 'dclink_button') + if w: + psname = self._psname[0] + try: + dclinks = PSSearch.conv_psname_2_dclink(psname) + except KeyError: + dclinks = [] + if dclinks: + dclink_type = PSSearch.conv_psname_2_psmodel(dclinks[0]) + if dclink_type != 'REGATRON_DCLink': + connect_window(w, PSDetailWindow, self, psname=dclinks) + else: + if len(dclinks) > 1: + menu = QMenu(w) + for dcl in dclinks: + act = QAction(dcl, menu) + connect_newprocess( + act, + ['sirius-hla-as-ps-regatron-individual', + '-dev', dcl], parent=self, is_pydm=True) + menu.addAction(act) + w.setMenu(menu) + else: + connect_newprocess( + w, ['sirius-hla-as-ps-regatron-individual', + '-dev', dclinks[0]], parent=self, is_pydm=True) + else: + w.setHidden(True)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/PSTabControlWindow.html b/_modules/siriushla/as_ps_control/PSTabControlWindow.html new file mode 100644 index 000000000..79496397c --- /dev/null +++ b/_modules/siriushla/as_ps_control/PSTabControlWindow.html @@ -0,0 +1,293 @@ + + + + + + siriushla.as_ps_control.PSTabControlWindow — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.PSTabControlWindow

+"""Defines a class to control elements from a given class."""
+import time as _time
+from qtpy.QtWidgets import QTabWidget, QWidget, QGridLayout, QLabel
+from qtpy.QtCore import Signal, QThread
+from siriushla.widgets import SiriusDialog
+from .PSControlWindow import PSControlWindow
+from .control_widget.ControlWidgetFactory import ControlWidgetFactory
+
+
+
+[docs] +class PSTabControlWindow(PSControlWindow): + """Base window to show devices of a section in tabs.""" + + Devices = { + "LI": ["lens", "corrector-slow", "solenoid", "quadrupole", + "spectrometer"], + "TB": ["dipole", "quadrupole", "corrector-slow"], + "BO": ["dipole", "quadrupole", "sextupole", "corrector-slow", + "skew-quadrupole"], + "TS": ["dipole", "quadrupole", "corrector-slow"], + "SI": ["dipole", "quadrupole", "sextupole"], + "IT": ["lens", ]} + + TabName = {"dipole": "Dipoles", + "spectrometer": "Spectrometer", + "quadrupole": "Quadrupoles", + "sextupole": "Sextupoles", + "solenoid": "Solenoids", + "corrector-slow": "Slow Correctors", + "corrector-fast": "Fast Correctors", + "corrector-septff": "Septa FF Correctors", + "skew-quadrupole": "Quadrupoles Skew", + "trim-quadrupole": "Trims", + "lens": "Lens", + } + + tabFilled = Signal() + + def __init__(self, section, parent=None): + """Class constructor.""" + super().__init__(section=section, + device=None, + parent=parent) + + def _setup_ui(self): + self.setWindowTitle(self._section+' PS Control') + # Create Tabs + self.tabs = QTabWidget() + self.tabs.setObjectName(self._section + "Tab") + self.TabIndex = dict() + self._addTabs() + self.tabs.currentChanged.connect(self._fillTabTask) + # Set widget layout + self.setCentralWidget(self.tabs) + + def _addTabs(self): + for device in self.Devices[self._section]: + widget = QWidget(self) + index = self.tabs.addTab(widget, self.TabName[device]) + self.TabIndex[index] = { + 'device': device, 'widget': widget, 'filled': False} + if index in range(3): + self._fillTab(index) + + def _fillTabTask(self, index): + if self.TabIndex[index]['filled']: + return + th = _WaitThread(parent=self, index=index) + dlg = _WaitDialog(self) + th.opendiag.connect(dlg.show) + th.closediag.connect(dlg.close) + th.tabIndex.connect(self._fillTab) + self.tabFilled.connect(th.exit_thread) + th.start() + + def _fillTab(self, index): + self.TabIndex[index]['filled'] = True + device = self.TabIndex[index]['device'] + widget = self.TabIndex[index]['widget'] + widget.setLayout(QGridLayout()) + widget.layout().setContentsMargins(0, 0, 0, 0) + tabwid = ControlWidgetFactory.factory( + self, self._section, device) + self._connect_buttons(tabwid) + widget.layout().addWidget(tabwid) + self.tabFilled.emit() + + def _dipoleWidgetWrapper(self, widget): + wrapper = QWidget(self) + wrapper.layout = QGridLayout() + wrapper.setLayout(wrapper.layout) + + wrapper.layout.addWidget(widget, 0, 0) + wrapper.layout.setRowStretch(1, 1) + wrapper.layout.setColumnStretch(1, 1) + + return wrapper
+ + + +class _WaitDialog(SiriusDialog): + """Auxiliary dialog to show during a long task.""" + + def __init__(self, parent=None): + super().__init__(parent) + self.setWindowTitle('Wait') + lay = QGridLayout(self) + lay.addWidget(QLabel('Wait a moment...')) + + +class _WaitThread(QThread): + + opendiag = Signal() + closediag = Signal() + tabIndex = Signal(int) + + def __init__(self, parent=None, section='', index={}): + super().__init__(parent) + self._index = index + self._exit_thread = False + + def exit_thread(self): + self._exit_thread = True + + def run(self): + self.opendiag.emit() + self.tabIndex.emit(self._index) + while not self._exit_thread: + _time.sleep(0.1) + self.closediag.emit() +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/PSTrimWindow.html b/_modules/siriushla/as_ps_control/PSTrimWindow.html new file mode 100644 index 000000000..ad0d587bd --- /dev/null +++ b/_modules/siriushla/as_ps_control/PSTrimWindow.html @@ -0,0 +1,219 @@ + + + + + + siriushla.as_ps_control.PSTrimWindow — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.PSTrimWindow

+"""Defines window class to show trims of a magnet."""
+
+from qtpy.QtWidgets import QWidget, QVBoxLayout
+
+from siriuspy.namesys import SiriusPVName
+from siriushla.widgets import SiriusMainWindow
+from siriushla.util import connect_window
+from .control_widget.TrimFamControlWidget import SITrimFamControlWidget
+from .PSDetailWindow import PSDetailWindow
+from .SummaryWidgets import SummaryWidget
+
+
+
+[docs] +class PSTrimWindow(SiriusMainWindow): + """Allow controlling the trims of a given magnet.""" + + def __init__(self, device, parent=None): + """Class constructor.""" + super(PSTrimWindow, self).__init__(parent) + self.setObjectName('SIApp') + self._devname = SiriusPVName(device) + self._setup_ui() + + def _setup_ui(self): + self.setWindowTitle(self._devname + ' Trims') + self.central_widget = QWidget() + self.central_widget.layout = QVBoxLayout() + self.central_widget.setLayout(self.central_widget.layout) + self.setCentralWidget(self.central_widget) + # Create family SummaryWidget + self.fam_widget = SummaryWidget( + name=self._devname, parent=self, + visible_props=[ + 'detail', 'state', 'intlk', 'setpoint', 'monitor', + 'strength_sp', 'strength_mon', 'trim']) + self.fam_widget.get_trim_button().setVisible(False) + # Connect family detail window + fam_button = self.fam_widget.get_detail_button() + connect_window(fam_button, PSDetailWindow, self, psname=self._devname) + # Create SITrimFamControlWidget + device = self._devname.split("-")[-1] + self.trim_widget = SITrimFamControlWidget( + trim=device, parent=self, + orientation=SITrimFamControlWidget.HORIZONTAL) + # Connect Trim detail buttons + self._connect_buttons(self.trim_widget) + # Add to layout + self.central_widget.layout.addWidget(self.fam_widget) + self.central_widget.layout.addWidget(self.trim_widget) + + def _connect_buttons(self, widget): + for widget in widget.get_summary_widgets(): + psname = widget.devname + detail_bt = widget.get_detail_button() + connect_window(detail_bt, PSDetailWindow, self, psname=psname)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/SummaryWidgets.html b/_modules/siriushla/as_ps_control/SummaryWidgets.html new file mode 100644 index 000000000..b8604f0fb --- /dev/null +++ b/_modules/siriushla/as_ps_control/SummaryWidgets.html @@ -0,0 +1,1189 @@ + + + + + + siriushla.as_ps_control.SummaryWidgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.SummaryWidgets

+"""Widget with general functions of DCLink Widgets."""
+
+import re
+
+from qtpy.QtWidgets import QHBoxLayout, QVBoxLayout, QWidget, QPushButton, \
+    QLabel, QSizePolicy as QSzPlcy
+import qtawesome as qta
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.envars import VACA_PREFIX as VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as PVName
+from siriuspy.search import PSSearch
+from siriuspy.pwrsupply.csdev import PS_LI_INTLK_THRS as _PS_LI_INTLK
+from siriushla.widgets import PyDMStateButton, SiriusLedState, \
+    SiriusLedAlert, PyDMSpinboxScrollbar, PyDMLedMultiChannel, \
+    SiriusEnumComboBox, SiriusLabel, SiriusSpinbox
+from .detail_widget.custom_widgets import LISpectIntlkLed
+
+
+Dipole = re.compile("^.*:PS-B.*$")
+Quadrupole = re.compile("^.*:PS-Q.*$")
+QuadrupoleSkew = re.compile("^.*:PS-QS.*$")
+Sextupole = re.compile("^.*:PS-S.*$")
+Corrector = re.compile("^.*:PS-(LCH|CH|CV|FCH|FCV).*$")
+FastCorrector = re.compile("^SI-.*:PS-(FCH|FCV).*$")
+IsPulsed = re.compile("^.*:PU-.*$")
+IsDCLink = re.compile("^.*:PS-DCLink.*$")
+IsLinac = re.compile("^LI-.*$")
+IsLinacSpect = re.compile("^LI-01:PS-Spect$")
+HasTrim = re.compile("^SI-Fam:PS-Q.*$")
+LIQuadHasNotStrength = re.compile("^LI-.*:PS-(QF1|QD1)$")
+
+
+
+[docs] +def get_analog_name(psname): + """.""" + psname = PVName(psname) + psmodel = PSSearch.conv_psname_2_psmodel(psname) + pstype = PSSearch.conv_psname_2_pstype(psname) + + if 'dclink' in pstype: + if psmodel == 'FBP_DCLink': + return 'Voltage' + elif psmodel in {'FAC_ACDC', 'FAC_2S_ACDC', 'FAC_2P4S_ACDC'}: + return 'CapacitorBankVoltage' + elif psmodel == 'REGATRON_DCLink': + return 'Voltage' + else: + raise RuntimeError( + 'Undefined PS model {} setpoint PV name'.format(psmodel)) + else: + if psname.dis == 'PS': + return 'Current' + elif psname.dis == 'PU': + return 'Voltage' + else: + raise RuntimeError( + 'Undefined PS model {} setpoint PV name'.format(psmodel))
+ + + +
+[docs] +def get_strength_name(psname): + """.""" + if Dipole.match(psname): + return "Energy" + elif Quadrupole.match(psname): + return "KL" + elif Sextupole.match(psname) and not IsLinac.match(psname): + return "SL" + elif Corrector.match(psname) and not IsLinac.match(psname): + return "Kick" + elif IsPulsed.match(psname): + return "Kick" + elif IsLinacSpect.match(psname): + return "Kick" + else: + return
+ + + +
+[docs] +def get_prop2width(psname): + psmodel = PSSearch.conv_psname_2_psmodel(psname) + detail_wid = 8.5 if psname.dev != 'DCLink' else 3 + dic = { + 'detail': detail_wid, + 'state': 6, + 'setpoint': 6, + } + if psmodel != 'REGATRON_DCLink': + dic.update({'readback': 6}) + dic.update({'monitor': 6}) + if psmodel != 'FOFB_PS': + dic.update({'intlk': 5}) + if psname.sec != 'LI' and psmodel != 'REGATRON_DCLink': + dic.update({'alarm': 5}) + if psname.sec == 'LI': + dic['conn'] = 5 + else: + dic.update({ + 'opmode': 8, + 'reset': 4 + }) + if psmodel != 'FOFB_PS': + if psmodel != 'REGATRON_DCLink': + dic.update({ + 'bbb': 12, + 'udc': 12, + 'ctrlmode': 6, + 'ctrlloop': 8, + 'wfmupdate': 8, + 'updparms': 6, + }) + else: + dic.update({ + 'accgain': 6, + 'accfreeze': 6, + 'accclear': 6, + }) + if get_strength_name(psname): + dic.update({ + 'strength_sp': 6, + 'strength_rb': 6, + 'strength_mon': 8}) + if psmodel == 'FBP': + dic.update({'sofbmode': 6}) + dic.update({'idffmode': 6}) + if psname.dis == 'PU': + dic.update({'pulse': 8}) + if HasTrim.match(psname): + dic.update({'trim': 2}) + return sort_propties(dic)
+ + + +
+[docs] +def get_prop2label(psname): + psmodel = PSSearch.conv_psname_2_psmodel(psname) + + analog = get_analog_name(psname) + if 'CapacitorBank' in analog: + analog = 'Voltage' + dic = { + 'detail': 'Detail', + 'state': 'PwrState', + 'setpoint': analog + '-SP', + } + if psmodel != 'REGATRON_DCLink': + dic.update({'readback': analog + '-RB'}) + dic.update({'monitor': analog + '-Mon'}) + if psmodel != 'FOFB_PS': + dic.update({'intlk': 'Interlocks'}) + if psname.sec != 'LI' and psmodel != 'REGATRON_DCLink': + dic.update({'alarm': 'Alarms'}) + if psname.sec == 'LI': + dic['conn'] = 'Connected' + else: + dic.update({ + 'opmode': 'OpMode', + 'reset': 'Reset', + }) + if psmodel != 'FOFB_PS': + if psmodel != 'REGATRON_DCLink': + dic.update({ + 'bbb': 'Beagle Bone', + 'udc': 'UDC', + 'ctrlmode': 'Control Mode', + 'ctrlloop': 'Control Loop', + 'wfmupdate': 'Wfm Update', + 'updparms': 'Upd.Params', + }) + else: + dic.update({ + 'accgain': 'Acc Gain', + 'accfreeze': 'Acc Freeze', + 'accclear': 'Acc Clear', + }) + strength = get_strength_name(psname) + if strength: + dic.update({ + 'strength_sp': strength + '-SP', + 'strength_rb': strength + '-RB', + 'strength_mon': strength + '-Mon'}) + if psmodel == 'FBP': + dic.update({'sofbmode': 'SOFBMode'}) + dic.update({'idffmode': 'IDFFMode'}) + if psname.dis == 'PU': + dic.update({'pulse': 'Pulse'}) + if HasTrim.match(psname): + dic.update({'trim': 'Trim'}) + return sort_propties(dic)
+ + + +
+[docs] +def sort_propties(labels): + default_order = ( + 'detail', 'bbb', 'udc', 'opmode', 'ctrlmode', 'state', 'pulse', + 'intlk', 'alarm', 'reset', 'conn', 'ctrlloop', 'wfmupdate', + 'updparms', 'sofbmode', 'idffmode', 'accgain', 'accfreeze', 'accclear', + 'setpoint', 'readback', 'monitor', 'strength_sp', + 'strength_rb', 'strength_mon', 'trim') + idcs = list() + for lbl in labels: + idcs.append(default_order.index(lbl)) + if isinstance(labels, list): + return [x for _, x in sorted(zip(idcs, labels))] + if isinstance(labels, dict): + return {x: labels[x] for _, x in sorted(zip(idcs, labels.keys()))}
+ + + +
+[docs] +class SummaryWidget(QWidget): + """General widget for controlling a power supply.""" + + def __init__(self, name, visible_props, parent=None): + """Build UI with dclink name.""" + super().__init__(parent) + self._name = PVName(name) + self._psmodel = PSSearch.conv_psname_2_psmodel(name) + self._pstype = PSSearch.conv_psname_2_pstype(name) + self.visible_props = sort_propties(visible_props) + self.filled_widgets = set() + self._prefixed_name = self._name.substitute(prefix=VACA_PREFIX) + + self._analog_name = get_analog_name(self._name) + self._strength_name = get_strength_name(self._name) + self._is_pulsed = IsPulsed.match(self._name) + self._is_linac = IsLinac.match(self._name) + self._li_has_not_strength = LIQuadHasNotStrength.match(self._name) + self._is_fofb = FastCorrector.match(self._name) + self._is_dclink = IsDCLink.match(self._name) + self._is_regatron = self._psmodel == 'REGATRON_DCLink' + self._is_reg_slave = self._pstype == 'as-dclink-regatron-slave' + self._is_fbp = self._psmodel == 'FBP' + + self._bbb_name = '' + self._udc_name = '' + if not self._is_pulsed and not self._is_linac and \ + not self._is_regatron and not self._is_fofb: + self._bbb_name = PSSearch.conv_psname_2_bbbname(self._name) + self._udc_name = PSSearch.conv_psname_2_udc(self._name) + self._has_opmode = not self._is_linac and not self._is_pulsed + self._has_ctrlmode = not self._is_regatron and not self._is_linac\ + and not self._is_fofb + self._has_pwrstate = not self._is_reg_slave + self._has_intlk = not self._is_fofb + self._has_alarms = not self._is_linac and not self._is_regatron + self._has_reset = not self._is_linac and not self._is_reg_slave + self._has_ctrlloop = not self._is_linac and not self._is_pulsed\ + and not self._is_regatron and not self._is_fofb + self._has_parmupdt = not self._is_linac and not self._is_regatron\ + and not self._is_fofb + self._has_sofbmode = self._is_fbp + self._has_idffmode = self._is_fbp + self._has_wfmupdt = self._has_parmupdt and not self._is_dclink + self._has_analsp = not self._is_reg_slave + self._has_analrb = not self._is_regatron + self._has_strength = bool( + self._strength_name and not self._li_has_not_strength) + self._has_trim = HasTrim.match(self._name) + + self._create_pvs() + self._setup_ui() + + @property + def devname(self): + """PS name.""" + return self._name + + @property + def bbbname(self): + """BBB name.""" + return self._bbb_name + + @property + def udcname(self): + """UDC name.""" + return self._udc_name + + def _setup_ui(self): + """Setups widget UI.""" + lay = QHBoxLayout() + lay.setContentsMargins(0, 0, 0, 0) + lay.setSpacing(10) + self._widgets_dict = dict() + + self.detail_wid = self._build_widget(name='detail', orientation='v') + self._widgets_dict['detail'] = self.detail_wid + lay.addWidget(self.detail_wid) + + if self._bbb_name: + self.bbb_wid = self._build_widget(name='bbb', orientation='v') + self._widgets_dict['bbb'] = self.bbb_wid + lay.addWidget(self.bbb_wid) + + if self._udc_name: + self.udc_wid = self._build_widget(name='udc', orientation='v') + self._widgets_dict['udc'] = self.udc_wid + lay.addWidget(self.udc_wid) + + if self._has_opmode: + self.opmode_wid = self._build_widget( + name='opmode', orientation='v') + self._widgets_dict['opmode'] = self.opmode_wid + lay.addWidget(self.opmode_wid) + + if self._has_ctrlmode: + self.ctrlmode_wid = self._build_widget( + name='ctrlmode', orientation='v') + self._widgets_dict['ctrlmode'] = self.ctrlmode_wid + lay.addWidget(self.ctrlmode_wid) + + self.state_wid = self._build_widget(name='state') + self._widgets_dict['state'] = self.state_wid + lay.addWidget(self.state_wid) + + if self._is_pulsed: + self.pulse_wid = self._build_widget(name='pulse') + self._widgets_dict['pulse'] = self.pulse_wid + lay.addWidget(self.pulse_wid) + + if self._has_intlk: + self.intlk_wid = self._build_widget(name='intlk') + self._widgets_dict['intlk'] = self.intlk_wid + lay.addWidget(self.intlk_wid) + + if self._has_alarms: + self.alarm_wid = self._build_widget(name='alarm') + self._widgets_dict['alarm'] = self.alarm_wid + lay.addWidget(self.alarm_wid) + + if self._is_linac: + self.conn_wid = self._build_widget(name='conn') + self._widgets_dict['conn'] = self.conn_wid + lay.addWidget(self.conn_wid) + + if self._has_reset: + self.reset_wid = self._build_widget(name='reset') + self._widgets_dict['reset'] = self.reset_wid + lay.addWidget(self.reset_wid) + + if self._has_ctrlloop: + self.ctrlloop_wid = self._build_widget(name='ctrlloop') + self._widgets_dict['ctrlloop'] = self.ctrlloop_wid + lay.addWidget(self.ctrlloop_wid) + + if self._has_wfmupdt: + self.wfmupdate_wid = self._build_widget(name='wfmupdate') + self._widgets_dict['wfmupdate'] = self.wfmupdate_wid + lay.addWidget(self.wfmupdate_wid) + + if self._has_parmupdt: + self.updparms_wid = self._build_widget(name='updparms') + self._widgets_dict['updparms'] = self.updparms_wid + lay.addWidget(self.updparms_wid) + + if self._has_sofbmode: + self.sofbmode_wid = self._build_widget(name='sofbmode') + self._widgets_dict['sofbmode'] = self.sofbmode_wid + lay.addWidget(self.sofbmode_wid) + + if self._has_idffmode: + self.idffmode_wid = self._build_widget(name='idffmode') + self._widgets_dict['idffmode'] = self.idffmode_wid + lay.addWidget(self.idffmode_wid) + + if self._is_fofb: + self.accgain_wid = self._build_widget( + name='accgain', orientation='v') + self._widgets_dict['accgain'] = self.accgain_wid + lay.addWidget(self.accgain_wid) + + self.accfreeze_wid = self._build_widget( + name='accfreeze', orientation='v') + self._widgets_dict['accfreeze'] = self.accfreeze_wid + lay.addWidget(self.accfreeze_wid) + + self.accclear_wid = self._build_widget(name='accclear') + self._widgets_dict['accclear'] = self.accclear_wid + lay.addWidget(self.accclear_wid) + + self.setpoint_wid = self._build_widget( + name='setpoint', orientation='v') + self._widgets_dict['setpoint'] = self.setpoint_wid + lay.addWidget(self.setpoint_wid) + + if self._has_analrb: + self.readback_wid = self._build_widget( + name='readback', orientation='v') + self._widgets_dict['readback'] = self.readback_wid + lay.addWidget(self.readback_wid) + + self.monitor_wid = self._build_widget( + name='monitor', orientation='v') + self._widgets_dict['monitor'] = self.monitor_wid + lay.addWidget(self.monitor_wid) + + if self._has_strength: + self.strength_sp_wid = self._build_widget( + name='strength_sp', orientation='v') + self._widgets_dict['strength_sp'] = self.strength_sp_wid + lay.addWidget(self.strength_sp_wid) + + self.strength_rb_wid = self._build_widget( + name='strength_rb', orientation='v') + self._widgets_dict['strength_rb'] = self.strength_rb_wid + lay.addWidget(self.strength_rb_wid) + + self.strength_mon_wid = self._build_widget( + name='strength_mon', orientation='v') + self._widgets_dict['strength_mon'] = self.strength_mon_wid + lay.addWidget(self.strength_mon_wid) + + if self._has_trim: + self.trim_wid = self._build_widget(name='trim', orientation='v') + self._widgets_dict['trim'] = self.trim_wid + lay.addWidget(self.trim_wid) + + _widths = get_prop2width(self._name) + for name, widget in self._widgets_dict.items(): + width = _widths[name] + widget.setStyleSheet( + '#'+name+'{min-width:'+str(width)+'em;' + 'max-width:'+str(width)+'em;}') + widget.setSizePolicy(QSzPlcy.Fixed, QSzPlcy.Fixed) + widget.setVisible(name in self.visible_props) + + self.setStyleSheet(""" + PyDMStateButton{ + min-width: 2.5em; max-width: 2.5em; + min-height: 1.5em; max-height: 1.5em; + } + QLed{ + min-width: 1.5em; max-width: 1.5em; + min-height: 1.5em; max-height: 1.5em; + } + QLabel{ + min-height: 1.5em; max-height: 1.5em; + qproperty-alignment: AlignCenter; + } + """) + + lay.addStretch() + self.setLayout(lay) + + for prop in self.visible_props: + self.fillWidget(prop) + + def _create_pvs(self): + if self._has_opmode: + if self._is_reg_slave: + self._opmode_sts = self._prefixed_name.substitute( + propty='ModState-Mon') + elif self._is_regatron: + self._opmode_sts = self._prefixed_name.substitute( + propty='OpMode-Sts') + else: + self._opmode_sel = self._prefixed_name.substitute( + propty='OpMode-Sel') + self._opmode_sts = self._prefixed_name.substitute( + propty='OpMode-Sts') + + if self._has_ctrlmode: + self._ctrlmode_sts = self._prefixed_name.substitute( + propty='CtrlMode-Mon') + + if self._has_pwrstate: + self._pwrstate_sel = self._prefixed_name.substitute( + propty='PwrState-Sel') + self._pwrstate_sts = self._prefixed_name.substitute( + propty='PwrState-Sts') + + if self._is_pulsed: + self._pulse_sel = self._prefixed_name.substitute( + propty='Pulse-Sel') + self._pulse_sts = self._prefixed_name.substitute( + propty='Pulse-Sts') + + # interlock + if self._has_intlk: + if self._is_pulsed: + self._intlk = list() + self._intlk.extend([ + self._prefixed_name.substitute(propty=f'Intlk{i}-Mon') + for i in range(1, 8)]) + if 'Sept' not in self._name.dev: + self._intlk.append(self._prefixed_name.substitute( + propty='Intlk8-Mon')) + elif self._is_linac: + self._intlk = self._prefixed_name.substitute( + propty='StatusIntlk-Mon') + elif self._is_regatron: + if not self._is_reg_slave: + self._generr = self._prefixed_name.substitute( + propty='GenIntlk-Mon') + self._genwrn = self._prefixed_name.substitute( + propty='GenWarn-Mon') + else: + self._soft_intlk = self._prefixed_name.substitute( + propty='IntlkSoft-Mon') + self._hard_intlk = self._prefixed_name.substitute( + propty='IntlkHard-Mon') + + # alarms + if self._has_alarms: + if self._is_fofb: + self._alarm_amp = self._prefixed_name.substitute( + propty='AlarmsAmp-Mon') + self._alarm_amp_ltc = self._prefixed_name.substitute( + propty='AlarmsAmpLtc-Mon') + else: + self._alarm = self._prefixed_name.substitute( + propty='Alarms-Mon') + + if self._is_linac: + self._conn = self._prefixed_name.substitute( + propty='Connected-Mon') + + if self._has_reset: + propty = 'AlarmsAmpLtcRst-Cmd' if self._is_fofb else 'Reset-Cmd' + self._reset_intlk = self._prefixed_name.substitute(propty=propty) + + if self._has_ctrlloop: + self._ctrlloop_sel = self._prefixed_name.substitute( + propty='CtrlLoop-Sel') + self._ctrlloop_sts = self._prefixed_name.substitute( + propty='CtrlLoop-Sts') + + if self._has_wfmupdt: + self._wfmupdate_sel = self._prefixed_name.substitute( + propty='WfmUpdateAuto-Sel') + self._wfmupdate_sts = self._prefixed_name.substitute( + propty='WfmUpdateAuto-Sts') + + if self._has_parmupdt: + self._updparms_cmd = self._prefixed_name.substitute( + propty='ParamUpdate-Cmd') + + if self._has_sofbmode: + self._sofbmode_sel = self._prefixed_name.substitute( + propty='SOFBMode-Sel') + self._sofbmode_sts = self._prefixed_name.substitute( + propty='SOFBMode-Sts') + + if self._has_idffmode: + self._idffmode_sel = self._prefixed_name.substitute( + propty='IDFFMode-Sel') + self._idffmode_sts = self._prefixed_name.substitute( + propty='IDFFMode-Sts') + + if self._is_fofb: + self._accgain_sp = self._prefixed_name.substitute( + propty='FOFBAccGain-SP') + self._accgain_rb = self._prefixed_name.substitute( + propty='FOFBAccGain-RB') + + self._accfreeze_sel = self._prefixed_name.substitute( + propty='FOFBAccFreeze-Sel') + self._accfreeze_sts = self._prefixed_name.substitute( + propty='FOFBAccFreeze-Sts') + + self._accclear_cmd = self._prefixed_name.substitute( + propty='FOFBAccClear-Cmd') + + # analog control + sp = self._analog_name + if self._has_analsp: + self._analog_sp = self._prefixed_name.substitute( + propty='{}-SP'.format(sp)) + if self._has_analrb: + self._analog_rb = self._prefixed_name.substitute( + propty='{}-RB'.format(sp)) + if self._is_reg_slave: + self._analog_mon = self._prefixed_name.substitute( + propty='ModOutVolt-Mon') + else: + self._analog_mon = self._prefixed_name.substitute( + propty='{}-Mon'.format(sp)) + + # strength + if self._has_strength: + st = self._strength_name + self._strength_sp = self._prefixed_name.substitute( + propty='{}-SP'.format(st)) + self._strength_rb = self._prefixed_name.substitute( + propty='{}-RB'.format(st)) + self._strength_mon = self._prefixed_name.substitute( + propty='{}-Mon'.format(st)) + + def _build_widget(self, name='', orientation='h'): + widget = QWidget(self) + widget.setObjectName(name) + if orientation == 'h': + lay = QHBoxLayout(widget) + else: + lay = QVBoxLayout(widget) + lay.setSpacing(0) + lay.setContentsMargins(0, 3, 0, 3) + return widget + +
+[docs] + def fillWidget(self, name): + if name in self.filled_widgets: + return + if name == 'detail': + self.detail_bt = QPushButton(self) + if self._name.dev == 'DCLink': + self.detail_bt.setIcon(qta.icon('fa5s.list-ul')) + self.detail_bt.setToolTip(self._name) + else: + self.detail_bt.setText(self._name) + self.detail_wid.layout().addWidget(self.detail_bt) + elif name == 'bbb' and self._bbb_name: + self.bbb_lb = QLabel(self._bbb_name, self) + self.bbb_wid.layout().addWidget(self.bbb_lb) + elif name == 'udc' and self._udc_name: + self.udc_lb = QLabel(self._udc_name, self) + self.udc_wid.layout().addWidget(self.udc_lb) + elif name == 'opmode' and self._has_opmode: + if 'Voltage' not in self._analog_name: + self.opmode_cb = SiriusEnumComboBox(self, self._opmode_sel) + self.opmode_wid.layout().addWidget(self.opmode_cb) + self.opmode_lb = SiriusLabel(self, self._opmode_sts) + self.opmode_wid.layout().addWidget(self.opmode_lb) + elif name == 'ctrlmode' and self._has_ctrlmode: + self.ctrlmode_lb = SiriusLabel(self, self._ctrlmode_sts) + self.ctrlmode_wid.layout().addWidget(self.ctrlmode_lb) + elif name == 'state' and self._has_pwrstate: + self.state_bt = PyDMStateButton(self, self._pwrstate_sel) + self.state_led = SiriusLedState(self, self._pwrstate_sts) + self.state_wid.layout().addWidget(self.state_bt) + self.state_wid.layout().addWidget(self.state_led) + elif name == 'pulse' and self._is_pulsed: + self.pulse_bt = PyDMStateButton(self, self._pulse_sel) + self.pulse_led = SiriusLedState(self, self._pulse_sts) + self.pulse_wid.layout().addWidget(self.pulse_bt) + self.pulse_wid.layout().addWidget(self.pulse_led) + elif name == 'intlk' and self._has_intlk: + if self._is_pulsed: + self.intlk_led = PyDMLedMultiChannel( + self, channels2values={ch: 1 for ch in self._intlk}) + self.intlk_wid.layout().addWidget(self.intlk_led) + elif self._is_linac: + if IsLinacSpect.match(self.devname): + self.intlk_led = LISpectIntlkLed(self) + else: + self.intlk_led = PyDMLedMultiChannel( + self, channels2values={ + self._intlk: {'value': _PS_LI_INTLK, + 'comp': 'lt'}}) + self.intlk_wid.layout().addWidget(self.intlk_led) + elif self._is_regatron: + if not self._is_reg_slave: + self.generr_led = SiriusLedAlert(self, self._generr) + self.genwrn_led = SiriusLedAlert(self, self._genwrn) + self.intlk_wid.layout().addWidget(self.generr_led) + self.intlk_wid.layout().addWidget(self.genwrn_led) + else: + self.soft_intlk_led = SiriusLedAlert(self, self._soft_intlk) + self.hard_intlk_led = SiriusLedAlert(self, self._hard_intlk) + self.intlk_wid.layout().addWidget(self.soft_intlk_led) + self.intlk_wid.layout().addWidget(self.hard_intlk_led) + elif name == 'alarm' and self._has_alarms: + if self._is_fofb: + self.alarm_led = SiriusLedAlert(self, self._alarm_amp) + self.alarmltc_led = SiriusLedAlert(self, self._alarm_amp_ltc) + self.alarm_wid.layout().addWidget(self.alarm_led) + self.alarm_wid.layout().addWidget(self.alarmltc_led) + else: + self.alarm_led = SiriusLedAlert(self, self._alarm) + self.alarm_wid.layout().addWidget(self.alarm_led) + elif name == 'conn' and self._is_linac: + self.conn_led = PyDMLedMultiChannel( + self, channels2values={self._conn: 0}) + self.conn_wid.layout().addWidget(self.conn_led) + elif name == 'reset' and self._has_reset: + self.reset_bt = PyDMPushButton( + parent=self, init_channel=self._reset_intlk, pressValue=1) + self.reset_bt.setIcon(qta.icon('fa5s.sync')) + self.reset_bt.setObjectName('reset_bt') + self.reset_bt.setStyleSheet( + '#reset_bt{min-width:25px; max-width:25px; icon-size:20px;}') + self.reset_wid.layout().addWidget(self.reset_bt) + elif name == 'ctrlloop' and self._has_ctrlloop: + self.ctrlloop_bt = PyDMStateButton( + self, self._ctrlloop_sel, invert=True) + self.ctrlloop_lb = SiriusLabel(self, self._ctrlloop_sts) + self.ctrlloop_wid.layout().addWidget(self.ctrlloop_bt) + self.ctrlloop_wid.layout().addWidget(self.ctrlloop_lb) + elif name == 'wfmupdate' and self._has_wfmupdt: + self.wfmupdate_bt = PyDMStateButton(self, self._wfmupdate_sel) + self.wfmupdate_led = SiriusLedState(self, self._wfmupdate_sts) + self.wfmupdate_wid.layout().addWidget(self.wfmupdate_bt) + self.wfmupdate_wid.layout().addWidget(self.wfmupdate_led) + elif name == 'updparms' and self._has_parmupdt: + self.updparms_bt = PyDMPushButton( + parent=self, init_channel=self._updparms_cmd, pressValue=1) + self.updparms_bt.setIcon(qta.icon('fa5s.redo-alt')) + self.updparms_bt.setObjectName('updparms_bt') + self.updparms_bt.setStyleSheet( + '#updparms_bt{min-width:25px;max-width:25px;icon-size:20px;}') + self.updparms_wid.layout().addWidget(self.updparms_bt) + elif name == 'sofbmode' and self._has_sofbmode: + self.sofbmode_bt = PyDMStateButton(self, self._sofbmode_sel) + self.sofbmode_led = SiriusLedState(self, self._sofbmode_sts) + self.sofbmode_wid.layout().addWidget(self.sofbmode_bt) + self.sofbmode_wid.layout().addWidget(self.sofbmode_led) + elif name == 'idffmode' and self._has_idffmode: + self.idffmode_bt = PyDMStateButton(self, self._idffmode_sel) + self.idffmode_led = SiriusLedState(self, self._idffmode_sts) + self.idffmode_wid.layout().addWidget(self.idffmode_bt) + self.idffmode_wid.layout().addWidget(self.idffmode_led) + elif name == 'accgain' and self._is_fofb: + self.accgain_sp = SiriusSpinbox(self, self._accgain_sp) + self.accgain_sp.precisionFromPV = False + self.accgain_sp.precision = 6 + self.accgain_rb = SiriusLabel(self, self._accgain_rb) + self.accgain_rb.precisionFromPV = False + self.accgain_rb.precision = 6 + self.accgain_wid.layout().addWidget(self.accgain_sp) + self.accgain_wid.layout().addWidget(self.accgain_rb) + elif name == 'accfreeze' and self._is_fofb: + self.accfreeze_cb = SiriusEnumComboBox(self, self._accfreeze_sel) + self.accfreeze_lb = SiriusLabel(self, self._accfreeze_sts) + self.accfreeze_wid.layout().addWidget(self.accfreeze_cb) + self.accfreeze_wid.layout().addWidget(self.accfreeze_lb) + elif name == 'accclear' and self._is_fofb: + self.accclear_bt = PyDMPushButton( + parent=self, init_channel=self._accclear_cmd, pressValue=1) + self.accclear_bt.setIcon(qta.icon('mdi.sync')) + self.accclear_bt.setObjectName('clear_bt') + self.accclear_bt.setStyleSheet( + '#clear_bt{min-width:25px; max-width:25px; icon-size:20px;}') + self.accclear_wid.layout().addWidget(self.accclear_bt) + elif name == 'setpoint' and self._has_analsp: + self.setpoint = PyDMSpinboxScrollbar(self, self._analog_sp) + if self._is_fofb: + self.setpoint.spinbox.precisionFromPV = False + self.setpoint.spinbox.precision = 6 + self.setpoint_wid.layout().addWidget(self.setpoint) + elif name == 'readback' and self._has_analrb: + self.readback = SiriusLabel(self, self._analog_rb) + self.readback.showUnits = True + if self._is_fofb: + self.readback.precisionFromPV = False + self.readback.precision = 6 + self.readback_wid.layout().addWidget(self.readback) + elif name == 'monitor': + self.monitor = SiriusLabel(self, self._analog_mon, keep_unit=True) + self.monitor.showUnits = True + if self._is_fofb: + self.monitor.precisionFromPV = False + self.monitor.precision = 6 + self.monitor_wid.layout().addWidget(self.monitor) + elif name == 'strength_sp' and self._has_strength: + self.strength_sp_le = PyDMSpinboxScrollbar(self, self._strength_sp) + self.strength_sp_wid.layout().addWidget(self.strength_sp_le) + elif name == 'strength_rb' and self._has_strength: + self.strength_rb_lb = SiriusLabel( + parent=self, init_channel=self._strength_rb, keep_unit=True) + self.strength_rb_lb.showUnits = True + self.strength_rb_wid.layout().addWidget(self.strength_rb_lb) + elif name == 'strength_mon' and self._has_strength: + self.strength_mon_lb = SiriusLabel( + parent=self, init_channel=self._strength_mon, keep_unit=True) + self.strength_mon_lb.showUnits = True + self.strength_mon_wid.layout().addWidget(self.strength_mon_lb) + elif name == 'trim' and self._has_trim: + self.trim_bt = QPushButton(qta.icon('fa5s.angle-right'), '', self) + self.trim_wid.layout().addWidget(self.trim_bt) + self.filled_widgets.add(name)
+ + +
+[docs] + def get_detail_button(self): + """Return psname button.""" + return self.detail_bt
+ + +
+[docs] + def get_trim_button(self): + """Return trim button.""" + if self._has_trim: + return self.trim_bt + return None
+ + +
+[docs] + def set_opmode_slowref(self): + """Set power supply OpMode to SlowRef.""" + if hasattr(self, 'opmode_cb'): + if self.opmode_cb.isEnabled(): + index = self.opmode_cb.findText('SlowRef') + if index == -1: + return + self.opmode_cb.internal_combo_box_activated_int(index)
+ + +
+[docs] + def turn_on(self): + """Turn power supply on.""" + if hasattr(self, 'state_bt'): + if self.state_bt.isEnabled(): + if not self.state_bt.value: + self.state_bt.send_value()
+ + +
+[docs] + def turn_off(self): + """Turn power supply off.""" + if hasattr(self, 'state_bt'): + if self.state_bt.isEnabled(): + if self.state_bt.value: + self.state_bt.send_value()
+ + +
+[docs] + def ctrlloop_close(self): + """Close control loop.""" + if hasattr(self, 'ctrlloop_bt'): + if self.ctrlloop_bt.isEnabled(): + if not self.ctrlloop_bt.value: + self.ctrlloop_bt.send_value()
+ + +
+[docs] + def ctrlloop_open(self): + """Open control loop.""" + if hasattr(self, 'ctrlloop_bt'): + if self.ctrlloop_bt.isEnabled(): + if self.ctrlloop_bt.value: + self.ctrlloop_bt.send_value()
+ + +
+[docs] + def pulse_on(self): + """Turn power supply on.""" + if hasattr(self, 'pulse_bt'): + if self.pulse_bt.isEnabled(): + if not self.pulse_bt.value: + self.pulse_bt.send_value()
+ + +
+[docs] + def pulse_off(self): + """Turn power supply off.""" + if hasattr(self, 'pulse_bt'): + if self.pulse_bt.isEnabled(): + if self.pulse_bt.value: + self.pulse_bt.send_value()
+ + +
+[docs] + def wfmupdate_on(self): + """Enable WfmUpdateAuto.""" + if hasattr(self, 'wfmupdate_bt'): + if self.wfmupdate_bt.isEnabled(): + if not self.wfmupdate_bt.value: + self.wfmupdate_bt.send_value()
+ + +
+[docs] + def wfmupdate_off(self): + """Disable WfmUpdateAuto.""" + if hasattr(self, 'wfmupdate_bt'): + if self.wfmupdate_bt.isEnabled(): + if self.wfmupdate_bt.value: + self.wfmupdate_bt.send_value()
+ + +
+[docs] + def reset(self): + """Reset power supply.""" + if hasattr(self, 'reset_bt'): + if self.reset_bt.isEnabled(): + self.reset_bt.sendValue()
+ + +
+[docs] + def update_params(self): + """Update power supply parameters.""" + if hasattr(self, 'updparms_bt'): + if self.updparms_bt.isEnabled(): + self.updparms_bt.sendValue()
+ + +
+[docs] + def sofbmode_on(self): + """Turn SOFBMode on.""" + if hasattr(self, 'sofbmode_bt'): + if self.sofbmode_bt.isEnabled(): + if not self.sofbmode_bt.value: + self.sofbmode_bt.send_value()
+ + +
+[docs] + def sofbmode_off(self): + """Turn SOFBMode off.""" + if hasattr(self, 'sofbmode_bt'): + if self.sofbmode_bt.isEnabled(): + if self.sofbmode_bt.value: + self.sofbmode_bt.send_value()
+ + +
+[docs] + def idffmode_on(self): + """Turn IDFFMode on.""" + if hasattr(self, 'idffmode_bt'): + if self.idffmode_bt.isEnabled(): + if not self.idffmode_bt.value: + self.idffmode_bt.send_value()
+ + +
+[docs] + def idffmode_off(self): + """Turn IDFFMode off.""" + if hasattr(self, 'idffmode_bt'): + if self.idffmode_bt.isEnabled(): + if self.idffmode_bt.value: + self.idffmode_bt.send_value()
+ + +
+[docs] + def set_accfreeze_frozen(self): + """Set power supply AccFreeze to frozen.""" + if hasattr(self, 'accfreeze_cb'): + if self.accfreeze_cb.isEnabled(): + index = self.accfreeze_cb.findText('frozen') + if index == -1: + return + self.accfreeze_cb.internal_combo_box_activated_int(index)
+ + +
+[docs] + def set_accfreeze_unfrozen(self): + """Set power supply AccFreeze to unfrozen.""" + if hasattr(self, 'accfreeze_cb'): + if self.accfreeze_cb.isEnabled(): + index = self.accfreeze_cb.findText('unfrozen') + if index == -1: + return + self.accfreeze_cb.internal_combo_box_activated_int(index)
+ + +
+[docs] + def acc_clear(self): + """Reset power supply.""" + if hasattr(self, 'accclear_bt'): + if self.accclear_bt.isEnabled(): + self.accclear_bt.sendValue()
+
+ + + +
+[docs] +class SummaryHeader(QWidget): + + def __init__(self, name, visible_props, parent=None): + """Build UI.""" + super().__init__(parent) + self._name = PVName(name) + self.all_props = get_prop2label(self._name) + self.visible_props = sort_propties(visible_props) + self._setup_ui() + + def _setup_ui(self): + _widths = get_prop2width(self._name) + + lay = QHBoxLayout() + lay.setSpacing(10) + lay.setContentsMargins(0, 0, 0, 0) + + if self._name.dis == 'PS' and 'DCLink' not in self._name.dev: + hidden = QLabel(' ') + hidden.setObjectName('HiddenButton') + hidden.setStyleSheet('min-width: 10px; max-width: 10px;') + lay.addWidget(hidden) + for idt, label in self.all_props.items(): + widget = QLabel(label, self) + widget.setObjectName(idt) + width = _widths[idt] + widget.setSizePolicy(QSzPlcy.Fixed, QSzPlcy.Preferred) + widget.setStyleSheet( + 'font-weight: bold; qproperty-alignment: AlignCenter;' + 'min-width: {0}em; max-width: {0}em;'.format(width)) + widget.setVisible(idt in self.visible_props) + lay.addWidget(widget) + lay.addStretch() + self.setLayout(lay) + +
+[docs] + def update_visible_props(self, new_value): + self.visible_props = sort_propties(new_value)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/BasePSControlWidget.html b/_modules/siriushla/as_ps_control/control_widget/BasePSControlWidget.html new file mode 100644 index 000000000..d3af94b4d --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/BasePSControlWidget.html @@ -0,0 +1,937 @@ + + + + + + siriushla.as_ps_control.control_widget.BasePSControlWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.BasePSControlWidget

+"""Base class for controlling a power supply."""
+import re
+
+from qtpy.QtCore import Qt, Slot, QLocale
+from qtpy.QtWidgets import QWidget, QVBoxLayout, QGroupBox, \
+    QGridLayout, QLabel, QHBoxLayout, QScrollArea, QLineEdit, QAction, \
+    QMenu, QInputDialog, QFrame, QPushButton, QSplitter, \
+    QSizePolicy as QSzPlcy
+import qtawesome as qta
+from pydm.connection_inspector import ConnectionInspector
+
+from siriuspy.search import PSSearch
+from siriuspy.namesys import SiriusPVName as PVName
+from siriushla.util import connect_window, connect_newprocess
+from ..PSDetailWindow import PSDetailWindow
+from ..SummaryWidgets import SummaryWidget, SummaryHeader, \
+    get_prop2label, sort_propties
+
+
+
+[docs] +class PSContainer(QWidget): + """PSContainer.""" + + def __init__(self, widget, parent=None): + super().__init__(parent) + self._widget = widget + self.name = widget.devname + self.bbbname = widget.bbbname + self.udcname = widget.udcname + + self.dclinks = list() + self.dclinks_type = '' + self.dclink_widgets = list() + self.dclinksbbbname = set() + self.dclinksudcname = set() + dclinks = PSSearch.conv_psname_2_dclink(self.name) + if dclinks: + self.dclinks = dclinks + self.dclinks_type = PSSearch.conv_psname_2_psmodel(dclinks[0]) + if self.dclinks_type != 'REGATRON_DCLink': + for dc in dclinks: + self.dclinksbbbname.add(PSSearch.conv_psname_2_bbbname(dc)) + self.dclinksudcname.add(PSSearch.conv_psname_2_udc(dc)) + self.all_props = get_prop2label(PVName(dclinks[0])) + + self.visible_props = sort_propties([ + 'detail', 'state', 'intlk', 'setpoint', 'monitor']) + self._setup_ui() + self._create_actions() + self._enable_actions() + self.setStyleSheet(""" + #HideButton { + min-width: 10px; + max-width: 10px; + } + #DCLinkContainer { + background-color: lightgrey; + } + """) + + def _setup_ui(self): + """Setup widget UI.""" + self._layout = QGridLayout() + self._layout.setSpacing(10) + self._layout.setContentsMargins(0, 0, 0, 0) + self.setLayout(self._layout) + + self._dclink_container = QWidget(self) + self._dclink_container.setObjectName('DCLinkContainer') + self._dclink_container.setLayout(QVBoxLayout()) + self._dclink_is_filled = False + if self.dclinks: + self._hide = QPushButton(qta.icon('mdi.plus'), '', self) + else: + self._hide = QPushButton('', self) + self._hide.setEnabled(False) + self._hide.setObjectName('HideButton') + self._hide.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum) + self._hide.setFlat(True) + + self._layout.addWidget(self._hide, 0, 0, Qt.AlignCenter) + self._layout.addWidget(self._widget, 0, 1) + self._layout.addWidget(self._dclink_container, 1, 1) + + # Configure + self._dclink_container.setHidden(True) + self._hide.clicked.connect(self._toggle_dclink) + + def _toggle_dclink(self): + if self._dclink_container.isHidden(): + if not self._dclink_is_filled: + self._fill_dclink_container() + self._enable_actions() + self._hide.setIcon(qta.icon('mdi.minus')) + self._dclink_container.setHidden(False) + else: + self._hide.setIcon(qta.icon('mdi.plus')) + self._dclink_container.setHidden(True) + + def _fill_dclink_container(self): + self._dclink_is_filled = True + self._dclink_container.layout().addWidget( + SummaryHeader(self.dclinks[0], self.visible_props, self)) + for dclink_name in self.dclinks: + w = SummaryWidget(dclink_name, self.visible_props, self) + if self.dclinks_type == 'REGATRON_DCLink': + connect_newprocess( + w.detail_bt, + ['sirius-hla-as-ps-regatron-individual', + '-dev', dclink_name], + parent=self, is_pydm=True) + else: + connect_window(w.detail_bt, PSDetailWindow, + self, psname=dclink_name) + self._dclink_container.layout().addWidget(w) + self.dclink_widgets.append(w) + +
+[docs] + def update_visible_props(self, new_value): + self.visible_props = sort_propties(new_value) + self._enable_actions()
+ + + # Action methods + def _create_actions(self): + self._turn_on_action = QAction('Turn DCLinks On', self) + self._turn_on_action.triggered.connect( + lambda: self._set_dclink_pwrstate(True)) + self._turn_on_action.setEnabled(False) + self._turn_off_action = QAction('Turn DCLinks Off', self) + self._turn_off_action.triggered.connect( + lambda: self._set_dclink_pwrstate(False)) + self._turn_off_action.setEnabled(False) + self._open_loop_action = QAction('Open DCLinks Control Loop', self) + self._open_loop_action.triggered.connect( + lambda: self._set_dclink_control_loop(False)) + self._open_loop_action.setEnabled(False) + self._close_loop_action = QAction('Close DCLinks Control Loop', self) + self._close_loop_action.triggered.connect( + lambda: self._set_dclink_control_loop(True)) + self._close_loop_action.setEnabled(False) + self._set_setpoint_action = QAction('Set DCLinks Voltage', self) + self._set_setpoint_action.triggered.connect(self._set_setpoint) + self._set_setpoint_action.setEnabled(False) + self._reset_intlk_action = QAction('Reset DCLinks Interlocks', self) + self._reset_intlk_action.triggered.connect(self._reset_intlk) + self._reset_intlk_action.setEnabled(False) + + def _enable_actions(self): + if 'state' in self.visible_props and \ + not self._turn_on_action.isEnabled(): + self._turn_on_action.setEnabled(True) + self._turn_off_action.setEnabled(True) + if 'ctrlloop' in self.visible_props and \ + not self._open_loop_action.isEnabled(): + self._open_loop_action.setEnabled(True) + self._close_loop_action.setEnabled(True) + if 'setpoint' in self.visible_props and \ + not self._set_setpoint_action.isEnabled(): + self._set_setpoint_action.setEnabled(True) + if 'reset' in self.visible_props and \ + not self._reset_intlk_action.isEnabled(): + self._reset_intlk_action.setEnabled(True) + + def _set_dclink_pwrstate(self, value): + for dclink in self.dclink_widgets: + if value: + dclink.turn_on() + else: + dclink.turn_off() + + def _set_dclink_control_loop(self, value): + for dclink in self.dclink_widgets: + btn = dclink.ctrlloop_bt + if value: + if btn._bit_val: + btn.send_value() + else: + if not btn._bit_val: + btn.send_value() + + def _set_setpoint(self): + """Set current setpoint for every visible widget.""" + dlg = QInputDialog(self) + dlg.setLocale(QLocale(QLocale.English)) + new_value, ok = dlg.getDouble(self, "New setpoint", "Value") + if ok: + for dclink in self.dclink_widgets: + sp = dclink.setpoint.spinbox + sp.value_changed(new_value) + try: + sp.send_value() + except TypeError: + pass + + def _reset_intlk(self): + for dclink in self.dclink_widgets: + dclink.reset() + + # Overloaded method +
+[docs] + def contextMenuEvent(self, event): + """Overload to create a custom context menu.""" + widget = self.childAt(event.pos()) + if not widget: + return + parent = widget.parent() + grand_parent = parent.parent() + if widget.objectName() == 'DCLinkContainer' or \ + parent.objectName() == 'DCLinkContainer' or \ + grand_parent.objectName() == 'DCLinkContainer': + menu = QMenu(self) + menu.addAction(self._turn_on_action) + menu.addAction(self._turn_off_action) + menu.addSeparator() + menu.addAction(self._close_loop_action) + menu.addAction(self._open_loop_action) + menu.addSeparator() + menu.addAction(self._set_setpoint_action) + menu.addSeparator() + menu.addAction(self._reset_intlk_action) + menu.addSeparator() + action = menu.addAction('Show Connections...') + action.triggered.connect(self.show_connections) + menu.popup(event.globalPos()) + else: + super().contextMenuEvent(event)
+ + +
+[docs] + def show_connections(self, checked): + """.""" + _ = checked + c = ConnectionInspector(self) + c.show()
+
+ + + +
+[docs] +class BasePSControlWidget(QWidget): + """Base widget class to control power supply.""" + + HORIZONTAL = 0 + VERTICAL = 1 + + def __init__(self, subsection=None, orientation=0, parent=None): + """Class constructor. + + Parameters: + subsection + Default to None. To be used in filters defined in subclass. + orientation + Default to HORIZONTAL. Define how the different groups + (defined in subclasses) will be laid out. + """ + super(BasePSControlWidget, self).__init__(parent) + self._orientation = orientation + self._subsection = subsection + self._dev_list = PSSearch.get_psnames(self._getFilter(subsection)) + dev0 = PVName(self._dev_list[0]) + if dev0.sec == 'LI': + if dev0.dev == 'Slnd': + idcs = [int(PVName(dev).idx) for dev in self._dev_list] + self._dev_list = [ + x for _, x in sorted(zip(idcs, self._dev_list))] + if 'Q' in dev0.dev: + all_props = dict() + for dev in self._dev_list: + all_props.update(get_prop2label(dev)) + self.all_props = sort_propties(all_props) + else: + self.all_props = get_prop2label(self._dev_list[0]) + else: + self.all_props = get_prop2label(self._dev_list[0]) + + self.visible_props = self._getVisibleProps() + if 'trim' in self.all_props: + self.visible_props.append('trim') + self.visible_props = sort_propties(self.visible_props) + + # Data used to filter the widgets + self.ps_widgets_dict = dict() + self.containers_dict = dict() + self.filtered_widgets = set() # Set with key of visible widgets + + # Get groups and respective power supplies + self.groups, self.groups2devs = list(), dict() + for group in self._getGroups(): + pwrsupplies = list() + pattern = re.compile(group[1]) + for el in self._dev_list: + if pattern.search(el): + pwrsupplies.append(el) + if not pwrsupplies: + continue + self.groups.append(group) + self.groups2devs[group[0]] = pwrsupplies + + # Setup the UI + self._setup_ui() + self._create_actions() + self._enable_actions() + if len(self.groups) in [1, 3]: + self.setObjectName('cw') + self.setStyleSheet('#cw{min-height: 40em;}') + + def _setup_ui(self): + self.layout = QVBoxLayout() + + # Create filters + self.search_le = QLineEdit(parent=self) + self.search_le.setObjectName("search_lineedit") + self.search_le.setPlaceholderText("Search for a power supply...") + self.search_le.textEdited.connect(self._filter_pwrsupplies) + self.filter_pb = QPushButton(qta.icon('mdi.view-column'), '', self) + self.search_menu = QMenu(self.filter_pb) + self.filter_pb.setMenu(self.search_menu) + for prop, label in self.all_props.items(): + act = self.search_menu.addAction(label) + act.setObjectName(prop) + act.setCheckable(True) + act.setChecked(prop in self.visible_props) + act.toggled.connect(self._set_widgets_visibility) + hlay_filter = QHBoxLayout() + hlay_filter.addWidget(self.search_le) + hlay_filter.addWidget(self.filter_pb) + self.layout.addLayout(hlay_filter) + + self.count_label = QLabel(parent=self) + self.count_label.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum) + self.layout.addWidget(self.count_label) + + self.pwrsupplies_layout = self._getSplitter() + self.layout.addWidget(self.pwrsupplies_layout) + if len(self.groups) == 3: + splitt_v = QSplitter(Qt.Vertical) + + # Build power supply Layout + # Create group boxes and pop. layout + for idx, group in enumerate(self.groups): + pwrsupplies = self.groups2devs[group[0]] + + # Create header + header = SummaryHeader(pwrsupplies[0], + visible_props=self.visible_props, + parent=self) + self.containers_dict['header '+group[0]] = header + self.filtered_widgets.add('header '+group[0]) + + # Loop power supply to create all the widgets of a groupbox + group_widgets = list() + for psname in pwrsupplies: + ps_widget = SummaryWidget( + name=psname, visible_props=self.visible_props, parent=self) + pscontainer = PSContainer(ps_widget, self) + group_widgets.append(pscontainer) + self.containers_dict[psname] = pscontainer + self.filtered_widgets.add(psname) + self.ps_widgets_dict[psname] = ps_widget + + # Create group + wid_type = 'groupbox' if group[0] else 'widget' + group_wid = self._createGroupWidget( + group[0], header, group_widgets, wid_type=wid_type) + + # Add group box to grid layout + if len(self.groups) == 3: + if idx in [0, 1]: + splitt_v.addWidget(group_wid) + else: + self.pwrsupplies_layout.addWidget(splitt_v) + self.pwrsupplies_layout.addWidget(group_wid) + else: + self.pwrsupplies_layout.addWidget(group_wid) + + self.count_label.setText( + "Showing {} power supplies.".format( + len(self.filtered_widgets)-len(self.groups))) + self.setLayout(self.layout) + + def _createGroupWidget(self, title, header, widget_group, + wid_type='groupbox'): + scr_area_wid = QWidget(self) + scr_area_wid.setObjectName('scr_ar_wid') + scr_area_wid.setStyleSheet( + '#scr_ar_wid {background-color: transparent;}') + w_lay = QVBoxLayout(scr_area_wid) + w_lay.setSpacing(0) + w_lay.setContentsMargins(0, 0, 0, 0) + for widget in widget_group: + w_lay.addWidget(widget, alignment=Qt.AlignLeft) + w_lay.addStretch() + + scr_area = QScrollArea(self) + scr_area.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded) + scr_area.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) + scr_area.setWidgetResizable(True) + scr_area.setFrameShape(QFrame.NoFrame) + scr_area.setWidget(scr_area_wid) + + wid = QGroupBox(title, self) if wid_type == 'groupbox' \ + else QWidget(self) + gb_lay = QVBoxLayout(wid) + gb_lay.addWidget(header, alignment=Qt.AlignLeft) + gb_lay.addWidget(scr_area) + return wid + + def _getSplitter(self): + if self._orientation == self.HORIZONTAL: + return QSplitter(Qt.Horizontal) + return QSplitter(Qt.Vertical) + + def _getVisibleProps(self): + """Default visible properties.""" + return ['detail', 'state', 'intlk', 'setpoint', 'monitor', + 'strength_sp', 'strength_mon'] + + def _filter_pwrsupplies(self, text): + """Filter power supply widgets based on text inserted at line edit.""" + try: + pattern = re.compile(text, re.I) + except Exception: # Ignore malformed patterns? + pattern = re.compile("malformed") + + # Clear filtered widgets and add the ones that match the new pattern + self.filtered_widgets.clear() + for name, container in self.containers_dict.items(): + cond = 'header' in name + if not cond: + cond |= bool(pattern.search(name)) + cond |= bool(pattern.search(container.bbbname)) + cond |= bool(pattern.search(container.udcname)) + for dc in container.dclinks: + cond |= bool(pattern.search(dc)) + for dc in container.dclinksbbbname: + cond |= bool(pattern.search(dc)) + for dc in container.dclinksudcname: + cond |= bool(pattern.search(dc)) + if cond: + self.filtered_widgets.add(name) + + # Set widgets visibility and the number of widgets matched + self._set_widgets_visibility() + self.count_label.setText( + "Showing {} power supplies".format( + len(self.filtered_widgets)-len(self.groups))) + + # Scroll to top + for scroll_area in self.findChildren(QScrollArea): + scroll_area.verticalScrollBar().setValue(0) + + def _set_widgets_visibility(self): + """Set visibility of the widgets.""" + props = [act.objectName() for act in self.search_menu.actions() + if act.isChecked()] + self.visible_props = sort_propties(props) + self._enable_actions() + for key, wid in self.containers_dict.items(): + wid.update_visible_props(props) + if 'header' in key: + for ob in wid.findChildren(QWidget): + name = ob.objectName() + ob.setVisible(name in props or 'Hidden' in name) + else: + vis = key in self.filtered_widgets + wid.setVisible(vis) + if not vis: + continue + objs = wid.findChildren(SummaryWidget) + objs.extend(wid.findChildren(SummaryHeader)) + for ob in objs: + chil = ob.findChildren( + QWidget, options=Qt.FindDirectChildrenOnly) + for c in chil: + name = c.objectName() + if isinstance(ob, SummaryWidget) and name in props: + ob.fillWidget(name) + c.setVisible(name in props) + + # Actions methods + def _create_actions(self): + self.turn_on_act = QAction("Turn On", self) + self.turn_on_act.triggered.connect(lambda: self._set_pwrstate(True)) + self.turn_on_act.setEnabled(False) + self.turn_off_act = QAction("Turn Off", self) + self.turn_off_act.triggered.connect(lambda: self._set_pwrstate(False)) + self.turn_off_act.setEnabled(False) + self.ctrlloop_close_act = QAction("Close Control Loop", self) + self.ctrlloop_close_act.triggered.connect( + lambda: self._set_ctrlloop(True)) + self.ctrlloop_close_act.setEnabled(False) + self.ctrlloop_open_act = QAction("Open Control Loop", self) + self.ctrlloop_open_act.triggered.connect( + lambda: self._set_ctrlloop(False)) + self.ctrlloop_open_act.setEnabled(False) + self.set_slowref_act = QAction("Set OpMode to SlowRef", self) + self.set_slowref_act.triggered.connect(self._set_slowref) + self.set_slowref_act.setEnabled(False) + self.set_current_sp_act = QAction("Set Current SP", self) + self.set_current_sp_act.triggered.connect(self._set_current_sp) + self.set_current_sp_act.setEnabled(False) + self.reset_act = QAction("Reset Interlocks", self) + self.reset_act.triggered.connect(self._reset_interlocks) + self.reset_act.setEnabled(False) + self.wfmupdate_on_act = QAction("Wfm Update Auto Enable", self) + self.wfmupdate_on_act.triggered.connect( + lambda: self._set_wfmupdate(True)) + self.wfmupdate_on_act.setEnabled(False) + self.wfmupdate_off_act = QAction("Wfm Update Auto Disable", self) + self.wfmupdate_off_act.triggered.connect( + lambda: self._set_wfmupdate(False)) + self.wfmupdate_off_act.setEnabled(False) + self.updparms_act = QAction("Update Parameters", self) + self.updparms_act.triggered.connect(self._update_params) + self.updparms_act.setEnabled(False) + self.sofbmode_on_act = QAction("Set SOFBMode On", self) + self.sofbmode_on_act.triggered.connect( + lambda: self._set_sofbmode(True)) + self.sofbmode_on_act.setEnabled(False) + self.sofbmode_off_act = QAction("Set SOFBMode Off", self) + self.sofbmode_off_act.triggered.connect( + lambda: self._set_sofbmode(False)) + self.sofbmode_off_act.setEnabled(False) + self.idffmode_on_act = QAction("Set IDFFMode On", self) + self.idffmode_on_act.triggered.connect( + lambda: self._set_idffmode(True)) + self.idffmode_on_act.setEnabled(False) + self.idffmode_off_act = QAction("Set IDFFMode Off", self) + self.idffmode_off_act.triggered.connect( + lambda: self._set_idffmode(False)) + self.idffmode_off_act.setEnabled(False) + self.set_accfreeze_frozen_act = QAction( + "Set AccFreeze to frozen", self) + self.set_accfreeze_frozen_act.triggered.connect( + lambda: self._set_acc_freeze(True)) + self.set_accfreeze_frozen_act.setEnabled(False) + self.set_accfreeze_unfrozen_act = QAction( + "Set AccFreeze to unfrozen", self) + self.set_accfreeze_unfrozen_act.triggered.connect( + lambda: self._set_acc_freeze(False)) + self.set_accfreeze_unfrozen_act.setEnabled(False) + self.acc_clear_act = QAction("Clear Acc", self) + self.acc_clear_act.triggered.connect(self._acc_clear_cmd) + self.acc_clear_act.setEnabled(False) + + def _enable_actions(self): + if 'state' in self.visible_props and \ + not self.turn_on_act.isEnabled(): + self.turn_on_act.setEnabled(True) + self.turn_off_act.setEnabled(True) + if 'ctrlloop' in self.visible_props and \ + not self.ctrlloop_close_act.isEnabled(): + self.ctrlloop_close_act.setEnabled(True) + self.ctrlloop_open_act.setEnabled(True) + if 'opmode' in self.visible_props and \ + not self.set_slowref_act.isEnabled(): + self.set_slowref_act.setEnabled(True) + if 'setpoint' in self.visible_props and \ + not self.set_current_sp_act.isEnabled(): + self.set_current_sp_act.setEnabled(True) + if 'reset' in self.visible_props and \ + not self.reset_act.isEnabled(): + self.reset_act.setEnabled(True) + if 'wfmupdate' in self.visible_props and \ + not self.wfmupdate_on_act.isEnabled(): + self.wfmupdate_on_act.setEnabled(True) + self.wfmupdate_off_act.setEnabled(True) + if 'updparms' in self.visible_props and \ + not self.updparms_act.isEnabled(): + self.updparms_act.setEnabled(True) + if 'sofbmode' in self.visible_props and \ + not self.sofbmode_on_act.isEnabled(): + self.sofbmode_on_act.setEnabled(True) + self.sofbmode_off_act.setEnabled(True) + if 'idffmode' in self.visible_props and \ + not self.idffmode_on_act.isEnabled(): + self.idffmode_on_act.setEnabled(True) + self.idffmode_off_act.setEnabled(True) + if 'accfreeze' in self.visible_props and \ + not self.set_accfreeze_frozen_act.isEnabled(): + self.set_accfreeze_frozen_act.setEnabled(True) + self.set_accfreeze_unfrozen_act.setEnabled(True) + if 'accclear' in self.visible_props and \ + not self.acc_clear_act.isEnabled(): + self.acc_clear_act.setEnabled(True) + + @Slot(bool) + def _set_pwrstate(self, state): + """Execute turn on/off actions.""" + for key, widget in self.ps_widgets_dict.items(): + if key in self.filtered_widgets: + try: + if state: + widget.turn_on() + else: + widget.turn_off() + except TypeError: + pass + + @Slot(bool) + def _set_ctrlloop(self, state): + """Execute close/open control loop actions.""" + for key, widget in self.ps_widgets_dict.items(): + if key in self.filtered_widgets: + try: + if state: + widget.ctrlloop_close() + else: + widget.ctrlloop_open() + except TypeError: + pass + + @Slot() + def _set_slowref(self): + """Set opmode to SlowRef for every visible widget.""" + for key, widget in self.ps_widgets_dict.items(): + if key in self.filtered_widgets: + try: + widget.set_opmode_slowref() + except TypeError: + pass + + @Slot() + def _set_current_sp(self): + """Set current setpoint for every visible widget.""" + dlg = QInputDialog(self) + dlg.setLocale(QLocale(QLocale.English)) + new_value, ok = dlg.getDouble(self, "Insert current setpoint", "Value") + if ok: + for key, widget in self.ps_widgets_dict.items(): + if key in self.filtered_widgets: + sp = widget.setpoint.spinbox + sp.value_changed(new_value) + try: + sp.send_value() + except TypeError: + pass + + @Slot() + def _reset_interlocks(self): + """Reset interlocks.""" + for key, widget in self.ps_widgets_dict.items(): + if key in self.filtered_widgets: + try: + widget.reset() + except TypeError: + pass + + @Slot(bool) + def _set_wfmupdate(self, state): + """Execute turn WfmUpdateAuto on/off actions.""" + for key, widget in self.ps_widgets_dict.items(): + if key in self.filtered_widgets: + try: + if state: + widget.wfmupdate_on() + else: + widget.wfmupdate_off() + except TypeError: + pass + + @Slot() + def _update_params(self): + """Update parameters.""" + for key, widget in self.ps_widgets_dict.items(): + if key in self.filtered_widgets: + try: + widget.update_params() + except TypeError: + pass + + @Slot(bool) + def _set_sofbmode(self, state): + """Execute turn SOFBMode on/off actions.""" + for key, widget in self.ps_widgets_dict.items(): + if key in self.filtered_widgets: + try: + if state: + widget.sofbmode_on() + else: + widget.sofbmode_off() + except TypeError: + pass + + @Slot(bool) + def _set_idffmode(self, state): + """Execute turn IDFFMode on/off actions.""" + for key, widget in self.ps_widgets_dict.items(): + if key in self.filtered_widgets: + try: + if state: + widget.idffmode_on() + else: + widget.idffmode_off() + except TypeError: + pass + + @Slot(bool) + def _set_acc_freeze(self, state): + """Execute turn AccFreeze frozen/unfrozen actions.""" + for key, widget in self.ps_widgets_dict.items(): + if key in self.filtered_widgets: + try: + if state: + widget.set_accfreeze_frozen() + else: + widget.set_accfreeze_unfrozen() + except TypeError: + pass + + @Slot() + def _acc_clear_cmd(self): + """Reset interlocks.""" + for key, widget in self.ps_widgets_dict.items(): + if key in self.filtered_widgets: + try: + widget.acc_clear() + except TypeError: + pass + + # Overloaded method +
+[docs] + def contextMenuEvent(self, event): + """Show a custom context menu.""" + point = event.pos() + menu = QMenu("Actions", self) + menu.addAction(self.turn_on_act) + menu.addAction(self.turn_off_act) + menu.addAction(self.set_current_sp_act) + menu.addAction(self.reset_act) + if not self._dev_list[0].dev in ('FCH', 'FCV'): + menu.addAction(self.ctrlloop_close_act) + menu.addAction(self.ctrlloop_open_act) + menu.addAction(self.set_slowref_act) + menu.addAction(self.wfmupdate_on_act) + menu.addAction(self.wfmupdate_off_act) + menu.addAction(self.updparms_act) + else: + menu.addAction(self.set_accfreeze_frozen_act) + menu.addAction(self.set_accfreeze_unfrozen_act) + menu.addAction(self.acc_clear_act) + if PSSearch.conv_psname_2_psmodel(self._dev_list[0]) == 'FBP': + menu.addAction(self.sofbmode_on_act) + menu.addAction(self.sofbmode_off_act) + menu.addAction(self.idffmode_on_act) + menu.addAction(self.idffmode_off_act) + menu.addSeparator() + action = menu.addAction('Show Connections...') + action.triggered.connect(self.show_connections) + menu.popup(self.mapToGlobal(point))
+ + +
+[docs] + def show_connections(self, checked): + """.""" + _ = checked + conn = ConnectionInspector(self) + conn.show()
+ + +
+[docs] + def get_summary_widgets(self): + """Return Summary Widgets.""" + return self.findChildren(SummaryWidget)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/ControlWidgetFactory.html b/_modules/siriushla/as_ps_control/control_widget/ControlWidgetFactory.html new file mode 100644 index 000000000..ef961fd3e --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/ControlWidgetFactory.html @@ -0,0 +1,311 @@ + + + + + + siriushla.as_ps_control.control_widget.ControlWidgetFactory — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.ControlWidgetFactory

+"""Define factory class to get a control widget."""
+from .DipoleControlWidget import LISpectControlWidget, \
+    TBDipoleControlWidget, BODipoleControlWidget,\
+    TSDipoleControlWidget, SIDipoleControlWidget
+from .FamQuadrupoleControlWidget import LIQuadrupoleControlWidget, \
+    TBQuadrupoleControlWidget, BOFamQuadrupoleControlWidget,\
+    TSQuadrupoleControlWidget, SIFamQuadrupoleControlWidget
+from .FamSextupoleControlWidget import \
+    BOFamSextupoleControlWidget, SIFamSextupoleControlWidget
+from .SlowCorrectorControlWidget import LISlowCorrectorControlWidget, \
+    TBSlowCorrectorControlWidget, BoSlowCorrectorControlWidget, \
+    TSSlowCorrectorControlWidget, SISlowCorrectorControlWidget
+from .SkewQuadControlWidget import BOSkewQuadControlWidget, \
+    SISkewQuadControlWidget
+from .TrimAllControlWidget import SITrimAllControlWidget
+from .SolenoidControlWidget import LISolenoidControlWidget
+from .LensControlWidget import LILensControlWidget, ITLensControlWidget
+from .FastCorrectorControlWidget import \
+    SIFastCorrectorControlWidget
+from .SeptFFCorrectorControlWidget import SISeptFFCorrectorControlWidget
+from .IDFFCorrectorControlWidget import IDFFCorrectorControlWidget
+
+
+
+[docs] +class ControlWidgetFactory: + """Return a control widget.""" + + def __init__(self): + """Static class.""" + + @staticmethod + def _device_not_found(section, device): + raise AttributeError("{} not defined for {}".format(device, section)) + +
+[docs] + @staticmethod + def factory(parent, section, device, subsection=None, orientation=0): + if section == "LI": + if device == "spectrometer": + return LISpectControlWidget( + orientation=orientation, parent=parent) + elif device == "lens": + return LILensControlWidget( + orientation=orientation, parent=parent) + elif device == "corrector-slow": + return LISlowCorrectorControlWidget( + orientation=orientation, parent=parent) + elif device == "solenoid": + return LISolenoidControlWidget( + orientation=orientation, parent=parent) + elif device == "quadrupole": + return LIQuadrupoleControlWidget( + orientation=orientation, parent=parent) + else: + ControlWidgetFactory._device_not_found(section, device) + elif section == "TB": + if device == "dipole": + return TBDipoleControlWidget( + orientation=orientation, parent=parent) + elif device == "quadrupole": + return TBQuadrupoleControlWidget( + orientation=orientation, parent=parent) + elif device == "corrector-slow": + return TBSlowCorrectorControlWidget( + subsection=subsection, orientation=orientation, + parent=parent) + else: + ControlWidgetFactory._device_not_found(section, device) + elif section == "BO": + if device == "dipole": + return BODipoleControlWidget( + orientation=orientation, parent=parent) + elif device == "quadrupole": + return BOFamQuadrupoleControlWidget( + orientation=orientation, parent=parent) + elif device == "sextupole": + return BOFamSextupoleControlWidget( + orientation=orientation, parent=parent) + elif device == "corrector-slow": + return BoSlowCorrectorControlWidget( + subsection=subsection, orientation=orientation, + parent=parent) + elif device == "skew-quadrupole": + return BOSkewQuadControlWidget( + subsection=subsection, orientation=orientation, + parent=parent) + else: + ControlWidgetFactory._device_not_found(section, device) + elif section == "TS": + if device == "dipole": + return TSDipoleControlWidget( + orientation=orientation, parent=parent) + elif device == "quadrupole": + return TSQuadrupoleControlWidget( + orientation=orientation, parent=parent) + elif device == "corrector-slow": + return TSSlowCorrectorControlWidget( + subsection=subsection, orientation=orientation, + parent=parent) + else: + ControlWidgetFactory._device_not_found(section, device) + elif section == "SI": + if device == "dipole": + return SIDipoleControlWidget( + orientation=orientation, parent=parent) + elif device == "quadrupole": + return SIFamQuadrupoleControlWidget( + orientation=orientation, parent=parent) + elif device == "sextupole": + return SIFamSextupoleControlWidget( + orientation=orientation, parent=parent) + elif device == "corrector-slow": + return SISlowCorrectorControlWidget( + subsection=subsection, orientation=orientation, + parent=parent) + elif device == "corrector-fast": + return SIFastCorrectorControlWidget( + subsection=subsection, orientation=orientation, + parent=parent) + elif device == "corrector-septff": + return SISeptFFCorrectorControlWidget( + subsection=subsection, orientation=orientation, + parent=parent) + elif device == "corrector-idff": + return IDFFCorrectorControlWidget( + subsection=subsection, orientation=orientation, + parent=parent) + elif device == "skew-quadrupole": + return SISkewQuadControlWidget( + subsection=subsection, orientation=orientation, + parent=parent) + elif device == "trim-quadrupole": + return SITrimAllControlWidget( + subsection=subsection, orientation=orientation, + parent=parent) + else: + ControlWidgetFactory._device_not_found(section, device) + elif section == "IT": + if device == "lens": + return ITLensControlWidget( + orientation=orientation, parent=parent) + else: + ControlWidgetFactory._device_not_found(section, device) + else: + raise AttributeError("{} does not exist".format(section))
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/DipoleControlWidget.html b/_modules/siriushla/as_ps_control/control_widget/DipoleControlWidget.html new file mode 100644 index 000000000..fd2df466c --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/DipoleControlWidget.html @@ -0,0 +1,230 @@ + + + + + + siriushla.as_ps_control.control_widget.DipoleControlWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.DipoleControlWidget

+"""Widgets to control Dipoles."""
+
+from .BasePSControlWidget import BasePSControlWidget
+
+
+
+[docs] +class LISpectControlWidget(BasePSControlWidget): + """Class to control Dipole power supplies.""" + + def _getFilter(self, subsection=None): + return {"sec": "LI", "dev": "Spect.*"} + + def _getGroups(self): + return [('Spectrometer', "-Spect.*")]
+ + + +
+[docs] +class TBDipoleControlWidget(BasePSControlWidget): + """Class to control Dipole power supplies.""" + + def _getFilter(self, subsection=None): + return {"sec": "TB", "sub": "Fam", "dev": "B.*"} + + def _getGroups(self): + return [('Dipoles', "-B.*")]
+ + + +
+[docs] +class BODipoleControlWidget(BasePSControlWidget): + """Class to control Dipole power supplies.""" + + def _getFilter(self, subsection=None): + return {"sec": "BO", "sub": "Fam", "dev": "B.*"} + + def _getGroups(self): + return [('Dipoles', "-B.*")]
+ + + +
+[docs] +class TSDipoleControlWidget(BasePSControlWidget): + """Class to control Dipole power supplies.""" + + def _getFilter(self, subsection=None): + return {"sec": "TS", "sub": "Fam", "dev": "B.*"} + + def _getGroups(self): + return [('Dipoles', "-B.*")]
+ + + +
+[docs] +class SIDipoleControlWidget(BasePSControlWidget): + """Class to control Dipole power supplies.""" + + def _getFilter(self, subsection=None): + return {"sec": "SI", "sub": "Fam", "dev": "B.*"} + + def _getGroups(self): + return [('Dipoles', "-B.*")]
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/FamQuadrupoleControlWidget.html b/_modules/siriushla/as_ps_control/control_widget/FamQuadrupoleControlWidget.html new file mode 100644 index 000000000..d05751a7e --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/FamQuadrupoleControlWidget.html @@ -0,0 +1,268 @@ + + + + + + siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget

+"""Widgets to control Fam Quadrupoles magnets."""
+
+from .BasePSControlWidget import BasePSControlWidget
+
+
+
+[docs] +class LIQuadrupoleControlWidget(BasePSControlWidget): + """Class to control all quads from the LI section.""" + + def _getFilter(self, subsection=None): + return {"sec": "LI", "dev": "Q.*"} + + def _hasScrollArea(self): + return False + + def _getGroups(self): + return [('Focusing Quadrupoles', "-QF"), + ('Defocusing Quadrupoles', '-QD')]
+ + + +
+[docs] +class TBQuadrupoleControlWidget(BasePSControlWidget): + """Class to control all quads from the TB transport line.""" + + def _getFilter(self, subsection=None): + return {"sec": "TB", "dev": "Q.*"} + + def _hasScrollArea(self): + return False + + def _getGroups(self): + return [('Focusing Quadrupoles', "-QF"), + ('Defocusing Quadrupoles', '-QD')]
+ + + +
+[docs] +class TSQuadrupoleControlWidget(BasePSControlWidget): + """Class to control all quads from the TB transport line.""" + + def _getFilter(self, subsection=None): + return {"sec": "TS", "dev": "Q.*"} + + def _hasScrollArea(self): + return False + + def _getGroups(self): + return [('Focusing Quadrupoles', "-QF"), + ('Defocusing Quadrupoles', '-QD')]
+ + + +
+[docs] +class SIFamQuadrupoleControlWidget(BasePSControlWidget): + """Class to control all Fam Quad from the Sirius section.""" + + def _getFilter(self, subsection=None): + return {"sec": "SI", "sub": "Fam", "dev": "Q[DF0-9].*"} + + def _hasTrimButton(self): + return True + + def _hasScrollArea(self): + return False + + def _getGroups(self): + return [('Focusing Quadrupoles', "-QF"), + ('Dispersive Quadrupoles', "-Q[1-4]"), + ('Defocusing Quadrupoles', "-QD")]
+ + + +
+[docs] +class BOFamQuadrupoleControlWidget(SIFamQuadrupoleControlWidget): + """Class to control all Fam Quad from the Booster section.""" + + def _getFilter(self, subsection=None): + return {"sec": "BO", "sub": "Fam", "dev": "Q[DF0-9].*"} + + def _hasTrimButton(self): + return False + + def _getGroups(self): + return [('Focusing Quadrupoles', "-QF"), + ('Defocusing Quadrupoles', "-QD")]
+ + + +
+[docs] +def run_test(psname_list=None): + """Run test application.""" + import sys + from siriushla.sirius_application import SiriusApplication + + app = SiriusApplication() + window = SIFamQuadrupoleControlWidget(dev_type='PS') + window.show() + sys.exit(app.exec_())
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/FamSextupoleControlWidget.html b/_modules/siriushla/as_ps_control/control_widget/FamSextupoleControlWidget.html new file mode 100644 index 000000000..6c99c6971 --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/FamSextupoleControlWidget.html @@ -0,0 +1,215 @@ + + + + + + siriushla.as_ps_control.control_widget.FamSextupoleControlWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.FamSextupoleControlWidget

+"""Define control widget for family sextupoles."""
+
+from .BasePSControlWidget import BasePSControlWidget
+
+
+
+[docs] +class SIFamSextupoleControlWidget(BasePSControlWidget): + """Storage ring sextupoles.""" + + def _getFilter(self, subsection=None): + return {"sec": "SI", "sub": "Fam", "dev": "S[DF].*"} + + def _getStrength(self): + return "SL" + + def _hasTrimButton(self): + return False + + def _hasScrollArea(self): + return True + + def _getGroups(self): + return [('Focusing Sextupoles', '-SF'), + ('Defocusing Sextupoles', '-SD')]
+ + + +
+[docs] +class BOFamSextupoleControlWidget(SIFamSextupoleControlWidget): + """Booster sextupoles.""" + + def _getFilter(self, subsection=None): + return {"sec": "BO", "sub": "Fam", "dev": "S[DF].*"} + + def _hasScrollArea(self): + return False
+ + + +
+[docs] +def run_test(psname_list=None): + """Run test application.""" + import sys + from siriushla.sirius_application import SiriusApplication + + app = SiriusApplication() + window = SIFamSextupoleControlWidget(psname_list=psname_list) + window.show() + sys.exit(app.exec_())
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/FastCorrectorControlWidget.html b/_modules/siriushla/as_ps_control/control_widget/FastCorrectorControlWidget.html new file mode 100644 index 000000000..58dd1902a --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/FastCorrectorControlWidget.html @@ -0,0 +1,191 @@ + + + + + + siriushla.as_ps_control.control_widget.FastCorrectorControlWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.FastCorrectorControlWidget

+"""Define control widget for fast correctors."""
+from .BasePSControlWidget import BasePSControlWidget
+
+
+
+[docs] +class SIFastCorrectorControlWidget(BasePSControlWidget): + """Storage ring fast correctors.""" + + def _getFilter(self, subsection=None): + filt = {"sec": "SI", "sub": "\w{4}", "dev": "(FCH|FCV).*"} + if subsection: + filt.update({'sub': subsection}) + return filt + + def _hasTrimButton(self): + return False + + def _hasScrollArea(self): + return True + + def _getGroups(self): + return [('Horizontal Fast Correctors', '-FCH'), + ('Vertical Fast Corretors', '-FCV')] + + def _getVisibleProps(self): + return ['detail', 'state', 'alarm', 'setpoint', 'monitor', + 'strength_sp', 'strength_mon']
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/IDFFCorrectorControlWidget.html b/_modules/siriushla/as_ps_control/control_widget/IDFFCorrectorControlWidget.html new file mode 100644 index 000000000..6be395ac8 --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/IDFFCorrectorControlWidget.html @@ -0,0 +1,185 @@ + + + + + + siriushla.as_ps_control.control_widget.IDFFCorrectorControlWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.IDFFCorrectorControlWidget

+"""Define widget for controlling idff correctors."""
+from .BasePSControlWidget import BasePSControlWidget
+
+
+
+[docs] +class IDFFCorrectorControlWidget(BasePSControlWidget): + """IDFF corrector control widget.""" + + def _getFilter(self, subsection=None): + return {"sec": "SI", "sub": subsection, "dev": "(CH|CV|QS)"} + + def _hasTrimButton(self): + return False + + def _hasScrollArea(self): + return True + + def _getGroups(self): + return [('Horizontal Correctors', '-CH'), + ('Vertical Corretors', '-CV'), + ('Skew Quadrupole', '-QS')]
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/LensControlWidget.html b/_modules/siriushla/as_ps_control/control_widget/LensControlWidget.html new file mode 100644 index 000000000..ee0141309 --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/LensControlWidget.html @@ -0,0 +1,203 @@ + + + + + + siriushla.as_ps_control.control_widget.LensControlWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.LensControlWidget

+"""Define widget for controlling slow correctors."""
+from .BasePSControlWidget import BasePSControlWidget
+
+
+
+[docs] +class LILensControlWidget(BasePSControlWidget): + """Linac Lens control widget.""" + + def _getFilter(self, subsection=None): + return {"sec": "LI", "dev": "Lens.*"} + + def _hasTrimButton(self): + return False + + def _hasScrollArea(self): + return True + + def _getGroups(self): + return [('Lens', '-Lens-'), + ('Lens Rev', '-LensRev')]
+ + + +
+[docs] +class ITLensControlWidget(BasePSControlWidget): + """Injector Test Lens control widget.""" + + def _getFilter(self, subsection=None): + return {"sec": "IT", "dev": "Lens"} + + def _hasTrimButton(self): + return False + + def _hasScrollArea(self): + return True + + def _getGroups(self): + return [('Lens', '-Lens-'), ]
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/SeptFFCorrectorControlWidget.html b/_modules/siriushla/as_ps_control/control_widget/SeptFFCorrectorControlWidget.html new file mode 100644 index 000000000..a16f43c1b --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/SeptFFCorrectorControlWidget.html @@ -0,0 +1,185 @@ + + + + + + siriushla.as_ps_control.control_widget.SeptFFCorrectorControlWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.SeptFFCorrectorControlWidget

+"""Define control widget for fast correctors."""
+from .BasePSControlWidget import BasePSControlWidget
+
+
+
+[docs] +class SISeptFFCorrectorControlWidget(BasePSControlWidget): + """Storage ring fast correctors.""" + + def _getFilter(self, subsection=None): + filt = {"sec": "SI", "sub": "01M.*", "dev": "(FFCH|FFCV).*"} + return filt + + def _hasTrimButton(self): + return False + + def _hasScrollArea(self): + return True + + def _getGroups(self): + return [('Horizontal Septa FF Correctors', '-FFCH'), + ('Vertical Septa FF Corretors', '-FFCV')]
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/SkewQuadControlWidget.html b/_modules/siriushla/as_ps_control/control_widget/SkewQuadControlWidget.html new file mode 100644 index 000000000..b5233d276 --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/SkewQuadControlWidget.html @@ -0,0 +1,223 @@ + + + + + + siriushla.as_ps_control.control_widget.SkewQuadControlWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.SkewQuadControlWidget

+"""Sked Quadrupole control widgets."""
+
+from .BasePSControlWidget import BasePSControlWidget
+
+
+
+[docs] +class SISkewQuadControlWidget(BasePSControlWidget): + """Storage ring skew quads.""" + + def _getFilter(self, subsection=None): + filt = {"sec": "SI", "sub": "\w{4}", "dev": "QS"} + if subsection: + filt.update({'sub': subsection}) + return filt + + def _getStrength(self): + return "KL" + + def _hasTrimButton(self): + return False + + def _hasScrollArea(self): + return True + + def _getGroups(self): + return [('Skew Quad', '')]
+ + + +
+[docs] +class BOSkewQuadControlWidget(SISkewQuadControlWidget): + """Booster skew quads.""" + + def _getFilter(self, subsection=None): + filt = {"sec": "BO", "sub": "\w{3}", "dev": "QS"} + if subsection: + filt.update({'sub': subsection}) + return filt + + def _hasScrollArea(self): + return False + + def _getGroups(self): + return [('Skew Quad', '')]
+ + + +
+[docs] +def run_test(psname_list=None): + """Run test application.""" + import sys + from siriushla.sirius_application import SiriusApplication + + app = SiriusApplication() + window = SISkewQuadControlWidget(psname_list=psname_list) + window.show() + sys.exit(app.exec_())
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/SlowCorrectorControlWidget.html b/_modules/siriushla/as_ps_control/control_widget/SlowCorrectorControlWidget.html new file mode 100644 index 000000000..c48351e84 --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/SlowCorrectorControlWidget.html @@ -0,0 +1,245 @@ + + + + + + siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget

+"""Define widget for controlling slow correctors."""
+from .BasePSControlWidget import BasePSControlWidget
+
+
+
+[docs] +class SISlowCorrectorControlWidget(BasePSControlWidget): + """Storage ring slow correctors.""" + + def _getFilter(self, subsection=None): + filt = {"sec": "SI", "sub": "\w{4}", "dev": "(CH|CV|LCH).*"} + if subsection: + filt.update({'sub': subsection}) + return filt + + def _hasTrimButton(self): + return False + + def _hasScrollArea(self): + return True + + def _getGroups(self): + return [('Horizontal Slow Correctors', 'CH'), + ('Vertical Slow Corretors', '-CV')]
+ + + +
+[docs] +class BoSlowCorrectorControlWidget(SISlowCorrectorControlWidget): + """Booster slow corretors.""" + + def _getFilter(self, subsection=None): + filt = {"sec": "BO", "sub": "\w{3}", "dev": "(CH|CV).*"} + if subsection: + filt.update({'sub': subsection}) + return filt
+ + + +
+[docs] +class TBSlowCorrectorControlWidget(SISlowCorrectorControlWidget): + """To booster transport line slow corrector.""" + + def _getFilter(self, subsection=None): + filt = {"sec": "TB", "sub": "\d{2}", "dev": "(CH|CV).*"} + if subsection: + filt.update({'sub': subsection}) + return filt + + def _hasScrollArea(self): + return False
+ + + +
+[docs] +class TSSlowCorrectorControlWidget(SISlowCorrectorControlWidget): + """To sirius transport line slow correctors.""" + + def _getFilter(self, subsection=None): + filt = {"sec": "TS", "sub": "\w{2}", "dev": "(CH|CV).*"} + if subsection: + filt.update({'sub': subsection}) + return filt + + def _hasScrollArea(self): + return False
+ + + +
+[docs] +class LISlowCorrectorControlWidget(SISlowCorrectorControlWidget): + """To booster transport line slow corrector.""" + + def _getFilter(self, subsection=None): + return {"sec": "LI", "sub": "\d{2}", "dev": "(CH|CV).*"} + + def _hasScrollArea(self): + return False
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/SolenoidControlWidget.html b/_modules/siriushla/as_ps_control/control_widget/SolenoidControlWidget.html new file mode 100644 index 000000000..4010e52df --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/SolenoidControlWidget.html @@ -0,0 +1,183 @@ + + + + + + siriushla.as_ps_control.control_widget.SolenoidControlWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.SolenoidControlWidget

+"""Define widget for controlling slow correctors."""
+from .BasePSControlWidget import BasePSControlWidget
+
+
+
+[docs] +class LISolenoidControlWidget(BasePSControlWidget): + """Storage ring slow correctors.""" + + def _getFilter(self, subsection=None): + return {"sec": "LI", "dev": "Slnd.*"} + + def _hasTrimButton(self): + return False + + def _hasScrollArea(self): + return True + + def _getGroups(self): + return [('Solenoid', '')]
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/TrimAllControlWidget.html b/_modules/siriushla/as_ps_control/control_widget/TrimAllControlWidget.html new file mode 100644 index 000000000..a9d7a589a --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/TrimAllControlWidget.html @@ -0,0 +1,188 @@ + + + + + + siriushla.as_ps_control.control_widget.TrimAllControlWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.TrimAllControlWidget

+"""Widgets to control Trim Quadrupoles magnets."""
+from .BasePSControlWidget import BasePSControlWidget
+
+
+
+[docs] +class SITrimAllControlWidget(BasePSControlWidget): + """Class to control a Fam Quad from the Sirius section.""" + + def _getFilter(self, subsection=None): + filt = {"sec": "SI", "sub": "\w{4}", "dev": "Q(D|F|[1-4]).*"} + if subsection: + filt.update({'sub': subsection}) + return filt + + def _hasTrimButton(self): + return True + + def _hasScrollArea(self): + return True + + def _getGroups(self): + return [('Focusing Quadrupoles Trims', "-QF"), + ('Defocusing Quadrupoles Trims', "-QD"), + ('Dispersive Quadrupoles Trims', "-Q[1-4]")]
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/control_widget/TrimFamControlWidget.html b/_modules/siriushla/as_ps_control/control_widget/TrimFamControlWidget.html new file mode 100644 index 000000000..2e906ce95 --- /dev/null +++ b/_modules/siriushla/as_ps_control/control_widget/TrimFamControlWidget.html @@ -0,0 +1,188 @@ + + + + + + siriushla.as_ps_control.control_widget.TrimFamControlWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.control_widget.TrimFamControlWidget

+"""Widgets to control Trim Quadrupoles magnets."""
+from .BasePSControlWidget import BasePSControlWidget
+
+
+
+[docs] +class SITrimFamControlWidget(BasePSControlWidget): + """Class to control a Fam Quad from the Sirius section.""" + + def __init__(self, trim, **kwargs): + """Get trim name.""" + self._trim = trim + super().__init__(**kwargs) + + def _getFilter(self, subsection=None): + return {"sec": "SI", "sub": "\w{4}", "dev": self._trim} + + def _hasTrimButton(self): + return True + + def _hasScrollArea(self): + return True + + def _getGroups(self): + return [('Trims', "")]
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/detail_widget/DetailWidgetFactory.html b/_modules/siriushla/as_ps_control/detail_widget/DetailWidgetFactory.html new file mode 100644 index 000000000..9da88120a --- /dev/null +++ b/_modules/siriushla/as_ps_control/detail_widget/DetailWidgetFactory.html @@ -0,0 +1,230 @@ + + + + + + siriushla.as_ps_control.detail_widget.DetailWidgetFactory — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.detail_widget.DetailWidgetFactory

+"""This module defines a factory to get a detailed window."""
+from qtpy.QtWidgets import QWidget, QGridLayout, QScrollArea
+from siriuspy.search import PSSearch
+from .PSDetailWidget import PSDetailWidget, FBPDCLinkDetailWidget, \
+    FACDCLinkDetailWidget, LIPSDetailWidget, FastCorrPSDetailWidget
+
+
+
+[docs] +class DetailWidgetFactory: + """Return a detail widget.""" + +
+[docs] + @staticmethod + def factory(psname, parent=None, psmodel=None, pstype=None): + """Return a DetailWidget.""" + if isinstance(psname, (list, tuple)): + if len(psname) > 1: + scrwidget = QWidget(parent) + scrwidget.layout = QGridLayout(scrwidget) + scrwidget.setObjectName('scrwidget') + scrwidget.setStyleSheet( + '#scrwidget{background-color: transparent;}') + scroll = QScrollArea(parent) + scroll.setWidget(scrwidget) + scroll.setWidgetResizable(True) + scroll.setSizeAdjustPolicy( + QScrollArea.AdjustToContentsOnFirstShow) + n_lines = int(len(psname)/4) or 1 + for idx, name in enumerate(psname): + scrwidget.layout.addWidget( + DetailWidgetFactory._item(name, parent), + idx % n_lines, + int(idx / n_lines)) + widget = QWidget() + lay = QGridLayout(widget) + lay.addWidget(scroll) + return widget + else: + psname = psname[0] + return DetailWidgetFactory._item( + psname, parent=parent, psmodel=psmodel, pstype=pstype)
+ + + @staticmethod + def _item(psname, parent=None, psmodel=None, pstype=None): + if not psmodel: + try: + psmodel = PSSearch.conv_psname_2_psmodel(psname) + except (ValueError, KeyError): + if psname.startswith('LI'): + psmodel = 'LINAC_PS' + elif '-FC' in psname: + psmodel = 'FOFB_PS' + else: + raise ValueError(f'Undefined PS model for psname {psname}') + if psmodel == 'FBP_DCLink': + return FBPDCLinkDetailWidget(psname, parent) + if psmodel in ('FAC_2S_ACDC', 'FAC_2P4S_ACDC'): + return FACDCLinkDetailWidget(psname, parent) + if psmodel == 'LINAC_PS': + return LIPSDetailWidget(psname, parent) + if psmodel == 'FOFB_PS': + return FastCorrPSDetailWidget(psname, parent) + return PSDetailWidget( + psname, parent=parent, psmodel=psmodel, pstype=pstype)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/detail_widget/InterlockWindow.html b/_modules/siriushla/as_ps_control/detail_widget/InterlockWindow.html new file mode 100644 index 000000000..d8322fffd --- /dev/null +++ b/_modules/siriushla/as_ps_control/detail_widget/InterlockWindow.html @@ -0,0 +1,396 @@ + + + + + + siriushla.as_ps_control.detail_widget.InterlockWindow — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.detail_widget.InterlockWindow

+"""Magnet Interlock widget."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QHBoxLayout, QVBoxLayout, QGridLayout, \
+    QLabel, QTabWidget
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.search import PSSearch
+from siriuspy.pwrsupply.csdev import ETypes as _et
+from siriuspy.pwrsupply.csdev import get_ps_propty_database
+from siriushla.widgets import SiriusMainWindow, SiriusLedAlert, PyDMLed, \
+    SiriusLabel
+
+
+
+[docs] +class InterlockWidget(QWidget): + """InterlockWidget class.""" + + def __init__(self, parent=None, init_channel='', bit=-1, label=''): + """.""" + super().__init__(parent) + self.led = SiriusLedAlert(self, init_channel, bit) + self.label = QLabel(label, self) + lay = QHBoxLayout() + lay.setAlignment(Qt.AlignLeft) + lay.addWidget(self.led) + lay.addWidget(self.label) + self.setLayout(lay)
+ + + +
+[docs] +class InterlockListWidget(QWidget): + """Widget with interlock information.""" + + def __init__(self, parent=None, devname='', interlock='', labels=None): + """.""" + super().__init__(parent) + self._devname = _PVName(devname) + self._interlock = interlock + self._labels = labels + self._setup_ui() + + def _setup_ui(self): + ch = self._devname.substitute( + prefix=_VACA_PREFIX, propty=self._interlock+'-Mon') + lay = QGridLayout() + hbox = QHBoxLayout() + hbox.addWidget(QLabel('Value: ', self)) + hbox.addWidget(SiriusLabel(self, ch)) + hbox.addStretch() + lay.addLayout(hbox, 0, 0, 1, len(self._labels)/8) + for bit, label in enumerate(self._labels): + # Add led and label to layout + line = (bit % 8) + 1 + column = int(bit / 8) + lay.addWidget(InterlockWidget(self, ch, bit, label), line, column) + self.setLayout(lay)
+ + + +
+[docs] +class InterlockWindow(SiriusMainWindow): + """InterlockWindow class.""" + + def __init__(self, parent=None, devname='', database=None, + interlock=None, auxdev=None, auxdev2mod=None): + """Init.""" + super().__init__(parent) + self._devname = _PVName(devname) + self._db = database + self._auxdev = auxdev + self._auxdev2mod = auxdev2mod + self._interlock = interlock + if isinstance(interlock, str): + self._interlock = [interlock, ] + + secs = {'AS', 'TB', 'BO', 'TS', 'SI', 'IT'} + if self._devname.sub.endswith(('SA', 'SB', 'SP', 'ID')): + self.setObjectName('IDApp') + elif self._devname.sec in secs: + self.setObjectName(self._devname.sec+'App') + elif self._devname.idx[:2] in secs: + self.setObjectName(self._devname.idx[:2]+'App') + else: + self.setObjectName('ASApp') + + self._intlktype = '' + auxlabel = 'Alarms' if 'Alarm' in self._interlock[0] else 'Interlocks' + if 'IntlkSoft' in self._interlock[0]: + self._intlktype = 'Soft' + elif 'IntlkHard' in self._interlock[0]: + self._intlktype = 'Hard' + elif 'IntlkIIB' in self._interlock[0]: + self._intlktype = 'IIB' + elif self._devname.dev in ['FCH', 'FCV']: + self._intlktype = 'Amp' + + self._intlkname = self._intlktype + ' ' + auxlabel + self.setWindowTitle(self._devname + ' - ' + self._intlkname) + self._setup_ui() + + def _setup_ui(self): + self.cwid = QWidget(parent=self) + self.setCentralWidget(self.cwid) + lay = QVBoxLayout(self.cwid) + lay.addWidget(QLabel("<h1>" + self._devname + "</h1>")) + lay.addWidget(QLabel("<h3>" + self._intlkname + "</h3>")) + + if len(self._interlock) == 1: + labels = self._db[self._interlock[0]+'Labels-Cte']['value'] + wid = InterlockListWidget( + parent=self, devname=self._devname, + interlock=self._interlock[0], labels=labels) + lay.addWidget(wid) + else: + self._tab_widget = QTabWidget(self) + for aux in self._auxdev: + devaux = self._devname + aux + for intlk in self._interlock: + name = intlk.replace('Alarms', '').replace('Intlk', '') + if 'Mod' in name: + mod = name.split('Mod')[1] + tab_lbl = 'IIB Mod'.replace(self._intlktype, '') + tab_lbl += self._auxdev2mod[devaux][mod] \ + if devaux in self._auxdev2mod else mod + else: + tab_lbl = 'IIB' if 'IIB' in intlk else 'Main' + if tab_lbl == 'Main' and aux: + continue + labels = self._db[intlk+'Labels-Cte']['value'] + wid = InterlockListWidget( + parent=self, devname=devaux, interlock=intlk, + labels=labels) + self._tab_widget.addTab(wid, tab_lbl) + lay.addWidget(self._tab_widget)
+ + + +
+[docs] +class LIInterlockWindow(SiriusMainWindow): + """LIInterlockWindow class.""" + + BIT_MAPS = { + 'IntlkWarn-Mon': + {idx: name for idx, name in enumerate(_et.LINAC_INTLCK_WARN)}, + 'IntlkSignalIn-Mon': + {idx: name for idx, name in enumerate(_et.LINAC_INTLCK_SGIN)}, + 'IntlkSignalOut-Mon': + {idx: name for idx, name in enumerate(_et.LINAC_INTLCK_SGOUT)}, + } + COLOR_MAPS = { + 'IntlkWarn-Mon': { + 'on': PyDMLed.Yellow, + 'off': PyDMLed.LightGreen, + }, + 'IntlkSignalIn-Mon': { + 'on': PyDMLed.Red, + 'off': PyDMLed.LightGreen, + }, + 'IntlkRdSignalInMask-Mon': { + 'on': PyDMLed.LightGreen, + 'off': PyDMLed.DarkGreen, + }, + 'IntlkSignalOut-Mon': { + 'on': PyDMLed.Yellow, + 'off': PyDMLed.LightGreen, + }, + 'IntlkRdSignalOutMask-Mon': { + 'on': PyDMLed.LightGreen, + 'off': PyDMLed.DarkGreen, + }, + } + + def __init__(self, parent=None, devname=''): + """.""" + super().__init__(parent) + self._devname = _PVName(devname) + self.setObjectName('LIApp') + self.setWindowTitle(self._devname + ' Interlock Window') + self._setup_ui() + + def _setup_ui(self): + self.cwid = QWidget(parent=self) + self.setCentralWidget(self.cwid) + lay = QGridLayout(self.cwid) + lay.setHorizontalSpacing(20) + + self.label_warn = QLabel('Warn Status') + self.grid_warn = QGridLayout() + for bit, text in self.BIT_MAPS['IntlkWarn-Mon'].items(): + led = PyDMLed(self, self._devname+':IntlkWarn-Mon', bit=bit) + led.setOnColor(self.COLOR_MAPS['IntlkWarn-Mon']['on']) + led.setOffColor(self.COLOR_MAPS['IntlkWarn-Mon']['off']) + lbl = QLabel(text, self) + self.grid_warn.addWidget(led, bit, 0) + self.grid_warn.addWidget(lbl, bit, 1) + + self.label_digin = QLabel('Digital Input') + self.label_digout = QLabel('Digital Output') + for typ in ['In', 'Out']: + gridname = 'grid_dig'+typ.lower() + setattr(self, gridname, QGridLayout()) + grd = getattr(self, gridname) + grd.setHorizontalSpacing(9) + sgch = 'IntlkSignal'+typ+'-Mon' + mskch = 'IntlkRdSignal'+typ+'Mask-Mon' + for bit, text in self.BIT_MAPS[sgch].items(): + led = PyDMLed(self, self._devname+':'+sgch, bit=bit) + led.setOnColor(self.COLOR_MAPS[sgch]['on']) + led.setOffColor(self.COLOR_MAPS[sgch]['off']) + lbl = QLabel(text, self) + led_msk = PyDMLed(self, self._devname+':'+mskch, bit=bit) + led_msk.setOnColor(self.COLOR_MAPS[mskch]['on']) + led_msk.setOffColor(self.COLOR_MAPS[mskch]['off']) + grd.addWidget(led, bit, 0) + grd.addWidget(lbl, bit, 1) + grd.addWidget(led_msk, bit, 2) + + lay.addWidget(QLabel("<h1>" + self._devname + "</h1>"), 0, 0, 1, 3) + lay.addWidget(QLabel("<h3>Interlocks</h3>"), 1, 0, 1, 3) + lay.addWidget(self.label_warn, 2, 0) + lay.addLayout(self.grid_warn, 3, 0, Qt.AlignTop) + lay.addWidget(self.label_digin, 2, 1) + lay.addWidget(QLabel('Mask', self, alignment=Qt.AlignRight), 2, 2) + lay.addLayout(self.grid_digin, 3, 1, 1, 2, Qt.AlignTop) + lay.addWidget(self.label_digout, 2, 3) + lay.addWidget(QLabel('Mask', self, alignment=Qt.AlignRight), 2, 4) + lay.addLayout(self.grid_digout, 3, 3, 1, 2, Qt.AlignTop)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/detail_widget/PSDetailWidget.html b/_modules/siriushla/as_ps_control/detail_widget/PSDetailWidget.html new file mode 100644 index 000000000..443822a33 --- /dev/null +++ b/_modules/siriushla/as_ps_control/detail_widget/PSDetailWidget.html @@ -0,0 +1,2606 @@ + + + + + + siriushla.as_ps_control.detail_widget.PSDetailWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.detail_widget.PSDetailWidget

+"""PS Detail Widget."""
+
+import re
+from datetime import datetime as _datetime
+from functools import partial as _part
+import numpy as _np
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGroupBox, QPushButton, QLabel, \
+    QGridLayout, QVBoxLayout, QHBoxLayout, QFormLayout, QTabWidget, \
+    QSizePolicy as QSzPlcy, QCheckBox, QHeaderView, QAbstractItemView, \
+    QScrollArea, QFrame, QComboBox
+from qtpy.QtGui import QColor
+
+import qtawesome as qta
+
+from pydm.widgets import PyDMEnumComboBox, PyDMPushButton, PyDMLineEdit
+from pydm.widgets.display_format import parse_value_for_display
+
+from siriuspy.util import get_strength_label
+from siriuspy.namesys import SiriusPVName
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.search import PSSearch
+from siriuspy.pwrsupply.csdev import get_ps_propty_database, get_ps_modules, \
+    DEF_WFMSIZE_FBP, DEF_WFMSIZE_OTHERS, PS_LI_INTLK_THRS as _PS_LI_INTLK, \
+    ETypes as _PSet, get_ps_scopesourcemap
+from siriuspy.devices import PowerSupply
+
+from ... import util
+from ...widgets import PyDMStateButton, PyDMSpinboxScrollbar, SiriusTimePlot, \
+    SiriusConnectionSignal, SiriusLedState, SiriusLedAlert, SiriusLabel, \
+    PyDMLedMultiChannel, SiriusDialog, SiriusWaveformTable, SiriusSpinbox, \
+    SiriusHexaSpinbox, SiriusWaveformPlot, PyDMLed, SiriusStringComboBox, \
+    PyDMLinEditScrollbar
+from .InterlockWindow import InterlockWindow, LIInterlockWindow
+from .custom_widgets import LISpectIntlkLed
+
+
+class _BaseDetailWidget(QWidget):
+    """Widget with some common layouts."""
+
+    StyleSheet = """
+        #opmode_sp_cbox{
+            min-width: 7em;
+            max-width: 7em;
+        }
+        #opmode_rb_label,
+        #psstatus_mon{
+            min-width: 7em;
+            max-width: 7em;
+            qproperty-alignment: AlignCenter;
+        }
+        #ctrlloop_label,
+        #ctrlmode_label {
+            min-width: 4em;
+            max-width: 4em;
+            qproperty-alignment: AlignCenter;
+        }
+        #pwrstate_label {
+            min-width: 2em;
+            max-width: 2em;
+        }
+        #current > SiriusLabel,
+        #metric > SiriusLabel {
+            min-width: 7em;
+            max-width: 7em;
+            qproperty-alignment: AlignCenter;
+        }
+        QLed,
+        SiriusLedAlert,
+        SiriusLedState {
+            min-width: 1.5em;
+            max-width: 1.5em;
+            min-height: 1.5em;
+            max-height: 1.5em;
+        }
+        PyDMStateButton {
+            min-width: 2.5em;
+            max-width: 2.5em;
+            min-height: 1.5em;
+            max-height: 1.5em;
+        }
+        #auxmeaslabel {
+            min-width: 7.5em;
+            qproperty-alignment: AlignCenter;
+        }
+    """
+
+    def __init__(self, psname, parent=None):
+        """Class constructor."""
+        super(_BaseDetailWidget, self).__init__(parent)
+        self._prefix = VACA_PREFIX
+        self._psname = SiriusPVName(psname)
+
+        try:
+            self._metric = get_strength_label(
+                PSSearch.conv_psname_2_magfunc(self._psname))
+        except (ValueError, KeyError):
+            self._metric = ''
+
+        self._prefixed_psname = self._psname.substitute(prefix=self._prefix)
+
+        self.setObjectName(parent.objectName())
+
+        self.setFocus(True)
+        self.setFocusPolicy(Qt.StrongFocus)
+        self.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum)
+
+    @staticmethod
+    def conv_time_string(value):
+        time_str = _datetime.fromtimestamp(value).strftime('%Y-%m-%d %H:%M:%S')
+        time_str += '.{:03d}'.format(int(1e3*(value % 1)))
+        return time_str
+
+    def _powerStateLayout(self):
+        self.state_button = PyDMStateButton(
+            parent=self, init_channel=self._prefixed_psname + ":PwrState-Sel")
+        self.pwrstate_led = SiriusLedState(
+            parent=self, init_channel=self._prefixed_psname + ":PwrState-Sts")
+        self.pwrstate_label = SiriusLabel(
+            parent=self, init_channel=self._prefixed_psname + ":PwrState-Sts")
+        self.pwrstate_label.setObjectName("pwrstate_label")
+
+        layout = QGridLayout()
+        layout.setAlignment(Qt.AlignCenter)
+        layout.setHorizontalSpacing(4)
+        layout.addWidget(self.state_button, 0, 0, 1, 2, Qt.AlignHCenter)
+        layout.addWidget(self.pwrstate_led, 1, 0, Qt.AlignRight)
+        layout.addWidget(self.pwrstate_label, 1, 1, Qt.AlignLeft)
+        return layout
+
+    def _currentLayout(self, prec=None, has_refmon=True):
+        current_sp_label = QLabel("Setpoint")
+        current_rb_label = QLabel("Readback")
+        current_mon_label = QLabel("Mon")
+
+        self.current_sp_wid = PyDMSpinboxScrollbar(
+            self, self._prefixed_psname + ":Current-SP")
+        self.current_rb_val = SiriusLabel(
+            self, self._prefixed_psname+":Current-RB", keep_unit=True)
+        self.current_rb_val.showUnits = True
+        self.current_mon_val = SiriusLabel(
+            self, self._prefixed_psname+":Current-Mon", keep_unit=True)
+        self.current_mon_val.showUnits = True
+
+        if has_refmon:
+            current_ref_label = QLabel("Ref Mon")
+            self.current_ref_val = SiriusLabel(
+                self, self._prefixed_psname+":CurrentRef-Mon", keep_unit=True)
+            self.current_ref_val.showUnits = True
+
+        if prec is not None:
+            self.current_sp_wid.spinbox.precisionFromPV = False
+            self.current_sp_wid.spinbox.precision = prec
+            self.current_rb_val.precisionFromPV = False
+            self.current_rb_val.precision = prec
+            self.current_mon_val.precisionFromPV = False
+            self.current_mon_val.precision = prec
+            if has_refmon:
+                self.current_ref_val.precisionFromPV = False
+                self.current_ref_val.precision = prec
+        else:
+            self.current_rb_val.precisionFromPV = True
+            self.current_mon_val.precisionFromPV = True
+            if has_refmon:
+                self.current_ref_val.precisionFromPV = True
+
+        layout = QGridLayout()
+        layout.addWidget(current_sp_label, 0, 0, Qt.AlignRight)
+        layout.addWidget(self.current_sp_wid, 0, 1)
+        layout.addWidget(current_rb_label, 1, 0, Qt.AlignRight)
+        layout.addWidget(self.current_rb_val, 1, 1)
+        if has_refmon:
+            layout.addWidget(current_ref_label, 2, 0, Qt.AlignRight)
+            layout.addWidget(self.current_ref_val, 2, 1)
+            layout.addWidget(current_mon_label, 3, 0, Qt.AlignRight)
+            layout.addWidget(self.current_mon_val, 3, 1)
+        else:
+            layout.addWidget(current_mon_label, 2, 0, Qt.AlignRight)
+            layout.addWidget(self.current_mon_val, 2, 1)
+        layout.setColumnStretch(2, 1)
+        return layout
+
+    def _metricLayout(self, prec=None, has_refmon=True):
+        metric_sp_ch = self._prefixed_psname+":"+self._metric+"-SP"
+        metric_rb_ch = self._prefixed_psname+":"+self._metric+"-RB"
+        metric_mon_ch = self._prefixed_psname+":"+self._metric+"-Mon"
+
+        metric_sp_label = QLabel("Setpoint")
+        metric_rb_label = QLabel("Readback")
+        metric_mon_label = QLabel("Mon")
+
+        self.metric_sp_wid = PyDMSpinboxScrollbar(self, metric_sp_ch)
+        self.metric_rb_val = SiriusLabel(
+            parent=self, init_channel=metric_rb_ch, keep_unit=True)
+        self.metric_rb_val.showUnits = True
+        self.metric_mon_val = SiriusLabel(
+            parent=self, init_channel=metric_mon_ch, keep_unit=True)
+        self.metric_mon_val.showUnits = True
+
+        if has_refmon:
+            metric_ref_ch = self._prefixed_psname+":"+self._metric+"Ref-Mon"
+            metric_ref_label = QLabel("Ref Mon")
+            self.metric_ref_val = SiriusLabel(
+                parent=self, init_channel=metric_ref_ch, keep_unit=True)
+            self.metric_ref_val.showUnits = True
+
+        if prec is not None:
+            self.metric_sp_wid.spinbox.precisionFromPV = False
+            self.metric_sp_wid.spinbox.precision = prec
+            self.metric_rb_val.precisionFromPV = False
+            self.metric_rb_val.precision = prec
+            self.metric_mon_val.precisionFromPV = False
+            self.metric_mon_val.precision = prec
+            if has_refmon:
+                self.metric_ref_val.precisionFromPV = False
+                self.metric_ref_val.precision = prec
+        else:
+            self.metric_rb_val.precFromPV = True
+            self.metric_mon_val.precFromPV = True
+            if has_refmon:
+                self.metric_ref_val.precFromPV = True
+
+        layout = QGridLayout()
+        layout.addWidget(metric_sp_label, 0, 0, Qt.AlignRight)
+        layout.addWidget(self.metric_sp_wid, 0, 1)
+        layout.addWidget(metric_rb_label, 1, 0, Qt.AlignRight)
+        layout.addWidget(self.metric_rb_val, 1, 1)
+        if has_refmon:
+            layout.addWidget(metric_ref_label, 2, 0, Qt.AlignRight)
+            layout.addWidget(self.metric_ref_val, 2, 1)
+            layout.addWidget(metric_mon_label, 3, 0, Qt.AlignRight)
+            layout.addWidget(self.metric_mon_val, 3, 1)
+        else:
+            layout.addWidget(metric_mon_label, 2, 0, Qt.AlignRight)
+            layout.addWidget(self.metric_mon_val, 2, 1)
+        layout.setColumnStretch(3, 1)
+        return layout
+
+
+
+[docs] +class PSDetailWidget(_BaseDetailWidget): + """Widget with control interface for a given magnet.""" + + AuxDev2ModDict = { + 'BO-Fam:PS-B-1': {'A': '1', 'B': '2'}, + 'BO-Fam:PS-B-1a': {'A': '3', 'B': '4'}, + 'BO-Fam:PS-B-1b': {'A': '5', 'B': '6'}, + 'BO-Fam:PS-B-1c': {'A': '7', 'B': '8'}, + 'BO-Fam:PS-B-2': {'A': '1', 'B': '2'}, + 'BO-Fam:PS-B-2a': {'A': '3', 'B': '4'}, + 'BO-Fam:PS-B-2b': {'A': '5', 'B': '6'}, + 'BO-Fam:PS-B-2c': {'A': '7', 'B': '8'}, + } + + BasicParams = [ + 'Version-Cte', 'Properties-Cte', + 'Reset-Cmd', 'Abort-Cmd', 'WfmUpdate-Cmd', + 'TimestampBoot-Cte', 'TimestampUpdate-Mon', + 'PwrState-Sel', 'PwrState-Sts', + 'OpMode-Sel', 'OpMode-Sts', 'CtrlMode-Mon', + 'CtrlLoop-Sel', 'CtrlLoop-Sts', + 'Current-SP', 'Current-RB', 'CurrentRef-Mon', 'Current-Mon', + 'CycleEnbl-Mon', 'CycleIndex-Mon', + 'CycleType-Sel', 'CycleType-Sts', + 'CycleNrCycles-SP', 'CycleNrCycles-RB', + 'CycleFreq-SP', 'CycleFreq-RB', + 'CycleAmpl-SP', 'CycleAmpl-RB', + 'CycleOffset-SP', 'CycleOffset-RB', + 'CycleAuxParam-SP', 'CycleAuxParam-RB', + 'WfmIndex-Mon', 'WfmSyncPulseCount-Mon', + 'WfmUpdateAuto-Sel', 'WfmUpdateAuto-Sts', + 'SOFBMode-Sel', 'SOFBMode-Sts', 'SOFBUpdate-Cmd', + 'IDFFMode-Sel', 'IDFFMode-Sts', + 'PRUCtrlQueueSize-Mon', 'SyncPulse-Cmd', + 'Wfm-SP', 'Wfm-RB', 'WfmRef-Mon', 'Wfm-Mon', + 'Voltage-SP', 'Voltage-RB', 'VoltageRef-Mon', 'Voltage-Mon', + 'CapacitorBankVoltage-SP', 'CapacitorBankVoltage-RB', + 'CapacitorBankVoltageRef-Mon', 'CapacitorBankVoltage-Mon', + 'ScopeSrcAddr-SP', 'ScopeSrcAddr-RB', + 'ScopeFreq-SP', 'ScopeFreq-RB', + 'ScopeDuration-SP', 'ScopeDuration-RB', + 'WfmSyncMode-Sel', 'WfmSyncMode-Sts', + 'WfmFreq-SP', 'WfmFreq-RB', + 'WfmGain-SP', 'WfmGain-RB', + 'WfmOffset-SP', 'WfmOffset-RB', + ] + + def __init__(self, psname, parent=None, psmodel=None, pstype=None): + """Class constructor.""" + super(PSDetailWidget, self).__init__(psname, parent=parent) + self._psmodel = psmodel or PSSearch.conv_psname_2_psmodel(psname) + self._pstype = pstype or PSSearch.conv_psname_2_pstype(psname) + + self._db = get_ps_propty_database(self._psmodel, self._pstype) + self._mods = get_ps_modules(psmodel=self._psmodel) + + if self._mods: + self._mod2db = { + mod: [ + pv for pv in self._db + if 'Mod'+mod in pv and 'IIB' in pv and + 'Intlk' not in pv and 'Alarm' not in pv + ] for mod in self._mods + } + else: + self._mod2db = { + 'main': [ + pv for pv in self._db if 'IIB' in pv and + 'Intlk' not in pv and 'Alarm' not in pv + ] + } + self._auxmeasures = [ + pv for pv in self._db if pv not in self.BasicParams and + 'Intlk' not in pv and 'Alarm' not in pv and + (self._metric not in pv if self._metric else True) and + 'IIB' not in pv and 'Param' not in pv + ] + self._params = [ + prm for prm in self._db if 'Param' in prm and '-Cte' in prm] + + self._auxdev = ['', ] + self._auxdev2mod = self.AuxDev2ModDict + if psname in self._auxdev2mod: + self._auxdev = ['', 'a', 'b', 'c'] + + self._setup_ui() + self.setStyleSheet(self.StyleSheet) + + def _setup_ui(self): + # Group boxes that compose the widget + self.frmwr_box = QGroupBox("Firmware && IOC") + self.frmwr_box.setObjectName("version") + self.frmwr_box.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + self.interlock_box = QGroupBox("Interlock") + self.interlock_box.setObjectName("interlock") + self.pwrstate_box = QGroupBox("PwrState") + self.pwrstate_box.setObjectName("power_state") + self.opmode_box = QGroupBox("OpMode") + self.opmode_box.setObjectName("operation_mode") + self.ctrlloop_box = QGroupBox('Control Loop') + self.ctrlloop_box.setObjectName('ctrlloop_box') + if self._psmodel == 'FBP': + self.iocmode_box = QGroupBox('IOC Mode') + self.iocmode_box.setObjectName('iocmode_box') + self.genparams_box = QGroupBox('General Params') + self.genparams_box.setObjectName('genparams_box') + self.current_box = QGroupBox("Current") + self.current_box.setObjectName("current") + self.siggen_tab = QWidget() + self.siggen_tab.setObjectName('cycle_tab') + self.wfmplot_tab = QWidget() + self.wfmplot_tab.setObjectName("wfm_tab") + self.wfmparams_tab = QWidget() + self.wfmparams_tab.setObjectName('wfmparams_tab') + self.curve_tabs = QTabWidget() + self.curve_tabs.setObjectName(self._psname.sec+'Tab') + self.curve_tabs.setStyleSheet( + '#'+self._psname.sec+'Tab::pane {' + ' border-left: 2px solid gray;' + ' border-bottom: 2px solid gray;' + ' border-right: 2px solid gray;}') + self.curve_tabs.addTab(self.siggen_tab, 'SigGen') + self.curve_tabs.addTab(self.wfmplot_tab, 'WfmPlot') + self.curve_tabs.addTab(self.wfmparams_tab, 'WfmParams') + if self._psname.sec == 'BO': + self.curve_tabs.setCurrentIndex(1) + if self._metric: + self.metric_box = QGroupBox(self._metric) + self.metric_box.setObjectName("metric") + + # Set group boxes layouts + self.frmwr_box.setLayout(self._frmwrLayout()) + self.interlock_box.setLayout(self._interlockLayout()) + self.pwrstate_box.setLayout(self._powerStateLayout()) + self.opmode_box.setLayout(self._opModeLayout()) + self.ctrlloop_box.setLayout(self._ctrlLoopLayout()) + if self._psmodel == 'FBP': + self.iocmode_box.setLayout(self._iocModeLayout()) + self.genparams_box.setLayout(self._genParamsLayout()) + self.current_box.setLayout(self._currentLayout()) + self.siggen_tab.setLayout(self._siggenLayout()) + self.wfmplot_tab.setLayout(self._wfmplotLayout()) + self.wfmparams_tab.setLayout(self._wfmparamsLayout()) + if self._metric: + self.metric_box.setLayout(self._metricLayout()) + + # Add group boxes to laytout + self.layout = self._setWidgetLayout() + + # Set widget layout + self.setLayout(self.layout) + + def _setWidgetLayout(self): + controls = QGridLayout() + controls.addWidget(self.frmwr_box, 0, 0, 1, 2) + controls.addWidget(self.opmode_box, 2, 0) + controls.addWidget(self.pwrstate_box, 2, 1) + controls.addWidget(self.ctrlloop_box, 3, 0) + controls.addWidget(self.interlock_box, 3, 1) + if self._psmodel == 'FBP': + controls.addWidget(self.genparams_box, 4, 0) + controls.addWidget(self.iocmode_box, 4, 1) + else: + controls.addWidget(self.genparams_box, 4, 0, 1, 2) + + analogs = QVBoxLayout() + analogs.addWidget(self.current_box, Qt.AlignCenter) + if self._metric: + analogs.addWidget(self.metric_box, Qt.AlignCenter) + analogs.addWidget(self.curve_tabs, Qt.AlignCenter) + + boxes_layout = QHBoxLayout() + boxes_layout.addLayout(controls) + boxes_layout.addLayout(analogs) + boxes_layout.setStretch(0, 1) + boxes_layout.setStretch(1, 1) + + dclink_button = QPushButton('DCLink', self) + dclink_button.setObjectName('dclink_button') + + layout = QVBoxLayout() + layout.addWidget(QLabel("<h2>" + self._psname + "</h2>")) + layout.addLayout(boxes_layout) + layout.addWidget(dclink_button) + return layout + + def _frmwrLayout(self): + self.version_label = QLabel('ARM & DSP') + self.version_label.setObjectName("version_label") + self.version_label.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Maximum) + + self.version_cte = SiriusLabel( + self, self._prefixed_psname + ":Version-Cte") + self.version_cte.displayFormat = \ + SiriusLabel.DisplayFormat.BSMPUDCVersion + self.version_cte.setObjectName("version_cte_label") + self.version_cte.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Maximum) + + self.tstamp_boot_label = QLabel('IOC Boot') + self.tstamp_boot_label.setObjectName("tstamp_label") + self.tstamp_boot_label.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Maximum) + + self.tstamp_boot = QLabel('', self) + self.tstamp_boot_ch = SiriusConnectionSignal( + self._prefixed_psname + ":TimestampBoot-Cte") + self.tstamp_boot_ch.new_value_signal[float].connect( + self._tstamp_boot_met) + self.tstamp_boot.setObjectName("tstamp_boot_label") + self.tstamp_boot.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Maximum) + + self.tstamp_update_label = QLabel('IOC Update') + self.tstamp_update_label.setObjectName("tstamp_label") + self.tstamp_update_label.setSizePolicy( + QSzPlcy.Minimum, QSzPlcy.Maximum) + + self.tstamp_update = QLabel('', self) + self.tstamp_update_ch = SiriusConnectionSignal( + self._prefixed_psname + ":TimestampUpdate-Mon") + self.tstamp_update_ch.new_value_signal[float].connect( + self._tstamp_update_met) + self.tstamp_update.setObjectName("tstamp_update_label") + self.tstamp_update.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Maximum) + + layout = QGridLayout() + layout.addWidget(self.version_label, 0, 0, Qt.AlignHCenter) + layout.addWidget(self.version_cte, 0, 1, Qt.AlignHCenter) + layout.addWidget(self.tstamp_boot_label, 1, 0, Qt.AlignHCenter) + layout.addWidget(self.tstamp_boot, 1, 1, Qt.AlignHCenter) + layout.addWidget(self.tstamp_update_label, 2, 0, Qt.AlignHCenter) + layout.addWidget(self.tstamp_update, 2, 1, Qt.AlignHCenter) + return layout + + def _tstamp_update_met(self, value): + time_str = self.conv_time_string(value) + self.tstamp_update.setText(time_str) + + def _tstamp_boot_met(self, value): + time_str = self.conv_time_string(value) + self.tstamp_boot.setText(time_str) + + def _interlockLayout(self): + # Widgets + self.soft_label = QLabel('Soft', self, alignment=Qt.AlignCenter) + self.soft_intlk_bt = QPushButton(qta.icon('fa5s.list-ul'), '', self) + self.soft_intlk_bt.setObjectName('soft_intlk_bt') + self.soft_intlk_bt.setStyleSheet( + '#soft_intlk_bt{min-width:25px; max-width:25px; icon-size:20px;}') + util.connect_window( + self.soft_intlk_bt, InterlockWindow, self, + devname=self._psname, database=self._db, interlock='IntlkSoft', + auxdev=self._auxdev, auxdev2mod=self._auxdev2mod) + self.soft_intlk_led = SiriusLedAlert( + parent=self, init_channel=self._prefixed_psname + ":IntlkSoft-Mon") + + self.hard_label = QLabel('Hard', self, alignment=Qt.AlignCenter) + self.hard_intlk_bt = QPushButton(qta.icon('fa5s.list-ul'), '', self) + self.hard_intlk_bt.setObjectName('hard_intlk_bt') + self.hard_intlk_bt.setStyleSheet( + '#hard_intlk_bt{min-width:25px; max-width:25px; icon-size:20px;}') + util.connect_window( + self.hard_intlk_bt, InterlockWindow, self, + devname=self._psname, database=self._db, interlock='IntlkHard', + auxdev=self._auxdev, auxdev2mod=self._auxdev2mod) + self.hard_intlk_led = SiriusLedAlert( + parent=self, init_channel=self._prefixed_psname + ":IntlkHard-Mon") + + iib_intlks = [k.replace('Labels-Cte', '') for k in self._db + if re.match('IntlkIIB.*Labels-Cte', k)] + if iib_intlks: + self.iib_label = QLabel('IIB', self, alignment=Qt.AlignCenter) + self.iib_intlk_bt = QPushButton( + qta.icon('fa5s.list-ul'), '', self) + self.iib_intlk_bt.setObjectName('iib_intlk_bt') + self.iib_intlk_bt.setStyleSheet( + "#iib_intlk_bt{min-width:25px;max-width:25px;icon-size:20px;}") + util.connect_window( + self.iib_intlk_bt, InterlockWindow, self, + devname=self._psname, database=self._db, interlock=iib_intlks, + auxdev=self._auxdev, auxdev2mod=self._auxdev2mod) + + chs2vals = dict() + for aux in self._auxdev: + chs2vals.update({self._prefixed_psname+aux+":"+intlk+"-Mon": 0 + for intlk in iib_intlks}) + self.iib_intlk_led = PyDMLedMultiChannel(self, chs2vals) + + alarms = ['Alarms', ] if 'Alarms-Mon' in self._db else [] + alarms.extend([k.replace('Labels-Cte', '') for k in self._db + if re.match('AlarmsIIB.*Labels-Cte', k)]) + if alarms: + self.alarm_label = QLabel( + 'Alarms', self, alignment=Qt.AlignCenter) + self.alarm_bt = QPushButton(qta.icon('fa5s.list-ul'), '', self) + self.alarm_bt.setObjectName('alarm_bt') + self.alarm_bt.setStyleSheet( + '#alarm_bt{min-width:25px;max-width:25px;icon-size:20px;}') + util.connect_window( + self.alarm_bt, InterlockWindow, self, + devname=self._psname, database=self._db, interlock=alarms, + auxdev=self._auxdev, auxdev2mod=self._auxdev2mod) + + chs2vals = dict() + for aux in self._auxdev: + chs2vals.update({self._prefixed_psname+aux+":"+alarm+"-Mon": 0 + for alarm in alarms}) + self.alarm_led = PyDMLedMultiChannel( + self, chs2vals, + color_list=[PyDMLed.Yellow, PyDMLed.LightGreen, PyDMLed.Gray]) + + self.reset_bt = PyDMPushButton( + parent=self, icon=qta.icon('fa5s.sync'), pressValue=1, + init_channel=self._prefixed_psname + ":Reset-Cmd") + self.reset_bt.setObjectName('reset_bt') + self.reset_bt.setStyleSheet( + '#reset_bt{min-width:25px; max-width:25px; icon-size:20px;}') + + # Build layout + layout = QGridLayout() + layout.setAlignment(Qt.AlignCenter) + layout.addWidget(self.soft_intlk_bt, 0, 0) + layout.addWidget(self.soft_label, 0, 1) + layout.addWidget(self.soft_intlk_led, 0, 2) + layout.addWidget(self.hard_intlk_bt, 1, 0) + layout.addWidget(self.hard_label, 1, 1) + layout.addWidget(self.hard_intlk_led, 1, 2) + if iib_intlks: + layout.addWidget(self.iib_intlk_bt, 2, 0) + layout.addWidget(self.iib_label, 2, 1) + layout.addWidget(self.iib_intlk_led, 2, 2) + if alarms: + layout.addWidget(self.alarm_bt, 3, 0) + layout.addWidget(self.alarm_label, 3, 1) + layout.addWidget(self.alarm_led, 3, 2) + layout.addWidget(self.reset_bt, 4, 2) + return layout + + def _opModeLayout(self): + self.opmode_sp = PyDMEnumComboBox( + self, self._prefixed_psname + ":OpMode-Sel") + self.opmode_sp.setObjectName("opmode_sp_cbox") + self.opmode_rb = SiriusLabel( + self, self._prefixed_psname + ":OpMode-Sts") + self.opmode_rb.setObjectName("opmode_rb_label") + self.ctrlmode_led = SiriusLedAlert( + self, self._prefixed_psname + ":CtrlMode-Mon") + self.ctrlmode_label = SiriusLabel( + self, self._prefixed_psname + ":CtrlMode-Mon") + self.ctrlmode_label.setObjectName("ctrlmode_label") + + ctrlmode_layout = QHBoxLayout() + ctrlmode_layout.addWidget(self.ctrlmode_led) + ctrlmode_layout.addWidget(self.ctrlmode_label) + + layout = QGridLayout() + layout.setAlignment(Qt.AlignCenter) + layout.addWidget(self.opmode_sp, 0, 0, Qt.AlignHCenter) + layout.addWidget(self.opmode_rb, 1, 0, Qt.AlignHCenter) + layout.addLayout(ctrlmode_layout, 2, 0, Qt.AlignHCenter) + return layout + + def _ctrlLoopLayout(self): + self.ctrlloop_btn = PyDMStateButton( + parent=self, init_channel=self._prefixed_psname + ":CtrlLoop-Sel", + invert=True) + self.ctrlloop_label = SiriusLabel( + parent=self, init_channel=self._prefixed_psname + ":CtrlLoop-Sts") + self.ctrlloop_label.setObjectName('ctrlloop_label') + self.ctrlloop_led = SiriusLedState( + parent=self, init_channel=self._prefixed_psname + ":CtrlLoop-Sts") + self.ctrlloop_led.setOffColor(SiriusLedState.LightGreen) + self.ctrlloop_led.setOnColor(SiriusLedState.DarkGreen) + + lay_sts = QHBoxLayout() + lay_sts.addWidget(self.ctrlloop_led) + lay_sts.addWidget(self.ctrlloop_label) + + layout = QGridLayout() + layout.setAlignment(Qt.AlignCenter) + layout.addWidget(self.ctrlloop_btn, 0, 0, Qt.AlignHCenter) + layout.addLayout(lay_sts, 1, 0) + return layout + + def _siggenLayout(self): + # Tab + self.tab_siggen = QTabWidget(self) + self.tab_siggen.setObjectName(self._psname.sec+'Tab') + + enbl_mon_ca = self._prefixed_psname + ':CycleEnbl-Mon' + type_sp_ca = self._prefixed_psname + ':CycleType-Sel' + type_rb_ca = self._prefixed_psname + ':CycleType-Sts' + nrcycles_sp_ca = self._prefixed_psname + ':CycleNrCycles-SP' + nrcycles_rb_ca = self._prefixed_psname + ':CycleNrCycles-RB' + index_ca = self._prefixed_psname + ':CycleIndex-Mon' + freq_sp_ca = self._prefixed_psname + ':CycleFreq-SP' + freq_rb_ca = self._prefixed_psname + ':CycleFreq-RB' + ampl_sp_ca = self._prefixed_psname + ':CycleAmpl-SP' + ampl_rb_ca = self._prefixed_psname + ':CycleAmpl-RB' + offset_sp_ca = self._prefixed_psname + ':CycleOffset-SP' + offset_rb_ca = self._prefixed_psname + ':CycleOffset-RB' + auxparam_sp_ca = self._prefixed_psname + ':CycleAuxParam-SP' + auxparam_rb_ca = self._prefixed_psname + ':CycleAuxParam-RB' + + # Params + self.cycle_enbl_label = QLabel('Enabled', self) + self.cycle_enbl_mon_led = SiriusLedState(self, enbl_mon_ca) + + self.cycle_type_label = QLabel('Type', self) + self.cycle_type_sp_cb = PyDMEnumComboBox(self, type_sp_ca) + self.cycle_type_rb_label = SiriusLabel(self, type_rb_ca) + + self.cycle_nr_label = QLabel('Nr. Cycles', self) + self.cycle_nr_sp_sb = PyDMLineEdit(self, nrcycles_sp_ca) + self.cycle_nr_rb_label = SiriusLabel(self, nrcycles_rb_ca) + + self.cycle_index_label = QLabel('Index', self) + self.cycle_index_mon_label = SiriusLabel(self, index_ca) + + self.cycle_freq_label = QLabel('Frequency', self) + self.cycle_freq_sp_sb = PyDMLineEdit(self, freq_sp_ca) + self.cycle_freq_rb_label = SiriusLabel(self, freq_rb_ca) + + self.cycle_ampl_label = QLabel('Amplitude', self) + self.cycle_ampl_sp_sb = PyDMLineEdit(self, ampl_sp_ca) + self.cycle_ampl_rb_label = SiriusLabel(self, ampl_rb_ca) + + self.cycle_offset_label = QLabel('Offset', self) + self.cycle_offset_sp_sb = PyDMLineEdit(self, offset_sp_ca) + self.cycle_offset_rb_label = SiriusLabel(self, offset_rb_ca) + + self.cycle_auxparam_label = QLabel('AuxParams', self) + self.cycle_auxparam_sp_le = PyDMLineEdit(self, auxparam_sp_ca) + self.cycle_auxparam_rb_label = SiriusLabel(self, auxparam_rb_ca) + + self.cycle_auxparam_helpbut = QPushButton( + qta.icon('mdi.help'), '', self) + self.cycle_auxparam_helpbut.setToolTip( + 'Show AuxParam help message') + self.cycle_auxparam_helpbut.setObjectName('help_bt') + self.cycle_auxparam_helpbut.setStyleSheet( + '#help_bt{min-width:20px;max-width:20px;icon-size:16px;}') + self.cycle_auxparam_helpwid = QWidget() + self.cycle_auxparam_helpwid.setObjectName(self.parent().objectName()) + self.cycle_auxparam_helpwid.setWindowTitle('AuxParam Help Message') + self.cycle_auxparam_helpbut.clicked.connect( + self.cycle_auxparam_helpwid.show) + text = getattr(PowerSupply, 'cycle_aux_param').__doc__ + self.cycle_auxparam_helplab = QLabel(text, self) + lay_help = QHBoxLayout(self.cycle_auxparam_helpwid) + lay_help.addWidget(self.cycle_auxparam_helplab) + + parms = QWidget() + lay_parms = QGridLayout(parms) + lay_parms.setAlignment(Qt.AlignTop) + lay_parms.addWidget(self.cycle_enbl_label, 0, 0, Qt.AlignRight) + lay_parms.addWidget(self.cycle_enbl_mon_led, 0, 1, Qt.AlignCenter) + lay_parms.addWidget(self.cycle_type_label, 1, 0, Qt.AlignRight) + lay_parms.addWidget(self.cycle_type_sp_cb, 1, 1) + lay_parms.addWidget(self.cycle_type_rb_label, 1, 2, 1, 2) + lay_parms.addWidget(self.cycle_nr_label, 2, 0, Qt.AlignRight) + lay_parms.addWidget(self.cycle_nr_sp_sb, 2, 1) + lay_parms.addWidget(self.cycle_nr_rb_label, 2, 2, 1, 2) + lay_parms.addWidget(self.cycle_index_label, 3, 0, Qt.AlignRight) + lay_parms.addWidget(self.cycle_index_mon_label, 3, 2, 1, 2) + lay_parms.addWidget(self.cycle_freq_label, 4, 0, Qt.AlignRight) + lay_parms.addWidget(self.cycle_freq_sp_sb, 4, 1) + lay_parms.addWidget(self.cycle_freq_rb_label, 4, 2, 1, 2) + lay_parms.addWidget(self.cycle_ampl_label, 5, 0, Qt.AlignRight) + lay_parms.addWidget(self.cycle_ampl_sp_sb, 5, 1) + lay_parms.addWidget(self.cycle_ampl_rb_label, 5, 2, 1, 2) + lay_parms.addWidget(self.cycle_offset_label, 6, 0, Qt.AlignRight) + lay_parms.addWidget(self.cycle_offset_sp_sb, 6, 1) + lay_parms.addWidget(self.cycle_offset_rb_label, 6, 2, 1, 2) + lay_parms.addWidget(self.cycle_auxparam_label, 7, 0, Qt.AlignRight) + lay_parms.addWidget(self.cycle_auxparam_sp_le, 7, 1) + lay_parms.addWidget(self.cycle_auxparam_rb_label, 7, 2) + lay_parms.addWidget(self.cycle_auxparam_helpbut, 7, 3) + + self.tab_siggen.addTab(parms, 'Params') + + # Default Curve + try: + self._siggen = PSSearch.conv_psname_2_siggenconf(self._psname) + except KeyError: + self._siggen = None + + if self._siggen is not None: + self._siggen_nrpts = DEF_WFMSIZE_FBP if self._psmodel == 'FBP' \ + else DEF_WFMSIZE_OTHERS + self._siggen_w = self._siggen.get_waveform(self._siggen_nrpts) + + self.curve_siggen = SiriusWaveformPlot() + self.curve_siggen.setObjectName('graph') + self.curve_siggen.setStyleSheet( + '#graph{max-height:15em; max-width:16.5em;}') + self.curve_siggen.setLabel('left', text='Current [A]', color='gray') + self.curve_siggen.setLabel('bottom', text='Time [s]', color='gray') + self.curve_siggen.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum) + self.curve_siggen.autoRangeX = True + self.curve_siggen.autoRangeY = True + self.curve_siggen.showXGrid = True + self.curve_siggen.showYGrid = True + self.curve_siggen.setBackgroundColor(QColor(255, 255, 255)) + self.curve_siggen.addChannel( + y_channel='SigGen', x_channel='T [s]', + color='black', lineWidth=2) + self.curve_siggen.curve = self.curve_siggen.curveAtIndex(0) + self.curve_siggen.curve.receiveXWaveform(_np.array(self._siggen_w[1])) + self.curve_siggen.curve.receiveYWaveform(_np.array(self._siggen_w[0])) + self.curve_siggen.curve.redrawCurve() + + defcurve = QWidget() + lay_defcurve = QGridLayout(defcurve) + lay_defcurve.addWidget(self.curve_siggen) + + self.tab_siggen.addTab(defcurve, 'Default Curve') + + layout = QGridLayout() + layout.setContentsMargins(0, 6, 0, 0) + layout.addWidget(self.tab_siggen, 0, 0) + return layout + + def _iocModeLayout(self): + sofb_mode_sel = self._prefixed_psname + ':SOFBMode-Sel' + sofb_mode_sts = self._prefixed_psname + ':SOFBMode-Sts' + + sofb_mode_label = QLabel('SOFB', self) + sofb_mode_btn = PyDMStateButton(self, sofb_mode_sel) + sofb_mode_led = SiriusLedState(self, sofb_mode_sts) + + idff_mode_sel = self._prefixed_psname + ':IDFFMode-Sel' + idff_mode_sts = self._prefixed_psname + ':IDFFMode-Sts' + + idff_mode_label = QLabel('IDFF', self) + idff_mode_btn = PyDMStateButton(self, idff_mode_sel) + idff_mode_led = SiriusLedState(self, idff_mode_sts) + + layout = QGridLayout() + layout.setAlignment(Qt.AlignTop) + layout.setColumnStretch(3, 1) + layout.addWidget(sofb_mode_label, 0, 0, Qt.AlignRight) + layout.addWidget(sofb_mode_btn, 0, 1, Qt.AlignHCenter) + layout.addWidget(sofb_mode_led, 0, 2) + layout.addWidget(idff_mode_label, 1, 0, Qt.AlignRight) + layout.addWidget(idff_mode_btn, 1, 1, Qt.AlignHCenter) + layout.addWidget(idff_mode_led, 1, 2) + return layout + + def _genParamsLayout(self): + queue_size_ca = self._prefixed_psname + ':PRUCtrlQueueSize-Mon' + queue_size_label = QLabel('IOC Queue Size', self) + queue_size_rb_label = SiriusLabel(self, queue_size_ca) + + layout = QGridLayout() + layout.setAlignment(Qt.AlignTop) + layout.setColumnStretch(3, 1) + layout.addWidget(queue_size_label, 0, 0, Qt.AlignRight) + layout.addWidget(queue_size_rb_label, 0, 1) + + if 'DCLink' not in self._prefixed_psname: + syncpulse_cmd_ca = self._prefixed_psname + ':SyncPulse-Cmd' + syncpulse_cmd_lb = QLabel('Sync Pulse Cmd', self) + syncpulse_cmd_btn = PyDMPushButton( + parent=self, icon=qta.icon('fa5s.step-forward'), pressValue=1, + init_channel=syncpulse_cmd_ca) + syncpulse_cmd_btn.setObjectName('syncpulse') + syncpulse_cmd_btn.setStyleSheet( + '#syncpulse{min-width:25px; max-width:32px; icon-size:20px;}') + + layout.addWidget(syncpulse_cmd_lb, 1, 0, Qt.AlignRight) + layout.addWidget(syncpulse_cmd_btn, 1, 1) + + pbaux = QPushButton( + qta.icon('mdi.open-in-new'), 'Aux. Measures', self) + util.connect_window( + pbaux, PSAuxMeasWidget, self, psname=self._psname, + auxmeas=self._auxmeasures, mod2dbase=self._mod2db, + auxdev=self._auxdev, auxdev2mod=self._auxdev2mod) + layout.addWidget(pbaux, 2, 0, 1, 2) + + pbprm = QPushButton(qta.icon('mdi.open-in-new'), + 'Parameters', self) + util.connect_window( + pbprm, PSParamsWidget, self, psname=self._psname, + params=self._params) + layout.addWidget(pbprm, 3, 0, 1, 2) + + return layout + + def _wfmplotLayout(self): + # graph + self.wfm_graph = SiriusWaveformPlot() + self.wfm_graph.setObjectName('graph') + self.wfm_graph.setStyleSheet( + '#graph{max-height:15em; max-width:16.5em;}') + self.wfm_graph.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum) + self.wfm_graph.autoRangeX = True + self.wfm_graph.autoRangeY = True + self.wfm_graph.showXGrid = True + self.wfm_graph.showYGrid = True + self.wfm_graph.setLabel('left', text='Current [A]', color='gray') + self.wfm_graph.setLabel('bottom', text='Time [s]') + self.wfm_graph.plotItem.ctrl.fftCheck.toggled.connect( + self._wfmUpdAxisLabel) + self.wfm_graph.setBackgroundColor(QColor(255, 255, 255)) + + # nrpts label + self.wfm_nrpts_lb = QLabel('Nrpts (SP|RB|Ref-Mon|Mon):', self) + self.wfm_nrpts_lb.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum) + + # checkbox layout + hbox_show = QHBoxLayout() + hbox_show.setSpacing(9) + + # create auxiliary channels + self._scopedur_ch_rb = SiriusConnectionSignal( + self._prefixed_psname + ':ScopeDuration-RB') + self._scopefreq_ch_rb = SiriusConnectionSignal( + self._prefixed_psname + ':ScopeFreq-RB') + self._wfmfreq_ch_rb = SiriusConnectionSignal( + self._prefixed_psname + ':ParamWfmRefFreq-Cte') + + # fill graph, label and show layout + self._wfm_chs, self._wfm_nrpts = dict(), dict() + self._wfm_curves, self._wfm_show_cbs = dict(), dict() + suf2color = { + '-SP': 'red', + '-RB': 'blue', + 'Ref-Mon': 'green', + '-Mon': 'black', + } + for idx, suf in enumerate(suf2color): + propty = 'Wfm' + suf + color = suf2color[suf] + channel = self._prefixed_psname + ':' + propty + + # initialize nrpts + self._wfm_nrpts[suf] = 0 + + # create channel to listen curve updates + self._wfm_chs[suf] = SiriusConnectionSignal(channel) + + # listen to curve channel to update NrPts label + self._wfm_chs[suf].new_value_signal[_np.ndarray].connect( + self._update_wfm_nrpts_label) + + # add curve to wfm_graph + self.wfm_graph.addChannel( + y_channel=channel, name=propty, color=color, lineWidth=2) + curve = self.wfm_graph.curveAtIndex(idx) + + # change xdata to show time indices according to ScopeDuration-RB + curvetype = 'scope' if propty == 'Wfm-Mon' else 'wfm' + self._scopedur_ch_rb.new_value_signal[float].connect( + _part(self._wfmTimeData, propty)) + self._wfm_chs[suf].new_value_signal[_np.ndarray].connect( + _part(self._wfmTimeData, propty)) + # reimplement fourier transform to use ScopeFreq-RB + curve._fourierTransform = _part(self._wfmFourierData, curvetype) + self._wfm_curves[propty] = curve + + # fill checkbox layout + cbx = QCheckBox(suf.strip('-')) + cbx.setChecked(True) + cbx.setStyleSheet('color: '+color+';') + cbx.stateChanged.connect(self._wfm_curves[propty].setVisible) + self._wfm_show_cbs[propty] = cbx + hbox_show.addWidget(cbx) + + layout = QVBoxLayout() + layout.setAlignment(Qt.AlignCenter) + layout.addWidget(self.wfm_graph) + layout.addWidget(self.wfm_nrpts_lb) + layout.addLayout(hbox_show) + return layout + + def _wfmparamsLayout(self): + # --- scope groupbox ---- + + src_sp = self._prefixed_psname + ':ScopeSrcAddr-SP' + src_rb = self._prefixed_psname + ':ScopeSrcAddr-RB' + freq_sp = self._prefixed_psname + ':ScopeFreq-SP' + freq_rb = self._prefixed_psname + ':ScopeFreq-RB' + dur_sp = self._prefixed_psname + ':ScopeDuration-SP' + dur_rb = self._prefixed_psname + ':ScopeDuration-RB' + + self.scope_src_label = QLabel('Source', self) + self.scope_src_sp_sb = SiriusHexaSpinbox(self, src_sp) + self.scope_src_rb_lb = SiriusLabel(self, src_rb) + self.scope_src_rb_lb.displayFormat = SiriusLabel.DisplayFormat.Hex + + self.scope_freq_label = QLabel('Frequency [Hz]', self) + self.scope_freq_sp_sb = SiriusSpinbox(self, freq_sp) + self.scope_freq_rb_lb = SiriusLabel(self, freq_rb, keep_unit=True) + self.scope_freq_rb_lb.showUnits = True + + self.scope_dur_label = QLabel('Duration [s]', self) + self.scope_dur_sp_sb = SiriusSpinbox(self, dur_sp) + self.scope_dur_rb_lb = SiriusLabel(self, dur_rb) + self.scope_dur_rb_lb.showUnits = True + + layout_scope = QGridLayout() + layout_scope.setAlignment(Qt.AlignTop) + layout_scope.setContentsMargins(6, 6, 3, 3) + layout_scope.addWidget(self.scope_src_label, 0, 0, Qt.AlignRight) + layout_scope.addWidget(self.scope_src_rb_lb, 0, 3) + layout_scope.addWidget( + self.scope_freq_label, 1, 0, 1, 2, Qt.AlignRight) + layout_scope.addWidget(self.scope_freq_sp_sb, 1, 2) + layout_scope.addWidget(self.scope_freq_rb_lb, 1, 3) + layout_scope.addWidget(self.scope_dur_label, 2, 0, 1, 2, Qt.AlignRight) + layout_scope.addWidget(self.scope_dur_sp_sb, 2, 2) + layout_scope.addWidget(self.scope_dur_rb_lb, 2, 3) + + try: + self.scope_src_sp_cb = SiriusStringComboBox( + self, src_sp, items=get_ps_scopesourcemap(self._psname)) + self.scope_src_sp_opt = QComboBox(self) + self.scope_src_sp_opt.addItems(['[list]', '[0x]']) + self.scope_src_sp_opt.currentIndexChanged.connect( + self.scope_src_sp_cb.setHidden) + self.scope_src_sp_opt.currentIndexChanged.connect( + self.scope_src_sp_sb.setVisible) + + self.scope_src_sp_sb.setVisible(False) + layout_scope.addWidget(self.scope_src_label, 0, 0, Qt.AlignRight) + layout_scope.addWidget(self.scope_src_sp_opt, 0, 1) + layout_scope.addWidget(self.scope_src_sp_cb, 0, 2) + layout_scope.addWidget(self.scope_src_sp_sb, 0, 2) + except KeyError: + layout_scope.addWidget( + self.scope_src_label, 0, 0, 1, 2, Qt.AlignRight) + layout_scope.addWidget(self.scope_src_sp_sb, 0, 2) + + self.scope_box = QGroupBox("Scope") + self.scope_box.setObjectName("Scope") + self.scope_box.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + self.scope_box.setLayout(layout_scope) + + # --- wfm groupbox --- + + wfm_selected_mon = self._prefixed_psname + ':WfmSelected-Mon' + wfm_syncmode_sel = self._prefixed_psname + ':WfmSyncMode-Sel' + wfm_syncmode_sts = self._prefixed_psname + ':WfmSyncMode-Sts' + wfm_freq_sp = self._prefixed_psname + ':WfmFreq-SP' + wfm_freq_rb = self._prefixed_psname + ':WfmFreq-RB' + wfm_gain_sp = self._prefixed_psname + ':WfmGain-SP' + wfm_gain_rb = self._prefixed_psname + ':WfmGain-RB' + wfm_offset_sp = self._prefixed_psname + ':WfmOffset-SP' + wfm_offset_rb = self._prefixed_psname + ':WfmOffset-RB' + + wfm_index_ca = self._prefixed_psname + ':WfmIndex-Mon' + wfm_count_ca = self._prefixed_psname + ':WfmSyncPulseCount-Mon' + wfm_updateauto_ca = self._prefixed_psname + ':WfmUpdateAuto-Sts' + wfm_updateauto_sel = self._prefixed_psname + ':WfmUpdateAuto-Sel' + + self.wfm_selected_label = QLabel('Wfm Selected', self) + self.wfm_selected_mon = SiriusLabel(self, wfm_selected_mon) + + self.wfm_syncmode_label = QLabel('Wfm SyncMode', self) + self.wfm_syncmode_sel_cb = PyDMEnumComboBox(self, wfm_syncmode_sel) + self.wfm_syncmode_sts_lb = SiriusLabel(self, wfm_syncmode_sts) + self.wfm_syncmode_sts_lb.showUnits = True + + self.wfm_freq_label = QLabel('Wfm Frequency [Hz]', self) + self.wfm_freq_sp_sb = SiriusSpinbox(self, wfm_freq_sp) + self.wfm_freq_rb_lb = SiriusLabel(self, wfm_freq_rb, keep_unit=True) + self.wfm_freq_rb_lb.showUnits = True + + self.wfm_gain_label = QLabel('Wfm Gain', self) + self.wfm_gain_sp_sb = SiriusSpinbox(self, wfm_gain_sp) + self.wfm_gain_rb_lb = SiriusLabel(self, wfm_gain_rb) + self.wfm_gain_rb_lb.showUnits = True + + self.wfm_offset_label = QLabel('Wfm Offset [A]', self) + self.wfm_offset_sp_sb = SiriusSpinbox(self, wfm_offset_sp) + self.wfm_offset_rb_lb = SiriusLabel(self, wfm_offset_rb) + self.wfm_offset_rb_lb.showUnits = True + + wfm_index_label = QLabel('Wfm Index', self) + wfm_index_rb_label = SiriusLabel(self, wfm_index_ca) + wfm_count_label = QLabel('Wfm Pulse Count', self) + wfm_count_rb_label = SiriusLabel(self, wfm_count_ca) + wfm_updateauto_label = QLabel('Wfm UpdateAuto', self) + wfm_updateauto_sts_led = SiriusLedState(self, wfm_updateauto_ca) + wfm_updateauto_btn = PyDMStateButton(self, wfm_updateauto_sel) + + layout_wfm = QGridLayout() + layout_wfm.setAlignment(Qt.AlignTop) + layout_wfm.setContentsMargins(6, 6, 3, 3) + + layout_wfm.addWidget( + self.wfm_selected_label, 0, 0, Qt.AlignRight) + layout_wfm.addWidget(self.wfm_selected_mon, 0, 1, 1, 2) + layout_wfm.addWidget( + self.wfm_syncmode_label, 1, 0, Qt.AlignRight) + layout_wfm.addWidget(self.wfm_syncmode_sel_cb, 1, 1) + layout_wfm.addWidget(self.wfm_syncmode_sts_lb, 1, 2) + layout_wfm.addWidget(self.wfm_freq_label, 2, 0, Qt.AlignRight) + layout_wfm.addWidget(self.wfm_freq_sp_sb, 2, 1) + layout_wfm.addWidget(self.wfm_freq_rb_lb, 2, 2) + layout_wfm.addWidget(self.wfm_gain_label, 3, 0, Qt.AlignRight) + layout_wfm.addWidget(self.wfm_gain_sp_sb, 3, 1) + layout_wfm.addWidget(self.wfm_gain_rb_lb, 3, 2) + layout_wfm.addWidget(self.wfm_offset_label, 4, 0, Qt.AlignRight) + layout_wfm.addWidget(self.wfm_offset_sp_sb, 4, 1) + layout_wfm.addWidget(self.wfm_offset_rb_lb, 4, 2) + + layout_wfm.addWidget(wfm_index_label, 5, 0, Qt.AlignRight) + layout_wfm.addWidget(wfm_index_rb_label, 5, 1) + layout_wfm.addWidget(wfm_count_label, 6, 0, Qt.AlignRight) + layout_wfm.addWidget(wfm_count_rb_label, 6, 1) + layout_wfm.addWidget(wfm_updateauto_label, 7, 0, Qt.AlignRight) + layout_wfm.addWidget(wfm_updateauto_btn, 7, 1, Qt.AlignHCenter) + layout_wfm.addWidget(wfm_updateauto_sts_led, 7, 2) + + self.wfm_box = QGroupBox("Wfm") + self.wfm_box.setObjectName("Wfm") + self.wfm_box.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + self.wfm_box.setLayout(layout_wfm) + + # --- wfmlayout --- + + layout = QGridLayout() + layout.setAlignment(Qt.AlignTop) + layout.setContentsMargins(6, 6, 3, 3) + layout.addWidget(self.scope_box, 1, 1) + layout.addWidget(self.wfm_box, 2, 1) + return layout + + def _update_wfm_nrpts_label(self, value): + pvtype = self.sender().address.split('Wfm')[-1] + self._wfm_nrpts[pvtype] = len(value) + self.wfm_nrpts_lb.setText( + "Nrpts (SP|RB|Ref-Mon|Mon): {}|{}|{}|{}".format( + self._wfm_nrpts['-SP'], + self._wfm_nrpts['-RB'], + self._wfm_nrpts['Ref-Mon'], + self._wfm_nrpts['-Mon'])) + + def _wfmUpdAxisLabel(self, state): + xlabel = 'Frequency [Hz]' if state else 'Time [s]' + self.wfm_graph.setLabel('bottom', text=xlabel) + + def _wfmTimeData(self, propty, value): + if value is None: + return + channel = self.sender().address + curve = self._wfm_curves[propty] + if 'Duration' in channel: + duration = value + latest_y = curve.latest_y + else: + duration = self._scopedur_ch_rb.value + latest_y = value + if latest_y is None: + return + curve.receiveXWaveform(_np.linspace(0, duration, len(latest_y))) + curve.redrawCurve() + + def _wfmFourierData(self, curvetype, x, y): + """Perform Fourier transform. + + This code is a copy of pyqtgraph.graphicsItems.PlotDataItem, just + changing the sampling frequency to the ScopeFreq-RB value. + """ + # If x values are not sampled uniformly, + # then use np.interp to resample before taking fft. + dx = _np.diff(x) + uniform = not _np.any(_np.abs(dx-dx[0]) > (abs(dx[0]) / 1000.)) + if not uniform: + x2 = _np.linspace(x[0], x[-1], len(x)) + y = _np.interp(x2, x, y) + x = x2 + + n = y.size + f = _np.fft.rfft(y) / n + # Diff: use scope frequency + chfreq = self._scopefreq_ch_rb if curvetype else self._wfmfreq_ch_rb + freq = chfreq.value + if isinstance(freq, _np.ndarray): + freq = freq[0] + d = 1./freq if freq is not None else 1 + x = _np.fft.rfftfreq(n, d) + y = _np.abs(f) + return x, y
+ + + +
+[docs] +class LIPSDetailWidget(_BaseDetailWidget): + """.""" + + def __init__(self, psname, parent=None): + """Class constructor.""" + super(LIPSDetailWidget, self).__init__(psname, parent=parent) + self._setup_ui() + self.setStyleSheet(self.StyleSheet) + + def _setup_ui(self): + # Group boxes that compose the widget + self.frmwr_box = QGroupBox("IOC && Net") + self.frmwr_box.setObjectName("version") + self.frmwr_box.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + self.pwrstate_box = QGroupBox("PwrState") + self.pwrstate_box.setObjectName("power_state") + self.interlock_box = QGroupBox("Interlock") + self.interlock_box.setObjectName("interlock") + self.params_box = QGroupBox('Params') + self.params_box.setObjectName('params_box') + self.current_box = QGroupBox("Current") + self.current_box.setObjectName("current") + if self._metric: + self.metric_box = QGroupBox(self._metric) + self.metric_box.setObjectName("metric") + + # Set group boxes layouts + self.frmwr_box.setLayout(self._frmwrLayout()) + self.pwrstate_box.setLayout(self._powerStateLayout()) + self.interlock_box.setLayout(self._interlockLayout()) + self.params_box.setLayout(self._paramsLayout()) + self.current_box.setLayout(self._currentLayout(has_refmon=False)) + if self._metric: + self.metric_box.setLayout(self._metricLayout(has_refmon=False)) + + # Add group boxes to laytout + self.layout = self._setWidgetLayout() + + # Set widget layout + self.setLayout(self.layout) + + def _setWidgetLayout(self): + controls = QGridLayout() + controls.addWidget(self.frmwr_box, 0, 0, 1, 2) + controls.addWidget(self.pwrstate_box, 1, 0) + controls.addWidget(self.interlock_box, 1, 1) + + analogs = QVBoxLayout() + analogs.addWidget(self.current_box, Qt.AlignCenter) + + if self._metric: + analogs.addWidget(self.metric_box, Qt.AlignCenter) + controls.addWidget(self.params_box, 2, 0, 1, 2) + else: + analogs.addWidget(self.params_box, Qt.AlignCenter) + + boxes_layout = QHBoxLayout() + boxes_layout.addLayout(controls) + boxes_layout.addLayout(analogs) + boxes_layout.setStretch(0, 1) + boxes_layout.setStretch(1, 1) + + layout = QVBoxLayout() + layout.addWidget(QLabel("<h2>" + self._psname + "</h2>")) + layout.addLayout(boxes_layout) + return layout + + def _frmwrLayout(self): + self.version_label = QLabel('Version') + self.version_label.setObjectName("version_label") + self.version_label.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Maximum) + self.version_cte = SiriusLabel( + self, self._prefixed_psname + ":Version-Cte") + self.version_cte.setObjectName("version_cte_label") + self.version_cte.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Maximum) + + self.tstamp_boot_label = QLabel('IOC Boot') + self.tstamp_boot_label.setObjectName("tstamp_label") + self.tstamp_boot_label.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Maximum) + self.tstamp_boot_cte = SiriusLabel( + self, self._prefixed_psname + ":TimestampBoot-Cte") + self.tstamp_boot_cte.setObjectName("tstamp_cte_label") + self.tstamp_boot_cte.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Maximum) + self.tstamp_boot_cte_ch = SiriusConnectionSignal( + self._prefixed_psname + ":TimestampBoot-Cte") + self.tstamp_boot_cte_ch.new_value_signal[float].connect( + self._tstamp_boot_cte_met) + + self.tstamp_update_label = QLabel('IOC Update') + self.tstamp_update_label.setObjectName("tstampupdate_label") + self.tstamp_update_label.setSizePolicy( + QSzPlcy.Minimum, QSzPlcy.Maximum) + self.tstamp_update_mon = SiriusLabel( + self, self._prefixed_psname + ":TimestampUpdate-Mon") + self.tstamp_update_mon.setObjectName("tstampupdate_mon_label") + self.tstamp_update_mon.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Maximum) + self.tstamp_update_mon_ch = SiriusConnectionSignal( + self._prefixed_psname + ":TimestampUpdate-Mon") + self.tstamp_update_mon_ch.new_value_signal[float].connect( + self._tstamp_update_mon_met) + + self.conn_label = QLabel('Net Status') + self.conn_label.setObjectName("net_label") + self.conn_label.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Maximum) + self.conn_sts = SiriusLabel( + self, self._prefixed_psname + ":Connected-Mon") + self.conn_sts.setObjectName("net_cte_label") + self.conn_sts.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Maximum) + + layout = QGridLayout() + layout.addWidget(self.version_label, 0, 0, Qt.AlignHCenter) + layout.addWidget(self.version_cte, 0, 1, Qt.AlignHCenter) + layout.addWidget(self.tstamp_boot_label, 1, 0, Qt.AlignHCenter) + layout.addWidget(self.tstamp_boot_cte, 1, 1, Qt.AlignHCenter) + layout.addWidget(self.tstamp_update_label, 2, 0, Qt.AlignHCenter) + layout.addWidget(self.tstamp_update_mon, 2, 1, Qt.AlignHCenter) + layout.addWidget(self.conn_label, 3, 0, Qt.AlignHCenter) + layout.addWidget(self.conn_sts, 3, 1, Qt.AlignHCenter) + return layout + + def _tstamp_update_mon_met(self, value): + time_str = self.conv_time_string(value) + self.tstamp_update_mon.setText(time_str) + + def _tstamp_boot_cte_met(self, value): + time_str = self.conv_time_string(value) + self.tstamp_boot_cte.setText(time_str) + + def _interlockLayout(self): + self.intlk_bt = QPushButton(qta.icon('fa5s.list-ul'), '', self) + self.intlk_bt.setObjectName('intlk_bt') + self.intlk_bt.setStyleSheet( + '#intlk_bt{min-width:25px; max-width:25px; icon-size:20px;}') + util.connect_window(self.intlk_bt, LIInterlockWindow, self, + **{'devname': self._prefixed_psname}) + if self._psname.dev == 'Spect': + self.intlk_led = LISpectIntlkLed(self) + else: + ch2vals = {self._prefixed_psname+':StatusIntlk-Mon': { + 'value': _PS_LI_INTLK, 'comp': 'lt'}} + self.intlk_led = PyDMLedMultiChannel(self, channels2values=ch2vals) + + layout = QGridLayout() + layout.setAlignment(Qt.AlignCenter) + layout.setContentsMargins(6, 6, 3, 3) + layout.addWidget(self.intlk_bt, 0, 0) + layout.addWidget(QLabel('Intlk', self, alignment=Qt.AlignCenter), 0, 1) + layout.addWidget(self.intlk_led, 0, 2) + return layout + + def _paramsLayout(self): + temp_label = QLabel('Temperature', self) + self.temp_mon_label = SiriusLabel( + self, self._prefixed_psname + ':Temperature-Mon') + + loadv_label = QLabel('Load Voltage', self) + self.loadv_mon_label = SiriusLabel( + self, self._prefixed_psname + ':LoadVoltage-Mon') + + busv_label = QLabel('Bus Voltage', self) + self.busv_mon_label = SiriusLabel( + self, self._prefixed_psname + ':BusVoltage-Mon') + + layout = QGridLayout() + layout.addWidget(temp_label, 0, 0, Qt.AlignRight) + layout.addWidget(self.temp_mon_label, 0, 1) + layout.addWidget(loadv_label, 1, 0, Qt.AlignRight) + layout.addWidget(self.loadv_mon_label, 1, 1) + layout.addWidget(busv_label, 2, 0, Qt.AlignRight) + layout.addWidget(self.busv_mon_label, 2, 1) + return layout
+ + + +
+[docs] +class DCLinkDetailWidget(PSDetailWidget): + + def _setup_ui(self): + # Group boxes that compose the widget + self.frmwr_box = QGroupBox('Firmware && IOC') + self.frmwr_box.setObjectName("Firmware") + self.interlock_box = QGroupBox('Interlock') + self.interlock_box.setObjectName('interlock') + self.pwrstate_box = QGroupBox('PwrState') + self.pwrstate_box.setObjectName('power_state') + self.opmode_box = QGroupBox('OpMode') + self.opmode_box.setObjectName('operation_mode') + self.ctrlloop_box = QGroupBox('Control Loop') + self.ctrlloop_box.setObjectName('ctrlloop_box') + self.params_box = QGroupBox('General Params') + self.params_box.setObjectName('genparams_box') + self.analog_box = QGroupBox(self._analog_varname) + self.analog_box.setObjectName('current') + self.aux_box = QGroupBox('DCLink Auxiliar Params') + self.aux_box.setObjectName('aux_box') + + # Set group boxes layouts + self.frmwr_box.setLayout(self._frmwrLayout()) + self.interlock_box.setLayout(self._interlockLayout()) + self.pwrstate_box.setLayout(self._powerStateLayout()) + self.opmode_box.setLayout(self._opModeLayout()) + self.ctrlloop_box.setLayout(self._ctrlLoopLayout()) + self.params_box.setLayout(self._genParamsLayout()) + self.analog_box.setLayout(self._analogLayout()) + self.aux_box.setLayout(self._auxLayout()) + + # Add group boxes to laytout + self.layout = self._setWidgetLayout() + + # Set widget layout + self.setLayout(self.layout) + + def _setWidgetLayout(self): + controls = QGridLayout() + controls.addWidget(self.frmwr_box, 0, 0, 1, 2) + controls.addWidget(self.opmode_box, 1, 0) + controls.addWidget(self.pwrstate_box, 1, 1) + controls.addWidget(self.ctrlloop_box, 2, 0) + controls.addWidget(self.interlock_box, 2, 1) + controls.addWidget(self.params_box, 3, 0, 1, 2) + + analogs = QVBoxLayout() + analogs.addWidget(self.analog_box) + analogs.addWidget(self.aux_box) + + boxes_layout = QHBoxLayout() + boxes_layout.addLayout(controls) + boxes_layout.addLayout(analogs) + + layout = QVBoxLayout() + layout.addWidget(QLabel("<h2>" + self._psname + "</h2>")) + layout.addLayout(boxes_layout) + return layout + + def _analogLayout(self): + raise NotImplementedError + + def _auxLayout(self): + raise NotImplementedError + + def _opModeLayout(self): + self.opmode_rb = SiriusLabel( + self, self._prefixed_psname + ":OpMode-Sts") + self.opmode_rb.setObjectName("opmode1_rb_label") + self.ctrlmode_led = SiriusLedAlert( + self, self._prefixed_psname + ":CtrlMode-Mon") + self.ctrlmode_label = SiriusLabel( + self, self._prefixed_psname + ":CtrlMode-Mon") + self.ctrlmode_label.setObjectName("ctrlmode1_label") + + ctrlmode_layout = QHBoxLayout() + ctrlmode_layout.addWidget(self.ctrlmode_led) + ctrlmode_layout.addWidget(self.ctrlmode_label) + + layout = QGridLayout() + layout.setAlignment(Qt.AlignCenter) + layout.addWidget(self.opmode_rb, 0, 0, Qt.AlignHCenter) + layout.addLayout(ctrlmode_layout, 1, 0, Qt.AlignHCenter) + return layout
+ + + +
+[docs] +class FBPDCLinkDetailWidget(DCLinkDetailWidget): + + def __init__(self, psname, parent=None): + self._analog_varname = 'Current' + super().__init__(psname, parent) + + def _analogLayout(self): + self.current_sp_label = QLabel("Setpoint") + self.current_rb_label = QLabel("Readback") + self.current_ref_label = QLabel("Ref Mon") + self.current_mon_label = QLabel("Mon") + + self.current_sp_widget = PyDMSpinboxScrollbar( + self, self._prefixed_psname + ":Voltage-SP") + self.current_rb_val = SiriusLabel( + self, self._prefixed_psname+":Voltage-RB", keep_unit=True) + self.current_rb_val.showUnits = True + self.current_rb_val.precFromPV = True + self.current_ref_val = SiriusLabel( + self, self._prefixed_psname+":VoltageRef-Mon", keep_unit=True) + self.current_ref_val.showUnits = True + self.current_ref_val.precFromPV = True + self.current_mon_val = SiriusLabel( + self, self._prefixed_psname+":Voltage-Mon", keep_unit=True) + self.current_mon_val.showUnits = True + self.current_mon_val.precFromPV = True + + layout = QGridLayout() + layout.setAlignment(Qt.AlignTop) + layout.addWidget(self.current_sp_label, 0, 0, Qt.AlignRight) + layout.addWidget(self.current_sp_widget, 0, 1) + layout.addWidget(self.current_rb_label, 1, 0, Qt.AlignRight) + layout.addWidget(self.current_rb_val, 1, 1) + layout.addWidget(self.current_ref_label, 2, 0, Qt.AlignRight) + layout.addWidget(self.current_ref_val, 2, 1) + layout.addWidget(self.current_mon_label, 3, 0, Qt.AlignRight) + layout.addWidget(self.current_mon_val, 3, 1) + layout.setColumnStretch(2, 1) + return layout + + def _auxLayout(self): + layout = QFormLayout() + for auxmeas in self._auxmeasures: + text = auxmeas.split('-')[0] + label = SiriusLabel( + self, self._prefixed_psname + ':' + auxmeas) + label.showUnits = True + layout.addRow(text, label) + + pbprm = QPushButton(qta.icon('mdi.open-in-new'), + 'Parameters', self) + util.connect_window( + pbprm, PSParamsWidget, self, psname=self._psname, + params=self._params) + layout.addRow(pbprm) + return layout
+ + + +
+[docs] +class FACDCLinkDetailWidget(DCLinkDetailWidget): + + def __init__(self, psname, parent=None): + self._analog_varname = 'Capacitor Bank Voltage' + super().__init__(psname, parent) + + def _analogLayout(self): + self.cap_bank_sp_label = QLabel("Setpoint") + self.cap_bank_rb_label = QLabel("Readback") + self.cap_bank_ref_label = QLabel("Ref Mon") + self.cap_bank_mon_label = QLabel("Mon") + + self.cap_bank_sp_widget = PyDMSpinboxScrollbar( + self, self._prefixed_psname + ":CapacitorBankVoltage-SP") + self.cap_bank_rb_val = SiriusLabel( + self, self._prefixed_psname + ":CapacitorBankVoltage-RB", + keep_unit=True) + self.cap_bank_rb_val.showUnits = True + self.cap_bank_ref_val = SiriusLabel( + self, self._prefixed_psname + ":CapacitorBankVoltageRef-Mon", + keep_unit=True) + self.cap_bank_ref_val.showUnits = True + self.cap_bank_mon_val = SiriusLabel( + self, self._prefixed_psname + ":CapacitorBankVoltage-Mon", + keep_unit=True) + self.cap_bank_mon_val.showUnits = True + + layout = QGridLayout() + layout.setAlignment(Qt.AlignTop) + layout.addWidget(self.cap_bank_sp_label, 0, 0, Qt.AlignRight) + layout.addWidget(self.cap_bank_sp_widget, 0, 1) + layout.addWidget(self.cap_bank_rb_label, 1, 0, Qt.AlignRight) + layout.addWidget(self.cap_bank_rb_val, 1, 1) + layout.addWidget(self.cap_bank_ref_label, 2, 0, Qt.AlignRight) + layout.addWidget(self.cap_bank_ref_val, 2, 1) + layout.addWidget(self.cap_bank_mon_label, 3, 0, Qt.AlignRight) + layout.addWidget(self.cap_bank_mon_val, 3, 1) + layout.setColumnStretch(2, 1) + return layout + + def _auxLayout(self): + layout = QFormLayout() + + for auxmeas in self._auxmeasures: + pydmlbl = SiriusLabel( + self, self._prefixed_psname + ':' + auxmeas) + layout.addRow(auxmeas.split('-')[0], pydmlbl) + + pbaux = QPushButton( + qta.icon('mdi.open-in-new'), 'Aux. Measures', self) + util.connect_window( + pbaux, PSAuxMeasWidget, self, psname=self._psname, + auxmeas=list(), mod2dbase=self._mod2db, + auxdev=self._auxdev, auxdev2mod=self._auxdev2mod) + layout.addRow(pbaux) + + pbprm = QPushButton(qta.icon('mdi.open-in-new'), + 'Parameters', self) + util.connect_window( + pbprm, PSParamsWidget, self, psname=self._psname, + params=self._params) + layout.addRow(pbprm) + + return layout
+ + + +
+[docs] +class FastCorrPSDetailWidget(_BaseDetailWidget): + def __init__(self, psname, parent=None): + """Class constructor.""" + super(FastCorrPSDetailWidget, self).__init__(psname, parent=parent) + self._psmodel = 'FOFB_PS' + self._pstype = 'si-corrector-fc1-ch' + self._db = get_ps_propty_database(self._psmodel, self._pstype) + self._setup_ui() + + def _setup_ui(self): + # Group boxes that compose the widget + self.opmode_box = QGroupBox('OpMode') + self.opmode_box.setObjectName('operation_mode') + self.pwrstate_box = QGroupBox('PwrState') + self.pwrstate_box.setObjectName('power_state') + self.interlock_box = QGroupBox('Interlock') + self.interlock_box.setObjectName('interlock') + self.analogtab = QTabWidget() + self.analogtab.setObjectName(self._psname.sec+'Tab') + self.current_box = QWidget() + self.current_box.setObjectName('current') + self.analogtab.addTab(self.current_box, 'Current [A]') + self.current_raw_box = QWidget() + self.current_raw_box.setObjectName('current') + self.analogtab.addTab(self.current_raw_box, 'Curr.[Raw]') + self.voltage_box = QWidget() + self.voltage_box.setObjectName('voltage') + self.analogtab.addTab(self.voltage_box, 'Volt.[V]') + self.voltage_raw_box = QWidget() + self.voltage_raw_box.setObjectName('voltage') + self.analogtab.addTab(self.voltage_raw_box, 'Volt.[Raw]') + if self._metric: + self.metric_box = QGroupBox(self._metric) + self.metric_box.setObjectName('metric') + self.paramstab = QTabWidget() + self.paramstab.setObjectName(self._psname.sec+'Tab') + self.currloop_box = QWidget() + self.currloop_box.setObjectName('currloop_box') + self.paramstab.addTab(self.currloop_box, 'Current Loop Controls') + self.fofbctrl_box = QWidget() + self.fofbctrl_box.setObjectName('fofbctrl_box') + self.paramstab.addTab(self.fofbctrl_box, 'FOFB Parameters') + + # Set group boxes layouts + self.opmode_box.setLayout(self._opModeLayout()) + self.pwrstate_box.setLayout(self._powerStateLayout()) + self.interlock_box.setLayout(self._interlockLayout()) + self.current_box.setLayout(self._currentLayout(prec=6)) + self.current_raw_box.setLayout(self._currentRawLayout()) + self.voltage_box.setLayout(self._voltageLayout()) + self.voltage_raw_box.setLayout(self._voltageRawLayout()) + if self._metric: + self.metric_box.setLayout(self._metricLayout()) + self.currloop_box.setLayout(self._currLoopLayout()) + self.fofbctrl_box.setLayout(self._fofbctrlLayout()) + + self.setStyleSheet( + '#'+self._psname.sec+'Tab::pane {' + ' border-left: 2px solid gray;' + ' border-bottom: 2px solid gray;' + ' border-right: 2px solid gray;}') + + # Add group boxes to laytout + self.layout = self._setWidgetLayout() + + # Set widget layout + self.setLayout(self.layout) + + def _setWidgetLayout(self): + lay1 = QGridLayout() + lay1.setContentsMargins(0, 0, 0, 0) + lay1.addWidget(self.opmode_box, 0, 0) + lay1.addWidget(self.pwrstate_box, 0, 1) + lay1.addWidget(self.interlock_box, 1, 0, 1, 2) + + lay2 = QVBoxLayout() + lay2.setContentsMargins(0, 0, 0, 0) + lay2.addWidget(self.analogtab) + if self._metric: + lay2.addWidget(self.metric_box) + + boxes_layout = QGridLayout() + boxes_layout.addLayout(lay1, 0, 0) + boxes_layout.addLayout(lay2, 0, 1) + boxes_layout.addWidget(self.paramstab, 2, 0, 1, 2) + + layout = QVBoxLayout() + layout.addWidget(QLabel("<h2>" + self._psname + "</h2>", self)) + layout.addLayout(boxes_layout) + return layout + + def _opModeLayout(self): + self.opmode_sp = PyDMEnumComboBox( + self, self._prefixed_psname + ":OpMode-Sel") + self.opmode_sp.setObjectName("opmode_sp_cbox") + self.opmode_rb = SiriusLabel( + self, self._prefixed_psname + ":OpMode-Sts") + self.opmode_rb.setObjectName("opmode_rb_label") + + layout = QGridLayout() + layout.setAlignment(Qt.AlignCenter) + layout.addWidget(self.opmode_sp, 0, 0, Qt.AlignHCenter) + layout.addWidget(self.opmode_rb, 1, 0, Qt.AlignHCenter) + return layout + + def _currentRawLayout(self): + current_sp_label = QLabel("Setpoint") + current_rb_label = QLabel("Readback") + current_ref_label = QLabel("Ref Mon") + current_mon_label = QLabel("Mon") + + self.current_raw_sp = PyDMSpinboxScrollbar( + self, self._prefixed_psname + ":CurrentRaw-SP") + self.current_raw_rb = SiriusLabel( + self, self._prefixed_psname+":CurrentRaw-RB") + self.current_raw_ref = SiriusLabel( + self, self._prefixed_psname+":CurrentRawRef-Mon") + self.current_raw_mon = SiriusLabel( + self, self._prefixed_psname+":CurrentRaw-Mon") + + layout = QGridLayout() + layout.setAlignment(Qt.AlignTop) + layout.addWidget(current_sp_label, 0, 0, Qt.AlignRight) + layout.addWidget(self.current_raw_sp, 0, 1) + layout.addWidget(current_rb_label, 1, 0, Qt.AlignRight) + layout.addWidget(self.current_raw_rb, 1, 1) + layout.addWidget(current_ref_label, 2, 0, Qt.AlignRight) + layout.addWidget(self.current_raw_ref, 2, 1) + layout.addWidget(current_mon_label, 3, 0, Qt.AlignRight) + layout.addWidget(self.current_raw_mon, 3, 1) + layout.setColumnStretch(2, 1) + return layout + + def _voltageLayout(self): + voltage_sp_label = QLabel("Setpoint") + voltage_rb_label = QLabel("Readback") + voltage_mn_label = QLabel("Mon") + + self.voltage_sp = PyDMLinEditScrollbar( + self, self._prefixed_psname + ":Voltage-SP") + self.voltage_sp.lineedit.precisionFromPV = False + self.voltage_sp.lineedit.precision = 6 + self.voltage_rb = SiriusLabel( + self, self._prefixed_psname+":Voltage-RB", keep_unit=True) + self.voltage_rb.precisionFromPV = False + self.voltage_rb.precision = 6 + self.voltage_rb.showUnits = True + self.voltage_mn = SiriusLabel( + self, self._prefixed_psname+":Voltage-Mon", keep_unit=True) + self.voltage_mn.precisionFromPV = False + self.voltage_mn.precision = 6 + self.voltage_mn.showUnits = True + + layout = QGridLayout() + layout.setAlignment(Qt.AlignTop) + layout.addWidget(voltage_sp_label, 0, 0, Qt.AlignRight) + layout.addWidget(self.voltage_sp, 0, 1) + layout.addWidget(voltage_rb_label, 1, 0, Qt.AlignRight) + layout.addWidget(self.voltage_rb, 1, 1) + layout.addWidget(voltage_mn_label, 2, 0, Qt.AlignRight) + layout.addWidget(self.voltage_mn, 2, 1) + layout.setColumnStretch(2, 1) + return layout + + def _voltageRawLayout(self): + voltage_sp_label = QLabel("Setpoint") + voltage_rb_label = QLabel("Readback") + voltage_mn_label = QLabel("Mon") + + self.voltage_raw_sp = PyDMLinEditScrollbar( + self, self._prefixed_psname + ":VoltageRaw-SP") + self.voltage_raw_rb = SiriusLabel( + self, self._prefixed_psname+":VoltageRaw-RB", keep_unit=True) + self.voltage_rb.showUnits = True + self.voltage_raw_mn = SiriusLabel( + self, self._prefixed_psname+":VoltageRaw-Mon", keep_unit=True) + self.voltage_raw_mn.showUnits = True + + layout = QGridLayout() + layout.setAlignment(Qt.AlignTop) + layout.addWidget(voltage_sp_label, 0, 0, Qt.AlignRight) + layout.addWidget(self.voltage_raw_sp, 0, 1) + layout.addWidget(voltage_rb_label, 1, 0, Qt.AlignRight) + layout.addWidget(self.voltage_raw_rb, 1, 1) + layout.addWidget(voltage_mn_label, 2, 0, Qt.AlignRight) + layout.addWidget(self.voltage_raw_mn, 2, 1) + layout.setColumnStretch(2, 1) + return layout + + def _interlockLayout(self): + layout = QGridLayout() + layout.setAlignment(Qt.AlignCenter) + + row = 0 + for pvn in ['AlarmsAmp', 'AlarmsAmpLtc']: + alarm_label = QLabel(pvn, self, alignment=Qt.AlignCenter) + alarm_bt = QPushButton(qta.icon('fa5s.list-ul'), '', self) + alarm_bt.setObjectName('alarm_bt') + alarm_bt.setStyleSheet( + '#alarm_bt{min-width:25px; max-width:25px; icon-size:20px;}') + + util.connect_window( + alarm_bt, InterlockWindow, self, + devname=self._psname, database=self._db, interlock=pvn) + alarm_led = SiriusLedAlert( + parent=self, init_channel=self._prefixed_psname+':'+pvn+'-Mon') + alarm_led.onColor = alarm_led.Yellow + + layout.addWidget(alarm_bt, row, 0) + layout.addWidget(alarm_label, row, 1) + layout.addWidget(alarm_led, row, 2) + row += 1 + + self.reset_bt = PyDMPushButton( + parent=self, icon=qta.icon('fa5s.sync'), pressValue=1, + init_channel=self._prefixed_psname + ":AlarmsAmpLtcRst-Cmd") + self.reset_bt.setObjectName('reset_bt') + self.reset_bt.setStyleSheet( + '#reset_bt{min-width:25px; max-width:25px; icon-size:20px;}') + layout.addWidget(self.reset_bt, row, 2) + + return layout + + def _currLoopLayout(self): + # controls + tabctrl = QTabWidget() + tabctrl.setObjectName(self._psname.sec+'Tab') + + # # loop parameters + ctlmode_lb = QLabel( + 'CurrLoopMode', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.ctlmode_cb = PyDMEnumComboBox( + self, self._prefixed_psname + ':CurrLoopMode-Sel') + self.ctlmode_lb = SiriusLabel( + self, self._prefixed_psname + ':CurrLoopMode-Sts') + + ctlkp_lb = QLabel( + 'CurrLoopKp', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.ctlkp_sp = SiriusSpinbox( + self, self._prefixed_psname + ':CurrLoopKp-SP') + self.ctlkp_sp.limitsFromChannel = False + self.ctlkp_sp.setMinimum(0.0) + self.ctlkp_sp.setMaximum(2**31 - 1) + self.ctlkp_rb = SiriusLabel( + self, self._prefixed_psname + ':CurrLoopKp-RB') + + ctlti_lb = QLabel( + 'CurrLoopKi', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.ctlti_sp = SiriusSpinbox( + self, self._prefixed_psname + ':CurrLoopKi-SP') + self.ctlti_sp.limitsFromChannel = False + self.ctlti_sp.setMinimum(0.0) + self.ctlti_sp.setMaximum(2**31 - 1) + self.ctlti_rb = SiriusLabel( + self, self._prefixed_psname + ':CurrLoopKi-RB') + + cgain_lb = QLabel( + 'CurrGain', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.cgain_sp = SiriusSpinbox( + self, self._prefixed_psname + ':CurrGain-SP') + self.cgain_sp.precisionFromPV = False + self.cgain_sp.precision = 8 + self.cgain_sp.limitsFromChannel = False + self.cgain_sp.setMinimum(-1) + self.cgain_sp.setMaximum(+1) + self.cgain_rb = SiriusLabel( + self, self._prefixed_psname + ':CurrGain-RB') + self.cgain_rb.precisionFromPV = False + self.cgain_rb.precision = 8 + + coffs_lb = QLabel( + 'CurrOffset', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.coffs_sp = SiriusSpinbox( + self, self._prefixed_psname + ':CurrOffset-SP') + self.coffs_sp.limitsFromChannel = False + self.coffs_sp.setMinimum(-100) + self.coffs_sp.setMaximum(+100) + self.coffs_rb = SiriusLabel( + self, self._prefixed_psname + ':CurrOffset-RB') + + vgain_lb = QLabel( + 'VoltGain', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.vgain_sp = SiriusSpinbox( + self, self._prefixed_psname + ':VoltGain-SP') + self.vgain_sp.precisionFromPV = False + self.vgain_sp.precision = 8 + self.vgain_sp.limitsFromChannel = False + self.vgain_sp.setMinimum(-1) + self.vgain_sp.setMaximum(+1) + self.vgain_rb = SiriusLabel( + self, self._prefixed_psname + ':VoltGain-RB') + self.vgain_rb.precisionFromPV = False + self.vgain_rb.precision = 8 + + voffs_lb = QLabel( + 'VoltOffset', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.voffs_sp = SiriusSpinbox( + self, self._prefixed_psname + ':VoltOffset-SP') + self.voffs_sp.limitsFromChannel = False + self.voffs_sp.setMinimum(-100) + self.voffs_sp.setMaximum(+100) + self.voffs_rb = SiriusLabel( + self, self._prefixed_psname + ':VoltOffset-RB') + + widgetparms = QWidget() + lay = QGridLayout(widgetparms) + lay.setAlignment(Qt.AlignTop) + lay.addWidget(ctlmode_lb, 0, 0, Qt.AlignRight) + lay.addWidget(self.ctlmode_cb, 0, 1) + lay.addWidget(self.ctlmode_lb, 0, 2) + lay.addWidget(ctlkp_lb, 1, 0, Qt.AlignRight) + lay.addWidget(self.ctlkp_sp, 1, 1) + lay.addWidget(self.ctlkp_rb, 1, 2) + lay.addWidget(ctlti_lb, 2, 0, Qt.AlignRight) + lay.addWidget(self.ctlti_sp, 2, 1) + lay.addWidget(self.ctlti_rb, 2, 2) + lay.addWidget(cgain_lb, 3, 0, Qt.AlignRight) + lay.addWidget(self.cgain_sp, 3, 1) + lay.addWidget(self.cgain_rb, 3, 2) + lay.addWidget(coffs_lb, 4, 0, Qt.AlignRight) + lay.addWidget(self.coffs_sp, 4, 1) + lay.addWidget(self.coffs_rb, 4, 2) + lay.addWidget(vgain_lb, 5, 0, Qt.AlignRight) + lay.addWidget(self.vgain_sp, 5, 1) + lay.addWidget(self.vgain_rb, 5, 2) + lay.addWidget(voffs_lb, 6, 0, Qt.AlignRight) + lay.addWidget(self.voffs_sp, 6, 1) + lay.addWidget(self.voffs_rb, 6, 2) + tabctrl.addTab(widgetparms, 'Parameters') + + # # tests + testlima_lb = QLabel( + 'Limit A', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.testlima_sp = SiriusSpinbox( + self, self._prefixed_psname + ':TestLimA-SP') + self.testlima_rb = SiriusLabel( + self, self._prefixed_psname + ':TestLimA-RB') + + testlimb_lb = QLabel( + 'Limit B', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.testlimb_sp = SiriusSpinbox( + self, self._prefixed_psname + ':TestLimB-SP') + self.testlimb_rb = SiriusLabel( + self, self._prefixed_psname + ':TestLimB-RB') + + testwaveper_lb = QLabel( + 'Wave Period', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.testwaveper_sp = SiriusSpinbox( + self, self._prefixed_psname + ':TestWavePeriod-SP') + self.testwaveper_rb = SiriusLabel( + self, self._prefixed_psname + ':TestWavePeriod-RB') + + widgettest = QWidget() + lay = QGridLayout(widgettest) + lay.setAlignment(Qt.AlignTop) + lay.addWidget(testlima_lb, 0, 0, Qt.AlignRight) + lay.addWidget(self.testlima_sp, 0, 1) + lay.addWidget(self.testlima_rb, 0, 2) + lay.addWidget(testlimb_lb, 1, 0, Qt.AlignRight) + lay.addWidget(self.testlimb_sp, 1, 1) + lay.addWidget(self.testlimb_rb, 1, 2) + lay.addWidget(testwaveper_lb, 2, 0, Qt.AlignRight) + lay.addWidget(self.testwaveper_sp, 2, 1) + lay.addWidget(self.testwaveper_rb, 2, 2) + tabctrl.addTab(widgettest, 'Tests') + + # monitoring + tabmon = QTabWidget(self) + tabmon.setObjectName(self._psname.sec+'Tab') + + # # current waveform + self.graph_curr = SiriusWaveformPlot() + self.graph_curr.addChannel( + y_channel=self._prefixed_psname + ':LAMPCurrentData', + name='Current', color='blue', lineWidth=1) + self.graph_curr.addChannel( + y_channel=self._prefixed_psname + ':LAMPCurrentRefData', + name='CurrentRef', color='green', lineWidth=1) + # self.graph_curr.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum) + self.graph_curr.autoRangeX = True + self.graph_curr.autoRangeY = True + self.graph_curr.showXGrid = True + self.graph_curr.showYGrid = True + self.graph_curr.title = 'Current' + self.graph_curr.setLabel('left', text='Current [A]', color='gray') + self.graph_curr.setLabel('bottom', text='Index') + self.graph_curr.setBackgroundColor(QColor(255, 255, 255)) + tabmon.addTab(self.graph_curr, 'Current Acq.') + + # # voltage waveform + self.graph_volt = SiriusWaveformPlot() + self.graph_volt.addChannel( + y_channel=self._prefixed_psname + ':LAMPVoltageData', + name='Voltage', color='blue', lineWidth=1) + # self.graph_volt.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum) + self.graph_volt.autoRangeX = True + self.graph_volt.autoRangeY = True + self.graph_volt.showXGrid = True + self.graph_volt.showYGrid = True + self.graph_volt.title = 'Voltage' + self.graph_volt.setLabel('left', text='Voltage [V]', color='gray') + self.graph_volt.setLabel('bottom', text='Index') + self.graph_volt.setBackgroundColor(QColor(255, 255, 255)) + tabmon.addTab(self.graph_volt, 'Voltage Acq.') + + # # current history + self.graph_chist = SiriusTimePlot() + timespan = 5*60 # 5min + self.graph_chist.timeSpan = timespan # [s] + self.graph_chist.bufferSize = 5*timespan # [max 5 samples/s] + pvsuf2color = { + '-SP': 'red', + '-RB': 'blue', + 'Ref-Mon': 'green', + '-Mon': 'black', + } + hbox_show = QHBoxLayout() + hbox_show.setSpacing(9) + for pvs, color in pvsuf2color.items(): + pvname = self._prefixed_psname.substitute(propty='Current'+pvs) + legtxt = pvs.replace('-', '') + self.graph_chist.addYChannel( + y_channel=pvname, name=legtxt, color=color, lineWidth=1) + curve = self.graph_chist.curveAtIndex(-1) + cb_show = QCheckBox(legtxt) + cb_show.setChecked(True) + cb_show.setStyleSheet('color: '+color+';') + cb_show.stateChanged.connect(curve.setVisible) + hbox_show.addWidget(cb_show) + self.graph_chist.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum) + self.graph_chist.autoRangeX = True + self.graph_chist.autoRangeY = True + self.graph_chist.showXGrid = True + self.graph_chist.showYGrid = True + self.graph_chist.timeSpan = 30 # [s] + self.graph_chist.title = 'Current Mean History' + self.graph_chist.setLabel('left', text='Current [A]', color='gray') + self.graph_chist.showLegend = True + self.graph_chist.setBackgroundColor(QColor(255, 255, 255)) + wid_currhist = QWidget() + lay_currhist = QVBoxLayout(wid_currhist) + lay_currhist.setContentsMargins(0, 0, 0, 0) + lay_currhist.addWidget(self.graph_chist) + lay_currhist.addLayout(hbox_show) + tabmon.addTab(wid_currhist, 'Current Hist.') + tabmon.setCurrentIndex(2) + + layout = QHBoxLayout() + layout.addWidget(tabctrl) + layout.addWidget(tabmon) + return layout + + def _fofbctrlLayout(self): + # controls + fofbacc_lb = QLabel( + 'Accumulator', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.fofbacc_mon = SiriusLabel( + self, self._prefixed_psname + ':FOFBAcc-Mon') + self.fofbacc_mon.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + + fofbaccgain_lb = QLabel( + 'Acc. Gain', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.fofbaccgain_sp = PyDMLineEdit( + self, self._prefixed_psname + ':FOFBAccGain-SP') + self.fofbaccgain_sp.precisionFromPV = False + self.fofbaccgain_sp.precision = 8 + self.fofbaccgain_rb = SiriusLabel( + self, self._prefixed_psname + ':FOFBAccGain-RB') + self.fofbaccgain_rb.precisionFromPV = False + self.fofbaccgain_rb.precision = 8 + + fofbaccfreeze_lb = QLabel( + 'Acc. Freeze', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.fofbaccfreeze_sp = PyDMEnumComboBox( + self, self._prefixed_psname + ':FOFBAccFreeze-Sel') + self.fofbaccfreeze_rb = SiriusLabel( + self, self._prefixed_psname + ':FOFBAccFreeze-Sts') + + fofbaccclear_lb = QLabel( + 'Acc. Clear', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.fofbaccclear_bt = PyDMPushButton( + parent=self, icon=qta.icon('mdi.sync'), pressValue=1, + init_channel=self._prefixed_psname + ":FOFBAccClear-Cmd") + self.fofbaccclear_bt.setObjectName('accclear_bt') + self.fofbaccclear_bt.setStyleSheet( + '#accclear_bt{min-width:25px; max-width:25px; icon-size:20px;}') + + fofbaccmaxsat_lb = QLabel( + 'Max. Sat. Current', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + self.fofbaccmaxsat_sp = SiriusSpinbox( + self, self._prefixed_psname + ':FOFBAccSatMax-SP') + self.fofbaccmaxsat_sp.precisionFromPV = False + self.fofbaccmaxsat_sp.precision = 8 + self.fofbaccmaxsat_rb = SiriusLabel( + self, self._prefixed_psname + ':FOFBAccSatMax-RB') + self.fofbaccmaxsat_rb.precisionFromPV = False + self.fofbaccmaxsat_rb.precision = 8 + + fofbaccminsat_lb = QLabel( + 'Min. Sat. Current', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + self.fofbaccminsat_sp = SiriusSpinbox( + self, self._prefixed_psname + ':FOFBAccSatMin-SP') + self.fofbaccminsat_sp.precisionFromPV = False + self.fofbaccminsat_sp.precision = 8 + self.fofbaccminsat_rb = SiriusLabel( + self, self._prefixed_psname + ':FOFBAccSatMin-RB') + self.fofbaccminsat_rb.precisionFromPV = False + self.fofbaccminsat_rb.precision = 8 + + fofbaccfiltgain_lb = QLabel( + 'Filter Gain', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + self.fofbaccfiltgain_sp = PyDMLineEdit( + self, self._prefixed_psname + ':FOFBAccFilterGain-SP') + self.fofbaccfiltgain_rb = SiriusLabel( + self, self._prefixed_psname + ':FOFBAccFilterGain-RB') + + widctrl = QWidget() + lay = QGridLayout(widctrl) + lay.addWidget(fofbacc_lb, 0, 0, Qt.AlignRight) + lay.addWidget(self.fofbacc_mon, 0, 1) + lay.addWidget(fofbaccgain_lb, 1, 0, Qt.AlignRight) + lay.addWidget(self.fofbaccgain_sp, 1, 1) + lay.addWidget(self.fofbaccgain_rb, 1, 2) + lay.addWidget(fofbaccfreeze_lb, 2, 0, Qt.AlignRight) + lay.addWidget(self.fofbaccfreeze_sp, 2, 1) + lay.addWidget(self.fofbaccfreeze_rb, 2, 2) + lay.addWidget(fofbaccclear_lb, 3, 0, Qt.AlignRight) + lay.addWidget(self.fofbaccclear_bt, 3, 1) + lay.addWidget(fofbaccmaxsat_lb, 4, 0, Qt.AlignRight) + lay.addWidget(self.fofbaccmaxsat_sp, 4, 1) + lay.addWidget(self.fofbaccmaxsat_rb, 4, 2) + lay.addWidget(fofbaccminsat_lb, 5, 0, Qt.AlignRight) + lay.addWidget(self.fofbaccminsat_sp, 5, 1) + lay.addWidget(self.fofbaccminsat_rb, 5, 2) + lay.addWidget(fofbaccfiltgain_lb, 6, 0, Qt.AlignRight) + lay.addWidget(self.fofbaccfiltgain_sp, 6, 1) + lay.addWidget(self.fofbaccfiltgain_rb, 6, 2) + + # coefficients + gph_fofbcoeffs = dict() + for plane in ['X', 'Y']: + colorsp = 'darkBlue' if plane == 'X' else 'darkRed' + colorrb = 'blue' if plane == 'X' else 'red' + gph_fofbcoeffs[plane] = SiriusWaveformPlot() + gph_fofbcoeffs[plane].setSizePolicy( + QSzPlcy.Maximum, QSzPlcy.Maximum) + gph_fofbcoeffs[plane].showLegend = True + gph_fofbcoeffs[plane].autoRangeX = True + gph_fofbcoeffs[plane].autoRangeY = True + gph_fofbcoeffs[plane].showXGrid = True + gph_fofbcoeffs[plane].showYGrid = True + gph_fofbcoeffs[plane].title = 'InvRespMatRow'+plane+' Coefficients' + gph_fofbcoeffs[plane].setBackgroundColor(QColor(255, 255, 255)) + gph_fofbcoeffs[plane].addChannel( + y_channel=self._prefixed_psname+':InvRespMatRow'+plane+'-SP', + name='SP', color=colorsp, lineWidth=2, symbol='o') + gph_fofbcoeffs[plane].addChannel( + y_channel=self._prefixed_psname+':InvRespMatRow'+plane+'-RB', + name='RB', color=colorrb, lineWidth=2, symbol='o') + + self.show_coeff_sp = QCheckBox('SP') + self.show_coeff_sp.setChecked(True) + self.show_coeff_rb = QCheckBox('RB') + self.show_coeff_rb.setChecked(True) + for plane in ['X', 'Y']: + self.show_coeff_sp.stateChanged.connect( + gph_fofbcoeffs[plane].curveAtIndex(0).setVisible) + self.show_coeff_rb.stateChanged.connect( + gph_fofbcoeffs[plane].curveAtIndex(1).setVisible) + hbox_coeffshow = QHBoxLayout() + hbox_coeffshow.setAlignment(Qt.AlignCenter) + hbox_coeffshow.addWidget(self.show_coeff_sp) + hbox_coeffshow.addWidget(self.show_coeff_rb) + + widcoeff = QWidget() + lay = QVBoxLayout(widcoeff) + lay.setAlignment(Qt.AlignTop) + for plane in ['X', 'Y']: + lay.addWidget(gph_fofbcoeffs[plane]) + lay.addLayout(hbox_coeffshow) + + # filters + gph_filt = SiriusWaveformPlot() + gph_filt.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum) + gph_filt.showLegend = True + gph_filt.autoRangeX = True + gph_filt.autoRangeY = True + gph_filt.showXGrid = True + gph_filt.showYGrid = True + gph_filt.title = 'Filter Coefficients' + gph_filt.setBackgroundColor(QColor(255, 255, 255)) + gph_filt.addChannel( + y_channel=self._prefixed_psname+':FOFBAccFilter-SP', + name='SP', color='darkBlue', lineWidth=2, symbol='o') + gph_filt.addChannel( + y_channel=self._prefixed_psname+':FOFBAccFilter-RB', + name='RB', color='blue', lineWidth=2, symbol='o') + + self.show_filt_sp = QCheckBox('SP') + self.show_filt_sp.setChecked(True) + self.show_filt_rb = QCheckBox('RB') + self.show_filt_rb.setChecked(True) + self.show_filt_sp.stateChanged.connect( + gph_filt.curveAtIndex(0).setVisible) + self.show_filt_rb.stateChanged.connect( + gph_filt.curveAtIndex(1).setVisible) + hbox_filtshow = QHBoxLayout() + hbox_filtshow.setAlignment(Qt.AlignCenter) + hbox_filtshow.addWidget(self.show_filt_sp) + hbox_filtshow.addWidget(self.show_filt_rb) + + widfilt = QWidget() + lay = QVBoxLayout(widfilt) + lay.setAlignment(Qt.AlignTop) + lay.addWidget(gph_filt) + lay.addLayout(hbox_filtshow) + + widmon = QTabWidget() + widmon.setObjectName(self._psname.sec+'Tab') + widmon.addTab(widcoeff, 'InvRespMat') + widmon.addTab(widfilt, 'Filter') + + layout = QHBoxLayout() + layout.addWidget(widctrl) + layout.addWidget(widmon) + return layout
+ + + +
+[docs] +class PSAuxMeasWidget(SiriusDialog): + """PS Modules Detail Widget.""" + + def __init__(self, parent, psname, auxmeas, mod2dbase, + auxdev, auxdev2mod): + """Init.""" + super().__init__(parent) + self._psname = [psname, ] + if auxdev: + self._psname = list() + for aux in auxdev: + self._psname.append(psname+aux) + self._prefixed_psname = SiriusPVName(psname).substitute( + prefix=VACA_PREFIX) + + self.auxmeas = auxmeas + self.mod2dbase = mod2dbase + self.auxdev2mod = auxdev2mod + + self.title_text = psname + ' - Auxiliary Measures' + self.setWindowTitle(self.title_text) + + self.setObjectName(parent.objectName()) + + self._setupUi() + self.setStyleSheet('SiriusLabel{qproperty-alignment: AlignCenter;}') + + def _setupUi(self): + text_psname = QLabel('<h3>' + self._psname[0] + '</h3>', self, + alignment=Qt.AlignCenter) + + pswid = None + if self.auxmeas: + title_main = QLabel('<h3>Main Measures</h3>', self, + alignment=Qt.AlignCenter) + pswid = self._setupPSWidget() + + if len(self.mod2dbase) > 1: + title_iib = QLabel('<h3>IIB Measures</h3>', self, + alignment=Qt.AlignCenter) + lay_mod = QGridLayout() + ncols = 4 if len(self.mod2dbase)*len(self._psname) > 4 else 2 + idx = 0 + for psn in self._psname: + for mod, dbase in self.mod2dbase.items(): + modwid = self._setupModWidget(psn, mod, dbase) + lay_mod.addWidget(modwid, idx//ncols, idx % ncols) + idx += 1 + + lay = QGridLayout(self) + lay.setHorizontalSpacing(20) + lay.setVerticalSpacing(20) + if pswid: + lay.addWidget(text_psname, 0, 0, 1, 2) + lay.addWidget(title_main, 1, 0) + lay.addWidget(pswid, 2, 0) + lay.addWidget(title_iib, 1, 1) + lay.addLayout(lay_mod, 2, 1) + else: + lay.addWidget(text_psname, 0, 0) + lay.addWidget(title_iib, 1, 0) + lay.addLayout(lay_mod, 2, 0) + else: + lay = QVBoxLayout(self) + lay.setSpacing(15) + lay.addWidget(text_psname) + + if pswid: + lay.addWidget(title_main) + lay.addWidget(pswid) + + dbase = self.mod2dbase['main'] + if dbase: + title_iib = QLabel('<h3>IIB Measures</h3>', self, + alignment=Qt.AlignCenter) + modwid = self._setupModWidget(self._psname[0], 'main', dbase) + lay.addWidget(title_iib) + lay.addWidget(modwid) + + def _setupPSWidget(self): + wid = QWidget() + if len(self.auxmeas) > 32: + lay = QHBoxLayout(wid) + lay.setSpacing(20) + + half1 = self.auxmeas[:20] + flay1 = QFormLayout() + flay1.setVerticalSpacing(9) + for pv in half1: + text = pv.split('-')[0] + lbl = SiriusLabel( + self, self._prefixed_psname.substitute(propty=pv), + keep_unit=True) + lbl.showUnits = True + flay1.addRow(text, lbl) + + half2 = self.auxmeas[20:] + flay2 = QFormLayout() + flay2.setVerticalSpacing(9) + for pv in half2: + text = pv.split('-')[0] + lbl = SiriusLabel( + self, self._prefixed_psname.substitute(propty=pv), + keep_unit=True) + lbl.showUnits = True + flay2.addRow(text, lbl) + + lay.addLayout(flay1) + lay.addLayout(flay2) + else: + flay = QFormLayout(wid) + for pv in self.auxmeas: + text = pv.split('-')[0] if 'SOFB' not in pv else pv + lbl = SiriusLabel( + self, self._prefixed_psname.substitute(propty=pv), + keep_unit=True) + lbl.showUnits = True + lbl.setObjectName('auxmeaslabel') + flay.addRow(text, lbl) + return wid + + def _setupModWidget(self, psname, mod, dbase): + wid = QWidget() + lay = QVBoxLayout(wid) + lay.setAlignment(Qt.AlignTop) + + modname = mod + if psname in self.auxdev2mod: + modname = self.auxdev2mod[psname][mod] + + if mod != 'main': + self.title = QLabel('<h3>Mod'+modname+'</h3>', self, + alignment=Qt.AlignCenter) + lay.addWidget(self.title) + + flay = QFormLayout() + for pv in dbase: + text = pv.split('Mod'+mod)[0].split('IIB')[0] + lbl = SiriusLabel(self, psname + ':' + pv, keep_unit=True) + lbl.showUnits = True + lbl.setObjectName('auxmeaslabel') + flay.addRow(text, lbl) + lay.addLayout(flay) + + return wid
+ + + +
+[docs] +class PSParamsWidget(SiriusDialog): + """PS Parameters Widget.""" + + def __init__(self, parent, psname, params): + """Init.""" + super().__init__(parent) + self._psname = SiriusPVName(psname) + self._prefix = VACA_PREFIX + self._prefixed_psname = self._psname.substitute(prefix=self._prefix) + + self.params = params + + self.title_text = psname + ' - Parameters' + self.setWindowTitle(self.title_text) + + self.setObjectName(parent.objectName()) + + self._setupUi() + self.setStyleSheet( + 'SiriusLabel{qproperty-alignment: AlignVCenter;}') + + def _setupUi(self): + lay = QVBoxLayout(self) + lay.setSpacing(15) + + text_psname = QLabel('<h3>' + self._psname + '</h3>', self, + alignment=Qt.AlignCenter) + lay.addWidget(text_psname) + + scr_area = QScrollArea(self) + scr_area.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded) + scr_area.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) + scr_area.setWidgetResizable(True) + scr_area.setFrameShape(QFrame.NoFrame) + scr_area_wid = QWidget() + scr_area_wid.setObjectName('scr_ar_wid') + scr_area_wid.setStyleSheet( + '#scr_ar_wid {background-color: transparent;}') + scr_area.setWidget(scr_area_wid) + flay = QFormLayout(scr_area_wid) + flay.setLabelAlignment(Qt.AlignRight | Qt.AlignVCenter) + + # Update + text = 'Update Command' + wid = PyDMPushButton( + parent=self, icon=qta.icon('fa5s.redo-alt'), pressValue=1, + init_channel=self._prefixed_psname + ":ParamUpdate-Cmd") + wid.setObjectName('updt_bt') + wid.setStyleSheet( + '#updt_bt{min-width:25px; max-width:25px; icon-size:20px;}') + flay.addRow(text, wid) + + # Params + for param in self.params: + pvname = self._prefixed_psname + ':' + param + text = param.split('-')[0].split('Param')[1] + if 'Intlk' in pvname or 'Analog' in pvname: + wid = self._create_table_wid(pvname) + text += ' [us]' + else: + wid = self._create_label_wid(pvname) + flay.addRow(text, wid) + lay.addWidget(scr_area) + + def _create_label_wid(self, pvname): + lbl = CustomLabel(self, keep_unit=True) + if 'PSName' in pvname: + lbl.displayFormat = SiriusLabel.DisplayFormat.String + elif 'PSModel' in pvname: + lbl.enum_strings = _PSet.MODELS + elif 'SigGenType' in pvname: + lbl.enum_strings = _PSet.CYCLE_TYPES + elif 'WfmRefSyncMode' in pvname: + lbl.enum_strings = _PSet.WFMREF_SYNCMODE + else: + lbl.showUnits = True + lbl.channel = pvname + return lbl + + def _create_table_wid(self, pvname): + table = SiriusWaveformTable(self, pvname) + table.showUnits = True + col_count = 32 if 'Intlk' in pvname else 64 + table.setColumnCount(col_count) + table.setObjectName('table') + table.setStyleSheet('#table{max-width:24em; max-height: 3em;}') + table.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + table.horizontalHeader().setStyleSheet( + "min-height:1em; max-height:1em;") + table.verticalHeader().setSectionResizeMode(QHeaderView.Stretch) + table.verticalHeader().setVisible(False) + table.setEditTriggers(QAbstractItemView.NoEditTriggers) + table.columnHeaderLabels = [str(i) for i in range(col_count)] + table.rowHeaderLabels = [] + return table
+ + + +
+[docs] +class CustomLabel(SiriusLabel): + +
+[docs] + def value_changed(self, new_value): + super().value_changed(new_value) + new_value = parse_value_for_display( + value=new_value, precision=self.precision, + display_format_type=self._display_format_type, + string_encoding=self._string_encoding, widget=self) + if isinstance(new_value, str): + if self._show_units and self._unit != "": + new_value = "{} {}".format(new_value, self._unit) + self.setText(new_value) + return + if self.enum_strings and isinstance(new_value, (int, float)): + try: + self.setText(self.enum_strings[int(new_value)]) + except IndexError: + self.setText(f'Index Overflow [{new_value}]') + return + if self.enum_strings and isinstance(new_value, _np.ndarray): + text = '['+', '.join([self.enum_strings[int(idx)] + if idx < len(self.enum_strings) else 'UNDEF' + for idx in new_value])+']' + self.setText(text) + return + if isinstance(new_value, (int, float)): + self.setText(self.format_string.format(new_value)) + return + self.setText(str(new_value))
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/detail_widget/custom_widgets.html b/_modules/siriushla/as_ps_control/detail_widget/custom_widgets.html new file mode 100644 index 000000000..0dca61f0a --- /dev/null +++ b/_modules/siriushla/as_ps_control/detail_widget/custom_widgets.html @@ -0,0 +1,249 @@ + + + + + + siriushla.as_ps_control.detail_widget.custom_widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.detail_widget.custom_widgets

+"""Custom widget."""
+
+from qtpy.QtCore import Signal
+
+from pydm.widgets.base import PyDMWidget
+
+from siriuspy.util import get_bit
+from siriuspy.namesys import SiriusPVName as PVName
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.pwrsupply.csdev import ETypes as _PSe, \
+    PS_LI_INTLK_THRS as _PS_LI_INTLK
+
+from siriushla.widgets import QLed, PyDMLed, SiriusConnectionSignal
+
+
+
+[docs] +class LISpectIntlkLed(QLed, PyDMWidget): + """Led to check LI Spect interlock status.""" + + filterlog = Signal(str) + warning = Signal(list) + normal = Signal(list) + + def __init__(self, parent=None, filters=None): + """Call super and set on/off colors.""" + QLed.__init__(self, parent) + PyDMWidget.__init__(self) + self.onColor = PyDMLed.Red + self.offColor = PyDMLed.LightGreen + + self.prefix = VACA_PREFIX + self.devname = PVName('LI-01:PS-Spect') + self.prefixed_name = self.devname.substitute(prefix=self.prefix) + self.filter = filters + + self.intlkstatus_ch = SiriusConnectionSignal( + self.prefixed_name.substitute(propty='StatusIntlk-Mon')) + self.intlkstatus_ch.connection_slot = self.connectionStateChanged + self.intlkwarn_ch = SiriusConnectionSignal( + self.prefixed_name.substitute(propty='IntlkWarn-Mon')) + self.intlkwarn_ch.connection_slot = self.connectionStateChanged + self.channel = self.intlkstatus_ch.address + + self.intlkwarn_bit = _PSe.LINAC_INTLCK_WARN.index('LoadI Over Thrs') + + self.intlkstatus_val = None + self.intlkwarn_val = None + self.intlkstatus_conn = None + self.intlkwarn_conn = None + + self.intlkstatus_ch.new_value_signal[int].connect( + self._update_values) + self.intlkwarn_ch.new_value_signal[int].connect( + self._update_values) + + def _update_values(self, new_val): + if 'StatusIntlk' in self.sender().address: + self.intlkstatus_val = new_val + else: + self.intlkwarn_val = new_val + self.value_changed() + +
+[docs] + def value_changed(self, new_value=None): + if self.intlkstatus_val is None or self.intlkwarn_val is None: + return + intlkval = self.intlkstatus_val + if get_bit(int(self.intlkwarn_val), self.intlkwarn_bit): + value = self.intlkstatus_val - 2**self.intlkwarn_bit + else: + value = self.intlkstatus_val + is_desired = value < _PS_LI_INTLK + if not is_desired: + self.warning.emit([self.intlkstatus_ch.address, intlkval]) + else: + self.normal.emit([self.intlkstatus_ch.address, intlkval]) + self.setState(not is_desired)
+ + +
+[docs] + def mouseDoubleClickEvent(self, ev): + self.filterlog.emit(self.filter)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_control/ps_wfmerror_mon.html b/_modules/siriushla/as_ps_control/ps_wfmerror_mon.html new file mode 100644 index 000000000..e8b896ffd --- /dev/null +++ b/_modules/siriushla/as_ps_control/ps_wfmerror_mon.html @@ -0,0 +1,361 @@ + + + + + + siriushla.as_ps_control.ps_wfmerror_mon — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_control.ps_wfmerror_mon

+
+from functools import partial as _part
+import numpy as _np
+
+from qtpy.QtCore import Signal, Qt
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QWidget, QHBoxLayout, QVBoxLayout, QLabel, \
+    QGridLayout
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from siriuspy.search import PSSearch
+from siriushla.widgets import SiriusConnectionSignal as _ConnSig, \
+    SiriusMainWindow, QSpinBoxPlus, QDoubleSpinBoxPlus, SiriusWaveformPlot
+
+
+
+[docs] +class Graph(SiriusWaveformPlot): + doubleclick = Signal(int) + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.setObjectName('graph') + self.setStyleSheet('#graph {min-height: 15em; min-width: 25em;}') + self.maxRedrawRate = 2 + self.mouseEnabledX = True + self.setShowXGrid(True) + self.setShowYGrid(True) + self.setBackgroundColor(QColor(255, 255, 255)) + self.setShowLegend(True) + self.setAutoRangeX(True) + self.setAutoRangeY(True) + self.setMinXRange(0.0) + self.setMaxXRange(1.0) + self.setAxisColor(QColor(0, 0, 0)) + self.plotItem.getAxis('bottom').setStyle(tickTextOffset=15) + self.plotItem.getAxis('left').setStyle(tickTextOffset=5) + self.plotItem.getAxis('left').setLabel('Current [A]', color='gray') + +
+[docs] + def mouseDoubleClickEvent(self, ev): + if ev.button() == Qt.LeftButton: + posx = self.curveAtIndex(0).xData + vb = self.plotItem.getViewBox() + pos = vb.mapSceneToView(ev.pos()) + i = _np.argmin(_np.abs(posx-pos.x())) + self.doubleclick.emit(i) + super().mouseDoubleClickEvent(ev)
+
+ + + +
+[docs] +class GraphWidget(QWidget): + + def __init__(self, parent=None, pslist=[], name='', delta=0.0, idxini=0, + idxfin=4000, legend=False): + super().__init__(parent) + self._pvslist = pslist + self.name = name + self._legend = legend + self._idx_ini = idxini + self._idx_fin = idxfin + self._delta = delta + self.curves = [] + self.setupui() + self.setFocus(True) + self.setFocusPolicy(Qt.StrongFocus) + self.chans = [_ConnSig(_PVName(ps).substitute( + prefix=_VACA_PREFIX, propty='Wfm-Mon')) for ps in pslist] + for idx, chan in enumerate(self.chans): + chan.new_value_signal[_np.ndarray].connect( + _part(self._update_curve, idx)) + +
+[docs] + def setupui(self): + self.setLayout(QVBoxLayout()) + self.layout().addWidget( + QLabel('<h2>'+self.name+'</h2>'), alignment=Qt.AlignCenter) + self.graph = Graph(self) + self.graph.setShowLegend(self._legend) + self.graph.maxRedrawRate = 1/2 + self.layout().addWidget(self.graph) + for i, pvn in enumerate(self._pvslist): + frac = int(i / (len(self._pvslist)-1) * 255) + color = QColor(frac, 0, 255-frac) + opts = dict( + y_channel='A', + name=pvn, + color=color, + redraw_mode=2, + lineStyle=1, + lineWidth=1, + symbol=None, + symbolSize=None) + self.graph.addChannel(**opts) + self.curves.append(self.graph.curveAtIndex(i)) + + spinini = QSpinBoxPlus(self) + spinini.setMinimum(0) + spinini.setMaximum(4000) + spinini.setValue(self._idx_ini) + spinini.editingFinished.connect(self._update_idx_ini) + + spindlt = QDoubleSpinBoxPlus(self) + spindlt.setMinimum(0) + spindlt.setMaximum(4) + spindlt.setValue(self._delta) + spindlt.editingFinished.connect(self._update_delta) + + spinfin = QSpinBoxPlus(self) + spinfin.setMinimum(0) + spinfin.setMaximum(4000) + spinfin.setValue(self._idx_fin) + spinfin.editingFinished.connect(self._update_idx_fin) + + hl = QHBoxLayout() + hl.addWidget(QLabel('Spacing:', self)) + hl.addWidget(spindlt) + hl.addStretch() + hl.addWidget(QLabel('Initial Index:', self)) + hl.addWidget(spinini) + hl.addStretch() + hl.addWidget(QLabel('Final Index:', self)) + hl.addWidget(spinfin) + hl.addStretch() + self.layout().addLayout(hl)
+ + + def _update_curve(self, idx, value): + if value is None: + return + value = _np.array(value[self._idx_ini:self._idx_fin]) + value += self._delta*idx + xval = _np.arange(self._idx_ini, self._idx_fin) + self.curves[idx].receiveYWaveform(value) + self.curves[idx].receiveXWaveform(xval) + + def _update_idx_ini(self): + self._idx_ini = self.sender().value() + + def _update_delta(self): + self._delta = self.sender().value() + + def _update_idx_fin(self): + self._idx_fin = self.sender().value()
+ + + +
+[docs] +class PlotWfmErrorWindow(SiriusMainWindow): + + def __init__(self, parent=None): + super().__init__(parent=parent) + self.setObjectName('BOApp') + self.setWindowTitle('BO Wfm Error Monitor') + self.setupui() + +
+[docs] + def setupui(self): + chs = PSSearch.get_psnames({'sec': 'BO', 'dev': 'CH'}) + cvs = PSSearch.get_psnames({'sec': 'BO', 'dev': 'CV'}) + quads = PSSearch.get_psnames({'sec': 'BO', 'dev': 'Q(F|D)'}) + sexts = PSSearch.get_psnames({'sec': 'BO', 'dev': 'S.*'}) + dips = PSSearch.get_psnames({'sec': 'BO', 'dev': 'B'}) + + wid = QWidget(self) + self.setCentralWidget(wid) + chwid = GraphWidget( + wid, chs, name='CHs', delta=0.05, idxini=25, idxfin=606, + legend=False) + cvwid = GraphWidget( + wid, cvs, name='CVs', delta=0.05, idxini=25, idxfin=606, + legend=False) + dipwid = GraphWidget( + wid, dips, name='Dipoles', delta=0.0, idxini=110, idxfin=2440, + legend=True) + quadwid = GraphWidget( + wid, quads, name='Quadrupoles', delta=0.0, idxini=110, + idxfin=2440, legend=True) + sextwid = GraphWidget( + wid, sexts, name='Sextupoles', delta=0.0, idxini=110, idxfin=2440, + legend=True) + + wid.setLayout(QGridLayout()) + wid.layout().addWidget(chwid, 0, 0) + wid.layout().addWidget(cvwid, 0, 1) + wid.layout().addWidget(quadwid, 1, 0) + wid.layout().addWidget(sextwid, 1, 1) + wid.layout().addWidget(dipwid, 2, 0, 1, 2)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_cycle/cycle_window.html b/_modules/siriushla/as_ps_cycle/cycle_window.html new file mode 100644 index 000000000..06740ca31 --- /dev/null +++ b/_modules/siriushla/as_ps_cycle/cycle_window.html @@ -0,0 +1,894 @@ + + + + + + siriushla.as_ps_cycle.cycle_window — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_cycle.cycle_window

+"""Power supplies cycle window."""
+
+import re as _re
+import time as _time
+from functools import partial as _part
+
+from qtpy.QtGui import QColor, QPalette, QKeySequence
+from qtpy.QtCore import Signal, QThread, Qt, QTimer, QSize
+from qtpy.QtWidgets import QWidget, QGridLayout, QVBoxLayout, QHBoxLayout, \
+    QPushButton, QLabel, QMessageBox, QGroupBox, QListWidget, QSpacerItem, \
+    QListWidgetItem, QProgressBar, QSizePolicy as QSzPlcy, QApplication, \
+    QAbstractItemView
+import qtawesome as qta
+
+from siriuspy.envars import VACA_PREFIX as VACA_PREFIX
+from siriuspy.namesys import Filter, SiriusPVName as PVName
+from siriuspy.cycle import get_psnames, Timing, get_sections
+from siriuspy.search import PSSearch
+
+from ..util import get_appropriate_color, run_newprocess
+from ..widgets import SiriusMainWindow, \
+    PyDMLedMultiConnection as PyDMLedMultiConn
+from ..widgets.pvnames_tree import PVNameTree
+from ..widgets.dialog import ProgressDialog, PSStatusDialog
+from .tasks import CreateCyclers, VerifyPS, \
+    SaveTiming, PrepareTiming, RestoreTiming, \
+    PreparePSSOFBMode, PreparePSIDFFMode, \
+    PreparePSOpModeSlowRef, PreparePSCurrentZero, \
+    PreparePSParams, PreparePSOpModeCycle, Cycle, CycleTrims
+
+
+errorcolor = QColor(255, 0, 0)
+warncolor = QColor(200, 200, 0)
+
+
+
+[docs] +class CycleWindow(SiriusMainWindow): + """Power supplies cycle window.""" + + def __init__(self, parent=None, checked_accs=(), adv_mode=False): + """Constructor.""" + super().__init__(parent) + self.setObjectName('ASApp') + cor = get_appropriate_color(section='AS') + self.setWindowIcon(qta.icon('mdi.recycle', color=cor)) + self._is_adv_mode = adv_mode + # Data structs + self._psnames = Filter.process_filters( + get_psnames(isadv=self._is_adv_mode), + filters={'sub': '((?!SB).)*'}) + self._timing = Timing() + self._ps2cycle = list() + self._ps_ready = list() + self._ps_failed = list() + self._checked_accs = checked_accs + # Flags + self._is_preparing = '' + self._prepared_init_vals = { + 'timing': False, + 'ps_sofbmode': False, + 'ps_idffmode': False, + 'ps_om_slowref': False, + 'ps_current': False, + 'ps_params': False, + 'ps_om_cycle': False, + 'trims': True} + self._prepared = self._prepared_init_vals.copy() + self._icon_check = qta.icon('fa5s.check') + self._pixmap_check = self._icon_check.pixmap( + self._icon_check.actualSize(QSize(16, 16))) + self._icon_not = qta.icon('fa5s.times') + self._pixmap_not = self._icon_not.pixmap( + self._icon_not.actualSize(QSize(16, 16))) + # Tasks + self._step_2_task = { + 'save_timing': SaveTiming, + 'timing': PrepareTiming, + 'ps_sofbmode': PreparePSSOFBMode, + 'ps_idffmode': PreparePSIDFFMode, + 'ps_om_slowref': PreparePSOpModeSlowRef, + 'ps_current': PreparePSCurrentZero, + 'ps_params': PreparePSParams, + 'ps_om_cycle': PreparePSOpModeCycle, + 'trims': CycleTrims, + 'cycle': Cycle, + 'restore_timing': RestoreTiming, + } + # Setup UI + self._needs_update_setup = False + self._setup_ui() + self._update_setup_timer = QTimer(self) + self._update_setup_timer.timeout.connect(self._update_setup) + self._update_setup_timer.setInterval(250) + self._update_setup_timer.start() + self.setWindowTitle('PS Cycle') + + def _setup_ui(self): + # central widget + self.central_widget = QWidget() + self.setCentralWidget(self.central_widget) + + # tree + gb_tree = QGroupBox('Select power supplies:') + self.pwrsupplies_tree = PVNameTree( + self._psnames, ('sec', 'mag_group'), tuple(), self) + self.pwrsupplies_tree.tree.setHeaderHidden(True) + self.pwrsupplies_tree.tree.setColumnCount(1) + glay_tree = QVBoxLayout(gb_tree) + glay_tree.addWidget(self.pwrsupplies_tree) + + # commands + lb_prep_ti = QLabel('<h4>Prepare Timing</h4>', self, + alignment=Qt.AlignCenter) + ti_ch = [PVName(name).substitute(prefix=VACA_PREFIX) + for name in self._timing.get_pvnames_by_psnames()] + self.ticonn_led = PyDMLedMultiConn(self, channels=ti_ch) + + self.save_timing_bt = QPushButton( + '1. Save Timing Initial State', self) + self.save_timing_bt.setToolTip( + 'Save timing current state as initial state.') + self.save_timing_bt.clicked.connect( + _part(self._run_task, 'save_timing')) + self.save_timing_bt.clicked.connect(self._set_lastcomm) + + self.prepare_timing_bt = QPushButton( + '2. Prepare Timing', self) + self.prepare_timing_bt.setToolTip( + 'Prepare EVG, triggers and events') + self.prepare_timing_bt.clicked.connect( + _part(self._run_task, 'timing')) + self.prepare_timing_bt.clicked.connect(self._set_lastcomm) + + self.prepare_timing_lb = QLabel(self) + self.prepare_timing_lb.setPixmap(self._pixmap_not) + + lb_prep_ps = QLabel('<h4>Prepare PS</h4>', self, + alignment=Qt.AlignCenter) + self.psconn_led = PyDMLedMultiConn(self) + + self.set_ps_sofbmode_off_bt = QPushButton( + '3. Turn off PS SOFBMode', self) + self.set_ps_sofbmode_off_bt.setToolTip( + 'Turn off power supplies SOFBMode.') + self.set_ps_sofbmode_off_bt.clicked.connect( + _part(self._run_task, 'ps_sofbmode')) + self.set_ps_sofbmode_off_bt.clicked.connect(self._set_lastcomm) + + self.set_ps_sofbmode_off_lb = QLabel(self) + self.set_ps_sofbmode_off_lb.setPixmap(self._pixmap_not) + + self.set_ps_idffmode_off_bt = QPushButton( + '4. Turn off PS IDFFMode', self) + self.set_ps_idffmode_off_bt.setToolTip( + 'Turn off power supplies IDFFMode.') + self.set_ps_idffmode_off_bt.clicked.connect( + _part(self._run_task, 'ps_idffmode')) + self.set_ps_idffmode_off_bt.clicked.connect(self._set_lastcomm) + + self.set_ps_idffmode_off_lb = QLabel(self) + self.set_ps_idffmode_off_lb.setPixmap(self._pixmap_not) + + self.set_ps_opmode_slowref_bt = QPushButton( + '5. Set PS OpMode to SlowRef', self) + self.set_ps_opmode_slowref_bt.setToolTip( + 'Set power supplies OpMode to SlowRef.') + self.set_ps_opmode_slowref_bt.clicked.connect( + _part(self._run_task, 'ps_om_slowref')) + self.set_ps_opmode_slowref_bt.clicked.connect(self._set_lastcomm) + + self.set_ps_opmode_slowref_lb = QLabel(self) + self.set_ps_opmode_slowref_lb.setPixmap(self._pixmap_not) + + self.set_ps_current_zero_bt = QPushButton( + '6. Set PS current to zero', self) + self.set_ps_current_zero_bt.setToolTip( + 'Set power supplies current to zero.') + self.set_ps_current_zero_bt.clicked.connect( + _part(self._run_task, 'ps_current')) + self.set_ps_current_zero_bt.clicked.connect(self._set_lastcomm) + + self.set_ps_current_zero_lb = QLabel(self) + self.set_ps_current_zero_lb.setPixmap(self._pixmap_not) + + self.prepare_ps_params_bt = QPushButton( + '7. Prepare PS Parameters', self) + self.prepare_ps_params_bt.setToolTip( + 'Check power supplies OpMode in SlowRef, check\n' + 'current is zero and configure cycle parameters.') + self.prepare_ps_params_bt.clicked.connect( + _part(self._run_task, 'ps_params')) + self.prepare_ps_params_bt.clicked.connect(self._set_lastcomm) + + self.prepare_ps_params_lb = QLabel(self) + self.prepare_ps_params_lb.setPixmap(self._pixmap_not) + + self.prepare_ps_opmode_bt = QPushButton( + '8. Prepare PS OpMode', self) + self.prepare_ps_opmode_bt.setToolTip( + 'Set power supplies OpMode to Cycle.') + self.prepare_ps_opmode_bt.clicked.connect( + _part(self._run_task, 'ps_om_cycle')) + self.prepare_ps_opmode_bt.clicked.connect(self._set_lastcomm) + + self.prepare_ps_opmode_lb = QLabel(self) + self.prepare_ps_opmode_lb.setPixmap(self._pixmap_not) + + lb_cycle = QLabel('<h4>Cycle</h4>', self, + alignment=Qt.AlignCenter) + + self.cycle_trims_bt = QPushButton( + '9. Cycle Trims', self) + self.cycle_trims_bt.setToolTip( + 'Cycle trims:\nStep 1) CH, QS and QTrims\nStep 2) CV') + self.cycle_trims_bt.clicked.connect( + _part(self._run_task, 'trims')) + self.cycle_trims_bt.clicked.connect(self._set_lastcomm) + self.cycle_trims_bt.setVisible(False) + + self.cycle_trims_lb = QLabel(self) + self.cycle_trims_lb.setPixmap(self._pixmap_check) + self.cycle_trims_lb.setVisible(False) + + self.cycle_bt = QPushButton( + '10. Cycle', self) + self.cycle_bt.setToolTip( + 'Check all configurations,\nenable triggers and run cycle.') + self.cycle_bt.clicked.connect( + _part(self._run_task, 'cycle')) + self.cycle_bt.clicked.connect(self._set_lastcomm) + self.cycle_bt.setEnabled(False) + + lb_rest_ti = QLabel('<h4>Restore Timing</h4>', self, + alignment=Qt.AlignCenter) + self.restore_timing_bt = QPushButton( + '11. Restore Timing Initial State', self) + self.restore_timing_bt.setToolTip( + 'Restore timing initial state.') + self.restore_timing_bt.clicked.connect( + _part(self._run_task, 'restore_timing')) + self.restore_timing_bt.clicked.connect(self._set_lastcomm) + + self._prepared_labels = { + 'timing': self.prepare_timing_lb, + 'ps_sofbmode': self.set_ps_sofbmode_off_lb, + 'ps_idffmode': self.set_ps_idffmode_off_lb, + 'ps_om_slowref': self.set_ps_opmode_slowref_lb, + 'ps_current': self.set_ps_current_zero_lb, + 'ps_params': self.prepare_ps_params_lb, + 'ps_om_cycle': self.prepare_ps_opmode_lb, + 'trims': self.cycle_trims_lb} + + gb_commsts = QGroupBox() + gb_commsts.setStyleSheet(""" + QPushButton{min-height:1.5em;} + QLabel{qproperty-alignment: AlignCenter;}""") + lay_commsts = QGridLayout(gb_commsts) + lay_commsts.addItem( + QSpacerItem(1, 1, QSzPlcy.Ignored, QSzPlcy.Expanding), 0, 0, 1, 2) + lay_commsts.addWidget(lb_prep_ti, 1, 0) + lay_commsts.addWidget(self.ticonn_led, 1, 1) + lay_commsts.addWidget(self.save_timing_bt, 2, 0) + lay_commsts.addWidget(self.prepare_timing_bt, 3, 0) + lay_commsts.addWidget(self.prepare_timing_lb, 3, 1) + lay_commsts.addItem( + QSpacerItem(1, 1, QSzPlcy.Ignored, QSzPlcy.Expanding), 4, 0) + lay_commsts.addWidget(lb_prep_ps, 5, 0) + lay_commsts.addWidget(self.psconn_led, 5, 1) + lay_commsts.addWidget(self.set_ps_sofbmode_off_bt, 6, 0) + lay_commsts.addWidget(self.set_ps_sofbmode_off_lb, 6, 1) + lay_commsts.addWidget(self.set_ps_idffmode_off_bt, 7, 0) + lay_commsts.addWidget(self.set_ps_idffmode_off_lb, 7, 1) + lay_commsts.addWidget(self.set_ps_opmode_slowref_bt, 8, 0) + lay_commsts.addWidget(self.set_ps_opmode_slowref_lb, 8, 1) + lay_commsts.addWidget(self.set_ps_current_zero_bt, 9, 0) + lay_commsts.addWidget(self.set_ps_current_zero_lb, 9, 1) + lay_commsts.addWidget(self.prepare_ps_params_bt, 10, 0) + lay_commsts.addWidget(self.prepare_ps_params_lb, 10, 1) + lay_commsts.addWidget(self.prepare_ps_opmode_bt, 11, 0) + lay_commsts.addWidget(self.prepare_ps_opmode_lb, 11, 1) + lay_commsts.addItem( + QSpacerItem(1, 1, QSzPlcy.Ignored, QSzPlcy.Expanding), 12, 0) + lay_commsts.addWidget(lb_cycle, 13, 0) + lay_commsts.addWidget(self.cycle_trims_bt, 14, 0) + lay_commsts.addWidget(self.cycle_trims_lb, 14, 1) + lay_commsts.addWidget(self.cycle_bt, 15, 0) + lay_commsts.addItem( + QSpacerItem(1, 1, QSzPlcy.Ignored, QSzPlcy.Expanding), 16, 0) + lay_commsts.addWidget(lb_rest_ti, 17, 0) + lay_commsts.addWidget(self.restore_timing_bt, 18, 0) + lay_commsts.addItem( + QSpacerItem(1, 1, QSzPlcy.Ignored, QSzPlcy.Expanding), 19, 0) + lay_commsts.setColumnStretch(0, 10) + lay_commsts.setColumnStretch(1, 1) + lay_commsts.setVerticalSpacing(12) + lay_commsts.setHorizontalSpacing(6) + + self.label_lastcomm = QLabel('Last Command: ', self) + self.clearhist_bt = QPushButton('Clear', self) + self.clearhist_bt.clicked.connect(self._clear_lastcomm) + lay_lc = QHBoxLayout() + lay_lc.setContentsMargins(0, 0, 0, 0) + lay_lc.addWidget(self.label_lastcomm, alignment=Qt.AlignLeft) + lay_lc.addWidget(self.clearhist_bt, alignment=Qt.AlignRight) + lay_lc.setStretch(0, 10) + lay_lc.setStretch(1, 1) + + self.progress_list = QListWidget(self) + self.progress_list.setObjectName('progresslist') + self.progress_list.setStyleSheet('#progresslist{min-width:20em;}') + self.progress_list.itemDoubleClicked.connect(self._open_ps_detail) + self.progress_list.setSelectionMode(QAbstractItemView.MultiSelection) + self.progress_list.setToolTip( + 'Select rows and press Ctrl+C to copy and Esc to deselect.') + + self.progress_bar = MyProgressBar(self) + + lay_log = QVBoxLayout() + lay_log.addLayout(lay_lc) + lay_log.addWidget(self.progress_list) + lay_log.addWidget(self.progress_bar) + + # connect tree signals + self.pwrsupplies_tree.tree.doubleClicked.connect(self._open_ps_detail) + self.pwrsupplies_tree.tree.itemChanged.connect( + self._handle_checked_items_changed) + self.pwrsupplies_tree.check_requested_levels(self._checked_accs) + + # layout + layout = QGridLayout() + layout.setVerticalSpacing(10) + layout.setHorizontalSpacing(10) + layout.addWidget(QLabel('<h3>PS Cycle</h3>', self, + alignment=Qt.AlignCenter), 0, 0, 1, 3) + layout.addWidget(gb_tree, 1, 0) + layout.addWidget(gb_commsts, 1, 1) + layout.addLayout(lay_log, 1, 2) + layout.setRowStretch(0, 1) + layout.setRowStretch(1, 15) + layout.setColumnStretch(0, 5) + layout.setColumnStretch(1, 4) + layout.setColumnStretch(2, 8) + self.central_widget.setLayout(layout) + + # --- handle tasks --- + + def _run_task(self, control=''): + if not self._check_connected(control): + return + pwrsupplies = self._get_ps_list() + if not pwrsupplies: + return + + if 'ps' in control and not self._verify_ps(pwrsupplies): + return + + if control in self._step_2_task: + task_class = self._step_2_task[control] + else: + raise NotImplementedError( + "Task not defined for control '{}'".format(control)) + self._is_preparing = control + + self._handle_buttons_enabled(False) + self.progress_list.clear() + + task = task_class( + parent=self, psnames=pwrsupplies, timing=self._timing, + isadv=self._is_adv_mode) + task.updated.connect(self._update_progress) + duration = task.duration() + + self.progress_bar.setMinimum(0) + self.progress_bar.setMaximum(duration) + self.progress_bar.setValue(0) + pal = self.progress_bar.palette() + pal.setColor(QPalette.Highlight, self.progress_bar.default_color) + self.progress_bar.setPalette(pal) + + self.update_bar = UpdateProgressBar(duration, self) + self.update_bar.increment.connect(self.progress_bar.increment) + + task.start() + self.update_bar.start() + + def _update_progress(self, text, done, warning=False, error=False): + """Update automated cycle progress list and bar.""" + if done: + last_item = self.progress_list.item(self.progress_list.count()-1) + curr_text = last_item.text() + last_item.setText(curr_text+' done.') + elif 'Remaining time' in text: + last_item = self.progress_list.item(self.progress_list.count()-1) + if 'Remaining time' in last_item.text(): + last_item.setText(text) + else: + self.progress_list.addItem(text) + self.progress_list.scrollToBottom() + elif 'Sent ' in text: + last_item = self.progress_list.item(self.progress_list.count()-1) + if 'Sent ' in last_item.text(): + last_item.setText(text) + else: + self.progress_list.addItem(text) + self.progress_list.scrollToBottom() + elif 'Successfully checked ' in text: + last_item = self.progress_list.item(self.progress_list.count()-1) + if 'Successfully checked ' in last_item.text(): + last_item.setText(text) + else: + self.progress_list.addItem(text) + self.progress_list.scrollToBottom() + elif 'Created connections ' in text: + last_item = self.progress_list.item(self.progress_list.count()-1) + if 'Created connections ' in last_item.text(): + last_item.setText(text) + else: + self.progress_list.addItem(text) + self.progress_list.scrollToBottom() + else: + item = QListWidgetItem(text) + if error: + item.setForeground(errorcolor) + self.update_bar.exit_task() + pal = self.progress_bar.palette() + pal.setColor(QPalette.Highlight, + self.progress_bar.warning_color) + self.progress_bar.setPalette(pal) + if self._is_preparing in self._prepared.keys(): + self._prepared[self._is_preparing] = False + cycle = all(self._prepared.values()) + self._handle_buttons_enabled(True, cycle=cycle) + elif warning: + item.setForeground(warncolor) + elif 'finished' in text: + self.update_bar.exit_task() + self.progress_bar.setValue(self.progress_bar.maximum()) + if self._is_preparing == 'cycle': + self._prepared = {k: False for k in self._prepared.keys()} + if not self.cycle_trims_bt.isVisible(): + self._prepared['trims'] = True + cycle = False + else: + if self._is_preparing in self._prepared.keys(): + self._prepared[self._is_preparing] = True + cycle = all(self._prepared.values()) + self._handle_buttons_enabled(True, cycle=cycle) + + self._handle_stslabels_content() + + self.progress_list.addItem(item) + self.progress_list.scrollToBottom() + + def _handle_buttons_enabled(self, enable, cycle=False): + self.save_timing_bt.setEnabled(enable) + self.prepare_timing_bt.setEnabled(enable) + self.set_ps_sofbmode_off_bt.setEnabled(enable) + self.set_ps_idffmode_off_bt.setEnabled(enable) + self.set_ps_opmode_slowref_bt.setEnabled(enable) + self.set_ps_current_zero_bt.setEnabled(enable) + self.prepare_ps_params_bt.setEnabled(enable) + self.prepare_ps_opmode_bt.setEnabled(enable) + self.cycle_trims_bt.setEnabled(enable) + self.cycle_bt.setEnabled(cycle) + self.restore_timing_bt.setEnabled(enable) + self.clearhist_bt.setEnabled(enable) + self.pwrsupplies_tree.setEnabled(enable) + + def _handle_stslabels_content(self): + for prep, value in self._prepared.items(): + pixmap = self._pixmap_check if value else self._pixmap_not + self._prepared_labels[prep].setPixmap(pixmap) + + def _set_lastcomm(self): + sender_text = self.sender().text() + self.label_lastcomm.setText('Last Command: '+sender_text) + + def _clear_lastcomm(self): + self.progress_bar.setValue(0) + self.progress_list.clear() + self.label_lastcomm.setText('Last Command: ') + + # --- handle ps selection --- + + def _get_ps_list(self): + """Return list of power supplies to cycle.""" + # Get power supplies list + pwrsupplies = self.pwrsupplies_tree.checked_items() + if not pwrsupplies: + QMessageBox.critical(self, 'Message', 'No power supply selected!') + return False + + sections = get_sections(pwrsupplies) + if 'BO' in sections and len(sections) > 1: + QMessageBox.critical( + self, 'Error', 'Can not cycle Booster with other sectors!') + return False + + create_task = CreateCyclers(parent=self, psnames=pwrsupplies) + dlg = ProgressDialog('Creating cycles...', create_task, self) + ret = dlg.exec_() + if ret == dlg.Rejected: + return False + + return pwrsupplies + + def _handle_checked_items_changed(self, item): + psname = PVName(item.data(0, Qt.DisplayRole)) + if not _re.match('.*-.*:.*-.*', psname): + return + + if not self._is_adv_mode and psname.sec == 'SI' and \ + not psname.dev.startswith('FC'): + psname2check = Filter.process_filters( + self._psnames, filters={'sec': 'SI', 'dev': '(?!FC)'}) + psname2check.remove(psname) + state2set = item.checkState(0) + self.pwrsupplies_tree.tree.blockSignals(True) + for psn in psname2check: + item2check = self.pwrsupplies_tree._item_map[psn] + if item2check.checkState(0) != state2set: + item2check.setData(0, Qt.CheckStateRole, state2set) + self.pwrsupplies_tree.tree.blockSignals(False) + else: + if (psname.sec in ['BO', 'SI'] and psname.dev in ['B', 'B1B2']): + psname2check = PSSearch.get_psnames( + {'sec': psname.sec, 'dev': 'B.*'}) + psname2check.remove(psname) + item2check = self.pwrsupplies_tree._item_map[psname2check[0]] + + state2set = item.checkState(0) + state2change = item2check.checkState(0) + if state2change != state2set: + self.pwrsupplies_tree.tree.blockSignals(True) + item2check.setData(0, Qt.CheckStateRole, state2set) + self.pwrsupplies_tree.tree.blockSignals(False) + + self._prepared.update(self._prepared_init_vals) + self._needs_update_setup = True + + def _update_setup(self): + if not self._needs_update_setup: + return + self._needs_update_setup = False + + # update leds + psnames = self.pwrsupplies_tree.checked_items() + ti_ch = [PVName(name).substitute(prefix=VACA_PREFIX) + for name in self._timing.get_pvnames_by_psnames(psnames)] + self.ticonn_led.set_channels(ti_ch) + + ps_ch = list() + for name in psnames: + ps_ch.append(PVName(name).substitute( + prefix=VACA_PREFIX, propty='PwrState-Sts')) + self.psconn_led.set_channels(ps_ch) + + # update buttons and self._prepared dict if not in advanced mode + if not self._is_adv_mode: + has_sifam = False + sifamfilt = {'sec': 'SI', 'sub': 'Fam', 'dis': 'PS'} + for psn in PSSearch.get_psnames(sifamfilt): + if psn not in self.pwrsupplies_tree._item_map: + continue + item = self.pwrsupplies_tree._item_map[psn] + has_sifam |= item.checkState(0) != 0 + + if not has_sifam: + self.cycle_bt.setText('8. Cycle') + self.restore_timing_bt.setText( + '9. Restore Timing Initial State') + self.cycle_trims_bt.setVisible(False) + self.cycle_trims_lb.setVisible(False) + self._prepared['trims'] = True + else: + self.cycle_bt.setText('9. Cycle') + self.restore_timing_bt.setText( + '10. Restore Timing Initial State') + self.cycle_trims_bt.setVisible(True) + self.cycle_trims_lb.setVisible(True) + self._prepared['trims'] = False + + self._handle_stslabels_content() + self._handle_buttons_enabled(True) + + # --- auxiliary checks --- + + def _check_connected(self, control): + if control in ['trims', 'cycle']: + leds = [self.ticonn_led, self.psconn_led] + elif 'timing' in control: + leds = [self.ticonn_led, ] + else: + leds = [self.psconn_led, ] + + for led in leds: + pvs_disconnected = set() + for ch, v in led.channels2conn.items(): + if not v: + pvs_disconnected.add(ch) + if pvs_disconnected: + sttr = '' + for item in pvs_disconnected: + sttr += item + '\n' + QMessageBox.information( + self, 'Message', + 'The following PVs are not connected:\n'+sttr) + return False + return True + + def _verify_ps(self, pwrsupplies): + self._ps_failed = set() + + task = VerifyPS(parent=self, psnames=pwrsupplies) + task.itemDone.connect(self._get_ps_not_ready_2_cycle) + + dlg = ProgressDialog( + 'Verifying power supplies initial state...', task, self) + ret = dlg.exec_() + if ret == dlg.Rejected: + self._handle_buttons_enabled(True) + return False + + if self._ps_failed: + text = 'Verify power state and interlocks' \ + ' of the following power supplies' + dlg = PSStatusDialog(self._ps_failed, text, self) + dlg.exec_() + self._handle_buttons_enabled(True) + return False + + return True + + def _get_ps_not_ready_2_cycle(self, psname, status): + if not status: + self._ps_failed.add(psname) + + def _open_ps_detail(self, item): + if self.sender() == self.progress_list: + text_split = item.data(Qt.DisplayRole).split(' ') + psname = '' + for text in text_split: + if _re.match('.*-.*:.*-.*', text): + psname = text + if not psname: + return + else: + psname = item.data() + if not _re.match('.*-.*:.*-.*', psname): + if item.model().rowCount(item) == 1: + psname = item.child(0, 0).data() + else: + return + run_newprocess(['sirius-hla-as-ps-detail.py', psname]) + + # --- events --- + +
+[docs] + def keyPressEvent(self, evt): + """Implement keyPressEvent.""" + if evt.matches(QKeySequence.Copy) and self.progress_list.underMouse(): + items = self.progress_list.selectedItems() + items = '\n'.join([i.text() for i in items]) + QApplication.clipboard().setText(items) + if evt.key() == Qt.Key_Escape and self.progress_list.underMouse(): + items = self.progress_list.clearSelection() + super().keyPressEvent(evt)
+ + +
+[docs] + def closeEvent(self, ev): + self._update_setup_timer.stop() + super().closeEvent(ev)
+
+ + + +# Auxiliar progress monitoring classes + +
+[docs] +class MyProgressBar(QProgressBar): + + def __init__(self, parent=None): + super().__init__(parent) + pal = self.palette() + self.default_color = pal.color(QPalette.Highlight) + self.warning_color = Qt.red + +
+[docs] + def increment(self): + current_val = self.value() + max_val = self.maximum() + if max_val > current_val: + self.setValue(current_val+1)
+
+ + + +
+[docs] +class UpdateProgressBar(QThread): + + increment = Signal() + + def __init__(self, duration, parent=None): + super().__init__(parent) + self._duration = duration + self._quit_task = False + +
+[docs] + def exit_task(self): + """Set flag to quit thread.""" + self._quit_task = True
+ + +
+[docs] + def run(self): + t0 = _time.time() + while _time.time() - t0 < self._duration: + if self._quit_task: + break + _time.sleep(1) + self.increment.emit()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_cycle/tasks.html b/_modules/siriushla/as_ps_cycle/tasks.html new file mode 100644 index 000000000..7f0f4a5f8 --- /dev/null +++ b/_modules/siriushla/as_ps_cycle/tasks.html @@ -0,0 +1,665 @@ + + + + + + siriushla.as_ps_cycle.tasks — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_ps_cycle.tasks

+
+from copy import deepcopy as _dcopy
+import time as _time
+from datetime import datetime as _datetime
+from qtpy.QtCore import Signal, QThread
+from siriuspy.namesys import SiriusPVName as PVName
+from siriuspy.search import PSSearch
+from siriuspy.cycle import PSCycler, LinacPSCycler, PSCyclerFBP, FOFBPSCycler,\
+    CycleController
+
+
+TIMEOUT_CHECK = 10
+TIMEOUT_SLEEP = 0.1
+TIMEOUT_CONN = 0.5
+
+
+
+[docs] +class BaseTask(QThread): + """Base Task.""" + + _cyclers = dict() + _controller = None + currentItem = Signal(str) + itemDone = Signal(str, bool) + completed = Signal() + updated = Signal(str, bool, bool, bool) + + def __init__(self, parent=None, psnames=list(), timing=None, + need_controller=False, isadv=False): + super().__init__(parent) + self._psnames = psnames + self._timing = timing + if need_controller: + cyclers = dict() + for ps in psnames: + cyclers[ps] = BaseTask._cyclers[ps] + if not BaseTask._controller: + BaseTask._controller = CycleController( + cyclers=cyclers, timing=timing, logger=self, + isadv=isadv) + else: + BaseTask._controller.cyclers = cyclers + BaseTask._controller.timing = timing + BaseTask._controller.logger = self + self._quit_task = False + +
+[docs] + def size(self): + """Return task size.""" + return len(self._psnames)
+ + +
+[docs] + def duration(self): + """Return task maximum duration.""" + raise NotImplementedError
+ + +
+[docs] + def exit_task(self): + """Set flag to quit thread.""" + self._quit_task = True
+ + +
+[docs] + def run(self): + """Run task.""" + if not self._quit_task: + self._interrupted = False + self.function() + if not self._interrupted: + self.completed.emit()
+ + +
+[docs] + def update(self, message, done, warning, error): + now = _datetime.now().strftime('%Y/%m/%d-%H:%M:%S') + self.updated.emit(now+' '+message, done, warning, error)
+ + +
+[docs] + def function(self): + """Must be reimplemented in each class.""" + raise NotImplementedError
+ + + def _set(self, method, **kwargs): + """Set.""" + for ps in self._psnames: + self.currentItem.emit(ps) + cycler = BaseTask._cyclers[ps] + if not cycler.wait_for_connection(TIMEOUT_CONN): + self.itemDone.emit(ps, False) + continue + func = getattr(cycler, method) + func(**kwargs) + self.itemDone.emit(ps, True) + if self._quit_task: + self._interrupted = True + break + + def _check(self, method, timeout=TIMEOUT_CHECK, **kwargs): + """Check.""" + self._interrupted = False + need_check = _dcopy(self._psnames) + t = _time.time() + while _time.time() - t < timeout: + for ps in self._psnames: + if ps not in need_check: + continue + cycler = BaseTask._cyclers[ps] + func = getattr(cycler, method) + if func(**kwargs): + self.currentItem.emit(ps) + need_check.remove(ps) + self.itemDone.emit(ps, True) + if self._quit_task: + self._interrupted = True + break + if (not need_check) or (self._quit_task): + break + _time.sleep(TIMEOUT_SLEEP) + for ps in need_check: + self.currentItem.emit(ps) + self.itemDone.emit(ps, False)
+ + + +
+[docs] +class CreateCyclers(BaseTask): + """Create cyclers.""" + +
+[docs] + def function(self): + """Create cyclers.""" + for psname in self._psnames: + self.currentItem.emit(psname) + if psname not in BaseTask._cyclers: + if PVName(psname).sec == 'LI': + c = LinacPSCycler(psname) + elif PSSearch.conv_psname_2_psmodel(psname) == 'FOFB_PS': + c = FOFBPSCycler(psname) + elif PSSearch.conv_psname_2_psmodel(psname) == 'FBP': + c = PSCyclerFBP(psname) + else: + c = PSCycler(psname) + BaseTask._cyclers[psname] = c + self.itemDone.emit(psname, True) + if self._quit_task: + self._interrupted = True + break
+
+ + + +
+[docs] +class VerifyPS(BaseTask): + """Verify power supply initial state.""" + +
+[docs] + def size(self): + """Return task size.""" + return 2*len(self._psnames)
+ + +
+[docs] + def function(self): + """Verify if PS is ready for cycle.""" + self._check(method='check_on') + self._check(method='check_intlks')
+
+ + + +
+[docs] +class SaveTiming(BaseTask): + """Save timing initial state.""" + + def __init__(self, **kwargs): + super().__init__(need_controller=True, **kwargs) + +
+[docs] + def size(self): + return self._controller.save_timing_size
+ + +
+[docs] + def duration(self): + """Return task maximum duration.""" + return self._controller.save_timing_max_duration
+ + +
+[docs] + def function(self): + self._controller.save_timing_initial_state()
+
+ + + +
+[docs] +class PrepareTiming(BaseTask): + """Prepare timing to cycle.""" + + def __init__(self, **kwargs): + super().__init__(need_controller=True, **kwargs) + +
+[docs] + def size(self): + return self._controller.prepare_timing_size
+ + +
+[docs] + def duration(self): + """Return task maximum duration.""" + return self._controller.prepare_timing_max_duration
+ + +
+[docs] + def function(self): + self._controller.prepare_timing()
+
+ + + +
+[docs] +class PreparePSSOFBMode(BaseTask): + """Prepare power suplies to cycle.""" + + def __init__(self, **kwargs): + super().__init__(need_controller=True, **kwargs) + +
+[docs] + def size(self): + return self._controller.prepare_ps_sofbmode_size
+ + +
+[docs] + def duration(self): + """Return task maximum duration.""" + return self._controller.prepare_ps_sofbmode_max_duration
+ + +
+[docs] + def function(self): + self._controller.prepare_pwrsupplies_sofbmode()
+
+ + + +
+[docs] +class PreparePSIDFFMode(BaseTask): + """Prepare power suplies to cycle.""" + + def __init__(self, **kwargs): + super().__init__(need_controller=True, **kwargs) + +
+[docs] + def size(self): + return self._controller.prepare_ps_idffmode_size
+ + +
+[docs] + def duration(self): + """Return task maximum duration.""" + return self._controller.prepare_ps_idffmode_max_duration
+ + +
+[docs] + def function(self): + self._controller.prepare_pwrsupplies_idffmode()
+
+ + + +
+[docs] +class PreparePSOpModeSlowRef(BaseTask): + """Prepare power suplies to cycle.""" + + def __init__(self, **kwargs): + super().__init__(need_controller=True, **kwargs) + +
+[docs] + def size(self): + return self._controller.prepare_ps_opmode_slowref_size
+ + +
+[docs] + def duration(self): + """Return task maximum duration.""" + return self._controller.prepare_ps_opmode_slowref_max_duration
+ + +
+[docs] + def function(self): + self._controller.prepare_pwrsupplies_opmode_slowref()
+
+ + + +
+[docs] +class PreparePSCurrentZero(BaseTask): + """Prepare power suplies to cycle.""" + + def __init__(self, **kwargs): + super().__init__(need_controller=True, **kwargs) + +
+[docs] + def size(self): + return self._controller.prepare_ps_current_zero_size
+ + +
+[docs] + def duration(self): + """Return task maximum duration.""" + return self._controller.prepare_ps_current_zero_max_duration
+ + +
+[docs] + def function(self): + self._controller.prepare_pwrsupplies_current_zero()
+
+ + + +
+[docs] +class PreparePSParams(BaseTask): + """Prepare power suplies to cycle.""" + + def __init__(self, **kwargs): + super().__init__(need_controller=True, **kwargs) + +
+[docs] + def size(self): + return self._controller.prepare_ps_params_size
+ + +
+[docs] + def duration(self): + """Return task maximum duration.""" + return self._controller.prepare_ps_params_max_duration
+ + +
+[docs] + def function(self): + self._controller.prepare_pwrsupplies_parameters()
+
+ + + +
+[docs] +class PreparePSOpModeCycle(BaseTask): + """Prepare power suplies to cycle.""" + + def __init__(self, **kwargs): + super().__init__(need_controller=True, **kwargs) + +
+[docs] + def size(self): + return self._controller.prepare_ps_opmode_cycle_size
+ + +
+[docs] + def duration(self): + """Return task maximum duration.""" + return self._controller.prepare_ps_opmode_cycle_max_duration
+ + +
+[docs] + def function(self): + self._controller.prepare_pwrsupplies_opmode_cycle()
+
+ + + +
+[docs] +class CycleTrims(BaseTask): + """Cycle.""" + + def __init__(self, **kwargs): + super().__init__(need_controller=True, **kwargs) + +
+[docs] + def size(self): + return self._controller.cycle_trims_size
+ + +
+[docs] + def duration(self): + """Return task maximum duration.""" + return self._controller.cycle_trims_max_duration
+ + +
+[docs] + def function(self): + self._controller.cycle_trims()
+
+ + + +
+[docs] +class Cycle(BaseTask): + """Cycle.""" + + def __init__(self, **kwargs): + super().__init__(need_controller=True, **kwargs) + +
+[docs] + def size(self): + return self._controller.cycle_size
+ + +
+[docs] + def duration(self): + """Return task maximum duration.""" + return self._controller.cycle_max_duration
+ + +
+[docs] + def function(self): + self._controller.cycle()
+
+ + + +
+[docs] +class RestoreTiming(BaseTask): + """Restore timing initial state.""" + + def __init__(self, **kwargs): + super().__init__(need_controller=True, **kwargs) + +
+[docs] + def size(self): + return self._controller.restore_timing_size
+ + +
+[docs] + def duration(self): + """Return task maximum duration.""" + return self._controller.restore_timing_max_duration
+ + +
+[docs] + def function(self): + self._controller.restore_timing_initial_state()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_diag/main.html b/_modules/siriushla/as_ps_diag/main.html new file mode 100644 index 000000000..d3068db13 --- /dev/null +++ b/_modules/siriushla/as_ps_diag/main.html @@ -0,0 +1,783 @@ + + + + + + siriushla.as_ps_diag.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_ps_diag.main

+"""Interface to handle power supply diagnostic."""
+
+import re as _re
+import logging as _log
+from datetime import datetime as _datetime
+from functools import partial as _partial
+
+from pcaspy import Severity as _Sev
+
+import numpy as _np
+
+from qtpy.QtGui import QStandardItemModel, QStandardItem
+from qtpy.QtCore import Qt, Slot, Signal
+from qtpy.QtWidgets import QWidget, QLabel, QPushButton, \
+    QGridLayout, QSpacerItem, QSizePolicy as QSzPlcy, QLineEdit, \
+    QTreeView, QItemDelegate, QHeaderView, QAbstractItemView, \
+    QStackedLayout, QRadioButton
+import qtawesome as qta
+
+from pydm.widgets.base import PyDMWidget
+
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.pwrsupply.csdev import Const as _PSConst, \
+    ETypes as _PSEnums, PS_LI_INTLK_THRS as _PS_LI_INTLK
+from siriuspy.search import PSSearch
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from siriushla.util import run_newprocess as _run_newprocess, \
+    get_appropriate_color as _get_appropriate_color
+from siriushla.widgets import SiriusMainWindow, SiriusConnectionSignal, \
+    PyDMLedMultiChannel, PyDMLed, PyDMLedMultiConnection, QLed
+from siriushla.as_ps_control.detail_widget.custom_widgets import \
+    LISpectIntlkLed
+from siriushla.as_ps_diag.util import asps2filters, lips2filters, sips2filters
+
+
+
+[docs] +class PSDiag(SiriusMainWindow): + """Power Supply Diagnostic.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX): + """Init.""" + super().__init__(parent) + self._prefix = prefix + self.setWindowTitle('PS Diagnostics') + self.setObjectName('ASApp') + cor = _get_appropriate_color(section='AS') + self.setWindowIcon(qta.icon('mdi.stethoscope', color=cor)) + self._setupUi() + self._initialized = False + + def _setupUi(self): + # Leds Panel + cw = QWidget(self) + panel = QWidget(cw) + panel_lay = QGridLayout() + panel_lay.setVerticalSpacing(0) + panel_lay.setHorizontalSpacing(5) + panel.setLayout(panel_lay) + + # # Leds Header + for i, lab in enumerate([ + '', 'PS\nConn?', 'Power\nState', 'Interlock', + 'OpMode\nSlowRef?', 'Current\nDiff']): + label = QLabel(lab, panel, alignment=Qt.AlignCenter) + label.setStyleSheet('min-width:3.4em; max-width:3.4em;') + panel_lay.addWidget(label, 0, i) + + # # Leds panel + _on = _PSConst.PwrStateSts.On + _slowref = _PSConst.States.SlowRef + _rmpwfm = _PSConst.States.RmpWfm + i = 2 + for sec in ['LI', 'TB', 'BO', 'TS', 'SI']: + seclabel = QLabel('<h3>'+sec+'</h3>', panel) + panel_lay.addWidget(seclabel, i, 0) + i += 1 + if sec == 'LI': + for label, filt in lips2filters.items(): + ps_label = QLabel( + label, panel, + alignment=Qt.AlignRight | Qt.AlignVCenter) + psnames = PSSearch.get_psnames(filters=filt) + ps_c2v = dict() + ilk_c2v = dict() + conn_chs = list() + for name in psnames: + pvn = _PVName(name).substitute(prefix=self._prefix) + conn_chs.append(pvn.substitute(propty='PwrState-Sts')) + ps_c2v[pvn.substitute(propty='PwrState-Sts')] = 1 + ilk_c2v[pvn.substitute(propty='StatusIntlk-Mon')] = \ + {'value': _PS_LI_INTLK, 'comp': 'lt'} + + f = 'LI-.*:PS-'+filt['dev'] + conn_led = MyLedMultiConnection( + filters=f, parent=panel, channels=conn_chs) + ps_led = MyLedMultiChannel( + filters=f, parent=panel, channels2values=ps_c2v) + if 'Spect' in filt['dev']: + intlk_led = LISpectIntlkLed(panel, filters=f) + else: + intlk_led = MyLedMultiChannel( + filters=f, parent=panel, + channels2values=ilk_c2v) + + suf = sec+filt['dev'].strip('.*')+'_led' + conn_led.setObjectName('conn' + suf) + ps_led.setObjectName('ps' + suf) + intlk_led.setObjectName('intlk' + suf) + + panel_lay.addWidget(ps_label, i, 0) + panel_lay.addWidget(conn_led, i, 1) + panel_lay.addWidget(ps_led, i, 2) + panel_lay.addWidget(intlk_led, i, 3) + i += 1 + else: + l2f = sips2filters if sec == 'SI' else asps2filters + for label, filt in l2f.items(): + filt['sec'] = sec + psnames = PSSearch.get_psnames(filters=filt) + if not psnames: + continue + psconn_chs = list() + ps_c2v = dict() + ilk_c2v = dict() + opm_c2v = dict() + df_c2v = dict() + for name in psnames: + pvn = _PVName(name).substitute(prefix=self._prefix) + ps_c2v[pvn.substitute(propty='PwrState-Sts')] = _on + if name.dis == 'PS': + psconn_chs.append( + pvn.substitute(propty='Version-Cte')) + ilk_c2v[pvn.substitute(propty='IntlkSoft-Mon')] = 0 + ilk_c2v[pvn.substitute(propty='IntlkHard-Mon')] = 0 + opm_pvn = pvn.substitute(propty='OpMode-Sts') + if sec == 'BO': + opm_c2v[opm_pvn] = { + 'value': [_slowref, _rmpwfm], 'comp': 'in'} + else: + opm_c2v[opm_pvn] = _slowref + df_c2v[pvn.substitute(propty='DiagStatus-Mon')] = \ + {'value': 0, 'bit': 5} + elif name.dis == 'PU': + psconn_chs.append( + pvn.substitute(propty='PwrState-Sts')) + intlkcount = 7 if 'Sept' in name.dev else 8 + for idx in range(1, intlkcount+1): + ppty = 'Intlk'+str(idx)+'-Mon' + pvn = pvn.substitute(propty=ppty) + ilk_c2v[pvn] = 1 + + f = sec+'-'+filt['sub']+':'+psnames[0].dis+'-'+filt['dev'] + ps_label = QLabel( + label, panel, + alignment=Qt.AlignRight | Qt.AlignVCenter) + psconn_led = MyLedMultiConnection( + filters=f, parent=panel, channels=psconn_chs) + ps_led = MyLedMultiChannel( + filters=f, parent=panel, channels2values=ps_c2v) + intlk_led = MyLedMultiChannel( + filters=f, parent=panel, channels2values=ilk_c2v) + + suf = sec+filt['dev'].strip('.*')+'_led' + psconn_led.setObjectName('psconn' + suf) + ps_led.setObjectName('ps' + suf) + intlk_led.setObjectName('intlk' + suf) + + panel_lay.addWidget(ps_label, i, 0) + panel_lay.addWidget(psconn_led, i, 1) + panel_lay.addWidget(ps_led, i, 2) + panel_lay.addWidget(intlk_led, i, 3) + + if psnames[0].dis == 'PS': + opm_led = MyLedMultiChannel( + filters=f, parent=panel, + channels2values=opm_c2v) + opm_led.setOnColor(PyDMLed.LightGreen) + opm_led.setOffColor(PyDMLed.Yellow) + diff_led = MyLedMultiChannel( + filters=f, parent=panel, + channels2values=df_c2v) + + opm_led.setObjectName('opm' + suf) + diff_led.setObjectName('diff' + suf) + + panel_lay.addWidget(opm_led, i, 4) + panel_lay.addWidget(diff_led, i, 5) + + i += 1 + panel_lay.addItem(QSpacerItem(1, 10, QSzPlcy.Ignored, + QSzPlcy.MinimumExpanding), i, 0) + i += 1 + + # Current State and Log Tables + table_label2px = { + 'Date': 110, + 'Time': 85, + 'Type': 70, + 'PS Name': 145, + 'Property': 85, + 'Value': 120} + + channels = list() + for ps in PSSearch.get_psnames(filters={'dis': 'PS'}): + channels.append(_PVName(ps).substitute( + prefix=self._prefix, propty='DiagCurrentDiff-Mon')) + channels.append(_PVName(ps).substitute( + prefix=self._prefix, propty='OpMode-Sts')) + self._status = LogTable(cw, channels, table_label2px, is_status=True) + self._status.setObjectName('status_table') + self._status.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn) + self._status.updated.connect(self._filter_table) + self._log = LogTable(cw, channels, table_label2px) + self._log.setObjectName('log_table') + self._log.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn) + self._tables_stack = QStackedLayout() + self._tables_stack.addWidget(self._status) + self._tables_stack.addWidget(self._log) + + self._rb_status = QRadioButton('Status', self) + self._rb_status.setObjectName('rb_status') + self._rb_status.setChecked(True) + self._visible_table = self._status + self._rb_status.toggled.connect(_partial(self._toggle_table, 0)) + self._rb_log = QRadioButton('Log', self) + self._rb_log.setObjectName('rb_log') + self._rb_log.toggled.connect(_partial(self._toggle_table, 1)) + + for name, width in table_label2px.items(): + attr = '_search_'+name.replace(' ', '').lower() + setattr(self, attr, QLineEdit()) + le = getattr(self, attr) + le.setObjectName(name) + le.setPlaceholderText(name + '...') + le.editingFinished.connect(self._filter_table) + width = str(width-1) + if name == 'Value': + le.setStyleSheet( + '#'+name+'{min-width:'+width+'px;}') + le.setSizePolicy(QSzPlcy.Expanding, QSzPlcy.Maximum) + else: + le.setStyleSheet( + '#'+name+'{min-width:'+width+'px; max-width:'+width+'px;}') + le.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum) + + self._scrollup_pb = QPushButton('↟', cw) + self._scrollup_pb.setObjectName('scrollup_pb') + self._scrollup_pb.clicked.connect(self._arrange_table) + + self._scrolldown_pb = QPushButton('↡', cw) + self._scrolldown_pb.setObjectName('scrolldown_pb') + self._scrolldown_pb.clicked.connect(self._arrange_table) + + tables_lay = QGridLayout() + tables_lay.setVerticalSpacing(2) + tables_lay.setHorizontalSpacing(0) + tables_lay.addWidget(self._search_date, 0, 0) + tables_lay.addWidget(self._search_time, 0, 1) + tables_lay.addWidget(self._search_type, 0, 2) + tables_lay.addWidget(self._search_psname, 0, 3) + tables_lay.addWidget(self._search_property, 0, 4) + tables_lay.addWidget(self._search_value, 0, 5) + tables_lay.addWidget(self._scrollup_pb, 0, 6, alignment=Qt.AlignRight) + tables_lay.addLayout(self._tables_stack, 1, 0, 1, 7) + tables_lay.addWidget(self._rb_status, 2, 0, alignment=Qt.AlignLeft) + tables_lay.addWidget(self._rb_log, 2, 1, alignment=Qt.AlignLeft) + tables_lay.addWidget(self._scrolldown_pb, 2, 6, + alignment=Qt.AlignRight) + tables = QWidget(cw) + tables.setObjectName('tables') + tables.setLayout(tables_lay) + + # Connect signals + for led in self.findChildren(QLed): + led.shape = PyDMLed.ShapeMap.Round + led.filterlog.connect(self._filter_table) + led.warning.connect(self._log.add_log_slot) + led.warning.connect(self._status.add_log_slot) + led.normal.connect(self._status.remove_log_slot) + + # Layout + window_title = QLabel('<h2>Power Supplies Diagnostics</h2>', cw, + alignment=Qt.AlignCenter) + layout = QGridLayout() + layout.setVerticalSpacing(20) + layout.setHorizontalSpacing(5) + layout.addWidget(window_title, 0, 0, 1, 2) + layout.addWidget(panel, 1, 0) + layout.addWidget(tables, 1, 1) + + cw.setStyleSheet(""" + #scrollup_pb, #scrolldown_pb{ + max-height: 1em; + max-width: 0.7em; + color: #464646; + } + QLineEdit{ + max-height: 1em; + } + #status_table, #log_table{ + border: 1px solid #bebebe; + } + #tables{ + min-width: 700px; + } + #rb_status, #rb_log{ + min-width: 5em; + max-width: 5em; + max-height: 1em; + }""") + cw.setLayout(layout) + self.setCentralWidget(cw) + + def _arrange_table(self): + text = self.sender().text() + if '↟' in text: + self._visible_table.scrollToTop() + elif '↡' in text: + self._visible_table.scrollToBottom() + + def _filter_table(self, text=''): + # identify first user interaction + if isinstance(self.sender(), (QLineEdit, QLed)): + self._initialized = True + # ignore initializing + if not self._initialized: + return + # set led's filter + if isinstance(self.sender(), QLed): + self.blockSignals(True) + self._search_psname.setText(text) + self.blockSignals(False) + + # get search filters + pats = list() + date_txt = self._search_date.text() + time_txt = self._search_time.text() + logtype_txt = self._search_type.text() + psname_txt = self._search_psname.text() + property_txt = self._search_property.text() + value_txt = self._search_value.text() + try: + if date_txt: + pats.append([_re.compile(date_txt, _re.I), 0]) + if time_txt: + pats.append([_re.compile(time_txt, _re.I), 1]) + if logtype_txt: + pats.append([_re.compile(logtype_txt, _re.I), 2]) + if psname_txt: + pats.append([_re.compile(psname_txt, _re.I), 3]) + if property_txt: + pats.append([_re.compile(property_txt, _re.I), 4]) + if value_txt: + pats.append([_re.compile(value_txt, _re.I), 5]) + except Exception: + return + + m = self._visible_table.model() + for row in range(m.rowCount()): + for pat, col in pats: + if not pat.search(m.data(m.index(row, col))): + self._visible_table.setRowHidden( + row, self._visible_table.rootIndex(), True) + break + else: + self._visible_table.setRowHidden( + row, self._visible_table.rootIndex(), False) + + def _toggle_table(self, i, toggle): + if not toggle: + return + + self._tables_stack.setCurrentIndex(i) + if i == 0: + self._log.updated.disconnect(self._filter_table) + self._status.updated.connect(self._filter_table) + self._visible_table = self._status + else: + self._status.updated.disconnect(self._filter_table) + self._log.updated.connect(self._filter_table) + self._visible_table = self._log + self._filter_table()
+ + + +
+[docs] +class LogTable(QTreeView, PyDMWidget): + """Log Table.""" + + updated = Signal() + + def __init__(self, parent=None, channels=list(), label2width=dict(), + is_status=False): + # QTableView.__init__(self, parent) + QTreeView.__init__(self, parent) + PyDMWidget.__init__(self) + + # setup table + self._is_status = is_status + self._date_fmt = ' %Y/%m/%d ' + self._time_fmt = ' %H:%M:%S ' + self.headerLabels = label2width.keys() + self._model = QStandardItemModel() + self._model.setHorizontalHeaderLabels(self.headerLabels) + self.setModel(self._model) + self.setUniformRowHeights(True) + self.setHeader(QHeaderView(Qt.Horizontal)) + for idx, width in enumerate(label2width.values()): + self.header().resizeSection(idx, width) + self.header().resizeSections(QHeaderView.Fixed) + self.header().setStretchLastSection(True) + self.setSortingEnabled(True) + self.setEditTriggers(QAbstractItemView.NoEditTriggers) + self.setItemDelegateForColumn(2, LogItemDelegate(self)) + self.setSelectionBehavior(QAbstractItemView.SelectItems) + self.setSelectionMode(QAbstractItemView.SingleSelection) + self.setStyleSheet("gridline-color: #ffffff;") + + # set channels + self.address2conn = dict() + self.address2channels = dict() + for address in channels: + self.address2conn[address] = False + channel = SiriusConnectionSignal( + address=address, + connection_slot=self.connection_changed, + value_slot=self.value_changed, + severity_slot=self.alarm_severity_changed) + channel.connect() + self.address2channels[address] = channel + self._channels.append(channel) + +
+[docs] + @Slot(bool) + def connection_changed(self, conn): + """Reimplement connection_changed to handle all channels.""" + address = self.sender().address + self.address2conn[address] = conn + allconn = True + for conn in self.address2conn.values(): + allconn &= conn + self.setState(allconn) + self._connected = allconn
+ + +
+[docs] + def add_log_slot(self, updated): + new_value = self._get_newitem_data(updated) + if not new_value: + return + self.add_log(new_value)
+ + +
+[docs] + def add_log(self, new_value): + if self._is_status: + self.remove_log(new_value) + + datetime_now = _datetime.now() + item_data = [QStandardItem(text) for text in ( + datetime_now.date().strftime(self._date_fmt), + datetime_now.time().strftime(self._time_fmt), + new_value['logtype'], new_value['psname'], + new_value['propty'], new_value['value'])] + for item in item_data: + item.setTextAlignment(Qt.AlignCenter) + + self._model.insertRow(0, item_data) + if self._model.rowCount() > 10000: + self._model.removeRow(self._model.rowCount()-1) + self.updated.emit()
+ + +
+[docs] + def remove_log_slot(self, updated): + new_value = self._get_newitem_data(updated) + if not new_value: + return + self.remove_log(new_value)
+ + +
+[docs] + def remove_log(self, new_value): + for row in range(self._model.rowCount()): + logtype = self._model.data(self._model.index(row, 2)) + if logtype != new_value['logtype']: + continue + psname = self._model.data(self._model.index(row, 3)) + if psname != new_value['psname']: + continue + propty = self._model.data(self._model.index(row, 4)) + if propty != new_value['propty']: + continue + self._model.removeRow(row) + self.updated.emit()
+ + +
+[docs] + def alarm_severity_changed(self, new_alarm_severity): + """Reimplement alarm_severity_changed.""" + if self.sender(): + pv_diff = _PVName(self.sender().address) + val_diff = self.address2channels[pv_diff].value + + pv_opmd = pv_diff.substitute( + propty_name='OpMode', propty_suffix='Sts') + val_opmd = self.address2channels[pv_opmd].value + is_slowref = val_opmd == _PSConst.States.SlowRef + + new_value = {'logtype': 'WARN', 'psname': pv_diff.device_name, + 'propty': pv_diff.propty_name, 'value': str(val_diff)} + if new_alarm_severity in [_Sev.MINOR_ALARM, _Sev.MAJOR_ALARM] and \ + is_slowref: + self.add_log(new_value) + elif self._is_status: + self.remove_log(new_value) + + super().alarm_severity_changed(new_alarm_severity)
+ + + def _get_newitem_data(self, updated): + pv, value = updated + pv = _PVName(pv) + if isinstance(value, _np.ndarray): + _log.warning('PSDiag window received a numpy array to ' + + pv+' ('+str(value)+')!') + return + + if value is None: + return + if 'conn' in self.sender().objectName(): + str_value = 'disconnected' + logtype = 'DISCONN' + elif pv.propty_name == 'PwrState': + str_value = _PSEnums.PWRSTATE_STS[value] + logtype = 'ERR' + elif pv.propty_name == 'OpMode': + str_value = _PSEnums.STATES[value] + logtype = 'WARN' + else: + str_value = str(value) + logtype = 'ERR' + + return {'logtype': logtype, + 'psname': pv.device_name, + 'propty': '' if logtype == 'DISCONN' else pv.propty_name, + 'value': str_value} + +
+[docs] + def mouseDoubleClickEvent(self, ev): + """Trigger open PS detail window.""" + idx = self.selectedIndexes() + text = self._model.data(self._model.index(idx[0].row(), 3)) + text = _PVName(text) + if text.dis == 'PS': + _run_newprocess(['sirius-hla-as-ps-detail.py', text]) + elif text.dis == 'PU': + _run_newprocess(['sirius-hla-as-pu-detail.py', text]) + super().mouseDoubleClickEvent(ev)
+
+ + + +
+[docs] +class LogItemDelegate(QItemDelegate): + """Log Item Delegate.""" + +
+[docs] + def paint(self, painter, option, index): + """Paint.""" + logtype = self.parent().model().data( + index.sibling(index.row(), 2)) + if logtype.upper() == 'WARN': + painter.fillRect(option.rect, PyDMLed.Yellow) + elif logtype.upper() == 'ERR': + painter.fillRect(option.rect, PyDMLed.Red) + elif logtype.upper() == 'DISCONN': + painter.fillRect(option.rect, PyDMLed.Gray) + + QItemDelegate.paint(self, painter, option, index)
+
+ + + +
+[docs] +def create_led_class(type='multichannel'): + if type == 'multichannel': + led_class = PyDMLedMultiChannel + else: + led_class = PyDMLedMultiConnection + + class MyLed(led_class): + + filterlog = Signal(str) + + def __init__(self, filters, **kwargs): + super().__init__(**kwargs) + self.filter = filters + + def mouseDoubleClickEvent(self, ev): + self.filterlog.emit(self.filter) + + return MyLed
+ + + +MyLedMultiChannel = create_led_class('multichannel') +MyLedMultiConnection = create_led_class('multiconn') +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_diag/monitor.html b/_modules/siriushla/as_ps_diag/monitor.html new file mode 100644 index 000000000..17aa241c0 --- /dev/null +++ b/_modules/siriushla/as_ps_diag/monitor.html @@ -0,0 +1,429 @@ + + + + + + siriushla.as_ps_diag.monitor — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_ps_diag.monitor

+"""Interface to handle general status."""
+
+import numpy as _np
+import logging as _log
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGroupBox, QGridLayout, QLabel
+
+from pydm.widgets.base import PyDMWidget
+
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.diagsys.psdiag.csdev import get_ps_diag_status_labels
+from siriuspy.diagsys.pudiag.csdev import get_pu_diag_status_labels
+from siriuspy.diagsys.lidiag.csdev import get_li_diag_status_labels
+from siriuspy.diagsys.rfdiag.csdev import get_rf_diag_status_labels
+from siriuspy.namesys import SiriusPVName
+from siriuspy.util import get_bit
+
+from siriushla.widgets import PyDMLed
+from siriushla.widgets.dialog.pv_status_dialog import StatusDetailDialog
+from siriushla.util import run_newprocess
+from .util import get_label2devices, get_dev2sub_labels, get_col2dev_count, \
+    get_sec2dev_laypos
+
+
+
+[docs] +class PSMonitor(QWidget): + """PS Monitor.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX, + get_label2devices_method=None, + get_dev2sublabels_method=None, + get_col2devcount_method=None, + get_sec2devlaypos_method=None): + """Init.""" + super().__init__(parent) + self._prefix = prefix + self.get_label2devices = \ + get_label2devices_method or get_label2devices + self.get_dev2sub_labels = \ + get_dev2sublabels_method or get_dev2sub_labels + self.get_col2dev_count = \ + get_col2devcount_method or get_col2dev_count + self.get_sec2dev_laypos = \ + get_sec2devlaypos_method or get_sec2dev_laypos + self.setObjectName('ASApp') + self._setupUi() + + def _setupUi(self): + self.title = QLabel('<h2>PS & PU</h2>', + alignment=Qt.AlignCenter) + self.title.setStyleSheet('max-height:1.29em;') + + layout = QGridLayout(self) + layout.setHorizontalSpacing(12) + + layout.addWidget(self.title, 0, 0, 1, 2) + for sec in ['LI', 'TB', 'BO', 'TS', 'SI']: + status = self._make_groupbox(sec) + if sec == 'LI': + layout.addWidget(status, 1, 0) + elif sec == 'TB': + layout.addWidget(status, 1, 1) + elif sec == 'BO': + layout.addWidget(status, 2, 0) + elif sec == 'TS': + layout.addWidget(status, 2, 1) + elif sec == 'SI': + layout.addWidget(status, 3, 0, 1, 2) + layout.setColumnStretch(0, 6) + layout.setColumnStretch(1, 5) + + self.setStyleSheet(""" + QLed { + min-height: 1.1em; max-height: 1.1em; + min-width: 1.1em; max-width: 1.1em;} + """) + + def _make_groupbox(self, sec): + status = QGroupBox(sec, self) + status_lay = QGridLayout() + status_lay.setAlignment(Qt.AlignTop) + status.setStyleSheet("QLabel{max-height: 1.4em;}") + status.setLayout(status_lay) + + def update_gridpos(row, col, col_count, offset=0): + new_col = offset if col == offset+col_count-1 else col+1 + new_row = row+1 if new_col == offset else row + return [new_row, new_col] + + row, col = 0, 0 + for label, devices in self.get_label2devices(sec).items(): + if not devices: + continue + grid = QGridLayout() + grid.setVerticalSpacing(6) + grid.setHorizontalSpacing(6) + if sec == 'BO' and label in ['CH', 'CV']: + desc = QLabel(label, self, alignment=Qt.AlignRight) + grid.addWidget(desc, 0, 0) + for i in range(5): + lbh = QLabel('{0:02d}'.format(i*2+1), + self, alignment=Qt.AlignRight) + lbh.setStyleSheet("QLabel{max-width:2em;}") + grid.addWidget(lbh, 0, i+1) + lbv = QLabel('{0:02d}'.format(i*10), + self, alignment=Qt.AlignRight) + lbv.setStyleSheet("QLabel{max-width:2em;}") + grid.addWidget(lbv, i+1, 0) + aux_row, aux_col, offset = 1, 1, 1 + if label == 'CV': + aux = devices.pop(-1) + devices.insert(0, aux) + elif sec == 'SI': + if label not in ['FCH', 'FCV']: + aux = devices.pop(-1) + devices.insert(0, aux) + if label == 'Trims': + aux = devices.pop(-1) + devices.insert(0, aux) + if label in ['QS', 'FCV']: + for i in range(1, 21): + lb = QLabel('{0:02d}'.format(i), self) + grid.addWidget(lb, i+1, (0 if label == 'QS' else 5)) + if label in ['QS', 'CH', 'CV', 'Trims', 'FCH', 'FCV']: + aux_row, aux_col = 2, (1 if label == 'QS' else 0) + offset = (1 if label == 'QS' else 0) + i = 0 + for text in self.get_dev2sub_labels(label): + lbh = QLabel(text, self, alignment=Qt.AlignCenter) + grid.addWidget(lbh, 1, offset+i) + i += 1 + else: + aux_row, aux_col, offset = 1, 0, 0 + grid.addWidget(QLabel(label, self), 0, offset, 1, 4) + else: + grid.addWidget(QLabel(label, self), 0, 0, 1, 4) + aux_row, aux_col, offset = 1, 0, 0 + for name in devices: + if label == 'Trims' and aux_row in (2, 6, 10, 14, 18) \ + and aux_col in (0, 3): + grid.addWidget(QLabel(''), aux_row, aux_col) + aux_col += 1 + elif label in ['FCH', 'FCV'] and aux_row == 2 and aux_col == 0: + grid.addWidget(QLabel(''), aux_row, aux_col, 1, 2) + aux_col += 2 + led = MyLed(self, SiriusPVName(name).substitute( + prefix=self._prefix, propty='DiagStatus-Mon'), name) + grid.addWidget(led, aux_row, aux_col) + aux_row, aux_col = update_gridpos( + aux_row, aux_col, self.get_col2dev_count(sec, label), + offset) + row, col, rowc, colc = self.get_sec2dev_laypos(sec, label) + status_lay.addLayout(grid, row, col, rowc, colc, + alignment=Qt.AlignTop) + + if sec == 'LI': + status_lay.setColumnStretch(0, 2) + status_lay.setColumnStretch(1, 5) + status_lay.setColumnStretch(2, 7) + status_lay.setColumnStretch(3, 3) + status_lay.setColumnStretch(4, 2) + status_lay.setVerticalSpacing(12) + status_lay.setHorizontalSpacing(16) + elif sec == 'SI': + status_lay.setColumnStretch(0, 1) + status_lay.setColumnStretch(1, 2) + status_lay.setColumnStretch(2, 2) + status_lay.setColumnStretch(3, 3) + status_lay.setColumnStretch(4, 3) + status_lay.setColumnStretch(5, 8) + status_lay.setColumnStretch(6, 14) + status_lay.setColumnStretch(7, 3) + status_lay.setColumnStretch(8, 4) + status_lay.setColumnStretch(9, 4) + status_lay.setVerticalSpacing(12) + status_lay.setHorizontalSpacing(12) + else: + status_lay.setVerticalSpacing(12) + status_lay.setHorizontalSpacing(16) + + return status
+ + + +
+[docs] +class MyLed(PyDMLed): + """Monitor Led.""" + + default_colorlist = [PyDMLed.LightGreen, PyDMLed.Yellow, PyDMLed.Red] + + def __init__(self, parent=None, init_channel=None, init_tooltip='', **kws): + super().__init__(parent, **kws) + self.setToolTip(init_tooltip) + self.channel = init_channel + + self.pvname = SiriusPVName(self.channels()[0].address) + dev = self.pvname.device_name + + self.labels = list() + if self.pvname.dis == 'PS': + self.labels = get_ps_diag_status_labels(dev) + elif self.pvname.sec == 'LI': + self.labels = get_li_diag_status_labels(dev) + elif self.pvname.dis == 'PU': + self.labels = get_pu_diag_status_labels() + elif self.pvname.dis == 'RF': + self.labels = get_rf_diag_status_labels(dev) + + self.dc_command = '' + if dev.dis == 'PS': + self.dc_command = ['sirius-hla-as-ps-detail.py', dev] + elif dev.dis == 'PU': + if dev.sec == 'LI': + self.dc_command = 'sirius-hla-li-pu-modltr.py' + else: + self.dc_command = ['sirius-hla-as-pu-detail.py', dev] + elif dev.dis == 'RF': + if dev.sec == 'LI': + self.dc_command = 'sirius-hla-li-rf-llrf.py' + else: + sec = self.pvname.sec.lower() + self.dc_command = 'sirius-hla-'+sec+'-rf-control.py' + elif dev.dis == 'EG': + self.dc_command = 'sirius-hla-li-eg-control.py' + +
+[docs] + def mouseDoubleClickEvent(self, _): + """Reimplement mouseDoubleClickEvent.""" + if self.dc_command: + run_newprocess(self.dc_command)
+ + +
+[docs] + def mousePressEvent(self, event): + """Reimplement mousePressEvent.""" + if event.button() == Qt.RightButton and self.labels: + self.msg = StatusDetailDialog( + parent=self.parent(), pvname=self.pvname, + labels=self.labels) + self.msg.open() + super().mousePressEvent(event)
+ + +
+[docs] + def value_changed(self, new_val): + PyDMWidget.value_changed(self, new_val) + if new_val is None: + return + if isinstance(new_val, _np.ndarray): + _log.warning('PyDMLed received a numpy array to ' + + self.channel+' ('+str(new_val)+')!') + return + + bits_set = [text for bit, text in enumerate(self.labels) + if get_bit(int(new_val), bit)] + state = 0 if len(bits_set) == 0 \ + else 1 if len(bits_set) == 1 and \ + bits_set[0] in ['Alarms', 'Alarms - Latch'] else 2 + self.setState(state)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_diag/ps_graph_mon.html b/_modules/siriushla/as_ps_diag/ps_graph_mon.html new file mode 100644 index 000000000..4bd81b049 --- /dev/null +++ b/_modules/siriushla/as_ps_diag/ps_graph_mon.html @@ -0,0 +1,958 @@ + + + + + + siriushla.as_ps_diag.ps_graph_mon — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ps_diag.ps_graph_mon

+"""PS Graph Monitor."""
+import time as _time
+from copy import deepcopy as _dcopy
+from concurrent.futures import ThreadPoolExecutor
+import numpy as _np
+import epics
+
+from qtpy.QtCore import Qt, QSize, Slot, Signal, QThread
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QGridLayout, QWidget, QLabel, QHBoxLayout, \
+    QComboBox, QToolTip, QSpacerItem, QSizePolicy as QSzPlcy, QInputDialog, \
+    QAction, QMenu
+import qtawesome as qta
+from pyqtgraph import mkPen, mkBrush
+from pydm.connection_inspector import ConnectionInspector
+
+from siriuspy.util import get_strength_label
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName
+from siriuspy.search import PSSearch as _PSSearch, \
+    MASearch as _MASearch
+from siriuspy.pwrsupply.csdev import Const as _PSConst
+
+from siriushla.util import run_newprocess
+from siriushla.widgets import SiriusMainWindow, SiriusWaveformPlot
+
+
+
+[docs] +class PSGraphMonWindow(SiriusMainWindow): + """Power supply graph monitor window.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, filters=''): + super().__init__(parent) + self.setWindowTitle('Power Supplies Graph Monitor') + self._prefix = prefix + self._filters = filters + if not filters: + self.setObjectName('ASApp') + filters = {'sec': 'SI', 'dis': 'PS', 'dev': 'CH'} + else: + self.setObjectName(filters['sec']+'App') + self._psnames = _PSSearch.get_psnames(filters) + self._magfunc = _PSSearch.conv_psname_2_magfunc(self._psnames[0]) + self._pstype = _PSSearch.conv_psname_2_pstype(self._psnames[0]) + self._setupUi() + + def _setupUi(self): + aux_label = '' if not self._filters \ + else ' - '+self._filters['sec']+' '+self._filters['dev'] + self._label = QLabel('<h3>PS Graph Monitor'+aux_label+'</h3>', + self, alignment=Qt.AlignCenter) + + self.propty_sel = PSGraphProptySelWidget(self) + self.propty_sel.change_matype(self._magfunc, self._pstype) + + self.graph = PSGraphMonWidget( + self, self._prefix, self._psnames) + self.propty_sel.propty_symb_changed.connect( + self.graph.update_property_symb) + self.propty_sel.propty_line_changed.connect( + self.graph.update_property_line) + + if not self._filters: + self.dev_sel = PSGraphDevicesSelWidget(self, self._psnames) + self.dev_sel.matype_changed.connect(self.propty_sel.change_matype) + self.dev_sel.psnames_changed.connect(self.graph.update_psnames) + + cwid = QWidget() + lay = QGridLayout(cwid) + lay.setVerticalSpacing(9) + lay.addWidget(self._label, 0, 0, 1, 2) + if not self._filters: + lay.addWidget(self.dev_sel, 1, 0) + lay.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Ignored), 1, 1) + lay.addWidget(self.propty_sel, 2, 0) + lay.addItem( + QSpacerItem(1, 1, QSzPlcy.Expanding, QSzPlcy.Ignored), 2, 1) + lay.addWidget(self.graph, 3, 0, 1, 2) + lay.setColumnStretch(0, 1) + lay.setColumnStretch(1, 1) + self.setCentralWidget(cwid) + +
+[docs] + def contextMenuEvent(self, event): + point = event.pos() + menu = self.graph.contextMenuEvent(event, return_menu=True) + menu.addSeparator() + action = menu.addAction('Show Connections...') + action.triggered.connect(self.show_connections) + menu.popup(self.mapToGlobal(point))
+ + +
+[docs] + def show_connections(self, checked): + """.""" + _ = checked + conn = ConnectionInspector(self) + conn.show()
+
+ + + +
+[docs] +class PSGraphDevicesSelWidget(QWidget): + """Power supply selection widget.""" + + psnames_changed = Signal(list) + matype_changed = Signal(str, str) + + def __init__(self, parent, psnames): + super().__init__(parent) + + self._psnames = psnames + + self._choose_sec = ['TB', 'BO', 'TS', 'SI'] + + self._choose_sub = ['All', ] + self._choose_sub.extend(['{0:02d}.*'.format(i+1) for i in range(20)]) + self._choose_sub.extend(['.*M1', '.*M2', + '.*C1', '.*C2', '.*C3', '.*C4', + '.*SA', '.*SB', '.*SP']) + + self._choose_dev = { + sec: ['CH', 'CV', 'C(H|V)'] for sec in self._choose_sec} + self._choose_dev['SI'].extend( + ['QS', 'QFA', 'QFB', 'QFP', 'QF.*', + 'QDA', 'QDB1', 'QDB2', 'QDP1', 'QDP2', 'QD.*', + 'Q1', 'Q2', 'Q3', 'Q4', 'Q[1-4]', + 'Q(D|F).*', 'Q(F|D|[1-4]).*', + 'FCH', 'FCV', 'FC(H|V)']) + + self.magfunc = _PSSearch.conv_psname_2_magfunc(self._psnames[0]) + self.pytype = _PSSearch.conv_psname_2_pstype(self._psnames[0]) + + self._setupUi() + + def _setupUi(self): + self._label_dev = QLabel('Power supply: ', self) + self._label_dev.setStyleSheet( + 'min-width: 8em; max-width: 8em;') + + self.cb_sec = QComboBox(self) + for item in self._choose_sec: + self.cb_sec.addItem(item) + self.cb_sec.setCurrentText('SI') + self.cb_sec.currentTextChanged.connect( + self._handle_cb_visibility) + self.cb_sec.currentTextChanged.connect( + self._set_psnames) + + self.cb_sub = QComboBox(self) + self.cb_sub.setEditable(True) + self.cb_sub.setMaxVisibleItems(10) + for item in self._choose_sub: + self.cb_sub.addItem(item) + self.cb_sub.currentTextChanged.connect( + self._set_psnames) + + glay_choose = QGridLayout() + glay_choose.addWidget(self.cb_sub, 0, 0) + self.cb_dev = dict() + for sec in self._choose_sec: + visible = sec == 'SI' + + self.cb_dev[sec] = QComboBox(self) + self.cb_dev[sec].setMaxVisibleItems(10) + self.cb_dev[sec].setVisible(visible) + for item in self._choose_dev[sec]: + self.cb_dev[sec].addItem(item) + self.cb_dev[sec].currentTextChanged.connect( + self._set_psnames) + + glay_choose.addWidget(self.cb_dev[sec], 0, 1) + + lay = QGridLayout(self) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(self._label_dev, 0, 0) + lay.addWidget(self.cb_sec, 0, 1) + lay.addLayout(glay_choose, 0, 2) + + def _set_psnames(self): + sec = self.cb_sec.currentText() + if sec == 'SI': + sub = self.cb_sub.currentText() + sub = sub if sub != 'All' else '.*' + else: + sub = '.*' + dev = self.cb_dev[sec].currentText() + + self._psnames = _PSSearch.get_psnames( + {'sec': sec, 'sub': '(?!Fam)'+sub, 'dis': 'PS', 'dev': dev}) + + if self._psnames and self.sender() == self.cb_dev[sec]: + self.magfunc = _PSSearch.conv_psname_2_magfunc(self._psnames[0]) + self.pytype = _PSSearch.conv_psname_2_pstype(self._psnames[0]) + self.matype_changed.emit(self.magfunc, self.pytype) + + self.psnames_changed.emit(self._psnames) + + def _handle_cb_visibility(self): + current_sec = self.sender().currentText() + self.cb_sub.setVisible(current_sec == 'SI') + for sec in self._choose_sec: + self.cb_dev[sec].setVisible(current_sec == sec)
+ + + +
+[docs] +class PSGraphProptySelWidget(QWidget): + """Power supply property selection widget.""" + + propty_symb_changed = Signal(str) + propty_line_changed = Signal(str) + + PROP_SYMB_DEFAULT = [ + 'DiagStatus-Mon', 'IntlkSoft-Mon', 'IntlkHard-Mon', + 'PwrState-Sel', 'PwrState-Sts', 'OpMode-Sel', 'OpMode-Sts', + 'CtrlMode-Mon', 'CtrlLoop-Sel', 'CtrlLoop-Sts', 'CycleEnbl-Mon'] + PROP_LINE_DEFAULT = [ + 'Current-Mon', 'Current-SP', 'Current-RB', 'CurrentRef-Mon', + 'DiagCurrentDiff-Mon', 'WfmSyncPulseCount-Mon', + 'PRUCtrlQueueSize-Mon'] + PROP_SYMB_FASTCORR = [ + 'DiagStatus-Mon', 'AlarmsAmp-Mon', 'AlarmsAmpLtc-Mon', + 'PwrState-Sel', 'PwrState-Sts'] + PROP_LINE_FASTCORR = [ + 'Current-Mon', 'Current-SP', 'Current-RB', 'CurrentRef-Mon', + 'DiagCurrentDiff-Mon'] + + def __init__(self, parent): + super().__init__(parent) + + self._magfunc = None + self._pstype = None + self._intstr_propty = '' + self._intstr_suffix = ['-Mon', '-SP', '-RB', 'Ref-Mon'] + + self._choose_prop_symb = PSGraphProptySelWidget.PROP_SYMB_DEFAULT + self._choose_prop_line = PSGraphProptySelWidget.PROP_LINE_DEFAULT + + self._setupUi() + + def _setupUi(self): + self._label_prop = QLabel('Properties: ', self) + self._label_prop.setStyleSheet( + 'min-width: 8em; max-width: 8em;') + + self._label_symb = QLabel() + icon = qta.icon('mdi.record-circle-outline') + pixmap = icon.pixmap(icon.actualSize(QSize(20, 20))) + self._label_symb.setPixmap(pixmap) + self._label_symb.setSizePolicy(QSzPlcy.Fixed, QSzPlcy.Fixed) + self.cb_prop_symb = QComboBox(self) + self.cb_prop_symb.currentTextChanged.connect( + self.propty_symb_changed.emit) + self.cb_prop_symb.setSizePolicy( + QSzPlcy.Expanding, QSzPlcy.Preferred) + self.cb_prop_symb.setMaxVisibleItems(10) + self.cb_prop_symb.addItems(self._choose_prop_symb) + hbox_prop_symb = QHBoxLayout() + hbox_prop_symb.addWidget(self._label_symb) + hbox_prop_symb.addWidget(self.cb_prop_symb) + + self._label_line = QLabel() + icon = qta.icon('mdi.pulse') + pixmap = icon.pixmap(icon.actualSize(QSize(20, 20))) + self._label_line.setPixmap(pixmap) + self._label_line.setSizePolicy(QSzPlcy.Fixed, QSzPlcy.Fixed) + self.cb_prop_line = QComboBox(self) + self.cb_prop_line.currentTextChanged.connect( + self.propty_line_changed.emit) + self.cb_prop_line.setSizePolicy( + QSzPlcy.Expanding, QSzPlcy.Preferred) + self.cb_prop_line.setMaxVisibleItems(10) + self.cb_prop_line.addItems(self._choose_prop_line) + hbox_prop_line = QHBoxLayout() + hbox_prop_line.addWidget(self._label_line) + hbox_prop_line.addWidget(self.cb_prop_line) + + lay = QGridLayout(self) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(self._label_prop, 0, 0) + lay.addLayout(hbox_prop_symb, 0, 1) + lay.addLayout(hbox_prop_line, 0, 2) + +
+[docs] + def change_matype(self, magfunc, pstype): + """Change MA type.""" + currline = self.cb_prop_line.currentText() + currlineidx = self.cb_prop_line.currentIndex() + currsymb = self.cb_prop_symb.currentText() + self._magfunc = magfunc + self._pstype = pstype + if 'si-corrector-fc' in self._pstype: + self._choose_prop_symb = PSGraphProptySelWidget.PROP_SYMB_FASTCORR + self._choose_prop_line = PSGraphProptySelWidget.PROP_LINE_FASTCORR + else: + self._choose_prop_symb = PSGraphProptySelWidget.PROP_SYMB_DEFAULT + self._choose_prop_line = PSGraphProptySelWidget.PROP_LINE_DEFAULT + + self.cb_prop_symb.clear() + self.cb_prop_symb.addItems(self._choose_prop_symb) + self.cb_prop_line.clear() + self.cb_prop_line.addItems(self._choose_prop_line) + self._intstr_propty = get_strength_label(self._magfunc) + for suf in self._intstr_suffix: + self.cb_prop_line.addItem(self._intstr_propty+suf) + + if currline in self._choose_prop_line: + self.cb_prop_line.setCurrentText(currline) + elif currlineidx <= self.cb_prop_line.count(): + self.cb_prop_line.setCurrentIndex(currlineidx) + if currsymb in self._choose_prop_symb: + self.cb_prop_symb.setCurrentText(currsymb)
+
+ + + +
+[docs] +class PSGraph(SiriusWaveformPlot): + """Power supply data graph.""" + + def __init__(self, parent=None, psnames=list(), y_data=list(), + symbols=list(), color='blue'): + """Init.""" + super().__init__(parent) + self.setBackgroundColor(QColor(255, 255, 255)) + self.setAutoRangeX(True) + self.setAutoRangeY(True) + self.setShowXGrid(True) + self.setShowYGrid(True) + self.plotItem.setLabel('bottom', 's', units='m') + self.plotItem.setLabel('left', ' ') + self._nok_pen = mkPen(QColor(color)) + self._nok_brush = mkBrush(QColor(255, 0, 0)) + self._ok_pen = mkPen(QColor(color)) + self._ok_brush = mkBrush(QColor(0, 200, 0)) + self._none_pen = mkPen(QColor(color)) + self._none_brush = mkBrush(QColor(220, 220, 220)) + self._all_pen = [self._nok_pen, ] + self._all_brush = [self._nok_brush, ] + + self.addChannel( + y_channel='Mean', x_channel='Pos', color='black', + lineStyle=2, lineWidth=2) + self.mean = self.curveAtIndex(0) + + self.addChannel( + y_channel='Kicks', x_channel='Pos', color=color, + lineWidth=2, symbol='o', symbolSize=10) + self.curve = self.curveAtIndex(1) + + self.redraw_timer.timeout.disconnect() + + self.psnames = psnames + self.symbols = symbols + self.y_data = y_data + + @property + def psnames(self): + """Return psnames.""" + return _dcopy(self._psnames) + + @psnames.setter + def psnames(self, new): + if not new: + self._psnames = new + self._x_data = _np.array([0, ]) + self._tooltips = ['', ] + self._sector = '' + else: + self._x_data = _np.array(_MASearch.get_mapositions(map( + lambda x: x.substitute(dis='MA'), new))) + self._psnames = [psn for _, psn in sorted(zip(self._x_data, new))] + self._x_data = _np.sort(self._x_data) + self._tooltips = [ + psn.get_nickname(dev=True) for psn in self._psnames] + self._sector = SiriusPVName(new[0]).sec + + if self._sector == 'TB': + self._c0 = 21.2477 + elif self._sector == 'TS': + self._c0 = 26.8933 + elif self._sector == 'BO': + self._c0 = 496.8 + elif self._sector == 'SI': + self._c0 = 518.396 + else: + self._c0 = 1.0 + + self.curve.receiveXWaveform(self._x_data) + self.mean.receiveXWaveform(self._x_data) + + @property + def sector(self): + """Return sector.""" + return self._sector + + @property + def tooltips(self): + """Return tooltips.""" + return self._tooltips + + @property + def x_data(self): + """Return x_data.""" + return self._x_data + + @property + def y_data(self): + """Return y_data.""" + return self._y_data + + @y_data.setter + def y_data(self, new): + if not new or any([n is None for n in new]): + self._y_data = _np.array([0, ]) + else: + self._y_data = _np.array(new) + + self.curve.receiveYWaveform(self._y_data) + self.curve.opts['symbolPen'] = self._all_pen + self.curve.opts['symbolBrush'] = self._all_brush + self.curve.redrawCurve() + + self.mean.receiveYWaveform( + _np.array([_np.mean(self._y_data)]*len(self._y_data))) + self.mean.redrawCurve() + + @property + def symbols(self): + """Return symbols.""" + return self._symbols + + @symbols.setter + def symbols(self, new): + self._symbols = new + if new: + all_brush, all_pen = [], [] + for sym in self._symbols: + if sym: + all_pen.append(self._ok_pen) + all_brush.append(self._ok_brush) + else: + all_pen.append(self._nok_pen) + all_brush.append(self._nok_brush) + self._all_pen = all_pen + self._all_brush = all_brush + else: + self._all_pen = [self._none_pen, ] + self._all_brush = [self._none_brush, ] + +
+[docs] + def mouseMoveEvent(self, event): + """Reimplement mouseMoveEvent.""" + pos = event.pos() + posx = self.curve.scatter.mapFromScene(pos).x() + posx = posx % self._c0 + ind = _np.argmin(_np.abs(_np.array(self._x_data)-posx)) + txt = '{0:s}, x = {1:.3f} m'.format(self.tooltips[ind], posx) + QToolTip.showText( + self.mapToGlobal(pos), txt, self, self.geometry(), 500) + super().mouseMoveEvent(event)
+ + +
+[docs] + def mouseDoubleClickEvent(self, event): + """Reimplement mouseDoubleClickEvent.""" + posx = self.curve.xData + view = self.plotItem.getViewBox() + pos = view.mapSceneToView(event.pos()) + idx = _np.argmin(_np.abs(posx-pos.x())) + psname = self._psnames[idx] + self._open_ps_detail(psname) + super().mouseDoubleClickEvent(event)
+ + + def _open_ps_detail(self, psname): + """Open PSDetailWindow.""" + run_newprocess(['sirius-hla-as-ps-detail.py', psname])
+ + + +
+[docs] +class PSGraphMonWidget(QWidget): + """Power supply graph monitor widget.""" + + propLineChanged = Signal(str) + propSymbChanged = Signal(str) + psnamesChanged = Signal(list) + + def __init__(self, parent=None, prefix=_vaca_prefix, psnames=''): + super().__init__(parent) + + self._prefix = prefix + self._psnames = psnames + self._property_line = 'Current-Mon' + self._property_symb = 'DiagStatus-Mon' + + self._pvhandler = _PVHandler(self._psnames, self._prefix, self) + + self._setupUi() + self._create_commands() + + epics.ca.use_initial_context() + self._thread = _UpdateGraphThread( + self._property_line, self._property_symb, self._pvhandler, + parent=self) + self.propLineChanged.connect(self._thread.set_property_line) + self.propSymbChanged.connect(self._thread.set_property_symb) + self._thread.dataChanged.connect(self._update_graph) + self._thread.start() + + def _setupUi(self): + self.graph = PSGraph(self, self._psnames) + self.graph.setObjectName('graph') + + lay = QGridLayout(self) + lay.addWidget(self.graph, 0, 0) + + self.setStyleSheet('#graph{min-width:60em;min-height:12em;}') + +
+[docs] + def update_psnames(self, psnames): + """Update psnames.""" + self.graph.psnames = _dcopy(psnames) + self._psnames = self.graph.psnames + self._pvhandler.set_psnames(self._psnames)
+ + +
+[docs] + @Slot(str) + def update_property_line(self, text): + """Update property line.""" + self._property_line = text + self.propLineChanged.emit(text)
+ + +
+[docs] + @Slot(str) + def update_property_symb(self, text): + """Update property symbol.""" + self._property_symb = text + self.propSymbChanged.emit(text)
+ + + def _update_graph(self, symbols, y_data): + if len(self._psnames) != len(symbols): + return + self.graph.symbols = symbols + self.graph.y_data = y_data + + def _create_commands(self): + self.cmd_turnon_act = QAction("Turn On", self) + self.cmd_turnon_act.triggered.connect( + self._pvhandler.cmd_turn_on) + + self.cmd_turnoff_act = QAction("Turn Off", self) + self.cmd_turnoff_act.triggered.connect( + self._pvhandler.cmd_turn_off) + + self.cmd_ctrlloopclose_act = QAction("Close Control Loop", self) + self.cmd_ctrlloopclose_act.triggered.connect( + self._pvhandler.cmd_ctrlloop_close) + + self.cmd_ctrlloopopen_act = QAction("Open Control Loop", self) + self.cmd_ctrlloopopen_act.triggered.connect( + self._pvhandler.cmd_ctrlloop_open) + + self.cmd_setslowref_act = QAction("Set OpMode to SlowRef", self) + self.cmd_setslowref_act.triggered.connect( + self._pvhandler.cmd_set_opmode_slowref) + + self.cmd_setcurrent_act = QAction("Set Current SP", self) + self.cmd_setcurrent_act.triggered.connect( + self._pvhandler.cmd_set_current) + + self.cmd_reset_act = QAction("Reset Interlocks", self) + self.cmd_reset_act.triggered.connect( + self._pvhandler.cmd_reset) + +
+[docs] + def contextMenuEvent(self, event, return_menu=False): + """Show a custom context menu.""" + point = event.pos() + if not self.graph.geometry().contains(point) or return_menu: + menu = QMenu("Actions", self) + menu.addAction(self.cmd_turnon_act) + menu.addAction(self.cmd_turnoff_act) + menu.addAction(self.cmd_setcurrent_act) + menu.addAction(self.cmd_reset_act) + if not SiriusPVName(self._psnames[0]).dev in ('FCH', 'FCV'): + menu.addAction(self.cmd_ctrlloopclose_act) + menu.addAction(self.cmd_ctrlloopopen_act) + menu.addAction(self.cmd_setslowref_act) + + if return_menu: + return menu + menu.popup(self.mapToGlobal(point))
+
+ + + +class _PVHandler: + """PV Handler.""" + + _pvs = dict() + + PROPSYMB_2_DEFVAL_DEF = { + 'DiagStatus-Mon': 0, + 'IntlkSoft-Mon': 0, + 'IntlkHard-Mon': 0, + 'PwrState-Sel': _PSConst.PwrStateSel.On, + 'PwrState-Sts': _PSConst.PwrStateSts.On, + 'OpMode-Sel': _PSConst.OpMode.SlowRef, + 'OpMode-Sts': _PSConst.States.SlowRef, + 'CtrlMode-Mon': _PSConst.Interface.Remote, + 'CtrlLoop-Sel': _PSConst.OpenLoop.Closed, + 'CtrlLoop-Sts': _PSConst.OpenLoop.Closed, + 'CycleEnbl-Mon': _PSConst.DsblEnbl.Enbl + } + PROPSYMB_2_DEFVAL_FCS = { + 'DiagStatus-Mon': 0, + 'AlarmsAmp-Mon': 0, + 'AlarmsAmpLtc-Mon': 0, + 'PwrState-Sel': _PSConst.PwrStateSel.On, + 'PwrState-Sts': _PSConst.PwrStateSts.On, + } + + def __init__(self, psnames=list(), prefix=_vaca_prefix, parent=None): + """Init.""" + self._psnames = psnames + self._propsymb_2_defval = _PVHandler.PROPSYMB_2_DEFVAL_DEF + self._prefix = prefix + self._parent = parent + + def set_psnames(self, psnames): + """Set psnames.""" + self._psnames = _dcopy(psnames) + if SiriusPVName(self._psnames[0]).dev in ('FCH', 'FCV'): + self._propsymb_2_defval = _PVHandler.PROPSYMB_2_DEFVAL_FCS + else: + self._propsymb_2_defval = _PVHandler.PROPSYMB_2_DEFVAL_DEF + + def get_values(self, propty): + """Get PV values.""" + if not self._psnames: + return [] + + psnames = list(self._psnames) + self._create_pvs(psnames, propty) + + values = list() + for psn in psnames: + pvname = self._get_pvname(psn, propty) + _PVHandler._pvs[pvname].wait_for_connection() + + for psn in psnames: + pvname = self._get_pvname(psn, propty) + try: + val = _PVHandler._pvs[pvname].get() + except epics.ca.ChannelAccessException: + val = None + val = val if val is not None else 0 + if propty in self._propsymb_2_defval.keys(): + defval = self._propsymb_2_defval[propty] + val = 1 if val == defval else 0 + values.append(val) + return values + + def _get_pvname(self, psname, propty): + """Get PV name for psname and propty.""" + return SiriusPVName(psname).substitute( + prefix=self._prefix, propty=propty) + + def _create_pvs(self, psnames, propty): + """Create PVs.""" + new_pvs = dict() + for psn in psnames: + pvname = self._get_pvname(psn, propty) + if pvname in _PVHandler._pvs: + continue + new_pvs[pvname] = epics.PV(pvname, connection_timeout=0.05) + _PVHandler._pvs.update(new_pvs) + + def set_values(self, propty, value): + """Set PV values.""" + psnames = self._psnames + self._create_pvs(psnames, propty) + + for psn in psnames: + pvname = self._get_pvname(psn, propty) + _PVHandler._pvs[pvname].wait_for_connection() + + for psn in psnames: + pvname = self._get_pvname(psn, propty) + _PVHandler._pvs[pvname].put(value) + + def cmd_set_opmode_slowref(self): + """Set power supplies OpMode to SlowRef.""" + self.set_values('OpMode-Sel', _PSConst.OpMode.SlowRef) + + def cmd_turn_on(self): + """Turn power supplies on.""" + self.set_values('PwrState-Sel', _PSConst.PwrStateSel.On) + + def cmd_turn_off(self): + """Turn power supplies off.""" + self.set_values('PwrState-Sel', _PSConst.PwrStateSel.Off) + + def cmd_ctrlloop_close(self): + """Close power supplies control loop.""" + value = _PSConst.OffOn.On \ + if SiriusPVName(self._psnames[0]).dev in ('FCH', 'FCV') \ + else _PSConst.CloseOpen.Closed + self.set_values('CtrlLoop-Sel', value) + + def cmd_ctrlloop_open(self): + """Open power supplies control loop.""" + value = _PSConst.OffOn.Off \ + if SiriusPVName(self._psnames[0]).dev in ('FCH', 'FCV') \ + else _PSConst.CloseOpen.Open + self.set_values('CtrlLoop-Sel', value) + + def cmd_set_current(self): + """Set power supplies current.""" + value, res = QInputDialog.getDouble( + self._parent, "Insert current setpoint", "Value") + if res: + self.set_values('Current-SP', value) + + def cmd_reset(self): + """Reset power supplies.""" + pvn = 'AlarmsAmpLtcRst-Cmd' \ + if self._psnames[0].endswith(('-FCH', '-FCV')) \ + else 'Reset-Cmd' + self.set_values(pvn, 1) + + +class _UpdateGraphThread(QThread): + """Update Graph Thread.""" + + dataChanged = Signal(list, list) + + def __init__(self, property_line, property_symb, pvhandler, parent=None): + super().__init__(parent) + + self._property_line = property_line + self._property_symb = property_symb + self._pvhandler = pvhandler + + self._quit_task = False + + def set_property_line(self, new): + """Update property line.""" + self._property_line = new + + def set_property_symb(self, new): + """Update property symbol.""" + self._property_symb = new + + def exit_task(self): + """Set flag to quit thread.""" + self._quit_task = True + + def run(self): + """Run task.""" + epics.ca.use_initial_context() + while not self._quit_task: + _t0 = _time.time() + self._update_data() + _dt = _time.time() - _t0 + + sleep = 0.25 - _dt + if sleep > 0: + _time.sleep(sleep) + + def _update_data(self): + symbols = self._pvhandler.get_values(self._property_symb) + y_data = self._pvhandler.get_values(self._property_line) + self.dataChanged.emit(symbols, y_data) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ps_diag/util.html b/_modules/siriushla/as_ps_diag/util.html new file mode 100644 index 000000000..37c14eaaf --- /dev/null +++ b/_modules/siriushla/as_ps_diag/util.html @@ -0,0 +1,318 @@ + + + + + + siriushla.as_ps_diag.util — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_ps_diag.util

+"""Util module."""
+
+from siriuspy.search import PSSearch
+
+# Constants
+
+lips2filters = {'Lens': {'sec': 'LI', 'sub': '.*', 'dev': 'Lens.*'},
+                'CH': {'sec': 'LI', 'sub': '.*', 'dev': 'CH'},
+                'CV': {'sec': 'LI', 'sub': '.*', 'dev': 'CV'},
+                'Slnd': {'sec': 'LI', 'sub': '.*', 'dev': 'Slnd.*'},
+                'Q': {'sec': 'LI', 'sub': '.*', 'dev': '(QF|QD).*'},
+                'Spect': {'sec': 'LI', 'sub': '.*', 'dev': 'Spect.*'},
+                }
+
+asps2filters = {'B': {'sub': '.*', 'dev': 'B.*'},
+                'Q': {'sub': '.*', 'dev': 'Q(F|D|[1-4]).*'},
+                'QS': {'sub': '.*', 'dev': 'QS.*'},
+                'S': {'sub': '.*', 'dev': 'S.*'},
+                'CH': {'sub': '.*', 'dev': 'CH'},
+                'CV': {'sub': '.*', 'dev': 'CV'},
+                'PM': {'sub': '.*', 'dev': '(Inj|Eje).*'},
+                }
+
+sips2filters = {'B': {'sec': 'SI', 'sub': '.*', 'dev': 'B.*'},
+                'Q': {'sec': 'SI', 'sub': 'Fam', 'dev': 'Q(F|D|[1-4]).*'},
+                'S': {'sec': 'SI', 'sub': '.*', 'dev': 'S.*'},
+                'CV': {'sec': 'SI', 'sub': '.*(M|C).*', 'dev': 'CV.*'},
+                'CH': {'sec': 'SI', 'sub': '.*(M|C).*', 'dev': 'CH.*'},
+                'ID-CH/CV/QS': {'sec': 'SI', 'sub': '.*S(A|B|P)',
+                                'dev': '(LCH|CH|CV|QS)'},
+                'FFCH/FFCV': {'sec': 'SI', 'dev': 'FFC.*'},
+                'Trims': {'sec': 'SI', 'sub': '[0-2][0-9].*',
+                          'dev': 'Q(F|D|[1-4]).*'},
+                'QS': {'sec': 'SI', 'sub': '[0-2][0-9](M|C).*', 'dev': 'QS'},
+                'PM': {'sec': 'SI', 'sub': '.*', 'dev': '.*(Kckr|Sept)',
+                       'propty_name': '(?!:CCoil).*'},
+                'FCH': {'sec': 'SI', 'sub': '(?!01M).*', 'dev': 'FCH'},
+                'FCV': {'sec': 'SI', 'sub': '(?!01M).*', 'dev': 'FCV'},
+                }
+
+
+
+[docs] +def get_label2devices(sec): + data = dict() + if sec == 'LI': + ps2filt = lips2filters + elif sec == 'SI': + ps2filt = sips2filters + else: + ps2filt = asps2filters + + for ps, filt in ps2filt.items(): + filt.update(sec=sec) + data[ps] = PSSearch.get_psnames(filters=filt) + return data
+ + + +SEC2LABEL2SECPOS = { + 'LI': { + 'Spect': (0, 0, 1, 1), + 'Q': (0, 1, 1, 1), + 'Lens': (0, 2, 1, 1), + 'CH': (1, 0, 1, 2), + 'CV': (1, 2, 1, 1), + 'Slnd': (2, 0, 1, 5), + }, + 'TB': { + 'B': (0, 0, 1, 2), + 'Q': (1, 0, 1, 4), + 'PM': (0, 2, 1, 2), + 'CH': (2, 0, 1, 2), + 'CV': (2, 2, 1, 2), + }, + 'BO': { + 'B': (0, 0, 1, 1), + 'Q': (0, 1, 1, 1), + 'S': (1, 0, 1, 1), + 'QS': (1, 1, 1, 1), + 'PM': (2, 0, 1, 1), + 'CH': (0, 2, 3, 2), + 'CV': (0, 4, 3, 2), + }, + 'TS': { + 'B': (0, 0, 1, 2), + 'Q': (1, 0, 1, 5), + 'PM': (0, 2, 1, 3), + 'CH': (2, 0, 1, 2), + 'CV': (2, 2, 1, 3), + }, + 'SI': { + 'B': (0, 1, 1, 1), + 'PM': (0, 2, 1, 1), + 'FFCH/FFCV': (0, 3, 1, 1), + 'Q': (0, 4, 1, 1), + 'S': (0, 5, 1, 1), + 'ID-CH/CV/QS': (0, 7, 1, 2), + 'QS': (1, 1, 1, 2), + 'CH': (1, 3, 1, 1), + 'CV': (1, 4, 1, 1), + 'Trims': (1, 5, 1, 2), + 'FCH': (1, 7, 1, 1), + 'FCV': (1, 8, 1, 1), + }, +} + + +
+[docs] +def get_sec2dev_laypos(sec, label): + return SEC2LABEL2SECPOS[sec][label]
+ + + +
+[docs] +def get_col2dev_count(sec, label): + if label == 'QS': + return 5 + if label == 'CH': + return 6 if sec == 'SI' else 5 if sec == 'BO' else 7 + if label == 'CV': + return 8 if sec == 'SI' else 5 if sec == 'BO' else 10 + if 'Trims' in label: + return 14 + if 'FFC' in label: + return 4 + if 'ID' in label: + return 8 + if 'FC' in label: + return 4 + if label == 'S': + return 11 + if label == 'Q': + return 10 if sec != 'SI' else 6 + if label == 'Slnd': + return 21 + return 10
+ + + +
+[docs] +def get_dev2sub_labels(label): + sub2labels = { + 'QS': ('M1', 'M2', 'C1', 'C2', 'C3'), + 'CH': ('M1', 'M2', 'C1', 'C2', 'C3', 'C4'), + 'CV': ('M1', 'M2', 'C1', 'C2', 'C2', 'C3', 'C3', 'C4'), + 'Trims': ('M1', 'M1', 'M1', 'M2', 'M2', 'M2', 'C1', 'C1', + 'C2', 'C2', 'C3', 'C3', 'C4', 'C4'), + 'FCH': ('M1', 'M2', 'C2', 'C3'), + 'FCV': ('M1', 'M2', 'C2', 'C3'), + } + return sub2labels[label]
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_pu_control/ControlWindow.html b/_modules/siriushla/as_pu_control/ControlWindow.html new file mode 100644 index 000000000..5d9b639c1 --- /dev/null +++ b/_modules/siriushla/as_pu_control/ControlWindow.html @@ -0,0 +1,381 @@ + + + + + + siriushla.as_pu_control.ControlWindow — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_pu_control.ControlWindow

+"""Modulet that defines the window class that control pulsed mangets."""
+
+from qtpy.QtCore import Qt, Slot
+from qtpy.QtWidgets import QWidget, QVBoxLayout, QGroupBox, QAction, QMenu, \
+    QScrollArea
+import qtawesome as qta
+from pydm.connection_inspector import ConnectionInspector
+
+from siriuspy.search import PSSearch
+from siriushla.util import get_appropriate_color
+from siriushla.widgets import SiriusMainWindow
+from siriushla.as_ps_control.SummaryWidgets import SummaryWidget, \
+    SummaryHeader, sort_propties
+from siriushla.util import connect_window
+from .DetailWindow import PUDetailWindow
+
+
+
+[docs] +class PUControlWindow(SiriusMainWindow): + """Window to control pulsed magnets.""" + + def __init__(self, parent=None, section=None, is_main=True, + main_secs=('TB', 'BO', 'TS', 'SI')): + """Constructor.""" + super().__init__(parent) + self._section = section + self._is_main = is_main + self._main_secs = main_secs + self.setWindowTitle(section.upper() + ' Pulsed Magnets Control Window') + if section in {'InjBO', 'EjeBO'}: + color = get_appropriate_color('BO') + self.setObjectName('BOApp') + elif section in {'InjSI', 'PingSI'}: + color = get_appropriate_color('SI') + self.setObjectName('SIApp') + else: + color = get_appropriate_color(section) + self.setObjectName(section+'App') + self.setWindowIcon(qta.icon('mdi.current-ac', color=color)) + self.pu_widgets_dict = dict() + self._setup_ui() + self.setCentralWidget(self.main_widget) + self.setFocusPolicy(Qt.StrongFocus) + self._create_actions() + + def _setup_ui(self): + if self._is_main: + self.main_widget = QScrollArea(self) + self.main_widget.setObjectName('main') + self.main_widget.setWidgetResizable(True) + self.scrollwidget = QWidget() + self.scrollwidget.setObjectName('scrollwid') + self.main_widget.setStyleSheet( + '#main{min-width:64em; min-height:48em;}' + '#scrollwid{background-color: transparent;}') + slay = QVBoxLayout(self.scrollwidget) + self.main_widget.setWidget(self.scrollwidget) + for sec in self._main_secs: + name = 'BO' if 'BO' in sec else 'SI' if 'SI' in sec else sec + gbox = QGroupBox(sec, self) + gbox.setObjectName(name+'App') + glay = QVBoxLayout(gbox) + glay.addWidget(self._make_sec_widget(sec)) + slay.addWidget(gbox) + self._connect_buttons() + elif self._section is not None: + self.main_widget = self._make_sec_widget(self._section) + self._connect_buttons() + else: + raise ValueError('Invalid \'section\' argument!') + + def _make_sec_widget(self, sec): + widget = QWidget(self) + lay = QVBoxLayout(widget) + + if sec in {'TB', 'BO', 'TS', 'SI'}: + devices = PSSearch.get_psnames({ + 'sec': sec, 'dis': 'PU', 'dev': '.*(Sept|Kckr|Ping)', + 'propty_name': '(?!:CCoil).*'}) + elif sec == 'InjBO': + devices = PSSearch.get_psnames( + {'sec': '(TB|BO)', 'dis': 'PU', 'dev': 'Inj'}) + elif sec == 'EjeBO': + devices = PSSearch.get_psnames( + {'sec': '(BO|TS)', 'dis': 'PU', 'dev': 'Eje'}) + elif sec == 'InjSI': + devices = PSSearch.get_psnames({ + 'sec': '(TS|SI)', 'dis': 'PU', 'dev': 'Inj.*(Sept|Kckr)', + 'propty_name': '(?!:CCoil).*'}) + elif sec == 'PingSI': + devices = PSSearch.get_psnames( + {'sec': 'SI', 'dis': 'PU', 'dev': 'Ping'}) + else: + raise ValueError(f'devices not defined for section {sec}.') + + visible_props = sort_propties( + ['detail', 'state', 'reset', 'intlk', 'setpoint', 'monitor', + 'pulse', 'strength_sp', 'strength_mon']) + + lay.addWidget(SummaryHeader(devices[0], visible_props, self)) + for device in devices: + ma_widget = SummaryWidget(device, visible_props, self) + lay.addWidget(ma_widget) + self.pu_widgets_dict[device] = ma_widget + + lay.addStretch() + return widget + + def _connect_buttons(self): + """Connect buttons in the SummaryWidgets.""" + widgets = self.main_widget.findChildren(SummaryWidget) + for widget in widgets: + devname = widget.devname + bt = widget.get_detail_button() + connect_window(bt, PUDetailWindow, self, devname=devname) + + # Actions methods + def _create_actions(self): + wid = self.centralWidget() + self.turn_on_act = QAction("Turn On", wid) + self.turn_on_act.triggered.connect(lambda: self._set_pwrstate(True)) + + self.turn_off_act = QAction("Turn Off", wid) + self.turn_off_act.triggered.connect(lambda: self._set_pwrstate(False)) + + self.pulse_on_act = QAction("Pulse On", wid) + self.pulse_on_act.triggered.connect(lambda: self._set_pulse(True)) + + self.pulse_off_act = QAction("Pulse Off", wid) + self.pulse_off_act.triggered.connect(lambda: self._set_pulse(False)) + + self.reset_act = QAction("Reset Interlocks", wid) + self.reset_act.triggered.connect(self._reset_interlocks) + + self.set_voltage = QAction("Set Voltage to 0.0", wid) + self.set_voltage.triggered.connect(self._set_voltage_zero) + + # # Overloaded method +
+[docs] + def contextMenuEvent(self, event): + """Show a custom context menu.""" + point = event.pos() + menu = QMenu("Actions", self) + menu.addAction(self.turn_on_act) + menu.addAction(self.turn_off_act) + menu.addAction(self.pulse_on_act) + menu.addAction(self.pulse_off_act) + menu.addAction(self.reset_act) + menu.addAction(self.set_voltage) + menu.addSeparator() + action = menu.addAction('Show Connections...') + action.triggered.connect(self.show_connections) + menu.popup(self.mapToGlobal(point))
+ + +
+[docs] + def show_connections(self, checked): + """.""" + _ = checked + c = ConnectionInspector(self) + c.show()
+ + + @Slot(bool) + def _set_pwrstate(self, state): + """Execute turn on/off actions.""" + for widget in self.pu_widgets_dict.values(): + try: + if state: + widget.turn_on() + else: + widget.turn_off() + except TypeError: + pass + + @Slot(bool) + def _set_pulse(self, state): + """Execute turn pulse on/off actions.""" + for widget in self.pu_widgets_dict.values(): + try: + if state: + widget.pulse_on() + else: + widget.pulse_off() + except TypeError: + pass + + @Slot() + def _reset_interlocks(self): + """Reset interlocks.""" + for widget in self.pu_widgets_dict.values(): + try: + widget.reset() + except TypeError: + pass + + @Slot() + def _set_voltage_zero(self): + """Set voltage to zero.""" + for widget in self.pu_widgets_dict.values(): + try: + sp = widget.setpoint.spinbox + sp.value_changed(0.0) + sp.send_value() + except TypeError: + pass
+ + + +if __name__ == "__main__": + import sys + from siriushla.sirius_application import SiriusApplication + app = SiriusApplication() + w = PUControlWindow() + w.show() + sys.exit(app.exec_()) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_pu_control/DetailWidget.html b/_modules/siriushla/as_pu_control/DetailWidget.html new file mode 100644 index 000000000..61d8ee5de --- /dev/null +++ b/_modules/siriushla/as_pu_control/DetailWidget.html @@ -0,0 +1,408 @@ + + + + + + siriushla.as_pu_control.DetailWidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_pu_control.DetailWidget

+"""Detailed widget for controlling a pulsed mangnet."""
+import qtawesome as qta
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QGridLayout, \
+    QLabel, QGroupBox, QFormLayout
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriushla import util
+from siriushla.widgets import SiriusLedState, SiriusLedAlert, PyDMLed, \
+    PyDMStateButton, PyDMSpinboxScrollbar, SiriusLabel
+from siriushla.as_ti_control.hl_trigger import HLTriggerSimple
+
+
+
+[docs] +class PUDetailWidget(QWidget): + """Detailed widget for controlling a pulsed magnet.""" + + def __init__(self, devname, parent=None): + """Receive a parent and a pulsed mangnet name.""" + super().__init__(parent) + self._devname = _PVName(devname) + self._section = self._devname.sec + self._prefix = _VACA_PREFIX + self._pdev = self._devname.substitute(prefix=self._prefix) + self.setObjectName(self._section+'App') + self.setWindowIcon(qta.icon( + 'mdi.current-ac', color=util.get_appropriate_color(self._section))) + + self._create_pvs() + self._setup_ui() + self.setStyleSheet(""" + #pulses_box, + #pwrstate_box { + max-width: 8em; + } + """) + self.setFocusPolicy(Qt.StrongFocus) + + def _create_pvs(self): + """Create variables with pvs that'll be used.""" + self._voltage_sp_pv = self._pdev.substitute(propty='Voltage-SP') + self._voltage_rb_pv = self._pdev.substitute(propty='Voltage-RB') + self._voltage_mon_pv = self._pdev.substitute(propty='Voltage-Mon') + self._kick_sp_pv = self._pdev.substitute(propty='Kick-SP') + self._kick_rb_pv = self._pdev.substitute(propty='Kick-RB') + self._kick_mon_pv = self._pdev.substitute(propty='Kick-Mon') + self._pwrstate_sel_pv = self._pdev.substitute(propty='PwrState-Sel') + self._pwrstate_sts_pv = self._pdev.substitute(propty='PwrState-Sts') + self._enablepulses_sel_pv = self._pdev.substitute(propty='Pulse-Sel') + self._enablepulses_sts_pv = self._pdev.substitute(propty='Pulse-Sts') + self._reset_cmd_pv = self._pdev.substitute(propty='Reset-Cmd') + self._intlk1_mon_pv = self._pdev.substitute(propty='Intlk1-Mon') + self._intlk2_mon_pv = self._pdev.substitute(propty='Intlk2-Mon') + self._intlk3_mon_pv = self._pdev.substitute(propty='Intlk3-Mon') + self._intlk4_mon_pv = self._pdev.substitute(propty='Intlk4-Mon') + self._intlk5_mon_pv = self._pdev.substitute(propty='Intlk5-Mon') + self._intlk6_mon_pv = self._pdev.substitute(propty='Intlk6-Mon') + self._intlk7_mon_pv = self._pdev.substitute(propty='Intlk7-Mon') + self._intlk1_lbcte_pv = self._pdev.substitute(propty='Intlk1Label-Cte') + self._intlk2_lbcte_pv = self._pdev.substitute(propty='Intlk2Label-Cte') + self._intlk3_lbcte_pv = self._pdev.substitute(propty='Intlk3Label-Cte') + self._intlk4_lbcte_pv = self._pdev.substitute(propty='Intlk4Label-Cte') + self._intlk5_lbcte_pv = self._pdev.substitute(propty='Intlk5Label-Cte') + self._intlk6_lbcte_pv = self._pdev.substitute(propty='Intlk6Label-Cte') + self._intlk7_lbcte_pv = self._pdev.substitute(propty='Intlk7Label-Cte') + if 'Sept' not in self._devname: + self._intlk8_mon_pv = self._pdev.substitute(propty='Intlk8-Mon') + self._intlk8_lbcte_pv = \ + self._pdev.substitute(propty='Intlk8Label-Cte') + self._ctrlmode_pv = self._pdev.substitute(propty='CtrlMode-Mon') + + self._trigname = self._devname.substitute(dis='TI') + + def _setup_ui(self): + self.header_label = QLabel('<h1>' + self._devname + '</h1>') + self.header_label.setObjectName('header_label') + interlock_box = QGroupBox('Interlock', self) + interlock_box.setObjectName('interlock_box') + interlock_box.setLayout(self._interlock_layout()) + pwrstate_box = QGroupBox('Power', self) + pwrstate_box.setObjectName('pwrstate_box') + pwrstate_box.setLayout(self._pwrstate_layout()) + pulses_box = QGroupBox('Pulses', self) + pulses_box.setObjectName('pulses_box') + pulses_box.setLayout(self._pulses_layout()) + voltage_box = QGroupBox('Voltage', self) + voltage_box.setObjectName('voltage_box') + voltage_box.setLayout(self._voltage_layout()) + kick_box = QGroupBox('Kick', self) + kick_box.setObjectName('kick_box') + kick_box.setLayout(self._kick_layout()) + if 'NLK' in self._devname: + ccvh_box = QGroupBox('C.Coil H Voltage', self) + ccvh_box.setLayout(self._voltage_layout(coil='CCoilH')) + cckh_box = QGroupBox('C.Coil H Kick', self) + cckh_box.setLayout(self._kick_layout(coil='CCoilH')) + ccvv_box = QGroupBox('C.Coil V Voltage', self) + ccvv_box.setLayout(self._voltage_layout(coil='CCoilV')) + cckv_box = QGroupBox('C.Coil V Kick', self) + cckv_box.setLayout(self._kick_layout(coil='CCoilV')) + timing_box = QGroupBox('Trigger', self) + timing_box.setObjectName('timing_box') + hbl = QHBoxLayout(timing_box) + hbl.setContentsMargins(0, 0, 0, 0) + show_deltadelay = 'NLK' in self._devname + hbl.addWidget(HLTriggerSimple( + timing_box, self._trigname, self._prefix, delay=False, + delayraw=True, src=True, deltadelay=show_deltadelay, + deltadelayraw=show_deltadelay)) + + vbl1 = QVBoxLayout() + vbl1.addWidget(pwrstate_box) + vbl1.addWidget(pulses_box) + + gbl2 = QGridLayout() + gbl2.addWidget(voltage_box, 0, 0) + gbl2.addWidget(kick_box, 1, 0) + if 'NLK' in self._devname: + gbl2.addWidget(ccvh_box, 0, 1) + gbl2.addWidget(cckh_box, 1, 1) + gbl2.addWidget(ccvv_box, 0, 2) + gbl2.addWidget(cckv_box, 1, 2) + + self.layout = QGridLayout(self) + self.layout.addWidget(self.header_label, 0, 0, 1, 3) + self.layout.addWidget(interlock_box, 1, 0, 3, 1) + self.layout.addLayout(vbl1, 1, 1, 2, 1) + self.layout.addLayout(gbl2, 1, 2, 2, 3) + self.layout.addWidget(timing_box, 3, 1, 1, 4) + self.layout.addLayout(self._ctrlmode_layout(), 4, 1, 1, 4) + + def _interlock_layout(self): + interlock_layout = QGridLayout() + + intlk_cnt = 8 if 'Sept' not in self._devname else 7 + for i in range(intlk_cnt): + label = SiriusLabel( + self, getattr(self, '_intlk' + str(i+1) + '_lbcte_pv')) + led = PyDMLed( + self, getattr(self, '_intlk' + str(i+1) + '_mon_pv')) + led.onColor = led.LightGreen + led.offColor = led.Red + interlock_layout.addWidget(led, i, 0) + interlock_layout.addWidget(label, i, 1) + + self.reset_bt = PyDMPushButton( + parent=self, init_channel=self._reset_cmd_pv, pressValue=1) + self.reset_bt.setIcon(qta.icon('fa5s.sync')) + self.reset_bt.setObjectName('reset_bt') + self.reset_bt.setStyleSheet( + '#reset_bt{min-width:25px; max-width:25px; icon-size:20px;}') + interlock_layout.addWidget( + self.reset_bt, i+1, 0, 1, 2, alignment=Qt.AlignHCenter) + + return interlock_layout + + def _pwrstate_layout(self): + pwrstate_layout = QHBoxLayout() + + self.state_button = PyDMStateButton( + parent=self, init_channel=self._pwrstate_sel_pv) + self.state_led = SiriusLedState(self, self._pwrstate_sts_pv) + + pwrstate_layout.addWidget(self.state_button) + pwrstate_layout.addWidget(self.state_led) + + return pwrstate_layout + + def _pulses_layout(self): + pulses_layout = QHBoxLayout() + + self.pulses_state_button = PyDMStateButton( + parent=self, init_channel=self._enablepulses_sel_pv) + self.pulses_state_led = SiriusLedState( + parent=self, init_channel=self._enablepulses_sts_pv) + + pulses_layout.addWidget(self.pulses_state_button) + pulses_layout.addWidget(self.pulses_state_led) + + return pulses_layout + + def _voltage_layout(self, coil=''): + sp_pv = self._voltage_sp_pv.substitute(propty_name=coil+'Voltage') + rb_pv = self._voltage_rb_pv.substitute(propty_name=coil+'Voltage') + mon_pv = self._voltage_mon_pv.substitute(propty_name=coil+'Voltage') + + sp_widget = PyDMSpinboxScrollbar(self, sp_pv) + rb_label = SiriusLabel(self, rb_pv, keep_unit=True) + rb_label.showUnits = True + mon_label = SiriusLabel(self, mon_pv, keep_unit=True) + mon_label.showUnits = True + + lay = QFormLayout() + lay.setLabelAlignment(Qt.AlignRight) + lay.setFormAlignment(Qt.AlignHCenter) + lay.addRow('SP:', sp_widget) + lay.addRow('RB:', rb_label) + lay.addRow('Mon:', mon_label) + return lay + + def _kick_layout(self, coil=''): + sp_pv = self._kick_sp_pv.substitute(propty_name=coil+'Kick') + rb_pv = self._kick_rb_pv.substitute(propty_name=coil+'Kick') + mon_pv = self._kick_mon_pv.substitute(propty_name=coil+'Kick') + + sp_widget = PyDMSpinboxScrollbar(self, sp_pv) + rb_label = SiriusLabel(self, rb_pv, keep_unit=True) + rb_label.showUnits = True + mon_label = SiriusLabel(self, mon_pv, keep_unit=True) + mon_label.showUnits = True + + lay = QFormLayout() + lay.setLabelAlignment(Qt.AlignRight) + lay.setFormAlignment(Qt.AlignHCenter) + lay.addRow('SP:', sp_widget) + lay.addRow('RB:', rb_label) + lay.addRow('Mon:', mon_label) + return lay + + def _ctrlmode_layout(self): + ctrlmode_layout = QHBoxLayout() + + self.ctrlmode_led = SiriusLedAlert( + parent=self, init_channel=self._ctrlmode_pv) + self.ctrlmode_label = SiriusLabel( + parent=self, init_channel=self._ctrlmode_pv) + + ctrlmode_layout.addStretch() + ctrlmode_layout.addWidget(self.ctrlmode_led) + ctrlmode_layout.addWidget(self.ctrlmode_label) + + return ctrlmode_layout
+ + + +if __name__ == "__main__": + import sys + from siriushla.sirius_application import SiriusApplication + + app = SiriusApplication(None, sys.argv) + w = PUDetailWidget(devname="SI-01SA:PM-InjDpKckr") + w.show() + sys.exit(app.exec_()) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_pu_control/DetailWindow.html b/_modules/siriushla/as_pu_control/DetailWindow.html new file mode 100644 index 000000000..5a31823cd --- /dev/null +++ b/_modules/siriushla/as_pu_control/DetailWindow.html @@ -0,0 +1,192 @@ + + + + + + siriushla.as_pu_control.DetailWindow — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_pu_control.DetailWindow

+"""Define detail window for a pulsed magnet."""
+import qtawesome as qta
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriushla import util
+from siriushla.widgets import SiriusMainWindow
+from .DetailWidget import PUDetailWidget
+
+
+
+[docs] +class PUDetailWindow(SiriusMainWindow): + """Window with all controls of Pulsed Manget.""" + + def __init__(self, devname, parent=None): + """Constructor.""" + super().__init__(parent) + self._devname = _PVName(devname) + self._section = self._devname.sec + self._devtype = self._devname.dis + self.setObjectName(self._section+'App') + self.setWindowTitle(self._devname) + self.setWindowIcon( + qta.icon('mdi.current-ac', + color=util.get_appropriate_color(self._section))) + self._setup_ui() + + def _setup_ui(self): + self.central_widget = PUDetailWidget(self._devname, self) + self.setCentralWidget(self.central_widget)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_rf_control/control.html b/_modules/siriushla/as_rf_control/control.html new file mode 100644 index 000000000..6184629ed --- /dev/null +++ b/_modules/siriushla/as_rf_control/control.html @@ -0,0 +1,2110 @@ + + + + + + siriushla.as_rf_control.control — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_rf_control.control

+"""RF Main Control window."""
+
+from functools import partial as _part
+
+import qtawesome as qta
+from pydm.widgets import PyDMEnumComboBox, PyDMLineEdit
+from pyqtgraph import InfiniteLine, mkPen
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QCheckBox, QComboBox, QFrame, QGridLayout, \
+    QGroupBox, QHBoxLayout, QLabel, QPushButton, QRadioButton, QScrollArea, \
+    QSizePolicy as QSzPlcy, QSpacerItem, QTabWidget, QVBoxLayout, QWidget
+
+from ..util import connect_newprocess, get_appropriate_color
+from ..widgets import PyDMLed, PyDMLedMultiChannel, PyDMStateButton, \
+    SiriusConnectionSignal, SiriusLabel, SiriusLedAlert, SiriusLedState, \
+    SiriusMainWindow, SiriusPushButton, SiriusSpinbox, SiriusTimePlot, \
+    SiriusWaveformPlot
+from .custom_widgets import RFEnblDsblButton
+from .util import DEFAULT_STYLESHEET, SEC_2_CHANNELS
+
+
+
+[docs] +class RFMainControl(SiriusMainWindow): + """RF Control Overview Window.""" + + def __init__(self, parent=None, prefix='', section=''): + super().__init__(parent) + self.prefix = prefix + self.prefix += ('-' if prefix and not prefix.endswith('-') else '') + self.section = section.upper() + self.chs = SEC_2_CHANNELS[self.section] + for group in ['Coupler', 'Cells']: + key = group+' Limits PVs' + for pvn in self.chs['Cav Sts']['Temp'][key]: + channel = SiriusConnectionSignal(self.prefix+pvn) + channel.new_value_signal[float].connect( + self._update_temp_limits) + + self.setObjectName(self.section + 'App') + self.setWindowTitle(self.section + ' RF Control Overview Window') + self.setWindowIcon( + qta.icon('mdi.waves', color=get_appropriate_color(self.section))) + self.curves = dict() + + self._setupUi() + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + self.setStyleSheet(DEFAULT_STYLESHEET) + cwid = QWidget(self) + self.setCentralWidget(cwid) + lay = QVBoxLayout(cwid) + + label = QLabel('<h2>'+self.section+' RF Controls - Overview</h2>', + self, alignment=Qt.AlignCenter) + scarea = QScrollArea(self) + scarea.setSizeAdjustPolicy(scarea.AdjustToContents) + scarea.setWidgetResizable(True) + scr_ar_wid = QWidget() + scarea.setWidget(scr_ar_wid) + scr_ar_wid.setObjectName('scrollarea') + scr_ar_wid.setStyleSheet( + '#scrollarea {background-color: transparent;}') + + lay.addWidget(label) + lay.addWidget(scarea) + + gbox_intlks = QGroupBox('Status', self) + gbox_intlks.setLayout(self._statusLayout()) + + gbox_rfgen = QGroupBox('RF Generator', self) + gbox_rfgen.setObjectName('RFGen') + gbox_rfgen.setStyleSheet('#RFGen{background-color: #d7ccc8;}') + gbox_rfgen.setLayout(self._rfGenLayout()) + + wid_startctrl = QTabWidget(self) + wid_startctrl.setObjectName(self.section+'Tab') + wid_startctrl.setStyleSheet( + "#"+self.section+'Tab'+"::pane {" + " border-left: 2px solid gray;" + " border-bottom: 2px solid gray;" + " border-right: 2px solid gray;}") + wid_control = QWidget(self) + wid_control.setLayout(self._startControlLayout()) + wid_startctrl.addTab(wid_control, 'Start Controls') + if self.section == 'BO': + wid_rampctrl = QWidget(self) + wid_rampctrl.setLayout(self._rampControlLayout()) + wid_startctrl.addTab(wid_rampctrl, 'Ramp Controls') + wid_advdtls = QWidget(self) + wid_advdtls.setStyleSheet("QPushButton{min-width: 8em;}") + wid_advdtls.setLayout(self._advancedDetailsLayout()) + wid_startctrl.addTab(wid_advdtls, 'Advanced Details') + + if self.section == 'SI': + wid_pwrmon = QGroupBox('Power Meter', self) + wid_pwrmon.setLayout(self._powerMeterLayout()) + else: + wid_pwrmon = QTabWidget(self) + wid_pwrmon.setObjectName(self.section+'Tab') + wid_pwrmon.setStyleSheet( + "#"+self.section+'Tab'+"::pane {" + " border-left: 2px solid gray;" + " border-bottom: 2px solid gray;" + " border-right: 2px solid gray;}") + wid_cw = QWidget(self) + wid_cw.setLayout(self._powerMeterLayout()) + wid_pwrmon.addTab(wid_cw, 'CW') + wid_rampmon = QWidget(self) + wid_rampmon.setLayout(self._rampMonLayout()) + wid_pwrmon.addTab(wid_rampmon, 'Ramp') + + gbox_graphs = QGroupBox('Graphs', self) + gbox_graphs.setLayout(self._graphsLayout()) + + lay_scr = QGridLayout(scr_ar_wid) + lay_scr.addWidget(gbox_intlks, 0, 0) + lay_scr.addWidget(gbox_rfgen, 1, 0) + lay_scr.addWidget(wid_startctrl, 0, 1, 2, 1) + lay_scr.addWidget(wid_pwrmon, 0, 2, 2, 1) + lay_scr.addWidget(gbox_graphs, 0, 3, 2, 1) + lay_scr.setRowStretch(0, 1) + lay_scr.setColumnStretch(0, 0) + lay_scr.setColumnStretch(1, 5) + lay_scr.setColumnStretch(2, 3) + lay_scr.setColumnStretch(3, 4) + + def _statusLayout(self): + lay = QGridLayout() + lay.setHorizontalSpacing(6) + lay.setAlignment(Qt.AlignTop) + button_column = 1 if self.section == 'SI' else 2 + + # Interlocks + self._ld_intlks = QLabel( + '<h4>Interlocks</h4>', self, alignment=Qt.AlignLeft) + lay.addWidget(self._ld_intlks, 0, 0, 1, 3) + + # # Emergency + if self.section == 'BO': + self.ld_emerg = QLabel( + 'Emergency Stop', self, alignment=Qt.AlignRight) + self.ld_emerg.setStyleSheet('min-width: 6.8em;') + self.led_emerg = SiriusLedAlert( + self, self.prefix+self.chs['Emergency']) + lay.addWidget(self.ld_emerg, 1, 0, alignment=Qt.AlignVCenter) + lay.addWidget(self.led_emerg, 1, 1, alignment=Qt.AlignCenter) + + # # Sirius Interlock + self.ld_siriusintlk = QLabel( + 'Sirius Interlock', self, alignment=Qt.AlignRight) + row = 2 + lay.addWidget(self.ld_siriusintlk, row, 0, alignment=Qt.AlignVCenter) + if self.section == 'SI': + row += 1 + for key, val in self.chs['Sirius Intlk'].items(): + ld_llrf = QLabel( + f'• {key}', alignment=Qt.AlignRight | Qt.AlignVCenter) + ld_llrf.setStyleSheet('min-width: 6em') + led_siriusintlk = SiriusLedAlert(self, self.prefix+val) + lay.addWidget(ld_llrf, row, 0) + lay.addWidget(led_siriusintlk, row, 1, + alignment=Qt.AlignCenter) + row += 1 + else: + self.led_siriusintlk = SiriusLedAlert( + self, self.prefix+self.chs['Sirius Intlk']) + lay.addWidget(self.led_siriusintlk, row, 1, + alignment=Qt.AlignCenter) + row += 1 + + # # LLRF Interlock + self.ld_intlk = QLabel('LLRF Interlock', self, alignment=Qt.AlignRight) + self.ld_intlk.setStyleSheet('min-width: 6em') + self.pb_intlkdtls = QPushButton(qta.icon('fa5s.ellipsis-v'), '', self) + self.pb_intlkdtls.setObjectName('dtls') + self.pb_intlkdtls.setStyleSheet( + '#dtls{min-width:18px;max-width:18px;icon-size:20px;}') + cmd = f'sirius-hla-{self.section.lower()}-rf-control.py' + cmd = f'{cmd} -d interlock'.split(" ") + connect_newprocess(self.pb_intlkdtls, cmd, is_window=True, parent=self) + + lay.addWidget(self.ld_intlk, row, 0, alignment=Qt.AlignVCenter) + lay.addWidget(self.pb_intlkdtls, row, + button_column, alignment=Qt.AlignCenter) + if self.section == 'SI': + row += 1 + for key, val in self.chs['LLRF Intlk'].items(): + ld_llrf = QLabel( + f'• {key}', alignment=Qt.AlignRight | Qt.AlignVCenter) + led_llrf = SiriusLedAlert(self, self.prefix+val) + lay.addWidget(ld_llrf, row, 0) + lay.addWidget(led_llrf, row, 1, alignment=Qt.AlignCenter) + row += 1 + else: + self.led_llrf = SiriusLedAlert( + self, self.prefix+self.chs['LLRF Intlk']) + lay.addWidget(self.led_llrf, row, 1, alignment=Qt.AlignCenter) + row += 1 + + # # Cryo Module + if self.section == 'SI': + self.ld_cryosts = QLabel( + 'Cryo Module', self, alignment=Qt.AlignRight) + self.ld_cryosts.setStyleSheet('min-width: 6em') + self.pb_cryodtls = QPushButton( + qta.icon('fa5s.ellipsis-v'), '', self) + self.pb_cryodtls.setObjectName('dtls') + self.pb_cryodtls.setStyleSheet( + '#dtls{min-width:18px;max-width:18px;icon-size:20px;}') + cmd = f'sirius-hla-{self.section.lower()}-rf-control.py' + cmd = f'{cmd} -d cavity-status'.split(" ") + connect_newprocess( + self.pb_cryodtls, cmd, is_window=True, parent=self) + lay.addWidget(self.ld_cryosts, row, 0, alignment=Qt.AlignVCenter) + lay.addWidget(self.pb_cryodtls, row, button_column) + row += 1 + + for key, chs_dict in self.chs['Cryo Sts'].items(): + ld_cryosts = QLabel( + f'• {key}', alignment=Qt.AlignRight | Qt.AlignVCenter) + led_cryosts = PyDMLedMultiChannel( + self, {self.prefix+chs_dict['Geral']: 0}) + lay.addWidget(ld_cryosts, row, 0) + lay.addWidget(led_cryosts, row, 1, alignment=Qt.AlignCenter) + row += 1 + # # Cavity + else: + self.ld_cavsts = QLabel('Cavity', self, alignment=Qt.AlignRight) + self.led_cavsts = PyDMLedMultiChannel( + self, {self.prefix+self.chs['Cav Sts']['Geral']: 1}) + self.pb_cavdtls = QPushButton(qta.icon('fa5s.ellipsis-v'), '', self) + self.pb_cavdtls.setObjectName('dtls') + self.pb_cavdtls.setStyleSheet( + '#dtls{min-width:18px;max-width:18px;icon-size:20px;}') + cmd = f'sirius-hla-{self.section.lower()}-rf-control.py' + cmd = f'{cmd} -d cavity-status'.split(" ") + connect_newprocess( + self.pb_cavdtls, cmd, is_window=True, parent=self) + lay.addWidget(self.ld_cavsts, row, 0, alignment=Qt.AlignVCenter) + lay.addWidget(self.led_cavsts, row, 1, alignment=Qt.AlignCenter) + lay.addWidget(self.pb_cavdtls, row, button_column) + row += 1 + + # # Transmission Line + self.ld_tlsts = QLabel('Transm. Line', self, alignment=Qt.AlignRight) + self.ld_tlsts.setStyleSheet('min-width: 6em') + self.pb_tldtls = QPushButton(qta.icon('fa5s.ellipsis-v'), '', self) + self.pb_tldtls.setObjectName('dtls') + self.pb_tldtls.setStyleSheet( + '#dtls{min-width:18px;max-width:18px;icon-size:20px;}') + cmd = f'sirius-hla-{self.section.lower()}-rf-control.py' + cmd = f'{cmd} -d transm-line'.split(" ") + connect_newprocess( + self.pb_tldtls, cmd, is_window=True, parent=self) + + lay.addWidget(self.ld_tlsts, row, 0, alignment=Qt.AlignVCenter) + lay.addWidget(self.pb_tldtls, row, + button_column, alignment=Qt.AlignCenter) + if self.section == 'SI': + row += 1 + for key, chs_dict in self.chs['TL Sts'].items(): + ld_tlsts = QLabel( + f'• {key}', alignment=Qt.AlignRight | Qt.AlignVCenter) + led_tlsts = PyDMLedMultiChannel( + self, {self.prefix+chs_dict['Geral']: 1}) + lay.addWidget(ld_tlsts, row, 0) + lay.addWidget(led_tlsts, row, 1, alignment=Qt.AlignCenter) + row += 1 + else: + self.led_tlsts = PyDMLedMultiChannel( + self, {self.prefix+self.chs['TL Sts']['Geral']: 1}) + lay.addWidget(self.led_tlsts, row, 1, alignment=Qt.AlignCenter) + row += 1 + + # Reset + self._ld_reset = QLabel('<h4>Reset</h4>', self, alignment=Qt.AlignLeft) + lay.addWidget(self._ld_reset, row, 0, 1, 3) + row += 1 + + # # Reset PLC/Global + if self.section == 'SI': + self.ld_glbl = QLabel('Reset PLC', self, alignment=Qt.AlignRight) + lay.addWidget(self.ld_glbl, row, 0, alignment=Qt.AlignVCenter) + row += 1 + for key, val in self.chs['Reset']['PLC'].items(): + ld_plc = QLabel( + f'• {key}', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + pb_plc = SiriusPushButton( + label='', icon=qta.icon('fa5s.sync'), releaseValue=0, + parent=self, init_channel=self.prefix+val) + pb_plc.setStyleSheet( + 'min-width:25px; max-width:25px; icon-size:20px;') + lay.addWidget(ld_plc, row, 0) + lay.addWidget(pb_plc, row, 1) + row += 1 + else: + self.ld_glbl = QLabel( + 'Reset Global', self, alignment=Qt.AlignRight) + self.pb_glbl = SiriusPushButton( + icon=qta.icon('fa5s.sync'), releaseValue=0, parent=self, + init_channel=self.prefix+self.chs['Reset']['Global']) + self.pb_glbl.setStyleSheet( + 'min-width:25px; max-width:25px; icon-size:20px;') + lay.addWidget(self.ld_glbl, row, 0, alignment=Qt.AlignVCenter) + lay.addWidget(self.pb_glbl, row, 1) + row += 1 + + # # Reset LLRF + self.ld_llrf = QLabel('Reset LLRF', self, alignment=Qt.AlignRight) + lay.addWidget(self.ld_llrf, row, 0) + if self.section == 'SI': + row += 1 + for key, val in self.chs['Reset']['LLRF'].items(): + ld_llrf = QLabel( + f'• {key}', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + pb_llrf = SiriusPushButton( + label='', icon=qta.icon('fa5s.sync'), releaseValue=0, + parent=self, init_channel=self.prefix+val) + pb_llrf.setStyleSheet( + 'min-width:25px; max-width:25px; icon-size:20px;') + lay.addWidget(ld_llrf, row, 0) + lay.addWidget(pb_llrf, row, 1) + row += 1 + else: + self.pb_llrf = SiriusPushButton( + init_channel=self.prefix+self.chs['Reset']['LLRF'], + label='', icon=qta.icon('fa5s.sync'), + parent=self, releaseValue=0) + self.pb_llrf.setStyleSheet( + 'min-width:25px; max-width:25px; icon-size:20px;') + lay.addWidget(self.pb_llrf, row, 1) + row += 1 + + return lay + + def _rfGenLayout(self): + ld_align = Qt.AlignRight | Qt.AlignVCenter + # On/Off + self.ld_genenbl = QLabel('Enable', self, alignment=ld_align) + # self.bt_genenbl = PyDMStateButton( + # self, self.prefix+'RF-Gen:GeneralRF-Sel') + self.led_genenbl = SiriusLedState( + self, self.prefix+'RF-Gen:GeneralRF-Sts') + + # Frequência + self.ld_genfreq = QLabel( + 'Frequency [Hz]', self, alignment=Qt.AlignCenter) + self.le_genfreq = PyDMLineEdit( + self, self.prefix+'RF-Gen:GeneralFreq-SP') + self.le_genfreq.setStyleSheet('min-width:7em; max-width:7em;') + self.le_genfreq.precisionFromPV = False + self.le_genfreq.precision = 2 + self.lb_genfreq = SiriusLabel( + self, self.prefix+'RF-Gen:GeneralFreq-RB') + self.lb_genfreq.setStyleSheet( + 'min-width:7em; max-width:7em; qproperty-alignment:AlignLeft;') + self.lb_genfreq.precisionFromPV = False + self.lb_genfreq.precision = 2 + + # Phase Continuous State + self.ld_genphscont = QLabel( + 'Phase Cont.', self, alignment=ld_align) + # self.bt_genphscont = PyDMStateButton( + # self, self.prefix+'RF-Gen:FreqPhsCont-Sel') + self.lb_genphscont = SiriusLedState( + self, self.prefix+'RF-Gen:FreqPhsCont-Sts') + + lay = QGridLayout() + lay.setAlignment(Qt.AlignCenter) + lay.addWidget(self.ld_genenbl, 0, 0) + # lay.addWidget(self.bt_genenbl) + lay.addWidget(self.led_genenbl, 0, 1, alignment=Qt.AlignLeft) + lay.setRowMinimumHeight(1, 10) + lay.addWidget(self.ld_genfreq, 2, 0, 1, 2) + lay.addWidget(self.le_genfreq, 3, 0, 1, 2) + lay.addWidget(self.lb_genfreq, 4, 0, 1, 2) + lay.setRowMinimumHeight(5, 10) + lay.addWidget(self.ld_genphscont, 6, 0) + # lay.addWidget(self.bt_genphscont) + lay.addWidget(self.lb_genphscont, 6, 1, alignment=Qt.AlignLeft) + return lay + + def _startControlLayout(self): + # SSA + dic = self.chs['SSA'] if self.section == 'BO' else self.chs['SSA']['1'] + lay_amp = QGridLayout() + lay_amp.setHorizontalSpacing(8) + lay_amp.setVerticalSpacing(15) + lay_amp.addWidget( + QLabel('<h4>Status</h4>', self, alignment=Qt.AlignCenter), 1, 3) + lay_amp.addWidget( + QLabel('<h4>Power</h4>', self, alignment=Qt.AlignCenter), 1, 4) + lay_amp.addWidget(QLabel( + '<h4>'+dic['SRC 1']['Label']+'</h4>', self, + alignment=Qt.AlignCenter), 1, 5) + lay_amp.addWidget(QLabel( + '<h4>'+dic['SRC 2']['Label']+'</h4>', self, + alignment=Qt.AlignCenter), 1, 6) + lay_amp.addWidget(QLabel( + '<h4>Pin Sw</h4>', self, alignment=Qt.AlignCenter), 1, 7) + lay_amp.addWidget(QLabel( + '<h4>Pre Drive</h4>', self, alignment=Qt.AlignCenter), 1, 8) + + if self.section == 'BO': + self._create_ssa_wid(lay_amp, 2, self.chs['SSA']) + else: + last_llrf = '' + for k, chs_dict in self.chs['SSA'].items(): + if last_llrf != chs_dict['LLRF']: + lay_amp.addWidget(QLabel( + f"<h4>{chs_dict['LLRF']}</h4>", self, + alignment=Qt.AlignCenter), int(k)+1, 0) + last_llrf = chs_dict['LLRF'] + self._create_ssa_wid(lay_amp, int(k)+1, chs_dict) + + # LLRF + # # Slow Loop Control + wid_sl = QWidget() + lay_slc = QGridLayout(wid_sl) + lay_slc.setAlignment(Qt.AlignTop) + lay_slc.setVerticalSpacing(6) + lay_slc.setHorizontalSpacing(20) + + if self.section == 'BO': + lay_slc.setColumnStretch(0, 1) + lay_slc.setColumnStretch(1, 2) + lay_slc.setColumnStretch(2, 2) + + lay_slc.addWidget(QLabel( + '<h4>Mode</h4>', self, alignment=Qt.AlignCenter), 2, 0) + lay_slc.addWidget(QLabel( + '<h4>Ready</h4>', self, alignment=Qt.AlignCenter), 3, 0) + lay_slc.addWidget(QLabel( + '<h4>Enable</h4>', self, alignment=Qt.AlignCenter), 4, 0) + lay_slc.addItem(QSpacerItem( + 0, 10, QSzPlcy.Ignored, QSzPlcy.Fixed), 5, 0) + lay_slc.addWidget(QLabel( + '<h4>Amp.</h4>', self, alignment=Qt.AlignCenter), 7, 0) + lay_slc.addWidget(QLabel( + '<h4>Phase</h4>', self, alignment=Qt.AlignCenter), 9, 0) + lay_slc.addWidget(QLabel( + '<h4>Reference</h4>', self, alignment=Qt.AlignCenter), 14, 0) + lay_slc.addWidget(QLabel( + '<h4>Input</h4>', self, alignment=Qt.AlignCenter), 15, 0) + lay_slc.addWidget(QLabel( + '<h4>Error</h4>', self, alignment=Qt.AlignCenter), 16, 0) + + offset = 1 + if self.section == 'SI': + for key, chs_dict in self.chs['SL']['Over'].items(): + line = QFrame() + line.setFrameShape(QFrame.VLine) + line.setFrameShadow(QFrame.Plain) + line.setLineWidth(2) + line.setStyleSheet('color: gray') + lay_slc.addWidget(line, 0, offset, 17, 1) + self._create_slc_lay(lay_slc, key, chs_dict, offset+1) + offset += 3 + else: + self._create_slc_lay(lay_slc, None, self.chs['SL']['Over'], 1) + offset += 3 + + self.pb_errdtls = QPushButton( + qta.icon('fa5s.external-link-alt'), ' Errors', self) + self.pb_errdtls.setStyleSheet('min-width: 4em') + cmd = f'sirius-hla-{self.section.lower()}-rf-control.py' + cmd = f'{cmd} -d sl-err'.split(" ") + connect_newprocess( + self.pb_errdtls, cmd, is_window=True, parent=self) + self.pb_paramdtls = QPushButton( + qta.icon('fa5s.external-link-alt'), ' Parameters', self) + self.pb_paramdtls.setStyleSheet('min-width: 6.5em') + cmd = f'sirius-hla-{self.section.lower()}-rf-control.py' + cmd = f'{cmd} -d sl-param'.split(" ") + connect_newprocess( + self.pb_paramdtls, cmd, is_window=True, parent=self) + + gbox_details = QGroupBox('Details', self) + lay_details = QHBoxLayout(gbox_details) + lay_details.setAlignment(Qt.AlignTop) + lay_details.addWidget(self.pb_errdtls, alignment=Qt.AlignCenter) + lay_details.addWidget(self.pb_paramdtls, alignment=Qt.AlignCenter) + + lay_slc.addWidget(gbox_details, 17, 0, 1, offset) + + # # Tuning + # # # Tuning settings + ld_autotun = QLabel('Auto Tuning: ', self, alignment=Qt.AlignRight) + ld_dtune = QLabel('DTune: ', self, alignment=Qt.AlignRight) + ld_dphase = QLabel('Dephase: ', self, alignment=Qt.AlignRight) + ld_tunact = QLabel( + 'Acting: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + ld_oversht = QLabel( + 'Overshoot: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + ld_margin = QLabel( + 'Deadband: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + lay_tunset = QGridLayout() + lay_tunset.setAlignment(Qt.AlignTop | Qt.AlignHCenter) + lay_tunset.setVerticalSpacing(12) + lay_tunset.setColumnStretch(0, 3) + lay_tunset.addWidget(ld_autotun, 1, 1) + lay_tunset.addWidget(ld_dtune, 2, 1) + lay_tunset.addWidget(ld_margin, 3, 1) + lay_tunset.addWidget(ld_oversht, 4, 1) + lay_tunset.addWidget(ld_dphase, 5, 1) + lay_tunset.addWidget(ld_tunact, 6, 1) + lay_tunset.addItem(QSpacerItem( + 15, 0, QSzPlcy.Fixed, QSzPlcy.Ignored), 0, 3) + lay_tunset.setColumnStretch(5, 3) + if self.section == 'SI': + offset = 2 + for k, val in self.chs['Tun'].items(): + self._create_tun_set_wid(lay_tunset, k, val, offset) + offset += 2 + else: + self._create_tun_set_wid(lay_tunset, None, self.chs['Tun'], 2) + + # # # Plungers motors + lay_plunmon = QGridLayout() + lay_plunmon.addWidget(QLabel('Up', alignment=Qt.AlignCenter), 2, 1) + lay_plunmon.addWidget(QLabel('Down', alignment=Qt.AlignCenter), 3, 1) + + self.graph_plunmotors = SiriusTimePlot(self) + self.graph_plunmotors.setObjectName('graph') + # self.graph_plunmotors.setStyleSheet( + # '#graph{min-height:15em;min-width:20em;max-height:15em;}') + self.graph_plunmotors.autoRangeX = True + self.graph_plunmotors.autoRangeY = True + self.graph_plunmotors.backgroundColor = QColor(255, 255, 255) + self.graph_plunmotors.showXGrid = True + self.graph_plunmotors.showYGrid = True + self.graph_plunmotors.showLegend = True + self.graph_plunmotors.timeSpan = 1800 + self.graph_plunmotors.maxRedrawRate = 2 + self.graph_plunmotors.setLabel('left', '') + + if self.section == 'SI': + offset = 2 + for key, chs_dict in self.chs['Tun'].items(): + lb_plg = QLabel(key, alignment=Qt.AlignCenter) + led_plg_dn = PyDMLed( + self, self.prefix+chs_dict['Pl1Down']) + led_plg_dn.offColor = QColor(64, 64, 64) + led_plg_dn.onColor = QColor('blue') + led_plg_dn.shape = PyDMLed.ShapeMap.Square + led_plg_up = PyDMLed( + self, self.prefix+chs_dict['Pl1Up']) + led_plg_up.offColor = QColor(64, 64, 64) + led_plg_up.onColor = QColor('blue') + led_plg_up.shape = PyDMLed.ShapeMap.Square + self.graph_plunmotors.addYChannel( + y_channel=self.prefix+chs_dict['PlM1Curr'], + color=self.prefix+chs_dict['color'], name=key, + lineStyle=Qt.SolidLine, lineWidth=1, + ) + + lay_plunmon.addWidget(lb_plg, 1, offset) + lay_plunmon.addWidget( + led_plg_up, 2, offset, alignment=Qt.AlignCenter) + lay_plunmon.addWidget( + led_plg_dn, 3, offset, alignment=Qt.AlignCenter) + offset += 1 + else: + self.lb_plg1 = QLabel('Plg 1', alignment=Qt.AlignCenter) + self.led_plg1_dn = PyDMLed( + self, self.prefix+self.chs['Tun']['Pl1Down']) + self.led_plg1_dn.offColor = QColor(64, 64, 64) + self.led_plg1_dn.onColor = QColor('blue') + self.led_plg1_dn.shape = PyDMLed.ShapeMap.Square + self.led_plg1_up = PyDMLed( + self, self.prefix+self.chs['Tun']['Pl1Up']) + self.led_plg1_up.offColor = QColor(64, 64, 64) + self.led_plg1_up.onColor = QColor('blue') + self.led_plg1_up.shape = PyDMLed.ShapeMap.Square + self.graph_plunmotors.addYChannel( + y_channel=self.prefix+self.chs['Tun']['PlM1Curr'], + color='blue', name='Motor 1', + lineStyle=Qt.SolidLine, lineWidth=1) + + self.lb_plg2 = QLabel('Plg 2', alignment=Qt.AlignCenter) + self.led_plg2_dn = PyDMLed( + self, self.prefix+self.chs['Tun']['Pl2Down']) + self.led_plg2_dn.offColor = QColor(64, 64, 64) + self.led_plg2_dn.onColor = QColor('blue') + self.led_plg2_dn.shape = PyDMLed.ShapeMap.Square + self.led_plg2_up = PyDMLed( + self, self.prefix+self.chs['Tun']['Pl2Up']) + self.led_plg2_up.offColor = QColor(64, 64, 64) + self.led_plg2_up.onColor = QColor('blue') + self.led_plg2_up.shape = PyDMLed.ShapeMap.Square + self.graph_plunmotors.addYChannel( + y_channel=self.prefix+self.chs['Tun']['PlM2Curr'], color='red', + name='Motor 2', lineStyle=Qt.SolidLine, lineWidth=1) + + lay_plunmon.addWidget(self.lb_plg1, 1, 2) + lay_plunmon.addWidget( + self.led_plg1_up, 2, 2, alignment=Qt.AlignCenter) + lay_plunmon.addWidget( + self.led_plg1_dn, 3, 2, alignment=Qt.AlignCenter) + lay_plunmon.addWidget(self.lb_plg2, 1, 3) + lay_plunmon.addWidget( + self.led_plg2_up, 2, 3, alignment=Qt.AlignCenter) + lay_plunmon.addWidget( + self.led_plg2_dn, 3, 3, alignment=Qt.AlignCenter) + + wid_tun = QWidget() + lay_plun = QGridLayout(wid_tun) + lay_plun.setColumnStretch(0, 0) + lay_plun.setColumnStretch(1, 1) + lay_plun.addWidget(QLabel( + '<h3> • Settings</h3>', self, alignment=Qt.AlignLeft), 0, 0, 1, 3) + lay_plun.addLayout(lay_tunset, 1, 0, 1, 2) + if self.section == 'SI': + lay_plun.addWidget(QLabel( + '<h3> • Tuners</h3>', self, alignment=Qt.AlignLeft), 3, 0) + else: + lay_plun.addWidget(QLabel( + '<h3> • Plungers</h3>', self, alignment=Qt.AlignLeft), 3, 0) + lay_plun.addLayout(lay_plunmon, 4, 0) + lay_plun.addWidget(self.graph_plunmotors, 4, 1, 1, 2) + + # # FieldFlatness settings + if self.section != "SI": + pvs = self.chs['FFlat'] + lb2 = '4' + lb_fflat = QLabel( + '<h3> • Field Flatness</h3>', self, alignment=Qt.AlignLeft) + lb_ffen = QLabel('Enable: ', self, alignment=Qt.AlignRight) + self.bt_ffen = PyDMStateButton(self, self.prefix+pvs['Auto']+'-Sel') + self.lb_ffen = SiriusLedState(self, self.prefix+pvs['Auto']+'-Sts') + lb_ffpos = QLabel('Position: ', self, alignment=Qt.AlignRight) + self.bt_ffpos = PyDMStateButton(self, self.prefix+pvs['Pos']+'-Sel') + self.lb_ffpos = SiriusLedState(self, self.prefix+pvs['Pos']+'-Sts') + lb_ffg1 = QLabel('Gain Cell 2: ', self, alignment=Qt.AlignRight) + lb_ffg2 = QLabel( + f'Gain Cell {lb2:s}: ', self, alignment=Qt.AlignRight) + self.sb_ffg1 = SiriusSpinbox(self, self.prefix+pvs['Gain1']+'-SP') + self.sb_ffg2 = SiriusSpinbox(self, self.prefix+pvs['Gain2']+'-SP') + self.lb_ffg1 = SiriusLabel(self, self.prefix+pvs['Gain1']+'-RB') + self.lb_ffg2 = SiriusLabel(self, self.prefix+pvs['Gain2']+'-RB') + self.lb_ffg1.showUnits = True + self.lb_ffg2.showUnits = True + lb_ffdb = QLabel('DeadBand: ', self, alignment=Qt.AlignRight) + self.sb_ffdb = SiriusSpinbox( + self, self.prefix+pvs['Deadband']+'-SP') + self.lb_ffdb = SiriusLabel(self, self.prefix+pvs['Deadband']+'-RB') + self.lb_ffdb.showUnits = True + lb_ffcell1 = QLabel('Cell 2: ', self, alignment=Qt.AlignRight) + self.lb_ffcell1 = SiriusLabel(self, self.prefix+pvs['Cell1']) + self.lb_ffcell1.showUnits = True + lb_ffcell2 = QLabel( + f'Cell {lb2:s}: ', self, alignment=Qt.AlignRight) + self.lb_ffcell2 = SiriusLabel(self, self.prefix+pvs['Cell2']) + self.lb_ffcell2.showUnits = True + lb_fferr = QLabel('Error: ', self, alignment=Qt.AlignRight) + self.lb_fferr = SiriusLabel(self, self.prefix+pvs['Err']) + self.lb_fferr.showUnits = True + lb_ffsts = QLabel('Acting: ', self, alignment=Qt.AlignRight) + self.lb_ffsts = SiriusLedState(self, self.prefix+pvs['Sts']) + lb_fwdmin = QLabel( + 'Tuning Fwd Min: ', self, alignment=Qt.AlignRight) + self.lb_fwdmin = SiriusLedState(self, self.prefix+pvs['FwdMin']) + + lay_fflat = QGridLayout() + lay_fflat.setAlignment(Qt.AlignTop | Qt.AlignHCenter) + lay_fflat.setVerticalSpacing(12) + lay_fflat.addWidget(lb_fflat, 0, 0) + lay_fflat.addWidget(lb_ffen, 1, 0) + lay_fflat.addWidget(self.bt_ffen, 1, 1) + lay_fflat.addWidget(self.lb_ffen, 1, 2) + lay_fflat.addWidget(lb_ffpos, 2, 0) + lay_fflat.addWidget(self.bt_ffpos, 2, 1) + lay_fflat.addWidget(self.lb_ffpos, 2, 2) + lay_fflat.addWidget(lb_ffg1, 3, 0) + lay_fflat.addWidget(self.sb_ffg1, 3, 1) + lay_fflat.addWidget(self.lb_ffg1, 3, 2) + lay_fflat.addWidget(lb_ffg2, 4, 0) + lay_fflat.addWidget(self.sb_ffg2, 4, 1) + lay_fflat.addWidget(self.lb_ffg2, 4, 2) + lay_fflat.addWidget(lb_ffdb, 5, 0) + lay_fflat.addWidget(self.sb_ffdb, 5, 1) + lay_fflat.addWidget(self.lb_ffdb, 5, 2) + lay_fflat.addWidget(lb_ffcell1, 6, 0) + lay_fflat.addWidget(self.lb_ffcell1, 6, 1) + lay_fflat.addWidget(lb_ffcell2, 7, 0) + lay_fflat.addWidget(self.lb_ffcell2, 7, 1) + lay_fflat.addWidget(lb_fferr, 8, 0) + lay_fflat.addWidget(self.lb_fferr, 8, 1) + lay_fflat.addWidget(lb_ffsts, 9, 0) + lay_fflat.addWidget(self.lb_ffsts, 9, 1, alignment=Qt.AlignCenter) + lay_fflat.addWidget(lb_fwdmin, 10, 0) + lay_fflat.addWidget( + self.lb_fwdmin, 10, 1, alignment=Qt.AlignCenter) + wid_fflat = QWidget() + wid_fflat.setLayout(lay_fflat) + + # # Diagnostics + wid_diag = QWidget() + lay_diag = QGridLayout(wid_diag) + lay_diag.setAlignment(Qt.AlignTop) + lay_diag.setSpacing(9) + + add_labels = True + if self.section == 'SI': + column = 1 + for k, chs in self.chs['Diagnostics'].items(): + self._create_diag_lay(lay_diag, k, chs, column, add_labels) + if add_labels: + add_labels = False + column += 1 + else: + self._create_diag_lay( + lay_diag, None, self.chs['Diagnostics'], 1, add_labels) + + # # FDL + wid_fdl = QWidget() + lay_fdl = QVBoxLayout(wid_fdl) + lay_fdl.setAlignment(Qt.AlignTop) + lay_fdl.setSpacing(9) + self.curves_amp = dict() + + if self.section == 'SI': + for k, chs in self.chs['FDL'].items(): + self._create_fdl_lay(lay_fdl, k, chs) + else: + self._create_fdl_lay(lay_fdl, None, self.chs['FDL']) + + wid_llrf = QTabWidget(self) + color = 'green' if self.section == 'BO' else 'blue' + wid_llrf.setStyleSheet(""" + QTabBar::tab:selected, QTabBar::tab:hover { + background-color: """+color+"""; + color: white; + border: 0.1em solid white; + }""") + wid_llrf.addTab(wid_sl, 'Slow Loop Control') + wid_llrf.addTab(wid_tun, 'Tuning') + if self.section == 'BO': + wid_llrf.addTab(wid_fflat, 'Field Flatness') + wid_llrf.addTab(wid_diag, 'Diagnostics') + wid_llrf.addTab(wid_fdl, 'FDL') + + # Layout + vlay = QVBoxLayout() + vlay.addWidget(QLabel( + '<h3> • Solid State Amplifiers</h3>', + self, alignment=Qt.AlignLeft)) + vlay.addLayout(lay_amp) + vlay.addWidget(QLabel( + '<h3> • LLRF</h3>', self, alignment=Qt.AlignLeft)) + vlay.addWidget(wid_llrf) + vlay.addStretch() + return vlay + + def _rampControlLayout(self): + ctrls_label = QLabel('<h3> • Controls</h3>', self, + alignment=Qt.AlignLeft) + self.bt_rmpenbl = PyDMStateButton( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpEnbl-Sel') + self.lb_rmpenbl = SiriusLedState( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpEnbl-Sts') + + self.led_rmpready = PyDMLed( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpReady-Mon') + self.led_rmpready.onColor = PyDMLed.LightGreen + self.led_rmpready.offColor = PyDMLed.Red + + self.led_rmptrig = PyDMLed( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpTrigger-Mon') + self.led_rmptrig.onColor = PyDMLed.LightGreen + self.led_rmptrig.offColor = PyDMLed.Red + + self.cb_rmpincts = SiriusSpinbox( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpIncTimeTs-SP') + self.lb_rmpincts = SiriusLabel( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpIncTimeTs-RB') + self.lb_rmpincts.showUnits = True + + self.sb_rmpts1 = SiriusSpinbox( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpTs1-SP') + self.lb_rmpts1 = SiriusLabel( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpTs1-RB') + self.lb_rmpts1.showUnits = True + self.sb_rmpts2 = SiriusSpinbox( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpTs2-SP') + self.lb_rmpts2 = SiriusLabel( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpTs2-RB') + self.lb_rmpts2.showUnits = True + self.sb_rmpts3 = SiriusSpinbox( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpTs3-SP') + self.lb_rmpts3 = SiriusLabel( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpTs3-RB') + self.lb_rmpts3.showUnits = True + self.sb_rmpts4 = SiriusSpinbox( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpTs4-SP') + self.lb_rmpts4 = SiriusLabel( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpTs4-RB') + self.lb_rmpts4.showUnits = True + + self.sb_rmpphstop = SiriusSpinbox( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpPhsTop-SP') + self.lb_rmpphstop = SiriusLabel( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpPhsTop-RB') + self.lb_rmpphstop.showUnits = True + self.ld_rmpphstop = QLabel('Amplitude', self, alignment=Qt.AlignRight) + lay_rmpphstopdesc = QHBoxLayout() + lay_rmpphstopdesc.addWidget(self.ld_rmpphstop) + lay_rmpphstopdesc.setAlignment(Qt.AlignRight) + self.le_rmpvolttop1 = PyDMLineEdit( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpAmpTop-SP') + self.lb_rmpvolttop1 = SiriusLabel( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpAmpTop-RB') + self.lb_rmpvolttop1.showUnits = True + self.lb_rmpvolttop2 = SiriusLabel( + self, self.prefix+'BO-05D:RF-P5Cav:Cell3TopVGap-Mon') + self.lb_rmpvolttop2.showUnits = True + + self.sb_rmpphsbot = SiriusSpinbox( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpPhsBot-SP') + self.lb_rmpphsbot = SiriusLabel( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpPhsBot-RB') + self.lb_rmpphsbot.showUnits = True + self.ld_rmpphsbot = QLabel('Amplitude', self, alignment=Qt.AlignRight) + lay_rmpphsbotdesc = QHBoxLayout() + lay_rmpphsbotdesc.addWidget(self.ld_rmpphsbot) + lay_rmpphsbotdesc.setAlignment(Qt.AlignRight) + self.le_rmpvoltbot1 = PyDMLineEdit( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpAmpBot-SP') + self.lb_rmpvoltbot1 = SiriusLabel( + self, self.prefix+'RA-RaBO01:RF-LLRF:RmpAmpBot-RB') + self.lb_rmpvoltbot1.showUnits = True + self.lb_rmpvoltbot2 = SiriusLabel( + self, self.prefix+'BO-05D:RF-P5Cav:Cell3BotVGap-Mon') + self.lb_rmpvoltbot2.showUnits = True + + lay = QGridLayout() + lay.setAlignment(Qt.AlignLeft) + lay.addWidget(ctrls_label, 0, 0) + lay.addItem( + QSpacerItem(0, 10, QSzPlcy.Ignored, QSzPlcy.Fixed), 1, 0) + lay.addWidget(QLabel('Enable: ', self, + alignment=Qt.AlignRight), 2, 0) + lay.addWidget(self.bt_rmpenbl, 2, 2) + lay.addWidget(self.lb_rmpenbl, 2, 2, alignment=Qt.AlignLeft) + lay.addWidget(QLabel('Ramp Ready: ', self, + alignment=Qt.AlignRight), 3, 0) + lay.addWidget(self.led_rmpready, 3, 1, alignment=Qt.AlignLeft) + lay.addWidget(QLabel('Receiving trigger: ', self, + alignment=Qt.AlignRight), 4, 0) + lay.addWidget(self.led_rmptrig, 4, 1, alignment=Qt.AlignLeft) + lay.addItem( + QSpacerItem(0, 10, QSzPlcy.Ignored, QSzPlcy.Fixed), 5, 0) + lay.addWidget(QLabel('<h4>Durations</h4>', self), 6, 0, 1, 3) + lay.addWidget(QLabel('Bottom: ', self, + alignment=Qt.AlignRight), 7, 0) + lay.addWidget(self.sb_rmpts1, 7, 2) + lay.addWidget(self.lb_rmpts1, 7, 3) + lay.addWidget(QLabel('Rampup: ', self, + alignment=Qt.AlignRight), 8, 0) + lay.addWidget(self.sb_rmpts2, 8, 2) + lay.addWidget(self.lb_rmpts2, 8, 3) + lay.addWidget(QLabel('Top: ', self, + alignment=Qt.AlignRight), 9, 0) + lay.addWidget(self.sb_rmpts3, 9, 2) + lay.addWidget(self.lb_rmpts3, 9, 3) + lay.addWidget(QLabel('Rampdown:', self, + alignment=Qt.AlignRight), 10, 0) + lay.addWidget(self.sb_rmpts4, 10, 2) + lay.addWidget(self.lb_rmpts4, 10, 3) + lay.addWidget(QLabel('Ramp Inc. Rate: ', self, + alignment=Qt.AlignRight), 11, 0) + lay.addWidget(self.cb_rmpincts, 11, 2) + lay.addWidget(self.lb_rmpincts, 11, 3) + lay.addItem(QSpacerItem(0, 10, QSzPlcy.Ignored, QSzPlcy.Fixed), 12, 0) + lay.addWidget(QLabel('<h4>Bottom</h4>', self), 13, 0, 1, 3) + lay.addWidget(QLabel('Phase', self, + alignment=Qt.AlignRight), 14, 0) + lay.addWidget(self.sb_rmpphsbot, 14, 2) + lay.addWidget(self.lb_rmpphsbot, 14, 3) + lay.addLayout(lay_rmpphsbotdesc, 15, 0) + lbl = QLabel('[mV]', self, alignment=Qt.AlignCenter) + lbl.setMaximumWidth(25) + lay.addWidget(lbl, 15, 1) + lay.addWidget(self.le_rmpvoltbot1, 15, 2) + lay.addWidget(self.lb_rmpvoltbot1, 15, 3) + lbl = QLabel('[V]', self, alignment=Qt.AlignCenter) + lbl.setMaximumWidth(25) + lay.addWidget(lbl, 16, 1) + lay.addWidget(self.lb_rmpvoltbot2, 16, 1, 1, 3) + lay.addWidget(QLabel('<h4>Top</h4>', self), 17, 0, 1, 3) + lay.addWidget(QLabel('Phase', self, + alignment=Qt.AlignRight), 18, 0) + lay.addWidget(self.sb_rmpphstop, 18, 2) + lay.addWidget(self.lb_rmpphstop, 18, 3) + lay.addLayout(lay_rmpphstopdesc, 19, 0) + lbl = QLabel('[mV]', self, alignment=Qt.AlignCenter) + lbl.setMaximumWidth(25) + lay.addWidget(lbl, 19, 1) + lay.addWidget(self.le_rmpvolttop1, 19, 2) + lay.addWidget(self.lb_rmpvolttop1, 19, 3) + lbl = QLabel('[V]', self, alignment=Qt.AlignCenter) + lbl.setMaximumWidth(25) + lay.addWidget(lbl, 20, 1) + lay.addWidget(self.lb_rmpvolttop2, 20, 1, 1, 3) + lay.addItem(QSpacerItem( + 200, 10, QSzPlcy.Fixed, QSzPlcy.MinimumExpanding), 21, 3) + return lay + + def _advancedDetailsLayout(self): + if self.section == 'SI': + lay = QVBoxLayout() + lay.setAlignment(Qt.AlignTop) + lay.setSpacing(9) + systems = ['A', 'B'] + else: + lay = QGridLayout() + lay.setAlignment(Qt.AlignTop | Qt.AlignHCenter) + lay.setHorizontalSpacing(9) + lay.setVerticalSpacing(18) + lay.addItem(QSpacerItem(0, 20, QSzPlcy.Ignored, QSzPlcy.Fixed)) + systems = [''] + + for i in range(len(systems)): + buttons = [] + self._addDetailButton( + 'ADCs and DACs', 'adcs-dacs', systems[i], buttons) + self._addDetailButton( + 'RF Inputs', 'rf-inputs', systems[i], buttons) + self._addDetailButton( + 'Hardware', 'hardware', systems[i], buttons) + self._addDetailButton( + 'Loops', 'loops', systems[i], buttons) + self._addDetailButton( + 'Cavity Ramps', 'ramps', systems[i], buttons) + self._addDetailButton( + 'Auto Start', 'auto-start', systems[i], buttons) + self._addDetailButton( + 'Tuning', 'tuning', systems[i], buttons) + self._addDetailButton( + 'Cal Sys', 'cal-sys', systems[i], buttons) + self._addDetailButton( + 'Cal Eq', 'cal-eq', systems[i], buttons) + + if self.section == 'SI': + gbox = QGroupBox(f'System {systems[i]}', self) + gbox_lay = QGridLayout() + gbox_lay.setHorizontalSpacing(9) + gbox_lay.setVerticalSpacing(18) + self._setupDetailButtons(gbox_lay, buttons, 0) + gbox.setLayout(gbox_lay) + lay.addItem(QSpacerItem(0, 20, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay.addWidget(gbox) + else: + self._setupDetailButtons(lay, buttons, 1) + + return lay + + def _addDetailButton(self, title, detail, system, buttons): + pb = QPushButton( + qta.icon('fa5s.external-link-alt'), f' {title}', self) + cmd = f'sirius-hla-{self.section.lower()}-rf-control.py' + cmd += f' -d {detail}' + if self.section == 'SI': + cmd += f' -s {system}' + connect_newprocess(pb, cmd.split(" "), is_window=True, parent=self) + buttons.append(pb) + + def _setupDetailButtons(self, lay, buttons, row): + column = 0 + for pb in buttons: + lay.addWidget(pb, row, column) + column += 1 + if column > 2: + column = 0 + row += 1 + + def _handle_rmptab_visibility(self, unit_type): + for pos in ['Top', 'Bottom']: + for pv_id in ['CavPwr', 'PowFwd', 'PowRev']: + self.ramp_chn_wid[unit_type][pos][pv_id].setVisible(True) + cur_unit = 'mV' + if unit_type == 'mV': + cur_unit = 'W' + for pos in ['Top', 'Bottom']: + for pv_id in ['CavPwr', 'PowFwd', 'PowRev']: + self.ramp_chn_wid[cur_unit][pos][pv_id].setVisible(False) + + def _rampMonLayout(self): + self.ramp_graph = SiriusWaveformPlot( + parent=self, background=QColor(255, 255, 255)) + self.ramp_graph.setObjectName('graph') + self.ramp_graph.setStyleSheet( + '#graph{min-height:15em;min-width:21em;max-height:15em;}') + self.ramp_graph.maxRedrawRate = 2 + self.ramp_graph.mouseEnabledX = True + self.ramp_graph.setShowXGrid(True) + self.ramp_graph.setShowYGrid(True) + self.ramp_graph.setShowLegend(False) + self.ramp_graph.setAutoRangeX(True) + self.ramp_graph.setAutoRangeY(True) + self.ramp_graph.setAxisColor(QColor(0, 0, 0)) + self.ramp_graph.plotItem.getAxis('bottom').setStyle(tickTextOffset=15) + self.ramp_graph.plotItem.getAxis('left').setStyle(tickTextOffset=5) + self.ramp_graph.addChannel( + y_channel=self.prefix+'RA-RF:PowerSensor1:TracData-Mon', + x_channel=self.prefix+'RA-RF:PowerSensor1:TimeAxis-Mon', + redraw_mode=2, name='Power [W]', color=QColor('blue')) + self.curve_pwrmtr = self.ramp_graph.curveAtIndex(0) + self.rb_pwrmtr = QRadioButton('Power Meter Signal', self) + self.rb_pwrmtr.setChecked(True) + self.rb_pwrmtr.toggled.connect( + _part(self._handle_rmpwfm_visibility, 0)) + self.ramp_graph.addChannel( + y_channel=self.prefix+'BR-RF-DLLRF-01:VCavRmpWf.AVAL', + x_channel=self.prefix+'BR-RF-DLLRF-01:DiagWf32Scale.AVAL', + redraw_mode=2, name='VGav kV', color=QColor('blue')) + self.curve_vgav = self.ramp_graph.curveAtIndex(1) + self.rb_vgav = QRadioButton('VGav [kV]', self) + self.rb_vgav.toggled.connect(_part(self._handle_rmpwfm_visibility, 1)) + self.ramp_graph.addChannel( + y_channel=self.prefix+'BR-RF-DLLRF-01:VCavRmpWf:W.AVAL', + x_channel=self.prefix+'BR-RF-DLLRF-01:DiagWf32Scale.AVAL', + redraw_mode=2, name='Power [W]', color=QColor('blue')) + self.curve_pwr = self.ramp_graph.curveAtIndex(2) + self.ramp_graph.setLabel('left', '') + self.rb_pwr = QRadioButton('Power [W]', self) + self.rb_pwr.toggled.connect(_part(self._handle_rmpwfm_visibility, 2)) + hbox_rb = QHBoxLayout() + hbox_rb.addWidget(self.rb_pwrmtr) + hbox_rb.addWidget(self.rb_vgav) + hbox_rb.addWidget(self.rb_pwr) + + self.curve_vgav.setVisible(False) + self.curve_pwr.setVisible(False) + + self.cb_ramp = QComboBox() + self.cb_ramp.setStyleSheet("QComboBox{max-width: 3.5em; font-weight: bold;}") + self.cb_ramp.addItems(["W", "mV"]) + self.cb_ramp.currentTextChanged.connect(self._handle_rmptab_visibility) + + self.lb_c3phsbot = SiriusLabel( + self, self.prefix+'BO-05D:RF-P5Cav:Cell3BotPhs-Mon') + self.lb_c3phsbot.showUnits = True + self.lb_cavvgapbot = SiriusLabel( + self, self.prefix+'BO-05D:RF-P5Cav:Cell3BotVGap-Mon') + self.lb_cavvgapbot.showUnits = True + + lay = QGridLayout() + self.ramp_chn_wid = {} + + for unit_type, rmp_channels in self.chs['Ramp'].items(): + self.ramp_chn_wid[unit_type] = {} + for idy, (pos, rmp_ch_pvs) in enumerate(rmp_channels.items(), 1): + self.ramp_chn_wid[unit_type][pos] = {} + wid_dict = self.ramp_chn_wid[unit_type][pos] + + for idx, (pv_id, pv_val) in enumerate(rmp_ch_pvs.items(), 2): + wid_dict[pv_id] = SiriusLabel( + self, self.prefix+pv_val) + wid_dict[pv_id].showUnits = True + lay.addWidget(wid_dict[pv_id], idx, idy) + if unit_type == 'mV': + wid_dict[pv_id].setVisible(False) + + self.lb_c3phstop = SiriusLabel( + self, self.prefix+'BO-05D:RF-P5Cav:Cell3TopPhs-Mon') + self.lb_c3phstop.showUnits = True + self.lb_cavvgaptop = SiriusLabel( + self, self.prefix+'BO-05D:RF-P5Cav:Cell3TopVGap-Mon') + self.lb_cavvgaptop.showUnits = True + + lay.setVerticalSpacing(15) + lay.addWidget(QLabel( + '<h4>Bottom</h4>', self, alignment=Qt.AlignCenter), 1, 1) + lay.addWidget(QLabel( + '<h4>Top</h4>', self, alignment=Qt.AlignCenter), 1, 2) + lay.addWidget(QLabel( + '<h4>Cavity Power</h4>', self, alignment=Qt.AlignCenter), 2, 0) + lay.addWidget(QLabel( + '<h4>Power Fwd.</h4>', self, alignment=Qt.AlignCenter), 3, 0) + lay.addWidget(QLabel( + '<h4>Power Rev.</h4>', self, alignment=Qt.AlignCenter), 4, 0) + lay.addItem( + QSpacerItem(0, 20, QSzPlcy.Ignored, QSzPlcy.Ignored), 5, 0) + lay.addWidget(QLabel( + '<h4>Phase</h4>', self, alignment=Qt.AlignCenter), 6, 0) + lay.addWidget(QLabel( + '<h4>Gap Voltage:</h4>', self, alignment=Qt.AlignCenter), 7, 0) + + lay.addWidget(self.cb_ramp, 1, 0) + lay.addWidget(self.lb_c3phsbot, 6, 1) + lay.addWidget(self.lb_cavvgapbot, 7, 1, alignment=Qt.AlignCenter) + lay.addWidget(self.lb_c3phstop, 6, 2) + lay.addWidget(self.lb_cavvgaptop, 7, 2, alignment=Qt.AlignCenter) + lay.addItem(QSpacerItem(0, 20, QSzPlcy.Ignored, QSzPlcy.Fixed), 8, 0) + lay.addWidget(self.ramp_graph, 9, 0, 1, 3) + lay.addLayout(hbox_rb, 10, 0, 1, 3) + lay.addItem( + QSpacerItem(0, 10, QSzPlcy.Ignored, QSzPlcy.Expanding), 11, 0) + return lay + + def _powerMeterLayout(self): + lay_vals = QGridLayout() + lay_vals.setAlignment(Qt.AlignTop) + lay_vals.setHorizontalSpacing(15) + lay_vals.setVerticalSpacing(6) + self.cb_units = QComboBox(self) + self.cb_units.addItems(['W', 'dBm', 'mV']) + self.cb_units.setStyleSheet( + 'QComboBox{max-width: 3.5em; font-weight: bold;}') + self.cb_units.currentTextChanged.connect( + self._handle_pwrdata_visibility) + if self.section == 'SI': + lay_vals.addWidget( + QLabel('<h4>Units</h4>', self, alignment=Qt.AlignCenter), 0, 4) + lay_vals.addWidget(self.cb_units, 0, 5) + else: + lay_vals.addWidget( + QLabel('<h4>Channel</h4>', self, + alignment=Qt.AlignCenter), 0, 2) + lay_vals.addWidget(self.cb_units, 0, 3) + + self.pwr_mon_graph = SiriusTimePlot(self) + self.pwr_mon_graph.autoRangeX = True + self.pwr_mon_graph.autoRangeY = True + self.pwr_mon_graph.backgroundColor = QColor(255, 255, 255) + self.pwr_mon_graph.showXGrid = True + self.pwr_mon_graph.showYGrid = True + self.pwr_mon_graph.timeSpan = 1800 + self.pwr_mon_graph.maxRedrawRate = 1 + self.pwr_mon_graph.setObjectName('pwrmon_graph') + self.pwr_mon_graph.setStyleSheet( + '#pwrmon_graph{min-width: 21em; min-height: 18em;}') + + data = self.chs['PwrMtr'] + + self._pm_labels = dict() + self._pm_labels['dBm'] = list() + self._pm_labels['W'] = list() + self._pm_labels['mV'] = list() + idx = 0 + column = 0 + + for name, dic in data.items(): + wch, dbch, mvch = dic['W'], dic['dBm'], dic['mV'] + color = dic['color'] + row = idx+1 + if idx > 3 and idx < 8: + column = 3 + row = idx-3 + elif idx >= 8: + column = 0 + if idx == 8: + lay_vals.addItem(QSpacerItem( + 0, 10, QSzPlcy.Ignored, QSzPlcy.Fixed), row, 0) + elif idx > 11: + column = 3 + row = idx-3 + row += 1 + + # Table + cbx = QCheckBox(self) + cond = True if self.section == 'BO' else 'Coup' in name + cbx.setChecked(cond) + cbx.setObjectName(name) + cbx.setStyleSheet('color:'+color+'; max-width: 1.2em;') + cbx.stateChanged.connect(self._handle_curves_visibility) + + lbl = ''.join(name.split()[2::]) if self.section == 'SI' else name + lb_desc = QLabel(lbl, self) + lb_desc.setStyleSheet( + 'min-height: 1.5em; color:'+color+'; max-width: 8em;' + 'qproperty-alignment: AlignCenter;') + + lb_dbmpwr = SiriusLabel(self, self.prefix+dbch) + lb_dbmpwr.showUnits = True + lb_dbmpwr.setVisible(False) + self._pm_labels['dBm'].append(lb_dbmpwr) + + lb_wpwr = SiriusLabel(self, self.prefix+wch) + lb_wpwr.showUnits = True + self._pm_labels['W'].append(lb_wpwr) + + lb_mvpwr = SiriusLabel(self, self.prefix+mvch) + lb_mvpwr.showUnits = True + lb_mvpwr.setVisible(False) + self._pm_labels['mV'].append(lb_mvpwr) + + lay_vals.addWidget(cbx, row, column) + lay_vals.addWidget(lb_desc, row, column+1) + lay_vals.addWidget(lb_dbmpwr, row, column+2) + lay_vals.addWidget(lb_wpwr, row, column+2) + lay_vals.addWidget(lb_mvpwr, row, column+2) + + # Graph + self.pwr_mon_graph.addYChannel( + y_channel=self.prefix+dbch, name=name+' dBm', color=color, + lineStyle=Qt.SolidLine, lineWidth=1) + self.curves[name+' dBm'] = self.pwr_mon_graph.curveAtIndex(3*idx) + self.pwr_mon_graph.addYChannel( + y_channel=self.prefix+wch, name=name+' W', color=color, + lineStyle=Qt.SolidLine, lineWidth=1) + self.curves[name+' W'] = self.pwr_mon_graph.curveAtIndex(3*idx+1) + self.pwr_mon_graph.addYChannel( + y_channel=self.prefix+mvch, name=name+' mV', color=color, + lineStyle=Qt.SolidLine, lineWidth=1) + self.curves[name+' mV'] = self.pwr_mon_graph.curveAtIndex(3*idx+2) + + idx += 1 + self.pwr_mon_graph.setLabel('left', '') + + # RF Inputs + if self.section == 'SI': + systems = ['A', 'B'] + rows = [0, 9] + for i in range(len(systems)): + lay_sys = QHBoxLayout() + lay_sys.setSpacing(9) + lb_sys = QLabel( + f'<h4>{systems[i]}</h4>', alignment=Qt.AlignCenter) + lb_sys.setStyleSheet('min-width:15px;max-width:15px;') + + pb_rfinp = QPushButton(qta.icon('fa5s.ellipsis-v'), '', self) + pb_rfinp.setStyleSheet( + 'min-width:18px;max-width:18px;icon-size:20px;') + cmd = f'sirius-hla-{self.section.lower()}-rf-control.py' + cmd = f'{cmd} -d rf-inputs -s {systems[i]}'.split(" ") + connect_newprocess(pb_rfinp, cmd, is_window=True, parent=self) + lay_vals.addWidget(pb_rfinp, rows[i], 0) + lay_vals.addWidget(lb_sys, rows[i], 1) + + if self.section == 'BO': + for name in data: + self.curves[name+' dBm'].setVisible(False) + self.curves[name+' mV'].setVisible(False) + + lb_cavphs = QLabel('Phase', self, alignment=Qt.AlignCenter) + self.lb_cavphs = SiriusLabel( + self, self.prefix+'BO-05D:RF-P5Cav:Cell3Phs-Mon') + self.lb_cavphs.showUnits = True + lay_vals.addWidget(lb_cavphs, 5, 2, alignment=Qt.AlignCenter) + lay_vals.addWidget(self.lb_cavphs, 5, 3) + else: + for name in data: + self.curves[name+' W'].setVisible('Coup' in name) + self.curves[name+' dBm'].setVisible(False) + self.curves[name+' mV'].setVisible(False) + + lay_cavvgap = QGridLayout() + offset = 0 + if self.section == 'SI': + for key, val in self.chs['CavVGap'].items(): + ld_cavvgap = QLabel( + f'Gap Voltage {key}:', self, alignment=Qt.AlignCenter) + ld_cavvgap.setStyleSheet('QLabel{font-size: 15pt;}') + lb_cavvgap = SiriusLabel(self, self.prefix+val) + lb_cavvgap.setStyleSheet('QLabel{font-size: 15pt;}') + lb_cavvgap.showUnits = True + lbl_refvol = QLabel( + f'Ref Voltage {key}:', self, alignment=Qt.AlignCenter) + rb_refvol = SiriusLabel( + self, self.prefix+self.chs['SL']['ASet'][key]+'-RB') + rb_refvol.showUnits = True + lay_cavvgap.addWidget(ld_cavvgap, offset, 0) + lay_cavvgap.addWidget(lb_cavvgap, offset, 1) + lay_cavvgap.addWidget(lbl_refvol, offset+1, 0) + lay_cavvgap.addWidget(rb_refvol, offset+1, 1) + offset += 2 + else: + self.ld_cavvgap = QLabel( + 'Gap Voltage:', self, alignment=Qt.AlignCenter) + self.ld_cavvgap.setStyleSheet('QLabel{font-size: 15pt;}') + self.lb_cavvgap = SiriusLabel(self, self.prefix+self.chs['CavVGap']) + self.lb_cavvgap.setStyleSheet('QLabel{font-size: 20pt;}') + self.lb_cavvgap.showUnits = True + self.lbl_refvol = QLabel( + 'Ref Voltage:', self, alignment=Qt.AlignCenter) + self.rb_refvol = SiriusLabel( + self, self.prefix+self.chs['SL']['ASet']+'-RB') + self.rb_refvol.showUnits = True + lay_cavvgap.addWidget(self.ld_cavvgap, 0, 0) + lay_cavvgap.addWidget(self.lb_cavvgap, 0, 1) + lay_cavvgap.addWidget(self.lbl_refvol, 1, 0) + lay_cavvgap.addWidget(self.rb_refvol, 1, 1) + offset += 2 + + lay = QGridLayout() + lay.setHorizontalSpacing(25) + lay.addItem(QSpacerItem(0, 10, QSzPlcy.Ignored, QSzPlcy.Fixed), 1, 0) + lay.addLayout(lay_vals, 2, 0) + lay.addItem(QSpacerItem(0, 10, QSzPlcy.Ignored, QSzPlcy.Fixed), 3, 0) + lay.addWidget(self.pwr_mon_graph, 4, 0) + lay.addItem(QSpacerItem( + 0, 10, QSzPlcy.Ignored, QSzPlcy.Minimum), 5, 0) + lay.addLayout(lay_cavvgap, 6, 0) + lay.addItem(QSpacerItem( + 0, 10, QSzPlcy.Ignored, QSzPlcy.MinimumExpanding), 7, 0) + return lay + + def _graphsLayout(self): + # Temperatures + self.temp_wid = QWidget() + self.temp_wid.setStyleSheet(""" + #tempcell_graph, #tempcoup_graph, #tempcirc_graph{ + min-width: 26em; min-height: 10.5em; max-height: 10.5em;} + QTabWidget::pane{ + border-bottom: 2px solid gray;} + QPushButton{ + min-width: 8em;} + """) + + lb_temp = QLabel('<h3>Temperatures [°C]</h3>', self) + self.pb_wattemp = QPushButton( + qta.icon('fa5s.external-link-alt'), ' Temp. Monitor', self) + cmd = f'sirius-hla-{self.section.lower()}-rf-control.py' + cmd = f'{cmd} -d temp-monitor'.split(" ") + connect_newprocess( + self.pb_wattemp, cmd, is_window=True, parent=self) + self.temp_tab = QTabWidget(self) + self.temp_tab.setObjectName(self.section+'Tab') + self.temp_tab.setContentsMargins(0, 0, 0, 0) + + lay_temp = QGridLayout(self.temp_wid) + lay_temp.setSpacing(4) + lay_temp.addWidget(lb_temp, 0, 0) + lay_temp.addWidget(self.pb_wattemp, 0, 1) + lay_temp.addWidget(self.temp_tab, 1, 0, 1, 2) + lay_temp.setRowStretch(0, 1) + lay_temp.setRowStretch(1, 10) + + if self.section == 'BO': + # Cavity + # # Cells + lb_tempcell = QLabel('<h3> • Cell</h3>', self) + self.led_tempcellok = PyDMLedMultiChannel(self) + hbox_tempcell_state = QHBoxLayout() + hbox_tempcell_state.addWidget(lb_tempcell, alignment=Qt.AlignLeft) + hbox_tempcell_state.addWidget( + self.led_tempcellok, alignment=Qt.AlignRight) + + self.tempcell_graph = SiriusTimePlot(self) + self.tempcell_graph.setObjectName('tempcell_graph') + self.tempcell_graph.autoRangeX = True + self.tempcell_graph.autoRangeY = True + self.tempcell_graph.backgroundColor = QColor(255, 255, 255) + self.tempcell_graph.showXGrid = True + self.tempcell_graph.showYGrid = True + self.tempcell_graph.timeSpan = 1800 + self.tempcell_graph.maxRedrawRate = 2 + + hbox_cbs = QHBoxLayout() + + for idx in range(len(self.chs['Cav Sts']['Temp']['Cells'])): + cid = 'Cell ' + str(idx + 1) + chn = self.prefix+self.chs['Cav Sts']['Temp']['Cells'][idx][0] + color = self.chs['Cav Sts']['Temp']['Cells'][idx][1] + + self.tempcell_graph.addYChannel( + y_channel=chn, name=cid, color=color, + lineStyle=Qt.SolidLine, lineWidth=1) + self.curves[cid] = self.tempcell_graph.curveAtIndex(idx) + + cbx = QCheckBox(cid, self) + cbx.setChecked(True) + cbx.setObjectName(cid) + cbx.setStyleSheet('color:'+color+';') + cbx.stateChanged.connect(self._handle_curves_visibility) + hbox_cbs.addWidget(cbx) + + self.tempcell_graph.setLabel('left', '') + + pen = mkPen(color='k', width=2, style=Qt.DashLine) + self.line_cell_maxlim = InfiniteLine(angle=0, pen=pen) + self.line_cell_minlim = InfiniteLine(angle=0, pen=pen) + self.tempcell_graph.addItem(self.line_cell_maxlim) + self.tempcell_graph.addItem(self.line_cell_minlim) + + # # Coupler + lb_tempcoup = QLabel('<h3> • Coupler</h3>', self) + self.led_tempcoupok = PyDMLedMultiChannel(self) + hbox_tempcoup_state = QHBoxLayout() + hbox_tempcoup_state.addWidget(lb_tempcoup, alignment=Qt.AlignLeft) + hbox_tempcoup_state.addWidget( + self.led_tempcoupok, alignment=Qt.AlignRight) + + self.tempcoup_graph = SiriusTimePlot(self) + self.tempcoup_graph.setObjectName('tempcoup_graph') + self.tempcoup_graph.autoRangeX = True + self.tempcoup_graph.autoRangeY = True + self.tempcoup_graph.backgroundColor = QColor(255, 255, 255) + self.tempcoup_graph.showXGrid = True + self.tempcoup_graph.showYGrid = True + self.tempcoup_graph.timeSpan = 1800 + self.tempcoup_graph.maxRedrawRate = 2 + self.tempcoup_graph.addYChannel( + y_channel=self.prefix+self.chs['Cav Sts']['Temp']['Coupler'][0], + color=self.chs['Cav Sts']['Temp']['Coupler'][1], + name='Coupler', lineStyle=Qt.SolidLine, lineWidth=1) + self.curves['Coupler'] = self.tempcoup_graph.curveAtIndex(0) + self.tempcoup_graph.setLabel('left', '') + self.line_coup_maxlim = InfiniteLine(angle=0, pen=pen) + self.line_coup_minlim = InfiniteLine(angle=0, pen=pen) + self.tempcoup_graph.addItem(self.line_coup_maxlim) + self.tempcoup_graph.addItem(self.line_coup_minlim) + + self.cavtemp_wid = QWidget() + lay_cavtemp = QVBoxLayout(self.cavtemp_wid) + lay_cavtemp.setAlignment(Qt.AlignTop) + lay_cavtemp.setContentsMargins(0, 0, 0, 9) + lay_cavtemp.addLayout(hbox_tempcell_state) + lay_cavtemp.addWidget(self.tempcell_graph) + lay_cavtemp.addLayout(hbox_cbs) + lay_cavtemp.addItem(QSpacerItem( + 0, 10, QSzPlcy.Ignored, QSzPlcy.Fixed)) + lay_cavtemp.addLayout(hbox_tempcoup_state) + lay_cavtemp.addWidget(self.tempcoup_graph) + + self.temp_tab.addTab(self.cavtemp_wid, 'Cavity') + + # Transm.Line Temperatures + lb_tempcirc = QLabel('<h3> • Circulator</h3>', self) + pen = mkPen(color='k', width=2, style=Qt.DashLine) + # temporary fix + if self.section == 'SI': + lims_circ = self.chs['TL Sts']['A']['Circ Limits'] + ch2vals = { + self.prefix+self.chs['TL Sts']['A']['Circulator Temp. In']['label']: { + 'comp': 'wt', 'value': lims_circ}, + self.prefix+self.chs['TL Sts']['A']['label']['Circulator Temp. Out']: { + 'comp': 'wt', 'value': lims_circ} + } + else: + lims_circ = self.chs['TL Sts']['Circ Limits'] + ch2vals = { + self.prefix+self.chs['TL Sts']['Circulator Temp. In']['label']: { + 'comp': 'wt', 'value': lims_circ}, + self.prefix+self.chs['TL Sts']['label']['Circulator Temp. Out']: { + 'comp': 'wt', 'value': lims_circ} + } + self.led_tempcircok = PyDMLedMultiChannel(self, ch2vals) + hbox_tempcirc_state = QHBoxLayout() + hbox_tempcirc_state.addWidget(lb_tempcirc, alignment=Qt.AlignLeft) + hbox_tempcirc_state.addWidget( + self.led_tempcircok, alignment=Qt.AlignRight) + + self.tempcirc_graph = SiriusTimePlot(self) + self.tempcirc_graph.setObjectName('tempcirc_graph') + self.tempcirc_graph.autoRangeX = True + self.tempcirc_graph.autoRangeY = True + self.tempcirc_graph.backgroundColor = QColor(255, 255, 255) + self.tempcirc_graph.showXGrid = True + self.tempcirc_graph.showYGrid = True + self.tempcirc_graph.timeSpan = 1800 + self.tempcirc_graph.maxRedrawRate = 1 + if self.section == 'SI': + self.tempcirc_graph.addYChannel( + y_channel=self.prefix+self.chs['TL Sts']['A']['Circulator Temp. In']['label'], + name='CTIn', color='magenta', + lineStyle=Qt.SolidLine, lineWidth=1) + self.tempcirc_graph.addYChannel( + y_channel=self.prefix+self.chs['TL Sts']['A']['label']['Circulator Temp. Out'], + name='CTOut', color='darkRed', + lineStyle=Qt.SolidLine, lineWidth=1) + else: + self.tempcirc_graph.addYChannel( + y_channel=self.prefix+self.chs['TL Sts']['Circulator Temp. In']['label'], + name='CTIn', color='magenta', + lineStyle=Qt.SolidLine, lineWidth=1) + self.tempcirc_graph.addYChannel( + y_channel=self.prefix+self.chs['TL Sts']['label']['Circulator Temp. Out'], + name='CTOut', color='darkRed', + lineStyle=Qt.SolidLine, lineWidth=1) + self.tempcirc_graph.setLabel('left', '') + + self.line_circ_maxlim = InfiniteLine( + pos=lims_circ[1], angle=0, pen=pen) + self.line_circ_minlim = InfiniteLine( + pos=lims_circ[0], angle=0, pen=pen) + self.tempcirc_graph.addItem(self.line_circ_maxlim) + self.tempcirc_graph.addItem(self.line_circ_minlim) + + self.trltemp_wid = QWidget() + lay_trltemp = QVBoxLayout(self.trltemp_wid) + lay_trltemp.setAlignment(Qt.AlignTop) + lay_trltemp.setContentsMargins(0, 0, 0, 9) + lay_trltemp.addLayout(hbox_tempcirc_state) + lay_trltemp.addWidget(self.tempcirc_graph) + + self.temp_tab.addTab(self.trltemp_wid, 'Transm. Line') + + # Vacuum + lb_vacuum = QLabel('<h3>Vacuum: Pressure [mBar]</h3>', self) + self.led_condrun = PyDMLed(self) + self.led_condrun.setToolTip('Conditioning acting') + self.led_condrun.channel = self.prefix + \ + self.chs['Cav Sts']['Vac']['Cond'] + self.led_condrun.offColor = QColor(128, 77, 0) + self.led_condrun.onColor = PyDMLed.Yellow + hbox_vacuum_state = QHBoxLayout() + hbox_vacuum_state.addWidget(lb_vacuum, alignment=Qt.AlignLeft) + hbox_vacuum_state.addWidget(self.led_condrun, alignment=Qt.AlignRight) + + self.vacuum_graph = SiriusTimePlot(self) + self.vacuum_graph.setObjectName('vacuum_graph') + self.vacuum_graph.autoRangeX = True + self.vacuum_graph.autoRangeY = True + self.vacuum_graph.backgroundColor = QColor(255, 255, 255) + self.vacuum_graph.showXGrid = True + self.vacuum_graph.showYGrid = True + self.vacuum_graph.timeSpan = 1800 + self.vacuum_graph.maxRedrawRate = 1 + self.vacuum_graph.addYChannel( + y_channel=self.prefix+self.chs['Cav Sts']['Vac']['Cells'], + name='Vacuum', color='black', lineStyle=Qt.SolidLine, lineWidth=1) + self.vacuum_graph.setLabel('left', '') + + self.vac_wid = QWidget() + self.vac_wid.setStyleSheet(""" + #vacuum_graph{ + min-width: 30em; min-height: 10.5em; max-height: 10.5em;} + """) + lay_vac = QVBoxLayout(self.vac_wid) + lay_vac.setAlignment(Qt.AlignTop) + lay_vac.addLayout(hbox_vacuum_state) + lay_vac.addWidget(self.vacuum_graph) + + lay = QGridLayout() + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(self.temp_wid, 0, 0) + lay.addWidget(self.vac_wid, 1, 0) + return lay + + def _create_vlay(self, widget1, widget2): + lay = QVBoxLayout() + lay.setContentsMargins(0, 0, 0, 0) + lay.setSpacing(6) + lay.addWidget(widget1) + lay.addWidget(widget2, alignment=Qt.AlignCenter) + return lay + + def _create_ssa_wid(self, lay_amp, row, chs_dict): + lb_name = QLabel('<h4>'+chs_dict['Name']+'</h4>', self, + alignment=Qt.AlignCenter) + lb_name.setStyleSheet('max-height: 1.29em;') + lay_amp.addWidget(lb_name, row, 1) + + pb_ssadtls = QPushButton(qta.icon('fa5s.ellipsis-v'), '', self) + pb_ssadtls.setObjectName('dtls') + pb_ssadtls.setStyleSheet( + '#dtls{min-width:18px;max-width:18px;icon-size:20px;}') + lay_amp.addWidget(pb_ssadtls, row, 2) + cmd = f'sirius-hla-{self.section.lower()}-rf-control.py' + cmd += ' -d ssa' + if self.section == 'SI': + ssa_num = int(chs_dict['Name'].split()[-1]) + system = ('A' if ssa_num == 1 or ssa_num == 2 else 'B') + cmd += f' -s {system} -n {ssa_num}' + connect_newprocess( + pb_ssadtls, cmd.split(" "), is_window=True, parent=self) + + led_sts = SiriusLedAlert(self, self.prefix+chs_dict['Status']) + led_sts.onColor = PyDMLed.LightGreen + led_sts.offColor = PyDMLed.Red + lay_amp.addWidget(led_sts, row, 3, alignment=Qt.AlignCenter) + + lb_pwr = SiriusLabel(self, self.prefix+chs_dict['Power']) + lb_pwr.showUnits = True + lb_pwr.setStyleSheet('min-width: 6em; max-width: 6em;') + lay_amp.addWidget(lb_pwr, row, 4) + + bt_src1 = RFEnblDsblButton( + parent=self, + channels={ + 'on': self.prefix+chs_dict['SRC 1']['Enable'], + 'off': self.prefix+chs_dict['SRC 1']['Disable']}) + if self.section == 'BO': + ch2vals = { + self.prefix+'BO-ToBO:RF-ACDCPanel:300Vdc-Mon': { + 'comp': 'gt', 'value': 280.0}, + self.prefix+chs_dict['SRC 1']['Mon']: 1} + led_src1 = PyDMLedMultiChannel(self, ch2vals) + else: + led_src1 = SiriusLedState( + self, self.prefix+chs_dict['SRC 1']['Mon']) + lay_amp.addLayout(self._create_vlay(bt_src1, led_src1), row, 5) + + bt_src2 = RFEnblDsblButton( + parent=self, + channels={ + 'on': self.prefix+chs_dict['SRC 2']['Enable'], + 'off': self.prefix+chs_dict['SRC 2']['Disable']}) + led_src2 = SiriusLedState(self, self.prefix+chs_dict['SRC 2']['Mon']) + lay_amp.addLayout(self._create_vlay(bt_src2, led_src2), row, 6) + + bt_pinsw = RFEnblDsblButton( + parent=self, + channels={ + 'on': self.prefix+chs_dict['PinSw']['Enable'], + 'off': self.prefix+chs_dict['PinSw']['Disable']}) + pre_drive_ch = chs_dict['PreDrive'] + if self.section == 'SI': + pre_drive_ch = pre_drive_ch['Value'] + pre_drive_ch = self.prefix + pre_drive_ch + rules = ( + '[{"name": "EnblRule", "property": "Enable", "expression":' + + '"ch[0] < ' + str(chs_dict['PreDriveThrs']) + '", "channels":' + + '[{"channel": "'+ pre_drive_ch + '", "trigger": true}]}]') + bt_pinsw.pb_on.rules = rules + led_pinsw = SiriusLedState(self, self.prefix+chs_dict['PinSw']['Mon']) + lay_amp.addLayout(self._create_vlay(bt_pinsw, led_pinsw), row, 7) + + lb_drive = SiriusLabel(self, pre_drive_ch) + lb_drive.showUnits = True + if self.section == 'SI': + led_drive = SiriusLedState( + self, self.prefix+chs_dict['PreDrive']['LED']) + else: + led_drive = PyDMLedMultiChannel( + parent=self, channels2values={ + self.prefix+chs_dict['PreDrive']: { + 'comp': 'lt', 'value': chs_dict['PreDriveThrs']}}) + ch_pinsw = SiriusConnectionSignal( + self.prefix+chs_dict['PinSw']['Mon']) + ch_pinsw.new_value_signal[int].connect( + _part(self._handle_predrive_led_channels, led_drive, chs_dict)) + lay_amp.addLayout(self._create_vlay(lb_drive, led_drive), row, 8) + + def _create_tun_set_wid(self, lay_tunset, column, chs_dict, offset): + if column: + lay_tunset.addWidget(QLabel( + f'<h4>{column}</h4>', self, alignment=Qt.AlignCenter), + 0, offset) + + bt_autotun = PyDMStateButton( + self, self.prefix+chs_dict['Auto']+'-Sel') + led_autotun = SiriusLedState( + self, self.prefix+chs_dict['Auto']+'-Sts') + lay_autotun = QHBoxLayout() + lay_autotun.setSpacing(6) + lay_autotun.addWidget(bt_autotun) + lay_autotun.addWidget(led_autotun, alignment=Qt.AlignCenter) + + sb_dtune = SiriusSpinbox( + self, self.prefix+chs_dict['DTune']+'-SP') + lb_dtune = SiriusLabel( + self, self.prefix+chs_dict['DTune']+'-RB') + lb_dtune.showUnits = True + lay_dtune = QHBoxLayout() + lay_dtune.setSpacing(6) + lay_dtune.addWidget(sb_dtune) + lay_dtune.addWidget(lb_dtune) + + sb_margin = SiriusSpinbox( + self, self.prefix+chs_dict['Deadbnd']+'-SP') + lb_margin = SiriusLabel( + self, self.prefix+chs_dict['Deadbnd']+'-RB') + lb_margin.showUnits = True + lay_margin = QHBoxLayout() + lay_margin.setSpacing(6) + lay_margin.addWidget(sb_margin) + lay_margin.addWidget(lb_margin) + + sb_oversht = SiriusSpinbox( + self, self.prefix+chs_dict['Oversht']+'-SP') + lb_oversht = SiriusLabel( + self, self.prefix+chs_dict['Oversht']+'-RB') + lb_oversht.showUnits = True + lay_oversht = QHBoxLayout() + lay_oversht.setSpacing(6) + lay_oversht.addWidget(sb_oversht) + lay_oversht.addWidget(lb_oversht) + + lb_dphase = SiriusLabel( + self, self.prefix+chs_dict['DPhase']) + lb_dphase.showUnits = True + led_tunact = SiriusLedState( + self, self.prefix+chs_dict['Acting']) + + lay_tunset.addLayout(lay_autotun, 1, offset) + lay_tunset.addLayout(lay_dtune, 2, offset) + lay_tunset.addLayout(lay_margin, 3, offset) + lay_tunset.addLayout(lay_oversht, 4, offset) + lay_tunset.addWidget(lb_dphase, 5, offset) + lay_tunset.addWidget(led_tunact, 6, offset, alignment=Qt.AlignCenter) + + def _create_fdl_lay(self, lay_fdl, key, chs): + # Graph + self.amp_graph = SiriusWaveformPlot( + parent=self, background=QColor(255, 255, 255)) + self.amp_graph.maxRedrawRate = 2 + self.amp_graph.setShowXGrid(True) + self.amp_graph.setShowYGrid(True) + self.amp_graph.setShowLegend(False) + self.amp_graph.setAutoRangeX(True) + self.amp_graph.setAutoRangeY(True) + self.amp_graph.setAxisColor(QColor(0, 0, 0)) + + lay_checks = QGridLayout() + row = 0 + column = 0 + for idx in range(len(chs['Signals'])): + self._setupAmpCurve(chs['Signals'][idx], + self.prefix+chs['Time'], key, idx, lay_checks, row, column) + column += 1 + if column == len(chs['Signals']) / 2: + row += 1 + column = 0 + + # Section Title + lay_section = QHBoxLayout() + pb_fdldtls = QPushButton(qta.icon('fa5s.ellipsis-v'), '', self) + pb_fdldtls.setObjectName('dtls') + pb_fdldtls.setStyleSheet( + '#dtls{min-width:18px;max-width:18px;icon-size:20px;}') + cmd = f'sirius-hla-{self.section.lower()}-rf-control.py' + cmd += ' -d fdl' + if self.section == 'SI': + cmd += f' -s {key}' + connect_newprocess( + pb_fdldtls, cmd.split(" "), is_window=True, parent=self) + + if key: + title = key + else: + title = 'FDL Data' + lay_section.addWidget(QLabel( + f'<h4> • {title} - Amplitude</h4>', self, alignment=Qt.AlignLeft)) + lay_section.addWidget(pb_fdldtls, alignment=Qt.AlignRight) + + lay_fdl.addLayout(lay_section) + lay_fdl.addLayout(lay_checks) + lay_fdl.addWidget(self.amp_graph) + + def _create_diag_lay(self, lay_diag, key, chs, column, add_labels): + if add_labels: + row = 2 + for _, val in chs.items(): + lay_diag.addWidget( + QLabel(val[0], alignment=Qt.AlignRight | Qt.AlignVCenter), + row, column-1) + row += 1 + + if key is not None: + lay_diag.addWidget(QLabel( + f'<h4>{key}</h4>', alignment=Qt.AlignCenter), + 0, column) + lay_diag.addItem(QSpacerItem( + 0, 9, QSzPlcy.Ignored, QSzPlcy.Fixed), 1, column) + else: + lay_diag.addItem(QSpacerItem( + 0, 18, QSzPlcy.Ignored, QSzPlcy.Fixed), 0, column) + + row = 2 + for k, val in chs.items(): + if k == '401': + led = SiriusLedAlert(self, self.prefix+val[1]) + else: + led = SiriusLedState(self, self.prefix+val[1]) + lay_diag.addWidget(led, row, column, alignment=Qt.AlignCenter) + row += 1 + + def _create_slc_lay(self, lay_slc, key, chs_dict, offset): + if key: + lay_slc.addWidget(QLabel( + f'<h4>{key}</h4>', alignment=Qt.AlignCenter), 1, offset, 1, 2) + + lb_slmode = SiriusLabel( + self, self.prefix+chs_dict['Mode']+'-Sts') + led_slmode = PyDMLedMultiChannel( + self, {self.prefix+chs_dict['Mode']+'-Sts': 0}) + bt_slenbl = PyDMStateButton( + self, self.prefix+chs_dict['Enbl']+'-Sel') + led_slenbl = SiriusLedState( + self, self.prefix+chs_dict['Enbl']+'-Sts') + + if self.section == 'SI': + diag_dict = self.chs['Diagnostics'][key] + else: + diag_dict = self.chs['Diagnostics'] + diag_channels = {} + for _, vals in diag_dict.items(): + if vals[0] == 'Fast Interlock': + diag_channels[vals[1]] = 0 + else: + diag_channels[vals[1]] = 1 + led_slready = PyDMLedMultiChannel(self, diag_channels) + + lay_slc.addWidget(lb_slmode, 2, offset, alignment=Qt.AlignCenter) + lay_slc.addWidget(led_slmode, 2, offset+1, alignment=Qt.AlignCenter) + lay_slc.addWidget(led_slready, 3, offset+1, alignment=Qt.AlignCenter) + lay_slc.addWidget(bt_slenbl, 4, offset, alignment=Qt.AlignCenter) + lay_slc.addWidget(led_slenbl, 4, offset+1, alignment=Qt.AlignCenter) + + sb_amp1 = SiriusSpinbox( + self, self.prefix+chs_dict['ASet']+'-SP') + lb_amp1 = SiriusLabel( + self, self.prefix+chs_dict['ASet']+'-RB') + lb_amp1.showUnits = True + cb_ampincrate = PyDMEnumComboBox( + self, self.prefix+chs_dict['AInc']+'-SP') + lb_ampincrate = SiriusLabel( + self, self.prefix+chs_dict['AInc']+'-SP') + sb_phs = SiriusSpinbox( + self, self.prefix+chs_dict['PSet']+'-SP') + lb_phs = SiriusLabel( + self, self.prefix+chs_dict['PSet']+'-RB') + lb_phs.showUnits = True + cb_phsincrate = PyDMEnumComboBox( + self, self.prefix+chs_dict['PInc']+'-SP') + lb_phsincrate = SiriusLabel( + self, self.prefix+chs_dict['PInc']+'-RB') + + lay_slc.addWidget(QLabel( + '<h4>SP/RB</h4>', self, alignment=Qt.AlignCenter), 6, offset) + lay_slc.addWidget( + QLabel('<h4>Inc. Rate</h4>', self, alignment=Qt.AlignCenter), + 6, offset+1) + lay_slc.addWidget(sb_amp1, 7, offset, alignment=Qt.AlignCenter) + lay_slc.addWidget(lb_amp1, 8, offset, alignment=Qt.AlignCenter) + lay_slc.addWidget(cb_ampincrate, 7, offset+1, alignment=Qt.AlignCenter) + lay_slc.addWidget(lb_ampincrate, 8, offset+1, alignment=Qt.AlignCenter) + lay_slc.addWidget(sb_phs, 9, offset, alignment=Qt.AlignCenter) + lay_slc.addWidget(lb_phs, 10, offset, alignment=Qt.AlignCenter) + lay_slc.addWidget(cb_phsincrate, 9, offset+1, alignment=Qt.AlignCenter) + lay_slc.addWidget(lb_phsincrate, 10, offset+1, alignment=Qt.AlignCenter) + + lb_ampref = SiriusLabel(self, self.prefix+chs_dict['ARef']) + lb_ampref.showUnits = True + lb_ampinp = SiriusLabel(self, self.prefix+chs_dict['AInp']) + lb_ampinp.showUnits = True + lb_amperr = SiriusLabel(self, self.prefix+chs_dict['AErr']) + lb_amperr.showUnits = True + lb_phsref = SiriusLabel(self, self.prefix+chs_dict['PRef']) + lb_phsref.showUnits = True + lb_phsinp = SiriusLabel(self, self.prefix+chs_dict['PInp']) + lb_phsinp.showUnits = True + lb_phserr = SiriusLabel(self, self.prefix+chs_dict['PErr']) + lb_phserr.showUnits = True + + lay_slc.addWidget(QLabel( + '<h4>Amp.</h4>', self, alignment=Qt.AlignCenter), 13, offset) + lay_slc.addWidget(QLabel( + '<h4>Phase</h4>', self, alignment=Qt.AlignCenter), 13, offset+1) + + lay_slc.addWidget(lb_ampref, 14, offset) + lay_slc.addWidget(lb_ampinp, 15, offset) + lay_slc.addWidget(lb_amperr, 16, offset) + lay_slc.addWidget(lb_phsref, 14, offset+1) + lay_slc.addWidget(lb_phsinp, 15, offset+1) + lay_slc.addWidget(lb_phserr, 16, offset+1) + + def _setupAmpCurve(self, signal, timebase, key, idx, lay_checks, row, column): + cid = f'{key} FDL - {signal[0]}' + color = self.prefix + signal[3] + + if signal[1]: + chn_amp = self.prefix + signal[1] + self.amp_graph.addChannel( + y_channel=chn_amp, + x_channel=timebase, + redraw_mode=2, name=cid, color=color, + lineStyle=Qt.SolidLine, lineWidth=1 + ) + self.curves_amp[cid] = self.amp_graph.curveAtIndex(idx) + + cbx = QCheckBox(signal[0], self) + cbx.setChecked(True) + cbx.setObjectName(cid) + cbx.setStyleSheet('color:' + color + ';') + cbx.stateChanged.connect(self._handle_amp_curves_visibility) + lay_checks.addWidget(cbx, row, column) + + def _handle_pwrdata_visibility(self, text): + for group, labels in self._pm_labels.items(): + for lbl in labels: + lbl.setVisible(text == group) + + for name in self.chs['PwrMtr']: + cbx = self.findChild(QCheckBox, name) + visi = cbx.isChecked() + curvew = self.curves[name + ' W'] + curvew.setVisible(text == 'W' and visi) + curvedbm = self.curves[name + ' dBm'] + curvedbm.setVisible(text == 'dBm' and visi) + curvemv = self.curves[name + ' mV'] + curvemv.setVisible(text == 'mV' and visi) + + def _handle_curves_visibility(self, state): + name = self.sender().objectName() + if name in self.chs['PwrMtr']: + name += ' ' + self.cb_units.currentText() + curve = self.curves[name] + curve.setVisible(state) + + def _handle_amp_curves_visibility(self, state): + name = self.sender().objectName() + + amp_curve = self.curves_amp.get(name) + if amp_curve: + amp_curve.setVisible(state) + + def _handle_predrive_led_channels(self, led_drive, chs_dict, value): + val = 100 if value == 1 else chs_dict['PreDriveThrs'] + ch2vals = { + self.prefix+chs_dict['PreDrive']: { + 'comp': 'lt', 'value': val} + } + led_drive.set_channels2values(ch2vals) + + def _handle_rmpwfm_visibility(self, index): + self.curve_pwrmtr.setVisible(index == 0) + self.curve_vgav.setVisible(index == 1) + self.curve_pwr.setVisible(index == 2) + + def _update_temp_limits(self, value): + address = self.sender().address + if 'Coup' in address: + if 'Lower' in address: + self.chs['Cav Sts']['Temp']['Coupler Limits'][0] = value + else: + self.chs['Cav Sts']['Temp']['Coupler Limits'][1] = value + + lims = self.chs['Cav Sts']['Temp']['Coupler Limits'] + ch2vals = { + self.prefix+self.chs['Cav Sts']['Temp']['Coupler'][0]: { + 'comp': 'wt', 'value': lims} + } + self.led_tempcellok.set_channels2values(ch2vals) + self.line_coup_minlim.setPos(lims[0]) + self.line_coup_maxlim.setPos(lims[1]) + else: + if 'Lower' in address: + self.chs['Cav Sts']['Temp']['Cells Limits'][0] = value + else: + self.chs['Cav Sts']['Temp']['Cells Limits'][1] = value + + lims = self.chs['Cav Sts']['Temp']['Cells Limits'] + ch2vals = {self.prefix+c[0]: {'comp': 'wt', 'value': lims} + for c in self.chs['Cav Sts']['Temp']['Cells']} + self.led_tempcoupok.set_channels2values(ch2vals) + self.line_cell_minlim.setPos(lims[0]) + self.line_cell_maxlim.setPos(lims[1])
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_rf_control/custom_widgets.html b/_modules/siriushla/as_rf_control/custom_widgets.html new file mode 100644 index 000000000..138894e64 --- /dev/null +++ b/_modules/siriushla/as_rf_control/custom_widgets.html @@ -0,0 +1,203 @@ + + + + + + siriushla.as_rf_control.custom_widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_rf_control.custom_widgets

+from qtpy.QtWidgets import QFrame, QHBoxLayout, QWidget
+from siriushla.widgets import SiriusPushButton
+
+from .util import SYSTEM_COLORS
+
+
+
+[docs] +class RFEnblDsblButton(QWidget): + """Button to enbl/dsbl attribute controlled by 2 PVs.""" + + def __init__(self, parent=None, channels=dict()): + super().__init__(parent) + self.pb_off = SiriusPushButton( + parent=self, label='Off', init_channel=channels['off'], + releaseValue=0) + self.pb_off.setStyleSheet('min-width:1.4em; max-width:1.4em;') + self.pb_on = SiriusPushButton( + parent=self, label='On', init_channel=channels['on'], + releaseValue=0) + self.pb_on.setStyleSheet('min-width:1.4em; max-width:1.4em;') + lay = QHBoxLayout(self) + lay.setContentsMargins(0, 0, 0, 0) + lay.setSpacing(3) + lay.addStretch() + lay.addWidget(self.pb_off) + lay.addWidget(self.pb_on) + lay.addStretch()
+ + + +
+[docs] +class RFTitleFrame(QFrame): + """QFrame with background color set depending on the specific system.""" + + def __init__(self, parent=None, system=''): + super().__init__(parent) + if system != '': + self.setStyleSheet(f'background-color: {SYSTEM_COLORS[system]};')
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ti_control/base.html b/_modules/siriushla/as_ti_control/base.html new file mode 100644 index 000000000..bb019b731 --- /dev/null +++ b/_modules/siriushla/as_ti_control/base.html @@ -0,0 +1,477 @@ + + + + + + siriushla.as_ti_control.base — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.as_ti_control.base

+"""."""
+import re
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QHBoxLayout, QVBoxLayout, \
+    QScrollArea, QGroupBox, QLabel, QSizePolicy as QSzPol, QFrame, QMenu, \
+    QLineEdit, QPushButton, QAbstractItemView, QHeaderView
+import qtawesome as qta
+from pydm.widgets.base import PyDMPrimitiveWidget
+
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..widgets import SiriusLabel, SiriusSpinbox, SiriusEnumComboBox, \
+    SiriusWaveformTable
+
+
+
+[docs] +class BaseWidget(QWidget): + + def __init__(self, parent=None, device='', prefix=''): + super().__init__(parent) + self.prefix = prefix + self.device = _PVName(device) + +
+[docs] + def channels(self): + return self._chans
+ + +
+[docs] + def get_pvname(self, propty, field=''): + return self.device.substitute( + prefix=self.prefix, propty=propty, field=field)
+ + + def _create_propty_layout(self, propty, width=6.0, show_unit=True): + """Return layout that handles a property according to 'propty_type'.""" + layout = QHBoxLayout() + not_enum = propty.endswith('-SP') + pv2 = propty.replace('-SP', '-RB').replace('-Sel', '-Sts') + + style = 'min-width:{0}em; max-width:{0}em;\ + min-height:1.29em;'.format(str(width)) + + if pv2 != propty: + chan1 = self.get_pvname(propty) + if not_enum: + wid = SiriusSpinbox(self, init_channel=chan1) + wid.setAlignment(Qt.AlignCenter) + else: + wid = SiriusEnumComboBox(self, init_channel=chan1) + wid.setStyleSheet(style) + layout.addWidget(wid) + + label = SiriusLabel( + parent=self, init_channel=self.get_pvname(pv2)) + label.setStyleSheet(style) + label.setAlignment(Qt.AlignCenter) + label.setObjectName(pv2.replace('-', '')) + label.showUnits = show_unit + layout.addWidget(label) + + layout.setAlignment(Qt.AlignVCenter) + return layout + + def _create_small_group( + self, name, parent, wids, align_ver=True, no_marg=False): + group = QGroupBox(name, parent) if name else QWidget(parent) + lay = QVBoxLayout(group) if align_ver else QHBoxLayout(group) + if align_ver: + lay.setAlignment(Qt.AlignCenter) + for wid in wids: + lay.addWidget(wid) + lay.setAlignment(wid, Qt.AlignCenter) + if no_marg: + lay.setContentsMargins(0, 0, 0, 0) + return group + + def _create_logbuffer_table(self, prop, transform=None): + table = SiriusWaveformTable( + self, self.get_pvname(prop), transform=transform + ) + table.setObjectName('tb') + table.setEnabled(False) + table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch) + table.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + table.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn) + table.horizontalHeader().setVisible(False) + table.setStyleSheet( + '#tb{min-width:6em; max-width:12em; max-height: 16em;}') + table.setEditTriggers(QAbstractItemView.NoEditTriggers) + table.setColumnCount(1) + table.setSizePolicy(QSzPol.MinimumExpanding, QSzPol.Preferred) + return table
+ + + +
+[docs] +class CustomGroupBox(QGroupBox, PyDMPrimitiveWidget): + + def __init__(self, title, parent=None): + QGroupBox.__init__(self, title, parent) + PyDMPrimitiveWidget.__init__(self)
+ + + +
+[docs] +class BaseList(CustomGroupBox): + """Template for control of High Level Triggers.""" + + _MIN_WIDs = {} + _LABELS = {} + _ALL_PROPS = tuple() + + def __init__(self, name=None, parent=None, prefix='', props=set(), + obj_names=list(), has_search=True, props2search=set()): + """Initialize object.""" + super().__init__(name, parent) + self.prefix = prefix + self.props = props or set(self._ALL_PROPS) + self.has_search = has_search + self.props2search = set(props2search) or set() + self.obj_names = obj_names + self.setupUi() + +
+[docs] + def setupUi(self): + self.my_layout = QVBoxLayout(self) + self.my_layout.setContentsMargins(6, 10, 6, 0) + + if self.has_search: + hbl = QHBoxLayout() + hbl.setSpacing(0) + self.my_layout.addLayout(hbl) + # Create search bar + self.search_lineedit = QLineEdit(parent=self) + hbl.addWidget(self.search_lineedit) + self.search_lineedit.setPlaceholderText("Search...") + self.search_lineedit.textEdited.connect(self.filter_lines) + # Create search menu + pbt = QPushButton(' ', self) + pbt.setToolTip('Choose which columns to show') + pbt.setObjectName('but') + pbt.setIcon(qta.icon('mdi.view-column')) + pbt.setStyleSheet(""" + #but{ + min-width:35px; max-width:35px; + min-height:25px; max-height:25px; + icon-size:25px; + }""") + hbl.addWidget(pbt) + self.search_menu = QMenu(pbt) + self.search_menu.triggered.connect(self.filter_lines) + pbt.setMenu(self.search_menu) + for prop in self._ALL_PROPS: + act = self.search_menu.addAction(prop) + act.setCheckable(True) + act.setChecked(prop in self.props) + act.toggled.connect(self.filter_columns) + + # Create header + header = QWidget() + headerlay = QHBoxLayout(header) + headerlay.setContentsMargins(0, 0, 0, 0) + self.my_layout.addWidget(header, alignment=Qt.AlignLeft) + objs = self.getLine(header=True) + for prop, obj in objs: + name = obj.objectName() + obj.setStyleSheet(""" + #{0:s}{{ + min-width:{1:.1f}em; max-width: {1:.1f}em; + min-height:1.8em; max-height:1.8em; + }}""".format(name, self._MIN_WIDs[prop])) + headerlay.addWidget(obj) + + # Create scrollarea + sc_area = QScrollArea() + sc_area.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded) + sc_area.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) + sc_area.setWidgetResizable(True) + sc_area.setFrameShape(QFrame.NoFrame) + self.my_layout.addWidget(sc_area) + + # ScrollArea Widget + wid = QWidget() + wid.setObjectName('wid') + wid.setStyleSheet('#wid {background-color: transparent;}') + lay = QVBoxLayout(wid) + lay.setSpacing(0) + lay.setContentsMargins(0, 0, 0, 0) + lay.setAlignment(Qt.AlignTop) + sc_area.setWidget(wid) + + self.lines = dict() + self.filtered_lines = set() + for obj_name in self.obj_names: + pref = _PVName(obj_name).substitute(prefix=self.prefix) + objs = self.getLine(pref) + self.lines[pref] = objs + self.filtered_lines.add(pref) + lwid = QWidget() + hlay = QHBoxLayout(lwid) + hlay.setContentsMargins(0, 0, 0, 0) + for prop, obj in objs: + name = obj.objectName() + obj.setStyleSheet(""" + #{0:s}{{ + min-width:{1:.1f}em; max-width: {1:.1f}em; + }}""".format(name, self._MIN_WIDs[prop])) + hlay.addWidget(obj) + lay.addWidget(lwid, alignment=Qt.AlignLeft)
+ + +
+[docs] + def getLine(self, device=None, header=False): + objects = list() + for prop in self._ALL_PROPS: + widget = self.getColumn(device, prop, header) + if widget is not None: + objects.append([prop, widget]) + return objects
+ + +
+[docs] + def getColumn(self, device, prop, header): + widget = QWidget(self) + widget.setObjectName(prop) + widget.setVisible(prop in self.props) + widget.setSizePolicy(QSzPol.Fixed, QSzPol.Fixed) + lay = QVBoxLayout(widget) + lay.setSpacing(6) + lay.setContentsMargins(0, 6, 0, 6) + lay.setAlignment(Qt.AlignCenter) + fun = self._createObjs if not header else self._headerLabel + for obj in fun(device, prop): + lay.addWidget(obj) + obj.setSizePolicy(QSzPol.MinimumExpanding, QSzPol.Maximum) + return widget
+ + +
+[docs] + def filter_columns(self): + txt = self.sender().text() + visi = self.sender().isChecked() + objs = self.findChildren(QWidget, txt) + for obj in objs: + objname = obj.objectName() + if objname.startswith(txt): + obj.setVisible(visi)
+ + +
+[docs] + def filter_lines(self, text): + """Filter lines according to the regexp filter.""" + text = self.search_lineedit.text() + try: + pattern = re.compile(text, re.I) + except Exception: + return + + self.filtered_lines.clear() + for line, objs in self.lines.items(): + keep = False + for prop, obj in objs: + if keep: + self.filtered_lines.add(line) + break + if prop not in self.props2search: + continue + cnt = obj.layout().count() + wid = obj.layout().itemAt(cnt-1).widget() + if hasattr(wid, 'text'): + keep |= bool(pattern.search(wid.text())) + continue + elif hasattr(wid, 'enum_strings') and hasattr(wid, 'value'): + conds = wid.enum_strings is not None + if conds: + conds &= isinstance(wid.value, int) + conds &= wid.value < len(wid.enum_strings) + if conds: + enum = wid.enum_strings[wid.value] + keep |= bool(pattern.search(enum)) + continue + self._set_lines_visibility()
+ + + def _set_lines_visibility(self): + props = { + a.text() for a in self.search_menu.actions() if a.isChecked()} + for key, objs in self.lines.items(): + if key in self.filtered_lines: + for _, wid in objs: + wid.setVisible(wid.objectName() in props) + else: + for _, wid in objs: + wid.setVisible(False) + + def _headerLabel(self, device, prop): + lbl = QLabel('<h4>' + self._LABELS[prop] + '</h4>', self) + lbl.setAlignment(Qt.AlignHCenter | Qt.AlignTop) + return (lbl, ) + + def _createObjs(self, device, prop): + return tuple() # return tuple of widgets
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ti_control/hl_trigger.html b/_modules/siriushla/as_ti_control/hl_trigger.html new file mode 100644 index 000000000..bfcc0b42a --- /dev/null +++ b/_modules/siriushla/as_ti_control/hl_trigger.html @@ -0,0 +1,833 @@ + + + + + + siriushla.as_ti_control.hl_trigger — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ti_control.hl_trigger

+"""."""
+from copy import deepcopy as _dcopy
+from functools import partial as _partial
+
+import numpy as _np
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QGroupBox, QLabel, QPushButton, QFormLayout, \
+    QVBoxLayout, QGridLayout, QWidget, QDoubleSpinBox, QHBoxLayout, \
+    QFrame, QScrollArea, QTabWidget
+import qtawesome as qta
+from pydm.widgets.base import PyDMWritableWidget
+
+from siriuspy.search import HLTimeSearch
+from siriuspy.timesys import csdev as _cstime
+
+from ..util import connect_window, get_appropriate_color
+from ..widgets import PyDMLed, SiriusLedAlert, PyDMStateButton, \
+    SiriusLabel, SiriusSpinbox, PyDMLedMultiChannel, \
+    SiriusEnumComboBox, SiriusLedState
+from ..widgets.windows import create_window_from_widget
+
+from .base import BaseList, BaseWidget
+from .low_level_devices import LLTriggerList, \
+    EVREVEOTPList, EVREVEOUTList, AFCOUTList, EVREVEDIList
+
+
+
+[docs] +class HLTriggerSimple(BaseWidget): + + def __init__( + self, parent, device='', prefix='', delay=True, delayraw=False, + duration=False, widthraw=False, nrpulses=False, src=False, + deltadelay=False, deltadelayraw=False): + super().__init__(parent, device, prefix) + flay = QFormLayout(self) + flay.setLabelAlignment(Qt.AlignRight) + flay.setFormAlignment(Qt.AlignCenter) + + l_TIstatus = QLabel('Status: ', self) + ledmulti_TIStatus = PyDMLedMultiChannel( + parent=self, channels2values={ + self.get_pvname('State-Sts'): 1, + self.get_pvname('Status-Mon'): 0}) + ledmulti_TIStatus.setStyleSheet( + "min-width:1.29em; max-width:1.29em;" + "min-height:1.29em; max-height:1.29em;") + pb_trgdetails = QPushButton(qta.icon('fa5s.ellipsis-h'), '', self) + pb_trgdetails.setToolTip('Open details') + pb_trgdetails.setObjectName('detail') + pb_trgdetails.setStyleSheet( + "#detail{min-width:25px; max-width:25px; icon-size:20px;}") + trg_w = create_window_from_widget( + HLTriggerDetailed, title=device+' Detailed Settings', + is_main=True) + connect_window( + pb_trgdetails, trg_w, parent=None, + device=self.device, prefix=self.prefix) + hlay_TIstatus = QHBoxLayout() + hlay_TIstatus.addWidget(ledmulti_TIStatus) + hlay_TIstatus.addWidget(pb_trgdetails) + flay.addRow(l_TIstatus, hlay_TIstatus) + + if delay: + l_delay = QLabel('Delay [us]: ', self) + l_delay.setStyleSheet("min-width:5em;") + hlay_delay = self._create_propty_layout(propty='Delay-SP') + flay.addRow(l_delay, hlay_delay) + + if delayraw: + l_delay = QLabel('DelayRaw: ', self) + l_delay.setStyleSheet("min-width:5em;") + hlay_delay = self._create_propty_layout( + propty='DelayRaw-SP', show_unit=False) + flay.addRow(l_delay, hlay_delay) + + if duration: + l_duration = QLabel('Duration [us]: ', self) + l_duration.setStyleSheet("min-width:5em;") + hlay_duration = self._create_propty_layout(propty='Duration-SP') + flay.addRow(l_duration, hlay_duration) + + if widthraw: + l_widthraw = QLabel('WidthRaw: ', self) + l_widthraw.setStyleSheet("min-width:5em;") + hlay_widthraw = self._create_propty_layout( + propty='WidthRaw-SP') + flay.addRow(l_widthraw, hlay_widthraw) + + if nrpulses: + l_nrpulses = QLabel('Nr Pulses: ', self) + l_nrpulses.setStyleSheet("min-width:5em;") + hlay_nrpulses = self._create_propty_layout(propty='NrPulses-SP') + flay.addRow(l_nrpulses, hlay_nrpulses) + + if src: + l_src = QLabel('Source: ', self) + l_src.setStyleSheet("min-width:5em;") + hlay_src = self._create_propty_layout(propty='Src-Sel') + flay.addRow(l_src, hlay_src) + + if deltadelay or deltadelayraw: + tab_deltadelay = QTabWidget(self) + tab_deltadelay.setObjectName(self.device.sec+'Tab') + tab_deltadelay.setStyleSheet(""" + #{}Tab::pane {{ + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }}""".format(self.device.sec)) + for tab in ['DeltaDelay', 'DeltaDelayRaw']: + if 'Raw' not in tab and not deltadelay: + continue + if 'Raw' in tab and not deltadelayraw: + continue + unit = '' if 'Raw' in tab else ' [us]' + wid = QWidget(self) + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop) + lay.addWidget( + QLabel('<h4>Low Level</h4>'), 0, 0, Qt.AlignCenter) + lay.addWidget( + QLabel(f'<h4>SP{unit:s}</h4>'), 0, 1, Qt.AlignCenter) + lay.addWidget( + QLabel(f'<h4>RB{unit:s}</h4>'), 0, 2, Qt.AlignCenter) + devname = self.device.device_name + ll_obj_names = HLTimeSearch.get_ll_trigger_names(devname) + hl_obj_names = HLTimeSearch.get_hl_trigger_channels(devname) + for idx, objs in enumerate(zip(ll_obj_names, hl_obj_names)): + nam = QLabel( + objs[0] + '\n(' + objs[1] + ')', wid, + alignment=Qt.AlignCenter) + spin = _SpinBox( + wid, init_channel=self.get_pvname(tab+'-SP'), + index=idx) + spin.setStyleSheet('min-width:7em;') + lbl = _Label( + wid, init_channel=self.get_pvname(tab+'-RB'), + index=idx) + lbl.setStyleSheet('min-width:6em;') + lay.addWidget(nam, idx+1, 0) + lay.addWidget(spin, idx+1, 1) + lay.addWidget(lbl, idx+1, 2) + tab_deltadelay.addTab(wid, tab) + flay.addRow(tab_deltadelay)
+ + + +
+[docs] +class HLTriggerDetailed(BaseWidget): + """Template for control of High Level Triggers.""" + + def __init__(self, parent=None, device='', prefix=''): + """Initialize object.""" + super().__init__(parent, device, prefix) + name = self.device.sec + 'App' + self.setObjectName(name) + self._setupUi() + + def _setupUi(self): + self.my_layout = QGridLayout(self) + self.my_layout.setHorizontalSpacing(20) + self.my_layout.setVerticalSpacing(0) + lab = QLabel('<h1>' + self.device.device_name + '</h1>', self) + self.my_layout.addWidget(lab, 0, 0, 1, 2) + self.my_layout.setAlignment(lab, Qt.AlignCenter) + + self.status_wid = QGroupBox('Status', self) + self.my_layout.addWidget(self.status_wid, 1, 0) + self._setup_status_wid() + + init_channel = self.get_pvname('InInjTable-Mon') + rb = SiriusLedState(self, init_channel=init_channel) + gbinjtab = self._create_small_group('In Injection Table?', self, (rb,)) + self.my_layout.addWidget(gbinjtab, 2, 0) + + self.ll_list_wid = QGroupBox('Configs', self) + self.my_layout.addWidget(self.ll_list_wid, 1, 1, 2, 1) + self._setup_ll_list_wid() + + def _setup_status_wid(self): + status_layout = QFormLayout(self.status_wid) + status_layout.setHorizontalSpacing(20) + status_layout.setVerticalSpacing(20) + for bit, label in enumerate(_cstime.Const.HLTrigStatusLabels): + led = SiriusLedAlert(self, self.get_pvname('Status-Mon'), bit) + lab = QLabel(label, self) + status_layout.addRow(led, lab) + + def _setup_ll_list_wid(self): + ll_list_layout = QGridLayout(self.ll_list_wid) + ll_list_layout.setHorizontalSpacing(20) + ll_list_layout.setVerticalSpacing(20) + + but = QPushButton('Open LL Triggers', self) + but.setAutoDefault(False) + but.setDefault(False) + obj_names = HLTimeSearch.get_ll_trigger_names(self.device.device_name) + icon = qta.icon( + 'mdi.timer', color=get_appropriate_color(self.device.sec)) + Window = create_window_from_widget( + LLTriggers, title=self.device.device_name+': LL Triggers', + icon=icon) + connect_window( + but, Window, self, prefix=self.prefix, + hltrigger=self.device.device_name, obj_names=obj_names) + lay = QHBoxLayout() + ll_list_layout.addLayout(lay, 0, 0, 1, 3) + lay.addWidget(but) + lay.addStretch() + + pbt_bl = QPushButton('>', self) + pbt_bl.setToolTip('Show Delta Delay information.') + pbt_bl.setStyleSheet('QPushButton{max-width: 0.8em;}') + lay.addWidget(pbt_bl) + + init_channel = self.get_pvname('LowLvlLock-Sel') + sp = PyDMStateButton(self, init_channel=init_channel) + init_channel = self.get_pvname('LowLvlLock-Sts') + rb = PyDMLed(self, init_channel=init_channel) + gb = self._create_small_group( + 'Lock Low Level', self.ll_list_wid, (sp, rb)) + ll_list_layout.addWidget(gb, 1, 0) + + init_channel = self.get_pvname('State-Sel') + sp = PyDMStateButton(self, init_channel=init_channel) + init_channel = self.get_pvname('State-Sts') + rb = PyDMLed(self, init_channel=init_channel) + gb = self._create_small_group('Enabled', self.ll_list_wid, (sp, rb)) + ll_list_layout.addWidget(gb, 1, 1) + + init_channel = self.get_pvname('Polarity-Sel') + sp = SiriusEnumComboBox(self, init_channel=init_channel) + init_channel = self.get_pvname('Polarity-Sts') + rb = SiriusLabel(self, init_channel=init_channel) + gb = self._create_small_group('Polarity', self.ll_list_wid, (sp, rb)) + ll_list_layout.addWidget(gb, 1, 2) + + init_channel = self.get_pvname('Src-Sel') + sp = SiriusEnumComboBox(self, init_channel=init_channel) + init_channel = self.get_pvname('Src-Sts') + rb = SiriusLabel(self, init_channel=init_channel) + gb = self._create_small_group('Source', self.ll_list_wid, (sp, rb)) + ll_list_layout.addWidget(gb, 2, 0) + + if HLTimeSearch.has_log(self.device.device_name): + init_channel = self.get_pvname('Log-Sel') + sp = PyDMStateButton(self, init_channel=init_channel) + init_channel = self.get_pvname('Log-Sts') + rb = PyDMLed(self, init_channel=init_channel) + gb = self._create_small_group('Log', self.ll_list_wid, (sp, rb)) + ll_list_layout.addWidget(gb, 3, 0) + + if HLTimeSearch.is_digital_input(self.device.device_name): + return + + init_channel = self.get_pvname('NrPulses-SP') + sp = SiriusSpinbox(self, init_channel=init_channel) + init_channel = self.get_pvname('NrPulses-RB') + rb = SiriusLabel(self, init_channel=init_channel) + gb = self._create_small_group('Nr Pulses', self.ll_list_wid, (sp, rb)) + ll_list_layout.addWidget(gb, 2, 1) + + init_channel = self.get_pvname('Duration-SP') + sp = SiriusSpinbox(self, init_channel=init_channel) + init_channel = self.get_pvname('Duration-RB') + rb = SiriusLabel(self, init_channel=init_channel) + gbdur = self._create_small_group( + 'Duration [us]', self.ll_list_wid, (sp, rb)) + + init_channel = self.get_pvname('WidthRaw-SP') + sp = SiriusSpinbox(self, init_channel=init_channel) + init_channel = self.get_pvname('WidthRaw-RB') + rb = SiriusLabel(self, init_channel=init_channel) + gbwid = self._create_small_group( + 'WidthRaw', self.ll_list_wid, (sp, rb)) + + widd = QWidget(self.ll_list_wid) + widd.setLayout(QHBoxLayout()) + widd.layout().addWidget(gbdur) + widd.layout().addWidget(gbwid) + ll_list_layout.addWidget(widd, 3, 1, 1, 2) + + init_channel = self.get_pvname('Delay-SP') + sp = SiriusSpinbox(self, init_channel=init_channel) + init_channel = self.get_pvname('Delay-RB') + rb = SiriusLabel(self, init_channel=init_channel) + gbdel = self._create_small_group('[us]', self.ll_list_wid, (sp, rb)) + + init_channel = self.get_pvname('DelayRaw-SP') + sp = SiriusSpinbox(self, init_channel=init_channel) + init_channel = self.get_pvname('DelayRaw-RB') + rb = SiriusLabel(self, init_channel=init_channel) + gbdelr = self._create_small_group('Raw', self.ll_list_wid, (sp, rb)) + + init_channel = self.get_pvname('TotalDelay-Mon') + rb = SiriusLabel(self, init_channel=init_channel) + gbtdel = self._create_small_group('[us]', self.ll_list_wid, (rb, )) + + init_channel = self.get_pvname('TotalDelayRaw-Mon') + rb = SiriusLabel(self, init_channel=init_channel) + gbtdelr = self._create_small_group('Raw', self.ll_list_wid, (rb, )) + + widd = QWidget(self.ll_list_wid) + widd.setLayout(QHBoxLayout()) + widd.layout().addWidget(gbdel) + widd.layout().addWidget(gbdelr) + + widt = QWidget(self.ll_list_wid) + widt.setLayout(QHBoxLayout()) + widt.layout().addWidget(gbtdel) + widt.layout().addWidget(gbtdelr) + + tabdel = QTabWidget(self) + tabdel.setObjectName(self.device.sec + 'Tab') + tabdel.addTab(widd, 'Delay') + tabdel.addTab(widt, 'Total Delay') + ll_list_layout.addWidget(tabdel, 4, 0, 1, 3) + + if HLTimeSearch.has_delay_type(self.device.device_name): + init_channel = self.get_pvname('RFDelayType-Sel') + sp = SiriusEnumComboBox(self, init_channel=init_channel) + init_channel = self.get_pvname('RFDelayType-Sts') + rb = SiriusLabel(self, init_channel=init_channel) + gb = self._create_small_group( + 'Delay Type', self.ll_list_wid, (sp, rb)) + ll_list_layout.addWidget(gb, 2, 2) + + if HLTimeSearch.has_direction(self.device.device_name): + init_channel = self.get_pvname('Direction-Sel') + sp = SiriusEnumComboBox(self, init_channel=init_channel) + init_channel = self.get_pvname('Direction-Sts') + rb = SiriusLabel(self, init_channel=init_channel) + gb = self._create_small_group( + 'Direction', self.ll_list_wid, (sp, rb)) + ll_list_layout.addWidget(gb, 2, 2) + + tabdelta = QTabWidget(self) + tabdelta.setObjectName(self.device.sec + 'Tab') + deltaus = self._create_deltadelay(israw=False) + deltaraw = self._create_deltadelay(israw=True) + tabdelta.addTab(deltaus, 'Delta Delay') + tabdelta.addTab(deltaraw, 'Delta Delay Raw') + + tabdelta.setVisible(False) + pbt_bl.clicked.connect(_partial( + self._toggle_visibility, tabdelta, pbt_bl)) + ll_list_layout.addWidget(tabdelta, 0, 3, 5, 1) + + def _toggle_visibility(self, wid, but): + show = wid.isHidden() + wid.setVisible(show) + text = '<' if show else '>' + but.setText(text) + tooltip = ('Hide' if show else 'Show') + but.toolTip()[4:] + self.sender().setToolTip(tooltip) + parent = but.parent() + while parent is not None: + parent.adjustSize() + parent = parent.parent() + + def _create_deltadelay(self, israw=False): + unit = '' if israw else ' [us]' + pvn = 'DeltaDelay' + ('Raw' if israw else '') + wid_ = QWidget() + lay = QVBoxLayout(wid_) + sc_area = QScrollArea() + sc_area.setWidgetResizable(True) + sc_area.setFrameShape(QFrame.NoFrame) + lay.addWidget(sc_area) + + wid = QWidget(sc_area) + wid.setObjectName('wid') + wid.setStyleSheet('#wid {background-color: transparent;}') + sc_area.setWidget(wid) + + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop) + lay.addWidget(QLabel('<h4>Low Level</h4>'), 0, 0, Qt.AlignCenter) + lay.addWidget(QLabel(f'<h4>SP{unit:s}</h4>'), 0, 1, Qt.AlignCenter) + lay.addWidget(QLabel(f'<h4>RB{unit:s}</h4>'), 0, 2, Qt.AlignCenter) + ll_obj_names = HLTimeSearch.get_ll_trigger_names( + self.device.device_name) + for idx, obj in enumerate(ll_obj_names, 1): + nam = QLabel(obj, wid) + spin = _SpinBox( + wid, init_channel=self.get_pvname(pvn+'-SP'), + index=idx-1) + spin.setStyleSheet('min-width:7em;') + lbl = _Label( + wid, init_channel=self.get_pvname(pvn+'-RB'), + index=idx-1) + lbl.setStyleSheet('min-width:6em;') + lay.addWidget(nam, idx, 0) + lay.addWidget(spin, idx, 1) + lay.addWidget(lbl, idx, 2) + sc_area.setSizeAdjustPolicy(QScrollArea.AdjustToContentsOnFirstShow) + sc_area.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded) + return wid_
+ + + +class _SpinBox(SiriusSpinbox): + + def __init__(self, parent=None, init_channel=None, index=0): + self._index = index + super().__init__(parent=parent, init_channel=init_channel) + + def value_changed(self, value): + self.valueBeingSet = True + if isinstance(value, _np.ndarray): + self.setValue(value[self._index]) + else: + self.setValue(value) + self.valueBeingSet = False + PyDMWritableWidget.value_changed(self, value) + + def send_value(self): + """ + Method invoked to send the current value on the QDoubleSpinBox to + the channel using the `send_value_signal`. + """ + value = QDoubleSpinBox.value(self) + val = _dcopy(self.value) + if isinstance(val, _np.ndarray): + val[self._index] = value + if not self.valueBeingSet: + self.send_value_signal[_np.ndarray].emit(val) + else: + if not self.valueBeingSet: + self.send_value_signal[float].emit(value) + + +class _Label(SiriusLabel): + + def __init__(self, parent=None, init_channel=None, index=0): + self._index = index + super().__init__(parent=parent, init_channel=init_channel) + + def value_changed(self, value): + if isinstance(value, _np.ndarray): + value = value[self._index] + super().value_changed(value) + + +
+[docs] +class LLTriggers(QWidget): + + def __init__( + self, parent=None, prefix=None, hltrigger='', obj_names=list()): + super().__init__(parent) + vl = QVBoxLayout(self) + vl.addWidget(QLabel( + '<h1>Low Level Triggers of '+hltrigger+'</h1>', + self, alignment=Qt.AlignCenter)) + self.setObjectName(hltrigger.sec+'App') + + amc_list = set() + otp_list = set() + out_list = set() + din_list = set() + for name in obj_names: + if 'AMC' in name.dev: + amc_list.add(name) + elif 'OTP' in name.propty_name: + otp_list.add(name) + elif 'OUT' in name.propty_name: + out_list.add(name) + elif 'DIN' in name.propty_name: + din_list.add(name) + if amc_list: + props = set(AFCOUTList._ALL_PROPS) + props.discard('widthraw') + props.discard('delayraw') + props.add('device') + amc_wid = LLTriggerList( + name='AMCs', parent=self, props=props, + prefix=prefix, obj_names=sorted(amc_list)) + amc_wid.setObjectName('amc_wid') + vl.addWidget(amc_wid) + if otp_list: + props = set(EVREVEOTPList._ALL_PROPS) + props.discard('width') + props.discard('delay') + props.add('device') + otp_wid = LLTriggerList( + name='OTPs', parent=self, props=props, + prefix=prefix, obj_names=sorted(otp_list)) + otp_wid.setObjectName('otp_wid') + vl.addWidget(otp_wid) + if out_list: + props = set(EVREVEOTPList._ALL_PROPS) + props.update(EVREVEOUTList._ALL_PROPS) + props.discard('width') + props.discard('delay') + props.discard('fine_delay') + props.discard('rf_delay') + props.add('device') + out_wid = LLTriggerList( + name='OUTs', parent=self, props=props, + prefix=prefix, obj_names=sorted(out_list)) + out_wid.setObjectName('out_wid') + vl.addWidget(out_wid) + if din_list: + din_wid = EVREVEDIList( + name='DINs', parent=self, prefix=prefix, + obj_names=sorted(din_list)) + din_wid.setObjectName('din_wid') + vl.addWidget(din_wid)
+ + +
+[docs] +class HLTriggerList(BaseList): + """Template for control of High Level Triggers.""" + + _MIN_WIDs = { + 'name': 10, + 'detailed': 3, + 'status': 4, + 'state': 3.8, + 'source': 4.8, + 'pulses': 4.8, + 'duration': 8, + 'widthraw': 8, + 'polarity': 6, + 'log': 6, + 'delay_type': 4.2, + 'direction': 4.2, + 'delay': 5.5, + 'delayraw': 5.5, + 'total_delay': 6, + 'total_delayraw': 6, + 'ininjtable': 5, + } + _LABELS = { + 'detailed': '', + 'name': 'Name', + 'status': 'Status', + 'state': 'Enabled', + 'source': 'Source', + 'pulses': 'Nr Pulses', + 'duration': 'Duration [us]', + 'widthraw': 'WidthRaw', + 'polarity': 'Polarity', + 'log': 'Log', + 'delay_type': 'Type', + 'direction': 'Direction', + 'delay': 'Delay [us]', + 'delayraw': 'DelayRaw', + 'total_delay': 'Total Dly [us]', + 'total_delayraw': 'Total DlyRaw', + 'ininjtable': 'InInjTable', + } + _ALL_PROPS = ( + 'detailed', 'status', 'name', 'state', 'source', 'polarity', 'pulses', + 'duration', 'widthraw', 'delay_type', 'direction', 'delay', 'delayraw', + 'total_delay', 'total_delayraw', 'ininjtable', 'log') + + def __init__(self, **kwargs): + srch = set(('source', 'name', 'polarity', 'state')) + kwargs['props2search'] = srch + super().__init__(**kwargs) + self.setObjectName('ASApp') + + def _createObjs(self, device, prop): + devname = device.device_name + has_delay_type = HLTimeSearch.has_delay_type(devname) + has_direction = HLTimeSearch.has_direction(devname) + has_log = HLTimeSearch.has_log(devname) + is_digital_input = HLTimeSearch.is_digital_input(devname) + sp = rb = None + if prop == 'name': + sp = QLabel(device.device_name, self, alignment=Qt.AlignCenter) + elif prop == 'status': + init_channel = device.substitute(propty='Status-Mon') + sp = SiriusLedAlert(self, init_channel=init_channel) + sp.setShape(sp.ShapeMap.Square) + elif prop == 'detailed': + sp = QWidget(self) + but = QPushButton('', sp) + but.setToolTip('Open Detailed View Window') + but.setIcon(qta.icon('fa5s.list-ul')) + but.setObjectName('but') + but.setStyleSheet( + '#but{min-width:25px; max-width:25px;\ + min-height:25px; max-height:25px;\ + icon-size:20px;}') + icon = qta.icon( + 'mdi.timer', color=get_appropriate_color(device.sec)) + Window = create_window_from_widget( + HLTriggerDetailed, + title=device.device_name+': HL Trigger Detailed', + icon=icon) + connect_window( + but, Window, None, device=device, prefix=self.prefix) + QHBoxLayout(sp).addWidget(but) + elif prop == 'state': + init_channel = device.substitute(propty='State-Sel') + sp = PyDMStateButton(self, init_channel=init_channel) + init_channel = device.substitute(propty='State-Sts') + rb = PyDMLed(self, init_channel=init_channel) + elif prop == 'source': + init_channel = device.substitute(propty='Src-Sel') + sp = SiriusEnumComboBox(self, init_channel=init_channel) + init_channel = device.substitute(propty='Src-Sts') + rb = SiriusLabel(self, init_channel=init_channel) + elif prop == 'pulses' and not is_digital_input: + init_channel = device.substitute(propty='NrPulses-SP') + sp = SiriusSpinbox(self, init_channel=init_channel) + init_channel = device.substitute(propty='NrPulses-RB') + rb = SiriusLabel(self, init_channel=init_channel) + elif prop == 'duration' and not is_digital_input: + init_channel = device.substitute(propty='Duration-SP') + sp = SiriusSpinbox(self, init_channel=init_channel) + init_channel = device.substitute(propty='Duration-RB') + rb = SiriusLabel(self, init_channel=init_channel) + elif prop == 'widthraw' and not is_digital_input: + init_channel = device.substitute(propty='WidthRaw-SP') + sp = SiriusSpinbox(self, init_channel=init_channel) + init_channel = device.substitute(propty='WidthRaw-RB') + rb = SiriusLabel(self, init_channel=init_channel) + elif prop == 'polarity': + init_channel = device.substitute(propty='Polarity-Sel') + sp = SiriusEnumComboBox(self, init_channel=init_channel) + init_channel = device.substitute(propty='Polarity-Sts') + rb = SiriusLabel(self, init_channel=init_channel) + elif prop == 'log' and has_log: + init_channel = device.substitute(propty='Log-Sel') + sp = PyDMStateButton(self, init_channel=init_channel) + init_channel = device.substitute(propty='Log-Sts') + rb = PyDMLed(self, init_channel=init_channel) + elif prop == 'delay_type' and has_delay_type: + init_channel = device.substitute(propty='RFDelayType-Sel') + sp = SiriusEnumComboBox(self, init_channel=init_channel) + init_channel = device.substitute(propty='RFDelayType-Sts') + rb = SiriusLabel(self, init_channel=init_channel) + elif prop == 'direction'and has_direction: + init_channel = device.substitute(propty='Direction-Sel') + sp = SiriusEnumComboBox(self, init_channel=init_channel) + init_channel = device.substitute(propty='Direction-Sts') + rb = SiriusLabel(self, init_channel=init_channel) + elif prop == 'delay' and not is_digital_input: + init_channel = device.substitute(propty='Delay-SP') + sp = SiriusSpinbox(self, init_channel=init_channel) + init_channel = device.substitute(propty='Delay-RB') + rb = SiriusLabel(self, init_channel=init_channel) + elif prop == 'delayraw' and not is_digital_input: + init_channel = device.substitute(propty='DelayRaw-SP') + sp = SiriusSpinbox(self, init_channel=init_channel) + init_channel = device.substitute(propty='DelayRaw-RB') + rb = SiriusLabel(self, init_channel=init_channel) + elif prop == 'total_delay' and not is_digital_input: + init_channel = device.substitute(propty='TotalDelay-Mon') + sp = SiriusLabel(self, init_channel=init_channel) + elif prop == 'total_delayraw' and not is_digital_input: + init_channel = device.substitute(propty='TotalDelayRaw-Mon') + sp = SiriusLabel(self, init_channel=init_channel) + elif prop == 'ininjtable': + init_channel = device.substitute(propty='InInjTable-Mon') + sp = SiriusLedState(self, init_channel=init_channel) + elif prop in self._ALL_PROPS: + return () + else: + raise Exception('Property unknown') + if rb is None: + return (sp, ) + return sp, rb
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ti_control/hltiming.html b/_modules/siriushla/as_ti_control/hltiming.html new file mode 100644 index 000000000..ab2cb465c --- /dev/null +++ b/_modules/siriushla/as_ti_control/hltiming.html @@ -0,0 +1,384 @@ + + + + + + siriushla.as_ti_control.hltiming — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ti_control.hltiming

+"""Control of EVG Timing Device."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QVBoxLayout, QHBoxLayout, QWidget, \
+    QGridLayout, QLabel, QSplitter, QSizePolicy as QSzPol
+import qtawesome as qta
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.timesys import csdev as _cstime
+from siriuspy.search import LLTimeSearch, HLTimeSearch
+from siriuspy.namesys import SiriusPVName
+
+from ..util import connect_window, get_appropriate_color, \
+    connect_newprocess
+from ..widgets.windows import create_window_from_widget
+from ..widgets import SiriusMainWindow, PyDMLed, PyDMStateButton, SiriusLabel
+
+from .low_level_devices import EventList as _EventList, EVG as _EVG, \
+    BucketList, EVR as _EVR, EVE as _EVE, AFC as _AFC, FOUT as _FOUT
+from .hl_trigger import HLTriggerList as _HLTriggerList
+
+
+
+[docs] +class TimingMain(SiriusMainWindow): + + def __init__(self, parent=None, prefix=''): + super().__init__(parent) + self.prefix = prefix + self.setupui() + self.setObjectName('ASApp') + self.setWindowIcon( + qta.icon('mdi.timer', color=get_appropriate_color('AS'))) + +
+[docs] + def setupui(self): + self.setupmenus() + + mainwid = QWidget(self) + self.setCentralWidget(mainwid) + gridlayout = QGridLayout(mainwid) + gridlayout.setHorizontalSpacing(20) + gridlayout.setVerticalSpacing(20) + + globpars = self.setglobalparameters() + gridlayout.addWidget(globpars, 0, 0) + + splitter = QSplitter(Qt.Horizontal) + gridlayout.addWidget(splitter, 1, 0) + events = self.setevents() + events.setObjectName('events') + splitter.addWidget(events) + + triggers = self.settriggers() + triggers.setObjectName('triggers') + splitter.addWidget(triggers)
+ + +
+[docs] + def setglobalparameters(self): + wid = QWidget(self.centralWidget()) + wid.setSizePolicy(QSzPol.Preferred, QSzPol.Maximum) + lay = QGridLayout(wid) + + evg_dev = SiriusPVName(LLTimeSearch.get_evg_name()) + evg_pref = evg_dev.substitute(prefix=self.prefix) + sp = PyDMPushButton( + self, init_channel=evg_pref.substitute(propty='UpdateEvt-Cmd'), + pressValue=1) + sp.setIcon(qta.icon('fa5s.sync')) + sp.setToolTip('Update Events Table') + sp.setObjectName('but') + sp.setStyleSheet( + '#but{min-width:25px; max-width:25px; icon-size:20px;}') + rb = PyDMLed( + self, init_channel=evg_pref.substitute(propty='EvtSyncStatus-Mon')) + rb.setOffColor(rb.Red) + rb.setOnColor(rb.LightGreen) + lay.addWidget(self._create_prop_widget( + '<h4>Update Evts</h4>', wid, (sp, rb)), 0, 0) + + sp = PyDMStateButton( + self, init_channel=evg_pref.substitute(propty='ContinuousEvt-Sel')) + rb = PyDMLed( + self, init_channel=evg_pref.substitute(propty='ContinuousEvt-Sts')) + lay.addWidget(self._create_prop_widget( + '<h4>Continuous</h4>', wid, (sp, rb)), 0, 1) + + sp = PyDMStateButton( + self, init_channel=evg_pref.substitute(propty='InjectionEvt-Sel')) + rb = PyDMLed( + self, init_channel=evg_pref.substitute(propty='InjectionEvt-Sts')) + lay.addWidget(self._create_prop_widget( + '<h4>Injection</h4>', wid, (sp, rb)), 0, 2) + + bucketlist_wid = BucketList( + self.centralWidget(), evg_dev, self.prefix) + bucketlist_wid.setSizePolicy(QSzPol.MinimumExpanding, QSzPol.Preferred) + lay.addWidget(bucketlist_wid, 0, 3, 2, 1) + + hlay = QHBoxLayout() + lab = QLabel('Inj Count:', wid) + pydmlab = SiriusLabel( + wid, init_channel=evg_pref.substitute(propty='InjCount-Mon')) + pydmlab.setStyleSheet('min-width:5em;') + pydmlab.setAlignment(Qt.AlignLeft | Qt.AlignVCenter) + hlay.addStretch() + hlay.addWidget(lab) + hlay.addWidget(pydmlab) + hlay.addStretch() + pydmlab = SiriusLabel( + wid, init_channel=evg_pref.substitute(propty='STATEMACHINE')) + pydmlab.setStyleSheet('min-width:10em;') + hlay.addWidget(pydmlab) + hlay.addStretch() + pydmlab = SiriusLabel( + wid, init_channel=evg_pref.substitute(propty='SeqCount-SP')) + pydmlab.rules =\ + '[{"name": "VisibleRule", "property": "Visible", ' +\ + '"expression": "ch[0]==5", "channels": [{"channel": "' +\ + evg_pref.substitute(propty_name='STATEMACHINE') +\ + '", "trigger": true}]}]' + pydmlab.setStyleSheet('min-width:3em;') + hlay.addWidget(pydmlab) + hlay.addStretch() + lay.addItem(hlay, 1, 0, 1, 3) + return wid
+ + +
+[docs] + def setevents(self): + props = {'name', 'ext_trig', 'mode', 'delay_type', 'delay'} + evg_pref = LLTimeSearch.get_evg_name() + names = list(map( + lambda x: evg_pref.substitute(propty=x[0]), + sorted( + HLTimeSearch.get_configurable_hl_events().items(), + key=lambda x: x[1]))) + evts = _EventList( + name='High Level Events', parent=self, prefix=self.prefix, + props=props, obj_names=names) + return evts
+ + +
+[docs] + def settriggers(self): + props = { + 'detailed', 'status', 'name', 'state', 'source', 'delay'} + names = HLTimeSearch.get_hl_triggers() + trigs = _HLTriggerList( + name='High Level Triggers', parent=self, prefix=self.prefix, + props=props, obj_names=names) + return trigs
+ + +
+[docs] + def setupmenus(self): + main_menu = self.menuBar() + main_menu.setNativeMenuBar(False) + icon = qta.icon('mdi.timer', color=get_appropriate_color('AS')) + + menu = main_menu.addMenu('&Devices') + action = menu.addAction('EVG') + evg = SiriusPVName(LLTimeSearch.get_evg_name()) + Window = create_window_from_widget(_EVG, title=evg, icon=icon) + connect_window( + action, Window, None, prefix=self.prefix, device=evg) + + menu_evr = menu.addMenu('EVRs') + for evr in LLTimeSearch.get_device_names(filters={'dev': 'EVR'}): + action = menu_evr.addAction(evr) + Window = create_window_from_widget(_EVR, title=evr, icon=icon) + connect_window( + action, Window, None, prefix=self.prefix, device=evr) + + menu_eve = menu.addMenu('EVEs') + for eve in LLTimeSearch.get_device_names(filters={'dev': 'EVE'}): + action = menu_eve.addAction(eve) + Window = create_window_from_widget(_EVE, title=eve, icon=icon) + connect_window( + action, Window, None, prefix=self.prefix, device=eve) + + menu_afc = menu.addMenu('AMCs') + for afc in LLTimeSearch.get_device_names( + filters={'dev': 'AMCFPGAEVR'}): + action = menu_afc.addAction(afc) + Window = create_window_from_widget(_AFC, title=afc, icon=icon) + connect_window( + action, Window, None, prefix=self.prefix, device=afc) + + menu_fout = menu.addMenu('Fouts') + for fout in LLTimeSearch.get_device_names(filters={'dev': 'Fout'}): + action = menu_fout.addAction(fout) + Window = create_window_from_widget(_FOUT, title=fout, icon=icon) + connect_window( + action, Window, None, prefix=self.prefix, device=fout) + + action = main_menu.addAction('&Monitor') + connect_newprocess( + action, ['sirius-hla-as-ti-control.py', '-t', 'monitor'], + parent=self, is_window=True)
+ + + def _create_prop_widget(self, name, parent, wids, align_ver=True): + pwid = QWidget(parent) + vbl = QVBoxLayout(pwid) + lab = QLabel(name) + lab.setAlignment(Qt.AlignCenter) + vbl.addWidget(lab) + hbl = QHBoxLayout() + hbl.setAlignment(Qt.AlignCenter) + vbl.addItem(hbl) + for wid in wids: + wid.setParent(pwid) + hbl.addWidget(wid) + return pwid
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ti_control/low_level_devices.html b/_modules/siriushla/as_ti_control/low_level_devices.html new file mode 100644 index 000000000..03af20d56 --- /dev/null +++ b/_modules/siriushla/as_ti_control/low_level_devices.html @@ -0,0 +1,2931 @@ + + + + + + siriushla.as_ti_control.low_level_devices — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ti_control.low_level_devices

+"""."""
+import logging as _log
+import numpy as _np
+from datetime import datetime as _datetime
+
+from qtpy.QtCore import Qt, Slot
+from qtpy.QtGui import QColor, QBrush
+from qtpy.QtWidgets import QLabel, QPushButton, QGroupBox, QVBoxLayout, \
+    QHBoxLayout, QGridLayout, QMenuBar, QSplitter, QTabWidget, QWidget, \
+    QSizePolicy as QSzPol, QCheckBox, QFrame
+import qtawesome as qta
+from pydm.widgets import PyDMLineEdit, PyDMPushButton
+
+from siriuspy.search import LLTimeSearch, HLTimeSearch
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.timesys import csdev as _cstime
+from siriuspy.epics import PV as _PV
+
+from ..widgets import PyDMLed, PyDMStateButton, SiriusLedState, \
+    SiriusEnumComboBox, SiriusLedAlert, SiriusLabel, \
+    SiriusSpinbox, SiriusConnectionSignal, \
+    SiriusPushButton, SiriusWaveformPlot
+from ..widgets.windows import create_window_from_widget, SiriusDialog
+from ..util import connect_window, get_appropriate_color
+
+from .base import BaseList, BaseWidget
+from .allowed_buckets import AllowedBucketsMatrix
+
+
+# ###################### Event Generator ######################
+
+[docs] +class BucketListLineEdit(PyDMLineEdit): + +
+[docs] + def value_changed(self, value): + super().value_changed(value) + self.channeltype = _np.ndarray + self.subtype = int
+
+ + + +
+[docs] +class BucketListLabel(SiriusLabel): + +
+[docs] + def value_changed(self, value): + maxele = 20 + if isinstance(value, _np.ndarray): + zeros = _np.where(value == 0)[0] + if zeros.size > 0: + value = value[:zeros[0]] + txt = '[ ' + ' '.join([str(i) for i in value[:maxele]]) + txt += ' ...]' if value.size > maxele else ']' + self.setText(txt) + else: + super().value_changed(value)
+
+ + + +
+[docs] +class EVG(BaseWidget): + """Template for control of High Level Triggers.""" + + def __init__(self, parent=None, prefix='', device=''): + """Initialize object.""" + super().__init__(parent, prefix=prefix) + self.device = _PVName(device or LLTimeSearch.get_evg_name()) + self.setupui() + self.setObjectName('ASApp') + +
+[docs] + def setupui(self): + mylayout = QGridLayout(self) + mylayout.setHorizontalSpacing(20) + mylayout.setVerticalSpacing(20) + + mylayout.addWidget(self._setupmenus(), 0, 0, 1, 2) + + lab = QLabel('<h1>' + self.device.device_name + '</h1>', self) + mylayout.addWidget(lab, 1, 0, 1, 2) + mylayout.setAlignment(lab, Qt.AlignCenter) + + # status + self.status_wid = QGroupBox('Status', self) + mylayout.addWidget(self.status_wid, 2, 0) + self._setup_status_wid() + + # configurations + conftab = QTabWidget(self) + conftab.setObjectName('ASTab') + conftab.setSizePolicy(QSzPol.Preferred, QSzPol.Maximum) + mylayout.addWidget(conftab, 2, 1) + + confwid = QWidget() + conflay = QVBoxLayout(confwid) + maintab = QTabWidget(self) + maintab.setObjectName('ASTab') + maintab.setStyleSheet(""" + QTabWidget::pane{ + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }""") + self.configs_wid = self._setup_configs_wid() + maintab.addTab(self.configs_wid, 'Main') + self.info_wid = self._setup_info_wid() + maintab.addTab(self.info_wid, 'Fw && IOC') + conflay.addWidget(maintab) + self.bucketlist_wid = BucketList(self, self.device, self.prefix) + conflay.addWidget(self.bucketlist_wid) + conflay.setContentsMargins(0, 6, 0, 0) + conftab.addTab(confwid, 'Configurations') + + # interlock map + self.intlkmap_wid = self._setup_intlkmap_wid() + conftab.addTab(self.intlkmap_wid, 'Interlock Map') + + # outtab + splitter = QSplitter(Qt.Horizontal) + splitter.setContentsMargins(0, 0, 0, 0) + splitter.setHandleWidth(20) + mylayout.addWidget(splitter, 3, 0, 1, 2) + + obj_names = [ + self.device.substitute(propty=dev) for dev in + sorted(_cstime.Const.EvtLL._fields) if 0 < int(dev[3:]) < 64] + self.events_wid = EventList( + name='Events', parent=self, prefix=self.prefix, + obj_names=obj_names) + splitter.addWidget(self.events_wid) + + obj_names = [self.device.substitute(propty=dev) for dev in + sorted(_cstime.Const.ClkLL._fields)] + self.clocks_wid = ClockList( + name='Clocks', parent=self, prefix=self.prefix, + obj_names=obj_names, has_search=True) + splitter.addWidget(self.clocks_wid) + + splitter.setSizePolicy(QSzPol.Preferred, QSzPol.MinimumExpanding)
+ + + def _setupmenus(self): + main_menu = QMenuBar() + main_menu.setNativeMenuBar(False) + + try: + fouts = LLTimeSearch.get_evg2fout_mapping() + except KeyError: + return main_menu + + menu = main_menu.addMenu('&Downlinks') + for out, down in sorted(fouts.items()): + action = menu.addAction(out + ' --> ' + down) + icon = qta.icon('mdi.timer', color=get_appropriate_color('AS')) + Win = create_window_from_widget(FOUT, title=down, icon=icon) + connect_window(action, Win, None, device=down, prefix=self.prefix) + return main_menu + + def _setup_configs_wid(self): + configs_wid = QWidget() + lay = QGridLayout(configs_wid) + + # general configs + pvname = self.get_pvname(propty='DevEnbl-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = self.get_pvname(propty='DevEnbl-Sts') + rb = PyDMLed(self, init_channel=pvname) + pg = self._create_prop_widget('Dev Enable', configs_wid, (sp, rb)) + lay.addWidget(pg, 0, 0, alignment=Qt.AlignCenter) + + pvname = self.get_pvname(propty='UpdateEvt-Cmd') + sp = PyDMPushButton(self, init_channel=pvname, pressValue=1) + sp.setIcon(qta.icon('fa5s.sync')) + sp.setToolTip('Update Events Table') + sp.setObjectName('but') + sp.setStyleSheet( + '#but{min-width:25px; max-width:25px; icon-size:20px;}') + pvname = self.get_pvname(propty='EvtSyncStatus-Mon') + rb = SiriusLedState(self, init_channel=pvname) + rb.offColor = rb.Red + pg = self._create_prop_widget('Update Evts', configs_wid, (sp, rb)) + lay.addWidget(pg, 0, 1, alignment=Qt.AlignCenter) + + pvname = self.get_pvname(propty='ContinuousEvt-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = self.get_pvname(propty='ContinuousEvt-Sts') + rb = SiriusLedState(self, init_channel=pvname) + pg = self._create_prop_widget('Continuous', configs_wid, (sp, rb)) + lay.addWidget(pg, 0, 2, alignment=Qt.AlignCenter) + + pvname = self.get_pvname(propty='InjectionEvt-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = self.get_pvname(propty='InjectionEvt-Sts') + rb = SiriusLedState(self, init_channel=pvname) + pg = self._create_prop_widget('Injection', configs_wid, (sp, rb)) + lay.addWidget(pg, 0, 3, alignment=Qt.AlignCenter) + + pvname = self.get_pvname(propty='InjRate-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + pvname = self.get_pvname(propty='InjRate-RB') + rb = SiriusLabel(self, init_channel=pvname) + pg = self._create_prop_widget('Pulse Rate [Hz]', configs_wid, (sp, rb)) + lay.addWidget(pg, 0, 4, alignment=Qt.AlignCenter) + + # ac line configs + pvname = self.get_pvname(propty='ACEnbl-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = self.get_pvname(propty='ACEnbl-Sts') + rb = SiriusLedState(self, init_channel=pvname) + pg = self._create_prop_widget('AC Enable', configs_wid, (sp, rb)) + lay.addWidget(pg, 1, 0, alignment=Qt.AlignCenter) + + pvname = self.get_pvname(propty='ACStatus-Mon') + mon = SiriusLedState(self, init_channel=pvname) + mon.offColor = rb.Red + pg = self._create_prop_widget('AC Status', configs_wid, (mon,)) + lay.addWidget(pg, 1, 1, alignment=Qt.AlignCenter) + + pvname = self.get_pvname(propty='ACSrc-Sel') + sp = SiriusEnumComboBox(self, init_channel=pvname) + pvname = self.get_pvname(propty='ACSrc-Sts') + rb = SiriusLabel(self, init_channel=pvname) + pg = self._create_prop_widget('AC Source', configs_wid, (sp, rb)) + lay.addWidget(pg, 1, 2, alignment=Qt.AlignCenter) + + # rf configs + pvname = self.get_pvname(propty='RFReset-Cmd') + sp = PyDMPushButton(self, init_channel=pvname, pressValue=1) + sp.setIcon(qta.icon('fa5s.sync')) + sp.setToolTip('Reset RF Status') + sp.setObjectName('but') + sp.setStyleSheet( + '#but{min-width:25px; max-width:25px; icon-size:20px;}') + pvname = self.get_pvname(propty='RFStatus-Mon') + rb = SiriusLedState(self, init_channel=pvname) + rb.offColor = rb.Red + pg = self._create_prop_widget('RF Status', configs_wid, (sp, rb)) + lay.addWidget(pg, 1, 3, alignment=Qt.AlignCenter) + + pvname = self.get_pvname(propty='RFDiv-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + pvname = self.get_pvname(propty='RFDiv-RB') + rb = SiriusLabel(self, init_channel=pvname) + pg = self._create_prop_widget('RF Divisor', configs_wid, (sp, rb)) + lay.addWidget(pg, 1, 4, alignment=Qt.AlignCenter) + + return configs_wid + + def _setup_status_wid(self): + status_layout = QGridLayout(self.status_wid) + status_layout.setHorizontalSpacing(30) + status_layout.setVerticalSpacing(5) + + pvname = self.get_pvname(propty='STATEMACHINE') + rb1 = SiriusLabel(self.status_wid, init_channel=pvname) + pvname = self.get_pvname(propty='DevStatus-Mon') + rb2 = SiriusLabel(self.status_wid, init_channel=pvname) + hlay = QHBoxLayout() + hlay.addStretch() + hlay.addWidget(rb1) + hlay.addStretch() + hlay.addWidget(rb2) + hlay.addStretch() + status_layout.addItem(hlay, 0, 0, 1, 3) + status_layout.setAlignment(hlay, Qt.AlignCenter) + + hlay = QHBoxLayout() + wid = QWidget(self.status_wid) + wid.setLayout(QHBoxLayout()) + wid.layout().setContentsMargins(0, 0, 0, 0) + pvname = self.get_pvname(propty='TotalInjCount-Mon') + pydmlab1 = SiriusLabel(self.status_wid, init_channel=pvname) + pydmlab1.setStyleSheet('min-width:5em;') + pydmlab1.setAlignment(Qt.AlignRight | Qt.AlignVCenter) + pvname = self.get_pvname(propty='InjCount-Mon') + pydmlab2 = SiriusLabel(self.status_wid, init_channel=pvname) + pydmlab2.setAlignment(Qt.AlignCenter) + lab1 = QLabel( + '(', self.status_wid, alignment=Qt.AlignRight | Qt.AlignVCenter) + lab2 = QLabel( + ')', self.status_wid, alignment=Qt.AlignLeft | Qt.AlignVCenter) + wid.layout().addStretch() + wid.layout().addWidget(pydmlab1) + wid.layout().addWidget(lab1) + wid.layout().addWidget(pydmlab2) + wid.layout().addWidget(lab2) + wid.layout().addStretch() + hlay.addWidget(self._create_prop_widget( + '<b>Inj Count: All (Now)</b>', self.status_wid, (wid, ))) + + wid = QWidget(self.status_wid) + wid.setLayout(QHBoxLayout()) + wid.layout().setContentsMargins(0, 0, 0, 0) + pvname = self.get_pvname(propty='SeqStatus-Mon') + pydmlab1 = SiriusLabel(self.status_wid, init_channel=pvname) + pydmlab1.setAlignment(Qt.AlignRight | Qt.AlignVCenter) + pvname = self.get_pvname(propty='SeqCount-SP') + pydmlab2 = SiriusLabel(self.status_wid, init_channel=pvname) + lab1 = QLabel( + '(', self.status_wid, alignment=Qt.AlignRight | Qt.AlignVCenter) + lab2 = QLabel( + ')', self.status_wid, alignment=Qt.AlignLeft | Qt.AlignVCenter) + wid.layout().addStretch() + wid.layout().addWidget(pydmlab1) + wid.layout().addWidget(lab1) + wid.layout().addWidget(pydmlab2) + wid.layout().addWidget(lab2) + wid.layout().addStretch() + hlay.addWidget(self._create_prop_widget( + '<b>Sequence: Table (Count)</b>', self.status_wid, (wid, ))) + status_layout.addItem(hlay, 1, 0, 1, 3) + + lb = QLabel("<b>Alive</b>") + pvname = self.get_pvname(propty='Alive-Mon') + rb = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', self.status_wid, (lb, rb)) + status_layout.addWidget(gb, 2, 0) + + lb = QLabel("<b>Network</b>") + pvname = self.get_pvname(propty='Network-Mon') + rb = SiriusLedAlert(self, init_channel=pvname) + on_c, off_c = rb.onColor, rb.offColor + rb.offColor = on_c + rb.onColor = off_c + gb = self._create_small_group('', self.status_wid, (lb, rb)) + status_layout.addWidget(gb, 2, 1) + + lb = QLabel("<b>RF Sts</b>") + pvname = self.get_pvname(propty='RFStatus-Mon') + rb = SiriusLedAlert(self, init_channel=pvname) + on_c, off_c = rb.onColor, rb.offColor + rb.offColor = on_c + rb.onColor = off_c + gb = self._create_small_group('', self.status_wid, (lb, rb)) + status_layout.addWidget(gb, 2, 2) + + wids = list() + try: + conn = LLTimeSearch.get_connections_from_evg() + conn = {int(dev.propty[-1]) for dev in conn if dev.dev == 'EVG'} + except KeyError: + conn = set() + for i in range(8): + pvname = self.get_pvname(propty='DownlinkStatus-Mon') + if i in conn: + rb = SiriusLedAlert(self, init_channel=pvname, bit=i) + else: + rb = SiriusLedState(self, init_channel=pvname, bit=i) + rb.onColor = rb.DarkGreen + rb.offColor = rb.LightGreen + wids.append(rb) + but = QPushButton(self) + but.setToolTip('Open Down Connections Details') + but.setIcon(qta.icon('fa5s.ellipsis-v')) + but.setObjectName('but') + but.setDefault(False) + but.setAutoDefault(False) + but.setStyleSheet( + '#but{min-width:15px; max-width:15px;\ + min-height:25px; max-height:25px;\ + icon-size:20px;}') + but.clicked.connect(self._open_downconn_dialog) + wids.append(but) + pvname = self.get_pvname(propty='RxLockedLtcRst-Cmd') + pbt = SiriusPushButton( + self, init_channel=pvname, pressValue=1, label='', + icon=qta.icon('fa5s.sync')) + wids.append(pbt) + gb = self._create_small_group( + 'Down Connection', self.status_wid, wids, align_ver=False) + status_layout.addWidget(gb, 3, 0, 1, 3) + + def _setup_info_wid(self): + info_wid = QWidget() + lay = QGridLayout(info_wid) + + lb = QLabel("<b>IP</b>") + pvname = self.get_pvname(propty='IPAddr-Mon') + addr = SiriusLabel(self, init_channel=pvname) + pvname = self.get_pvname(propty='IPPort-Mon') + port = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, addr, port)) + lay.addWidget(gb, 0, 0, alignment=Qt.AlignHCenter) + + lb = QLabel("<b>DevFun</b>") + pvname = self.get_pvname(propty='DevFun-Sel') + sp = SiriusEnumComboBox(self, init_channel=pvname) + pvname = self.get_pvname(propty='DevFun-Sts') + rb = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, sp, rb)) + lay.addWidget(gb, 0, 1, alignment=Qt.AlignHCenter) + + lb = QLabel("<b>Device Status</b>") + pvname = self.get_pvname(propty='DevStatus-Mon') + rb = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, rb)) + lay.addWidget(gb, 0, 2, alignment=Qt.AlignHCenter) + + lb = QLabel("<b>FPGA Clk</b>") + pvname = self.get_pvname('FPGAClk-Cte') + mon = SiriusLabel(self, init_channel=pvname) + mon.showUnits = True + mon.precisionFromPV = False + mon.precision = 3 + gb = self._create_small_group('', info_wid, (lb, mon)) + lay.addWidget(gb, 0, 3, alignment=Qt.AlignCenter) + + lb = QLabel("<b>Download</b>") + pvname = self.get_pvname('Download-Cmd') + sp = SiriusPushButton( + self, label='', icon=qta.icon('fa5s.download'), + pressValue=1, releaseValue=0, init_channel=pvname) # ? + gb = self._create_small_group('', info_wid, (lb, sp)) + lay.addWidget(gb, 1, 0, alignment=Qt.AlignHCenter) + + lb = QLabel("<b>Save Settings</b>") + pvname = self.get_pvname('Save-Cmd') + sp = PyDMPushButton( + self, label='Save', init_channel=pvname, pressValue=1) # ? + gb = self._create_small_group('', info_wid, (lb, sp)) + lay.addWidget(gb, 1, 1, alignment=Qt.AlignHCenter) + + lb = QLabel("<b>RF Ref.</b>") + pvname = self.get_pvname('RFRef-Mon') + mon = SiriusLabel(self, init_channel=pvname) + mon.showUnits = True + pvname = self.get_pvname('RFRef-Mon', field='INP') + inp = PyDMLineEdit(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, mon, inp)) + lay.addWidget(gb, 1, 2, alignment=Qt.AlignHCenter) + + lb = QLabel("<b>Fw.Version</b>") + pvname = self.get_pvname(propty='FwVersion-Cte.SVAL') + frmv = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, frmv)) + gb.layout().setSpacing(3) + lay.addWidget(gb, 1, 3, alignment=Qt.AlignHCenter) + + but = QPushButton(self) + but.setToolTip('Open Timestamp Controls') + but.setIcon(qta.icon('fa5s.ellipsis-v')) + but.setObjectName('but') + but.setStyleSheet( + '#but{min-width:25px; max-width:25px;\ + min-height:25px; max-height:25px;\ + icon-size:20px;}') + but.clicked.connect(self._open_tstamp_dialog) + lay.addWidget(but, 0, 4, alignment=Qt.AlignTop) + + return info_wid + + def _setup_intlkmap_wid(self): + wid = QGroupBox() + lay = QGridLayout(wid) + lay.setHorizontalSpacing(30) + + # controls + pvname = self.get_pvname(propty='IntlkCtrlEnbl-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = self.get_pvname(propty='IntlkCtrlEnbl-Sts') + rb = PyDMLed(self, init_channel=pvname) + gb = self._create_prop_widget('Intlk. Enable', wid, (sp, rb)) + lay.addWidget(gb, 0, 0, alignment=Qt.AlignCenter) + + pvname = self.get_pvname(propty='IntlkCtrlRst-Cmd') + sp = SiriusPushButton(self, init_channel=pvname, pressValue=1) + sp.setIcon(qta.icon('fa5s.sync')) + sp.setObjectName('bt') + sp.setStyleSheet( + '#bt{min-width:25px; max-width:25px; icon-size:20px;}') + gb = self._create_prop_widget('Intlk. Reset', wid, (sp, )) + lay.addWidget(gb, 1, 0, alignment=Qt.AlignCenter) + + pvname = self.get_pvname(propty='IntlkCtrlRepeat-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = self.get_pvname(propty='IntlkCtrlRepeat-Sts') + rb = PyDMLed(self, init_channel=pvname) + gb = self._create_prop_widget('Intlk. Repeat', wid, (sp, rb)) + lay.addWidget(gb, 2, 0, alignment=Qt.AlignCenter) + + pvname = self.get_pvname(propty='IntlkCtrlRepeatTime-SP') + sp = PyDMLineEdit(self, init_channel=pvname) + pvname = self.get_pvname(propty='IntlkCtrlRepeatTime-RB') + rb = SiriusLabel(self, init_channel=pvname) + gb = self._create_prop_widget('Intlk. Repeat Time', wid, (sp, rb)) + lay.addWidget(gb, 3, 0, alignment=Qt.AlignCenter) + + # table + # columns in + lay_grid = QGridLayout() + lay_grid.setHorizontalSpacing(6) + lay_grid.setVerticalSpacing(4) + for idx in range(7): + idxstr = str(idx) + hd = QLabel('Evt'+idxstr, self, alignment=Qt.AlignCenter) + hd.setObjectName('hd') + le = PyDMLineEdit(self, self.get_pvname('IntlkEvtIn'+idxstr+'-SP')) + le.setObjectName('le') + le.setAlignment(Qt.AlignCenter) + lb = SiriusLabel(self, self.get_pvname('IntlkEvtIn'+idxstr+'-RB')) + lb.setObjectName('lb') + lb.setAlignment(Qt.AlignCenter) + ld = SiriusLedState( + self, self.get_pvname('IntlkEvtStatus-Mon'), bit=idx) + lay_grid.addWidget(hd, 0, idx+2, alignment=Qt.AlignCenter) + lay_grid.addWidget(le, 1, idx+2, alignment=Qt.AlignCenter) + lay_grid.addWidget(lb, 2, idx+2, alignment=Qt.AlignCenter) + lay_grid.addWidget(ld, 3, idx+2, alignment=Qt.AlignCenter) + # column out + hd = QLabel('EvtOut', self, alignment=Qt.AlignCenter) + hd.setObjectName('hd') + le = PyDMLineEdit(self, self.get_pvname('IntlkEvtOut-SP')) + le.setObjectName('le') + le.setAlignment(Qt.AlignCenter) + lb = SiriusLabel(self, self.get_pvname('IntlkEvtOut-RB')) + lb.setObjectName('lb') + lb.setAlignment(Qt.AlignCenter) + ld = SiriusLedState(self, self.get_pvname('IntlkEvtStatus-Mon'), bit=7) + lay_grid.addWidget(hd, 0, 9, alignment=Qt.AlignCenter) + lay_grid.addWidget(le, 1, 9, alignment=Qt.AlignCenter) + lay_grid.addWidget(lb, 2, 9, alignment=Qt.AlignCenter) + lay_grid.addWidget(ld, 3, 9, alignment=Qt.AlignCenter) + + evt, row, col, colini = 0, 4, 2, 2 + for idx in range(28): + biti = idx % 16 + bith = hex(biti).split('x')[1].capitalize() + bitg = '0to15' if idx < 16 else '16to27' + + pvsp = self.get_pvname('IntlkTbl'+bitg+'-Sel', field='B'+bith) + sp = PyDMStateButton(self, pvsp) + sp.setStyleSheet( + 'PyDMStateButton{min-height: 0.98em; max-height: 0.98em;}') + + pvrb = pvsp.substitute(propty_suffix='Sts') + rb = SiriusLedState(self, pvrb) + rb.setStyleSheet( + 'SiriusLedState{min-width: 0.98em; max-width: 0.98em;}') + + gb = self._create_small_group('', wid, (sp, rb), align_ver=False) + gb.layout().setSpacing(3) + gb.layout().setContentsMargins(3, 1, 3, 1) + gb.setSizePolicy(QSzPol.Preferred, QSzPol.Maximum) + lay_grid.addWidget(gb, row, col) + + col += 1 + if idx in [6, 12, 17, 21, 24, 26, 27]: + evtlb = QLabel('Evt'+str(evt), self, alignment=Qt.AlignRight) + lay_grid.addWidget(evtlb, row, 0, alignment=Qt.AlignVCenter) + line = QFrame(self) + line.setFrameShape(QFrame.HLine) + line.setFrameShadow(QFrame.Plain) + lay_grid.addWidget(line, row, 1, 1, colini-1) + evt += 1 + row += 1 + colini += 1 + col = colini + lay.addLayout(lay_grid, 0, 1, 4, 1) + + wid.setStyleSheet("#hd, #le, #lb{max-width: 3em;}") + return wid + + def _create_prop_widget(self, name, parent, wids, align_ver=True): + pwid = QWidget(parent) + vbl = QVBoxLayout(pwid) + lab = QLabel('<b>' + name + '</b>') + lab.setAlignment(Qt.AlignCenter) + vbl.addWidget(lab) + hbl = QHBoxLayout() + vbl.addItem(hbl) + for wid in wids: + wid.setParent(pwid) + hbl.addWidget(wid) + hbl.setAlignment(wid, Qt.AlignCenter) + return pwid + + def _create_tstamp_dialog(self): + dialog = SiriusDialog() + dialog.setObjectName('ASApp') + dialog.setWindowTitle(self.device + ' Timestamp Control') + dialog.setWindowIcon(self.windowIcon()) + lay = QVBoxLayout(dialog) + + gbox_tim = QGroupBox('Timestamp', self) + lay.addWidget(gbox_tim) + + lb = QLabel('<b>Get UTC</b>') + pvname = self.get_pvname('GetUTC-Cmd') + sp = PyDMPushButton( + self, label='Get UTC', init_channel=pvname, + pressValue=1) # ? + gb_getutc = self._create_small_group('', gbox_tim, (lb, sp)) + + lb = QLabel("<b>Mismatch</b>") + pvname = self.get_pvname(propty='UTCMismatch-Mon') + rb = SiriusLedAlert(self, init_channel=pvname) + gb_utcmis = self._create_small_group('', gbox_tim, (lb, rb)) + + lb = QLabel("<b>UTC Source</b>") + pvname = self.get_pvname(propty='UTCRefSrc-Sel') + sp = SiriusEnumComboBox(self, init_channel=pvname) + gb_utcsrc = self._create_small_group('', gbox_tim, (lb, sp)) + + lb = QLabel("<b>PPS Source</b>") + pvname = self.get_pvname(propty='TimestampSrc-Sel') + sp = SiriusEnumComboBox(self, init_channel=pvname) + pvname = self.get_pvname(propty='TimestampSrc-Sts') + rb = SiriusLabel(self, init_channel=pvname) + gb_ppssrc = self._create_small_group('', gbox_tim, (lb, sp, rb)) + + lb = QLabel("<b>UTC</b>") + pvname = self.get_pvname(propty='UTC-SP') + sp = PyDMLineEdit(self, init_channel=pvname) + pvname = self.get_pvname(propty='UTC-RB') + rb = SiriusLabel(self, init_channel=pvname) + rb.showUnits = True + gb_utc = self._create_small_group('', gbox_tim, (lb, sp, rb)) + + lb = QLabel('<b>Subsec</b>') + mon = SiriusLabel(self, self.get_pvname('SubSecond-Mon')) + mon.showUnits = True + gb_subsec = self._create_small_group('', gbox_tim, (lb, mon)) + + lb = QLabel('<b>Control Room UTC</b>') + mon = SiriusLabel(self, self.get_pvname('CtrlRoomUTC')) + mon.showUnits = True + gb_ctrlutc = self._create_small_group('', gbox_tim, (lb, mon)) + + lay_tim = QGridLayout(gbox_tim) + lay_tim.setHorizontalSpacing(30) + lay_tim.addWidget(gb_getutc, 0, 0) + lay_tim.addWidget(gb_utcmis, 0, 1) + lay_tim.addWidget(gb_utcsrc, 0, 2) + lay_tim.addWidget(gb_ppssrc, 0, 3) + lay_tim.addWidget(gb_utc, 1, 0) + lay_tim.addWidget(gb_subsec, 1, 1) + lay_tim.addWidget(gb_ctrlutc, 1, 2) + + # Timestamp Log enable + gbox_enbl = QGroupBox('Timestamp Log Enable', self) + lay.addWidget(gbox_enbl) + + lay_enbl = QGridLayout(gbox_enbl) + lay_enbl.setHorizontalSpacing(15) + for bit in range(8): + bitname = 'Out' if bit == 7 else f'In{bit}' + lb = QLabel(f'Evt{bitname}', self, alignment=Qt.AlignCenter) + pvsp = self.get_pvname('IntlkLogEnbl-SP', field=f'B{bit}') + sp = PyDMStateButton(self, pvsp) + sp.setStyleSheet( + 'PyDMStateButton{min-height: 0.98em; max-height: 0.98em;}') + pvrb = pvsp.substitute(propty_suffix='RB') + rb = SiriusLedState(self, pvrb) + rb.setStyleSheet( + 'SiriusLedState{min-width: 0.98em; max-width: 0.98em;}') + gb = self._create_small_group( + '', gbox_enbl, (lb, sp, rb), align_ver=True) + gb.layout().setSpacing(3) + gb.layout().setContentsMargins(3, 1, 3, 1) + gb.setSizePolicy(QSzPol.Preferred, QSzPol.Maximum) + lay_enbl.addWidget(gb, 0, bit) + + # Timestamp Log + gbox_log = QGroupBox('Timestamp Log', self) + lay.addWidget(gbox_log) + + ld_logstp = QLabel('<b>Stop Log</b>', self) + self.sb_logstp = PyDMStateButton(self, self.get_pvname('stoplog')) + self.led_logstp = SiriusLedState(self, self.get_pvname('STOPLOGRBV')) + gb_logstp = self._create_small_group( + '', gbox_log, (ld_logstp, self.sb_logstp, self.led_logstp)) + + ld_logrst = QLabel('<b>Reset Log</b>', self) + self.sb_logrst = PyDMStateButton(self, self.get_pvname('rstlog')) + self.led_logrst = SiriusLedState(self, self.get_pvname('RSTLOGRBV')) + gb_logrst = self._create_small_group( + '', gbox_log, (ld_logrst, self.sb_logrst, self.led_logrst)) + + ld_logpul = QLabel('<b>Pull</b>', self) + self.bt_logpul = SiriusPushButton( + parent=self, init_channel=self.get_pvname('pull'), + pressValue=1, releaseValue=0) # ? + self.bt_logpul.setIcon(qta.icon('fa5s.arrow-down')) + self.bt_logpul.setObjectName('bt') + self.bt_logpul.setStyleSheet( + '#bt{min-width:25px; max-width:25px; icon-size:20px;}') + gb_logpul = self._create_small_group( + '', gbox_log, (ld_logpul, self.bt_logpul)) + + ld_logcnt = QLabel('<b>Log Count</b>', self, alignment=Qt.AlignCenter) + self.lb_logcnt = SiriusLabel(self, self.get_pvname('LOGCOUNT')) + self.lb_logcnt.showUnits = True + self.lb_logcnt.setAlignment(Qt.AlignCenter) + ld_logful = QLabel('Full', self) + self.led_logful = SiriusLedState(self, self.get_pvname('FULL')) + ld_logemp = QLabel('Empty', self) + self.led_logemp = SiriusLedState(self, self.get_pvname('EMPTY')) + fr_logcnt = QFrame(gbox_log) + fr_logcnt.setStyleSheet('.QFrame{border: 1px solid gray;}') + lay_logcnt = QGridLayout(fr_logcnt) + lay_logcnt.setAlignment(Qt.AlignCenter) + lay_logcnt.setContentsMargins(0, 0, 0, 0) + lay_logcnt.addWidget(ld_logcnt, 0, 0, 1, 4) + lay_logcnt.addWidget(self.lb_logcnt, 1, 0, 1, 4) + lay_logcnt.addWidget(ld_logful, 2, 0, alignment=Qt.AlignRight) + lay_logcnt.addWidget(self.led_logful, 2, 1, alignment=Qt.AlignTop) + lay_logcnt.addWidget(ld_logemp, 2, 2, alignment=Qt.AlignRight) + lay_logcnt.addWidget(self.led_logemp, 2, 3, alignment=Qt.AlignTop) + + ld_logevt = QLabel('<b>Event</b>', self) + self.lb_logevt = SiriusLabel(self, self.get_pvname('LOGEVENT')) + gb_logevt = self._create_small_group( + '', gbox_log, (ld_logevt, self.lb_logevt)) + + ld_logutc = QLabel('<b>Log UTC</b>', self) + self.lb_logutc = SiriusLabel(self, self.get_pvname('LOGUTC')) + self.lb_logutc.showUnits = True + gb_logutc = self._create_small_group( + '', gbox_log, (ld_logutc, self.lb_logutc)) + + ld_logsub = QLabel('<b>Log Subsec</b>', self) + self.lb_logsub = SiriusLabel(self, self.get_pvname('LOGSUBSEC')) + self.lb_logsub.showUnits = True + gb_logsub = self._create_small_group( + '', gbox_log, (ld_logsub, self.lb_logsub)) + + lay_log = QGridLayout(gbox_log) + lay_log.addWidget(gb_logstp, 0, 0, alignment=Qt.AlignTop) + lay_log.addWidget(gb_logrst, 0, 1, alignment=Qt.AlignTop) + lay_log.addWidget(gb_logpul, 0, 2, alignment=Qt.AlignTop) + lay_log.addWidget(gb_logevt, 1, 0, alignment=Qt.AlignTop) + lay_log.addWidget(gb_logutc, 1, 1, alignment=Qt.AlignTop) + lay_log.addWidget(gb_logsub, 1, 2, alignment=Qt.AlignTop) + lay_log.addWidget(fr_logcnt, 0, 3, 2, 1, alignment=Qt.AlignCenter) + + # Timestamp Log Buffer + gbox_buf = QGroupBox('Timestamp Log Buffer', self) + lay.addWidget(gbox_buf) + + ld_bufcnt = QLabel('<b>Log Count</b>', self) + self.lb_bufcnt = SiriusLabel(self, self.get_pvname('LOGSOFTCNT')) + self.lb_bufcnt.showUnits = True + gb_bufcnt = self._create_small_group( + '', gbox_buf, (ld_bufcnt, self.lb_bufcnt)) + + ld_bufrst = QLabel('<b>Reset</b>', self) + self.bt_bufrst = SiriusPushButton( + parent=self, init_channel=self.get_pvname('rstSoftBuff'), + pressValue=1, releaseValue=0) # ? + self.bt_bufrst.setIcon(qta.icon('fa5s.sync')) + self.bt_bufrst.setObjectName('bt') + self.bt_bufrst.setStyleSheet( + '#bt{min-width:25px; max-width:25px; icon-size:20px;}') + gb_bufrst = self._create_small_group( + '', gbox_buf, (ld_bufrst, self.bt_bufrst)) + + ld_bufutc = QLabel('<b>UTC buffer</b>', self) + fmt = "%d/%m/%y %H:%M:%S" + func = _np.vectorize( + lambda tstp: _datetime.fromtimestamp(tstp).strftime(fmt) + if tstp != 0 + else 0 + ) # from timestamp to datetime format + self.tb_bufutc = self._create_logbuffer_table( + prop='UTCbuffer', transform=func + ) + gb_bufutc = self._create_small_group( + '', gbox_buf, (ld_bufutc, self.tb_bufutc)) + + ld_bufsub = QLabel('<b>Subsec buffer</b>', self) + rffreq = _PV("RF-Gen:GeneralFreq-RB").value + func = lambda vec: _np.round(vec * 4 / rffreq, decimals=10) + # from EVG clock to seconds + self.tb_bufsub = self._create_logbuffer_table( + prop='SUBSECbuffer', transform=func) + gb_bufsub = self._create_small_group( + '', gbox_buf, (ld_bufsub, self.tb_bufsub)) + + ld_bufevt = QLabel('<b>Event buffer</b>', self) + self.tb_bufevt = self._create_logbuffer_table('EVENTbuffer') + gb_bufevt = self._create_small_group( + '', gbox_buf, (ld_bufevt, self.tb_bufevt)) + + lay_logbuf = QGridLayout(gbox_buf) + lay_logbuf.addWidget(gb_bufcnt, 0, 0, 1, 3) + lay_logbuf.addWidget(gb_bufrst, 0, 3, 1, 3) + lay_logbuf.addWidget(gb_bufutc, 1, 0, 1, 2) + lay_logbuf.addWidget(gb_bufsub, 1, 2, 1, 2) + lay_logbuf.addWidget(gb_bufevt, 1, 4, 1, 2) + + return dialog + + def _open_tstamp_dialog(self): + if not hasattr(self, 'tstamp_wind'): + self.tstamp_wind = self._create_tstamp_dialog() + self.tstamp_wind.show() + else: + self.tstamp_wind.showNormal() + + def _create_downconn_dialog(self): + dialog = SiriusDialog() + dialog.setObjectName('ASApp') + dialog.setWindowTitle(self.device + ' Down Connections') + dialog.setWindowIcon(self.windowIcon()) + + lay = QVBoxLayout(dialog) + obj_names = [ + self.device.substitute(idx=self.device.idx+'_'+str(i)) + for i in range(8)] + downconn_wid = EVGFOUTOUTList( + name='Down Connections', parent=self, prefix=self.prefix, + obj_names=obj_names) + lay.addWidget(downconn_wid) + return dialog + + def _open_downconn_dialog(self): + if not hasattr(self, 'downconn_wind'): + self.downconn_wind = self._create_downconn_dialog() + self.downconn_wind.show() + else: + self.downconn_wind.showNormal()
+ + + +
+[docs] +class BucketListGraph(BaseWidget): + """Bucket List Graph.""" + + def __init__(self, parent=None, device='', prefix=''): + if not device: + device = LLTimeSearch.get_evg_name() + super().__init__(parent, device, prefix) + self._setupUi() + + def _setupUi(self): + # Graph + self.graph = SiriusWaveformPlot(self) + self.graph.setBackgroundColor(QColor(255, 255, 255)) + self.graph.maxRedrawRate = 2 + self.graph.mouseEnabledX = True + self.graph.setShowXGrid(True) + self.graph.setShowYGrid(True) + self.graph.setAutoRangeX(False) + self.graph.setMinYRange(-0.1) + self.graph.setMaxYRange(1.1) + self.graph.setAxisColor(QColor(0, 0, 0)) + self.graph.setLabel('left', 'Buckets', color='gray') + self.graph.setObjectName('graph') + self.graph.setStyleSheet('#graph{min-height: 5em;}') + self.graph.setSizePolicy(QSzPol.Expanding, QSzPol.Expanding) + + self._curves = dict() + self.graph.addChannel( + y_channel='FAKE:SP', name='SP', color='red', lineWidth=2) + self._curves['SP'] = self.graph.curveAtIndex(0) + self._curves['SP'].setFillLevel(0) + self._curves['SP'].setBrush(QBrush(QColor('red'))) + self.graph.addChannel( + y_channel='FAKE:RB', name='RB', color='blue', lineWidth=2) + self._curves['RB'] = self.graph.curveAtIndex(1) + self._curves['RB'].setFillLevel(0) + self._curves['RB'].setBrush(QBrush(QColor('blue'))) + self.graph.addChannel( + y_channel='FAKE:Mon', name='Mon', color='green', lineWidth=2) + self._curves['Mon'] = self.graph.curveAtIndex(2) + self._curves['Mon'].setFillLevel(0) + self._curves['Mon'].setBrush(QBrush(QColor('green'))) + + # Show + self.show_sp = QCheckBox('SP') + self.show_sp.setChecked(True) + self.show_sp.setStyleSheet('color: red;') + self.show_sp.stateChanged.connect(self._curves['SP'].setVisible) + self.show_rb = QCheckBox('RB') + self.show_rb.setChecked(True) + self.show_rb.setStyleSheet('color: blue;') + self.show_rb.stateChanged.connect(self._curves['RB'].setVisible) + self.show_mn = QCheckBox('Mon') + self.show_mn.setChecked(True) + self.show_mn.setStyleSheet('color: green;') + self.show_mn.stateChanged.connect(self._curves['Mon'].setVisible) + wid_show = QWidget() + lay_show = QVBoxLayout(wid_show) + lay_show.setContentsMargins(0, 0, 0, 0) + lay_show.addWidget(self.show_sp) + lay_show.addWidget(self.show_rb) + lay_show.addWidget(self.show_mn) + + lay = QHBoxLayout(self) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(self.graph) + lay.addWidget(wid_show) + + self._ch_sp = SiriusConnectionSignal( + self.get_pvname(propty='BucketList-SP')) + self._ch_sp.new_value_signal[_np.ndarray].connect(self._update_curves) + self._ch_sp.new_value_signal[int].connect(self._update_curves) + self._ch_rb = SiriusConnectionSignal( + self.get_pvname(propty='BucketList-RB')) + self._ch_rb.new_value_signal[_np.ndarray].connect(self._update_curves) + self._ch_rb.new_value_signal[int].connect(self._update_curves) + self._ch_mn = SiriusConnectionSignal( + self.get_pvname(propty='BucketList-Mon')) + self._ch_mn.new_value_signal[_np.ndarray].connect(self._update_curves) + self._ch_mn.new_value_signal[int].connect(self._update_curves) + + @Slot(int) + @Slot(_np.ndarray) + def _update_curves(self, new_array): + new_array = _np.asarray(new_array) + + for k in self._curves: + if self.sender().address.endswith(k): + curve = self._curves[k] + break + + org_bunch = _np.arange(1, 864) - 0.5 + org_curve = _np.zeros(864) + # trying to catch bug observed where new_array + # had strange values greater than 864 + try: + org_curve[new_array-1] = 1 + except IndexError: + _log.warning( + 'IndexError: Received array for ' + f'{self.sender().address} with values out of [1, 864]') + _log.warning(f'IndexError: new_array: {new_array}') + + new_bunch = _np.linspace(1, 864, 10000) - 0.5 + new_bunch_indices = _np.searchsorted( + _np.nextafter(org_bunch, -_np.inf), new_bunch, side='left') + new_bunch_indices = new_bunch_indices.clip( + 1, len(org_bunch)).astype(_np.int_) + new_curve = org_curve[new_bunch_indices-1] + + curve.receiveXWaveform(new_bunch) + curve.receiveYWaveform(new_curve)
+ + + +
+[docs] +class BucketList(BaseWidget): + + def __init__(self, parent=None, device='', prefix='', min_size=25, + show_graph=False): + if not device: + device = LLTimeSearch.get_evg_name() + super().__init__(parent, device, prefix) + self.setObjectName('ASApp') + self._min_size = min_size + self._show_graph = show_graph + self.setupui() + +
+[docs] + def setupui(self): + self.setLayout(QHBoxLayout(self)) + wid = QGroupBox('Bucket List', self) + self.layout().addWidget(wid) + self.layout().setContentsMargins(0, 0, 0, 0) + lay = QGridLayout(wid) + + tm = 'min-width:{0:d}em; max-height:1.15em;' + pvname = self.get_pvname("BucketList-SP") + sp = BucketListLineEdit(wid, init_channel=pvname) + self.bucket_ledit = sp + sp.setStyleSheet(tm.format(self._min_size-1)) + sp.setSizePolicy(QSzPol.MinimumExpanding, QSzPol.Maximum) + lab = QLabel('SP : ', wid) + lab.setSizePolicy(QSzPol.Maximum, QSzPol.Maximum) + pushbtn = QPushButton(wid) + pushbtn.setObjectName('but') + pushbtn.setStyleSheet( + '#but{min-width:25px; max-width:25px; icon-size:20px;}') + pushbtn.setIcon(qta.icon('mdi.basket-fill')) + self._wid_fill = self._setup_bucket_list_fill() + pushbtn.clicked.connect(self._wid_fill.open) + lay_sp = QHBoxLayout() + lay_sp.addWidget(lab) + lay_sp.addWidget(sp) + lay_sp.addWidget(pushbtn) + pvname = self.get_pvname("BucketList-RB") + rb = BucketListLabel(wid, init_channel=pvname) + rb.setStyleSheet(tm.format(self._min_size)) + rb.setSizePolicy(QSzPol.MinimumExpanding, QSzPol.Maximum) + lab = QLabel('RB : ', wid) + lab.setSizePolicy(QSzPol.Maximum, QSzPol.Maximum) + lay_rb = QHBoxLayout() + lay_rb.addWidget(lab) + lay_rb.addWidget(rb) + pvname = self.get_pvname("BucketList-Mon") + mn = BucketListLabel(wid, init_channel=pvname) + mn.setStyleSheet(tm.format(self._min_size)) + mn.setSizePolicy(QSzPol.MinimumExpanding, QSzPol.Maximum) + lab = QLabel('Mon: ', wid) + lab.setSizePolicy(QSzPol.Maximum, QSzPol.Maximum) + lay_mn = QHBoxLayout() + lay_mn.addWidget(lab) + lay_mn.addWidget(mn) + vlay = QVBoxLayout() + vlay.setSpacing(1) + vlay.addLayout(lay_sp) + vlay.addLayout(lay_rb) + vlay.addLayout(lay_mn) + lay.addLayout(vlay, 0, 0) + + pvname = self.get_pvname("BucketListSyncStatus-Mon") + rb = PyDMLed(wid, init_channel=pvname) + rb.setOffColor(rb.Red) + rb.setOnColor(rb.LightGreen) + lab = QLabel('Sync', wid) + lab.setStyleSheet("min-width:4em; max-height:1.15em;") + lab.setAlignment(Qt.AlignCenter) + vlay = QVBoxLayout() + vlay.setSpacing(1) + vlay.addWidget(lab) + vlay.addWidget(rb) + lay.addLayout(vlay, 0, 1) + + rb = SiriusLabel( + wid, init_channel=self.get_pvname("BucketListLen-Mon")) + rb.setStyleSheet("min-width:4em; max-height:1.15em;") + rb.setAlignment(Qt.AlignCenter) + lab = QLabel('Size', wid) + lab.setStyleSheet("min-width:4em; max-height:1.15em;") + lab.setAlignment(Qt.AlignCenter) + vlay = QVBoxLayout() + vlay.setSpacing(1) + vlay.addWidget(lab) + vlay.addWidget(rb) + lay.addLayout(vlay, 0, 2) + + pvname = self.get_pvname("RepeatBucketList-SP") + sp = SiriusSpinbox(wid, init_channel=pvname) + pvname = self.get_pvname("RepeatBucketList-RB") + rb = SiriusLabel(wid, init_channel=pvname) + rb.setStyleSheet("min-width:4em; max-height:1.15em;") + lab = QLabel('Repeat', wid, alignment=Qt.AlignCenter) + hlay = QHBoxLayout() + hlay.setSpacing(1) + hlay.addWidget(sp) + hlay.addWidget(rb) + vlay = QVBoxLayout() + vlay.setSpacing(1) + vlay.addWidget(lab) + vlay.addLayout(hlay) + lay.addLayout(vlay, 0, 3) + + if self._show_graph: + graph = BucketListGraph(self, self.device, self.prefix) + lay.addWidget(graph, 1, 0, 1, 4)
+ + + def _setup_bucket_list_fill(self): + inj_prefix = _PVName('AS-Glob:AP-InjCtrl').substitute( + prefix=self.prefix) + + wid = SiriusDialog(self) + wid.setFocus(True) + wid.setFocusPolicy(Qt.StrongFocus) + wid.setObjectName('ASApp') + + window = create_window_from_widget( + AllowedBucketsMatrix, + title='Allowed Buckets to Inject', + withscroll=True, + ) + self._pb_allowed_buckets = QPushButton('', wid) + self._pb_allowed_buckets.setObjectName('btn') + self._pb_allowed_buckets.setIcon(qta.icon('fa5s.tasks')) + self._pb_allowed_buckets.setToolTip( + 'Open window to select BPMs and correctors' + ) + self._pb_allowed_buckets.setStyleSheet( + '#btn{min-width:3.3em; max-width:3.3em;\ + min-height:1.8em; max-height:1.8em; icon-size:25px;}' + ) + connect_window( + self._pb_allowed_buckets, window, None, device=inj_prefix + ) + + self._sb_start = SiriusSpinbox( + wid, inj_prefix.substitute(propty='BucketListStart-SP')) + self._sb_start.setAlignment(Qt.AlignCenter) + self._sb_start.setStyleSheet('max-width:5em;') + self._lb_start = SiriusLabel( + wid, inj_prefix.substitute(propty='BucketListStart-RB')) + + self._sb_stop = SiriusSpinbox( + wid, inj_prefix.substitute(propty='BucketListStop-SP')) + self._sb_stop.setAlignment(Qt.AlignCenter) + self._sb_stop.setStyleSheet('max-width:5em;') + self._lb_stop = SiriusLabel( + wid, inj_prefix.substitute(propty='BucketListStop-RB')) + + self._sb_step = SiriusSpinbox( + wid, inj_prefix.substitute(propty='BucketListStep-SP')) + self._sb_step.setAlignment(Qt.AlignCenter) + self._sb_step.setStyleSheet('max-width:5em;') + self._lb_step = SiriusLabel( + wid, inj_prefix.substitute(propty='BucketListStep-RB')) + + self._pb_ok = QPushButton('Ok', wid) + self._pb_ok.clicked.connect(self._sb_start.send_value) + self._pb_ok.clicked.connect(wid.accept) + + self._pb_cancel = QPushButton('Cancel', wid) + self._pb_cancel.setDefault(True) + self._pb_cancel.clicked.connect(wid.reject) + + lay_pbrow = QHBoxLayout() + lay_pbrow.setContentsMargins(0, 0, 0, 0) + lay_pbrow.addWidget(self._pb_cancel) + lay_pbrow.addWidget(self._pb_ok) + + lay = QGridLayout(wid) + lay.addWidget(QLabel('Allowed Buckets:', wid), 0, 0) + lay.addWidget( + self._pb_allowed_buckets, 0, 1, 1, 2, alignment=Qt.AlignCenter + ) + lay.addWidget(QLabel('Start:', wid), 1, 0) + lay.addWidget(self._sb_start, 1, 1) + lay.addWidget(self._lb_start, 1, 2) + lay.addWidget(QLabel('Stop:', wid), 2, 0) + lay.addWidget(self._sb_stop, 2, 1) + lay.addWidget(self._lb_stop, 2, 2) + lay.addWidget(QLabel('Step:', wid), 3, 0) + lay.addWidget(self._sb_step, 3, 1) + lay.addWidget(self._lb_step, 3, 2) + lay.addLayout(lay_pbrow, 4, 0, 1, 3) + + return wid
+ + + +
+[docs] +class EventList(BaseList): + """Template for control of Events.""" + + _MIN_WIDs = { + 'ext_trig': 4, 'mode': 6.6, 'delay_type': 4.2, 'delay': 5.2, + 'delayraw': 5.2, 'description': 9.7, 'code': 3.2, 'name': 4.8, + } + _LABELS = { + 'ext_trig': 'Trig.', 'mode': 'Mode', 'description': 'Description', + 'delay_type': 'Type', 'delay': 'Delay [us]', 'delayraw': 'Raw Delay', + 'code': 'Code', 'name': 'Name'} + _ALL_PROPS = ( + 'ext_trig', 'name', 'mode', 'delay_type', 'delay', 'delayraw', + 'description', 'code') + + def __init__(self, **kwargs): + kwargs['props2search'] = set( + ('name', 'mode', 'delay_type')) + super().__init__(**kwargs) + self.setObjectName('ASApp') + + def _createObjs(self, device, prop): + sp = rb = None + if prop == 'ext_trig': + pvname = device.substitute(propty=device.propty+'ExtTrig-Cmd') + sp = QWidget(self) + but = PyDMPushButton(sp, init_channel=pvname, pressValue=1) + but.setIcon(qta.icon('fa5s.step-forward')) + but.setObjectName('but') + but.setStyleSheet( + '#but{min-width:40px; min-height:30px; icon-size:20px;}') + but.setToolTip('Run event asynchronously') + hbl = QHBoxLayout(sp) + hbl.addWidget(but) + elif prop == 'name': + sp = QLabel(device.propty, self, alignment=Qt.AlignCenter) + elif prop == 'mode': + pvname = device.substitute(propty=device.propty+'Mode-Sel') + sp = SiriusEnumComboBox(self, init_channel=pvname) + pvname = device.substitute(propty=device.propty+'Mode-Sts') + rb = SiriusLabel(self, init_channel=pvname) + elif prop == 'delay_type': + pvname = device.substitute(propty=device.propty+'DelayType-Sel') + sp = SiriusEnumComboBox(self, init_channel=pvname) + pvname = device.substitute(propty=device.propty+'DelayType-Sts') + rb = SiriusLabel(self, init_channel=pvname) + elif prop == 'delay': + pvname = device.substitute(propty=device.propty+'Delay-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + pvname = device.substitute(propty=device.propty+'Delay-RB') + rb = SiriusLabel(self, init_channel=pvname) + elif prop == 'delayraw': + pvname = device.substitute(propty=device.propty+'DelayRaw-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + pvname = device.substitute(propty=device.propty+'DelayRaw-RB') + rb = SiriusLabel(self, init_channel=pvname) + elif prop == 'description': + pvname = device.substitute(propty=device.propty+'Desc-SP') + sp = PyDMLineEdit(self, init_channel=pvname) + pvname = device.substitute(propty=device.propty+'Desc-RB') + rb = SiriusLabel(self, init_channel=pvname) + elif prop == 'code': + pvname = device.substitute(propty=device.propty+'Code-Mon') + sp = SiriusLabel(self, init_channel=pvname) + sp.setAlignment(Qt.AlignCenter) + if rb is None: + return (sp, ) + return (sp, rb)
+ + + +
+[docs] +class ClockList(BaseList): + """Template for control of Low Level Clocks.""" + + _MIN_WIDs = { + 'name': 3.8, + 'frequency': 4.8, + 'mux_div': 6, + 'mux_enbl': 4.8, + } + _LABELS = { + 'name': 'Name', + 'frequency': 'Freq. [Hz]', + 'mux_div': 'Mux Divisor', + 'mux_enbl': 'Enabled', + } + _ALL_PROPS = ('name', 'mux_enbl', 'frequency', 'mux_div') + + def __init__(self, name=None, parent=None, prefix='', + props=set(), obj_names=list(), has_search=False): + """Initialize object.""" + super().__init__( + name=name, parent=parent, prefix=prefix, props=props, + obj_names=obj_names, has_search=has_search, + props2search={'name', 'mux_enbl'}) + self.setObjectName('ASApp') + + def _createObjs(self, device, prop): + if prop == 'frequency': + pvname = device.substitute(propty=device.propty+'Freq-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + sp.limitsFromChannel = False + sp.setMinimum(1) + sp.setMaximum(2**31 - 1) + pvname = device.substitute(propty=device.propty+'Freq-RB') + rb = SiriusLabel(self, init_channel=pvname) + elif prop == 'name': + rb = QLabel(device.propty, self) + rb.setAlignment(Qt.AlignCenter) + return (rb, ) + elif prop == 'mux_enbl': + pvname = device.substitute(propty=device.propty+'MuxEnbl-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = device.substitute(propty=device.propty+'MuxEnbl-Sts') + rb = PyDMLed(self, init_channel=pvname) + elif prop == 'mux_div': + pvname = device.substitute(propty=device.propty+'MuxDiv-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + pvname = device.substitute(propty=device.propty+'MuxDiv-RB') + rb = SiriusLabel(self, init_channel=pvname) + return sp, rb
+ + + +# ###################### Event Distributors ###################### +
+[docs] +class FOUT(BaseWidget): + """Template for control of High Level Triggers.""" + + def __init__(self, parent=None, device='', prefix=''): + """Initialize object.""" + super().__init__(parent, device, prefix) + self._setupUi() + self.setObjectName('ASApp') + + def _setupUi(self): + self.my_layout = QGridLayout(self) + self.my_layout.setHorizontalSpacing(20) + self.my_layout.setVerticalSpacing(15) + + self.my_layout.addWidget(self._setupmenus(), 0, 0) + + lab = QLabel('<h1>' + self.device.device_name + '</h1>', self) + self.my_layout.addWidget(lab, 1, 0) + self.my_layout.setAlignment(lab, Qt.AlignCenter) + + stattab = QTabWidget(self) + stattab.setObjectName('ASTab') + stattab.setStyleSheet(""" + QTabWidget::pane{ + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }""") + self.status_wid = self._setup_status_wid() + stattab.addTab(self.status_wid, 'Status') + self.info_wid = self._setup_info_wid() + stattab.addTab(self.info_wid, 'Fw && IOC') + self.my_layout.addWidget(stattab, 2, 0) + stattab.setSizePolicy(QSzPol.Preferred, QSzPol.Maximum) + + def _setupmenus(self): + main_menu = QMenuBar() + main_menu.setNativeMenuBar(False) + + icon = qta.icon('mdi.timer', color=get_appropriate_color('AS')) + + try: + mapping = LLTimeSearch.get_fout2trigsrc_mapping() + downs = mapping[self.device.device_name] + downs = sorted([(ou, dwn) for ou, dwn in downs.items()]) + menu = main_menu.addMenu('&Downlinks') + except KeyError: + downs = list() + + for out, dwn in downs: + dev, down = dwn.dev, dwn.device_name + devt = EVR if dev == 'EVR' else EVE if dev == 'EVE' else AFC + action = menu.addAction(out + ' --> ' + down) + Win = create_window_from_widget(devt, title=down, icon=icon) + connect_window(action, Win, None, device=down, prefix=self.prefix) + + try: + link = list(LLTimeSearch.In2OutMap[self.device.dev])[0] + evg = LLTimeSearch.get_evg_channel( + self.device.device_name.substitute(propty=link)) + except KeyError: + return main_menu + + menu = main_menu.addMenu('&Uplink') + action = menu.addAction(evg) + Win = create_window_from_widget(EVG, title=evg.device_name, icon=icon) + connect_window( + action, Win, None, device=evg.device_name, prefix=self.prefix) + + return main_menu + + def _setup_status_wid(self): + status_wid = QWidget(self) + status_lay = QGridLayout(status_wid) + status_lay.setHorizontalSpacing(30) + status_lay.setVerticalSpacing(30) + + pvname = self.get_pvname(propty='DevEnbl-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = self.get_pvname(propty='DevEnbl-Sts') + rb = PyDMLed(self, init_channel=pvname) + gb = self._create_small_group( + 'Enabled', status_wid, (sp, rb), align_ver=False) + status_lay.addWidget(gb, 0, 0) + + lb = QLabel("<b>Alive</b>") + rb = SiriusLabel( + self, init_channel=self.get_pvname(propty='Alive-Mon')) + gb = self._create_small_group('', status_wid, (lb, rb)) + status_lay.addWidget(gb, 0, 1) + + lb = QLabel("<b>Network</b>") + pvname = self.get_pvname(propty='Network-Mon') + rb = SiriusLedAlert(self, init_channel=pvname) + on_c, off_c = rb.onColor, rb.offColor + rb.offColor = on_c + rb.onColor = off_c + gb = self._create_small_group('', status_wid, (lb, rb)) + status_lay.addWidget(gb, 0, 2) + + lb = QLabel("<b>UP Link</b>") + pvname = self.get_pvname(propty='LinkStatus-Mon') + rb = SiriusLedAlert(self, init_channel=pvname) + on_c, off_c = rb.onColor, rb.offColor + rb.offColor = on_c + rb.onColor = off_c + gb = self._create_small_group('', status_wid, (lb, rb)) + status_lay.addWidget(gb, 0, 3) + + wids = list() + try: + mapping = LLTimeSearch.get_fout2trigsrc_mapping() + conn = mapping[self.device.device_name] + conn = {int(dev[-1]) for dev in conn} + except KeyError: + conn = set() + for i in range(8): + pvname = self.get_pvname(propty='DownlinkStatus-Mon') + if i in conn: + rb = SiriusLedAlert(self, init_channel=pvname, bit=i) + else: + rb = SiriusLedState(self, init_channel=pvname, bit=i) + rb.onColor = rb.DarkGreen + rb.offColor = rb.LightGreen + wids.append(rb) + but = QPushButton(self) + but.setToolTip('Open Down Connections Details') + but.setIcon(qta.icon('fa5s.ellipsis-v')) + but.setObjectName('but') + but.setDefault(False) + but.setAutoDefault(False) + but.setStyleSheet( + '#but{min-width:15px; max-width:15px;\ + min-height:25px; max-height:25px;\ + icon-size:20px;}') + but.clicked.connect(self._open_downconn_dialog) + wids.append(but) + pvname = self.get_pvname(propty='RxLockedLtcRst-Cmd') + pbt = SiriusPushButton( + self, init_channel=pvname, pressValue=1, label='', + icon=qta.icon('fa5s.sync')) + wids.append(pbt) + gb = self._create_small_group( + 'Down Connection', status_wid, wids, align_ver=False) + gb.layout().setContentsMargins(6, 6, 0, 6) + status_lay.addWidget(gb, 1, 0, 1, 4) + + return status_wid + + def _setup_info_wid(self): + info_wid = QWidget(self) + info_lay = QGridLayout(info_wid) + info_lay.setHorizontalSpacing(30) + + lb = QLabel("<b>IP</b>") + pvname = self.get_pvname(propty='IPAddr-Mon') + addr = SiriusLabel(self, init_channel=pvname) + pvname = self.get_pvname(propty='IPPort-Mon') + port = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, addr, port)) + info_lay.addWidget(gb, 0, 0, alignment=Qt.AlignTop) + + lb = QLabel("<b>DevFun</b>") + pvname = self.get_pvname(propty='DevFun-Sts') + rb = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, rb)) + info_lay.addWidget(gb, 0, 1, alignment=Qt.AlignTop) + + lb = QLabel("<b>Device Status</b>") + pvname = self.get_pvname(propty='DevStatus-Mon') + rb = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, rb)) + info_lay.addWidget(gb, 0, 2, alignment=Qt.AlignTop) + + lb = QLabel("<b>Download</b>") + pvname = self.get_pvname('Download-Cmd') + sp = SiriusPushButton( + self, label='', icon=qta.icon('fa5s.download'), + pressValue=1, releaseValue=0, init_channel=pvname) # ? + gb = self._create_small_group('', info_wid, (lb, sp)) + info_lay.addWidget(gb, 1, 0, alignment=Qt.AlignTop) + + lb = QLabel("<b>Save Settings</b>") + pvname = self.get_pvname('Save-Cmd') + sp = PyDMPushButton( + self, label='Save', init_channel=pvname, pressValue=1) # ? + gb = self._create_small_group('', info_wid, (lb, sp)) + info_lay.addWidget(gb, 1, 1, alignment=Qt.AlignTop) + + lb = QLabel("<b>Fw.Version</b>") + pvname = self.get_pvname(propty='FwVersion-Cte.SVAL') + frmv = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, frmv)) + gb.layout().setSpacing(3) + info_lay.addWidget(gb, 1, 2, alignment=Qt.AlignTop) + + return info_wid + + def _create_downconn_dialog(self): + dialog = SiriusDialog() + dialog.setObjectName('ASApp') + dialog.setWindowTitle(self.device + ' Down Connections') + dialog.setWindowIcon(self.windowIcon()) + + lay = QVBoxLayout(dialog) + obj_names = [ + self.device.substitute(idx=self.device.idx+'_'+str(i)) + for i in range(8)] + downconn_wid = EVGFOUTOUTList( + name='Down Connections', parent=self, prefix=self.prefix, + obj_names=obj_names) + lay.addWidget(downconn_wid) + return dialog + + def _open_downconn_dialog(self): + if not hasattr(self, 'downconn_wind'): + self.downconn_wind = self._create_downconn_dialog() + self.downconn_wind.show() + else: + self.downconn_wind.showNormal()
+ + + +# ###################### Event Receivers ###################### +
+[docs] +class AFC(BaseWidget): + """Template for control of High Level Triggers.""" + + def __init__(self, parent=None, device='', prefix=''): + """Initialize object.""" + super().__init__(parent, device, prefix) + self._setupUi() + self.setObjectName('ASApp') + + def _setupUi(self): + self.my_layout = QGridLayout(self) + self.my_layout.setHorizontalSpacing(20) + self.my_layout.setVerticalSpacing(20) + + # menu + self.my_layout.addWidget(self._setupmenus(), 0, 0) + + # title + lab = QLabel('<h1>' + self.device.device_name + '</h1>', self) + self.my_layout.addWidget(lab, 1, 0) + self.my_layout.setAlignment(lab, Qt.AlignCenter) + + # status + stattab = QTabWidget(self) + stattab.setObjectName('ASTab') + stattab.setStyleSheet(""" + QTabWidget::pane{ + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }""") + self.status_wid = self._setup_status_wid() + stattab.addTab(self.status_wid, 'Status') + self.info_wid = self._setup_info_wid() + stattab.addTab(self.info_wid, 'Fw && IOC') + self.my_layout.addWidget(stattab, 2, 0) + stattab.setSizePolicy(QSzPol.Preferred, QSzPol.Maximum) + + # frequency feedback + self.freqff_wid = QGroupBox('Frequency feedback', self) + freqtab = QTabWidget(self) + freqtab.setObjectName('ASTab') + afcfrefb_wid = self._setup_freqfb_wid('AFC') + freqtab.addTab(afcfrefb_wid, 'AFC') + rtmfreqfb_wid = self._setup_freqfb_wid('RTM') + freqtab.addTab(rtmfreqfb_wid, 'RTM') + freqff_lay = QVBoxLayout(self.freqff_wid) + freqff_lay.setContentsMargins(0, 6, 0, 0) + freqff_lay.addWidget(freqtab) + self.my_layout.addWidget(self.freqff_wid, 3, 0) + self.freqff_wid.setSizePolicy(QSzPol.Preferred, QSzPol.Maximum) + + # output tabs + outtab = QTabWidget(self) + outtab.setObjectName('ASTab') + self.my_layout.addWidget(outtab, 4, 0) + + props = { + 'name', 'state', 'event', 'source', 'width', 'polarity', 'pulses', + 'delay', 'evtcnt', 'evtcntrst', 'hl_trigger'} + set_ = LLTimeSearch.In2OutMap['AMCFPGAEVR']['SFP8'] + + obj_names = sorted([out for out in set_ if out.startswith('FMC')]) + obj_names = [self.device.substitute(propty_name=o) for o in obj_names] + self.fmcs_wid = AFCOUTList( + name='', parent=self, props=props, + prefix=self.prefix, obj_names=obj_names) + self.fmcs_wid.setObjectName('fmcs_wid') + outtab.addTab(self.fmcs_wid, 'FMC Outputs') + + obj_names = sorted([out for out in set_ if out.startswith('CRT')]) + obj_names = [self.device.substitute(propty_name=o) for o in obj_names] + self.crts_wid = AFCOUTList( + name='', parent=self, props=props, + prefix=self.prefix, obj_names=obj_names) + self.crts_wid.setObjectName('crts_wid') + outtab.addTab(self.crts_wid, 'CRT Outputs') + + def _setupmenus(self): + main_menu = QMenuBar() + main_menu.setNativeMenuBar(False) + + try: + fout = LLTimeSearch.get_fout_channel( + self.device.substitute(propty='CRT0')) + except KeyError: + return main_menu + + menu = main_menu.addMenu('&Uplink') + action = menu.addAction(fout) + icon = qta.icon('mdi.timer', color=get_appropriate_color('AS')) + Win = create_window_from_widget( + FOUT, title=fout.device_name, icon=icon) + connect_window( + action, Win, None, device=fout.device_name, prefix=self.prefix) + return main_menu + + def _setup_status_wid(self): + status_wid = QWidget(self) + status_lay = QGridLayout(status_wid) + status_lay.setHorizontalSpacing(30) + + pvname = self.get_pvname('DevEnbl-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = self.get_pvname('DevEnbl-Sts') + rb = PyDMLed(self, init_channel=pvname) + gb = self._create_small_group( + 'Enabled', status_wid, (sp, rb), align_ver=False) + status_lay.addWidget(gb, 0, 0) + + lb = QLabel("<b>Alive</b>") + pvname = self.get_pvname('Alive-Mon') + rb = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', status_wid, (lb, rb)) + status_lay.addWidget(gb, 0, 1) + + for i, locktype in enumerate(['', 'Ltc']): + lb = QLabel( + '<b>Locked' + (' Latch' if locktype else '') + '</b>') + widlbl = QWidget() + hbxlbl = QHBoxLayout(widlbl) + hbxlbl.setSpacing(10) + hbxlbl.setContentsMargins(0, 0, 0, 0) + hbxlbl.setAlignment(Qt.AlignLeft) + widctl = QWidget() + hbxctl = QHBoxLayout(widctl) + hbxctl.setSpacing(1) + hbxctl.setContentsMargins(0, 0, 0, 0) + for dev in ['AFC', 'RTM', 'GT0']: + pvname = self.get_pvname(f'{dev}ClkLocked{locktype}-Mon') + rb = SiriusLedAlert(self, init_channel=pvname) + rb.offColor, rb.onColor = rb.onColor, rb.offColor + hbxctl.addWidget(rb) + hbxlbl.addWidget(QLabel(dev, self)) + + if locktype == 'Ltc': + rst = SiriusPushButton( + self, label='', icon=qta.icon('fa5s.sync'), pressValue=1, + init_channel=self.get_pvname('ClkLockedLtcRst-Cmd')) + hbxctl.addWidget(rst) + hbxlbl.addWidget(QLabel(' ', self)) + + gb = self._create_small_group('', status_wid, (lb, widctl, widlbl)) + status_lay.addWidget(gb, 0, 2+i) + + lb = QLabel("<b>UP Link</b>") + pvname = self.get_pvname('LinkStatus-Mon') + rb = SiriusLedAlert(self, init_channel=pvname) + rb.offColor, rb.onColor = rb.onColor, rb.offColor + gb = self._create_small_group('', status_wid, (lb, rb)) + status_lay.addWidget(gb, 0, 4) + + return status_wid + + def _setup_info_wid(self): + info_wid = QWidget(self) + info_lay = QGridLayout(info_wid) + info_lay.setHorizontalSpacing(30) + + lb = QLabel("<b>FPGA Clk</b>") + pvname = self.get_pvname('FPGAClk-Cte') + mon = SiriusLabel(self, init_channel=pvname) + mon.showUnits = True + mon.precisionFromPV = False + mon.precision = 3 + pvname = self.get_pvname('FPGAClk-Cte', field='DOL') + dol = PyDMLineEdit(self, init_channel=pvname) + omsl = SiriusPushButton( + self, label='', icon=qta.icon('fa5s.sync'), pressValue=1, + init_channel=self.get_pvname('FPGAClk-Cte', field='OMSL')) + proc = QWidget() + hlproc = QHBoxLayout(proc) + hlproc.setContentsMargins(0, 0, 0, 0) + hlproc.addWidget(dol) + hlproc.addWidget(omsl) + gb = self._create_small_group('', info_wid, (lb, mon, proc)) + info_lay.addWidget(gb, 0, 0) + + return info_wid + + def _setup_freqfb_wid(self, subdev): + gbox = QWidget(self) + + # Controls + ld_phskp = QLabel('<b>Phase KP</b>', self, alignment=Qt.AlignCenter) + sb_phskp = SiriusSpinbox( + self, self.get_pvname(propty=subdev+'PhasePropGain-SP')) + sb_phskp.limitsFromChannel = False + sb_phskp.setMinimum(-2**31) + sb_phskp.setMaximum(2**31-1) + lb_phskp = SiriusLabel( + self, self.get_pvname(propty=subdev+'PhasePropGain-RB')) + + ld_phski = QLabel('<b>Phase KI</b>', self, alignment=Qt.AlignCenter) + sb_phski = SiriusSpinbox( + self, self.get_pvname(propty=subdev+'PhaseIntgGain-SP')) + sb_phski.limitsFromChannel = False + sb_phski.setMinimum(-2**31) + sb_phski.setMaximum(2**31-1) + lb_phski = SiriusLabel( + self, self.get_pvname(propty=subdev+'PhaseIntgGain-RB')) + + ld_frqkp = QLabel('<b>Freq. KP</b>', self, alignment=Qt.AlignCenter) + sb_frqkp = SiriusSpinbox( + self, self.get_pvname(propty=subdev+'FreqPropGain-SP')) + sb_frqkp.limitsFromChannel = False + sb_frqkp.setMinimum(-2**31) + sb_frqkp.setMaximum(2**31-1) + lb_frqkp = SiriusLabel( + self, self.get_pvname(propty=subdev+'FreqPropGain-RB')) + + ld_frqki = QLabel('<b>Freq. KI</b>', self, alignment=Qt.AlignCenter) + sb_frqki = SiriusSpinbox( + self, self.get_pvname(propty=subdev+'FreqIntgGain-SP')) + sb_frqki.limitsFromChannel = False + sb_frqki.setMinimum(-2**31) + sb_frqki.setMaximum(2**31-1) + lb_frqki = SiriusLabel( + self, self.get_pvname(propty=subdev+'FreqIntgGain-RB')) + + ld_phnvg = QLabel('<b>Phs.Navg</b>', self, alignment=Qt.AlignCenter) + sb_phnvg = SiriusSpinbox( + self, self.get_pvname(propty=subdev+'PhaseNavg-SP')) + sb_phnvg.limitsFromChannel = False + sb_phnvg.setMinimum(-2**31) + sb_phnvg.setMaximum(2**31-1) + lb_phnvg = SiriusLabel( + self, self.get_pvname(propty=subdev+'PhaseNavg-RB')) + + ld_phdiv = QLabel( + '<b>Phs.Div 2<sup>n</sup></b>', self, alignment=Qt.AlignCenter) + sb_phdiv = SiriusSpinbox( + self, self.get_pvname(propty=subdev+'PhaseDiv-SP')) + sb_phdiv.limitsFromChannel = False + sb_phdiv.setMinimum(-2**31) + sb_phdiv.setMaximum(2**31-1) + lb_phdiv = SiriusLabel( + self, self.get_pvname(propty=subdev+'PhaseDiv-RB')) + + ld_rfrlo = QLabel('<b>RFreqLo</b>', self, alignment=Qt.AlignCenter) + lb_rfrlo = SiriusLabel( + self, self.get_pvname(propty=subdev+'RFreqLo-Mon')) + lb_rfrlo.displayFormat = SiriusLabel.DisplayFormat.Hex + + ld_rfrhi = QLabel('<b>RFreqHi</b>', self, alignment=Qt.AlignCenter) + lb_rfrhi = SiriusLabel( + self, self.get_pvname(propty=subdev+'RFreqHi-Mon')) + lb_rfrhi.displayFormat = SiriusLabel.DisplayFormat.Hex + + ld_n1 = QLabel('<b>N1</b>', self, alignment=Qt.AlignCenter) + ld_n1.setObjectName('n1') + lb_n1 = SiriusLabel( + self, self.get_pvname(propty=subdev+'N1-Mon')) + lb_n1.setObjectName('n1') + lb_n1.displayFormat = SiriusLabel.DisplayFormat.Hex + + ld_hsdiv = QLabel('<b>HSDiv</b>', self, alignment=Qt.AlignCenter) + lb_hsdiv = SiriusLabel( + self, self.get_pvname(propty=subdev+'HSDiv-Mon')) + + # Equation + ld_fpgaclk = QLabel('(FPGA Clk) x ', self, alignment=Qt.AlignRight) + ld_fpgaclk.setObjectName('fpgaclk') + ld_fraqdiv = QLabel('------ = ', self, alignment=Qt.AlignCenter) + lb_freqmult = PyDMLineEdit( + self, self.get_pvname(propty=subdev+'FreqMult-Cte')) + lb_freqmult.setObjectName('frac') + lb_freqdiv = PyDMLineEdit( + self, self.get_pvname(propty=subdev+'FreqDiv-Cte')) + lb_freqdiv.setObjectName('frac') + ld_freqdsc = QLabel('<b>Frequency</b>', self, alignment=Qt.AlignCenter) + ld_freqdsc.setObjectName('freq') + ld_freqsp = PyDMLineEdit( + self, self.get_pvname(propty=subdev+'Freq-SP')) + ld_freqsp.setObjectName('freq') + ld_freqrb = SiriusLabel( + self, self.get_pvname(propty=subdev+'Freq-RB'), keep_unit=True) + ld_freqrb.setObjectName('freq') + ld_freqrb.showUnits = True + pb_clkrst = SiriusPushButton( + self, init_channel=self.get_pvname(propty='RTMClkRst-Cmd'), + pressValue=1, label='', icon=qta.icon('fa5s.sync')) + pb_clkrst.setDefault(False) + pb_clkrst.setAutoDefault(False) + pb_clkrst.setObjectName('pb') + pb_clkrst.setStyleSheet( + '#pb{min-width:25px; max-width:25px;\ + min-height:25px; max-height:25px;\ + icon-size:20px;}') + + lay_sett1 = QGridLayout() + lay_sett1.setHorizontalSpacing(30) + lay_sett1.setVerticalSpacing(6) + lay_sett1.addWidget(ld_phskp, 0, 0) + lay_sett1.addWidget(sb_phskp, 1, 0, alignment=Qt.AlignCenter) + lay_sett1.addWidget(lb_phskp, 2, 0) + lay_sett1.addWidget(ld_phski, 0, 1) + lay_sett1.addWidget(sb_phski, 1, 1, alignment=Qt.AlignCenter) + lay_sett1.addWidget(lb_phski, 2, 1) + lay_sett1.addWidget(ld_frqkp, 0, 2) + lay_sett1.addWidget(sb_frqkp, 1, 2, alignment=Qt.AlignCenter) + lay_sett1.addWidget(lb_frqkp, 2, 2) + lay_sett1.addWidget(ld_frqki, 0, 3) + lay_sett1.addWidget(sb_frqki, 1, 3, alignment=Qt.AlignCenter) + lay_sett1.addWidget(lb_frqki, 2, 3) + lay_sett1.addWidget(ld_phnvg, 0, 4) + lay_sett1.addWidget(sb_phnvg, 1, 4, alignment=Qt.AlignCenter) + lay_sett1.addWidget(lb_phnvg, 2, 4) + lay_sett1.addWidget(ld_phdiv, 0, 5) + lay_sett1.addWidget(sb_phdiv, 1, 5, alignment=Qt.AlignCenter) + lay_sett1.addWidget(lb_phdiv, 2, 5) + + lay_sett2 = QGridLayout() + lay_sett2.setHorizontalSpacing(30) + lay_sett2.addWidget(ld_rfrlo, 0, 0) + lay_sett2.addWidget(lb_rfrlo, 1, 0) + lay_sett2.addWidget(ld_rfrhi, 0, 1) + lay_sett2.addWidget(lb_rfrhi, 1, 1) + lay_sett2.addWidget(ld_n1, 0, 2) + lay_sett2.addWidget(lb_n1, 1, 2) + lay_sett2.addWidget(ld_hsdiv, 0, 3) + lay_sett2.addWidget(lb_hsdiv, 1, 3) + + lay_eq = QGridLayout() + lay_eq.setHorizontalSpacing(12) + lay_eq.setVerticalSpacing(6) + lay_eq.addWidget(ld_fpgaclk, 1, 0) + lay_eq.addWidget(lb_freqmult, 0, 1) + lay_eq.addWidget(ld_fraqdiv, 1, 1) + lay_eq.addWidget(lb_freqdiv, 2, 1) + lay_eq.addWidget(ld_freqdsc, 0, 2) + lay_eq.addWidget(ld_freqsp, 1, 2) + lay_eq.addWidget(ld_freqrb, 2, 2) + lay_eq.addWidget(pb_clkrst, 1, 3) + + lay = QGridLayout(gbox) + lay.setHorizontalSpacing(30) + lay.setVerticalSpacing(15) + lay.addLayout(lay_sett1, 0, 0, 1, 2, alignment=Qt.AlignLeft) + lay.addLayout(lay_sett2, 1, 0, alignment=Qt.AlignLeft) + lay.addLayout(lay_eq, 1, 1, alignment=Qt.AlignRight) + + gbox.setStyleSheet(""" + .SiriusSpinbox{max-width: 4.5em;} + QComboBox, #n1 {max-width: 2.7em;} + #frac {max-width: 1.5em;} + #freq, #fpgaclk {max-width: 6.5em;} + SiriusLabel{qproperty-alignment: AlignCenter;} + """) + + return gbox
+ + + +class _EVR_EVE(BaseWidget): + """Template for control of High Level Triggers.""" + + def __init__(self, parent=None, device='', prefix=''): + """Initialize object.""" + super().__init__(parent, device, prefix) + self.device_type = _PVName(device).dev + self.setupUi() + self.setObjectName('ASApp') + + def setupUi(self): + self.my_layout = QGridLayout(self) + self.my_layout.setHorizontalSpacing(20) + self.my_layout.setVerticalSpacing(20) + + self.my_layout.addWidget(self.setupmenus(), 0, 0) + + lab = QLabel('<h1>' + self.device.device_name + '</h1>', self) + self.my_layout.addWidget(lab, 1, 0) + self.my_layout.setAlignment(lab, Qt.AlignCenter) + + # status + stattab = QTabWidget(self) + stattab.setObjectName('ASTab') + stattab.setStyleSheet(""" + QTabWidget::pane{ + border-left: 2px solid gray; + border-bottom: 2px solid gray; + border-right: 2px solid gray; + }""") + self.status_wid = self._setup_status_wid() + stattab.addTab(self.status_wid, 'Status') + self.info_wid = self._setup_info_wid() + stattab.addTab(self.info_wid, 'Fw && IOC') + self.my_layout.addWidget(stattab, 2, 0) + stattab.setSizePolicy(QSzPol.Preferred, QSzPol.Maximum) + + # outputs + splitter = QSplitter(Qt.Horizontal) + splitter.setContentsMargins(0, 0, 0, 0) + splitter.setHandleWidth(20) + self.my_layout.addWidget(splitter, 3, 0) + + props = { + 'name', 'state', 'event', 'widthraw', 'polarity', 'pulses', + 'delayraw', 'evtcnt', 'evtcntrst', 'hl_trigger'} + obj_names = ['OTP{0:02d}'.format(i) for i in range(24)] + obj_names = [self.device.substitute(propty=o) for o in obj_names] + self.otps_wid = EVREVEOTPList( + name='Internal Trigger (OTP)', parent=self, prefix=self.prefix, + props=props, obj_names=obj_names) + self.otps_wid.setObjectName('otps_wid') + splitter.addWidget(self.otps_wid) + + props = { + 'name', 'source', 'trigger', 'rf_delayraw', 'rf_delay_type', + 'fine_delayraw', 'hl_trigger'} + obj_names = ['OUT{0:d}'.format(i) for i in range(8)] + obj_names = [self.device.substitute(propty=o) for o in obj_names] + self.outs_wid = EVREVEOUTList( + name='OUT', parent=self, prefix=self.prefix, + props=props, obj_names=obj_names) + self.outs_wid.setObjectName('outs_wid') + splitter.addWidget(self.outs_wid) + + splitter.setSizePolicy(QSzPol.Preferred, QSzPol.MinimumExpanding) + + def setupmenus(self): + main_menu = QMenuBar() + main_menu.setNativeMenuBar(False) + + try: + fout = LLTimeSearch.get_fout_channel( + self.device.substitute(propty='OTP0')) + except KeyError: + return main_menu + + menu = main_menu.addMenu('&Uplink') + action = menu.addAction(fout) + icon = qta.icon('mdi.timer', color=get_appropriate_color('AS')) + Win = create_window_from_widget( + FOUT, title=fout.device_name, icon=icon) + connect_window( + action, Win, None, device=fout.device_name, prefix=self.prefix) + return main_menu + + def _setup_status_wid(self): + status_wid = QWidget(self) + status_lay = QGridLayout(status_wid) + status_lay.setVerticalSpacing(30) + + pvname = self.get_pvname('DevEnbl-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = self.get_pvname('DevEnbl-Sts') + rb = PyDMLed(self, init_channel=pvname) + gb = self._create_small_group( + 'Enabled', status_wid, (sp, rb), align_ver=False) + status_lay.addWidget(gb, 0, 0) + + lb = QLabel("<b>Alive</b>") + pvname = self.get_pvname('Alive-Mon') + rb = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', status_wid, (lb, rb)) + status_lay.addWidget(gb, 0, 1) + + lb = QLabel("<b>Network</b>") + pvname = self.get_pvname('Network-Mon') + rb = SiriusLedAlert(self, init_channel=pvname) + rb.offColor, rb.onColor = rb.onColor, rb.offColor + gb = self._create_small_group('', status_wid, (lb, rb)) + status_lay.addWidget(gb, 0, 2) + + lb = QLabel("<b>UP Link</b>") + pvname = self.get_pvname('LinkStatus-Mon') + rb = SiriusLedAlert(self, init_channel=pvname) + on_c, off_c = rb.onColor, rb.offColor + rb.offColor = on_c + rb.onColor = off_c + gb = self._create_small_group('', status_wid, (lb, rb)) + status_lay.addWidget(gb, 0, 3) + + lb = QLabel("<b>Interlock Status</b>") + pvname = self.get_pvname('IntlkStatus-Mon') + rb = SiriusLedAlert(self, init_channel=pvname) + gb = self._create_small_group('', status_wid, (lb, rb)) + status_lay.addWidget(gb, 0, 4) + + lb = QLabel("<b>Interlock Enabled</b>") + pvname = self.get_pvname('IntlkEnbl-Mon') + rb = SiriusLedState(self, init_channel=pvname) + gb = self._create_small_group('', status_wid, (lb, rb)) + status_lay.addWidget(gb, 0, 5) + + if self.device_type == 'EVR': + wids = list() + try: + conn = LLTimeSearch.get_connections_from_evg() + conn = { + dev.propty for dev in conn + if dev.device_name == self.device.device_name} + conn = {int(p[-1]) for p in conn if p.startswith('OUT')} + except KeyError: + conn = set() + for i in range(8): + pvname = self.get_pvname('Los-Mon') + if i in conn: + rb = SiriusLedAlert(self, init_channel=pvname, bit=i) + else: + rb = SiriusLedState(self, init_channel=pvname, bit=i) + rb.onColor = rb.DarkGreen + rb.offColor = rb.LightGreen + wids.append(rb) + gb = self._create_small_group( + 'Down Connection', status_wid, wids, align_ver=False) + else: + sp = SiriusEnumComboBox( + self, init_channel=self.get_pvname('RFOut-Sel')) + rb = SiriusLabel(self, init_channel=self.get_pvname('RFOut-Sts')) + gb = self._create_small_group('RF Output', status_wid, (sp, rb)) + status_lay.addWidget(gb, 0, 6) + + but = QPushButton(self) + but.setToolTip('Open Timestamp, Log and\nDigital Input Controls') + but.setIcon(qta.icon('fa5s.ellipsis-v')) + but.setDefault(False) + but.setAutoDefault(False) + but.setObjectName('but') + but.setStyleSheet( + '#but{min-width:25px; max-width:25px;\ + min-height:25px; max-height:25px;\ + icon-size:20px;}') + but.clicked.connect(self._open_detail_dialog) + status_lay.addWidget(but, 0, 7, alignment=Qt.AlignTop) + + return status_wid + + def _setup_info_wid(self): + info_wid = QWidget(self) + info_lay = QGridLayout(info_wid) + info_lay.setHorizontalSpacing(15) + + lb = QLabel("<b>IP</b>") + pvname = self.get_pvname(propty='IPAddr-Mon') + addr = SiriusLabel(self, init_channel=pvname) + pvname = self.get_pvname(propty='IPPort-Mon') + port = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, addr, port)) + info_lay.addWidget(gb, 0, 0, alignment=Qt.AlignTop) + + lb = QLabel("<b>DevFun</b>") + pvname = self.get_pvname(propty='DevFun-Sel') + sp = SiriusEnumComboBox(self, init_channel=pvname) + pvname = self.get_pvname(propty='DevFun-Sts') + rb = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, sp, rb)) + info_lay.addWidget(gb, 0, 1, alignment=Qt.AlignTop) + + lb = QLabel("<b>Device Status</b>") + pvname = self.get_pvname(propty='DevStatus-Mon') + rb = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, rb)) + info_lay.addWidget(gb, 0, 2, alignment=Qt.AlignTop) + + lb = QLabel("<b>Download</b>") + pvname = self.get_pvname('Download-Cmd') + sp = SiriusPushButton( + self, label='', icon=qta.icon('fa5s.download'), + pressValue=1, releaseValue=0, init_channel=pvname) # ? + gb = self._create_small_group('', info_wid, (lb, sp)) + info_lay.addWidget(gb, 0, 3, alignment=Qt.AlignTop) + + lb = QLabel("<b>Save Settings</b>") + pvname = self.get_pvname('Save-Cmd') + sp = PyDMPushButton( + self, label='Save', init_channel=pvname, pressValue=1) + gb = self._create_small_group('', info_wid, (lb, sp)) + info_lay.addWidget(gb, 0, 4, alignment=Qt.AlignTop) + + # if self.device_type == 'EVE': + lb = QLabel("<b>Clk Mode</b>") + pvname = self.get_pvname(propty='ClkMode-RB') + rb = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, rb)) + info_lay.addWidget(gb, 0, 5, alignment=Qt.AlignTop) + + lb = QLabel("<b>FPGA Clk</b>") + pvname = self.get_pvname('FPGAClk-Cte') + mon = SiriusLabel(self, init_channel=pvname) + mon.showUnits = True + pvname = self.get_pvname('FPGAClk-Cte', field='INP') + inp = PyDMLineEdit(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, mon, inp)) + info_lay.addWidget(gb, 0, 6, alignment=Qt.AlignTop) + + lb = QLabel("<b>Fw.Version</b>") + pvname = self.get_pvname(propty='FwVersion-Cte.SVAL') + frmv = SiriusLabel(self, init_channel=pvname) + gb = self._create_small_group('', info_wid, (lb, frmv)) + gb.layout().setSpacing(3) + info_lay.addWidget(gb, 0, 7, alignment=Qt.AlignTop) + + return info_wid + + def _create_detail_dialog(self): + dialog = SiriusDialog() + dialog.setObjectName('ASApp') + dialog.setWindowTitle(self.device + ' Timestamp and Log Control') + dialog.setWindowIcon(self.windowIcon()) + + # Timestamp + gbox_tim = QGroupBox('Timestamp', self) + + ld_timsrc = QLabel('<b>Source</b>', self) + self.ec_timsrc = SiriusEnumComboBox( + self, self.get_pvname('TimestampSrc-Sel')) + self.lb_timsrc = SiriusLabel(self, self.get_pvname('TimestampSrc-Sts')) + gb_timsrc = self._create_small_group( + '', gbox_tim, (ld_timsrc, self.ec_timsrc, self.lb_timsrc)) + + fr_tim = QFrame() + fr_tim.setStyleSheet('.QFrame{border: 1px solid gray;}') + ld_timutc = QLabel('<b>UTC</b>', self) + self.lb_timutc = SiriusLabel(self, self.get_pvname('UTC-RB')) + self.lb_timutc.showUnits = True + ld_timsub = QLabel('<b>Subsec</b>') + self.lb_timsub = SiriusLabel(self, self.get_pvname('SubSecond-Mon')) + self.lb_timsub.showUnits = True + lay_tim = QGridLayout(fr_tim) + lay_tim.setAlignment(Qt.AlignVCenter) + lay_tim.setContentsMargins(0, 0, 0, 0) + lay_tim.addWidget(ld_timutc, 0, 0, alignment=Qt.AlignCenter) + lay_tim.addWidget(self.lb_timutc, 1, 0, alignment=Qt.AlignCenter) + lay_tim.addWidget(ld_timsub, 0, 1, alignment=Qt.AlignCenter) + lay_tim.addWidget(self.lb_timsub, 1, 1, alignment=Qt.AlignCenter) + + lay_tstamp = QGridLayout(gbox_tim) + lay_tstamp.addWidget(gb_timsrc, 0, 0) + lay_tstamp.addWidget(fr_tim, 0, 1) + + # Timestamp Log + gbox_log = QGroupBox('Timestamp Log', self) + + ld_logstp = QLabel('<b>Stop Log</b>', self) + self.sb_logstp = PyDMStateButton(self, self.get_pvname('stoplog')) + self.led_logstp = SiriusLedState(self, self.get_pvname('STOPLOGRBV')) + gb_logstp = self._create_small_group( + '', gbox_log, (ld_logstp, self.sb_logstp, self.led_logstp)) + + ld_logrst = QLabel('<b>Reset Log</b>', self) + self.sb_logrst = PyDMStateButton(self, self.get_pvname('rstlog')) + self.led_logrst = SiriusLedState(self, self.get_pvname('RSTLOGRBV')) + gb_logrst = self._create_small_group( + '', gbox_log, (ld_logrst, self.sb_logrst, self.led_logrst)) + + ld_logpul = QLabel('<b>Pull</b>', self) + self.bt_logpul = SiriusPushButton( + parent=self, init_channel=self.get_pvname('pull'), + pressValue=1, releaseValue=0) # ? + self.bt_logpul.setIcon(qta.icon('fa5s.arrow-down')) + self.bt_logpul.setObjectName('bt') + self.bt_logpul.setStyleSheet( + '#bt{min-width:25px; max-width:25px; icon-size:20px;}') + gb_logpul = self._create_small_group( + '', gbox_log, (ld_logpul, self.bt_logpul)) + + ld_logcnt = QLabel('<b>Log Count</b>', self, alignment=Qt.AlignCenter) + self.lb_logcnt = SiriusLabel(self, self.get_pvname('LOGCOUNT')) + self.lb_logcnt.showUnits = True + self.lb_logcnt.setAlignment(Qt.AlignCenter) + ld_logful = QLabel('Full', self) + self.led_logful = SiriusLedState(self, self.get_pvname('FULL')) + ld_logemp = QLabel('Empty', self) + self.led_logemp = SiriusLedState(self, self.get_pvname('EMPTY')) + fr_logcnt = QFrame(gbox_log) + fr_logcnt.setStyleSheet('.QFrame{border: 1px solid gray;}') + lay_logcnt = QGridLayout(fr_logcnt) + lay_logcnt.setAlignment(Qt.AlignCenter) + lay_logcnt.setContentsMargins(0, 0, 0, 0) + lay_logcnt.addWidget(ld_logcnt, 0, 0, 1, 4) + lay_logcnt.addWidget(self.lb_logcnt, 1, 0, 1, 4) + lay_logcnt.addWidget(ld_logful, 2, 0, alignment=Qt.AlignRight) + lay_logcnt.addWidget(self.led_logful, 2, 1, alignment=Qt.AlignTop) + lay_logcnt.addWidget(ld_logemp, 2, 2, alignment=Qt.AlignRight) + lay_logcnt.addWidget(self.led_logemp, 2, 3, alignment=Qt.AlignTop) + + ld_logevt = QLabel('<b>Event</b>', self) + self.lb_logevt = SiriusLabel(self, self.get_pvname('LOGEVENT')) + gb_logevt = self._create_small_group( + '', gbox_log, (ld_logevt, self.lb_logevt)) + + ld_logutc = QLabel('<b>Log UTC</b>', self) + self.lb_logutc = SiriusLabel(self, self.get_pvname('LOGUTC')) + self.lb_logutc.showUnits = True + gb_logutc = self._create_small_group( + '', gbox_log, (ld_logutc, self.lb_logutc)) + + ld_logsub = QLabel('<b>Log Subsec</b>', self) + self.lb_logsub = SiriusLabel(self, self.get_pvname('LOGSUBSEC')) + self.lb_logsub.showUnits = True + gb_logsub = self._create_small_group( + '', gbox_log, (ld_logsub, self.lb_logsub)) + + lay_log = QGridLayout(gbox_log) + lay_log.addWidget(gb_logstp, 0, 0, alignment=Qt.AlignTop) + lay_log.addWidget(gb_logrst, 0, 1, alignment=Qt.AlignTop) + lay_log.addWidget(gb_logpul, 0, 2, alignment=Qt.AlignTop) + lay_log.addWidget(gb_logevt, 1, 0, alignment=Qt.AlignTop) + lay_log.addWidget(gb_logutc, 1, 1, alignment=Qt.AlignTop) + lay_log.addWidget(gb_logsub, 1, 2, alignment=Qt.AlignTop) + lay_log.addWidget(fr_logcnt, 0, 3, 2, 1, alignment=Qt.AlignCenter) + + # Timestamp Log Buffer + gbox_buf = QGroupBox('Timestamp Log Buffer', self) + + ld_bufcnt = QLabel('<b>Log Count</b>', self) + self.lb_bufcnt = SiriusLabel(self, self.get_pvname('LOGSOFTCNT')) + self.lb_bufcnt.showUnits = True + gb_bufcnt = self._create_small_group( + '', gbox_buf, (ld_bufcnt, self.lb_bufcnt)) + + ld_bufrst = QLabel('<b>Reset</b>', self) + self.bt_bufrst = SiriusPushButton( + parent=self, init_channel=self.get_pvname('rstSoftBuff'), + pressValue=1, releaseValue=0) # ? + self.bt_bufrst.setIcon(qta.icon('fa5s.sync')) + self.bt_bufrst.setObjectName('bt') + self.bt_bufrst.setStyleSheet( + '#bt{min-width:25px; max-width:25px; icon-size:20px;}') + gb_bufrst = self._create_small_group( + '', gbox_buf, (ld_bufrst, self.bt_bufrst)) + + ld_bufutc = QLabel('<b>UTC buffer</b>', self) + self.tb_bufutc = self._create_logbuffer_table('UTCbuffer') + gb_bufutc = self._create_small_group( + '', gbox_buf, (ld_bufutc, self.tb_bufutc)) + + ld_bufsub = QLabel('<b>Subsec buffer</b>', self) + self.tb_bufsub = self._create_logbuffer_table('SUBSECbuffer') + gb_bufsub = self._create_small_group( + '', gbox_buf, (ld_bufsub, self.tb_bufsub)) + + ld_bufevt = QLabel('<b>Event buffer</b>', self) + self.tb_bufevt = self._create_logbuffer_table('EVENTbuffer') + gb_bufevt = self._create_small_group( + '', gbox_buf, (ld_bufevt, self.tb_bufevt)) + + lay_logbuf = QGridLayout(gbox_buf) + lay_logbuf.addWidget(gb_bufcnt, 0, 0, 1, 3) + lay_logbuf.addWidget(gb_bufrst, 0, 3, 1, 3) + lay_logbuf.addWidget(gb_bufutc, 1, 0, 1, 2) + lay_logbuf.addWidget(gb_bufsub, 1, 2, 1, 2) + lay_logbuf.addWidget(gb_bufevt, 1, 4, 1, 2) + + wid_timlog = QWidget() + lay_timlog = QVBoxLayout(wid_timlog) + lay_timlog.addWidget(gbox_tim) + lay_timlog.addWidget(gbox_log) + lay_timlog.addWidget(gbox_buf) + + # Digital Inputs + obj_names = [ + self.device.substitute(propty=f'DIN{i:d}') for i in range(3)] + props = set(EVREVEDIList._ALL_PROPS) + props.discard('device') + self.dis_wid = EVREVEDIList( + name='', parent=self, prefix=self.prefix, obj_names=obj_names, + props=props) + self.dis_wid.setObjectName('dis_wid') + + # tab and layout + tab = QTabWidget() + tab.setObjectName('ASTab') + tab.addTab(wid_timlog, 'Timestamp && Log') + tab.addTab(self.dis_wid, 'Digital Inputs (DI)') + + lay = QVBoxLayout(dialog) + lay.addWidget(tab) + + return dialog + + def _open_detail_dialog(self): + if not hasattr(self, 'detail_wind'): + self.detail_wind = self._create_detail_dialog() + self.detail_wind.show() + else: + self.detail_wind.showNormal() + + +
+[docs] +class EVR(_EVR_EVE): + + def __init__(self, parent=None, device='', prefix=''): + if 'EVR' not in device: + raise ValueError('device has to be an EVR') + super().__init__(parent, device, prefix)
+ + + +
+[docs] +class EVE(_EVR_EVE): + + def __init__(self, parent=None, device='', prefix=''): + if 'EVE' not in device: + raise ValueError('device has to be an EVE') + super().__init__(parent, device, prefix)
+ + + +# ###################### EVG & FOUT OUT ###################### + +
+[docs] +class EVGFOUTOUTList(BaseList): + """Template for control of Timing devices Internal Triggers.""" + + _MIN_WIDs = { + 'name': 3, + 'connected': 8, + 'tripdelay': 4.8, + 'position': 4.8, + 'outdelay': 4.8, + 'rxlocked': 4.8, + 'rxlockedltc': 8, + 'downlinksts': 6, + 'rxenbl': 4, + 'connection': 12, + } + _LABELS = { + 'name': 'Name', + 'connected': 'Connected', + 'tripdelay': 'TripDelay', + 'position': 'Position', + 'outdelay': 'OutDelay', + 'rxlocked': 'RX Locked', + 'rxlockedltc': 'RX Locked Lacth', + 'downlinksts': 'Downlink', + 'rxenbl': 'RX Enbl', + 'connection': 'Connection', + } + _ALL_PROPS = ('name', 'connected', 'tripdelay', 'position', + 'outdelay', 'rxlocked', 'rxlockedltc', + 'downlinksts', 'rxenbl', 'connection') + + def __init__(self, **kwargs): + srch = set(('name', 'connection')) + kwargs['props2search'] = srch + super().__init__(**kwargs) + + def _get_connections(self, device): + if not hasattr(self, 'conn_idcs'): + try: + if device.dev == 'EVG': + conn_names = LLTimeSearch.get_evg2fout_mapping() + else: + conn_map = LLTimeSearch.get_fout2trigsrc_mapping() + conn_names = conn_map[device.device_name] + conn_idcs = [int(dev[-1]) for dev in conn_names] + except KeyError: + conn_idcs, conn_names = list(), list() + self.conn_idcs, self.conn_names = conn_idcs, conn_names + + return self.conn_idcs, self.conn_names + + def _createObjs(self, device, prop): + idx_orig = device.idx.split('_')[0] + idx = int(device.idx[-1]) + device = device.substitute(idx=idx_orig) + conn_idcs, conn_names = self._get_connections(device) + + sp = rb = None + if prop == 'name': + sp = QLabel('OUT'+str(idx), self) + sp.setAlignment(Qt.AlignCenter) + elif prop == 'connected': + pvname = device.substitute(propty='Los-Mon') + if idx in conn_idcs: + sp = SiriusLedAlert(self, init_channel=pvname, bit=idx) + else: + sp = SiriusLedState(self, init_channel=pvname, bit=idx) + sp.onColor = sp.DarkGreen + sp.offColor = sp.LightGreen + elif prop == 'tripdelay': + pvname = device.substitute(propty='OUT'+str(idx)+'TripDelay-Mon') + sp = SiriusLabel(self, pvname) + sp.setAlignment(Qt.AlignCenter) + elif prop == 'position': + pvname = device.substitute(propty='OUT'+str(idx)+'FramePos-Mon') + sp = SiriusLabel(self, pvname) + sp.setAlignment(Qt.AlignCenter) + elif prop == 'rxlocked': + pvname = device.substitute(propty='RxLocked-Mon') + sp = SiriusLedState(self, init_channel=pvname, bit=idx) + elif prop == 'rxlockedltc': + pvname = device.substitute(propty='RxLockedLtc-Mon') + sp = SiriusLedState(self, init_channel=pvname, bit=idx) + elif prop == 'downlinksts': + pvname = device.substitute(propty='DownlinkStatus-Mon') + if idx in conn_idcs: + sp = SiriusLedAlert(self, init_channel=pvname, bit=idx) + else: + sp = SiriusLedState(self, init_channel=pvname, bit=idx) + sp.onColor = sp.DarkGreen + sp.offColor = sp.LightGreen + elif prop == 'outdelay': + pvname = device.substitute(propty='OUT'+str(idx)+'Delay-SP') + sp = SiriusSpinbox(self, pvname) + sp.limitsFromChannel = False + sp.setMinimum(0) + sp.setMaximum(2**31 - 1) + pvname = device.substitute(propty='OUT'+str(idx)+'Delay-RB') + rb = SiriusLabel(self, pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'rxenbl': + pvname = device.substitute(propty='RxEnbl-SP', field='B'+str(idx)) + sp = PyDMStateButton(self, pvname) + pvname = device.substitute(propty='RxEnbl-RB') + rb = SiriusLedState(self, init_channel=pvname, bit=idx) + elif prop == 'connection': + txtn = '' + if idx in conn_idcs: + out = _PVName(conn_names['OUT'+str(idx)]) + if device.dev == 'EVG': + link = list(LLTimeSearch.In2OutMap['Fout'])[0] + else: + link = list(LLTimeSearch.In2OutMap[out.dev])[0] + txtn = out+'\n'+link + sp = QLabel(txtn, self, alignment=Qt.AlignCenter) + + if rb is None: + return (sp, ) + return sp, rb
+ + + +# ###################### Triggers ###################### + +
+[docs] +class LLTriggerList(BaseList): + """Template for control of High Level Triggers.""" + + _MIN_WIDs = { + 'name': 4.5, + 'device': 14, + 'state': 5.8, + 'event': 4.8, + 'widthraw': 4.8, + 'width': 4.8, + 'polarity': 5, + 'pulses': 4.8, + 'delayraw': 4.8, + 'delay': 4.8, + 'log': 3.2, + 'source': 6.5, + 'trigger': 4, + 'rf_delayraw': 4.8, + 'rf_delay': 6.5, + 'fine_delayraw': 4.8, + 'fine_delay': 6.5, + 'rf_delay_type': 6.5, + 'hl_trigger': 10, + 'dir': 4.5, + 'evtcnt': 5, + 'evtcntrst': 4, + } + _LABELS = { + 'name': 'Name', + 'device': 'Device', + 'state': 'State', + 'event': 'Event', + 'widthraw': 'Width', + 'width': 'Width [us]', + 'polarity': 'Polarity', + 'pulses': 'Nr Pulses', + 'delayraw': 'Delay', + 'delay': 'Delay [us]', + 'log': 'Log', + 'source': 'Source', + 'trigger': 'Trigger', + 'rf_delayraw': 'RF Delay', + 'rf_delay': 'RF Delay [ns]', + 'fine_delayraw': 'Fine Delay', + 'fine_delay': 'Fine Delay [ps]', + 'rf_delay_type': 'RF Delay Type', + 'hl_trigger': 'HL Trigger', + 'dir': 'Direction', + 'evtcnt': 'Evt. Cnt.', + 'evtcntrst': 'Rst. Cnt.', + } + _ALL_PROPS = ( + 'device', 'name', 'state', 'event', 'widthraw', 'width', + 'polarity', 'pulses', 'delayraw', 'delay', 'log', 'source', + 'trigger', 'rf_delayraw', 'rf_delay', 'rf_delay_type', 'fine_delayraw', + 'fine_delay', 'hl_trigger', 'dir', 'evtcnt', 'evtcntrst') + + def __init__(self, **kwargs): + srch = set(('device', 'name', 'polarity', 'source', 'dir')) + kwargs['props2search'] = srch + super().__init__(**kwargs) + + def _createObjs(self, device, prop): + intlb = LLTimeSearch.get_channel_internal_trigger_pvname(device) + outlb = LLTimeSearch.get_channel_output_port_pvname(device) + sp = rb = None + if prop == 'device': + devt = outlb.dev + if devt == 'EVR': + devt = EVR + elif devt == 'EVE': + devt = EVE + else: + devt = AFC + sp = QPushButton(outlb.device_name, self) + sp.setAutoDefault(False) + sp.setDefault(False) + icon = qta.icon('mdi.timer', color=get_appropriate_color('AS')) + Win = create_window_from_widget( + devt, title=outlb.device_name, icon=icon) + connect_window( + sp, Win, None, device=outlb.device_name, prefix=self.prefix) + elif prop == 'name': + sp = QLabel(outlb.propty, self) + sp.setAlignment(Qt.AlignCenter) + elif prop == 'hl_trigger': + trig = HLTimeSearch.get_hl_from_ll_triggers(device) + sp = QLabel(trig, self) + sp.setAlignment(Qt.AlignCenter) + elif prop == 'state': + pvname = intlb.substitute(propty=intlb.propty+'State-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = intlb.substitute(propty=intlb.propty+'State-Sts') + rb = PyDMLed(self, init_channel=pvname) + elif prop == 'event': + pvname = intlb.substitute(propty=intlb.propty+'Evt-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + sp.limitsFromChannel = False + sp.setMinimum(0) + sp.setMaximum(255) + pvname = intlb.substitute(propty=intlb.propty+'Evt-RB') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'widthraw': + pvname = intlb.substitute(propty=intlb.propty+'WidthRaw-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + sp.limitsFromChannel = False + sp.setMinimum(1) + sp.setMaximum(2**31 - 1) + pvname = intlb.substitute(propty=intlb.propty+'WidthRaw-RB') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'width': + pvname = intlb.substitute(propty=intlb.propty+'Width-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + pvname = intlb.substitute(propty=intlb.propty+'Width-RB') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'polarity': + pvname = intlb.substitute(propty=intlb.propty+'Polarity-Sel') + sp = SiriusEnumComboBox(self, init_channel=pvname) + pvname = intlb.substitute(propty=intlb.propty+'Polarity-Sts') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'pulses': + pvname = intlb.substitute(propty=intlb.propty+'NrPulses-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + sp.limitsFromChannel = False + sp.setMinimum(1) + sp.setMaximum(2**31 - 1) + pvname = intlb.substitute(propty=intlb.propty+'NrPulses-RB') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'delayraw': + pvname = intlb.substitute(propty=intlb.propty+'DelayRaw-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + sp.limitsFromChannel = False + sp.setMinimum(0) + sp.setMaximum(2**31 - 1) + pvname = intlb.substitute(propty=intlb.propty+'DelayRaw-RB') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'delay': + pvname = intlb.substitute(propty=intlb.propty+'Delay-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + pvname = intlb.substitute(propty=intlb.propty+'Delay-RB') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'log': + pvname = intlb.substitute(propty=intlb.propty+'Log-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = intlb.substitute(propty=intlb.propty+'Log-Sts') + rb = PyDMLed(self, init_channel=pvname) + elif prop == 'source': + pvname = outlb.substitute(propty=outlb.propty+'Src-Sel') + sp = SiriusEnumComboBox(self, init_channel=pvname) + pvname = outlb.substitute(propty=outlb.propty+'Src-Sts') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'trigger': + pvname = outlb.substitute(propty=outlb.propty+'SrcTrig-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + pvname = outlb.substitute(propty=outlb.propty+'SrcTrig-RB') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'rf_delayraw': + pvname = outlb.substitute(propty=outlb.propty+'RFDelayRaw-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + pvname = outlb.substitute(propty=outlb.propty+'RFDelayRaw-RB') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'rf_delay': + pvname = outlb.substitute(propty=outlb.propty+'RFDelay-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + pvname = outlb.substitute(propty=outlb.propty+'RFDelay-RB') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'rf_delay_type': + pvname = outlb.substitute(propty=outlb.propty+'RFDelayType-Sel') + sp = SiriusEnumComboBox(self, init_channel=pvname) + pvname = outlb.substitute(propty=outlb.propty+'RFDelayType-Sts') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'fine_delayraw': + pvname = outlb.substitute(propty=outlb.propty+'FineDelayRaw-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + pvname = outlb.substitute(propty=outlb.propty+'FineDelayRaw-RB') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'fine_delay': + pvname = outlb.substitute(propty=outlb.propty+'FineDelay-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + pvname = outlb.substitute(propty=outlb.propty+'FineDelay-RB') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'dir': + pvname = intlb.substitute(propty=intlb.propty+'Dir-Sel') + sp = SiriusEnumComboBox(self, init_channel=pvname) + pvname = intlb.substitute(propty=intlb.propty+'Dir-Sts') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'evtcnt': + pvname = intlb.substitute(propty=intlb.propty+'EvtCnt-Mon') + sp = SiriusLabel(self, init_channel=pvname) + sp.setAlignment(Qt.AlignCenter) + elif prop == 'evtcntrst': + pvname = intlb.substitute(propty=intlb.propty+'EvtCntRst-Cmd') + sp = PyDMPushButton( + self, icon=qta.icon('fa5s.sync'), label='', + init_channel=pvname, pressValue=1) + sp.setObjectName('rst') + sp.setStyleSheet( + '#rst{min-width:25px; max-width:25px; icon-size:20px;}') + if rb is None: + return (sp, ) + return sp, rb
+ + + +
+[docs] +class EVREVEOTPList(LLTriggerList): + """Template for control of Timing devices Internal Triggers.""" + + _ALL_PROPS = ( + 'name', 'state', 'event', 'widthraw', 'width', 'polarity', 'pulses', + 'delayraw', 'delay', 'evtcnt', 'evtcntrst', 'log', 'hl_trigger')
+ + + +
+[docs] +class EVREVEOUTList(LLTriggerList): + """Template for control of Timing Devices Output Channels.""" + + _ALL_PROPS = ( + 'name', 'source', 'trigger', 'rf_delayraw', 'rf_delay', + 'rf_delay_type', 'fine_delayraw', 'fine_delay', 'hl_trigger')
+ + + +
+[docs] +class AFCOUTList(LLTriggerList): + """Template for control of Timing devices Internal Triggers.""" + + _ALL_PROPS = ( + 'name', 'state', 'event', 'source', 'widthraw', 'width', 'polarity', + 'pulses', 'delayraw', 'delay', 'dir', 'evtcnt', 'evtcntrst', + 'log', 'hl_trigger')
+ + + +# ###################### Digital Inputs ###################### + +
+[docs] +class EVREVEDIList(BaseList): + """Template for control of Timing devices Internal Triggers.""" + + _MIN_WIDs = { + 'name': 3, + 'device': 14, + 'state': 5.8, + 'polarity': 5, + 'event': 4.8, + 'log': 3.2, + } + _LABELS = { + 'name': 'Name', + 'device': 'Device', + 'state': 'State', + 'polarity': 'Polarity', + 'event': 'Event', + 'log': 'Log', + } + _ALL_PROPS = ('device', 'name', 'state', 'polarity', 'event', 'log') + + def __init__(self, **kwargs): + srch = {'name', 'polarity'} + kwargs['props2search'] = srch + super().__init__(**kwargs) + + def _createObjs(self, device, prop): + di_idx = device.propty[3:] + device = device.substitute(propty='') + sp = rb = None + if prop == 'device': + devt = device.dev + if devt == 'EVR': + devt = EVR + elif devt == 'EVE': + devt = EVE + sp = QPushButton(device.device_name, self) + sp.setAutoDefault(False) + sp.setDefault(False) + icon = qta.icon('mdi.timer', color=get_appropriate_color('AS')) + Win = create_window_from_widget( + devt, title=device.device_name, icon=icon) + connect_window( + sp, Win, None, device=device.device_name, prefix=self.prefix) + elif prop == 'name': + sp = QLabel('DIN'+di_idx, self) + sp.setAlignment(Qt.AlignCenter) + elif prop == 'state': + pvname = device.substitute(propty='DIN'+di_idx+'State-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = device.substitute(propty='DIN'+di_idx+'State-Sts') + rb = PyDMLed(self, init_channel=pvname) + elif prop == 'polarity': + pvname = device.substitute(propty='DIN'+di_idx+'Polarity-Sel') + sp = SiriusEnumComboBox(self, init_channel=pvname) + pvname = device.substitute(propty='DIN'+di_idx+'Polarity-Sts') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'event': + pvname = device.substitute(propty='DIN'+di_idx+'Evt-SP') + sp = SiriusSpinbox(self, init_channel=pvname) + sp.limitsFromChannel = False + sp.setMinimum(0) + sp.setMaximum(255) + pvname = device.substitute(propty='DIN'+di_idx+'Evt-RB') + rb = SiriusLabel(self, init_channel=pvname) + rb.setAlignment(Qt.AlignCenter) + elif prop == 'log': + pvname = device.substitute(propty='DIN'+di_idx+'Log-Sel') + sp = PyDMStateButton(self, init_channel=pvname) + pvname = device.substitute(propty='DIN'+di_idx+'Log-Sts') + rb = PyDMLed(self, init_channel=pvname) + if rb is None: + return (sp, ) + return sp, rb
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ti_control/monitor.html b/_modules/siriushla/as_ti_control/monitor.html new file mode 100644 index 000000000..74f7011ad --- /dev/null +++ b/_modules/siriushla/as_ti_control/monitor.html @@ -0,0 +1,442 @@ + + + + + + siriushla.as_ti_control.monitor — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ti_control.monitor

+"""."""
+
+from qtpy.QtCore import Qt, QPoint
+from qtpy.QtGui import QPainter
+from qtpy.QtWidgets import QLabel, QWidget, QGridLayout, QGroupBox, \
+    QHBoxLayout, QApplication, QVBoxLayout
+import qtawesome as qta
+
+from siriuspy.namesys import SiriusPVName as PVName
+from siriuspy.search import LLTimeSearch, HLTimeSearch
+
+from ..widgets import SiriusLedAlert, PyDMLedMultiChannel
+from ..util import get_appropriate_color, connect_window
+from ..widgets.windows import create_window_from_widget
+
+from .low_level_devices import EVG, FOUT, AFC, EVR, EVE
+from .hl_trigger import HLTriggerDetailed
+
+
+
+[docs] +class LLButton(QWidget): + + def __init__(self, device, link, prefix='', parent=None): + super().__init__(parent) + self.device = PVName(device) + self.link = link + self.prefix = prefix + self._dic = { + 'EVG': EVG, 'EVR': EVR, 'EVE': EVE, 'AMCFPGAEVR': AFC, + 'Fout': FOUT} + self.setupui() + +
+[docs] + def setupui(self): + if self.device.dev == 'Fout': + name = self.device.dev + ( + '-' + self.device.idx if self.device.idx else '') + elif self.device.dev == 'AMCFPGAEVR': + name = 'AMC-' + ( + 'TL' if 'TL' in self.device.sub else self.device.sub[:2]) + elif self.device.sec == 'LA': + if 'RaCtrl' in self.device.sub: + name = 'PS-TL' + elif 'BIH01' in self.device.sub: + name = 'LI-Diag' + else: + name = 'LI-Glob' + elif self.device.sec == 'PA': + name = 'PS-' + ('BO' if self.device.idx == '1' else 'SI') + elif self.device.sec == 'RA': + name = 'RF-' + ('BO' if 'BO' in self.device.sub else 'SI') + elif 'RaInj' in self.device.sub: + name = 'PU' + elif 'BbB' in self.device.sub: + name = 'DI-BbB' + elif 'Diag' in self.device.sub: + name = 'DI-' + ( + 'DCCT' if self.device.sub[:2] == '14' else + 'Tune' if self.device.sub[:2] == '18' else + 'TL' if self.device.sub[:2] == '20' else '?') + elif self.device.sec == 'BA': + name = self.device.sec + '-' + self.device.sub + else: + name = self.device.dev + clss = self._dic[self.device.dev] + + props = ['DevEnbl', 'Network', 'LinkStatus', 'IntlkStatus'] + suffs = ['-Sts', '-Mon', '-Mon', '-Mon'] + chng = [True, True, True, False] + if self.device.dev == 'EVG': + props[2] = 'RFStatus' + props[3] = 'ACStatus' + chng[3] = True + elif self.device.dev == 'AMCFPGAEVR': + props[1] = 'RefClkLocked' + props = props[:-1] + elif self.device.dev == 'Fout': + props = props[:-1] + + channels2values = dict() + for i, prop in enumerate(props): + pvn = self.device.substitute(prefix=self.prefix, propty=prop+suffs[i]) + channels2values[pvn] = 1 if chng[i] else 0 + led = PyDMLedMultiChannel( + parent=self, channels2values=channels2values) + led.setToolTip(self.device) + icon = qta.icon('mdi.timer', color=get_appropriate_color('AS')) + Window = create_window_from_widget( + clss, title=self.device.device_name, icon=icon) + connect_window( + led, Window, None, signal=led.clicked, + device=self.device, prefix=self.prefix) + + lay = QVBoxLayout(self) + lay.setContentsMargins(0, 2, 0, 2) + lay.setSpacing(4) + lay.addWidget(QLabel(name, self, alignment=Qt.AlignCenter)) + lay.addWidget(led, alignment=Qt.AlignCenter)
+
+ + + +
+[docs] +class HLButton(QWidget): + + def __init__(self, trigger, prefix='', parent=None): + super().__init__(parent=parent) + self.trigger = trigger + self.prefix = prefix + hl = QHBoxLayout() + self.setLayout(hl) + self.layout().setContentsMargins(0, 0, 0, 0) + led = SiriusLedAlert(self) + led.setToolTip(trigger) + led.channel = trigger.substitute( + prefix=self.prefix, propty='Status-Mon') + self.layout().addWidget(led) + icon = qta.icon('mdi.timer', color=get_appropriate_color(trigger.sec)) + Window = create_window_from_widget( + HLTriggerDetailed, title=trigger, icon=icon) + led.clicked.connect(lambda: QApplication.instance().open_window( + Window, parent=None, device=trigger, prefix=prefix))
+ + + +
+[docs] +class MonitorHL(QGroupBox): + + def __init__(self, parent=None, prefix=''): + super().__init__('High Level Monitor', parent=parent) + self.prefix = prefix + self._setupui() + self.setObjectName('ASApp') + + def _setupui(self): + lay = QGridLayout() + self.setLayout(lay) + hltrigs = HLTimeSearch.get_hl_triggers() + secs = sorted(set(map(lambda x: x.sec, hltrigs))) + secs = {sec: [] for sec in secs} + nrcols = 10 + for trig in hltrigs: + secs[trig.sec].append(trig) + + for sec, trigs in secs.items(): + lab = QLabel(sec) + lab.setStyleSheet('font-weight: bold;') + lay.addWidget(lab, lay.rowCount(), 0, 1, nrcols) + row = lay.rowCount() + for i, trig in enumerate(sorted(trigs)): + if i and not i % nrcols: + row = lay.rowCount() + but = HLButton(trig, self.prefix, self) + lay.addWidget(but, row, i % nrcols)
+ + + +
+[docs] +class MonitorLL(QGroupBox): + + def __init__(self, parent=None, prefix=''): + super().__init__('Low Level Monitor', parent=parent) + self.prefix = prefix + self._setupui() + self.setObjectName('ASApp') + + def _setupui(self): + evg = PVName(LLTimeSearch.get_evg_name()) + g1 = LLButton(evg, '', self.prefix, self) + self.g1 = g1 + + fouts = LLTimeSearch.get_evg2fout_mapping() + fouts = [(out, down) for out, down in fouts.items()] + + g2 = self.setupdown(fouts) + self.g2 = g2 + + g3 = list() + trgsrcs = LLTimeSearch.get_fout2trigsrc_mapping() + for _, down in fouts: + downs = trgsrcs[down.device_name] + downs = sorted([(ou, dwn) for ou, dwn in downs.items()]) + g3.append(self.setupdown(downs)) + + lay = QGridLayout(self) + lay.setHorizontalSpacing(12) + lay.setVerticalSpacing(20) + align = Qt.AlignHCenter | Qt.AlignTop + lay.addWidget(g1, 0, 0, 1, len(g3), align) + for i, g in enumerate(g2): + lay.addWidget(g, 1, i, align) + self.g3 = list() + for i, gs in enumerate(g3): + for j, g in enumerate(gs): + if not j: + self.g3.append(g) + lay.addWidget(g, j+2, i) + +
+[docs] + def setupdown(self, down): + return [LLButton(pre, lnk, self.prefix, self) for lnk, pre in down]
+ + +
+[docs] + def paintEvent(self, event): + super().paintEvent(event) + sz = self.g1.size() + p1 = self.g1.pos() + QPoint(sz.width()//2, sz.height()) + for i, g2 in enumerate(self.g2): + sz = g2.size() + p2 = g2.pos() + QPoint(sz.width()//2, 0) + self.drawarrow(p1, p2) + p2 += QPoint(0, sz.height()) + g3 = self.g3[i] + p3 = g3.pos() + QPoint(g3.size().width()//2, 0) + self.drawarrow(p2, p3)
+ + +
+[docs] + def drawarrow(self, p1, p2): + self.drawline(p1, p2, 0) + self.drawline(p2, p1, 10, True) + self.drawline(p2, p1, -10, True)
+ + +
+[docs] + def drawline(self, p1, p2, angle, tip=False): + painter = QPainter() + painter.begin(self) + painter.setRenderHint(QPainter.Antialiasing) + painter.setPen(Qt.blue) + pen = painter.pen() + pen.setWidth(2) + painter.setPen(pen) + painter.setBrush(Qt.blue) + painter.translate(p1) + painter.rotate(angle) + pt = (p2-p1) + if tip: + pt /= (pt.x()**2 + pt.y()**2)**0.5 / 10 + # painter.scale(scale, scale) + # painter.drawLine(QPoint(0, 0), (p2-p1)*scale) + painter.drawLine(QPoint(0, 0), pt) + return painter
+
+ + + +
+[docs] +class MonitorWindow(QWidget): + + def __init__(self, parent=None, prefix=''): + super().__init__(parent=parent) + self.prefix = prefix + self._setupui() + self.setObjectName('ASApp') + + def _setupui(self): + self.title = QLabel( + '<h2>Timing Monitor</h2>', alignment=Qt.AlignCenter) + vl = QVBoxLayout(self) + vl.addWidget(self.title) + vl.addWidget(MonitorLL(self, prefix=self.prefix)) + vl.addWidget(MonitorHL(self, prefix=self.prefix)) + self.setStyleSheet(""" + QLed { + min-height: 1.1em; max-height: 1.1em; + min-width: 1.1em; max-width: 1.1em;} + """)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/as_ti_control/widgets.html b/_modules/siriushla/as_ti_control/widgets.html new file mode 100644 index 000000000..6ce2d0b33 --- /dev/null +++ b/_modules/siriushla/as_ti_control/widgets.html @@ -0,0 +1,274 @@ + + + + + + siriushla.as_ti_control.widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.as_ti_control.widgets

+"""Timing widgets."""
+
+import qtawesome as qta
+
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.namesys import SiriusPVName
+from siriuspy.search import LLTimeSearch as _LLTimeSearch
+
+from ..widgets import PyDMStateButton, PyDMLed, SiriusLedAlert
+
+EVG_NAME = _LLTimeSearch.get_evg_name()
+
+
+
+[docs] +class EVGContinuousLed(PyDMLed): + """EVG Continuous Led.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX): + """Init.""" + pref_dev = SiriusPVName(EVG_NAME).substitute(prefix=prefix) + color_list = 7*[self.LightGreen, ] + color_list[0] = self.DarkGreen # Initializing + color_list[1] = self.DarkGreen # Stopped + color_list[4] = self.Yellow # Preparing Continuous + color_list[6] = self.Yellow # Restarting Continuous + super().__init__( + parent=parent, + init_channel=pref_dev.substitute(propty_name='STATEMACHINE'), + color_list=color_list)
+ + + +
+[docs] +class EVGContinuousButton(PyDMStateButton): + """EVG Continuous State Button.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX): + """Init.""" + pref_dev = SiriusPVName(EVG_NAME).substitute(prefix=prefix) + super().__init__( + parent=parent, + init_channel=pref_dev.substitute(propty='ContinuousEvt-Sel'))
+ + + +
+[docs] +class EVGInjectionLed(PyDMLed): + """EVG Injection Led.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX): + """Init.""" + pref_dev = SiriusPVName(EVG_NAME).substitute(prefix=prefix) + color_list = 7*[self.DarkGreen, ] + color_list[3] = self.LightGreen # Injection + color_list[5] = self.Yellow # Preparing Injection + super().__init__( + parent=parent, + init_channel=pref_dev.substitute(propty_name='STATEMACHINE'), + color_list=color_list)
+ + + +
+[docs] +class EVGInjectionButton(PyDMStateButton): + """EVG Injection State Button.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX): + """Init.""" + pref_dev = SiriusPVName(EVG_NAME).substitute(prefix=prefix) + super().__init__( + parent=parent, + init_channel=pref_dev.substitute(propty='InjectionEvt-Sel'))
+ + + +
+[docs] +class EVGUpdateEvtLed(SiriusLedAlert): + """EVG Update Events Led.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX): + """Init.""" + pref_dev = SiriusPVName(EVG_NAME).substitute(prefix=prefix) + super().__init__( + parent=parent, + init_channel=pref_dev.substitute(propty='EvtSyncStatus-Mon')) + self.setOffColor(self.Red) + self.setOnColor(self.LightGreen)
+ + + +
+[docs] +class EVGUpdateEvtButton(PyDMPushButton): + """EVG Update Events Button.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX): + super().__init__( + parent, label='', icon=qta.icon('fa5s.sync'), pressValue=1) + pref_dev = SiriusPVName(EVG_NAME).substitute(prefix=prefix) + self.setToolTip('Update Events Table') + self.channel = pref_dev.substitute(propty='UpdateEvt-Cmd') + self.setObjectName('but') + self.setStyleSheet( + '#but{min-width:25px; max-width:25px; icon-size:20px;}')
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/bl_ap_imgproc/blintlkctl.html b/_modules/siriushla/bl_ap_imgproc/blintlkctl.html new file mode 100644 index 000000000..149c21193 --- /dev/null +++ b/_modules/siriushla/bl_ap_imgproc/blintlkctl.html @@ -0,0 +1,210 @@ + + + + + + siriushla.bl_ap_imgproc.blintlkctl — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.bl_ap_imgproc.blintlkctl

+"""Beamline-specific classes."""
+
+from siriuspy.devices import ASMPSCtrl as _ASMPSCtrl
+from siriuspy.devices import BLInterlockCtrl as _BLInterlockCtrl
+
+
+
+[docs] +class BLIntckCtrl: + """.""" + + def __init__(self, device): + """Init.""" + if 'CAX' in device: + self.blintlk = _BLInterlockCtrl(_BLInterlockCtrl.DEVICES.CAX) + self.mps = _ASMPSCtrl() + else: + self.blintlk = None + self.mps = None + + @property + def beamline_opened(self): + """.""" + if self.blintlk and self.blintlk.connected: + return self.blintlk.is_beamline_opened + else: + return 2 + +
+[docs] + def gamma_enable(self): + """.""" + if self.mps and self.mps.connected: + return self.mps.cmd_gamma_enable() + else: + return False
+ + +
+[docs] + def beamline_open(self): + """.""" + if self.blintlk and self.blintlk.connected: + return self.blintlk.cmd_beamline_open() + else: + return False
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/bl_ap_imgproc/image.html b/_modules/siriushla/bl_ap_imgproc/image.html new file mode 100644 index 000000000..0169dea3a --- /dev/null +++ b/_modules/siriushla/bl_ap_imgproc/image.html @@ -0,0 +1,402 @@ + + + + + + siriushla.bl_ap_imgproc.image — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.bl_ap_imgproc.image

+"""BL AP ImgProc."""
+
+import numpy as _np
+
+from qtpy.QtGui import QColor
+from pyqtgraph import PlotCurveItem, mkPen
+
+from pydm.widgets import PyDMImageView
+
+from ..widgets import SiriusConnectionSignal
+
+from .util import PVS_IMGPROCCTRL
+
+
+
+[docs] +class DVFImageView(PyDMImageView): + """Image Processing Window.""" + + def __init__(self, device, pvname, parent=None): + """.""" + super().__init__( + parent=parent, + image_channel=pvname[0], + width_channel=pvname[1]) + + self.device = device + + self.roi = None + self.roi_con = {} + + self.fit_mean = None + self.fit_mean_con = {} + + self.fit_ellipse = None + self.fit_ellipse_con = {} + + self.angle = 0 + self.sigma = [200, 200] + + self._setupUi() + +
+[docs] + def add_prefixes(self, sufix): + """.""" + return self.device + ":" + sufix
+ + + # --- roi --- + +
+[docs] + def plot_roi(self, value, pvname): + """.""" + point_list = _np.zeros(5) + if 'ROIX' in pvname: + id_data = 0 + change_point = [ + [0, 1, 4], [2, 3]] + else: + id_data = 1 + change_point = [ + [0, 3, 4], [1, 2]] + + for idx, val in enumerate(value): + for point in change_point[idx]: + point_list[point] = val + + cur_data = self.roi.getData() + x_points = point_list if id_data == 0 else cur_data[0] + y_points = point_list if id_data == 1 else cur_data[1] + self.roi.setData(x=x_points, y=y_points)
+ + +
+[docs] + def add_roi(self): + """.""" + pen = mkPen(QColor('red')) + x_points = [0, 400, 400, 0, 0] + y_points = [0, 0, 400, 400, 0] + self.roi = PlotCurveItem(x_points, y_points) + self.roi.setPen(pen) + self.addItem(self.roi)
+ + +
+[docs] + def add_roi_connection(self, axis): + """.""" + roi_pvs = PVS_IMGPROCCTRL['ROI'][1] + roi_pv = self.add_prefixes(roi_pvs[axis]['Min Max'][1]) + self.roi_con[axis] = SiriusConnectionSignal(roi_pv) + self.roi_con[axis].new_value_signal[_np.ndarray].connect( + lambda value: self.plot_roi(value, roi_pv))
+ + + # --- fit_mean --- + +
+[docs] + def plot_fit_mean(self, value, pvname): + """.""" + if 'ROIX' in pvname: + id_data = 0 + point_list = _np.full(7, value) + change_point = [2, 6] + else: + id_data = 1 + point_list = _np.full(7, value) + change_point = [0, 4] + + dist = 20 + for point in change_point: + point_list[point] = value - dist + dist *= -1 + + cur_data = self.fit_mean.getData() + x_points = point_list if id_data == 0 else cur_data[0] + y_points = point_list if id_data == 1 else cur_data[1] + self.fit_mean.setData(x=x_points, y=y_points)
+ + +
+[docs] + def add_fit_mean(self): + """.""" + pen = mkPen(QColor('white')) + center = 200 + dist = 20 + x_points = _np.full(7, center) + x_points[2] = center-dist + x_points[6] = center+dist + + y_points = _np.full(7, center) + y_points[0] = center-dist + y_points[4] = center+dist + + self.fit_mean = PlotCurveItem(x_points, y_points) + self.fit_mean.setPen(pen) + self.addItem(self.fit_mean)
+ + +
+[docs] + def add_fit_mean_connection(self, axis): + """.""" + fit_pvs = PVS_IMGPROCCTRL['Fit'][1] + fit_mean_pv = self.add_prefixes(fit_pvs[axis]['ROI Mean']) + self.fit_mean_con[axis] = SiriusConnectionSignal(fit_mean_pv) + self.fit_mean_con[axis].new_value_signal[float].connect( + lambda value: self.plot_fit_mean(value, fit_mean_pv))
+ + + # --- fit_ellipse --- + +
+[docs] + def plot_fit_ellipse(self, value, pvname): + """.""" + theta = _np.linspace(0, 2*_np.pi, 100) + centroid_raw = self.fit_mean.getData() + centroid = [centroid_raw[0][3], centroid_raw[1][3]] + + if 'Angle' in pvname: + self.angle = - _np.pi*value/180 + elif 'Sigma1' in pvname: + self.sigma[0] = value + else: + self.sigma[1] = value + + theta = _np.linspace(0, 2*_np.pi, 100) + x_points = self.sigma[0] * _np.cos(theta) + y_points = self.sigma[1] * _np.sin(theta) + + ang = self.angle + cosa, sina = _np.cos(ang), _np.sin(ang) + x_rotated = x_points * cosa - y_points * sina + y_rotated = x_points * sina + y_points * cosa + + x_centered = x_rotated + centroid[0] + y_centered = y_rotated + centroid[1] + + self.fit_ellipse.setData(x=x_centered, y=y_centered)
+ + +
+[docs] + def add_fit_ellipse(self): + """.""" + pen = mkPen(QColor('black')) + x_mean = 200 + y_mean = 200 + + theta = _np.linspace(0, 2*_np.pi, 100) + x_points = self.sigma[0] * _np.cos(theta) + y_points = self.sigma[1] * _np.sin(theta) + + x_centered = x_points + x_mean + y_centered = y_points + y_mean + + self.fit_ellipse = PlotCurveItem(x_centered, y_centered) + self.fit_ellipse.setPen(pen) + self.addItem(self.fit_ellipse)
+ + +
+[docs] + def add_fit_ellipse_connection(self, param): + """.""" + fit_pvs = PVS_IMGPROCCTRL['Fit'][1] + fit_ellipse_pv = self.add_prefixes(fit_pvs[param]) + self.fit_ellipse_con[param] = SiriusConnectionSignal(fit_ellipse_pv) + self.fit_ellipse_con[param].new_value_signal[float].connect( + lambda value: self.plot_fit_ellipse(value, fit_ellipse_pv))
+ + + # --- setup UI --- + + def _setupUi(self): + self.add_roi() + self.add_roi_connection('X') + self.add_roi_connection('Y') + + self.add_fit_mean() + self.add_fit_mean_connection('X') + self.add_fit_mean_connection('Y') + + self.add_fit_ellipse() + self.add_fit_ellipse_connection('Angle') + self.add_fit_ellipse_connection('Sigma1') + self.add_fit_ellipse_connection('Sigma2') + + self.readingOrder = self.ReadingOrder.Clike + self.getView().getViewBox().setAspectLocked(True) + self.colorMap = self.Jet + self.maxRedrawRate = 10 # [Hz] + self.normalizeData = True
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/bl_ap_imgproc/main.html b/_modules/siriushla/bl_ap_imgproc/main.html new file mode 100644 index 000000000..6189a7bd4 --- /dev/null +++ b/_modules/siriushla/bl_ap_imgproc/main.html @@ -0,0 +1,614 @@ + + + + + + siriushla.bl_ap_imgproc.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.bl_ap_imgproc.main

+"""BL AP ImgProc."""
+
+from datetime import datetime
+from qtpy.QtCore import Qt, QTimer
+from qtpy.QtWidgets import QWidget, QGridLayout, QHBoxLayout, \
+    QVBoxLayout, QGroupBox, QLabel, QSizePolicy, QTabWidget, \
+    QPushButton, QScrollArea
+
+import qtawesome as qta
+
+from pydm.widgets import PyDMPushButton
+
+from ..widgets import SiriusEnumComboBox
+from ..widgets.dialog import StatusDetailDialog
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+
+from .. import util as _util
+from ..util import get_appropriate_color
+from ..widgets import SiriusLabel, SiriusLedState, \
+    SiriusLineEdit, PyDMLogLabel, PyDMStateButton, \
+    SiriusConnectionSignal, SiriusSpinbox, SiriusLedAlert
+
+from .util import PVS_IMGPROCCTRL, PVS_IMGPROCOVERVIEW, PVS_DVF, \
+    IMG_PVS, LOG_PV, COMBOBOX_PVS, LINEEDIT_PVS, STATEBUT_PVS, \
+    LED_ALERT_PVS, LED_STATE_PVS, LED_DETAIL_PVS, INTLK_PVS
+from .image import DVFImageView
+from .blintlkctl import BLIntckCtrl
+
+
+
+[docs] +class BLImgProc(QWidget): + """Image Processing Window.""" + + def __init__(self, dvf, parent=None, prefix=_VACA_PREFIX): + """.""" + super().__init__(parent=parent) + self.setObjectName('SIApp') + self.prefix = prefix + ('-' if prefix else '') + self.dvf = dvf + self.device = self.prefix + self.dvf + self.blpps = BLIntckCtrl(self.device) + self.setWindowTitle(self.device + ' Image Processing Window') + self.setWindowIcon( + qta.icon('mdi.camera-metering-center', + color=get_appropriate_color('SI'))) + self._lbl_timestamp = {} + self.timestamp = {} + self.img_view = None + + self.loading = QPushButton("") + self.open_beamline_btn = None + self.enable_gamma_btn = None + self.gamma_enabled_conn = None + self._setupUi() + + self.timer = QTimer() + self.timer.timeout.connect(self.update_bl_open_status) + self.timer.start(1000) + +
+[docs] + def add_prefixes(self, sufix): + """.""" + return self.device + ":" + sufix
+ + +
+[docs] + def generate_pv_name(self, sufix): + """.""" + if len(sufix) != 2: + return self.add_prefixes(sufix) + + pv_list = [] + for sf in sufix: + try: + pvname = self.add_prefixes(sf) + pv_list.append(pvname) + except: + pv_list.append(sf) + return pv_list
+ + +
+[docs] + def format_datetime_lbl(self, value, pvname): + """.""" + dtval = datetime.fromtimestamp(value) + datetime_lbl = dtval.strftime("%d/%m/%Y, %H:%M:%S") + datetime_lbl += '.{:03d}'.format(int(1e3*(value % 1))) + self._lbl_timestamp[pvname].setText(datetime_lbl)
+ + +
+[docs] + def create_time_widget(self, pvname): + """.""" + lbl_time = QLabel('0000-00-00 0:00:00.0', self) + self._lbl_timestamp[pvname] = lbl_time + self._lbl_timestamp[pvname].channel = pvname + self.timestamp[pvname] = SiriusConnectionSignal(pvname) + self.timestamp[pvname].new_value_signal[float].connect( + lambda value: self.format_datetime_lbl(value, pvname)) + return self._lbl_timestamp[pvname]
+ + +
+[docs] + def select_widget( + self, pv_name, widget_type='label', units=True, labels=None): + """.""" + pvname = self.generate_pv_name(pv_name) + if widget_type == 'label': + wid = SiriusLabel(init_channel=pvname, keep_unit=True) + wid.showUnits = units + wid.setAlignment(Qt.AlignCenter) + wid.setMaximumHeight(50) + elif widget_type == 'setpoint_readback_combo': + sprb_type = ['enumcombo', 'label', True] + wid = self.setpoint_readback_widget(pv_name, sprb_type) + elif widget_type == 'setpoint_readback_edit': + sprb_type = ['edit', 'label', False] + wid = self.setpoint_readback_widget(pv_name, sprb_type) + elif widget_type == 'setpoint_readback_sbut': + sprb_type = ['switch', 'led_state', True] + wid = self.setpoint_readback_widget(pv_name, sprb_type) + elif widget_type == 'setpoint_readback_spin': + sprb_type = ['spin', 'label', True] + wid = self.setpoint_readback_widget(pv_name, sprb_type) + elif widget_type == 'led_state': + wid = SiriusLedState(init_channel=pvname) + wid.offColor = wid.Yellow + elif widget_type == 'led_alert': + wid = SiriusLedAlert(init_channel=pvname) + wid.onColor = wid.Yellow + elif widget_type == 'leddetail': + led = SiriusLedAlert(init_channel=pvname[0]) + details = QPushButton(qta.icon('fa5s.ellipsis-h'), '', self) + details.setObjectName('bt') + details.setStyleSheet( + '#bt{min-width:25px;max-width:25px;icon-size:20px;}') + _util.connect_window( + details, StatusDetailDialog, pvname=pvname[0], parent=self, + labels=pvname[1], section="SI", title='Status Detailed') + wid = QWidget() + hlay = QHBoxLayout(wid) + hlay.addWidget(led) + hlay.addWidget(details) + elif widget_type == 'log': + wid = PyDMLogLabel(init_channel=pvname) + elif widget_type == 'edit': + wid = SiriusLineEdit(init_channel=pvname) + wid.setAlignment(Qt.AlignCenter) + elif widget_type == 'switch': + wid = PyDMStateButton(init_channel=pvname) + elif widget_type == 'enumcombo': + wid = SiriusEnumComboBox(self, init_channel=pvname) + elif widget_type == 'image': + wid = DVFImageView(self.device, pvname) + elif widget_type == 'time': + wid = self.create_time_widget(pvname) + wid.setAlignment(Qt.AlignCenter) + elif widget_type == 'spin': + wid = SiriusSpinbox(init_channel=pvname) + elif widget_type == 'cmd': + wid = PyDMPushButton(init_channel=pvname, pressValue=1) + wid.setIcon(qta.icon('fa5s.sync')) + wid.setObjectName('bt') + wid.setStyleSheet( + '#bt{min-width:25px;max-width:25px;icon-size:20px;}') + else: + wid = QLabel("Widget has not been implemented yet!") + return wid
+ + +
+[docs] + def setpoint_readback_widget(self, pv_list, sprb_type): + """.""" + wid = QWidget() + wid.setContentsMargins(0, 0, 0, 0) + if sprb_type[2]: + lay = QHBoxLayout() + else: + lay = QVBoxLayout() + wid.setLayout(lay) + + for x in range(0, 2): + widget = self.select_widget( + pv_list[x], sprb_type[x], units=False) + widget.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) + lay.addWidget(widget) + return wid
+ + +
+[docs] + def create_widget(self, title, pv_name): + """.""" + if title in LED_ALERT_PVS: + wid_type = 'led_alert' + elif title in LED_STATE_PVS: + wid_type = 'led_state' + elif title in LED_DETAIL_PVS: + wid_type = 'leddetail' + elif 'Time' in pv_name and 'Proc' not in pv_name: + wid_type = 'time' + elif '-Cmd' in pv_name: + wid_type = 'cmd' + elif title in LOG_PV: + wid_type = 'log' + elif title in IMG_PVS: + wid_type = 'image' + elif len(pv_name) != 2: + wid_type = 'label' + elif title in COMBOBOX_PVS: + wid_type = 'setpoint_readback_combo' + elif title in LINEEDIT_PVS: + wid_type = 'setpoint_readback_edit' + elif title in STATEBUT_PVS: + wid_type = 'setpoint_readback_sbut' + else: + wid_type = 'setpoint_readback_spin' + + hlay = QHBoxLayout() + wid = self.select_widget(pv_name, wid_type) + if wid_type not in ['log', 'image']: + title_wid = QLabel(title + ': ') + title_wid.setAlignment(Qt.AlignRight) + hlay.addWidget( + title_wid, alignment=Qt.AlignRight | Qt.AlignVCenter) + hlay.addWidget(wid, alignment=Qt.AlignLeft) + else: + hlay.addWidget(wid) + + return hlay
+ + +
+[docs] + def create_box_group(self, title, pv_info): + """.""" + wid = QGroupBox(title) if title else QWidget() + gbox = QGridLayout(wid) + + count = 0 + for title, pv in pv_info.items(): + if title in ['X', 'Y']: + widget = self.create_box_group(title, pv) + hpos = 0 if title == 'X' else 1 + gbox.addWidget(widget, count, hpos, 1, 1) + if title == 'Y': + count += 1 + else: + pv_lay = self.create_widget(title, pv) + gbox.addLayout(pv_lay, count, 0, 1, 2) + count += 1 + + return wid
+ + + def _setupTab(self, content, use_scroll=False): + cont_wid = QWidget() + cont_wid.setObjectName('wid') + glay = QGridLayout() + + for title, pv_data in content.items(): + loc = pv_data[0] + if len(pv_data[1:]) > 1: + wid = QGroupBox(title, self) + widlay = QHBoxLayout(wid) + for data in pv_data[1:]: + col = self.create_box_group("", data) + widlay.addWidget(col) + else: + wid = self.create_box_group(title, pv_data[1]) + glay.addWidget(wid, *loc) + + glay.setColumnStretch(0, 3) + glay.setColumnStretch(1, 1) + glay.setColumnStretch(2, 1) + cont_wid.setLayout(glay) + + if use_scroll: + sc_area = QScrollArea() + sc_area.setWidgetResizable(True) + cont_wid.setStyleSheet('#wid{background-color: transparent;}') + sc_area.setWidget(cont_wid) + return sc_area + return cont_wid + +
+[docs] + def toggle_beamline_btns(self, value): + """.""" + if value == 1: + state = True + else: + state = False + + self.end_processing_cmd() + self.open_beamline_btn.setEnabled(state)
+ + +
+[docs] + def end_processing_cmd(self): + """.""" + self.enable_gamma_btn.setEnabled(True) + self.open_beamline_btn.setEnabled(True) + self.loading.setVisible(False)
+ + +
+[docs] + def start_processing_cmd(self): + """.""" + self.enable_gamma_btn.setEnabled(False) + self.open_beamline_btn.setEnabled(False) + self.loading.setVisible(True)
+ + +
+[docs] + def intlk_cmd(self, cmd): + """.""" + self.start_processing_cmd() + if cmd == "enable_gamma": + self.blpps.gamma_enable() + elif cmd == "open_beamline": + self.blpps.beamline_open()
+ + + def _setup_gamma_control_widget(self): + wid = QGroupBox() + lay = QHBoxLayout() + wid.setLayout(lay) + wid.setTitle("Gamma") + wid.setMaximumHeight(200) + + self.enable_gamma_btn = QPushButton("Enable") + self.enable_gamma_btn.clicked.connect( + lambda: self.intlk_cmd("enable_gamma")) + lay.addWidget(self.enable_gamma_btn) + + pvname = INTLK_PVS["gamma"] + widget = SiriusLedState(init_channel=pvname) + self.gamma_enabled_conn = SiriusConnectionSignal(pvname) + self.gamma_enabled_conn.new_value_signal[int].connect( + self.toggle_beamline_btns) + lay.addWidget(widget) + + return wid + +
+[docs] + def update_bl_open_status(self): + """.""" + # update open status led + status_bl = self.blpps.beamline_opened + old_val = self.pydm_led.value + self.pydm_led.value_changed(status_bl) + if old_val != status_bl: + self.end_processing_cmd() + + # update log error label + error_bl = self.blpps.blintlk.error_log + self.pydm_lbl.setText(error_bl)
+ + + def _setup_enable_beamline_widgets(self): + wid = QGroupBox() + lay = QHBoxLayout() + wid.setLayout(lay) + wid.setTitle("Open Beamline") + wid.setMaximumHeight(200) + + self.open_beamline_btn = QPushButton("Open") + self.open_beamline_btn.clicked.connect( + lambda: self.intlk_cmd("open_beamline")) + lay.addWidget(self.open_beamline_btn) + + self.pydm_led = SiriusLedState() + self.pydm_led.stateColors = [ + self.pydm_led.DarkGreen, + self.pydm_led.LightGreen, self.pydm_led.Gray] + lay.addWidget(self.pydm_led) + + return wid + + def _setup_beamline_error_log(self): + wid = QGroupBox() + lay = QHBoxLayout() + wid.setLayout(lay) + wid.setTitle("Beamline Status") + wid.setMaximumHeight(200) + + self.beamline_error_log = QLabel('Error log: ') + lay.addWidget(self.beamline_error_log) + + self.pydm_lbl = QLabel(self.blpps.blintlk.error_log) + lay.addWidget(self.pydm_lbl) + + return wid + + def _setup_beamline_controls_widgets(self): + wid = QGroupBox() + lay = QVBoxLayout() + wid.setLayout(lay) + + self.loading.setIcon(qta.icon( + 'fa5s.spinner', animation=qta.Spin(self.loading))) + self.loading.setVisible(False) + self.loading.setFlat(True) + lay.addWidget(self.loading) + + widget = self._setup_gamma_control_widget() + lay.setAlignment(Qt.AlignTop) + lay.addWidget(widget) + + widget = self._setup_enable_beamline_widgets() + lay.addWidget(widget) + + widget = self._setup_beamline_error_log() + lay.addWidget(widget) + + return wid + + def _setupUi(self): + main_lay = QVBoxLayout() + tab = QTabWidget() + tab.setObjectName('SITab') + + title = QLabel( + '<h3>'+self.device+' Image Processing<h3>', self, + alignment=Qt.AlignCenter) + main_lay.addWidget(title) + + img_wid = self._setupTab(PVS_IMGPROCOVERVIEW) + tab.addTab(img_wid, "View") + imgproc_wid = self._setupTab(PVS_IMGPROCCTRL) + tab.addTab(imgproc_wid, "Settings") + dvf_wid = self._setupTab(PVS_DVF, use_scroll=True) + tab.addTab(dvf_wid, "DVF") + cax_wid = self._setup_beamline_controls_widgets() + tab.addTab(cax_wid, "CAX") + + main_lay.addWidget(tab) + self.setLayout(main_lay)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/bo_ap_ramp/custom_widgets.html b/_modules/siriushla/bo_ap_ramp/custom_widgets.html new file mode 100644 index 000000000..09c9de713 --- /dev/null +++ b/_modules/siriushla/bo_ap_ramp/custom_widgets.html @@ -0,0 +1,358 @@ + + + + + + siriushla.bo_ap_ramp.custom_widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.bo_ap_ramp.custom_widgets

+
+import numpy as _np
+
+from qtpy.QtGui import QColor
+from qtpy.QtCore import Qt, QLocale
+from qtpy.QtWidgets import QLineEdit, QTableWidget, QTableWidgetItem, \
+    QStyledItemDelegate, QToolTip
+from pyqtgraph import functions
+
+from siriushla.widgets import QDoubleSpinBoxPlus, SiriusWaveformPlot
+from siriushla.as_ap_configdb import LoadConfigDialog as _LoadConfigDialog
+
+
+
+[docs] +class MyTableWidget(QTableWidget): + """Reimplement mousePressEvent to show contextMenu.""" + + def __init__(self, parent=None, show_menu_fun=None, open_window_fun=None): + super().__init__(parent) + self.show_menu_fun = show_menu_fun + self.open_window_fun = open_window_fun + +
+[docs] + def mousePressEvent(self, ev): + if ev.button() == Qt.RightButton: + self.show_menu_fun(ev.pos()) + super().mousePressEvent(ev)
+ + +
+[docs] + def mouseDoubleClickEvent(self, ev): + self.open_window_fun(ev.pos()) + super().mouseDoubleClickEvent(ev)
+
+ + + +
+[docs] +class SpinBoxDelegate(QStyledItemDelegate): + """Auxiliar class to draw a SpinBox in table items on editing.""" + + def __init__(self, parent, mini, maxi, prec): + super().__init__(parent) + self.mini = mini + self.maxi = maxi + self.prec = prec + +
+[docs] + def createEditor(self, parent, option, index): + """Create editor.""" + editor = QDoubleSpinBoxPlus(parent) + editor.setMinimum(self.mini) + editor.setMaximum(self.maxi) + editor.setDecimals(self.prec) + locale = QLocale(QLocale.English, country=QLocale.UnitedStates) + locale.setNumberOptions(locale.RejectGroupSeparator) + editor.setLocale(locale) + return editor
+ + +
+[docs] + def setEditorData(self, spinBox, index): + """Set editor data.""" + value = index.model().data(index, Qt.EditRole) + spinBox.setValue(float(value))
+ + +
+[docs] + def setModelData(self, spinBox, model, index): + """Set model data.""" + spinBox.interpretText() + value = spinBox.value() + model.setData(index, value, Qt.EditRole)
+ + +
+[docs] + def updateEditorGeometry(self, spinBox, option, index): + """Update editor geometry.""" + spinBox.setGeometry(option.rect)
+ + +
+[docs] + def displayText(self, value, locale): + try: + number = float(value) + except ValueError: + return super().displayText(value, locale) + else: + return locale.toString(number, format='f', precision=self.prec)
+
+ + + +
+[docs] +class CustomTableWidgetItem(QTableWidgetItem): + """Auxiliar class to make a table column sortable by numeric data.""" + + def __init__(self, value): + """Initialize object.""" + super().__init__('{}'.format(value)) + + def __lt__(self, other): + """Change default sort method to sort by numeric data.""" + if isinstance(other, CustomTableWidgetItem): + selfDataValue = float(self.data(Qt.EditRole)) + otherDataValue = float(other.data(Qt.EditRole)) + return selfDataValue < otherDataValue + else: + return QTableWidgetItem.__lt__(self, other)
+ + + +
+[docs] +class ConfigLineEdit(QLineEdit): + """Line Edit to choose a configuration.""" + + def __init__(self, config_type, *args, **kwargs): + super().__init__(*args, **kwargs) + self._configtype = config_type + +
+[docs] + def mouseReleaseEvent(self, ev): + popup = _LoadConfigDialog(self._configtype) + popup.configname.connect(self.setText) + popup.exec_()
+
+ + + +
+[docs] +class GraphKicks(SiriusWaveformPlot): + """Kick Graph.""" + + def __init__(self, parent=None, xdata=list(), ydata=list(), + tooltip_names=list(), c0=0, color='blue'): + """Init.""" + super().__init__(parent) + self.setBackgroundColor(QColor(255, 255, 255)) + self.setAutoRangeX(True) + self.setAutoRangeY(True) + self.setShowXGrid(True) + self.setShowYGrid(True) + self.setObjectName('graph') + self.setStyleSheet('#graph{min-width:32em;min-height:14em;}') + + self.xdata = xdata + self.ydata = ydata + self.tooltip_names = tooltip_names + self.c0 = c0 + + self.addChannel( + y_channel='Kicks', x_channel='Pos', + color=color, lineWidth=2, symbol='o', symbolSize=10) + self.curve = self.curveAtIndex(0) + self.curve.receiveXWaveform(xdata) + self.curve.receiveYWaveform(ydata) + self.curve.redrawCurve() + + self.addChannel( + y_channel='Mean', x_channel='Pos', + color='black', lineStyle=1, lineWidth=2) + self.mean = self.curveAtIndex(1) + self.mean.receiveXWaveform(xdata) + self.mean.receiveYWaveform(_np.array([_np.mean(ydata)]*len(ydata))) + self.mean.redrawCurve() + + # connect sigMouseMoved + self.plotItem.scene().sigMouseMoved.connect(self._handle_mouse_moved) + + def _handle_mouse_moved(self, pos): + unit = 'urad' + + posx = self.curve.scatter.mapFromScene(pos).x() + posx = posx % self.c0 + ind = _np.argmin(_np.abs(_np.array(self.xdata)-posx)) + posy = self.curve.scatter.mapFromScene(pos).y() + + sca, prf = functions.siScale(posy) + txt = '{0:s}, y = {1:.3f} {2:s}'.format( + self.tooltip_names[ind], sca*posy, prf+unit) + QToolTip.showText( + self.mapToGlobal(pos.toPoint()), txt, self, self.geometry(), 500)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/common/afc_acq_core/base.html b/_modules/siriushla/common/afc_acq_core/base.html new file mode 100644 index 000000000..1dbc09d11 --- /dev/null +++ b/_modules/siriushla/common/afc_acq_core/base.html @@ -0,0 +1,188 @@ + + + + + + siriushla.common.afc_acq_core.base — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.common.afc_acq_core.base

+"""Base."""
+
+from qtpy.QtWidgets import QWidget
+
+from siriuspy.namesys import SiriusPVName as _PVName
+
+
+
+[docs] +class BaseWidget(QWidget): + + def __init__(self, parent=None, prefix='', device=''): + super().__init__(parent) + self.prefix = prefix + self.device = _PVName(device) + self.sec = self.device.sec if self.device.sec != 'IA' else 'SI' + self.setObjectName(self.sec+'App') + +
+[docs] + def get_pvname(self, propty): + addr = self.device.substitute( + prefix=self.prefix, propty=propty) + return addr
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/common/afc_acq_core/triggers.html b/_modules/siriushla/common/afc_acq_core/triggers.html new file mode 100644 index 000000000..197879f8d --- /dev/null +++ b/_modules/siriushla/common/afc_acq_core/triggers.html @@ -0,0 +1,382 @@ + + + + + + siriushla.common.afc_acq_core.triggers — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.common.afc_acq_core.triggers

+"""Trigger windows."""
+
+from qtpy.QtWidgets import QHBoxLayout, QGridLayout, QLabel, QFormLayout, \
+    QGroupBox
+from qtpy.QtCore import Qt
+
+from pydm.widgets import PyDMPushButton, PyDMEnumComboBox
+
+from siriuspy.namesys import SiriusPVName
+from siriuspy.search import HLTimeSearch
+
+from ...widgets import SiriusLabel, SiriusLineEdit
+
+from .base import BaseWidget
+
+
+
+[docs] +class PhysicalTriggers(BaseWidget): + """Physical triggers.""" + + def __init__(self, parent=None, prefix='', device=''): + super().__init__(parent=parent, prefix=prefix, device=device) + self.afctiming = SiriusPVName( + f'IA-{self.device.sub[:2]}RaBPM:TI-AMCFPGAEVR') + self.setupui() + +
+[docs] + def setupui(self): + gdl = QGridLayout(self) + lab = QLabel('<h2>' + self.device + ' Physical Triggers</h2>') + lab.setAlignment(Qt.AlignCenter) + gdl.addWidget(lab, 0, 0, 1, 2) + for i in range(8): + grpbx = self.get_trigger_groupbox(i) + gdl.addWidget(grpbx, (i // 2)+1, i % 2)
+ + +
+[docs] + def get_trigger_groupbox(self, idx): + trig = 'TRIGGER{0:d}'.format(idx) + hltrig = HLTimeSearch.get_hl_from_ll_triggers( + self.afctiming.substitute(propty_name=f'CRT{idx}')) + name = trig + (': ' + hltrig if hltrig else '') + grpbx = QGroupBox(name, self) + fbl = QFormLayout(grpbx) + + hbl = QHBoxLayout() + lab = QLabel('Direction', grpbx) + fbl.addRow(lab, hbl) + enum = PyDMEnumComboBox( + grpbx, init_channel=self.get_pvname(trig+'Dir-Sel')) + hbl.addWidget(enum) + lab = SiriusLabel( + grpbx, init_channel=self.get_pvname(trig+'Dir-Sts')) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + + hbl = QHBoxLayout() + lab = QLabel('Polarity', grpbx) + fbl.addRow(lab, hbl) + enum = PyDMEnumComboBox( + grpbx, init_channel=self.get_pvname(trig+'DirPol-Sel')) + hbl.addWidget(enum) + lab = SiriusLabel( + grpbx, init_channel=self.get_pvname(trig+'DirPol-Sts')) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + + lab = QLabel('', grpbx) + hbl = QHBoxLayout() + fbl.addRow(lab, hbl) + lab = QLabel('Receiver', grpbx) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + hbl.addSpacing(15) + lab = QLabel('Transmitter', grpbx) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + + lab = QLabel('Counter', grpbx) + hbl = QHBoxLayout() + fbl.addRow(lab, hbl) + pbt = PyDMPushButton( + grpbx, label='Reset', pressValue=1, + init_channel=self.get_pvname(trig+'RcvCntRst-Cmd')) + hbl.addWidget(pbt) + lab = SiriusLabel( + grpbx, init_channel=self.get_pvname(trig+'RcvCnt-Mon')) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + hbl.addSpacing(20) + pbt = PyDMPushButton( + grpbx, label='Reset', pressValue=1, + init_channel=self.get_pvname(trig+'TrnCntRst-Cmd')) + hbl.addWidget(pbt) + lab = SiriusLabel( + grpbx, init_channel=self.get_pvname(trig+'TrnCnt-Mon')) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + + lab = QLabel('Length', grpbx) + hbl = QHBoxLayout() + fbl.addRow(lab, hbl) + pvn = trig+'RcvLen-SP' + chan = self.get_pvname(pvn) + spbx = SiriusLineEdit(grpbx, init_channel=chan) + hbl.addWidget(spbx) + lab = SiriusLabel( + grpbx, init_channel=self.get_pvname(trig+'RcvLen-RB')) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + hbl.addSpacing(20) + pvn = trig+'TrnLen-SP' + chan = self.get_pvname(pvn) + spbx = SiriusLineEdit(grpbx, init_channel=chan) + hbl.addWidget(spbx) + lab = SiriusLabel( + grpbx, init_channel=self.get_pvname(trig+'TrnLen-RB')) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + return grpbx
+
+ + + +
+[docs] +class LogicalTriggers(BaseWidget): + """Logical triggers.""" + + def __init__( + self, parent=None, prefix='', device='', names=None, trig_tp=''): + super().__init__(parent=parent, prefix=prefix, device=device) + self.trig_tp = trig_tp + self.names = names + self.setupui() + +
+[docs] + def setupui(self): + gdl = QGridLayout(self) + name = self.device + if self.trig_tp: + name += ' ' + self.trig_tp[1:] + lab = QLabel('<h2>' + name + ' Logical Triggers</h2>') + lab.setAlignment(Qt.AlignCenter) + gdl.addWidget(lab, 0, 0, 1, 3) + for i in range(24): + grpbx = self.get_trigger_groupbox(i) + gdl.addWidget(grpbx, (i // 3)+1, i % 3)
+ + +
+[docs] + def get_trigger_groupbox(self, idx): + trig = 'TRIGGER{0:s}{1:d}'.format(self.trig_tp, idx) + grpbx = QGroupBox(trig, self) + fbl = QFormLayout(grpbx) + + lab = QLabel('', grpbx) + hbl = QHBoxLayout() + fbl.addRow(lab, hbl) + name = 'Receiver' + if not self.trig_tp: + tname = self.names[idx] if self.names else '' + if tname and not tname.startswith('Unconn'): + name += ': ' + tname + lab = QLabel(name, grpbx) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + hbl.addSpacing(15) + lab = QLabel('Transmitter', grpbx) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + + lab = QLabel('Source', grpbx) + hbl = QHBoxLayout() + fbl.addRow(lab, hbl) + enum = PyDMEnumComboBox( + grpbx, init_channel=self.get_pvname(trig+'RcvSrc-Sel')) + hbl.addWidget(enum) + lab = SiriusLabel( + grpbx, init_channel=self.get_pvname(trig+'RcvSrc-Sts')) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + hbl.addSpacing(20) + enum = PyDMEnumComboBox( + grpbx, init_channel=self.get_pvname(trig+'TrnSrc-Sel')) + hbl.addWidget(enum) + lab = SiriusLabel( + grpbx, init_channel=self.get_pvname(trig+'TrnSrc-Sts')) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + + lab = QLabel('Selection', grpbx) + hbl = QHBoxLayout() + fbl.addRow(lab, hbl) + pvn = trig+'RcvInSel-SP' + chan = self.get_pvname(pvn) + spbx = SiriusLineEdit(grpbx, init_channel=chan) + hbl.addWidget(spbx) + lab = SiriusLabel( + grpbx, init_channel=self.get_pvname(trig+'RcvInSel-RB')) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + hbl.addSpacing(20) + pvn = trig+'TrnOutSel-SP' + chan = self.get_pvname(pvn) + spbx = SiriusLineEdit(grpbx, init_channel=chan) + hbl.addWidget(spbx) + lab = SiriusLabel( + grpbx, init_channel=self.get_pvname(trig+'TrnOutSel-RB')) + lab.setAlignment(Qt.AlignCenter) + hbl.addWidget(lab) + return grpbx
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/common/cam_basler/base.html b/_modules/siriushla/common/cam_basler/base.html new file mode 100644 index 000000000..77ebfab65 --- /dev/null +++ b/_modules/siriushla/common/cam_basler/base.html @@ -0,0 +1,792 @@ + + + + + + siriushla.common.cam_basler.base — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.common.cam_basler.base

+"""SiriusScrnView widget."""
+
+import time
+from copy import deepcopy as _dcopy
+import numpy as np
+from qtpy.QtWidgets import QHBoxLayout, QSizePolicy as QSzPlcy, QVBoxLayout, \
+    QToolTip
+from qtpy.QtCore import Qt, Slot, Signal, Property
+from pydm.widgets import PyDMImageView, PyDMPushButton, PyDMEnumComboBox, \
+    PyDMLineEdit
+from pydm.widgets.channel import PyDMChannel
+
+from siriushla.widgets import PyDMStateButton, SiriusLedState, SiriusLabel, \
+    SiriusSpinbox
+
+
+
+[docs] +class SiriusImageView(PyDMImageView): + """A PyDMImageView with methods to handle screens calibration grids.""" + + receivedData = Signal() + failToSaveGrid = Signal() + + def __init__(self, parent=None, + image_channel=None, width_channel=None, + offsetx_channel=None, offsety_channel=None, + maxwidth_channel=None, maxheight_channel=None): + """Initialize the object.""" + super().__init__( + parent=parent, image_channel=image_channel, + width_channel=width_channel) + self._channels.extend(4*[None, ]) + self._calibration_grid_image = None + self._calibration_grid_maxdata = None + self._calibration_grid_width = None + self._calibration_grid_filterfactor = 0.25 + self._calibration_grid_removeborder = 150 + self._image_roi_offsetx = 0 + self._offsetxchannel = None + self._image_roi_offsety = 0 + self._offsetychannel = None + self._image_maxwidth = 0 + self._maxwidthchannel = None + self._image_maxheight = 0 + self._maxheightchannel = None + self._show_calibration_grid = False + # Set live channels if requested on initialization + if offsetx_channel: + self.ROIOffsetXChannel = offsetx_channel + if offsety_channel: + self.ROIOffsetYChannel = offsety_channel + if maxwidth_channel: + self.maxWidthChannel = maxwidth_channel + if maxheight_channel: + self.maxHeightChannel = maxheight_channel + self.colorMap = self.Jet + # connect sigMouseMoved + self.scene.sigMouseMoved.connect(self._handle_mouse_moved) + +
+[docs] + @Slot() + def saveCalibrationGrid(self): + """Save current image as calibration_grid_image.""" + for i in range(40): + if self.image_waveform.size == ( + self.image_maxwidth*self.image_maxheight): + img = self.image_waveform.copy() + self._calibration_grid_orig = img + self._calibration_grid_width = self.imageWidth + self._calibration_grid_maxdata = img.max() + self._update_calibration_grid_image() + break + time.sleep(0.05) + else: + self.failToSaveGrid.emit()
+ + + def _update_calibration_grid_image(self): + img = _dcopy(self._calibration_grid_orig) + maxdata = self._calibration_grid_maxdata + border = self._calibration_grid_removeborder + if self.readingOrder == self.ReadingOrder.Clike: + roi = img.reshape((-1, self._calibration_grid_width), order='C') + else: + roi = img.reshape((self._calibration_grid_width, -1), order='F') + if border > 0: + roi[:, 0:border] = np.full((roi.shape[0], border), maxdata) + roi[:, -border:] = np.full((roi.shape[0], border), maxdata) + roi[0:border, :] = np.full((border, roi.shape[1]), maxdata) + roi[-border:, :] = np.full((border, roi.shape[1]), maxdata) + self._calibration_grid_image = np.where( + roi < self._calibration_grid_filterfactor*maxdata, True, False) + +
+[docs] + @Slot(bool) + def showCalibrationGrid(self, show): + """Show calibration_grid_image over the current image_waveform.""" + self._show_calibration_grid = show + self.needs_redraw = True
+ + + @property + def calibrationGrid(self): + """Return Numpy array containing original grid.""" + return _dcopy(self._calibration_grid_orig) + + @calibrationGrid.setter + def calibrationGrid(self, data): + """Receive a list 'data' which elements are: [width, new_grid:].""" + self._calibration_grid_orig = data[1:] + self._calibration_grid_width = int(data[0]) + self._calibration_grid_maxdata = data[1:].max() + self._update_calibration_grid_image() + self.needs_redraw = True + + @property + def calibration_grid_filterfactor(self): + """Factor used to filter calibration grid. + + Pixels with values smaller than filterfactor*img_maxdata + are set to zero. + + Returns + ------- + float + Calibration Grid Filter Factor + + """ + return self._calibration_grid_filterfactor*100 + + @property + def calibration_grid_removeborder(self): + """Factor used to remove border of the calibration grid. + + Returns + ------- + float + Number of Rows/Columns to be removed + + """ + return self._calibration_grid_removeborder + +
+[docs] + def set_calibration_grid_filterfactor(self, value): + """Set factor used to filter calibration grid. + + Pixels with values smaller than filterfactor*img_maxdata + are set to zero. + + Parameters + ---------- + value: int + Calibration Grid Filter Factor + + """ + value /= 100 + if value >= 0 and self._calibration_grid_filterfactor != value: + self._calibration_grid_filterfactor = value + if self._calibration_grid_image is not None: + self._update_calibration_grid_image() + self.needs_redraw = True
+ + +
+[docs] + def set_calibration_grid_border2remove(self, value): + """Set factor used to remove border of the calibration grid. + + Parameters + ---------- + value: int + Number of Rows/Columns to be removed + + """ + self._calibration_grid_removeborder = value + if self._calibration_grid_image is not None: + self._update_calibration_grid_image() + self.needs_redraw = True
+ + +
+[docs] + def process_image(self, image): + """Reimplement process_image method to add grid to image.""" + self.receivedData.emit() + image2process = _dcopy(image) + if ((self._show_calibration_grid) and + (self._calibration_grid_image is not None)): + try: + grid = self._adjust_calibration_grid(image2process) + image2process[grid] = self._calibration_grid_maxdata + except Exception: + print('Grid dimentions do not match image dimentions!') + return image2process
+ + + def _adjust_calibration_grid(self, img): + height = np.size(img, 0) + width = np.size(img, 1) + grid = self._calibration_grid_image[ + self._image_roi_offsety:(self._image_roi_offsety+height), + self._image_roi_offsetx:(self._image_roi_offsetx+width)] + return grid + +
+[docs] + def roioffsetx_connection_state_changed(self, conn): + """ + Run when the ROIOffsetX Channel connection state changes. + + Parameters + ---------- + conn : bool + The new connection state. + + """ + if not conn: + self._image_roi_offsetx = 0
+ + +
+[docs] + def roioffsety_connection_state_changed(self, conn): + """ + Run when the ROIOffsetY Channel connection state changes. + + Parameters + ---------- + conn : bool + The new connection state. + + """ + if not conn: + self._image_roi_offsety = 0
+ + +
+[docs] + def image_roioffsetx_changed(self, new_offset): + """ + Run when the ROIOffsetX Channel value changes. + + Parameters + ---------- + new_offsetx : int + The new image ROI horizontal offset + + """ + if new_offset is None: + return + self._image_roi_offsetx = new_offset
+ + +
+[docs] + def image_roioffsety_changed(self, new_offset): + """ + Run when the ROIOffsetY Channel value changes. + + Parameters + ---------- + new_offsety : int + The new image ROI vertical offset + + """ + if new_offset is None: + return + self._image_roi_offsety = new_offset
+ + + @property + def image_maxwidth(self): + """Return image maximum width.""" + return self._image_maxwidth + +
+[docs] + def image_maxwidth_changed(self, new_max): + """ + Run when the maxWidth Channel value changes. + + Parameters + ---------- + new_max : int + The new image max width + + """ + if new_max is None: + return + self._image_maxwidth = int(new_max)
+ + + @property + def image_maxheight(self): + """Return image maximum height.""" + return self._image_maxheight + +
+[docs] + def image_maxheight_changed(self, new_max): + """ + Run when the maxHeight Channel value changes. + + Parameters + ---------- + new_max : int + The new image max height + + """ + if new_max is None: + return + self._image_maxheight = int(new_max)
+ + + @Property(str) + def ROIOffsetXChannel(self): + """ + Return the channel address in use for the image ROI horizontal offset. + + Returns + ------- + str + Channel address + + """ + if self._offsetxchannel: + return str(self._offsetxchannel.address) + else: + return '' + + @ROIOffsetXChannel.setter + def ROIOffsetXChannel(self, value): + """ + Return the channel address in use for the image ROI horizontal offset. + + Parameters + ---------- + value : str + Channel address + + """ + if self._offsetxchannel != value: + # Disconnect old channel + if self._offsetxchannel: + self._offsetxchannel.disconnect() + # Create and connect new channel + self._offsetxchannel = PyDMChannel( + address=value, + connection_slot=self.roioffsetx_connection_state_changed, + value_slot=self.image_roioffsetx_changed, + severity_slot=self.alarmSeverityChanged) + self._channels[2] = self._offsetxchannel + self._offsetxchannel.connect() + + @Property(str) + def ROIOffsetYChannel(self): + """ + Return the channel address in use for the image ROI vertical offset. + + Returns + ------- + str + Channel address + + """ + if self._offsetychannel: + return str(self._offsetychannel.address) + else: + return '' + + @ROIOffsetYChannel.setter + def ROIOffsetYChannel(self, value): + """ + Return the channel address in use for the image ROI vertical offset. + + Parameters + ---------- + value : str + Channel address + + """ + if self._offsetychannel != value: + # Disconnect old channel + if self._offsetychannel: + self._offsetychannel.disconnect() + # Create and connect new channel + self._offsetychannel = PyDMChannel( + address=value, + connection_slot=self.roioffsety_connection_state_changed, + value_slot=self.image_roioffsety_changed, + severity_slot=self.alarmSeverityChanged) + self._channels[3] = self._offsetychannel + self._offsetychannel.connect() + + @Property(str) + def maxWidthChannel(self): + """ + Return the channel address in use for the image maximum width. + + Returns + ------- + str + Channel address + + """ + if self._maxwidthchannel: + return str(self._maxwidthchannel.address) + else: + return '' + + @maxWidthChannel.setter + def maxWidthChannel(self, value): + """ + Return the channel address in use for the image maximum width. + + Parameters + ---------- + value : str + Channel address + + """ + if self._maxwidthchannel != value: + # Disconnect old channel + if self._maxwidthchannel: + self._maxwidthchannel.disconnect() + # Create and connect new channel + self._maxwidthchannel = PyDMChannel( + address=value, + value_slot=self.image_maxwidth_changed, + severity_slot=self.alarmSeverityChanged) + self._channels[4] = self._maxwidthchannel + self._maxwidthchannel.connect() + + @Property(str) + def maxHeightChannel(self): + """ + Return the channel address in use for the image maximum height. + + Returns + ------- + str + Channel address + + """ + if self._maxheightchannel: + return str(self._maxheightchannel.address) + else: + return '' + + @maxHeightChannel.setter + def maxHeightChannel(self, value): + """ + Return the channel address in use for the image maximum height. + + Parameters + ---------- + value : str + Channel address + + """ + if self._maxheightchannel != value: + # Disconnect old channel + if self._maxheightchannel: + self._maxheightchannel.disconnect() + # Create and connect new channel + self._maxheightchannel = PyDMChannel( + address=value, + value_slot=self.image_maxheight_changed, + severity_slot=self.alarmSeverityChanged) + self._channels[5] = self._maxheightchannel + self._maxheightchannel.connect() + + def _handle_mouse_moved(self, pos): + pos_scene = self.view.vb.mapSceneToView(pos) + txt = '{0}, {1}'.format(round(pos_scene.x()), + round(pos_scene.y())) + QToolTip.showText( + self.mapToGlobal(pos.toPoint()), txt, + self, self.geometry(), 5000)
+ + + +
+[docs] +def create_propty_layout(parent, prefix, propty, propty_type='', cmd=dict(), + layout='hbox', width=7.10, height=1.29, + use_linedit=False): + """Return a layout that handles a property according to 'propty_type'.""" + if layout == 'hbox': + layout = QHBoxLayout() + elif layout == 'vbox': + layout = QVBoxLayout() + + if propty_type == 'sprb': + if use_linedit: + sp = PyDMLineEdit(parent, prefix.substitute( + propty_name=propty, propty_suffix='SP')) + setattr(parent, 'le_'+propty, sp) + else: + sp = SiriusSpinbox(parent, prefix.substitute( + propty_name=propty, propty_suffix='SP')) + setattr(parent, 'sb_'+propty, sp) + sp.setStyleSheet(""" + min-width:wvalem; max-width:wvalem; min-height:hvalem; + max-height:hvalem;""".replace('wval', str(width)).replace( + 'hval', str(height))) + sp.setAlignment(Qt.AlignCenter) + layout.addWidget(sp) + label = SiriusLabel(parent, prefix.substitute( + propty_name=propty, propty_suffix='RB')) + setattr(parent, 'lb_'+propty, label) + if not cmd: + label.setStyleSheet(""" + min-width:wvalem; max-width:wvalem; min-height:hvalem; + max-height:hvalem;""".replace('wval', str(width)).replace( + 'hval', str(height))) + label.setAlignment(Qt.AlignCenter) + layout.addWidget(label) + elif propty_type == 'enbldisabl': + statebutton = PyDMStateButton(parent, prefix.substitute( + propty_name=propty, propty_suffix='Sel')) + setattr(parent, 'bt_'+propty, statebutton) + statebutton.setStyleSheet(""" + min-width:wvalem; max-width:wvalem; min-height:hvalem; + max-height:hvalem;""".replace('wval', str(width)).replace( + 'hval', str(height))) + statebutton.shape = 1 + layout.addWidget(statebutton) + led = SiriusLedState(parent, prefix.substitute( + propty_name=propty, propty_suffix='Sts')) + setattr(parent, 'led_'+propty, led) + led.setStyleSheet( + "min-width:1.29em; max-width:1.29em; " + "min-height:1.29em; max-height:1.29em;") + led.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.Maximum) + layout.addWidget(led) + elif propty_type == 'offon': + statebutton = PyDMStateButton(parent, prefix.substitute( + propty_name=propty, propty_suffix='Sel')) + setattr(parent, 'bt_'+propty, statebutton) + statebutton.setStyleSheet(""" + min-width:wvalem; max-width:wvalem; min-height:hvalem; + max-height:hvalem;""".replace('wval', str(width)).replace( + 'hval', str(height))) + statebutton.shape = 1 + layout.addWidget(statebutton) + label = SiriusLabel(parent, prefix.substitute( + propty_name=propty, propty_suffix='Sts')) + setattr(parent, 'lb_'+propty, label) + if not cmd: + label.setStyleSheet(""" + min-width:wvalem; max-width:wvalem; min-height:hvalem; + max-height:hvalem;""".replace('wval', str(width)).replace( + 'hval', str(height))) + label.setAlignment(Qt.AlignCenter) + layout.addWidget(label) + elif propty_type == 'enum': + combobox = PyDMEnumComboBox(parent, prefix.substitute( + propty_name=propty, propty_suffix='Sel')) + setattr(parent, 'cb_'+propty, combobox) + combobox.setStyleSheet(""" + min-width:wvalem; max-width:wvalem; min-height:hvalem; + max-height:hvalem;""".replace('wval', str(width)).replace( + 'hval', str(height))) + layout.addWidget(combobox) + label = SiriusLabel(parent, prefix.substitute( + propty_name=propty, propty_suffix='Sts')) + setattr(parent, 'lb_'+propty, label) + if not cmd: + label.setStyleSheet(""" + min-width:wvalem; max-width:wvalem; min-height:hvalem; + max-height:hvalem;""".replace('wval', str(width)).replace( + 'hval', str(height))) + label.setAlignment(Qt.AlignCenter) + layout.addWidget(label) + elif propty_type == 'mon': + label = SiriusLabel(parent, prefix.substitute( + propty_name=propty, propty_suffix='Mon')) + setattr(parent, 'lb_'+propty, label) + label.setStyleSheet(""" + min-width:wvalem; max-width:wvalem; min-height:hvalem; + max-height:hvalem;""".replace('wval', str(width)).replace( + 'hval', str(height))) + label.setAlignment(Qt.AlignCenter) + layout.addWidget(label) + elif propty_type == 'cte': + label = SiriusLabel(parent, prefix.substitute( + propty_name=propty, propty_suffix='Cte')) + setattr(parent, 'lb_'+propty, label) + label.setStyleSheet(""" + min-width:wvalem; max-width:wvalem; min-height:hvalem; + max-height:hvalem;""".replace('wval', str(width)).replace( + 'hval', str(height))) + label.setAlignment(Qt.AlignCenter) + layout.addWidget(label) + + if cmd: + pb = PyDMPushButton( + parent=parent, label=cmd['label'], + pressValue=cmd['pressValue']) + setattr(parent, 'pb_'+propty, pb) + pb.setObjectName('pb_'+propty) + if 'icon' in cmd.keys(): + pb.setIcon(cmd['icon']) + if 'toolTip' in cmd.keys(): + pb.setToolTip(cmd['toolTip']) + pb.channel = prefix.substitute( + propty_name=cmd['name'], propty_suffix='Cmd') + + _w = cmd['width']+'px' if 'width' in cmd.keys() else str(width)+'em' + _h = cmd['height']+'px' if 'height' in cmd.keys() else str(height)+'em' + stylesheet = """ + #pb_""" + propty + """{ + min-width:wval; max-width:wval; + min-height:hval; max-height:hval; + iconsize; + }""".replace('wval', _w).replace('hval', _h) + _is = 'icon-size:'+cmd['icon-size']+'px;' \ + if 'icon-size' in cmd.keys() else '' + stylesheet.replace('iconsize;', _is) + pb.setStyleSheet(stylesheet) + layout.addWidget(pb) + + layout.setAlignment(Qt.AlignVCenter) + return layout
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/common/cam_basler/settings.html b/_modules/siriushla/common/cam_basler/settings.html new file mode 100644 index 000000000..ba28ccb97 --- /dev/null +++ b/_modules/siriushla/common/cam_basler/settings.html @@ -0,0 +1,631 @@ + + + + + + siriushla.common.cam_basler.settings — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.common.cam_basler.settings

+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QTabWidget, QLabel, QFormLayout, \
+    QHBoxLayout, QPushButton
+import qtawesome as qta
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.namesys import SiriusPVName
+from siriushla import util
+from siriushla.widgets import SiriusLedAlert, SiriusLabel
+from siriushla.widgets.windows import create_window_from_widget
+from .base import create_propty_layout
+
+
+
+[docs] +class BaslerCamSettings(QTabWidget): + + def __init__(self, parent=None, device='', prefix=''): + super().__init__(parent) + self.prefix = prefix + self.device = SiriusPVName(device).substitute(prefix=prefix) + self.cam_prefix = self.device.substitute(prefix=prefix) + self.setObjectName(self.device.sec + 'App') + self._setupUi() + + def _setupUi(self): + self.addTab(self._infoWidget(), 'Gen. Info') + self.addTab(self._statusWidget(), 'Status') + self.addTab(self._acquisitionWidget(), 'Acquisition') + self.addTab(self._imgIntesityAndBGWidget(), 'Intensity and BG') + self.addTab(self._ROIWidget(), 'ROI') + self.setCurrentIndex(2) + self.setStyleSheet( + '#'+self.device.sec+'App{min-width: 31em; max-width: 31em;}') + + def _infoWidget(self): + label_DevID = QLabel('Device ID:', self) + hbox_DevID = create_propty_layout( + parent=self, prefix=self.cam_prefix, width=15, + propty='DeviceID', propty_type='cte') + hbox_DevID.setAlignment(Qt.AlignLeft) + + label_DevVers = QLabel('Device Version:', self) + hbox_DevVers = create_propty_layout( + parent=self, prefix=self.cam_prefix, width=15, + propty='DeviceVersion', propty_type='cte') + hbox_DevVers.setAlignment(Qt.AlignLeft) + + label_DevModelName = QLabel('Device Model Name:', self) + hbox_DevModelName = create_propty_layout( + parent=self, prefix=self.cam_prefix, width=15, + propty='DeviceModelName', propty_type='cte') + hbox_DevModelName.setAlignment(Qt.AlignLeft) + + label_DevVendorName = QLabel('Device Vendor Name:', self) + hbox_DevVendorName = create_propty_layout( + parent=self, prefix=self.cam_prefix, width=15, + propty='DeviceVendorName', propty_type='cte') + hbox_DevVendorName.setAlignment(Qt.AlignLeft) + + label_DevFirmVers = QLabel('Firmware Version:', self) + hbox_DevFirmVers = create_propty_layout( + parent=self, prefix=self.cam_prefix, width=15, + propty='DeviceFirmwareVersion', propty_type='cte') + hbox_DevFirmVers.setAlignment(Qt.AlignLeft) + + label_SensorHeight = QLabel('Sensor Height [pixels]:', self) + hbox_SensorHeight = create_propty_layout( + parent=self, prefix=self.cam_prefix, width=15, + propty='SensorHeight', propty_type='cte') + hbox_SensorHeight.setAlignment(Qt.AlignLeft) + + label_SensorWidth = QLabel('Sensor Width [pixels]:', self) + hbox_SensorWidth = create_propty_layout( + parent=self, prefix=self.cam_prefix, width=15, + propty='SensorWidth', propty_type='cte') + hbox_SensorWidth.setAlignment(Qt.AlignLeft) + + wid = QWidget() + flay = QFormLayout(wid) + flay.setLabelAlignment(Qt.AlignRight) + flay.setFormAlignment(Qt.AlignHCenter) + flay.addRow(label_DevID, hbox_DevID) + flay.addRow(label_DevVers, hbox_DevVers) + flay.addRow(label_DevModelName, hbox_DevModelName) + flay.addRow(label_DevVendorName, hbox_DevVendorName) + flay.addRow(label_DevFirmVers, hbox_DevFirmVers) + flay.addRow(label_SensorHeight, hbox_SensorHeight) + flay.addRow(label_SensorWidth, hbox_SensorWidth) + return wid + + def _statusWidget(self): + label_Conn = QLabel('Connection:', self) + hbox_Conn = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='Connection', propty_type='mon') + + label_Temp = QLabel('Temperature State:', self) + self.lb_Temp = SiriusLabel( + self, self.cam_prefix.substitute(propty='Temp-Mon')) + self.lb_Temp.setStyleSheet('min-width:7.1em; max-width:7.1em;') + self.lb_Temp.setAlignment(Qt.AlignCenter) + self.led_TempState = SiriusLedAlert( + self, self.cam_prefix.substitute(propty='TempState-Mon')) + self.led_TempState.setStyleSheet('min-width:1.29em; max-width:1.29em;') + self.lb_TempState = SiriusLabel( + self, self.cam_prefix.substitute(propty='TempState-Mon')) + self.lb_TempState.setStyleSheet('min-width:2.5em; max-width:2.5em;') + hbox_Temp = QHBoxLayout() + hbox_Temp.addWidget(self.lb_Temp) + hbox_Temp.addWidget(self.led_TempState) + hbox_Temp.addWidget(self.lb_TempState) + + label_LastErr = QLabel('Last Error:', self) + hbox_LastErr = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='LastErr', propty_type='mon', + cmd={'label': 'Clear Last Error', 'pressValue': 1, + 'name': 'ClearLastErr'}) + + label_Reset = QLabel('Reset Camera:', self) + self.pb_dtl = PyDMPushButton( + label='', icon=qta.icon('fa5s.sync'), + parent=self, pressValue=1, + init_channel=self.cam_prefix.substitute(propty='Rst-Cmd')) + self.pb_dtl.setObjectName('reset') + self.pb_dtl.setStyleSheet( + "#reset{min-width:25px; max-width:25px; icon-size:20px;}") + + label_PowerReset = QLabel('Power Reset: ', self) + self.pb_power_reset = PyDMPushButton( + label='', icon=qta.icon('fa5s.sync'), + parent=self, pressValue=1, + init_channel=self.cam_prefix.substitute(propty='PoEReset-Cmd')) + self.pb_power_reset.setObjectName('power_reset') + self.pb_power_reset.setStyleSheet( + "#power_reset{min-width:25px; max-width:25px; icon-size:20px;}") + + wid = QWidget() + flay = QFormLayout(wid) + flay.setLabelAlignment(Qt.AlignRight) + flay.setFormAlignment(Qt.AlignHCenter) + flay.addRow(label_Conn, hbox_Conn) + flay.addRow(label_Temp, hbox_Temp) + flay.addRow(label_LastErr, hbox_LastErr) + flay.addRow(label_Reset, self.pb_dtl) + flay.addRow(label_PowerReset, self.pb_power_reset) + return wid + + def _acquisitionWidget(self): + label_CamEnbl = QLabel('Acquire Enable Status:', self) + hbox_CamEnbl = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='Enbl', propty_type='enbldisabl') + + label_FrameCnt = QLabel('Frame Count:', self) + hbox_FrameCnt = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='FrameCnt', propty_type='mon') + + label_AcqMode = QLabel('Acquire Mode:', self) + hbox_AcqMode = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='AcqMode', propty_type='enum') + + label_AcqPeriod = QLabel('Acquire Period [s]:', self) + hbox_AcqPeriod = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='AcqPeriod', propty_type='sprb') + + label_AcqPeriodLowLim = QLabel('Acquire Period Low Limit [s]:', self) + hbox_AcqPeriodLowLim = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='AcqPeriodLowLim', propty_type='sprb') + + label_ExpMode = QLabel('Exposure Mode:', self) + hbox_ExpMode = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='ExposureMode', propty_type='enum') + + label_ExpTime = QLabel('Exposure Time [us]:', self) + hbox_ExpTime = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='ExposureTime', propty_type='sprb') + + label_Gain = QLabel('Gain [dB]:', self) + hbox_Gain = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='Gain', propty_type='sprb', + cmd={'label': '', 'pressValue': 1, 'width': '25', 'height': '25', + 'icon': qta.icon('mdi.auto-fix'), 'icon-size': '20', + 'toolTip': 'Auto Gain', 'name': 'AutoGain'}) + + label_TransformType = QLabel('Transform Type:', self) + hbox_TransformType = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='TransformType', propty_type='enum') + + label_BlackLevel = QLabel('Black Level [gray va]:', self) + hbox_BlackLevel = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='BlackLevel', propty_type='sprb') + + label_DebouncerPeriod = QLabel('Debouncer Period [us]:', self) + hbox_DebouncerPeriod = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='DebouncerPeriod', propty_type='sprb') + + self.pb_advanced = QPushButton('Advanced', self) + my_window = create_window_from_widget( + BaslerCamAcqAdvSettings, is_main=False, + title='Basler Camera Advanced Acquisition Settings') + util.connect_window(self.pb_advanced, my_window, parent=self, + device=self.device, prefix=self.prefix) + hbox_adv = QHBoxLayout() + hbox_adv.addWidget(self.pb_advanced, alignment=Qt.AlignRight) + + wid = QWidget() + flay = QFormLayout(wid) + flay.setLabelAlignment(Qt.AlignRight) + flay.setFormAlignment(Qt.AlignHCenter) + flay.addRow(label_CamEnbl, hbox_CamEnbl) + flay.addRow(label_FrameCnt, hbox_FrameCnt) + flay.addRow(label_AcqMode, hbox_AcqMode) + flay.addRow(label_AcqPeriod, hbox_AcqPeriod) + flay.addRow(label_AcqPeriodLowLim, hbox_AcqPeriodLowLim) + flay.addRow(label_ExpMode, hbox_ExpMode) + flay.addRow(label_ExpTime, hbox_ExpTime) + flay.addRow(label_Gain, hbox_Gain) + flay.addRow(label_BlackLevel, hbox_BlackLevel) + flay.addRow(label_DebouncerPeriod, hbox_DebouncerPeriod) + flay.addRow(label_TransformType, hbox_TransformType) + flay.addRow(hbox_adv) + return wid + + def _imgIntesityAndBGWidget(self): + label_EnblAdjust = QLabel('Enable Scale and Offset Adjust:', self) + hbox_EnblAdjust = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='EnblOffsetScale', propty_type='enbldisabl') + + label_AutoAdjust = QLabel('Automatic Intensity Adjust:', self) + hbox_AutoAdjust = create_propty_layout( + parent=self, prefix=self.cam_prefix, propty='AutoOffsetScale', + cmd={'label': 'Auto Adjust', 'pressValue': 1, + 'name': 'AutoOffsetScale'}) + + label_PixelScale = QLabel('Pixel Scale:', self) + hbox_PixelScale = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='PixelScale', propty_type='sprb', use_linedit=True) + + label_PixelOffset = QLabel('Pixel Offset:', self) + hbox_PixelOffset = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='PixelOffset', propty_type='sprb', use_linedit=True) + + label_EnblLowClip = QLabel('Enable Low Cliping:', self) + hbox_EnblLowClip = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='EnblLowClip', propty_type='enbldisabl') + + label_LowClip = QLabel('Minimum Intensity for Low Cliping:', self) + hbox_LowClip = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='LowClip', propty_type='sprb', use_linedit=True) + + label_EnblHighClip = QLabel('Enable High Cliping:', self) + hbox_EnblHighClip = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='EnblHighClip', propty_type='enbldisabl') + + label_HighClip = QLabel('Maximum Intensity for High Cliping:', self) + hbox_HighClip = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='HighClip', propty_type='sprb', use_linedit=True) + + label_EnblBG = QLabel('Enable BG Subtraction:', self) + hbox_EnblBG = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='EnblBGSubtraction', propty_type='enbldisabl') + + label_SaveBG = QLabel('Save BG:', self) + hbox_SaveBG = create_propty_layout( + parent=self, prefix=self.cam_prefix, propty='SaveBG', + cmd={'label': 'Save', 'pressValue': 1, 'name': 'SaveBG'}) + + label_ValidBG = QLabel('Is valid BG?', self) + hbox_ValidBG = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='ValidBG', propty_type='mon') + + wid = QWidget() + flay = QFormLayout(wid) + flay.setLabelAlignment(Qt.AlignRight) + flay.setFormAlignment(Qt.AlignHCenter) + flay.addRow(label_EnblAdjust, hbox_EnblAdjust) + flay.addRow(label_AutoAdjust, hbox_AutoAdjust) + flay.addRow(label_PixelScale, hbox_PixelScale) + flay.addRow(label_PixelOffset, hbox_PixelOffset) + flay.addRow(label_EnblLowClip, hbox_EnblLowClip) + flay.addRow(label_LowClip, hbox_LowClip) + flay.addRow(label_EnblHighClip, hbox_EnblHighClip) + flay.addRow(label_HighClip, hbox_HighClip) + flay.addRow(label_EnblBG, hbox_EnblBG) + flay.addRow(label_SaveBG, hbox_SaveBG) + flay.addRow(label_ValidBG, hbox_ValidBG) + return wid + + def _ROIWidget(self): + label_MaxWidth = QLabel('Maximum Width [pixels]:', self) + self.lb_MaxWidth = SiriusLabel( + self, self.cam_prefix.substitute(propty='SensorWidth-Cte')) + self.lb_MaxWidth.setStyleSheet( + """max-width:7.10em; max-height:1.29em;""") + + label_MaxHeight = QLabel('Maximum Height [pixels]:', self) + self.lb_MaxHeight = SiriusLabel( + self, self.cam_prefix.substitute(propty='SensorHeight-Cte')) + self.lb_MaxHeight.setStyleSheet( + """max-width:7.10em; max-height:1.29em;""") + + label_ROIWidth = QLabel('Width [pixels]:', self) + hbox_ROIWidth = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='AOIWidth', propty_type='sprb') + + label_ROIHeight = QLabel('Heigth [pixels]:', self) + hbox_ROIHeight = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='AOIHeight', propty_type='sprb') + + label_ROIOffsetX = QLabel('Offset X [pixels]:', self) + hbox_ROIOffsetX = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='AOIOffsetX', propty_type='sprb') + + label_ROIOffsetY = QLabel('Offset Y [pixels]:', self) + hbox_ROIOffsetY = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='AOIOffsetY', propty_type='sprb') + + label_AutoCenterX = QLabel('Auto Center X:', self) + hbox_AutoCenterX = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='AOIAutoCenterX', propty_type='offon') + + label_AutoCenterY = QLabel('Auto Center Y:', self) + hbox_AutoCenterY = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='AOIAutoCenterY', propty_type='offon') + + wid = QWidget() + flay = QFormLayout(wid) + flay.setLabelAlignment(Qt.AlignRight) + flay.setFormAlignment(Qt.AlignHCenter) + flay.addRow(label_MaxWidth, self.lb_MaxWidth) + flay.addRow(label_MaxHeight, self.lb_MaxHeight) + flay.addRow(label_ROIWidth, hbox_ROIWidth) + flay.addRow(label_ROIHeight, hbox_ROIHeight) + flay.addRow(label_ROIOffsetX, hbox_ROIOffsetX) + flay.addRow(label_ROIOffsetY, hbox_ROIOffsetY) + flay.addRow(label_AutoCenterX, hbox_AutoCenterX) + flay.addRow(label_AutoCenterY, hbox_AutoCenterY) + return wid
+ + + +
+[docs] +class BaslerCamAcqAdvSettings(QWidget): + + def __init__(self, parent=None, device='', prefix=''): + super().__init__(parent) + self.prefix = prefix + self.device = SiriusPVName(device) + self.cam_prefix = self.device.substitute(propty=self.prefix) + self.setObjectName(self.device.sec + 'App') + self._setupUi() + + def _setupUi(self): + label = QLabel('<h3>' + self.device + + ' Advanced Acquisition Settings</h3>', + self, alignment=Qt.AlignHCenter) + label.setStyleSheet('max-height:1.29em;') + + label_DataType = QLabel('Data Type:', self) + hbox_DataType = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='DataType', propty_type='enum') + + label_BwAssigned = QLabel('Band Width Assigned [bytes]:', self) + hbox_BwAssigned = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='BwAssigned', propty_type='mon') + + label_BwReserve = QLabel('Band Width Reserved [%]:', self) + hbox_BwReserve = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='BwReserve', propty_type='sprb') + + label_BwReserveAccum = QLabel('Band Width Reserved Accum. [%]:', self) + hbox_BwReserveAccum = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='BwReserveAccum', propty_type='sprb') + + label_CurrentThroughput = QLabel('Current Throughput [bytes/s]:', self) + hbox_CurrentThroughput = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='CurrentThroughput', propty_type='mon') + + label_MaxThroughput = QLabel('Maximum Throughput [bytes/s]:', self) + hbox_MaxThroughput = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='MaxThroughput', propty_type='mon') + + label_FrameMaxJitter = QLabel('Frame Max Jitter [8 ns]:', self) + hbox_FrameMaxJitter = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='FrameMaxJitter', propty_type='mon') + + label_PacketSize = QLabel('Packet Size [bytes]:', self) + hbox_PacketSize = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='PacketSize', propty_type='sprb') + + label_PayloadSize = QLabel('Payload Size [bytes]:', self) + hbox_PayloadSize = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='PayloadSize', propty_type='mon') + + label_InterPacketDelay = QLabel('Inter Packet Delay [8 ns]:', self) + hbox_InterPacketDelay = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='InterPacketDelay', propty_type='sprb') + + label_ReadoutTime = QLabel('Readout Time [us]:', self) + hbox_ReadoutTime = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='ReadoutTime', propty_type='mon') + + label_ResultFrameRate = QLabel('Result Frame Rate:', self) + hbox_ResultFrameRate = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='ResultFrameRate', propty_type='mon') + + label_TransmDelay = QLabel('Inter Frame Delay [8 ns]:', self) + hbox_TransmDelay = create_propty_layout( + parent=self, prefix=self.cam_prefix, + propty='TransmDelay', propty_type='sprb') + + flay = QFormLayout(self) + flay.setLabelAlignment(Qt.AlignRight) + flay.setFormAlignment(Qt.AlignHCenter) + flay.addRow(label) + flay.addRow(label_DataType, hbox_DataType) + flay.addRow(label_BwAssigned, hbox_BwAssigned) + flay.addRow(label_BwReserve, hbox_BwReserve) + flay.addRow(label_BwReserveAccum, hbox_BwReserveAccum) + flay.addRow(label_CurrentThroughput, hbox_CurrentThroughput) + flay.addRow(label_MaxThroughput, hbox_MaxThroughput) + flay.addRow(label_FrameMaxJitter, hbox_FrameMaxJitter) + flay.addRow(label_PacketSize, hbox_PacketSize) + flay.addRow(label_PayloadSize, hbox_PayloadSize) + flay.addRow(label_InterPacketDelay, hbox_InterPacketDelay) + flay.addRow(label_ReadoutTime, hbox_ReadoutTime) + flay.addRow(label_ResultFrameRate, hbox_ResultFrameRate) + flay.addRow(label_TransmDelay, hbox_TransmDelay)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/common/diff_ctrl/base.html b/_modules/siriushla/common/diff_ctrl/base.html new file mode 100644 index 000000000..0b3882add --- /dev/null +++ b/_modules/siriushla/common/diff_ctrl/base.html @@ -0,0 +1,366 @@ + + + + + + siriushla.common.diff_ctrl.base — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.common.diff_ctrl.base

+#!/usr/bin/env python-sirius
+"""Scraper and Slit Monitor Base class."""
+
+import os as _os
+from qtpy.uic import loadUi
+from qtpy.QtCore import Qt, QEvent
+from qtpy.QtWidgets import QWidget, QVBoxLayout, QGroupBox, QPushButton, \
+    QLabel, QGridLayout, QScrollArea, QSizePolicy
+import qtawesome as qta
+from pydm.widgets import PyDMPushButton
+from pydm.utilities.macro import substitute_in_file as _substitute_in_file
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriushla.widgets import PyDMLedMultiChannel, SiriusLabel, SiriusSpinbox
+from siriushla import util
+from .details import DiffCtrlDetails as _DiffCtrlDetails
+
+
+
+[docs] +class DiffCtrlDevMonitor(QWidget): + """Diff Ctrl Dev Monitor Widget.""" + + def __init__(self, parent=None, prefix='', device=''): + """Init.""" + super(DiffCtrlDevMonitor, self).__init__(parent) + if not prefix: + self.prefix = _VACA_PREFIX + else: + self.prefix = prefix + self.device = _PVName(device) + self.device = self.device.substitute(prefix=self.prefix) + self.section = self.device.sec + self.orientation = self.device.dev[-1] + if 'Scrap' in self.device.device_name: + self.neg_name = 'Right' if self.orientation == 'H' else 'Bottom' + self.pos_name = 'Left' if self.orientation == 'H' else 'Top' + self.slit_name = 'Slit' + else: + self.neg_name = 'Negative' + self.pos_name = 'Positive' + self.slit_name = 'Edge' + self.neg_label = self.neg_name + ' ' + self.slit_name + self.pos_label = self.pos_name + ' ' + self.slit_name + self.setObjectName(self.section+'App') + self._setupUi() + self._createConnectors() + self._setupControlWidgets() + self.updateDevWidget() + + self.setStyleSheet(""" + SiriusSpinbox, SiriusLabel{ + min-width:5em; max-width: 5em; + }""") + + def _setupUi(self): + # status + label_status = QLabel( + 'Status: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + channels2values = { + self.device.substitute(propty='ForceComplete-Mon'): 1, + self.device.substitute(propty=self.neg_name+'DoneMov-Mon'): 1, + self.device.substitute(propty=self.pos_name+'DoneMov-Mon'): 1} + self.multiled_status = PyDMLedMultiChannel(self, channels2values) + self.multiled_status.setStyleSheet('QLed{max-width: 1.29em;}') + + self.pb_details = QPushButton(qta.icon('fa5s.ellipsis-h'), '', self) + self.pb_details.setToolTip('Open details') + self.pb_details.setObjectName('detail') + self.pb_details.setStyleSheet( + "#detail{min-width:25px; max-width:25px; icon-size:20px;}") + + util.connect_window( + self.pb_details, _DiffCtrlDetails, parent=self, + prefix=self.prefix, device=self.device, + neg_label=self.neg_label, pos_label=self.pos_label) + + self.lb_descctrl1 = QLabel( + '', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.sb_ctrl1 = SiriusSpinbox(self) + self.sb_ctrl1.precisionFromPV = False + self.sb_ctrl1.precision = 3 + self.lb_ctrl1 = SiriusLabel(self) + self.lb_ctrl1.precisionFromPV = False + self.lb_ctrl1.precision = 3 + self.lb_descctrl2 = QLabel( + '', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.sb_ctrl2 = SiriusSpinbox(self) + self.sb_ctrl2.precisionFromPV = False + self.sb_ctrl2.precision = 3 + self.lb_ctrl2 = SiriusLabel(self) + self.lb_ctrl2.precisionFromPV = False + self.lb_ctrl2.precision = 3 + + self.pb_open = PyDMPushButton( + parent=self, label='Go to maximum aperture', pressValue=1, + init_channel=self.device.substitute(propty='Home-Cmd')) + + tmp_file = _substitute_in_file( + _os.path.abspath(_os.path.dirname(__file__))+'/ui_as_ap_dev' + + self.orientation.lower()+'mon.ui', {'PREFIX': self.prefix}) + self.dev_widget = loadUi(tmp_file) + self.dev_widget.setObjectName('dev') + self.dev_widget_scrarea = QScrollArea() + self.dev_widget_scrarea.setObjectName('scrarea') + self.dev_widget_scrarea.setStyleSheet( + '#scrarea{background-color: transparent; max-width: 15em;}' + '#dev{background-color:transparent;}') + self.dev_widget_scrarea.setWidget(self.dev_widget) + self.dev_widget_scrarea.setSizePolicy( + QSizePolicy.Preferred, QSizePolicy.MinimumExpanding) + + lay = QGridLayout(self) + lay.setAlignment(Qt.AlignTop) + lay.addWidget(label_status, 0, 0) + lay.addWidget(self.multiled_status, 0, 1) + lay.addWidget(self.pb_details, 0, 2, alignment=Qt.AlignRight) + lay.addWidget(self.lb_descctrl1, 1, 0) + lay.addWidget(self.sb_ctrl1, 1, 1) + lay.addWidget(self.lb_ctrl1, 1, 2) + lay.addWidget(self.lb_descctrl2, 2, 0) + lay.addWidget(self.sb_ctrl2, 2, 1) + lay.addWidget(self.lb_ctrl2, 2, 2) + lay.addWidget(self.pb_open, 3, 0, 1, 3) + lay.addWidget(self.dev_widget_scrarea, 0, 3, 4, 1) + + def _createConnectors(self): + """Create connectors to monitor device positions.""" + raise NotImplementedError + + def _setDevPos(self, new_value): + """Set device widget positions.""" + raise NotImplementedError + + def _setupControlWidgets(self): + """Setup control widgets channels/labels.""" + raise NotImplementedError + +
+[docs] + def updateDevWidget(self): + """Update device illustration.""" + raise NotImplementedError
+ + +
+[docs] + def channels(self): + """Return channels.""" + raise NotImplementedError
+
+ + + +
+[docs] +class DiffCtrlView(QWidget): + """Diff Ctrl View Widget.""" + + DEVICE_PREFIX = '' + DEVICE_CLASS = None + + def __init__(self, parent=None, prefix=''): + """Init.""" + self.dev_type = 'Slits' if 'Slit' in self.DEVICE_PREFIX else 'Scrapers' + self.sec = _PVName(self.DEVICE_PREFIX).sec + super(DiffCtrlView, self).__init__(parent) + self.setObjectName(self.sec+'App') + + devname = 'Slits' if 'Slit' in self.DEVICE_PREFIX else 'Scrapers' + title = QLabel( + '<h3>' + self.sec + ' ' + devname + ' View</h3>', + alignment=Qt.AlignCenter) + title.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Maximum) + + gbox_h = QGroupBox(self.DEVICE_PREFIX + 'H') + self.dev_h = self.DEVICE_CLASS(self, prefix, self.DEVICE_PREFIX+'H') + lay_h = QVBoxLayout() + lay_h.addWidget(self.dev_h) + gbox_h.setLayout(lay_h) + + gbox_v = QGroupBox(self.DEVICE_PREFIX + 'V') + self.dev_v = self.DEVICE_CLASS(self, prefix, self.DEVICE_PREFIX+'V') + lay_v = QVBoxLayout() + lay_v.addWidget(self.dev_v) + gbox_v.setLayout(lay_v) + + lay = QVBoxLayout() + lay.setSpacing(20) + lay.addWidget(title) + lay.addWidget(gbox_h) + lay.addWidget(gbox_v) + self.setLayout(lay) + +
+[docs] + def changeEvent(self, event): + """Reimplement changeEvent.""" + if event.type() == QEvent.FontChange: + self.dev_h.updateDevWidget() + self.dev_v.updateDevWidget() + super().changeEvent(event)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/common/diff_ctrl/details.html b/_modules/siriushla/common/diff_ctrl/details.html new file mode 100644 index 000000000..10b0be50a --- /dev/null +++ b/_modules/siriushla/common/diff_ctrl/details.html @@ -0,0 +1,414 @@ + + + + + + siriushla.common.diff_ctrl.details — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.common.diff_ctrl.details

+"""DiffCtrl Details."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QGridLayout, QFormLayout, QLabel, QGroupBox
+from pydm.widgets import PyDMPushButton
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriushla.widgets import SiriusDialog, PyDMLed, SiriusLabel, \
+    SiriusSpinbox, PyDMStateButton, SiriusLedState
+
+
+
+[docs] +class DiffCtrlDetails(SiriusDialog): + """DiffCtrl Details.""" + + def __init__( + self, parent=None, prefix='', device='', + pos_label='', neg_label=''): + """Init.""" + super(DiffCtrlDetails, self).__init__(parent) + self.dev_prefix = _PVName(device).substitute(prefix=prefix) + self.setObjectName(self.dev_prefix.sec+'App') + self.neg_label = neg_label + self.neg_name = self.neg_label.split(' ')[0] + self.pos_label = pos_label + self.pos_name = self.pos_label.split(' ')[0] + self.slit_name = self.pos_label.split(' ')[1] + self._setupUi() + + def _setupUi(self): + lay = QGridLayout() + lay.setVerticalSpacing(15) + + label = QLabel( + '<h3>'+self.dev_prefix+' Control Details</h3>', self, + alignment=Qt.AlignCenter) + lay.addWidget(label, 0, 0) + + gbox_general = QGroupBox('Low Level Devices Prefixes', self) + gbox_general.setLayout(self._setupGeneralInfoLayout()) + + gbox_status = QGroupBox('Status', self) + gbox_status.setLayout(self._setupDetailedStatusLayout()) + + gbox_force = QGroupBox('Positions', self) + gbox_force.setLayout(self._setupPositionsLayout()) + + gbox_limits = QGroupBox('Limits', self) + gbox_limits.setLayout(self._setupLimitsLayout()) + + lay.addWidget(gbox_general, 1, 0) + lay.addWidget(gbox_status, 2, 0) + lay.addWidget(gbox_force, 3, 0) + lay.addWidget(gbox_limits, 4, 0) + + if 'Scrap' in self.dev_prefix: + gbox_backlash = QGroupBox('Backlash Compensation', self) + gbox_backlash.setLayout(self._setupBacklashCompLayout()) + lay.addWidget(gbox_backlash, 5, 0) + + self.setStyleSheet(""" + SiriusSpinbox, SiriusLabel{ + min-width: 7em; max-width: 7em; + }""") + self.setLayout(lay) + + def _setupGeneralInfoLayout(self): + label_negmtrctrlpref = QLabel( + self.neg_label + ' Motion Control: ', self) + self.lb_negmtrctrlpref = SiriusLabel( + self, self.dev_prefix.substitute( + propty=self.neg_name+'MotionCtrl-Cte')) + self.lb_negmtrctrlpref.setStyleSheet(""" + max-width:14.20em; max-height:1.29em;""") + + label_posmtrctrlpref = QLabel( + self.pos_label + ' Motion Control: ', self) + self.lb_posmtrctrlpref = SiriusLabel( + self, self.dev_prefix.substitute( + propty=self.pos_name+'MotionCtrl-Cte')) + self.lb_posmtrctrlpref.setStyleSheet(""" + max-width:14.20em; max-height:1.29em;""") + + flay = QFormLayout() + flay.addRow(label_negmtrctrlpref, self.lb_negmtrctrlpref) + flay.addRow(label_posmtrctrlpref, self.lb_posmtrctrlpref) + flay.setLabelAlignment(Qt.AlignRight) + flay.setFormAlignment(Qt.AlignCenter) + return flay + + def _setupDetailedStatusLayout(self): + label_negdonemov = QLabel( + self.neg_label + ' Motor Finished Move? ', self) + self.led_negdonemov = PyDMLed( + parent=self, init_channel=self.dev_prefix.substitute( + propty=self.neg_name+'DoneMov-Mon'), + color_list=[PyDMLed.Red, PyDMLed.LightGreen]) + self.led_negdonemov.setStyleSheet(""" + max-width:7.10em; max-height:1.29em;""") + + label_posdonemov = QLabel( + self.pos_label + ' Motor Finished Move? ', self) + self.led_posdonemov = PyDMLed( + parent=self, init_channel=self.dev_prefix.substitute( + propty=self.pos_name+'DoneMov-Mon'), + color_list=[PyDMLed.Red, PyDMLed.LightGreen]) + self.led_posdonemov.setStyleSheet(""" + max-width:7.10em; max-height:1.29em;""") + + label_convok = QLabel('Convertion from virtual to measured' + '\ncoordinates was succesfully done? ', self) + self.led_convok = PyDMLed( + parent=self, init_channel=self.dev_prefix.substitute( + propty='CoordConvErr-Mon'), + color_list=[PyDMLed.LightGreen, PyDMLed.Red]) + self.led_convok.setStyleSheet(""" + max-width:7.10em; max-height:1.29em;""") + + flay = QFormLayout() + flay.addRow(label_negdonemov, self.led_negdonemov) + flay.addRow(label_posdonemov, self.led_posdonemov) + flay.addRow(label_convok, self.led_convok) + flay.setLabelAlignment(Qt.AlignRight) + flay.setFormAlignment(Qt.AlignCenter) + return flay + + def _setupPositionsLayout(self): + self.pb_home = PyDMPushButton( + parent=self, label='Go to maximum aperture', pressValue=1, + init_channel=self.dev_prefix.substitute(propty='Home-Cmd')) + + self.pb_negdonemov = PyDMPushButton( + parent=self, label='Force ' + self.neg_label + ' Position', + pressValue=1, init_channel=self.dev_prefix.substitute( + propty='Force'+self.neg_name+self.slit_name+'Pos-Cmd')) + + self.pb_posdonemov = PyDMPushButton( + parent=self, label='Force ' + self.pos_label + ' Position', + pressValue=1, init_channel=self.dev_prefix.substitute( + propty='Force'+self.pos_name+self.slit_name+'Pos-Cmd')) + + for btn in [self.pb_home, + self.pb_negdonemov, + self.pb_posdonemov]: + btn.setDefault(False) + btn.setAutoDefault(False) + + label_forcecomplete = QLabel('Force Commands Completed? ', self) + self.led_forcecomplete = PyDMLed( + parent=self, init_channel=self.dev_prefix.substitute( + propty='ForceComplete-Mon'), + color_list=[PyDMLed.Red, PyDMLed.LightGreen]) + self.led_forcecomplete.setStyleSheet(""" + max-width:7.10em; max-height:1.29em;""") + + flay = QFormLayout() + flay.addRow(self.pb_home) + flay.addRow(self.pb_negdonemov) + flay.addRow(self.pb_posdonemov) + flay.addRow(label_forcecomplete, self.led_forcecomplete) + flay.setLabelAlignment(Qt.AlignRight) + flay.setFormAlignment(Qt.AlignCenter) + return flay + + def _setupLimitsLayout(self): + prefposi = self.pos_name if 'Scrap' in self.dev_prefix else 'Pos' + prefposi += self.slit_name + prefposo = self.pos_name if 'Scrap' in self.dev_prefix else 'High' + prefposo += self.slit_name if 'Scrap' in self.dev_prefix else '' + prefnegi = self.neg_name if 'Scrap' in self.dev_prefix else 'Neg' + prefnegi += self.slit_name + prefnego = self.neg_name if 'Scrap' in self.dev_prefix else 'Low' + prefnego += self.slit_name if 'Scrap' in self.dev_prefix else '' + + self.sb_posinnerlim = SiriusSpinbox( + self, self.dev_prefix.substitute(propty=prefposi+'InnerLim-SP')) + self.lb_posinnerlim = SiriusLabel( + self, self.dev_prefix.substitute(propty=prefposi+'InnerLim-RB'), + keep_unit=True) + self.lb_posinnerlim.showUnits = True + self.sb_posouterlim = SiriusSpinbox( + self, self.dev_prefix.substitute(propty=prefposo+'OuterLim-SP')) + self.lb_posouterlim = SiriusLabel( + self, self.dev_prefix.substitute(propty=prefposo+'OuterLim-RB'), + keep_unit=True) + self.lb_posouterlim.showUnits = True + self.sb_neginnerlim = SiriusSpinbox( + self, self.dev_prefix.substitute(propty=prefnegi+'InnerLim-SP')) + self.lb_neginnerlim = SiriusLabel( + self, self.dev_prefix.substitute(propty=prefnegi+'InnerLim-RB'), + keep_unit=True) + self.lb_neginnerlim.showUnits = True + self.sb_negouterlim = SiriusSpinbox( + self, self.dev_prefix.substitute(propty=prefnego+'OuterLim-SP')) + self.lb_negouterlim = SiriusLabel( + self, self.dev_prefix.substitute(propty=prefnego+'OuterLim-RB'), + keep_unit=True) + self.lb_negouterlim.showUnits = True + + lay = QGridLayout() + lay.setVerticalSpacing(15) + lay.addWidget(QLabel(self.pos_label+' Inner Limit:', self), 0, 0) + lay.addWidget(self.sb_posinnerlim, 0, 1) + lay.addWidget(self.lb_posinnerlim, 0, 2) + lay.addWidget(QLabel(self.pos_label+' Outer Limit:', self), 1, 0) + lay.addWidget(self.sb_posouterlim, 1, 1) + lay.addWidget(self.lb_posouterlim, 1, 2) + lay.addWidget(QLabel(self.neg_label+' Inner Limit:', self), 2, 0) + lay.addWidget(self.sb_neginnerlim, 2, 1) + lay.addWidget(self.lb_neginnerlim, 2, 2) + lay.addWidget(QLabel(self.neg_label+' Outer Limit:', self), 3, 0) + lay.addWidget(self.sb_negouterlim, 3, 1) + lay.addWidget(self.lb_negouterlim, 3, 2) + return lay + + def _setupBacklashCompLayout(self): + self.sb_enblbacklashcomp = PyDMStateButton( + self, self.dev_prefix.substitute( + propty='EnblBacklashComp-Sel')) + self.led_enblbacklashcomp = SiriusLedState( + self, self.dev_prefix.substitute( + propty='EnblBacklashComp-Sts')) + self.sb_posbacklashdist = SiriusSpinbox( + self, self.dev_prefix.substitute( + propty=self.pos_name+self.slit_name+'BacklashDist-SP')) + self.lb_posbacklashdist = SiriusLabel( + self, self.dev_prefix.substitute( + propty=self.pos_name+self.slit_name+'BacklashDist-RB'), + keep_unit=True) + self.lb_posbacklashdist.showUnits = True + self.sb_negbacklashdist = SiriusSpinbox( + self, self.dev_prefix.substitute( + propty=self.neg_name+self.slit_name+'BacklashDist-SP')) + self.lb_negbacklashdist = SiriusLabel( + self, self.dev_prefix.substitute( + propty=self.neg_name+self.slit_name+'BacklashDist-RB'), + keep_unit=True) + self.lb_negbacklashdist.showUnits = True + + lay = QGridLayout() + lay.setVerticalSpacing(15) + lay.addWidget(QLabel('Enable Backlash Compensation:', self), 0, 0) + lay.addWidget(self.sb_enblbacklashcomp, 0, 1) + lay.addWidget(self.led_enblbacklashcomp, 0, 2) + lay.addWidget(QLabel(self.pos_label+' Backlash Distance:', self), 1, 0) + lay.addWidget(self.sb_posbacklashdist, 1, 1) + lay.addWidget(self.lb_posbacklashdist, 1, 2) + lay.addWidget(QLabel(self.neg_label+' Backlash Distance:', self), 2, 0) + lay.addWidget(self.sb_negbacklashdist, 2, 1) + lay.addWidget(self.lb_negbacklashdist, 2, 2) + return lay
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/common/epics/task/checker.html b/_modules/siriushla/common/epics/task/checker.html new file mode 100644 index 000000000..d5a8167ae --- /dev/null +++ b/_modules/siriushla/common/epics/task/checker.html @@ -0,0 +1,196 @@ + + + + + + siriushla.common.epics.task.checker — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.common.epics.task.checker

+"""Epics Checker Task."""
+from .task import EpicsTask
+from ..wrapper import PyEpicsWrapper
+from qtpy.QtCore import Signal
+
+
+
+[docs] +class EpicsChecker(EpicsTask): + """Check if a set of PVs has the proper values.""" + + itemChecked = Signal(str, bool) + + def __init__(self, pvs, values, delays, cls_epics=PyEpicsWrapper, + parent=None, timeout=PyEpicsWrapper.TIMEOUT): + super().__init__(pvs, values, delays, cls_epics, parent, timeout) + +
+[docs] + def run(self): + """Thread execution.""" + if not self._quit_task: + for i, pvn in enumerate(self._pvnames): + self.currentItem.emit(pvn) + pv = self.get_pv(pvn) + val = self._values[i] + equal = pv.check(val, wait=self._timeout) + self.itemChecked.emit(pvn, equal) + self.itemDone.emit() + if self._quit_task: + break + self.completed.emit()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/common/epics/task/connector.html b/_modules/siriushla/common/epics/task/connector.html new file mode 100644 index 000000000..f2fd2a6a8 --- /dev/null +++ b/_modules/siriushla/common/epics/task/connector.html @@ -0,0 +1,199 @@ + + + + + + siriushla.common.epics.task.connector — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.common.epics.task.connector

+"""Epics Connector."""
+from .task import EpicsTask
+from ..wrapper import PyEpicsWrapper
+
+
+
+[docs] +class EpicsConnector(EpicsTask): + """Interface to execute some task. + + Allows a QThread to work with ProgressDialog widget. + Implements: + currentItem (Signal) + itemDone (Signal) + size (method) + exit_task (method) + """ + + def __init__(self, pvs, cls_epics=PyEpicsWrapper, parent=None): + super().__init__(pvs, None, None, cls_epics, parent) + +
+[docs] + def run(self): + """Thread execution.""" + if self._quit_task: + self.completed.emit() + return + for pvn in self._pvnames: + self.currentItem.emit(pvn) + self.get_pv(pvn) + self.itemDone.emit() + if self._quit_task: + break + self.completed.emit()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/common/epics/task/getter.html b/_modules/siriushla/common/epics/task/getter.html new file mode 100644 index 000000000..6a7da75ed --- /dev/null +++ b/_modules/siriushla/common/epics/task/getter.html @@ -0,0 +1,200 @@ + + + + + + siriushla.common.epics.task.getter — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.common.epics.task.getter

+"""Epics Getter."""
+from qtpy.QtCore import Signal, QVariant
+from .task import EpicsTask
+from ..wrapper import PyEpicsWrapper
+
+
+
+[docs] +class EpicsGetter(EpicsTask): + """Get value of a set of PVs.""" + + itemRead = Signal(str, QVariant) + itemNotRead = Signal(str) + + def __init__(self, pvs, defvals=None, cls_epics=PyEpicsWrapper, + parent=None, timeout=PyEpicsWrapper.TIMEOUT): + super().__init__(pvs, defvals, None, cls_epics, parent, timeout) + +
+[docs] + def run(self): + """Thread execution.""" + if not self._quit_task: + for i, pvn in enumerate(self._pvnames): + self.currentItem.emit(pvn) + value = self.get_pv(pvn).get(self._timeout) + if pvn.endswith('-Cmd') and self._values is not None: + self.itemRead.emit(pvn, QVariant(self._values[i])) + elif value is not None: + self.itemRead.emit(pvn, QVariant(value)) + else: + self.itemNotRead.emit(pvn) + self.itemDone.emit() + if self._quit_task: + break + self.completed.emit()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/common/epics/task/setter.html b/_modules/siriushla/common/epics/task/setter.html new file mode 100644 index 000000000..71c2ea3b0 --- /dev/null +++ b/_modules/siriushla/common/epics/task/setter.html @@ -0,0 +1,195 @@ + + + + + + siriushla.common.epics.task.setter — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.common.epics.task.setter

+"""Epics Setter."""
+import time
+import logging as _log
+from epics.ca import ChannelAccessGetFailure as _ChannelAccessGetFailure, \
+    CASeverityException as _CASeverityException
+from .task import EpicsTask
+
+
+
+[docs] +class EpicsSetter(EpicsTask): + """Set the value of a set of PVs.""" + +
+[docs] + def run(self): + """Thread execution.""" + if not self._quit_task: + for i, pvn in enumerate(self._pvnames): + self.currentItem.emit(pvn) + pv = self.get_pv(pvn) + try: + pv.put(self._values[i]) + time.sleep(self._delays[i]) + except (TypeError, _ChannelAccessGetFailure, _CASeverityException): + _log.warning('PV {} not set with value: {}'.format( + pvn, self._values[i])) + self.itemDone.emit() + if self._quit_task: + break + self.completed.emit()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/common/epics/task/task.html b/_modules/siriushla/common/epics/task/task.html new file mode 100644 index 000000000..68aaca69d --- /dev/null +++ b/_modules/siriushla/common/epics/task/task.html @@ -0,0 +1,228 @@ + + + + + + siriushla.common.epics.task.task — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.common.epics.task.task

+"""EpicsTask interface."""
+from qtpy.QtCore import QThread, Signal
+from ..wrapper import PyEpicsWrapper
+
+
+
+[docs] +class EpicsTask(QThread): + """Interface to execute some task. + + Allows a QThread to work with ProgressDialog widget. + Implements: + currentItem (Signal) + itemDone (Signal) + size (method) + exit_task (method) + """ + + PVs = dict() + currentItem = Signal(str) + itemDone = Signal() + completed = Signal() + + def __init__(self, pvs, values, delays, cls_epics=PyEpicsWrapper, + parent=None, timeout=PyEpicsWrapper.TIMEOUT): + """Constructor. + + Parameters + ---------- + pv_list - a list of PVs + cls_epics - epics class that implements interface (put, get, check) + values - values associated with the PVs [optional] + parent - parent QObject [optional] + """ + super().__init__(parent) + self._pvnames = pvs + self._values = values + self._delays = delays + self._cls_epics = cls_epics + self._quit_task = False + self._timeout = timeout + +
+[docs] + def size(self): + """Task Size.""" + return len(self._pvnames)
+ + +
+[docs] + def exit_task(self): + """Set flag to exit thread.""" + self._quit_task = True
+ + +
+[docs] + def get_pv(self, pvn): + pv = self.PVs.get(pvn) + if pv is None: + pv = self._cls_epics(pvn) + self.PVs[pvn] = pv + return pv
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/common/epics/task/wait.html b/_modules/siriushla/common/epics/task/wait.html new file mode 100644 index 000000000..ee09424bb --- /dev/null +++ b/_modules/siriushla/common/epics/task/wait.html @@ -0,0 +1,195 @@ + + + + + + siriushla.common.epics.task.wait — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.common.epics.task.wait

+import time
+from .task import EpicsTask
+
+
+
+[docs] +class EpicsWait(EpicsTask): + """.""" + + def __init__(self, pvs, wait_time=1.0, parent=None): + """.""" + super().__init__(pvs, None, None, parent=parent) + self.wait_time = wait_time + +
+[docs] + def run(self): + """.""" + if not self._quit_task: + t0 = time.time() + siz = self.size() + if siz: + for _ in range(siz): + dt = time.time() - t0 + self.currentItem.emit( + 'Waiting for {:3.2f} s...'.format(self.wait_time - dt)) + time.sleep(self.wait_time/siz) + self.itemDone.emit() + else: + time.sleep(self.wait_time) + self.completed.emit()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/common/epics/wrapper/pyepics.html b/_modules/siriushla/common/epics/wrapper/pyepics.html new file mode 100644 index 000000000..1344b80a6 --- /dev/null +++ b/_modules/siriushla/common/epics/wrapper/pyepics.html @@ -0,0 +1,247 @@ + + + + + + siriushla.common.epics.wrapper.pyepics — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.common.epics.wrapper.pyepics

+"""PyEpicsWrapper."""
+
+from math import isclose
+import epics
+from epics.ca import ChannelAccessGetFailure, CASeverityException
+import numpy as _np
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+
+_TIMEOUT = 0.5
+
+
+
+[docs] +class PyEpicsWrapper: + """Wraps a PV object. + + Implements: + pvname + put + check + get + """ + + TIMEOUT = _TIMEOUT + + def __init__(self, pv): + """Create PV object.""" + pvn = _VACA_PREFIX + ('-' if _VACA_PREFIX else '') + pv + self._pv = epics.get_pv(pvn) + + @property + def pvname(self): + """PV Name.""" + return self._pv.pvname + +
+[docs] + def put(self, value, wait=_TIMEOUT): + """Put if connected.""" + if not self._pv.wait_for_connection(wait): + return False + return self._pv.put(value)
+ + +
+[docs] + def check(self, value, wait=_TIMEOUT): + """Do timed get.""" + pvv = self.get(wait=wait) + if pvv is None: + return False + elif self._isarray(pvv) or self._isarray(value): + try: + if len(pvv) != len(value): + return False + return _np.allclose(pvv, value, rtol=1e-06, atol=0.0) + except TypeError: + # one of them is not an array or the array type is not numeric + return False + elif isinstance(pvv, float) or isinstance(value, float): + return isclose(pvv, value, rel_tol=1e-06, abs_tol=0.0) + elif pvv == value: + return True + return False
+ + +
+[docs] + def get(self, wait=_TIMEOUT): + """Return PV value.""" + if not self._pv.wait_for_connection(wait): + return None + try: + value = self._pv.get(timeout=wait) + except (ChannelAccessGetFailure, CASeverityException): + # exceptions raised in a Virtual Circuit Disconnect (192) + # event. If the PV IOC goes down, for example. + print('Could not get value of {}'.format(self._pv.pvname)) + value = None + return value
+ + + def _isarray(self, value): + return isinstance(value, (_np.ndarray, list, tuple))
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_ap_mps/bypass_btn.html b/_modules/siriushla/li_ap_mps/bypass_btn.html new file mode 100644 index 000000000..e1c98d7fb --- /dev/null +++ b/_modules/siriushla/li_ap_mps/bypass_btn.html @@ -0,0 +1,200 @@ + + + + + + siriushla.li_ap_mps.bypass_btn — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.li_ap_mps.bypass_btn

+from qtpy.QtGui import QPalette, QColor
+from pydm.widgets import PyDMPushButton
+
+
+
+[docs] +class BypassBtn(PyDMPushButton): + + def __init__(self, parent=None, init_channel=None): + super().__init__(parent, init_channel=init_channel, pressValue=0) + +
+[docs] + def value_changed(self, new_value): + """Redefine value_changed.""" + + if new_value == 1: + # Bypass + self.setText('Bypass') + pal = self.palette() + pal.setColor(QPalette.Button, QColor('blue')) + pal.setColor(QPalette.ButtonText, QColor('white')) + self.setPalette(pal) + self.setChecked(True) + self.pressValue = 0 + else: + #Active + self.setText('Active') + pal = self.palette() + pal.setColor(QPalette.Button, QColor('#efefef')) + pal.setColor(QPalette.ButtonText, QColor('black')) + self.setPalette(pal) + self.setChecked(False) + self.pressValue = 1 + + return super().value_changed(new_value)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_ap_mps/main.html b/_modules/siriushla/li_ap_mps/main.html new file mode 100644 index 000000000..24374982c --- /dev/null +++ b/_modules/siriushla/li_ap_mps/main.html @@ -0,0 +1,799 @@ + + + + + + siriushla.li_ap_mps.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.li_ap_mps.main

+''' Monitor Protection System Controller Interface '''
+from qtpy.QtCore import Qt, QEvent
+from qtpy.QtWidgets import QWidget, QGroupBox, QHBoxLayout, \
+    QGridLayout, QLabel, QTabWidget, QPushButton
+import qtawesome as qta
+
+from .util import PV_MPS, MPS_PREFIX, CTRL_TYPE, GROUP_POS, \
+    GROUP_POSALL, LBL_MPS, LBL_WATER, PV_TEMP_MPS, TEMP_TYPE, LBL_ALL
+from ..util import get_appropriate_color
+from ..widgets import PyDMLedMultiChannel, PyDMLed, SiriusLabel, \
+    SiriusPushButton, SiriusSpinbox
+from .bypass_btn import BypassBtn
+
+
+
+[docs] +class MPSControl(QWidget): + ''' Monitor Protection System Controller Interface ''' + + def __init__(self, parent=None, prefix=''): + '''Contain all the graphic interface data''' + super().__init__(parent) + + self.prefix = prefix + ('-' if prefix else '') + self.pv_obj = {} + self.led_clicked = False + self.all_clicked = False + self.stop = False + + color = get_appropriate_color('LI') + self.setObjectName('LIApp') + self.setWindowIcon(qta.icon('mdi.monitor-dashboard', color=color)) + + self.setWindowTitle('LI MPS Controls') + self._setupUi() + +
+[docs] + def eventFilter(self, obj_wid, event): + ''' Hover listener with hover function''' + obj = self.pv_obj.get(obj_wid) + if event.type() == QEvent.Leave: + if self.led_clicked: + self.controlHiddenBox( + obj.get("name"), obj.get("layout"), obj.get("config")) + self.stop = False + return False
+ + +
+[docs] + def getDeviceName(self, pv_name): + ''' Set device name ''' + if 'LA-RF:LLRF:KLY' in pv_name: + device_name = '' + else: + device_name = MPS_PREFIX + return device_name
+ + +
+[docs] + def getCtrlWidget(self, pv_name, ctrl_type, config): + '''Display the specific control widget''' + device_name = self.getDeviceName(pv_name) + if ctrl_type in ['_I', '_L', '']: + ch2vals = { + device_name + pv_name + ctrl_type: config} + widget = PyDMLedMultiChannel(self) + widget.set_channels2values(ch2vals) + if pv_name == 'HeartBeat': + widget.setOffColor(PyDMLed.Yellow) + elif ctrl_type == '_B': + widget = BypassBtn( + self, + init_channel=device_name + pv_name + ctrl_type) + elif ctrl_type == '_R': + widget = SiriusPushButton( + self, + init_channel=device_name + pv_name + ctrl_type, + label='Reset', + pressValue=1, + releaseValue=0) + widget.setStyleSheet(''' + min-width: 3.2em; max-width: 4.2em; + min-height: 1.29em; max-height: 1.29em; + ''') + return widget
+ + +
+[docs] + def statusBox(self, pv_name, config): + ''' Display the status widget''' + sb_hlay = QHBoxLayout() + sb_hlay.addWidget( + self.getCtrlWidget(pv_name, '', config), 1) + return sb_hlay
+ + +
+[docs] + def getTempWidget(self, pv_name, temp_type): + ''' Display the temperature label widget ''' + device_name = self.getDeviceName(pv_name) + if temp_type == 'Thrd': + widget = SiriusSpinbox( + parent=self, + init_channel=device_name + pv_name + temp_type + ) + else: + widget = SiriusLabel( + parent=self, + init_channel=device_name + pv_name + temp_type + ) + widget.showUnits = True + return widget
+ + +
+[docs] + def clearLayout(self, lay): + '''Erase the layout's content''' + while lay.count(): + child = lay.takeAt(0) + if child.widget(): + child.widget().deleteLater() + return lay
+ + +
+[docs] + def controlHiddenBox(self, pv_name, cb_glay, config): + '''Display the status of the PV - Hidden control Box''' + + if cb_glay == '': + cb_glay = QGridLayout() + else: + cb_glay = self.clearLayout(cb_glay) + + widget = self.getCtrlWidget(pv_name, '_L', config) + widget.clicked.connect( + lambda: self.controlBox(pv_name, cb_glay, config, True, 0)) + cb_glay.addWidget(widget, 1, 0, 1, 1) + + return cb_glay
+ + +
+[docs] + def controlBox(self, pv_name, lay, config, has_title, wid_type): + ''' Display the control features - Open control Box''' + + if lay != '': + lay = self.clearLayout(lay) + else: + lay = QGridLayout() + pos = [0, 0] + self.led_clicked = True + for control_name in CTRL_TYPE: + if self.getParamAll(has_title, pv_name, wid_type): + lb_title = QLabel(control_name) + lb_title.setAlignment(Qt.AlignCenter) + lay.addWidget(lb_title, pos[0], pos[1], 1, 1) + ctrl_widget = self.getCtrlWidget( + pv_name, CTRL_TYPE.get(control_name), config) + lay.addWidget(ctrl_widget, pos[0]+1, pos[1], 1, 1) + pos[1] += 1 + return lay
+ + +
+[docs] + def controlWidget(self, pv_name, lay, config): + '''Create the control widget with opening and closing functions''' + '''Default - closed''' + + widget = QWidget() + hlay = QHBoxLayout() + + if 'WFS' in pv_name: + hlay.addWidget( + self.setPvLbl(pv_name)) + + control_layout = self.controlHiddenBox(pv_name, lay, config) + widget.setLayout(control_layout) + self.pv_obj.update( + {widget: { + "name": pv_name, + "layout": control_layout, + "config": config + }}) + widget.installEventFilter(self) + widget.setObjectName('Container') + widget.setStyleSheet(''' + #Container::hover{ + background-color: #ff8b98; + border-radius: 1em; + } + ''') + hlay.addWidget(widget) + return hlay
+ + +
+[docs] + def gateValve(self, pv_name, config): + ''' Display the gate valves widget ''' + device_name = self.getDeviceName(pv_name) + if 'U' in pv_name: + + if 'Open' in pv_name: + name = 'Open' + else: + name = 'Close' + + pb_lay = QHBoxLayout() + widget = SiriusPushButton( + self, + init_channel=device_name + pv_name, + label=name, + pressValue=1, + releaseValue=0) + widget.setStyleSheet(''' + min-width: 3.2em; max-width: 4.2em; + min-height: 1.29em; max-height: 1.29em; + ''') + pb_lay.addWidget(widget) + return pb_lay + else: + return self.statusBox(pv_name, config)
+ + +
+[docs] + def tempMonBox(self, pv_name): + ''' Display the status features for the temperature monitor''' + lay = QHBoxLayout() + for temp_name in TEMP_TYPE: + ctrl_widget = self.getTempWidget( + pv_name, TEMP_TYPE.get(temp_name)) + lay.addWidget(ctrl_widget, 1) + ctrl_widget.setAlignment(Qt.AlignCenter) + return lay
+ + +
+[docs] + def genStringTempPV(self, name, prefix_num, name_num): + ''' Generate Temperature PV name ''' + return name + str(prefix_num) + 'Temp' + str(name_num)
+ + +
+[docs] + def getPVConfig(self, config, index): + ''' Get if the PV has configuration 1 or 0''' + + if isinstance(config, list): + return config[index] + return config
+ + +
+[docs] + def getPVControl(self, is_control, index): + ''' Get if the PV is a control or a status''' + + if isinstance(is_control, list): + return is_control[index] + return is_control
+ + +
+[docs] + def countGen(self, count, val): + ''' Counter for water data positioning ''' + if count[1] >= val: + count[0] += 1 + count[1] = 1 + else: + count[1] += 1 + return count
+ + +
+[docs] + def countVA(self, count): + ''' Counter for vaccum data positioning ''' + + if count in [ + [2, 3], [3, 3], [6, 3], + [11, 3], [12, 3] + ]: + count[1] += 1 + if count in [ + [4, 1], [5, 1], [8, 1], + [10, 1], [13, 1], [15, 1] + ]: + count[1] += 3 + + count = self.countGen(count, 4) + return count
+ + +
+[docs] + def countWater(self, count): + if count in [ + [2, 5], [3, 5] + ]: + count[1] += 3 + count = self.countGen(count, 6) + return count
+ + +
+[docs] + def countTemp(self, count, title): + ''' Counter for temperature data positioning ''' + if title == 'Water Temperature': + orient = [1, 0, 6] + else: + orient = [0, 1, 2] + + if count[orient[1]] >= orient[2]: + count[orient[0]] += 1 + count[orient[1]] = 1 + else: + count[orient[1]] += 1 + return count
+ + +
+[docs] + def updateCount(self, count, title): + ''' Update counter for data positioning ''' + if title == 'Klystrons': + count = self.countGen(count, 4) + elif title == 'Water': + count = self.countWater(count) + elif title == 'Modulator': + count = self.countGen(count, 2) + elif title == 'Gate Valve': + count = self.countGen(count, 5) + elif title in ['Temperature', 'Water Temperature']: + self.countTemp(count, title) + elif title == 'VA': + count = self.countVA(count) + else: + count = self.countGen(count, 1) + + return count
+ + +
+[docs] + def setTitleLabel(self, item, axis, layout): + ''' Display title labels ''' + pos = [0, 0] + for pos[axis] in range(1, len(item)+1): + lbl_header = QLabel('<h4>'+item[pos[axis]-1]+'</h4>') + lbl_header.setAlignment(Qt.AlignCenter) + layout.addWidget(lbl_header, pos[0], pos[1], 1, 1) + if axis == 0: + lbl_header.setStyleSheet( + 'QLabel{min-width:6em; max-width:6em;}') + return layout
+ + +
+[docs] + def setPvLbl(self, pv_name): + ''' Display the water title label''' + lbl_pv = LBL_WATER.get(pv_name) + lbl_title_wid = QLabel(lbl_pv) + lbl_title_wid.setAlignment(Qt.AlignCenter) + return lbl_title_wid
+ + +
+[docs] + def setParamLabel(self, layout): + ''' Display Temperature parameters labels ''' + pos = 0 + for _ in range(0, 2): + for item in TEMP_TYPE: + lbl_param = QLabel(item) + lbl_param.setAlignment(Qt.AlignCenter) + layout.addWidget(lbl_param, 1, pos, 1, 1) + pos += 1 + return layout
+ + +
+[docs] + def setTempHeader(self, item_list, layout): + ''' Display Temperature header labels ''' + widget = QWidget() + hd_glay = QGridLayout() + pos = 0 + for item in item_list: + lbl_header = QLabel('<h4>'+item+'</h4>') + lbl_header.setAlignment(Qt.AlignCenter) + hd_glay.addWidget(lbl_header, 0, pos, 1, 3) + pos += 3 + + hd_glay = self.setParamLabel(hd_glay) + hd_glay.setContentsMargins(0, 0, 0, 0) + widget.setLayout(hd_glay) + layout.addWidget(widget, 0, 1, 1, 6) + return layout
+ + +
+[docs] + def getSingleTitle(self, title, layout): + ''' Display a single Title ''' + if title in LBL_MPS: + lbl_item = LBL_MPS.get(title) + layout = self.setTitleLabel(lbl_item[0], 0, layout) + if title not in ['Water Temperature', 'Temperature']: + layout = self.setTitleLabel(lbl_item[1], 1, layout) + else: + layout = self.setTempHeader(lbl_item[1], layout) + return layout
+ + +
+[docs] + def getParamAll(self, has_title, pv_name, wid_type): + if wid_type == 0 or pv_name in LBL_ALL: + return has_title + return False
+ + +
+[docs] + def dispayHiddenControls(self, pv_name, control, config): + if control: + return self.controlWidget( + pv_name, '', + config) + return self.statusBox(pv_name, config)
+ + +
+[docs] + def dispayAllControls(self, pv_name, control, config): + if control: + widget = QWidget() + hlay = QHBoxLayout() + if 'WFS' in pv_name: + hlay.addWidget( + self.setPvLbl(pv_name)) + control_layout = self.controlBox(pv_name, '', config, control, 1) + widget.setLayout(control_layout) + hlay.addWidget(widget) + return hlay + else: + return self.statusBox(pv_name, config)
+ + +
+[docs] + def displayGroup(self, pv_data, title, group_type): + ''' Display one MPS group ''' + dg_glay = QGridLayout() + group = QGroupBox() + count = [1, 1] + + dg_glay = self.getSingleTitle(title, dg_glay) + index = 0 + for pv_name in pv_data.get('name'): + if title != 'Gate Valve': + if group_type == 0: + dg_glay.addLayout( + self.dispayHiddenControls( + pv_name, + self.getPVControl(pv_data.get('control'), index), + self.getPVConfig(pv_data.get('config'), index)), + count[0], count[1], 1, 1) + else: + dg_glay.addLayout( + self.dispayAllControls( + pv_name, + self.getPVControl(pv_data.get('control'), index), + self.getPVConfig(pv_data.get('config'), index)), + count[0], count[1], 1, 1) + else: + dg_glay.addLayout( + self.gateValve(pv_name, + self.getPVConfig(pv_data.get('config'), index)), + count[0], count[1], 1, 1) + count = self.updateCount(count, title) + index += 1 + + group.setTitle(title) + group.setLayout(dg_glay) + + return group
+ + +
+[docs] + def displayTempGroup(self, pv_data, title): + ''' Display one temperature group''' + dtg_glay = QGridLayout() + dtg_glay.setHorizontalSpacing(0) + group = QGroupBox() + count = [1, 1] + + dtg_glay = self.getSingleTitle(title, dtg_glay) + for counter_prefix in range(1, pv_data[0][0]+1): + for counter_name in range(1, pv_data[0][1]+1): + pv_name = self.genStringTempPV( + pv_data[1], counter_prefix, counter_name) + + dtg_glay.addLayout( + self.tempMonBox(pv_name), + count[0], count[1], 1, 1) + count = self.updateCount(count, title) + + group.setTitle(title) + group.setLayout(dtg_glay) + + return group
+ + +
+[docs] + def displayMpsGroups(self, group_type): + ''' Display all the MPS groups''' + mp_glay = QGridLayout() + for group in PV_MPS: + pv_data = PV_MPS.get(group) + + if group_type == 0: + group_pos = GROUP_POS.get(group) + else: + group_pos = GROUP_POSALL.get(group) + mp_glay.addWidget( + self.displayGroup(pv_data, group, group_type), + group_pos[0], group_pos[1], group_pos[2], group_pos[3]) + return mp_glay
+ + +
+[docs] + def displayTempGroups(self): + ''' Display all the temperatures groups''' + dt_glay = QGridLayout() + for group in PV_TEMP_MPS: + pv_data = PV_TEMP_MPS.get(group) + group_pos = GROUP_POS.get(group) + dt_glay.addWidget( + self.displayTempGroup(pv_data, group), + group_pos[0], group_pos[1], group_pos[2], group_pos[3]) + return dt_glay
+ + +
+[docs] + def displayControlMPS(self, tab_type): + ''' Display the desired tab widget ''' + wid = QWidget(self) + if_glay = QGridLayout() + + if tab_type != 0: + if_glay.addLayout(self.displayTempGroups(), 0, 0, 1, 1) + + if_glay.setAlignment(Qt.AlignTop) + wid.setLayout(if_glay) + + if tab_type == 0: + self.mps_glay = if_glay + self.changeWid(self.mps_glay) + return wid
+ + +
+[docs] + def displayTabs(self): + ''' Display all the tabs ''' + tab = QTabWidget() + tab.setObjectName("LITab") + tab.addTab(self.displayControlMPS(0), "MPS Controls") + tab.addTab(self.displayControlMPS(1), "Temperature") + tab.currentChanged.connect(self.adjustSize) + return tab
+ + +
+[docs] + def changeWid(self, layout): + layout = self.clearLayout(layout) + if self.all_clicked: + wid = QWidget() + wid.setLayout(self.displayMpsGroups(1)) + layout.addWidget(wid) + self.all_clicked = False + else: + wid = QWidget() + wid.setLayout(self.displayMpsGroups(0)) + layout.addWidget(wid) + self.all_clicked = True
+ + +
+[docs] + def displayHeader(self): + ''' Display the window header ''' + wid = QWidget() + hd_hlay = QHBoxLayout() + lbl_title = QLabel("<h2>Linac Machine Protection System</h2>") + lbl_title.setAlignment(Qt.AlignCenter) + hd_hlay.addWidget(lbl_title, 10) + + btn_all = QPushButton("Hide/Show All") + btn_all.clicked.connect( + lambda: self.changeWid(self.mps_glay)) + hd_hlay.addWidget(btn_all, 1) + wid.setLayout(hd_hlay) + + return wid
+ + + def _setupUi(self): + ''' Display the tabs of the graphic interface ''' + + if_glay = QGridLayout() + if_glay.addWidget(self.displayTabs(), 1, 0, 1, 1) + if_glay.addWidget(self.displayHeader(), 0, 0, 1, 1) + if_glay.setAlignment(Qt.AlignTop) + + self.setLayout(if_glay)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_ap_mps/monitor.html b/_modules/siriushla/li_ap_mps/monitor.html new file mode 100644 index 000000000..906a77d2b --- /dev/null +++ b/_modules/siriushla/li_ap_mps/monitor.html @@ -0,0 +1,244 @@ + + + + + + siriushla.li_ap_mps.monitor — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.li_ap_mps.monitor

+"""Control of EVG Timing Device."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGridLayout, QLabel, QGroupBox
+from siriushla.widgets import PyDMLed, PyDMLedMultiChannel
+from .util import MPS_PREFIX, SEC_2_POS, SEC_2_STATUS
+
+
+
+[docs] +class MPSMonitor(QWidget): + + def __init__(self, parent=None, prefix=''): + super().__init__(parent) + self.prefix = prefix + ('-' if prefix else '') + self.setWindowTitle('Linac MPS Monitor') + self.setObjectName('LIApp') + self._setupUi() + + def _setupUi(self): + lay = QGridLayout(self) + lay.setAlignment(Qt.AlignTop) + + self.title = QLabel('<h2>LI MPS Monitor</h2>', self) + lay.addWidget(self.title, 0, 0, 1, 2) + + for sec, status in SEC_2_STATUS.items(): + gbox = QGroupBox(sec, self) + grid = QGridLayout(gbox) + if isinstance(status, dict): + if 'Header' in status.keys(): + for i, text in enumerate(status['Header']): + grid.addWidget(QLabel(text, self), 0, i+1, + alignment=Qt.AlignCenter) + aux_row = 1 + for text, ch_grp in status.items(): + if text == 'Header': + continue + grid.addWidget(QLabel(text, self), aux_row, 0, + alignment=Qt.AlignCenter) + for ch in ch_grp: + if not ch: + continue + aux_col = ch_grp.index(ch) + k = (MPS_PREFIX if 'RF' not in ch[0] else '')+ch[0] + ch2vals = {self.prefix + k: ch[1]} + led = PyDMLedMultiChannel(self) + led.set_channels2values(ch2vals) + grid.addWidget(led, aux_row, aux_col+1, + alignment=Qt.AlignCenter) + aux_row += 1 + else: + aux_row = 0 + for text, ch in status.items(): + grid.addWidget(QLabel(text, self), aux_row, 0) + ch2vals = {self.prefix + MPS_PREFIX + ch[0]: ch[1]} + led = PyDMLedMultiChannel(self) + led.set_channels2values(ch2vals) + if 'Heartbeat' in text: + led.setOffColor(PyDMLed.Yellow) + grid.addWidget(led, aux_row, 1, + alignment=Qt.AlignCenter) + aux_row += 1 + elif isinstance(status, list): + for ch_grp in status: + aux_row = status.index(ch_grp) + for ch in ch_grp: + aux_col = ch_grp.index(ch) + ch2vals = {self.prefix + MPS_PREFIX + ch[0]: ch[1]} + led = PyDMLedMultiChannel(self) + led.set_channels2values(ch2vals) + grid.addWidget(led, aux_row, aux_col, + alignment=Qt.AlignCenter) + row, col, rowc, colc = SEC_2_POS[sec] + lay.addWidget(gbox, row, col, rowc, colc) + + self.setStyleSheet(""" + QLabel { qproperty-alignment: AlignCenter; } + QLed { min-width: 1.1em; max-width: 1.1em; + min-height: 1.1em; max-height: 1.1em; } + """)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_di_bpms/bpm_main.html b/_modules/siriushla/li_di_bpms/bpm_main.html new file mode 100644 index 000000000..0c3e783fc --- /dev/null +++ b/_modules/siriushla/li_di_bpms/bpm_main.html @@ -0,0 +1,662 @@ + + + + + + siriushla.li_di_bpms.bpm_main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.li_di_bpms.bpm_main

+''' Diagnostic Interface of the LINAC's BPM'''
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QGroupBox, QVBoxLayout, QTabWidget, \
+    QWidget, QLabel, QGridLayout
+import qtawesome as qta
+from pydm.widgets import enum_button, PyDMEnumComboBox
+
+from ..util import get_appropriate_color
+from ..widgets import SiriusMainWindow, SiriusLedState, SiriusLabel, \
+    SiriusSpinbox
+from ..as_di_bpms.base import GraphWave
+
+
+
+[docs] +class DigBeamPosProc(SiriusMainWindow): + ''' Class Digital Beam Position Processor ''' + + def __init__(self, device_name, prefix='', parent=None): + '''Contain all the graphic interface data''' + super().__init__(parent) + self.device_name = device_name + self.prefix = prefix + ('-' if prefix else '') + + color = get_appropriate_color('LI') + self.setWindowIcon(qta.icon('mdi.currency-sign', color=color)) + self.setObjectName('LIApp') + + self.setWindowTitle(self.device_name) + + self.header = { + "Trigger": "TRIGGER_STATUS", + "IOC": "HEART_BEAT" + } + + self.graph_all_data = { + "ADC Raw Waveform": { + "title": "ADC", + "labelX": "Waveform Index", + "unitX": "", + "labelY": "ADC Value", + "unitY": "count", + "channels": { + "CH1": { + "path": "CH1_ADX_WAVEFORM", + "name": "AntA", + "color": "#0000FF" + }, + "CH2": { + "path": "CH2_ADX_WAVEFORM", + "name": "AntB", + "color": "#FF0000" + }, + "CH3": { + "path": "CH3_ADX_WAVEFORM", + "name": "AntC", + "color": "#008800" + }, + "CH4": { + "path": "CH4_ADX_WAVEFORM", + "name": "AntD", + "color": "#FF00FF" + } + } + }, + "Hilbert": { + "Amplitude": { + "title": "Amplitude", + "labelX": "Waveform Index", + "unitX": "", + "labelY": "Amplitude Value", + "unitY": "count", + "channels": { + "CH1": { + "path": "CH1_HIB_AMP_WAVEFORM", + "name": "AntA", + "color": "#0000FF" + }, + "CH2": { + "path": "CH2_HIB_AMP_WAVEFORM", + "name": "AntB", + "color": "#FF0000" + }, + "CH3": { + "path": "CH3_HIB_AMP_WAVEFORM", + "name": "AntC", + "color": "#008800" + }, + "CH4": { + "path": "CH4_HIB_AMP_WAVEFORM", + "name": "AntD", + "color": "#FF00FF" + } + } + }, + "Phase": { + "title": "Phase", + "labelX": "Waveform Index", + "unitX": "", + "labelY": "Phase Value", + "unitY": "count", + "channels": { + "CH1": { + "path": "CH1_HIB_PH_WAVEFORM", + "name": "AntA", + "color": "#0000FF" + }, + "CH2": { + "path": "CH2_HIB_PH_WAVEFORM", + "name": "AntB", + "color": "#FF0000" + }, + "CH3": { + "path": "CH3_HIB_PH_WAVEFORM", + "name": "AntC", + "color": "#008800" + }, + "CH4": { + "path": "CH4_HIB_PH_WAVEFORM", + "name": "AntD", + "color": "#FF00FF" + } + } + } + }, + "FFT": { + "Amplitude": { + "title": "Amplitude", + "labelX": "Waveform Index", + "unitX": "", + "labelY": "Amplitude Value", + "unitY": "count", + "channels": { + "CH1": { + "path": "CH1_FFT_AMP_WAVEFORM", + "name": "AntA", + "color": "#0000FF" + }, + "CH2": { + "path": "CH2_FFT_AMP_WAVEFORM", + "name": "AntB", + "color": "#FF0000" + }, + "CH3": { + "path": "CH3_FFT_AMP_WAVEFORM", + "name": "AntC", + "color": "#008800" + }, + "CH4": { + "path": "CH4_FFT_AMP_WAVEFORM", + "name": "AntD", + "color": "#FF00FF" + } + } + }, + "Phase": { + "title": "Phase", + "labelX": "Waveform Index", + "unitX": "", + "labelY": "Phase Value", + "unitY": "count", + "channels": { + "CH1": { + "path": "CH1_FFT_PH_WAVEFORM", + "name": "AntA", + "color": "#0000FF" + }, + "CH2": { + "path": "CH2_FFT_PH_WAVEFORM", + "name": "AntB", + "color": "#FF0000" + }, + "CH3": { + "path": "CH3_FFT_PH_WAVEFORM", + "name": "AntC", + "color": "#008800" + }, + "CH4": { + "path": "CH4_FFT_PH_WAVEFORM", + "name": "AntD", + "color": "#FF00FF" + } + } + } + } + } + + self.bpm_main_data = { + "Max ADC": { + "A": "CH1_MAXADC", + "B": "CH2_MAXADC", + "C": "CH3_MAXADC", + "D": "CH4_MAXADC" + }, + "Position": { + "X": "POS_X", + "Y": "POS_Y", + "S": "POS_S" + }, + "V": { + "A": "POS_VA", + "B": "POS_VB", + "C": "POS_VC", + "D": "POS_VD" + }, + "Trigger Cnt": "TRIGGER_CNT", + "Cycle": "ACQ_TIME_USED", + "FFT": { + "Center": "FFT_CENTER", + "Width": "FFT_WIDTH" + }, + "Hilbert": { + "Center": "HIB_CENTER", + "Width": "HIB_WIDTH" + }, + "Gain": { + "X": "POS_KX", + "Y": "POS_KY", + "S": "POS_KS" + }, + "Offset": { + "X": "POS_OX", + "Y": "POS_OY" + } + } + + self.bpm_sec_data = { + "Attenuator": "FE_ATTEN_SP", + "ADC Threshold": "ADC_THD", + "Orientation": "BPM_STRIP" + } + + self.selectors_data = { + "Trigger Mode": "ACQ_TRIGGER", + "Position Algorithm": "POS_ALG" + } + + self._setupUi() + + def _setupUi(self): + '''Build the graphic interface''' + wid = QWidget(self) + if_glay = QGridLayout() + + if_glay.addLayout(self.display_header(), 0, 0, 1, 3) + if_glay.addLayout(self.display_graph(), 1, 0, 2, 1) + if_glay.addLayout(self.display_mainData(), 1, 1, 1, 1) + if_glay.addLayout(self.display_selectors(), 1, 2, 1, 1) + if_glay.setAlignment(Qt.AlignTop) + if_glay.setColumnStretch(0, 10) + + wid.setLayout(if_glay) + self.setCentralWidget(wid) + +
+[docs] + def display_header(self): + '''Display the header of the interface''' + hd_glay = QGridLayout() + + title_lb = QLabel('<h2>' + self.device_name + ' - POSITION MONITOR </h2>', self) + title_lb.setAlignment(Qt.AlignCenter) + hd_glay.addWidget(title_lb, 0, 2, 2, 1) + + countx = 0 + + for led_lb, led_channel in self.header.items(): + trig_led = SiriusLedState( + init_channel=self.prefix + self.device_name + ':' + led_channel) + trig_led.setFixedSize(30, 30) + hd_glay.addWidget(trig_led, 0, countx, 1, 1) + + trig_lb = QLabel(led_lb) + trig_lb.setAlignment(Qt.AlignCenter) + hd_glay.addWidget(trig_lb, 1, countx, 1, 1) + + countx += 1 + + hd_glay.setAlignment(Qt.AlignCenter) + + return hd_glay
+ + +
+[docs] + def createGraph(self, graph_data): + '''Build a graph widget''' + graph_plot = GraphWave() + + graph_plot.graph.title = graph_data.get("title") + graph_plot.setLabel( + 'left', + text=graph_data.get("labelY"), + units=graph_data.get("unitY")) + graph_plot.setLabel( + 'bottom', + text=graph_data.get("labelX"), + units=graph_data.get("unitX")) + + for channel in graph_data.get("channels"): + + channel_data = graph_data.get("channels").get(channel) + graph_plot.addChannel( + y_channel=self.prefix + self.device_name + ':' + channel_data.get('path'), + name=channel_data.get('name'), + color=channel_data.get('color'), + lineWidth=1) + + graph_plot.setMinimumWidth(600) + graph_plot.setMinimumHeight(250) + + return graph_plot
+ + +
+[docs] + def display_graph(self): + '''Display the graph tabs and all their contents''' + gp_vlay = QVBoxLayout() + tab = QTabWidget() + tab.setObjectName("LITab") + + for graph_name in self.graph_all_data: + tablay = QVBoxLayout() + tab_content = QWidget() + + graph_item = self.graph_all_data.get(graph_name) + + if len(graph_item.items()) != 2: + tablay.addWidget(self.createGraph(graph_item), 10) + tab_content.setLayout(tablay) + else: + for data in graph_item: + tablay.addWidget( + self.createGraph(graph_item.get(data)), 10) + + tab_content.setLayout(tablay) + tab.addTab(tab_content, graph_name) + + gp_vlay.addWidget(tab) + + return gp_vlay
+ + +
+[docs] + def dataItem(self, channel, style): + '''Get data channel info''' + if style == 0: + channel_info = SiriusLabel( + parent=self, + init_channel=self.prefix + self.device_name + ':' + channel) + elif style in [1, 2, 4]: + channel_info = SiriusSpinbox( + parent=self, + init_channel=self.prefix + self.device_name + ':' + channel) + else: + channel_info = QLabel("Error", self) + + return channel_info
+ + +
+[docs] + def display_data(self, title, info, pos_x, pos_y, style): + '''Build a data widget''' + glay = QGridLayout() + group = QGroupBox() + + countx = 0 + county = 0 + + if style == 0: + for text, channel in info.items(): + + text_lb = QLabel(text, self) + glay.addWidget(text_lb, countx, county) + + channel_lb = self.dataItem(channel, pos_y) + channel_lb.showUnits = True + glay.addWidget(channel_lb, countx, county+1) + + countx += 1 + else: + channel_lb = self.dataItem(info, pos_y) + channel_lb.showUnits = True + glay.addWidget(channel_lb, pos_x, pos_y) + + glay.setAlignment(Qt.AlignCenter) + + group.setTitle(title) + group.setLayout(glay) + + return group
+ + +
+[docs] + def display_mainData(self): + '''Display all main data widgets''' + countx = 0 + county = 0 + + md_glay = QGridLayout() + + for title, info in self.bpm_main_data.items(): + + if title in ["Trigger Cnt", "Cycle"]: + md_glay.addWidget( + self.display_data( + title, info, + countx, county, 1), + countx, county, + 1, 1) + countx += 1 + else: + md_glay.addWidget( + self.display_data( + title, info, + countx, county, 0), + countx, county, + 2, 1) + countx += 2 + + if countx > 7: + countx = 0 + county += 2 + + md_glay.setAlignment(Qt.AlignCenter) + + return md_glay
+ + +
+[docs] + def display_secData(self): + '''Build the secondary data widget''' + + group = QGroupBox() + sc_glay = QGridLayout() + + countx = 0 + for text, channel in self.bpm_sec_data.items(): + + if text != "Orientation": + + text_lb = QLabel(text, self) + sc_glay.addWidget(text_lb, countx, 0, 1, 1) + + channel_lb = self.dataItem(channel, 1) + channel_lb.showUnits = True + sc_glay.addWidget(channel_lb, countx, 1, 1, 1) + else: + text_lb = QLabel(text, self) + text_lb.setAlignment(Qt.AlignCenter) + sc_glay.addWidget(text_lb, countx, 0, 1, 2) + selection = PyDMEnumComboBox( + init_channel=self.prefix + self.device_name+":"+channel) + sc_glay.addWidget(selection, countx+1, 0, 1, 2) + countx += 1 + + sc_glay.setAlignment(Qt.AlignTop) + group.setLayout(sc_glay) + + return group
+ + +
+[docs] + def selectionItem(self, title, channel, orientation): + '''Build a selection widget''' + group = QGroupBox() + lay = QVBoxLayout() + + selector = enum_button.PyDMEnumButton( + init_channel=self.prefix + self.device_name+":"+channel) + selector.widgetType = 0 + selector.orientation = orientation + lay.addWidget(selector, 0) + + group.setLayout(lay) + group.setTitle(title) + + return group
+ + +
+[docs] + def display_selectors(self): + '''Display the selector and the secondary data''' + sl_vlay = QVBoxLayout() + for title, channel in self.selectors_data.items(): + sl_vlay.addWidget( + self.selectionItem(title, channel, 2), 1) + + sl_vlay.addWidget(self.display_secData(), 0) + + return sl_vlay
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_di_scrns/main.html b/_modules/siriushla/li_di_scrns/main.html new file mode 100644 index 000000000..dd96276db --- /dev/null +++ b/_modules/siriushla/li_di_scrns/main.html @@ -0,0 +1,870 @@ + + + + + + siriushla.li_di_scrns.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.li_di_scrns.main

+''' Diagnostic Interface of the LINAC's Screen'''
+import os as _os
+import numpy as _np
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QPixmap
+from qtpy.QtWidgets import QGroupBox, QHBoxLayout, QVBoxLayout, \
+    QWidget, QLabel, QGridLayout, QStackedWidget, \
+    QSizePolicy, QPushButton
+from pydm.widgets import PyDMPushButton, PyDMImageView, PyDMLineEdit, \
+    enum_button
+import qtawesome as qta
+from .. import util as _util
+from ..widgets import SiriusMainWindow, PyDMLedMultiChannel, \
+    SiriusWaveformPlot, SiriusLabel, SiriusSpinbox, SiriusConnectionSignal
+from .util import DEVICES, SCREENS_PANEL, SCREENS_INFO, HEADER, \
+    GRAPH, SCREEN
+from .motorBtn import MotorBtn
+
+
+
+[docs] +class GeneralFunctions(): + ''' Class with the functions used in both Screens Windows''' + +
+[docs] + def getPvName(self, device, pv_name): + ''' Build PV name ''' + return self.device_name + ':' + device + ":" + pv_name
+ + +
+[docs] + def setWidgetType(self, wid_type, device, pv_name, label='', value=0): + ''' Get widget type ''' + pv_name = self.getPvName(device, pv_name) + if wid_type == 'label': + widget = SiriusLabel(self, init_channel=pv_name) + widget.showUnits = True + widget.setAlignment(Qt.AlignCenter) + elif wid_type == 'led': + ch2vals = {pv_name: value} + widget = PyDMLedMultiChannel(self) + widget.set_channels2values(ch2vals) + if value == 1: + widget.shape = widget.ShapeMap.Round + elif wid_type == 'pushBtn': + widget = PyDMPushButton(self, init_channel=pv_name, + label=label, pressValue=value) + elif wid_type == 'spinBox': + widget = SiriusSpinbox(init_channel=pv_name) + widget.showUnits = True + elif wid_type == 'lineEdit': + widget = PyDMLineEdit( + init_channel=pv_name) + widget.setAlignment(Qt.AlignCenter) + widget.showUnits = True + elif wid_type == 'motorBtn': + widget = MotorBtn( + init_channel=pv_name) + else: + widget = QLabel("Error: Unknown device") + widget.setMinimumWidth(60) + widget.setFixedHeight(20) + return widget
+ + +
+[docs] + def setBasicInfo(self, device, label, pv_name): + ''' Build one basic information Component ''' + bi_hlay = QHBoxLayout() + bi_hlay.addWidget( + QLabel(label), + alignment=Qt.AlignCenter) + if label in ['Limit Mode', 'Motor Code', 'Counter', 'Sigma', 'Center']: + wid_type = 'label' + elif label == "Coefficient": + wid_type = 'spinBox' + elif label == "Centroid Threshold": + wid_type = 'lineEdit' + else: + wid_type = 'led' + bi_hlay.addWidget( + self.setWidgetType(wid_type, device, pv_name)) + return bi_hlay
+ + +
+[docs] + def setRBVObj(self, device, channel, label, pv_prefix): + ''' Build formatted RBV Component''' + rbv_hlay = QHBoxLayout() + title = QLabel(label) + title.setMinimumWidth(75) + title.setAlignment(Qt.AlignVCenter | Qt.AlignRight) + rbv_hlay.addWidget(title) + for item in range(1, -1, -1): + pv_name = pv_prefix + channel[item] + if 'RBV' not in pv_name: + if label in ['Gain', 'Exposure']: + wid_type = 'lineEdit' + else: + wid_type = 'spinBox' + else: + wid_type = 'label' + widget = self.setWidgetType(wid_type, device, pv_name) + widget.setMaximumWidth(75) + if item != 0: + rbv_hlay.addWidget( + widget, + alignment=Qt.AlignRight) + if 'MaxSize' in channel[0]: + sep_label = QLabel("X") + sep_label.setFixedWidth(10) + rbv_hlay.addWidget( + sep_label, + Qt.AlignCenter) + else: + rbv_hlay.addWidget( + widget, alignment=Qt.AlignLeft) + return rbv_hlay
+ + +
+[docs] + def setSingleScrn(self, device, screen): + ''' Build a single screen Component ''' + group = QGroupBox() + ss_vlay = QVBoxLayout() + + image_wid = PyDMImageView( + image_channel=self.getPvName(device, screen['data']), + width_channel=self.getPvName(device, screen['width'])) + + image_wid.readingOrder = image_wid.ReadingOrder.Clike + ss_vlay.addWidget(image_wid, 5) + + if 'IMG' not in screen['data']: + ss_vlay.addLayout(self.setScrnInfo(device), 1) + group.setTitle(screen['title'] + " " + device) + group.setLayout(ss_vlay) + return group
+
+ + + +
+[docs] +class LiBeamProfile(SiriusMainWindow, GeneralFunctions): + ''' Linac Profile Screen ''' + + def __init__(self, prefix='', parent=None): + '''Contain all the graphic interface data''' + super().__init__(parent) + self.prefix = prefix + ('-' if prefix else '') + + self.setObjectName('LIApp') + color = _util.get_appropriate_color('LI') + + self.device_name = 'LA-BI' + self.window_title = "Linac Screen View" + + self.setWindowIcon(qta.icon('mdi.camera-metering-center', color=color)) + self.setWindowTitle(self.window_title) + self.image_container = QLabel() + self.pixmap = QPixmap(_os.path.join( + _os.path.abspath(_os.path.dirname(__file__)), "linac.png")) + self.selected_device = '' + self.stack_screens = QStackedWidget() + self.stack_screen = QStackedWidget() + self._setupUi() + +
+[docs] + def radioBtnClick(self, value): + ''' Action on radio button change ''' + self.selected_device = DEVICES[value] + device_index = DEVICES.index(self.selected_device) + self.stack_screens.setCurrentIndex(device_index) + self.stack_screen.setCurrentIndex(device_index)
+ + +
+[docs] + def selectionItem(self, channel): + '''Build a selection widget''' + selector = enum_button.PyDMEnumButton( + init_channel=self.prefix + self.device_name+":"+channel) + self.active_screen = SiriusConnectionSignal( + self.prefix + self.device_name+":"+channel) + self.active_screen.new_value_signal[int].connect( + self.radioBtnClick) + selector.widgetType = 1 + return selector
+ + +
+[docs] + def setScrnHeader(self, layout): + ''' Build the screen panel header ''' + count = 0 + for text in SCREENS_PANEL.get('labels'): + layout.addWidget( + QLabel('<h4>' + text + '</h4>'), + 0, count, + alignment=Qt.AlignCenter) + count += 1 + return layout
+ + +
+[docs] + def setPanelInfo(self, device, layout, row): + ''' Build the information of one screen in screen panel ''' + pv_list = SCREENS_PANEL.get('content') + pv_name = 'MOTOR' + ":" + count = 0 + + count += 1 + for item in range(0, len(pv_list)): + if item == 0: + wid_type = 'label' + else: + wid_type = 'led' + + layout.addWidget( + self.setWidgetType( + wid_type, device, pv_name + pv_list[item]), + row, count, + alignment=Qt.AlignCenter) + count += 1 + layout.addWidget( + self.setWidgetType('led', device, pv_name + pv_list[0], value=1), + row, count, + alignment=Qt.AlignCenter) + return layout
+ + +
+[docs] + def setMotorsConfig(self): + ''' Build the Motor Control Buttons''' + mc_hlay = QHBoxLayout() + for label, channel in HEADER.items(): + mc_hlay.addWidget( + self.setWidgetType('pushBtn', "PRF:MOTOR", channel, label), + alignment=Qt.AlignCenter) + return mc_hlay
+ + +
+[docs] + def setScrnPanel(self): + ''' Build the Screens Panel Component''' + group = QGroupBox() + am_glay = QGridLayout() + + am_glay = self.setScrnHeader(am_glay) + + row = 1 + am_glay.addWidget( + self.selectionItem('PRF:OPI'), + row, 0, 5, 1, + alignment=Qt.AlignCenter) + for device in DEVICES: + am_glay = self.setPanelInfo( + device, am_glay, row) + row += 1 + + am_glay.addLayout( + self.setMotorsConfig(), + row, 0, 1, 4) + + group.setTitle(SCREENS_PANEL.get('title')) + group.setLayout(am_glay) + return group
+ + +
+[docs] + def getScrnSelBtns(self, device, label): + ''' Get the button label for the position of the screen ''' + if isinstance(label, dict): + if device in label.keys(): + return label[device] + return label["GEN"] + return label
+ + +
+[docs] + def setScrnSelection(self, selection_info, device): + ''' Build the screen position selection menu ''' + widget = QGroupBox() + ms_vlay = QVBoxLayout() + ms_vlay.addWidget( + SiriusLabel( + init_channel=self.getPvName( + device, 'MOTOR:' + selection_info.get('selected'))), + alignment=Qt.AlignCenter) + + for pv_name, label in selection_info.get('content').items(): + label = self.getScrnSelBtns(device, label) + if label: + ms_vlay.addWidget( + PyDMPushButton( + init_channel=self.getPvName( + device, 'MOTOR:' + pv_name), + label=label, pressValue=0)) + widget.setLayout(ms_vlay) + widget.setTitle("Position") + return widget
+ + +
+[docs] + def setZeroOpt(self, item, device): + ''' Build Zero Operation Component''' + zo_hlay = QHBoxLayout() + zo_hlay.addWidget( + QLabel(item["title"]), + alignment=Qt.AlignCenter) + count = 0 + for label, pv_name in item["content"].items(): + widget = self.setWidgetType( + 'pushBtn', device, "MOTOR:" + pv_name, label) + if count == 1: + widget.setStyleSheet("background-color:#ffff00;") + zo_hlay.addWidget( + widget, + alignment=Qt.AlignCenter) + count += 1 + return zo_hlay
+ + +
+[docs] + def setLight(self, device, pv_list, title): + ''' Build Light Component ''' + lo_hlay = QHBoxLayout() + lo_hlay.addWidget( + QLabel(title)) + lo_hlay.addWidget( + self.setWidgetType('motorBtn', device, "MOTOR:" + pv_list[1])) + lo_hlay.addWidget( + self.setWidgetType('led', device, "MOTOR:" + pv_list[0])) + return lo_hlay
+ + +
+[docs] + def setSingleScrnInfo(self, device): + ''' Build selected screen information ''' + group = QGroupBox() + sm_glay = QGridLayout() + group.setTitle(SCREENS_INFO.get('title') + ' ' + device) + group.setLayout(sm_glay) + + pos = [0, 0] + for label, channel in SCREENS_INFO.get('content').items(): + sm_glay.addLayout( + self.setBasicInfo(device, label, 'MOTOR:' + channel), + pos[0], pos[1], 2, 2) + pos[0] += 2 + + sm_glay.addLayout( + self.setZeroOpt( + SCREENS_INFO.get('special_content')[1], device), + pos[0], pos[1], 1, 3) + + btn = QPushButton("ROI View") + _util.connect_window( + btn, ROIViewWindow, + parent=self) + sm_glay.addWidget(btn, pos[0]+1, 0, 1, 3) + + pos[0] = 0 + + sm_glay.addWidget( + self.setScrnSelection( + SCREENS_INFO.get('special_content')[0], device), + pos[0], pos[1] + 2, 10, 1) + + return group
+ + +
+[docs] + def getStackItem(self, stack_type, device): + ''' Get one stack item ''' + if stack_type == 0: + return self.setSingleScrnInfo(device) + elif stack_type == 1: + return self.setSingleScrn(device, SCREEN['Screen_Camera'])
+ + +
+[docs] + def saveStack(self, stack, stack_type): + ''' Save the stack for future item changes ''' + if stack_type == 0: + stack.setSizePolicy(QSizePolicy.Maximum, QSizePolicy.Expanding) + self.stack_screens = stack + elif stack_type == 1: + self.stack_screen = stack
+ + +
+[docs] + def buildStacks(self, stack_type): + ''' Build all the stack groups ''' + stack = QStackedWidget() + for device in DEVICES: + stack.addWidget( + self.getStackItem(stack_type, device)) + self.saveStack(stack, stack_type) + return stack
+ + +
+[docs] + def setScrnInfo(self, device): + ''' Build the screen information Component''' + si_glay = QGridLayout() + counter = [0, 0] + for title, item in SCREEN['info'].items(): + if title in ['Gain', 'Exposure']: + si_glay.addLayout( + self.setRBVObj(device, item, title, 'CAM:'), + counter[0], counter[1], + alignment=Qt.AlignHCenter) + elif title == 'LED': + si_glay.addLayout( + self.setLight(device, item, title), + counter[0], counter[1], + alignment=Qt.AlignHCenter) + elif item == "RESET.PROC": + si_glay.addWidget( + self.setWidgetType( + 'pushBtn', device, 'CAM:' + item, title), + counter[0], counter[1], + alignment=Qt.AlignHCenter) + else: + si_glay.addLayout( + self.setBasicInfo(device, title, item), + counter[0], counter[1], + alignment=Qt.AlignHCenter) + + counter[0] += 1 + if counter[0] >= 2: + si_glay.setColumnStretch(counter[1], 30) + counter[1] += 1 + counter[0] = 0 + + return si_glay
+ + +
+[docs] + def header(self): + ''' Build the header''' + hd_hlay = QHBoxLayout() + title = QLabel("<h2>" + self.window_title + "</h2>") + hd_hlay.addWidget(title, alignment=Qt.AlignCenter) + return hd_hlay
+ + +
+[docs] + def imageViewer(self): + ''' Build the image''' + self.image_container.setPixmap(self.pixmap) + self.image_container.setScaledContents(True) + self.image_container.setSizePolicy( + QSizePolicy.Ignored, QSizePolicy.Ignored) + return self.image_container
+ + + def _setupUi(self): + '''Build the graphic interface''' + wid = QWidget(self) + if_glay = QGridLayout() + + if_glay.addLayout(self.header(), 0, 0, 1, 10) + if_glay.addWidget(self.imageViewer(), 1, 1, 4, 10) + if_glay.addWidget(self.setScrnPanel(), 1, 0, 7, 1) + if_glay.addWidget(self.buildStacks(0), 8, 0, 7, 1) + if_glay.addWidget(self.buildStacks(1), 5, 1, 10, 10) + wid.setLayout(if_glay) + self.setCentralWidget(wid)
+ + + +
+[docs] +class ROIViewWindow(SiriusMainWindow, GeneralFunctions): + """Show the ROI View Window.""" + + def __init__(self, parent=None, prefix=''): + """Init.""" + super().__init__(parent) + self.device_name = 'LA-BI' + self.setObjectName('LIApp') + self.setWindowTitle('ROI View') + self.active_screen = SiriusConnectionSignal( + prefix + self.device_name+":PRF:OPI") + self.active_screen.new_value_signal[int].connect( + self.radioBtnClick) + self.selected_device = 0 + self.stack_graphs = QStackedWidget() + self.stack_screen = QStackedWidget() + self.connect_sign = dict() + self.curves = dict() + self.roi_screens = dict() + self._setupUi() + +
+[docs] + def setGraphInfo(self, device, graph_info): + ''' Build the basic graph information ''' + wid = QWidget() + gi_hlay = QHBoxLayout() + wid.setLayout(gi_hlay) + + gi_hlay.addStretch() + for label, channel in graph_info.items(): + gi_hlay.addLayout( + self.setBasicInfo(device, label, channel)) + gi_hlay.addStretch() + return wid
+ + +
+[docs] + def setRoiInfo(self, device, roi_data, title): + ''' Build the ROI information ''' + group = QGroupBox() + ri_glay = QGridLayout() + counter = [0, 0] + col_span = 2 + for label, channel in roi_data.items(): + ri_glay.addLayout( + self.setRBVObj(device, channel, label, 'ROI:'), + counter[0], counter[1], 1, col_span) + if counter[0] == 2: + counter[0] = 0 + counter[1] = 1 + counter[0] += 1 + col_span = 1 + + group.setLayout(ri_glay) + group.setTitle(title) + return group
+ + +
+[docs] + def radioBtnClick(self, value): + ''' Action on radio button change ''' + self.selected_device = DEVICES[value] + device_index = DEVICES.index(self.selected_device) + self.stack_graphs.setCurrentIndex(device_index) + self.stack_screen.setCurrentIndex(device_index)
+ + +
+[docs] + def rotate_chart(self, x_array): + ''' Rotate X and Y Axis in the Chart ''' + pvname = self.sender().address + device = pvname.split(':')[1] + curvename = 'data' if 'Gauss:Data' in pvname else 'centroid' + curve = self.curves[device][curvename] + size = len(x_array) + curve.receiveXWaveform(x_array) + curve.receiveYWaveform(_np.linspace(0, size, num=size))
+ + +
+[docs] + def setGraph(self, device, graph_data, orientation='V'): + '''Build a graph widget''' + + self.connect_sign[device] = dict() + self.curves[device] = dict() + + graph_plot = SiriusWaveformPlot(background="#ffffff") + pvname = self.getPvName(device, graph_data['channel']['centroid']) \ + if orientation != 'V' else 'Fake' + graph_plot.addChannel( + y_channel=pvname, + color="#ff8b98", + lineWidth=1, + symbol='o', + symbolSize=5) + + pvname = self.getPvName(device, graph_data['channel']['data']) \ + if orientation != 'V' else 'Fake' + graph_plot.addChannel( + y_channel=pvname, + color="#ff0000", + lineWidth=1, + symbol='o', + symbolSize=5) + + if orientation == 'V': + self.curves[device]['centroid'] = graph_plot.curveAtIndex(0) + self.connect_sign[device]['centroid'] = SiriusConnectionSignal( + self.getPvName( + device, graph_data['channel']['centroid'])) + self.connect_sign[device]['centroid'].new_value_signal[_np.ndarray].connect( + self.rotate_chart) + + self.curves[device]['data'] = graph_plot.curveAtIndex(1) + self.connect_sign[device]['data'] = SiriusConnectionSignal( + self.getPvName( + device, graph_data['channel']['data'])) + self.connect_sign[device]['data'].new_value_signal[_np.ndarray].connect( + self.rotate_chart) + + graph_plot.setMaximumWidth(400) + else: + graph_plot.setMaximumHeight(300) + + return graph_plot
+ + +
+[docs] + def scrnAndProj(self, device): + ''' Display ROI Screen, the projection charts + and the projection information ''' + + group = QGroupBox() + lay = QGridLayout() + group.setLayout(lay) + + self.roi_screens[device] = self.setSingleScrn( + device, SCREEN['Screen_ROI']) + lay.addWidget( + self.roi_screens[device], 0, 0, 3, 3) + + lay.addWidget( + self.setGraph(device, GRAPH["Horizontal"], 'H'), + 3, 0, 1, 3) + + lay.addWidget( + self.setGraph(device, GRAPH["Vertical"], 'V'), + 0, 3, 1, 1) + + info_group = QGroupBox() + lay_info = QVBoxLayout() + info_group.setLayout(lay_info) + info_group.setTitle("Projections Info") + for title in ["Horizontal", "Vertical"]: + lay_info.addWidget( + QLabel(title), 1, alignment=Qt.AlignHCenter) + lay_info.addWidget( + self.setGraphInfo(device, GRAPH[title]['info']), + 1, alignment=Qt.AlignTop) + lay.addWidget(info_group, 3, 3, 1, 1) + + return group
+ + +
+[docs] + def getStackItem(self, stack_type, device): + ''' Get one stack item ''' + if stack_type == 0: + return self.scrnAndProj(device) + elif stack_type == 1: + return self.setRoiInfo(device, GRAPH["ROI"], "ROI")
+ + +
+[docs] + def saveStack(self, stack, stack_type): + ''' Save the stack for future item changes ''' + if stack_type == 0: + self.stack_screen = stack + elif stack_type == 1: + self.stack_graphs = stack
+ + +
+[docs] + def buildStacks(self, stack_type): + ''' Build all the stack groups ''' + stack = QStackedWidget() + for device in DEVICES: + stack.addWidget( + self.getStackItem(stack_type, device)) + self.saveStack(stack, stack_type) + return stack
+ + + def _setupUi(self): + """Build the UI.""" + wid = QWidget(self) + self.setCentralWidget(wid) + lay = QGridLayout() + wid.setLayout(lay) + + lay.addWidget(self.buildStacks(0)) + lay.addWidget(self.buildStacks(1))
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_di_scrns/motorBtn.html b/_modules/siriushla/li_di_scrns/motorBtn.html new file mode 100644 index 000000000..9cfc2bbb2 --- /dev/null +++ b/_modules/siriushla/li_di_scrns/motorBtn.html @@ -0,0 +1,197 @@ + + + + + + siriushla.li_di_scrns.motorBtn — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.li_di_scrns.motorBtn

+from ..widgets import PyDMStateButton
+import numpy as np
+
+
+[docs] +class MotorBtn(PyDMStateButton): + """Rederivation to change send values.""" + +
+[docs] + def value_changed(self, new_val): + """Value changed rederivation.""" + if isinstance(new_val, np.ndarray): + return + super(PyDMStateButton, self).value_changed(new_val) + self.value = new_val + self._bit_val = 1 if new_val == 'IL1' else 0 + self.update()
+ + +
+[docs] + def send_value(self): + """Send value rederivation.""" + if not self._connected: + return None + if not self.confirm_dialog(): + return None + if not self.validate_password(): + return None + checked = not self._bit_val + val = 'IL1' if checked else 'IH1' + self.send_value_signal[self.channeltype].emit(self.channeltype(val))
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_eg_control/main.html b/_modules/siriushla/li_eg_control/main.html new file mode 100644 index 000000000..3332926da --- /dev/null +++ b/_modules/siriushla/li_eg_control/main.html @@ -0,0 +1,544 @@ + + + + + + siriushla.li_eg_control.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.li_eg_control.main

+"""LI Egun control."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGridLayout, QLabel, QGroupBox, \
+    QSpacerItem, QSizePolicy as QSzPlcy, QPushButton
+import qtawesome as qta
+
+from siriuspy.envars import VACA_PREFIX
+
+from ..widgets import SiriusMainWindow, SiriusLedState, \
+    SiriusSpinbox, PyDMStateButton, SiriusLabel
+from ..util import get_appropriate_color, connect_window
+from .custom_widgets import LIEGTrigEnblDetail
+
+
+
+[docs] +class LIEgunWindow(SiriusMainWindow): + """Egun Control Window.""" + + def __init__(self, parent=None, prefix=VACA_PREFIX, is_it=False): + """Init.""" + super().__init__(parent) + self.prefix = prefix + ('-' if prefix else '') + self.dev_pref = 'IT-EGH' if is_it else 'LI-01' + self.dev_desc = 'Injector Test' if is_it else 'Linac' + self.setWindowTitle(self.dev_desc+' E-gun Control Window') + self.sec = self.dev_pref[0:2] + color = get_appropriate_color(self.sec) + self.setWindowIcon(qta.icon('mdi.spotlight-beam', color=color)) + self.setObjectName(self.sec+'App') + self._setupUi() + + def _setupUi(self): + cw = QWidget(self) + self.setCentralWidget(cw) + + self.title = QLabel('<h2>'+self.dev_desc+' E-gun</h2>', self) + + wid_sysstatus = self._setupSysStatusWidget() + wid_hvps = self._setupHVPSWidget() + if self.sec == 'IT': + wid_timing = ITTIWidget(self, self.prefix) + wid_trigger = self._setupTriggerWidget() + wid_filaps = self._setupFilaPSWidget() + wid_biasps = self._setupBiasPSWidget() + wid_pulseps = self._setupPulsePSWidget() + wid_multipulseps = self._setupMultiPulsePSWidget() + + layout = QGridLayout(cw) + layout.setVerticalSpacing(12) + layout.setHorizontalSpacing(12) + layout.addWidget(self.title, 0, 0, 1, 6) + if self.sec == 'IT': + layout.addWidget(wid_sysstatus, 1, 0, 2, 1) + layout.addWidget(wid_hvps, 1, 1, 2, 4) + layout.addWidget(wid_timing, 1, 5) + layout.addWidget(wid_trigger, 2, 5) + layout.addWidget(wid_filaps, 3, 0, 1, 6) + layout.addWidget(wid_biasps, 4, 0, 1, 6) + layout.addWidget(wid_pulseps, 5, 0, 1, 3) + layout.addWidget(wid_multipulseps, 5, 3, 1, 3) + layout.setRowStretch(1, 1) + layout.setRowStretch(2, 3) + else: + layout.addWidget(wid_sysstatus, 1, 0, 1, 1) + layout.addWidget(wid_hvps, 1, 1, 1, 4) + layout.addWidget(wid_trigger, 1, 5) + layout.addWidget(wid_filaps, 2, 0, 1, 6) + layout.addWidget(wid_biasps, 3, 0, 1, 6) + layout.addWidget(wid_pulseps, 4, 0, 1, 3) + layout.addWidget(wid_multipulseps, 4, 3, 1, 3) + layout.setColumnStretch(0, 3) + layout.setColumnStretch(1, 2) + layout.setColumnStretch(2, 2) + layout.setColumnStretch(3, 2) + layout.setColumnStretch(4, 2) + layout.setColumnStretch(5, 3) + + self.setStyleSheet(""" + QLabel{ + max-height: 2em; + qproperty-alignment: AlignCenter; + }""") + + def _setupSysStatusWidget(self): + self._ld_sysexternal = QLabel('Ext. Intlk', self) + self._led_sysexternal = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-External:status') + self._led_sysexternal.offColor = SiriusLedState.Red + + self._ld_sysvalve = QLabel('Valve', self) + self._led_sysvalve = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-Valve:status') + self._led_sysvalve.offColor = SiriusLedState.Red + + self._ld_sysgate = QLabel('Gate', self) + self._led_sysgate = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-Gate:status') + self._led_sysgate.offColor = SiriusLedState.Red + + self._ld_sysvac = QLabel('Vacuum', self) + self._led_sysvac = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-Vacuum:status') + self._led_sysvac.offColor = SiriusLedState.Red + + self._ld_sysplc = QLabel('PLC', self) + self._led_sysplc = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-PLC:status') + self._led_sysplc.offColor = SiriusLedState.Yellow + + self._ld_syssysstart = QLabel('System\nStart', self) + self._bt_syssysstart = PyDMStateButton( + self, self.prefix+self.dev_pref+':EG-System:start') + + wid = QGroupBox('System Status', self) + lay = QGridLayout(wid) + lay.addWidget(self._ld_sysexternal, 0, 0) + lay.addWidget(self._led_sysexternal, 0, 1) + lay.addWidget(self._ld_sysvalve, 1, 0) + lay.addWidget(self._led_sysvalve, 1, 1) + lay.addWidget(self._ld_sysgate, 2, 0) + lay.addWidget(self._led_sysgate, 2, 1) + lay.addWidget(self._ld_sysvac, 3, 0) + lay.addWidget(self._led_sysvac, 3, 1) + lay.addWidget(self._ld_sysplc, 4, 0) + lay.addWidget(self._led_sysplc, 4, 1) + lay.addWidget(self._ld_syssysstart, 5, 0) + lay.addWidget(self._bt_syssysstart, 5, 1) + return wid + + def _setupHVPSWidget(self): + self._ld_hvpsswtsel = QLabel('Switch', self) + self._bt_hvpsswtsel = PyDMStateButton( + self, self.prefix+self.dev_pref+':EG-HVPS:switch') + + self._led_hvpsswtsts = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-HVPS:swstatus') + + self._ld_hvpsvoltsp = QLabel('Voltage SP [kV]', self) + self._sb_hvpsvoltsp = SiriusSpinbox( + self, self.prefix+self.dev_pref+':EG-HVPS:voltoutsoft') + + self._ld_hvpsvoltrb = QLabel('Voltage RB [kV]', self) + self._lb_hvpsvoltrb = SiriusLabel( + self, self.prefix+self.dev_pref+':EG-HVPS:voltinsoft') + + self._ld_hvpsenblsel = QLabel('Enable') + self._bt_hvpsenblsel = PyDMStateButton( + self, self.prefix+self.dev_pref+':EG-HVPS:enable') + + self._led_hvpsenblsts = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-HVPS:enstatus') + + self._ld_hvpscurrsp = QLabel('Current SP [mA]') + self._sb_hvpscurrsp = SiriusSpinbox( + self, self.prefix+self.dev_pref+':EG-HVPS:currentoutsoft') + + self._ld_hvpscurrrb = QLabel('Current RB [mA]') + self._lb_hvpscurrrb = SiriusLabel( + self, self.prefix+self.dev_pref+':EG-HVPS:currentinsoft') + + wid = QGroupBox('High Voltage Power Supply', self) + lay = QGridLayout(wid) + lay.addWidget(self._ld_hvpsswtsel, 0, 0, 1, 2) + lay.addWidget(self._bt_hvpsswtsel, 1, 0, alignment=Qt.AlignRight) + lay.addWidget(self._led_hvpsswtsts, 1, 1, alignment=Qt.AlignLeft) + lay.addWidget(self._ld_hvpsvoltsp, 0, 2) + lay.addWidget(self._sb_hvpsvoltsp, 1, 2) + lay.addWidget(self._ld_hvpsvoltrb, 0, 3) + lay.addWidget(self._lb_hvpsvoltrb, 1, 3) + lay.addItem(QSpacerItem(1, 15, QSzPlcy.Ignored, QSzPlcy.Fixed), 2, 0) + lay.addWidget(self._ld_hvpsenblsel, 3, 0, 1, 2) + lay.addWidget(self._bt_hvpsenblsel, 4, 0, alignment=Qt.AlignRight) + lay.addWidget(self._led_hvpsenblsts, 4, 1, alignment=Qt.AlignLeft) + lay.addWidget(self._ld_hvpscurrsp, 3, 2) + lay.addWidget(self._sb_hvpscurrsp, 4, 2) + lay.addWidget(self._ld_hvpscurrrb, 3, 3) + lay.addWidget(self._lb_hvpscurrrb, 4, 3) + return wid + + def _setupTriggerWidget(self): + self._ld_trigsts = QLabel('Status', self) + self._led_trigsts = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-TriggerPS:status') + + self._ld_trigall = QLabel('Trigger Allow', self) + self._led_trigall = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-TriggerPS:allow') + + self._ld_trigenbl = QLabel('Trigger', self) + self._bt_trigenblsel = PyDMStateButton( + self, self.prefix+self.dev_pref+':EG-TriggerPS:enable') + self._led_trigenblsts = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-TriggerPS:enablereal') + + wid = QGroupBox('Trigger', self) + lay = QGridLayout(wid) + lay.addWidget(self._ld_trigsts, 0, 0, 1, 3) + lay.addWidget(self._led_trigsts, 1, 0, 1, 3) + lay.addWidget(self._ld_trigall, 2, 0, 1, 3) + lay.addWidget(self._led_trigall, 3, 0, 1, 3) + lay.addWidget(self._ld_trigenbl, 4, 0, 1, 3) + lay.addWidget(self._bt_trigenblsel, 5, 0, alignment=Qt.AlignRight) + lay.addWidget(self._led_trigenblsts, 5, 1, alignment=Qt.AlignLeft) + + if 'LI' in self.dev_pref: + self._pb_trigenbl_dtl = QPushButton(self) + self._pb_trigenbl_dtl.setObjectName('dtl') + self._pb_trigenbl_dtl.setStyleSheet( + "#dtl{min-width:18px; max-width:18px; icon-size:20px;}") + self._pb_trigenbl_dtl.setIcon(qta.icon('fa5s.ellipsis-v')) + connect_window( + self._pb_trigenbl_dtl, LIEGTrigEnblDetail, self, + prefix=self.prefix, device=self.dev_pref+':EG-TriggerPS') + lay.addWidget(self._pb_trigenbl_dtl, 5, 2, alignment=Qt.AlignLeft) + return wid + + def _setupFilaPSWidget(self): + self._ld_filaswtsel = QLabel('Switch', self) + self._bt_filaswtsel = PyDMStateButton( + self, self.prefix+self.dev_pref+':EG-FilaPS:switch') + + self._led_filasswtsts = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-FilaPS:swstatus') + + self._ld_filacurrsp = QLabel('Current SP [A]', self) + self._sb_filacurrsp = SiriusSpinbox( + self, self.prefix+self.dev_pref+':EG-FilaPS:currentoutsoft') + + self._ld_filacurrrb = QLabel('Current RB [A]', self) + self._lb_filacurrrb = SiriusLabel( + self, self.prefix+self.dev_pref+':EG-FilaPS:currentinsoft') + + self._ld_filavoltrb = QLabel('Voltage RB [V]', self) + self._lb_filavoltrb = SiriusLabel( + self, self.prefix+self.dev_pref+':EG-FilaPS:voltinsoft') + + wid = QGroupBox('Filament Power Supply', self) + lay = QGridLayout(wid) + lay.addWidget(self._ld_filaswtsel, 0, 0, 1, 2) + lay.addWidget(self._bt_filaswtsel, 1, 0, alignment=Qt.AlignRight) + lay.addWidget(self._led_filasswtsts, 1, 1, alignment=Qt.AlignLeft) + lay.addWidget(self._ld_filacurrsp, 0, 2) + lay.addWidget(self._sb_filacurrsp, 1, 2) + lay.addWidget(self._ld_filacurrrb, 0, 3) + lay.addWidget(self._lb_filacurrrb, 1, 3) + lay.addWidget(self._ld_filavoltrb, 0, 4) + lay.addWidget(self._lb_filavoltrb, 1, 4) + return wid + + def _setupBiasPSWidget(self): + self._ld_biasswtsel = QLabel('Switch', self) + self._bt_biasswtsel = PyDMStateButton( + self, self.prefix+self.dev_pref+':EG-BiasPS:switch') + + self._led_biassswtsts = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-BiasPS:swstatus') + + self._ld_biasvoltsp = QLabel('Voltage SP [V]', self) + self._sb_biasvoltsp = SiriusSpinbox( + self, self.prefix+self.dev_pref+':EG-BiasPS:voltoutsoft') + + self._ld_biasvoltrb = QLabel('Voltage RB [V]', self) + self._lb_biasvoltrb = SiriusLabel( + self, self.prefix+self.dev_pref+':EG-BiasPS:voltinsoft') + + self._ld_biascurrrb = QLabel('Current RB [A]', self) + self._lb_biascurrrb = SiriusLabel( + self, self.prefix+self.dev_pref+':EG-BiasPS:currentinsoft') + + wid = QGroupBox('Bias Power Supply', self) + lay = QGridLayout(wid) + lay.addWidget(self._ld_biasswtsel, 0, 0, 1, 2) + lay.addWidget(self._bt_biasswtsel, 1, 0, alignment=Qt.AlignRight) + lay.addWidget(self._led_biassswtsts, 1, 1, alignment=Qt.AlignLeft) + lay.addWidget(self._ld_biasvoltsp, 0, 2) + lay.addWidget(self._sb_biasvoltsp, 1, 2) + lay.addWidget(self._ld_biasvoltrb, 0, 3) + lay.addWidget(self._lb_biasvoltrb, 1, 3) + lay.addWidget(self._ld_biascurrrb, 0, 4) + lay.addWidget(self._lb_biascurrrb, 1, 4) + return wid + + def _setupPulsePSWidget(self): + self._ld_pulsemodsel = QLabel('Mode', self) + self._ld_pulseswtsel = QLabel('Switch', self) + self._ld_pulsesing = QLabel('Single', self) + self._ld_pulsemult = QLabel('Multi', self) + + self._bt_pulsesingmod = PyDMStateButton( + self, self.prefix+self.dev_pref+':EG-PulsePS:singleselect') + self._led_pulsesingmod = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-PulsePS:singleselstatus') + self._bt_pulsesingswt = PyDMStateButton( + self, self.prefix+self.dev_pref+':EG-PulsePS:singleswitch') + self._led_pulsesingswt = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-PulsePS:singleswstatus') + + self._bt_pulsemultmod = PyDMStateButton( + self, self.prefix+self.dev_pref+':EG-PulsePS:multiselect') + self._led_pulsemultmod = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-PulsePS:multiselstatus') + self._bt_pulsemultswt = PyDMStateButton( + self, self.prefix+self.dev_pref+':EG-PulsePS:multiswitch') + self._led_pulsemultswt = SiriusLedState( + self, self.prefix+self.dev_pref+':EG-PulsePS:multiswstatus') + + wid = QGroupBox('Pulse Power Supply', self) + lay = QGridLayout(wid) + lay.addWidget(self._ld_pulsemodsel, 0, 1, 1, 2) + lay.addWidget(self._ld_pulseswtsel, 0, 3, 1, 2) + lay.addWidget(self._ld_pulsesing, 1, 0) + lay.addWidget(self._ld_pulsemult, 2, 0) + lay.addWidget(self._bt_pulsesingmod, 1, 1, alignment=Qt.AlignRight) + lay.addWidget(self._led_pulsesingmod, 1, 2, alignment=Qt.AlignLeft) + lay.addWidget(self._bt_pulsesingswt, 1, 3, alignment=Qt.AlignRight) + lay.addWidget(self._led_pulsesingswt, 1, 4, alignment=Qt.AlignLeft) + lay.addWidget(self._bt_pulsemultmod, 2, 1, alignment=Qt.AlignRight) + lay.addWidget(self._led_pulsemultmod, 2, 2, alignment=Qt.AlignLeft) + lay.addWidget(self._bt_pulsemultswt, 2, 3, alignment=Qt.AlignRight) + lay.addWidget(self._led_pulsemultswt, 2, 4, alignment=Qt.AlignLeft) + return wid + + def _setupMultiPulsePSWidget(self): + self._ld_mpulspwrsp = QLabel('Power SP [V]', self) + self._sb_mpulspwrsp = SiriusSpinbox( + self, self.prefix+self.dev_pref+':EG-PulsePS:poweroutsoft') + self._sb_mpulspwrsp.limitsFromChannel = False + self._sb_mpulspwrsp.setMinimum(0) + self._sb_mpulspwrsp.setMaximum(300) + self._ld_mpulspwrrb = QLabel('Power RB [V]', self) + self._lb_mpulspwrrb = SiriusLabel( + self, self.prefix+self.dev_pref+':EG-PulsePS:powerinsoft') + + wid = QGroupBox('Multi Pulse Power Supply', self) + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignVCenter) + lay.addWidget(self._ld_mpulspwrsp, 0, 0) + lay.addWidget(self._sb_mpulspwrsp, 1, 0) + lay.addWidget(self._ld_mpulspwrrb, 0, 1) + lay.addWidget(self._lb_mpulspwrrb, 1, 1) + return wid
+ + + +
+[docs] +class ITTIWidget(QWidget): + """IT Timing control widget.""" + + def __init__(self, parent=None, prefix='', is_main=False): + """Init.""" + super().__init__(parent) + self.setObjectName('ITApp') + + ld_tienbl = QLabel('Enable Pulses', self, alignment=Qt.AlignCenter) + bt_tienblsel = PyDMStateButton( + self, prefix+'IT-EGH:TI-TrigGen:ChanOut-Sel') + led_tienblsts = SiriusLedState( + self, prefix+'IT-EGH:TI-TrigGen:ChanOut-Sts') + + lay = QGridLayout(self) + lay.setAlignment(Qt.AlignCenter) + lay.setContentsMargins(0, 0, 0, 0) + + glay = QGridLayout() + glay.addWidget(ld_tienbl, 0, 0, 1, 2) + glay.addWidget(bt_tienblsel, 1, 0) + glay.addWidget(led_tienblsts, 1, 1) + if not is_main: + gbox = QGroupBox('Timing', self) + gbox.setLayout(glay) + lay.addWidget(gbox) + else: + lb_title = QLabel( + '<h3>IT - Timing</h3>', self, alignment=Qt.AlignCenter) + lay.setHorizontalSpacing(15) + lay.setVerticalSpacing(15) + lay.addWidget(lb_title, 0, 0) + lay.addLayout(glay, 1, 0)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_pu_modltr/auxiliary_dialogs.html b/_modules/siriushla/li_pu_modltr/auxiliary_dialogs.html new file mode 100644 index 000000000..7810d3c66 --- /dev/null +++ b/_modules/siriushla/li_pu_modltr/auxiliary_dialogs.html @@ -0,0 +1,649 @@ + + + + + + siriushla.li_pu_modltr.auxiliary_dialogs — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.li_pu_modltr.auxiliary_dialogs

+"""Modulator auxiliary dialogs."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QLabel, QGridLayout, QHBoxLayout, \
+    QPushButton, QWidget, QVBoxLayout, QFrame
+
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..widgets import SiriusDialog, SiriusLedState
+
+
+
+[docs] +class ModIntlkDetailDialog(SiriusDialog): + """Modulator Interlock Details.""" + + def __init__(self, parent=None, device='', prefix=VACA_PREFIX): + """Init.""" + super().__init__(parent) + self._prefix = prefix + self._device = _PVName(device) + self._mod_prefix = self._device.substitute(prefix=prefix) + + self.setWindowTitle('Modulator Interlock Details') + self.setObjectName('LIApp') + + self._setupUi() + + def _setupUi(self): + self.title = QLabel( + '<h2>'+self._device.device_name+'</h2>', self, + alignment=Qt.AlignCenter) + + lay = QGridLayout(self) + lay.setAlignment(Qt.AlignTop) + lay.addWidget(self.title, 0, 0, 1, 2) + lay.addWidget(self._setupModSignalWidget(), 1, 0) + lay.addWidget(self._setupExtIntlkSignalWidget(), 1, 1) + + self.setStyleSheet(""" + QLed{ + min-width: 1.29em; max-width: 1.29em; + }""") + + def _setupModSignalWidget(self): + self.lb_modsig = QLabel( + '<h3>Modulator Signal</h3>', self, alignment=Qt.AlignCenter) + self.lb_modsig.setStyleSheet('QLabel{min-height: 2em;}') + + gb_sig1 = QFrame(self) + gb_sig1.setStyleSheet(""" + .QFrame{ + border-top: 2px solid gray; + border-bottom: 1px solid gray; + border-left: 2px solid gray; + border-right: 2px solid gray; + }""") + lay_sig1 = QGridLayout(gb_sig1) + signals = [ + 'PFN_Cab_Temp', 'Tail_Clipper', 'EOLC1_Clipper', 'Thy_Fan', + 'CPS_Clipper', 'EOLC2_Clipper', 'Thy_Temp', 'Door_Interlock', + 'Ground_Rod', 'PFN_Cab_Fan', 'Thy_Trig_G1', 'Thy_Trig_G2', + 'Discharge_switch'] + for idx, sig in enumerate(signals): + row = idx // 3 + col = idx % 3 + led = SiriusLedState(self, self._mod_prefix+':'+sig) + led.offColor = led.Red + lbl = QLabel(sig) + hbox = QHBoxLayout() + hbox.addWidget(led) + hbox.addWidget(lbl) + lay_sig1.addLayout(hbox, row, col) + + led_kly_nd = SiriusLedState( + self, self._mod_prefix+':Kly_Heat_power') + led_kly_nd.offColor = led_kly_nd.Red + lbl_kly_nd = QLabel('Kly_Heat_power') + hb_kly_nd = QHBoxLayout() + hb_kly_nd.addWidget(led_kly_nd) + hb_kly_nd.addWidget(lbl_kly_nd) + led_kly_ov = SiriusLedState(self, self._mod_prefix+':Kly_F_Over') + led_kly_ov.offColor = led_kly_ov.Red + lbl_kly_ov = QLabel('Kly_F_Over') + hb_kly_ov = QHBoxLayout() + hb_kly_ov.addWidget(led_kly_ov) + hb_kly_ov.addWidget(lbl_kly_ov) + led_kly_un = SiriusLedState(self, self._mod_prefix+':Kly_F_Under') + led_kly_un.offColor = led_kly_un.Red + lbl_kly_un = QLabel('Kly_F_Under') + hb_kly_un = QHBoxLayout() + hb_kly_un.addWidget(led_kly_un) + hb_kly_un.addWidget(lbl_kly_un) + gb_sig2 = QFrame(self) + gb_sig2.setStyleSheet(""" + .QFrame{ + border-top: 1px solid gray; + border-bottom: 1px solid gray; + border-left: 2px solid gray; + border-right: 2px solid gray; + }""") + lay_sig2 = QGridLayout(gb_sig2) + lay_sig2.addLayout(hb_kly_nd, 0, 0, 2, 1) + lay_sig2.addLayout(hb_kly_ov, 0, 1) + lay_sig2.addLayout(hb_kly_un, 1, 1) + + led_thy_nd = SiriusLedState( + self, self._mod_prefix+':Thy_Heat_power') + led_thy_nd.offColor = led_thy_nd.Red + lbl_thy_nd = QLabel('Thy_Heat_power') + hb_thy_nd = QHBoxLayout() + hb_thy_nd.addWidget(led_thy_nd) + hb_thy_nd.addWidget(lbl_thy_nd) + led_thy_f = SiriusLedState( + self, self._mod_prefix+':Thy_Filament_power') + led_thy_f.offColor = led_thy_f.Red + lbl_thy_f = QLabel('Thy_F_power') + hb_thy_f = QHBoxLayout() + hb_thy_f.addWidget(led_thy_f) + hb_thy_f.addWidget(lbl_thy_f) + led_thy_fo = SiriusLedState(self, self._mod_prefix+':Thy_F_Over') + led_thy_fo.offColor = led_thy_fo.Red + lbl_thy_fo = QLabel('Thy_F_Over') + hb_thy_fo = QHBoxLayout() + hb_thy_fo.addWidget(led_thy_fo) + hb_thy_fo.addWidget(lbl_thy_fo) + led_thy_fu = SiriusLedState(self, self._mod_prefix+':Thy_F_Under') + led_thy_fu.offColor = led_thy_fu.Red + lbl_thy_fu = QLabel('Thy_F_Under') + hb_thy_fu = QHBoxLayout() + hb_thy_fu.addWidget(led_thy_fu) + hb_thy_fu.addWidget(lbl_thy_fu) + led_thy_h = SiriusLedState(self, self._mod_prefix+':Thy_H_power') + led_thy_h.offColor = led_thy_h.Red + lbl_thy_h = QLabel('Thy_H_power') + hb_thy_h = QHBoxLayout() + hb_thy_h.addWidget(led_thy_h) + hb_thy_h.addWidget(lbl_thy_h) + led_thy_ho = SiriusLedState(self, self._mod_prefix+':Thy_H_Over') + led_thy_ho.offColor = led_thy_ho.Red + lbl_thy_ho = QLabel('Thy_H_Over') + hb_thy_ho = QHBoxLayout() + hb_thy_ho.addWidget(led_thy_ho) + hb_thy_ho.addWidget(lbl_thy_ho) + led_thy_hu = SiriusLedState(self, self._mod_prefix+':Thy_H_Under') + led_thy_hu.offColor = led_thy_hu.Red + lbl_thy_hu = QLabel('Thy_H_Under') + hb_thy_hu = QHBoxLayout() + hb_thy_hu.addWidget(led_thy_hu) + hb_thy_hu.addWidget(lbl_thy_hu) + gb_sig3 = QFrame(self) + gb_sig3.setStyleSheet(""" + .QFrame{ + border-top: 1px solid gray; + border-bottom: 1px solid gray; + border-left: 2px solid gray; + border-right: 2px solid gray; + }""") + lay_sig3 = QGridLayout(gb_sig3) + lay_sig3.addLayout(hb_thy_nd, 0, 0, 4, 1) + lay_sig3.addLayout(hb_thy_f, 0, 1, 2, 1) + lay_sig3.addLayout(hb_thy_fo, 0, 2) + lay_sig3.addLayout(hb_thy_fu, 1, 2) + lay_sig3.addLayout(hb_thy_h, 2, 1, 2, 1) + lay_sig3.addLayout(hb_thy_ho, 2, 2) + lay_sig3.addLayout(hb_thy_hu, 3, 2) + + led_bias_nd = SiriusLedState( + self, self._mod_prefix+':Bias_power') + led_bias_nd.offColor = led_bias_nd.Red + lbl_bias_nd = QLabel('Bias_power') + hb_bias_nd = QHBoxLayout() + hb_bias_nd.addWidget(led_bias_nd) + hb_bias_nd.addWidget(lbl_bias_nd) + led_bias_ov = SiriusLedState(self, self._mod_prefix+':Bias_Over') + led_bias_ov.offColor = led_bias_ov.Red + lbl_bias_ov = QLabel('Bias_Over') + hb_bias_ov = QHBoxLayout() + hb_bias_ov.addWidget(led_bias_ov) + hb_bias_ov.addWidget(lbl_bias_ov) + led_bias_un = SiriusLedState(self, self._mod_prefix+':Bias_Under') + led_bias_un.offColor = led_bias_un.Red + lbl_bias_un = QLabel('Bias_Under') + hb_bias_un = QHBoxLayout() + hb_bias_un.addWidget(led_bias_un) + hb_bias_un.addWidget(lbl_bias_un) + gb_sig4 = QFrame(self) + gb_sig4.setStyleSheet(""" + .QFrame{ + border-top: 1px solid gray; + border-bottom: 1px solid gray; + border-left: 2px solid gray; + border-right: 2px solid gray; + }""") + lay_sig4 = QGridLayout(gb_sig4) + lay_sig4.addLayout(hb_bias_nd, 0, 0, 2, 1) + lay_sig4.addLayout(hb_bias_ov, 0, 1) + lay_sig4.addLayout(hb_bias_un, 1, 1) + + led_cps_nd = SiriusLedState( + self, self._mod_prefix+':CPS_ALL') + led_cps_nd.offColor = led_cps_nd.Red + lbl_cps_nd = QLabel('CPS_ALL') + hb_cps_nd = QHBoxLayout() + hb_cps_nd.addWidget(led_cps_nd) + hb_cps_nd.addWidget(lbl_cps_nd) + led_cpsflt = SiriusLedState(self, self._mod_prefix+':CPS_Fault') + led_cpsflt.offColor = led_cpsflt.Red + lbl_cpsflt = QLabel('CPS_Fault') + hb_cpsflt = QHBoxLayout() + hb_cpsflt.addWidget(led_cpsflt) + hb_cpsflt.addWidget(lbl_cpsflt) + led_cpsilk = SiriusLedState(self, self._mod_prefix+':CPS_lock') + led_cpsilk.offColor = led_cpsilk.Red + lbl_cpsilk = QLabel('CPS_Interlock') + hb_cpsilk = QHBoxLayout() + hb_cpsilk.addWidget(led_cpsilk) + hb_cpsilk.addWidget(lbl_cpsilk) + led_cpsmns = SiriusLedState(self, self._mod_prefix+':CPS_Mains') + led_cpsmns.offColor = led_cpsmns.Red + lbl_cpsmns = QLabel('CPS_Mains') + hb_cpsmns = QHBoxLayout() + hb_cpsmns.addWidget(led_cpsmns) + hb_cpsmns.addWidget(lbl_cpsmns) + led_cpsonoff = SiriusLedState(self, self._mod_prefix+':CPS_ON_OFF') + led_cpsonoff.offColor = led_cpsonoff.Red + lbl_cpsonoff = QLabel('CPS_ON_OFF') + hb_cpsonoff = QHBoxLayout() + hb_cpsonoff.addWidget(led_cpsonoff) + hb_cpsonoff.addWidget(lbl_cpsonoff) + led_cpsilkin = SiriusLedState( + self, self._mod_prefix+':CPS_Interlock_Input') + led_cpsilkin.offColor = led_cpsilkin.Red + lbl_cpsilkin = QLabel('CPS_Interlock_Input') + hb_cpsilkin = QHBoxLayout() + hb_cpsilkin.addWidget(led_cpsilkin) + hb_cpsilkin.addWidget(lbl_cpsilkin) + gb_sig5 = QFrame(self) + gb_sig5.setStyleSheet(""" + .QFrame{ + border-top: 1px solid gray; + border-bottom: 2px solid gray; + border-left: 2px solid gray; + border-right: 2px solid gray; + }""") + lay_sig5 = QGridLayout(gb_sig5) + lay_sig5.addLayout(hb_cps_nd, 0, 0, 5, 1) + lay_sig5.addLayout(hb_cpsflt, 0, 1) + lay_sig5.addLayout(hb_cpsilk, 1, 1) + lay_sig5.addLayout(hb_cpsmns, 2, 1) + lay_sig5.addLayout(hb_cpsonoff, 3, 1) + lay_sig5.addLayout(hb_cpsilkin, 4, 1) + + wid = QWidget(self) + lay = QVBoxLayout(wid) + lay.setAlignment(Qt.AlignTop) + lay.setSpacing(0) + lay.addWidget(self.lb_modsig) + lay.addWidget(gb_sig1) + lay.addWidget(gb_sig2) + lay.addWidget(gb_sig3) + lay.addWidget(gb_sig4) + lay.addWidget(gb_sig5) + return wid + + def _setupExtIntlkSignalWidget(self): + self.lb_extsig = QLabel( + '<h3>External Interlock Signal</h3>', self, + alignment=Qt.AlignCenter) + self.lb_extsig.setStyleSheet('QLabel{min-height: 2em;}') + + lbl_lvilk = QLabel( + '<h4>LV_Interlock</h4>', self, alignment=Qt.AlignCenter) + led_lvilk = SiriusLedState(self, self._mod_prefix+':LV_Interlock') + led_lvilk.offColor = led_lvilk.Red + + lbl_lv1 = QLabel('1.Ti_Pump_pow') + led_lv1 = SiriusLedState(self, self._mod_prefix+':Ti_Pump_pow') + led_lv1.offColor = led_lv1.Red + + lbl_lv2 = QLabel('2.') + led_lv2 = SiriusLedState(self, self._mod_prefix+':LV_reserved1') + led_lv2.offColor = led_lv2.Red + + lbl_lv3 = QLabel('3.') + led_lv3 = SiriusLedState(self, self._mod_prefix+':LV_reserved2') + led_lv3.offColor = led_lv3.Red + + lbl_lv4 = QLabel('4.') + led_lv4 = SiriusLedState(self, self._mod_prefix+':LV_reserved3') + led_lv4.offColor = led_lv4.Red + + wid_lvilk = QFrame(self) + wid_lvilk.setStyleSheet(""" + .QFrame{ + border-top: 2px solid gray; + border-bottom: 2px solid gray; + border-left: 2px solid gray; + border-right: 1px solid gray; + }""") + lay_lvilk = QGridLayout(wid_lvilk) + lay_lvilk.setAlignment(Qt.AlignTop) + lay_lvilk.addWidget(led_lvilk, 0, 0, 1, 2, alignment=Qt.AlignCenter) + lay_lvilk.addWidget(lbl_lvilk, 1, 0, 1, 2) + lay_lvilk.addWidget(led_lv1, 2, 0) + lay_lvilk.addWidget(lbl_lv1, 2, 1) + lay_lvilk.addWidget(led_lv2, 3, 0) + lay_lvilk.addWidget(lbl_lv2, 3, 1) + lay_lvilk.addWidget(led_lv3, 4, 0) + lay_lvilk.addWidget(lbl_lv3, 4, 1) + lay_lvilk.addWidget(led_lv4, 5, 0) + lay_lvilk.addWidget(lbl_lv4, 5, 1) + + lbl_hvilk = QLabel( + '<h4>HV_Interlock</h4>', self, alignment=Qt.AlignCenter) + led_hvilk = SiriusLedState(self, self._mod_prefix+':HV_Interlock') + led_hvilk.offColor = led_hvilk.Red + + lbl_hv1 = QLabel('1.Oil_tank_w') + led_hv1 = SiriusLedState(self, self._mod_prefix+':Oil_tank_w') + led_hv1.offColor = led_hv1.Red + + lbl_hv2 = QLabel('2.Collector_w') + led_hv2 = SiriusLedState(self, self._mod_prefix+':Collector_w') + led_hv2.offColor = led_hv2.Red + + lbl_hv3 = QLabel('3.PPS') + led_hv3 = SiriusLedState(self, self._mod_prefix+':PPS') + led_hv3.offColor = led_hv3.Red + + lbl_hv4 = QLabel('4.Focus_pow') + led_hv4 = SiriusLedState(self, self._mod_prefix+':Focus_pow') + led_hv4.offColor = led_hv4.Red + + lbl_hv5 = QLabel('5.') + led_hv5 = SiriusLedState(self, self._mod_prefix+':HV_reserved2') + led_hv5.offColor = led_hv5.Red + + lbl_hv6 = QLabel('6.') + led_hv6 = SiriusLedState(self, self._mod_prefix+':HV_reserved3') + led_hv6.offColor = led_hv6.Red + + wid_hvilk = QFrame(self) + wid_hvilk.setStyleSheet(""" + .QFrame{ + border-top: 2px solid gray; + border-bottom: 2px solid gray; + border-left: 1px solid gray; + border-right: 1px solid gray; + }""") + lay_hvilk = QGridLayout(wid_hvilk) + lay_hvilk.setAlignment(Qt.AlignTop) + lay_hvilk.addWidget(led_hvilk, 0, 0, 1, 2, alignment=Qt.AlignCenter) + lay_hvilk.addWidget(lbl_hvilk, 1, 0, 1, 2) + lay_hvilk.addWidget(led_hv1, 2, 0) + lay_hvilk.addWidget(lbl_hv1, 2, 1) + lay_hvilk.addWidget(led_hv2, 3, 0) + lay_hvilk.addWidget(lbl_hv2, 3, 1) + lay_hvilk.addWidget(led_hv3, 4, 0) + lay_hvilk.addWidget(lbl_hv3, 4, 1) + lay_hvilk.addWidget(led_hv4, 5, 0) + lay_hvilk.addWidget(lbl_hv4, 5, 1) + lay_hvilk.addWidget(led_hv5, 6, 0) + lay_hvilk.addWidget(lbl_hv5, 6, 1) + lay_hvilk.addWidget(led_hv6, 7, 0) + lay_hvilk.addWidget(lbl_hv6, 7, 1) + + lbl_trilk = QLabel( + '<h4>TR_Interlock</h4>', self, alignment=Qt.AlignCenter) + led_trilk = SiriusLedState(self, self._mod_prefix+':TR_Interlock') + led_trilk.offColor = led_trilk.Red + + lbl_tr1 = QLabel('1.Waveguide_w') + led_tr1 = SiriusLedState(self, self._mod_prefix+':Waveguide_w') + led_tr1.offColor = led_tr1.Red + + lbl_tr2 = QLabel('2.') + led_tr2 = SiriusLedState(self, self._mod_prefix+':Wave_window_w') + led_tr2.offColor = led_tr2.Red + + lbl_tr3 = QLabel('3.MPS') + led_tr3 = SiriusLedState(self, self._mod_prefix+':MPS') + led_tr3.offColor = led_tr3.Red + + lbl_tr4 = QLabel('4.') + led_tr4 = SiriusLedState(self, self._mod_prefix+':TR_reserved2') + led_tr4.offColor = led_tr4.Red + + lbl_tr5 = QLabel('5.') + led_tr5 = SiriusLedState(self, self._mod_prefix+':TR_reserved3') + led_tr5.offColor = led_tr5.Red + + lbl_tr6 = QLabel('6.') + led_tr6 = SiriusLedState(self, self._mod_prefix+':TR_reserved4') + led_tr6.offColor = led_tr6.Red + + lbl_tr7 = QLabel('7.') + led_tr7 = SiriusLedState(self, self._mod_prefix+':TR_reserved5') + led_tr7.offColor = led_tr7.Red + + lbl_tr8 = QLabel('8.') + led_tr8 = SiriusLedState(self, self._mod_prefix+':TR_reserved6') + led_tr8.offColor = led_tr8.Red + + wid_trilk = QFrame(self) + wid_trilk.setStyleSheet(""" + .QFrame{ + border-top: 2px solid gray; + border-bottom: 2px solid gray; + border-left: 1px solid gray; + border-right: 2px solid gray; + }""") + lay_trilk = QGridLayout(wid_trilk) + lay_trilk.setAlignment(Qt.AlignTop) + lay_trilk.addWidget(led_trilk, 0, 0, 1, 2, alignment=Qt.AlignCenter) + lay_trilk.addWidget(lbl_trilk, 1, 0, 1, 2) + lay_trilk.addWidget(led_tr1, 2, 0) + lay_trilk.addWidget(lbl_tr1, 2, 1) + lay_trilk.addWidget(led_tr2, 3, 0) + lay_trilk.addWidget(lbl_tr2, 3, 1) + lay_trilk.addWidget(led_tr3, 4, 0) + lay_trilk.addWidget(lbl_tr3, 4, 1) + lay_trilk.addWidget(led_tr4, 5, 0) + lay_trilk.addWidget(lbl_tr4, 5, 1) + lay_trilk.addWidget(led_tr5, 6, 0) + lay_trilk.addWidget(lbl_tr5, 6, 1) + lay_trilk.addWidget(led_tr6, 7, 0) + lay_trilk.addWidget(lbl_tr6, 7, 1) + lay_trilk.addWidget(led_tr7, 8, 0) + lay_trilk.addWidget(lbl_tr7, 8, 1) + lay_trilk.addWidget(led_tr8, 9, 0) + lay_trilk.addWidget(lbl_tr8, 9, 1) + + wid = QWidget(self) + lay = QGridLayout(wid) + lay.setVerticalSpacing(0) + lay.setHorizontalSpacing(0) + lay.setAlignment(Qt.AlignTop) + lay.addWidget(self.lb_extsig, 0, 0, 1, 3) + lay.addWidget(wid_lvilk, 1, 0) + lay.addWidget(wid_hvilk, 1, 1) + lay.addWidget(wid_trilk, 1, 2) + return wid
+ + + +
+[docs] +class ModEmerStopDialog(SiriusDialog): + """Modulator Emergency Stop Window.""" + + def __init__(self, parent=None, device='', prefix=VACA_PREFIX): + """Init.""" + super().__init__(parent) + self.setObjectName('LIApp') + self._prefix = prefix + self._device = _PVName(device) + self._mod_prefix = self._device.substitute(prefix=prefix) + + self.setWindowTitle( + self._device.dev+' '+self._device.idx+' - Emergency Stop') + self._setupUi() + + def _setupUi(self): + self._lb_desc = QLabel( + '<h3>Are you sure to Poweroff '+self._device.dev+' ' + + self._device.idx+'?</h3>') + + self._pb_yes = PyDMPushButton( + self, label='YES', pressValue=1, + init_channel=self._mod_prefix + ':EMER_STOP') + self._pb_yes.setObjectName('yes') + self._pb_yes.setStyleSheet('#yes{background-color:red;}') + + self._pb_exit = QPushButton('EXIT', self) + self._pb_exit.clicked.connect(self.close) + + lay = QGridLayout(self) + lay.setHorizontalSpacing(20) + lay.setVerticalSpacing(20) + lay.addWidget(self._lb_desc, 0, 0, 1, 2) + lay.addWidget(self._pb_yes, 1, 0, alignment=Qt.AlignCenter) + lay.addWidget(self._pb_exit, 1, 1, alignment=Qt.AlignCenter)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_pu_modltr/main.html b/_modules/siriushla/li_pu_modltr/main.html new file mode 100644 index 000000000..4dc4b5ea2 --- /dev/null +++ b/_modules/siriushla/li_pu_modltr/main.html @@ -0,0 +1,480 @@ + + + + + + siriushla.li_pu_modltr.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.li_pu_modltr.main

+"""LI Modulators Control."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGridLayout, QLabel, \
+    QHBoxLayout, QPushButton, QFrame
+
+import qtawesome as qta
+
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..util import connect_window, get_appropriate_color
+from ..widgets import SiriusMainWindow, SiriusLedState, SiriusSpinbox, \
+    SiriusPushButton, PyDMStateButton, SiriusLabel
+from .auxiliary_dialogs import ModIntlkDetailDialog, ModEmerStopDialog
+
+
+
+[docs] +class LIModltrWindow(SiriusMainWindow): + """LI Modulators Control.""" + + def __init__(self, prefix=VACA_PREFIX, parent=None): + """Init.""" + super().__init__(parent) + self.prefix = prefix + self.setWindowTitle('Linac Modulators Window') + self.setObjectName('LIApp') + self.setWindowIcon( + qta.icon('mdi.current-ac', color=get_appropriate_color('LI'))) + + self._setupUi() + + self.setFocus(True) + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + cw = QWidget() + self.setCentralWidget(cw) + lay = QHBoxLayout(cw) + for dev in ['LI-01:PU-Modltr-1', 'LI-01:PU-Modltr-2']: + dev = _PVName(dev).substitute(prefix=self.prefix) + lay.addWidget(self._setupModltrWidget(dev)) + + self.setStyleSheet(""" + QLed{ + min-width: 1.29em; max-width: 1.29em; + }""") + + def _setupModltrWidget(self, dev): + title = QLabel( + '<h2>'+_PVName(dev).device_name+'</h2>', self, + alignment=Qt.AlignCenter) + + wid_intlk = self._setupInterlockWidget(dev) + + wid_ctrls = self._setupMainControlsWidget(dev) + + wid_sps = self._setupSetpointsWidget(dev) + + wid_emer = self._setupEmerStopWidget(dev) + + wid_auxmon = self._setupAuxMonitorWidget(dev) + + wid = QWidget() + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignCenter) + lay.setHorizontalSpacing(20) + lay.setVerticalSpacing(20) + lay.addWidget(title, 0, 0, 1, 2) + lay.addWidget(wid_intlk, 1, 0, 1, 2) + lay.addWidget(wid_ctrls, 2, 0, 1, 2) + lay.addWidget(wid_sps, 3, 0) + lay.addWidget(wid_emer, 3, 1) + lay.addWidget(wid_auxmon, 4, 0, 1, 2) + lay.setColumnStretch(0, 2) + lay.setColumnStretch(1, 1) + return wid + + def _setupInterlockWidget(self, dev): + # Remote/Local + ld_ctrlmode = QLabel('<h3>Remote/Local</h3>') + led_ctrlmode = SiriusLedState(self, dev+':Remote') + led_ctrlmode.offColor = SiriusLedState.Red + + # Output_Status + ld_output = QLabel('<h3>Output_Status</h3>') + led_output = SiriusLedState(self, dev+':OutPut_Status') + + # Reset + pb_reset = SiriusPushButton( + self, label='Reset', icon=qta.icon('fa5s.sync'), + pressValue=1, releaseValue=0, init_channel=dev+':RESET') + pb_reset.setObjectName('reset') + pb_reset.setStyleSheet(""" + #reset{ + min-width: 5em; max-width: 5em; + min-height: 1.5em; max-height: 1.5em; + }""") + + # Interlocks + lay_ilks = QGridLayout() + + lay_ilks.setVerticalSpacing(9) + interlocks = [ + 'Run/Stop', 'PreHeat', 'Charge_Allowed', 'TrigOut_Allowed', + 'Emer_Stop', 'CPS_ALL', 'Thy_Heat', 'Kly_Heat', 'LV_Rdy_OK', + 'HV_Rdy_OK', 'TRIG_Rdy_OK', 'MOD_Self_Fault', 'MOD_Sys_Ready', + 'TRIG_Norm', 'Pulse_Current'] + for idx, ilk in enumerate(interlocks): + row = idx % 8 + col = int(idx > 7) + led = SiriusLedState(self, dev+':'+ilk) + led.offColor = led.Red + lbl = QLabel(ilk) + hbox = QHBoxLayout() + hbox.setAlignment(Qt.AlignLeft) + hbox.addWidget(led) + hbox.addWidget(lbl) + lay_ilks.addLayout(hbox, row, col) + + pb_check = QPushButton('Check', self) + pb_check.setObjectName('check') + pb_check.setStyleSheet(""" + #check{ + min-width: 5em; max-width: 5em; + min-height: 1.5em; max-height: 1.5em; + }""") + connect_window( + pb_check, ModIntlkDetailDialog, self, + device=dev, prefix=self.prefix) + lay_ilks.addWidget(pb_check, 7, 1, alignment=Qt.AlignCenter) + + wid = QFrame(self) + wid.setStyleSheet( + '.QFrame{border: 2px solid gray;}') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignCenter) + lay.setHorizontalSpacing(10) + lay.addWidget(led_ctrlmode, 0, 0, alignment=Qt.AlignCenter) + lay.addWidget(ld_ctrlmode, 0, 1, alignment=Qt.AlignLeft) + lay.addWidget(led_output, 1, 0, alignment=Qt.AlignCenter) + lay.addWidget(ld_output, 1, 1, alignment=Qt.AlignLeft) + lay.addWidget(pb_reset, 2, 0, 1, 2, alignment=Qt.AlignCenter) + lay.addLayout(lay_ilks, 0, 2, 3, 1) + lay.setColumnStretch(0, 1) + lay.setColumnStretch(1, 4) + lay.setColumnStretch(2, 8) + lay.setRowStretch(0, 2) + lay.setRowStretch(1, 2) + lay.setRowStretch(2, 1) + return wid + + def _setupMainControlsWidget(self, dev): + lb_RUN_STOP = QLabel( + '<h4>RUN_STOP</h4>', self, alignment=Qt.AlignCenter) + led_RUN_STOP = SiriusLedState(self, dev + ':RUN_STOP') + led_RUN_STOP.offColor = SiriusLedState.Red + btn_STOP = PyDMPushButton( + parent=self, init_channel=dev + ':RUN_STOP', pressValue=0, + icon=qta.icon('mdi.power-off')) + btn_STOP.setToolTip( + 'Turn Off: Only press if you know what you are doing') + btn_STOP.showConfirmDialog = True + btn_STOP.confirmMessage = ( + "This Action will Turn off the Klystron and Thyratron." + "<h4>After this operation the system will enter in a 1h long " + "ramping process when turned on again.</h4>\n" + "Are you sure you want to proceed?") + btn_RUN = PyDMPushButton( + parent=self, init_channel=dev + ':RUN_STOP', pressValue=1, + icon=qta.icon('mdi.power-on')) + btn_RUN.setToolTip('Turn On') + gdl_RUN_STOP = QGridLayout() + gdl_RUN_STOP.addWidget(btn_STOP, 0, 0) + gdl_RUN_STOP.addWidget(btn_RUN, 0, 1) + gdl_RUN_STOP.addWidget( + led_RUN_STOP, 1, 0, 1, 2, alignment=Qt.AlignCenter) + + lb_PREHEAT = QLabel( + '<h4>PREHEAT</h4>', self, alignment=Qt.AlignCenter) + led_PREHEAT = SiriusLedState(self, dev + ':PREHEAT') + led_PREHEAT.offColor = SiriusLedState.Red + btn_PREHEAT_OFF = PyDMPushButton( + parent=self, init_channel=dev + ':PREHEAT', pressValue=0, + icon=qta.icon('mdi.power-off')) + btn_PREHEAT_OFF.setToolTip( + 'Turn Off: Only press if you know what you are doing') + btn_PREHEAT_OFF.showConfirmDialog = True + btn_PREHEAT_OFF.confirmMessage = ( + "This Action will Turn off the Klystron and Thyratron." + "<h4>After this operation the system will enter in a 1h long " + "ramping process when turned on again.</h4>\n" + "Are you sure you want to proceed?") + btn_PREHEAT_ON = PyDMPushButton( + parent=self, init_channel=dev + ':PREHEAT', pressValue=1, + icon=qta.icon('mdi.power-on')) + btn_PREHEAT_ON.showConfirmDialog = True + btn_PREHEAT_ON.confirmMessage = ( + "If PREHEAT is disabled, this action will <h4>start the 1h long " + "ramping process of the Klystron and Thyratron.</h4>\n" + "Are you sure you want to proceed?") + gdl_PREHEAT = QGridLayout() + gdl_PREHEAT.addWidget(btn_PREHEAT_OFF, 0, 0) + gdl_PREHEAT.addWidget(btn_PREHEAT_ON, 0, 1) + gdl_PREHEAT.addWidget( + led_PREHEAT, 1, 0, 1, 2, alignment=Qt.AlignCenter) + + lb_Charge = QLabel( + '<h4>Charge</h4>', self, alignment=Qt.AlignCenter) + pb_Charge = PyDMStateButton( + self, dev + ':CHARGE') + + lb_TrigOut = QLabel( + '<h4>TrigOut</h4>', self, alignment=Qt.AlignCenter) + pb_TrigOut = PyDMStateButton( + self, dev + ':TRIGOUT') + + wid = QFrame() + wid.setStyleSheet( + '.QFrame{border: 2px solid gray;}') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignCenter) + lay.setHorizontalSpacing(30) + lay.addWidget(lb_RUN_STOP, 0, 0) + lay.addLayout(gdl_RUN_STOP, 1, 0, alignment=Qt.AlignCenter) + lay.addWidget(lb_PREHEAT, 0, 1) + lay.addLayout(gdl_PREHEAT, 1, 1, alignment=Qt.AlignCenter) + lay.addWidget(lb_Charge, 0, 2) + lay.addWidget(pb_Charge, 1, 2) + lay.addWidget(lb_TrigOut, 0, 3) + lay.addWidget(pb_TrigOut, 1, 3) + return wid + + def _setupSetpointsWidget(self, dev): + lbl_sp = QLabel('<h4>Setpoint</h4>', self, alignment=Qt.AlignCenter) + lbl_rb = QLabel('<h4>Readback</h4>', self, alignment=Qt.AlignCenter) + lbl_kv = QLabel('kV', self, alignment=Qt.AlignCenter) + lbl_ma = QLabel('mA', self, alignment=Qt.AlignCenter) + + sb_volt = SiriusSpinbox(self, dev+':WRITE_V') + lb_volt = SiriusLabel(self, dev+':READV') + lb_volt.setAlignment(Qt.AlignCenter) + + sb_curr = SiriusSpinbox(self, dev+':WRITE_I') + lb_curr = SiriusLabel(self, dev+':READI') + lb_curr.setAlignment(Qt.AlignCenter) + + wid = QFrame() + wid.setStyleSheet( + '.QFrame{border: 2px solid gray;}') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignCenter) + lay.addWidget(lbl_sp, 0, 0) + lay.addWidget(lbl_rb, 0, 1) + lay.addWidget(sb_volt, 1, 0) + lay.addWidget(lb_volt, 1, 1) + lay.addWidget(lbl_kv, 1, 2) + lay.addWidget(sb_curr, 2, 0) + lay.addWidget(lb_curr, 2, 1) + lay.addWidget(lbl_ma, 2, 2) + return wid + + def _setupEmerStopWidget(self, dev): + pb_emerstop = QPushButton('EMER\nSTOP', self) + pb_emerstop.setObjectName('emerstop') + pb_emerstop.setStyleSheet(""" + #emerstop { + background-color: red; + min-width: 3em; max-width: 3em; + min-height: 3em; max-height: 3em; + font-weight: bold; + }""") + connect_window( + pb_emerstop, ModEmerStopDialog, self, + device=dev, prefix=self.prefix) + + wid = QWidget() + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignCenter) + lay.addWidget(pb_emerstop) + return wid + + def _setupAuxMonitorWidget(self, dev): + lb_klymin = SiriusLabel(self, dev+':K_W_T1') + lb_klymin.setStyleSheet( + 'QLabel{min-width: 2em; max-width: 2em;}') + lb_klysec = SiriusLabel(self, dev+':K_W_T2') + lb_klysec.setStyleSheet( + 'QLabel{min-width: 2em; max-width: 2em;}') + lb_thymin = SiriusLabel(self, dev+':TH_W_T01') + lb_thymin.setStyleSheet( + 'QLabel{min-width: 2em; max-width: 2em;}') + lb_thysec = SiriusLabel(self, dev+':TH_W_T02') + lb_thysec.setStyleSheet( + 'QLabel{min-width: 2em; max-width: 2em;}') + + wid = QFrame(self) + wid.setStyleSheet( + '.QFrame{border: 2px solid gray;}') + lay = QHBoxLayout(wid) + lay.addStretch() + lay.addWidget(QLabel('<h4>Klystron</h4>')) + lay.addWidget(lb_klymin) + lay.addWidget(QLabel('Min')) + lay.addWidget(lb_klysec) + lay.addWidget(QLabel('Sec')) + lay.addStretch() + lay.addWidget(QLabel('<h4>THyratron</h4>')) + lay.addWidget(lb_thymin) + lay.addWidget(QLabel('Min')) + lay.addWidget(lb_thysec) + lay.addWidget(QLabel('Sec')) + lay.addStretch() + return wid
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_rf_llrf/chart.html b/_modules/siriushla/li_rf_llrf/chart.html new file mode 100644 index 000000000..853efdef9 --- /dev/null +++ b/_modules/siriushla/li_rf_llrf/chart.html @@ -0,0 +1,289 @@ + + + + + + siriushla.li_rf_llrf.chart — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.li_rf_llrf.chart

+"""LI LLRF Chart Window."""
+
+from qtpy.QtWidgets import QGridLayout, QWidget
+from ..widgets import SiriusMainWindow
+from .widgets import GraphTime, GraphIvsQ, GraphWave
+
+
+
+[docs] +class ChartWindow(SiriusMainWindow): + """Show the Chart Window.""" + + def __init__(self, parent=None, dev='', channel='', chart_type="Forward", prefix=''): + """Init.""" + super().__init__(parent) + self.prefix = prefix + self.main_dev = 'LA-RF:LLRF:' + self.device = dev + self.devpref = self.prefix + self.main_dev + self.channel = channel + self.chart_type = chart_type + self.setObjectName('LIApp') + + if channel != '': + self.setWindowTitle( + self.device + " " + self.channel + + " " + chart_type + ' Chart') + else: + self.setWindowTitle(chart_type + ' Chart') + + self._setupUi() + +
+[docs] + def chartsIQAmpPha(self, lay): + """Show the 4 basic charts""" + """These being: I&Q, based on time and IxQ, Amplitude and Phase""" + iqtime = GraphIvsQ( + self, self.device, 'Time', self.devpref, + self.channel, prefix=self.prefix) + ivsq = GraphIvsQ( + self, self.device, 'IvsQ', self.devpref, + self.channel, prefix=self.prefix) + amp = GraphTime( + self, self.device, 'Amp', self.devpref, + self.channel, prefix=self.prefix) + pha = GraphTime( + self, self.device, 'Pha', self.devpref, + self.channel, prefix=self.prefix) + lay.addWidget(iqtime, 0, 0) + lay.addWidget(ivsq, 1, 0) + lay.addWidget(amp, 0, 1) + lay.addWidget(pha, 1, 1)
+ + +
+[docs] + def chartsPulseAmpPha(self, lay): + """Show the pulse charts of Amplitude and Phase""" + amp = GraphWave( + self, self.device, 'PAmp', self.devpref, + self.channel, prefix=self.prefix) + pha = GraphWave( + self, self.device, 'PPha', self.devpref, + self.channel, prefix=self.prefix) + lay.addWidget(amp, 0, 2) + lay.addWidget(pha, 1, 2)
+ + + def _setupUi(self): + """Display the selected chart type.""" + wid = QWidget(self) + self.setCentralWidget(wid) + lay = QGridLayout() + lay.setContentsMargins(0, 0, 0, 0) + wid.setLayout(lay) + + if self.chart_type in ["Reference", "VM"]: + self.chartsIQAmpPha(lay) + elif self.chart_type in ["Pick-Up", "Forward"]: + self.chartsIQAmpPha(lay) + self.chartsPulseAmpPha(lay) + elif self.chart_type == 'Diff': + lay.addWidget( + GraphTime(self, self.device, 'Diff', self.devpref, prefix=self.prefix)) + else: + lay.addWidget( + GraphWave(self, self.device, 'Raw', self.devpref, prefix=self.prefix))
+ + +
+[docs] +class ChartMon(QWidget): + """Show the Chart Window.""" + + def __init__(self, parent=None, dev='', prefix=''): + """Init.""" + super().__init__(parent) + self.prefix = prefix + self.main_dev = 'LA-RF:LLRF:' + self.device = dev + self.devpref = self.prefix + self.main_dev + self.channel = 'CH1' + self.setObjectName('LIApp') + self._setupUi() + +
+[docs] + def chartsMon(self, lay): + ivsq = GraphIvsQ( + self, self.device, 'IvsQ', self.devpref, self.channel, prefix=self.prefix) + amp = GraphTime( + self, self.device, 'Amp', self.devpref, self.channel, prefix=self.prefix) + pha = GraphTime( + self, self.device, 'Pha', self.devpref, self.channel, prefix=self.prefix) + lay.addWidget(ivsq, 0, 0) + lay.addWidget(amp, 0, 2) + lay.addWidget(pha, 0, 4)
+ + + def _setupUi(self): + """Display the selected chart type.""" + lay = QGridLayout() + lay.setContentsMargins(0, 0, 0, 0) + self.setLayout(lay) + self.chartsMon(lay)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_rf_llrf/controls.html b/_modules/siriushla/li_rf_llrf/controls.html new file mode 100644 index 000000000..a632304eb --- /dev/null +++ b/_modules/siriushla/li_rf_llrf/controls.html @@ -0,0 +1,315 @@ + + + + + + siriushla.li_rf_llrf.controls — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.li_rf_llrf.controls

+
+"""LILLRF Control Widget."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QGridLayout, QWidget, QLabel, \
+    QHBoxLayout, QPushButton
+
+import enum as _enum
+import qtawesome as _qta
+
+from .. import util as _util
+from ..widgets import SiriusSpinbox, PyDMStateButton, SiriusLedState, \
+    SiriusLabel, SiriusLedAlert
+from .details import DeviceParamSettingWindow
+from .widgets import DeltaIQPhaseCorrButton
+from .chart import ChartWindow
+
+
+
+[docs] +class DEVICES(_enum.IntEnum): + """.""" + + Kly2 = (0, 'Klystron 2', 'KLY2', 'K2') + Kly1 = (1, 'Klystron 1', 'KLY1', 'K1') + SHB = (2, 'Sub-harmonic Buncher', 'BUN1', 'SHB') + + def __new__(cls, value, label, pvname, nickname): + """.""" + self = int.__new__(cls, value) + self._value_ = value + self.label = label + self.pvname = pvname + self.nickname = nickname + return self
+ + + +
+[docs] +class ControlBox(QWidget): + """.""" + + def __init__( + self, parent=None, dev='', main_dev='', device=None, prefix=''): + """.""" + super().__init__(parent=parent) + self.prefix = prefix + self.main_dev = main_dev + self.dev = dev + self.device = device + self._setupui() + + def _setupui(self): + """.""" + basename = self.prefix + self.main_dev + self.dev + + lay1 = QGridLayout() + self.setLayout(lay1) + + row = 0 + labb = QLabel('Setpoint', self) + labc = QLabel('Readback', self) + lay1.addWidget(labb, row, 1, alignment=Qt.AlignCenter) + lay1.addWidget(labc, row, 2, alignment=Qt.AlignCenter) + + pb_param = QPushButton(_qta.icon('fa5s.ellipsis-h'), '', self) + pb_param.setToolTip('Open Parameter Setting Window') + pb_param.setObjectName('detail') + pb_param.setStyleSheet( + "#detail{min-width:25px; max-width:25px; icon-size:20px;}") + _util.connect_window( + pb_param, DeviceParamSettingWindow, parent=self, + device=self.device, main_dev=self.main_dev, prefix=self.prefix) + lay1.addWidget(pb_param, row, 0, alignment=Qt.AlignLeft) + + props = ( + ('State', 'STREAM'), ('Trigger', 'EXTERNAL_TRIGGER_ENABLE'), + ('Integral', 'INTEGRAL_ENABLE'), ('Feedback', 'FB_MODE')) + for name, prop in props: + row += 1 + lab1 = QLabel(name, self) + sppv = basename + ':SET_' + prop + rbpv = basename + ':GET_' + prop + sp1 = PyDMStateButton(self, init_channel=sppv) + rb1 = SiriusLedState(self, init_channel=rbpv) + lay1.addWidget(lab1, row, 0) + lay1.addWidget(sp1, row, 1) + lay1.addWidget(rb1, row, 2) + + props = [('Amp [%]', 'AMP'), ('Phase [°]', 'PHASE'), + ('↳ ΔPhase (IQ Corr)', '')] + if self.dev != 'BUN1': + props.append(('Refl. Pow. [MW]', 'REFL_POWER_LIMIT')) + for name, prop in props: + row += 1 + laba = QLabel(name, self) + if 'IQ Corr' in name: + dniqc = DeltaIQPhaseCorrButton( + self, self.dev, main_dev=self.main_dev, delta=-90, prefix=self.prefix) + dpiqc = DeltaIQPhaseCorrButton( + self, self.dev, main_dev=self.main_dev, delta=90, prefix=self.prefix) + lay1.addWidget(laba, row, 0) + lay1.addWidget(dniqc, row, 1, alignment=Qt.AlignCenter) + lay1.addWidget(dpiqc, row, 2, alignment=Qt.AlignCenter) + else: + sppv = basename + ':SET_' + prop + rbpv = basename + ':GET_' + prop + spa = SiriusSpinbox(self, init_channel=sppv) + spa.precisionFromPV = False + spa.precision = 2 + rba = SiriusLabel(self, init_channel=rbpv) + rba.precisionFromPV = False + rba.precision = 2 + lay1.addWidget(laba, row, 0) + lay1.addWidget(spa, row, 1) + lay1.addWidget(rba, row, 2) + + row += 1 + hlay = QHBoxLayout() + if self.dev == 'BUN1': + labc = QLabel('Phase Diff [°]', self) + rbpv = basename + ':GET_PHASE_DIFF' + rbc = SiriusLabel(self, init_channel=rbpv) + rbc.precisionFromPV = False + rbc.precision = 2 + btn = QPushButton("Chart") + _util.connect_window( + btn, ChartWindow, + parent=self, dev=self.dev, + chart_type="Diff", prefix=self.prefix) + lay1.addWidget(labc, row, 0, 1, 2) + lay1.addWidget(rbc, row, 1) + lay1.addWidget(btn, row, 2) + row += 1 + else: + rbpv = basename + ':GET_INTERLOCK' + rb1 = SiriusLedAlert(self, init_channel=rbpv) + hlay.addWidget(QLabel('Refl. Pow. Intlk')) + hlay.addWidget(rb1) + + hlay.addStretch() + rbpv = basename + ':GET_TRIGGER_STATUS' + rb2 = SiriusLedAlert(self, init_channel=rbpv) + rb2.setOnColor(rb2.LightGreen) + rb2.setOffColor(rb2.Red) + hlay.addWidget(QLabel('Trig. Stts')) + hlay.addWidget(rb2) + lay1.addLayout(hlay, row, 0, 1, 3) + + self.setStyleSheet( + "DeltaIQPhaseCorrButton{max-width: 3em;}")
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_rf_llrf/details.html b/_modules/siriushla/li_rf_llrf/details.html new file mode 100644 index 000000000..a0ad783e6 --- /dev/null +++ b/_modules/siriushla/li_rf_llrf/details.html @@ -0,0 +1,495 @@ + + + + + + siriushla.li_rf_llrf.details — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.li_rf_llrf.details

+"""LILLRF Device Detail Windows."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QLabel, QFrame, QGridLayout, QGroupBox, QWidget
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from ..widgets import SiriusMainWindow, PyDMStateButton, SiriusLedState, \
+    SiriusSpinbox, SiriusLabel
+from .widgets import DeltaIQPhaseCorrButton
+
+
+
+[docs] +class DeviceParamSettingWindow(SiriusMainWindow): + """Device Parameter Setting Window.""" + + def __init__(self, parent=None, device=None, main_dev='', prefix=_VACA_PREFIX): + """Init.""" + super().__init__(parent) + + self.prefix = prefix + ('-' if prefix else '') + self.main_dev = main_dev + self.dev = device + self.devpref = self.prefix + self.main_dev + self.dev.pvname + + self.setObjectName('LIApp') + self.setWindowTitle(self.dev.label + ' Parameter Setting') + + self._setupUi() + + def _setupUi(self): + self.title = QLabel( + '<h3>'+self.dev.label+' Parameter Setting</h3>', self) + + wid_delay = self._setupDelaySettingWidget() + wid_pi = self._setupPISettingWidget() + wid_iqcorr = self._setupIQCorrectionWidget() + wid_att = self._setupAttenuationWidget() + wid_attcomp = self._setupAttCompensationWidget() + + wid = QWidget(self) + self.setCentralWidget(wid) + lay = QGridLayout(wid) + lay.addWidget(self.title, 0, 0, 1, 4) + lay.addWidget(wid_delay, 1, 0) + lay.addWidget(wid_pi, 2, 0) + lay.addWidget(wid_iqcorr, 1, 1) + lay.addWidget(wid_att, 1, 2) + lay.addWidget(wid_attcomp, 1, 3) + + wid.setStyleSheet(""" + SiriusSpinbox{ + min-width: 4em; + }; + SiriusLabel{ + min-width: 4em; + }; + """) + + def _setupDelaySettingWidget(self): + props = [ + ('Trigger', 'TRIGGER_DELAY'), + ('Refer_'+self.dev.nickname, 'CH7_DELAY'), + ('VM_'+self.dev.nickname, 'CH8_DELAY'), + ('SSA_'+self.dev.nickname, 'CH2_DELAY'), + ] + if self.dev.nickname == 'SHB': + props.append(('Pick-Up', 'CH1_DELAY')) + elif self.dev.nickname == 'K1': + props.extend([ + (self.dev.nickname+' Fwd', 'CH1_DELAY'), + (self.dev.nickname+' Reflec', 'CH9_DELAY'), + ('Buncher Input', 'CH3_DELAY'), + ('A1 Input', 'CH4_DELAY'), + ('A2 Input', 'CH5_DELAY'), + ('Buncher Output', 'CH6_DELAY')]) + elif self.dev.nickname == 'K2': + props.extend([ + (self.dev.nickname+' Fwd', 'CH1_DELAY'), + (self.dev.nickname+' Reflec', 'CH9_DELAY'), + ('A3 Input', 'CH3_DELAY'), + ('A4 Input', 'CH4_DELAY'), + ('A3 Output', 'CH5_DELAY'), + ('A4 Output', 'CH6_DELAY')]) + + wid = QGroupBox('Delay Setting') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop) + + row = 0 + lb_sett = QLabel('<h4>Settings</h4>', self, alignment=Qt.AlignCenter) + lb_actl = QLabel('<h4>Actual</h4>', self, alignment=Qt.AlignCenter) + lay.addWidget(lb_sett, row, 1) + lay.addWidget(lb_actl, row, 2) + + row += 1 + lim_label = '0~4095' if self.dev.nickname == 'SHB' else '0~1023' + lb_lim1 = QLabel(lim_label, self, alignment=Qt.AlignCenter) + lb_unit = QLabel('clk', self, alignment=Qt.AlignCenter) + lay.addWidget(lb_lim1, row, 1) + lay.addWidget(lb_unit, row, 2) + + for name, prop in props: + row += 1 + laba = QLabel(name, self) + sppv = self.devpref + ':SET_' + prop + rbpv = self.devpref + ':GET_' + prop + spa = SiriusSpinbox(self, init_channel=sppv) + rba = SiriusLabel(self, init_channel=rbpv) + lay.addWidget(laba, row, 0) + lay.addWidget(spa, row, 1) + lay.addWidget(rba, row, 2) + + if name == 'Trigger' and self.dev.nickname == 'SHB': + row += 1 + lb_lim2 = QLabel('0~1023', self, alignment=Qt.AlignCenter) + lay.addWidget(lb_lim2, row, 1) + + return wid + + def _setupPISettingWidget(self): + wid = QGroupBox('PI Setting') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop) + + row = 0 + lb_sett = QLabel('<h4>Settings</h4>', self, alignment=Qt.AlignCenter) + lb_actl = QLabel('<h4>Actual</h4>', self, alignment=Qt.AlignCenter) + lay.addWidget(lb_sett, row, 1) + lay.addWidget(lb_actl, row, 2) + + row += 1 + lb_lim = QLabel('0~1023', self, alignment=Qt.AlignCenter) + lay.addWidget(lb_lim, row, 1) + + for prop in ['KP', 'KI']: + row += 1 + laba = QLabel(prop, self) + sppv = self.devpref + ':SET_' + prop + rbpv = self.devpref + ':GET_' + prop + spa = SiriusSpinbox(self, init_channel=sppv) + rba = SiriusLabel(self, init_channel=rbpv) + lay.addWidget(laba, row, 0) + lay.addWidget(spa, row, 1) + lay.addWidget(rba, row, 2) + + row += 1 + lab1 = QLabel('Integral', self) + sppv = self.devpref + ':SET_INTEGRAL_ENABLE' + rbpv = self.devpref + ':GET_INTEGRAL_ENABLE' + sp1 = PyDMStateButton(self, init_channel=sppv) + rb1 = SiriusLedState(self, init_channel=rbpv) + lay.addWidget(lab1, row, 0) + lay.addWidget(sp1, row, 1) + lay.addWidget(rb1, row, 2) + + return wid + + def _setupIQCorrectionWidget(self): + props = list() + props.extend([ + ('Refer_'+self.dev.nickname, 'CH7_PHASE_CORR'), + ('VM_'+self.dev.nickname, 'CH8_PHASE_CORR'), + ('SSA_'+self.dev.nickname, 'CH2_PHASE_CORR')]) + if self.dev.nickname == 'SHB': + props.append(('Pick-Up', 'CH1_PHASE_CORR')) + elif self.dev.nickname == 'K1': + props.extend([ + (self.dev.nickname+' Fwd', 'CH1_PHASE_CORR'), + ('Buncher Input', 'CH3_PHASE_CORR'), + ('A1 Input', 'CH4_PHASE_CORR'), + ('A2 Input', 'CH5_PHASE_CORR'), + ('Buncher Output', 'CH6_PHASE_CORR')]) + elif self.dev.nickname == 'K2': + props.extend([ + (self.dev.nickname+' Fwd', 'CH1_PHASE_CORR'), + ('A3 Input', 'CH3_PHASE_CORR'), + ('A4 Input', 'CH4_PHASE_CORR'), + ('A3 Output', 'CH5_PHASE_CORR'), + ('A4 Output', 'CH6_PHASE_CORR')]) + props.extend([ + ('VM Cal Phase', 'FBLOOP_PHASE_CORR'), + ('VM Cal Amp', 'FBLOOP_AMP_CORR')]) + + wid = QGroupBox('IQ Correction') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop) + + row = 0 + lb_sett = QLabel('<h4>Settings</h4>', self, alignment=Qt.AlignCenter) + lb_actl = QLabel('<h4>Actual</h4>', self, alignment=Qt.AlignCenter) + lay.addWidget(lb_sett, row, 2) + lay.addWidget(lb_actl, row, 4) + + row += 1 + lb_lim = QLabel('-180.0°~+180.0°', self, alignment=Qt.AlignCenter) + lay.addWidget(lb_lim, row, 2, 1, 3) + + for name, prop in props: + row += 1 + laba = QLabel(name, self) + lay.addWidget(laba, row, 0) + + sppv = self.devpref + ':SET_' + prop + rbpv = self.devpref + ':GET_' + prop + spa = SiriusSpinbox(self, init_channel=sppv) + spa.precisionFromPV = False + spa.precision = 2 + lay.addWidget(spa, row, 2) + if prop == 'CH1_PHASE_CORR': + dniqc = DeltaIQPhaseCorrButton( + self, self.dev.pvname, main_dev=self.main_dev, + delta=-90, show_label=False, prefix=self.prefix) + dpiqc = DeltaIQPhaseCorrButton( + self, self.dev.pvname, main_dev=self.main_dev, + delta=90, show_label=False, prefix=self.prefix) + lay.addWidget(dniqc, row, 1) + lay.addWidget(dpiqc, row, 3) + + rba = SiriusLabel(self, init_channel=rbpv) + rba.precisionFromPV = False + rba.precision = 2 + lay.addWidget(rba, row, 4) + + if name == 'VM Cal Phase': + row += 1 + line = QFrame(self) + line.setFrameShape(QFrame.HLine) + line.setFrameShadow(QFrame.Sunken) + lay.addWidget(line, row, 0, 1, 5) + + lay.setColumnStretch(0, 5) + lay.setColumnStretch(1, 1) + lay.setColumnStretch(2, 4) + lay.setColumnStretch(3, 1) + lay.setColumnStretch(4, 4) + + self.setStyleSheet( + "DeltaIQPhaseCorrButton{max-width: 1.2em;}") + + return wid + + def _setupAttenuationWidget(self): + props = [ + ('VM', 'VM_ADT', 0.25), + ('Refer_'+self.dev.nickname, 'CH7_ADT', 0.5), + ('VM_'+self.dev.nickname, 'CH8_ADT', 0.5), + ('SSA_'+self.dev.nickname, 'CH2_ADT', 0.5), + ] + if self.dev.nickname == 'SHB': + props.append(('Pick-Up', 'CH1_ADT', 0.5)) + elif self.dev.nickname == 'K1': + props.extend([ + (self.dev.nickname+' Fwd', 'CH1_ADT', 0.5), + ('Buncher Input', 'CH3_ADT', 0.5), + ('A1 Input', 'CH4_ADT', 0.5), + ('A2 Input', 'CH5_ADT', 0.5), + ('Buncher Output', 'CH6_ADT', 0.5)]) + elif self.dev.nickname == 'K2': + props.extend([ + (self.dev.nickname+' Fwd', 'CH1_ADT', 0.5), + ('A3 Input', 'CH3_ADT', 0.5), + ('A4 Input', 'CH4_ADT', 0.5), + ('A3 Output', 'CH5_ADT', 0.5), + ('A4 Output', 'CH6_ADT', 0.5)]) + + wid = QGroupBox('Attenuation') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop) + + row = 0 + lb_lim = QLabel('0~63', self, alignment=Qt.AlignCenter) + lb_unit = QLabel('dB', self, alignment=Qt.AlignCenter) + lay.addWidget(lb_lim, row, 1) + lay.addWidget(lb_unit, row, 2) + + for name, prop, factor in props: + row += 1 + laba = QLabel(name, self) + sppv = self.devpref + ':SET_' + prop + spa = SiriusSpinbox(self, init_channel=sppv) + dsc = QLabel('*'+str(factor)) + lay.addWidget(laba, row, 0) + lay.addWidget(spa, row, 1) + lay.addWidget(dsc, row, 2) + + return wid + + def _setupAttCompensationWidget(self): + props = [ + ('Refer_'+self.dev.nickname, 'CH7_ATT'), + ('VM_'+self.dev.nickname, 'CH8_ATT'), + ('SSA_'+self.dev.nickname, 'CH2_ATT'), + ] + if self.dev.nickname == 'SHB': + props.append(('Pick-Up', 'CH1_ATT')) + elif self.dev.nickname == 'K1': + props.extend([ + (self.dev.nickname+' Fwd', 'CH1_ATT'), + (self.dev.nickname+' Reflec', 'CH9_ATT'), + ('Buncher Input', 'CH3_ATT'), + ('A1 Input', 'CH4_ATT'), + ('A2 Input', 'CH5_ATT'), + ('Buncher Output', 'CH6_ATT')]) + elif self.dev.nickname == 'K2': + props.extend([ + (self.dev.nickname+' Fwd', 'CH1_ATT'), + (self.dev.nickname+' Reflec', 'CH9_ATT'), + ('A3 Input', 'CH3_ATT'), + ('A4 Input', 'CH4_ATT'), + ('A3 Output', 'CH5_ATT'), + ('A4 Output', 'CH6_ATT')]) + + wid = QGroupBox('Att. Compensation') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop) + + row = 0 + lb_lim = QLabel('(0.00~200.00)', self, alignment=Qt.AlignCenter) + lay.addWidget(lb_lim, row, 1) + + for name, prop in props: + row += 1 + laba = QLabel(name, self) + sppv = self.devpref + ':SET_' + prop + spa = SiriusSpinbox(self, init_channel=sppv) + spa.precisionFromPV = False + spa.precision = 2 + lay.addWidget(laba, row, 0) + lay.addWidget(spa, row, 1) + + return wid
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_rf_llrf/main.html b/_modules/siriushla/li_rf_llrf/main.html new file mode 100644 index 000000000..ea625d86d --- /dev/null +++ b/_modules/siriushla/li_rf_llrf/main.html @@ -0,0 +1,407 @@ + + + + + + siriushla.li_rf_llrf.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.li_rf_llrf.main

+"""Main module of the Application Interface."""
+
+import os as _os
+from qtpy.QtCore import Qt, QEvent
+from qtpy.QtGui import QPixmap
+from qtpy.QtWidgets import QGroupBox, QGridLayout, QWidget, QLabel, \
+    QHBoxLayout, QVBoxLayout, QPushButton, QSizePolicy, QTabWidget, \
+    QFrame, QSpacerItem
+from pydm.widgets.display_format import DisplayFormat
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+
+from .. import util as _util
+from ..widgets import SiriusLabel, RelativeWidget
+from .util import BASIC_INFO
+from .chart import ChartWindow, ChartMon
+from .motor_control import MotorControlWindow
+from .controls import ControlBox, DEVICES
+
+
+
+[docs] +class LLRFMain(QWidget): + """.""" + + def __init__(self, parent=None, prefix=_VACA_PREFIX): + """.""" + super().__init__(parent=parent) + self.prefix = prefix + ('-' if prefix else '') + self.display_format = DisplayFormat + self.main_dev = 'LA-RF:LLRF:' + self.setObjectName('LIApp') + self.setWindowTitle('LI LLRF') + self.image_container = QLabel() + self.pixmap = QPixmap(_os.path.join( + _os.path.abspath(_os.path.dirname(__file__)), "llrf.png")) + self.relative_widgets = [] + self._setupui() + +
+[docs] + def eventFilter(self, obj, event): + """Signal the resize event to the relative Widgets""" + if (event.type() == QEvent.Resize): + for relative_item in self.relative_widgets: + relative_item.relativeResize() + return super().eventFilter(obj, event)
+ + +
+[docs] + def buildPvName(self, pv_name, device, pvPrefix='', pvSufix=''): + """Build the pv name""" + return (self.prefix + self.main_dev + + device + ":" + pvPrefix + pv_name + pvSufix)
+ + +
+[docs] + def imageViewer(self): + """Build the image""" + self.image_container.setPixmap(self.pixmap) + self.image_container.installEventFilter(self) + self.image_container.setScaledContents(True) + self.image_container.setSizePolicy( + QSizePolicy.Ignored, QSizePolicy.Ignored) + self.image_container.setMinimumSize(950, 0) + return self.image_container
+ + +
+[docs] + def formatLabel(self, pv_name='', pv_type='Power'): + """Get widget type""" + widget = SiriusLabel(init_channel=pv_name) + widget.precisionFromPV = False + widget.precision = 2 + if pv_type == 'Power': + widget.displayFormat = self.display_format.Exponential + return widget
+ + +
+[docs] + def showChartBtn(self, device, channel, chart_type): + """Show the Chart Button Widget""" + widget = QPushButton(chart_type) + _util.connect_window( + widget, ChartWindow, + parent=self, dev=device, chart_type=chart_type, channel=channel) + widget.setMinimumSize(20, 20) + return widget
+ + +
+[docs] + def baseWidget( + self, title='', pv_name=''): + """Show the base widget""" + """Base Widget: 'title' 'PV information'""" + bw_hlay = QHBoxLayout() + bw_hlay.addWidget( + QLabel(title), alignment=Qt.AlignCenter) + + widget = self.formatLabel(pv_name, title) + widget.showUnits = True + bw_hlay.addWidget( + widget, alignment=Qt.AlignCenter) + + return bw_hlay
+ + +
+[docs] + def basicInfoBox(self, device, channel, info): + """Show the basic information of an element""" + """ + The basic information of and element consists of: + -Power and Phase information + -Chart buttons + """ + group = QGroupBox() + bi_vlay = QVBoxLayout() + bi_vlay.setContentsMargins(2, 2, 2, 2) + + for chart_type in info["Chart"]: + bi_vlay.addWidget( + self.showChartBtn( + device, channel, chart_type), + alignment=Qt.AlignCenter) + + for basic_info in ["Power", "Phase"]: + bi_vlay.addLayout( + self.baseWidget( + basic_info, + self.buildPvName( + channel, device, + "GET_", '_' + basic_info.upper()))) + group.setLayout(bi_vlay) + group.setStyleSheet(''' + max-width: 160px; max-height: 150px; + ''') + + rel_wid = RelativeWidget( + parent=self.image_container, + widget=group, + relative_pos=info["Position"]) + self.relative_widgets.append(rel_wid)
+ + +
+[docs] + def motorControlBtn(self, device, info): + """Show the motor control button""" + btn = QPushButton("Motor Control") + _util.connect_window( + btn, MotorControlWindow, + parent=self, motor_type=device) + rel_wid = RelativeWidget( + parent=self.image_container, + widget=btn, + relative_pos=info["Position"]) + self.relative_widgets.append(rel_wid)
+ + +
+[docs] + def buildDevicesWidgets(self): + """Build and arrange the basic information + and control buttons on the image""" + + for device, channel in BASIC_INFO.items(): + for pv_name, info in channel.items(): + if device != "MOTOR": + self.basicInfoBox(device, pv_name, info) + else: + self.motorControlBtn(pv_name, info)
+ + +
+[docs] + def buildLine(self): + """ Build a single horizontal line """ + line = QFrame() + line.setFrameShape(QFrame.HLine) + line.setFrameShadow(QFrame.Raised) + line.setStyleSheet('color: gray;') + line.setLineWidth(3) + return line
+ + +
+[docs] + def buildChartMonitor(self): + """ Build the Control Loop Monitor tab """ + widget = QWidget() + lay = QVBoxLayout() + lay.setContentsMargins(0, 0, 0, 0) + for dev in DEVICES: + lay.addWidget( + ChartMon( + parent=self, dev=dev.pvname, prefix=self.prefix)) + if dev != DEVICES.SHB: + lay.addWidget(self.buildLine()) + widget.setLayout(lay) + return widget
+ + +
+[docs] + def buildTabs(self): + """ Build the tab widget """ + tab = QTabWidget() + tab.setObjectName("LITab") + tab.setContentsMargins(0, 0, 0, 0) + tab.addTab(self.imageViewer(), "Plant") + tab.addTab(self.buildChartMonitor(), "Control Loop") + + return tab
+ + + def _setupui(self): + """ . """ + lay1 = QGridLayout() + self.setLayout(lay1) + + lay1.addWidget(self.buildTabs(), 0, 1) + self.buildDevicesWidgets() + + conlay = QGridLayout() + conlay.addItem( + QSpacerItem(1, 12, QSizePolicy.Ignored, QSizePolicy.Fixed), 0, 0) + for dev in DEVICES: + grbox = QGroupBox(dev.label, self) + lay = QGridLayout() + lay.setContentsMargins(0, 0, 0, 0) + grbox.setLayout(lay) + lay.addWidget( + ControlBox( + grbox, dev.pvname, main_dev=self.main_dev, + device=dev, prefix=self.prefix), + 0, 0) + conlay.addWidget(grbox, dev.value+1, 0) + lay1.addLayout(conlay, 0, 0)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_rf_llrf/motor_control.html b/_modules/siriushla/li_rf_llrf/motor_control.html new file mode 100644 index 000000000..b8c6ee07d --- /dev/null +++ b/_modules/siriushla/li_rf_llrf/motor_control.html @@ -0,0 +1,381 @@ + + + + + + siriushla.li_rf_llrf.motor_control — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.li_rf_llrf.motor_control

+"""LI LLRF Motor Control Windows."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QGridLayout, QHBoxLayout, QWidget, QLabel
+from pydm.widgets import PyDMLineEdit
+from ..widgets import SiriusLabel, SiriusMainWindow, PyDMLedMultiChannel, \
+    SiriusPushButton, PyDMStateButton, SiriusSpinbox
+from .util import MOTOR_CONTROL
+
+
+
+[docs] +class MotorControlWindow(SiriusMainWindow): + """Motor Control Window of the SHB and HPPS.""" + + def __init__(self, parent=None, motor_type="SHB"): + """Init.""" + super().__init__(parent) + self.main_dev = 'LA-RF:LLRF:' + self.motor_type = motor_type + self.setObjectName('LIApp') + self.setWindowTitle(motor_type + ' Control') + self.setMaximumHeight(250) + self.setMinimumHeight(175) + + self._setupUi() + +
+[docs] + def buildLed(self, pv_name=''): + """Build a led widget""" + config = 0 + if "ST" in pv_name: + config = 1 + ch2vals = { + pv_name: config} + led = PyDMLedMultiChannel(self) + led.set_channels2values(ch2vals) + return led
+ + +
+[docs] + def getWidget(self, wid_type='', pv_name=''): + """Get the selected widget""" + if wid_type == 'led': + widget = self.buildLed(pv_name) + elif wid_type == 'button': + widget = SiriusPushButton( + label="Enable", + init_channel=pv_name, + pressValue=1, + releaseValue=0) + elif wid_type == 'label': + widget = SiriusLabel( + init_channel=pv_name) + widget.showUnits = True + elif wid_type == 'spinBox': + widget = SiriusSpinbox( + init_channel=pv_name) + elif wid_type == 'state': + widget = PyDMStateButton( + init_channel=pv_name) + else: + widget = PyDMLineEdit( + init_channel=pv_name) + return widget
+ + +
+[docs] + def ledBox(self, main_title='', data=None, basename=''): + """Show all the leds PVs of a dict""" + lb_glay = QGridLayout() + pos = [0, 0] + lb_glay.addWidget( + QLabel(main_title), pos[0], pos[1], 1, 2, + alignment=Qt.AlignCenter) + for title, name in data.items(): + pos[0] += 1 + lb_glay.addWidget( + QLabel(title), pos[0], pos[1], + alignment=Qt.AlignRight) + lb_glay.addWidget( + self.getWidget('led', basename + name), + pos[0], pos[1] + 1, + alignment=Qt.AlignLeft) + return lb_glay, pos
+ + +
+[docs] + def infoBox(self, title='', pv_name=''): + """Show general control information (Besides the leds)""" + ib_hlay = QHBoxLayout() + + if title == "Up to Limit" and self.motor_type == "HPPS": + title = "Up to Zero" + + ib_hlay.addWidget( + QLabel(title), alignment=Qt.AlignRight) + + if "Up to" in title: + wid_type = 'button' + else: + wid_type = 'label' + + ib_hlay.addWidget( + self.getWidget(wid_type, pv_name), + alignment=Qt.AlignLeft) + return ib_hlay
+ + +
+[docs] + def rbvBox(self): + """Show a RBV Widget""" + rbv_hlay = QHBoxLayout() + basename = self.main_dev + "KLY1" + rbv_hlay.addWidget( + QLabel("Phase"), + alignment=Qt.AlignRight) + for pv_name in MOTOR_CONTROL[self.motor_type]: + wid_type = 'label' + align = Qt.AlignLeft + if 'SET' in pv_name: + wid_type = 'spinBox' + align = Qt.AlignCenter + widget = self.getWidget( + wid_type, basename + pv_name) + rbv_hlay.addWidget( + widget, + alignment=align) + return rbv_hlay
+ + +
+[docs] + def pidBox(self): + """Show the PID control widgets""" + pb_glay = QGridLayout() + pos = [0, 0] + for title, pv_name in MOTOR_CONTROL["SHB"].items(): + if pv_name == ":FL": + basedev = "SHB" + else: + basedev = "BUN1" + + pb_glay.addWidget( + QLabel(title), pos[0], pos[1], + alignment=Qt.AlignRight) + pos[1] += 1 + + if "PID" in title: + wid_type = 'state' + elif "K" in title: + wid_type = 'label' + else: + wid_type = 'edit' + + pb_glay.addWidget( + self.getWidget( + wid_type, self.main_dev + basedev + pv_name), + pos[0], pos[1], + alignment=Qt.AlignLeft) + pos[1] += 1 + + if pos[1] >= 4: + pos[1] = 0 + pos[0] += 1 + return pb_glay
+ + +
+[docs] + def basicData(self, pos=None, lay=None): + """Show all the general control information""" + basename = self.main_dev + self.motor_type + max_row = pos[0] + 2 + for title, data in MOTOR_CONTROL["General"].items(): + if title in ["Status", "Limits"]: + lb_glay, pos_temp = self.ledBox(title, data, basename) + pos[0] += pos_temp[0] + pos[1] += pos_temp[1] + lay.addLayout( + lb_glay, + pos[0], pos[1], 1, 1, + alignment=Qt.AlignTop) + else: + lay.addLayout( + self.infoBox(title, basename + data), + pos[0], pos[1], 1, 1, + alignment=Qt.AlignCenter) + pos[0] += 1 + if pos[0] >= max_row: + pos[0] = 1 + pos[1] += 1 + return pos
+ + + def _setupUi(self): + """Show the selected Control Window""" + wid = QWidget(self) + self.setCentralWidget(wid) + lay = QGridLayout() + wid.setLayout(lay) + pos = [0, 0] + + if self.motor_type == 'HPPS': + widget = self.rbvBox() + if self.motor_type == 'SHB': + widget = self.pidBox() + + lay.addLayout( + widget, pos[0], pos[1], 1, 2) + pos[0] += 1 + + pos = self.basicData(pos, lay)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_rf_llrf/widgets.html b/_modules/siriushla/li_rf_llrf/widgets.html new file mode 100644 index 000000000..8641cf3d7 --- /dev/null +++ b/_modules/siriushla/li_rf_llrf/widgets.html @@ -0,0 +1,481 @@ + + + + + + siriushla.li_rf_llrf.widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.li_rf_llrf.widgets

+"""LI LLRF Custom Widgets."""
+
+import numpy as np
+
+from qtpy.QtGui import QColor
+from qtpy.QtCore import Qt, QSize
+
+from qtpy.QtWidgets import QPushButton, QGridLayout, \
+    QWidget, QHBoxLayout
+import qtawesome as _qta
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+
+from .. import util as _util
+from ..widgets import SiriusTimePlot, SiriusWaveformPlot, \
+    SiriusConnectionSignal as _ConnSignal
+
+
+
+[docs] +class DeltaIQPhaseCorrButton(QPushButton): + """.""" + def __init__(self, parent=None, device=None, main_dev='', delta=0, + show_label=True, prefix=''): + """.""" + label = str(abs(delta)) + '°' if show_label else '' + icon_name = 'mdi.plus' if np.sign(delta) == 1 else 'mdi.minus' + icon = _qta.icon(icon_name) + super().__init__(icon, label, parent) + self.setIconSize(QSize(20, 20)) + + self.prefix = prefix + self.main_dev = main_dev + self.dev = device + self.devpref = self.prefix + self.main_dev + device + self.delta = delta + + self.setToolTip(f'Do {delta:.1f}° delta') + self.setEnabled(False) + self.ch_loop_enable = _ConnSignal( + self.devpref + ':SET_FB_MODE') + self.ch_loop_enable.new_value_signal[int].connect( + self._handle_enable_state) + self.ch_loop_enable.connection_state_signal.connect( + self._handle_enable_state) + + self.ch_iqcorr_phase_ch1 = _ConnSignal( + self.devpref + ':SET_CH1_PHASE_CORR') + + self.clicked.connect(self._do_delta) + + def _do_delta(self): + if not self.isEnabled(): + return + if not self.ch_iqcorr_phase_ch1.connected: + return + curr_value = self.ch_iqcorr_phase_ch1.value + new_value = curr_value + self.delta + new_value = (new_value + 180) % 360 - 180 + self.ch_iqcorr_phase_ch1.send_value_signal[float].emit(new_value) + + def _handle_enable_state(self): + state = ( + self.ch_loop_enable.connected and # is connected + self.ch_loop_enable.value == 0) # is disabled + self.setEnabled(state)
+ + + +
+[docs] +class GraphIvsQ(QWidget): + """Show the I&Q Chart based on IxQ or Time""" + + def __init__( + self, parent=None, dev=None, + prop='Time', main_dev='', channel='CH1', prefix=''): + """.""" + super().__init__(parent=parent) + self.prefix = prefix + self.main_dev = main_dev + self.dev = dev + self.prop = prop + self.channel = channel + self._setupui() + + def _setupui(self): + """.""" + channels = {} + lay1 = QGridLayout() + self.setLayout(lay1) + + graph = SiriusWaveformPlot(self) + graph.setObjectName('graph') + graph.setStyleSheet('#graph {min-height: 15em; min-width: 20em;}') + graph.maxRedrawRate = 2 + graph.mouseEnabledX = True + graph.setShowXGrid(True) + graph.setShowYGrid(True) + graph.setBackgroundColor(QColor(_util.get_appropriate_color('LI'))) + graph.setShowLegend(True) + graph.setAutoRangeX(False) + graph.setAutoRangeY(False) + graph.plotItem.showButtons() + graph.setAxisColor(QColor(0, 0, 0)) + axx = graph.plotItem.getAxis('right') + axx.setVisible(True) + axx.setTicks([]) + axx.setWidth(0) + axx = graph.plotItem.getAxis('top') + axx.setVisible(True) + axx.setTicks([]) + axx.setHeight(0) + + basename = self.prefix + self.main_dev + self.dev + if self.prop == 'IvsQ': + chart_title = "I & Q Fasor" + lblAxis = ["Q", "I"] + channels = { + 'Data': { + 'X': basename + ':GET_' + self.channel + '_I', + 'Y': basename + ':GET_' + self.channel + '_Q' + }, + 'Setpoint': { + 'X': basename + ':GET_' + self.channel + '_SETTING_I', + 'Y': basename + ':GET_' + self.channel + '_SETTING_Q' + } + } + graph.setMinXRange(-1.0) + graph.setMaxXRange(1.0) + graph.setMinYRange(-1.0) + graph.setMaxYRange(1.0) + else: + chart_title = "I & Q Waveform" + lblAxis = ["I & Q", "Time"] + channels = { + 'Data': { + 'X': None, + 'Y': basename + ':WF_ADC' + self.channel[2] + '_I' + }, + 'Setpoint': { + 'X': None, + 'Y': basename + ':WF_ADC' + self.channel[2] + '_Q' + } + } + + graph.setYLabels([lblAxis[0]]) + graph.setXLabels([lblAxis[1]]) + graph.setPlotTitle(chart_title) + + opts = dict( + y_channel=channels['Data']['Y'], + x_channel=channels['Data']['X'], + name='Data', + color='red', + redraw_mode=2, + lineStyle=1, + lineWidth=3, + symbol='o', + symbolSize=10) + graph.addChannel(**opts) + + if ((self.prop != 'IvsQ') or (self.channel == 'CH1')): + opts = dict( + y_channel=channels['Setpoint']['Y'], + x_channel=channels['Setpoint']['X'], + name='Setpoint', + color='blue', + redraw_mode=2, + lineStyle=1, + lineWidth=3, + symbol='o', + symbolSize=10) + graph.addChannel(**opts) + + lay1.addWidget(graph, 0, 0)
+ + + +
+[docs] +class GraphTime(QWidget): + """Show the graphs of Amplitude, Phase and Diff Data""" + + def __init__( + self, parent=None, dev='', prop='Amp', main_dev='', channel='CH1', prefix=''): + """.""" + super().__init__(parent=parent) + self.prefix = prefix + self.main_dev = main_dev + self.dev = dev + self.prop = prop + self.channel = channel + self._setupui() + + def _setupui(self): + """.""" + chart_name = self.prop + basename = self.prefix + self.main_dev + self.dev + lay1 = QGridLayout() + self.setLayout(lay1) + + graph = SiriusTimePlot(self) + graph.setObjectName('graph') + graph.setStyleSheet('#graph {min-height: 15em; min-width: 20em;}') + graph.timeSpan = 120 # [s] + graph.maxRedrawRate = 2 + graph.setShowXGrid(True) + graph.setShowYGrid(True) + graph.setBackgroundColor(QColor(_util.get_appropriate_color('LI'))) + graph.setShowLegend(True) + graph.plotItem.showButtons() + graph.setAxisColor(QColor(0, 0, 0)) + graph.setXLabels(["Time"]) + axx = graph.plotItem.getAxis('right') + axx.setVisible(True) + axx.setTicks([]) + axx.setWidth(0) + axx = graph.plotItem.getAxis('top') + axx.setVisible(True) + axx.setTicks([]) + axx.setHeight(0) + + if self.prop == 'Amp': + chart_name = 'Amplitude' + chname = basename + ':GET_' + self.channel + '_AMP' + elif self.prop == 'Pha': + chart_name = 'Phase' + chname = basename + ':GET_' + self.channel + '_PHASE' + elif self.prop == 'Diff': + chart_name = 'Phase Diff' + chname = basename + ':GET_PHASE_DIFF' + else: + raise ValueError('channel not define for property '+self.prop) + + graph.setPlotTitle(chart_name) + graph.setYLabels([chart_name]) + + opts = dict( + y_channel=chname, + name='Data', + color='black', + lineStyle=1, + lineWidth=3, + symbol='o', + symbolSize=10) + graph.addYChannel(**opts) + lay1.addWidget(graph, 0, 0)
+ + + +
+[docs] +class GraphWave(QWidget): + """Show the graphs of Pulse Amplitude, Pulse Phase and Raw Data.""" + + def __init__( + self, parent=None, dev='', prop='Amp', main_dev='', channel='CH1', prefix=''): + """.""" + super().__init__(parent=parent) + self.prefix = prefix + self.main_dev = main_dev + self.dev = dev + self.prop = prop + self.channel = channel + self._setupui() + + def _setupui(self): + """.""" + chart_name = self.prop + basename = self.prefix + self.main_dev + self.dev + lay1 = QGridLayout() + self.setLayout(lay1) + + graph = SiriusWaveformPlot(self) + graph.setObjectName('graph') + graph.setStyleSheet('#graph {min-height: 15em; min-width: 20em;}') + graph.maxRedrawRate = 2 + graph.setShowXGrid(True) + graph.setShowYGrid(True) + graph.setBackgroundColor(QColor(_util.get_appropriate_color('LI'))) + graph.setShowLegend(True) + graph.plotItem.showButtons() + graph.setAxisColor(QColor(0, 0, 0)) + graph.setXLabels(["Time"]) + axx = graph.plotItem.getAxis('right') + axx.setVisible(True) + axx.setTicks([]) + axx.setWidth(0) + axx = graph.plotItem.getAxis('top') + axx.setVisible(True) + axx.setTicks([]) + axx.setHeight(0) + + if self.prop == 'PAmp': + chart_name = 'Amplitude Waveform' + chname = basename + ':WF_' + self.channel + 'AMP' + elif self.prop == 'PPha': + chart_name = 'Phase Waveform' + chname = basename + ':WF_' + self.channel + 'PHASE' + elif self.prop == 'Raw': + chart_name = 'Raw Data' + chname = basename + ':WF_ADC9' + else: + raise ValueError('channel not define for property '+self.prop) + + graph.setPlotTitle(chart_name) + graph.setYLabels([chart_name]) + + opts = dict( + y_channel=chname, + name='Data', + color='black', + lineStyle=1, + lineWidth=3, + symbol='o', + symbolSize=10) + graph.addChannel(**opts) + lay1.addWidget(graph, 0, 0)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_va_control/chart.html b/_modules/siriushla/li_va_control/chart.html new file mode 100644 index 000000000..66966e790 --- /dev/null +++ b/_modules/siriushla/li_va_control/chart.html @@ -0,0 +1,251 @@ + + + + + + siriushla.li_va_control.chart — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.li_va_control.chart

+""" CCG Chart Window """
+
+from ..widgets import SiriusMainWindow, SiriusTimePlot
+from .functions import BaseFunctionsInterface
+from .util import COLORS, PVS_CONFIG, VGC_DETAILS
+
+
+
+[docs] +class ChartWindow(SiriusMainWindow, BaseFunctionsInterface): + """Show the Chart Window.""" + + def __init__(self, parent=None, prefix=''): + """Init.""" + super().__init__(parent) + self.config = PVS_CONFIG["Vacuum"] + self.prefix = prefix + self.main_dev = self.config["prefix"] + self.devpref = self.prefix + self.main_dev + self.channel = VGC_DETAILS["Pressure<br/>Readback"] + self.default_colors = [ + COLORS["dark_green"], COLORS["red"], COLORS["blue"], + COLORS["purple"], COLORS["light_green"], COLORS["yellow"], + COLORS["cyan"], COLORS["gre_blu"], COLORS["black"], + COLORS["orange"]] + self.setObjectName('LIApp') + self.setWindowTitle("CCG Charts") + self._setupUi() + +
+[docs] + def setupGraph(self): + """Create and configure Chart Widget""" + graph = SiriusTimePlot(parent=self, background='w') + graph.setYLabels(["Pressure"]) + graph.showLegend = True + graph.showXGrid = True + graph.showYGrid = True + graph.autoRangeY = True + graph.timeSpan = 10*60 + graph.bufferSize = graph.timeSpan*10 + graph.setStyleSheet("min-width: 15em; min-height: 10em;") + return graph
+ + +
+[docs] + def addChannels(self, graph, id_num, color): + """Add one channel(curve) to the chart""" + name, gen = self.buildVacPv(id_num) + pv_name = self.config['prefix']+name+self.channel+str(gen) + graph.addYChannel( + y_channel=pv_name, + name=self.getGroupTitle("Vacuum", id_num), + color=color, + lineStyle=1, + lineWidth=3, + symbol='o', + symbolSize=10, + axis='left') + return graph
+ + +
+[docs] + def chartsMon(self, lay): + """Display the three charts with their channels""" + id_num = 1 + for num in range(0, 3): + graph = self.setupGraph() + range_max = 3 + if num == 1: + range_max = 4 + for id_temp in range(0, range_max): + graph = self.addChannels( + graph, id_num, self.default_colors.pop()) + id_num += 1 + if id_num % 3 == 0: + id_num += 1 + lay.addWidget(graph)
+ + + def _setupUi(self): + """.""" + wid, lay = self.getLayoutWidget("V") + self.setCentralWidget(wid) + lay.setContentsMargins(10, 10, 10, 10) + self.chartsMon(lay)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_va_control/details.html b/_modules/siriushla/li_va_control/details.html new file mode 100644 index 000000000..bf754ee4e --- /dev/null +++ b/_modules/siriushla/li_va_control/details.html @@ -0,0 +1,536 @@ + + + + + + siriushla.li_va_control.details — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.li_va_control.details

+""" All the detail Chart Windows """
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGroupBox, QVBoxLayout, QHBoxLayout, QLabel
+from ..widgets import SiriusMainWindow
+from .functions import BaseFunctionsInterface
+from .util import IPS_DETAILS, PVS_CONFIG, VGC_DETAILS, COLORS
+
+
+
+[docs] +class IpsDetailWindow(SiriusMainWindow, BaseFunctionsInterface): + """ Display IPS Detail Window""" + + def __init__(self, parent=None, prefix='', id_num=''): + """Init.""" + super().__init__(parent) + self.prefix = prefix + self.main_dev = PVS_CONFIG["Pump"]["prefix"] + self.devpref = self.prefix + self.main_dev + self.buildIdName(id_num) + self.setObjectName('LIApp') + title = "IPS "+str(id_num)+" Details" + self.setWindowTitle(title) + self._setupUi(title) + +
+[docs] + def buildIPSDetail(self, info): + """ Display IPS measurement complete information """ + wid = QGroupBox() + lay = QHBoxLayout() + lay.setContentsMargins(0, 0, 0, 0) + wid.setLayout(lay) + for type_config in info.values(): + name = self.devpref + type_config['text'] + widget = self.setupUnitView( + name, type_config['color'], 6) + lay.addWidget(widget, alignment=Qt.AlignCenter) + return wid
+ + +
+[docs] + def buildGroup(self, info, title): + """ Display one detail group """ + group = QGroupBox() + lay = QVBoxLayout() + group.setTitle(title) + group.setLayout(lay) + for item in info: + if 'title' in item: + if item['widget'] in ['state', 'button']: + sec_wid = 'led' + else: + sec_wid = 'label' + lay.addWidget( + self.SPRBWidget( + item['title'], item['control'], + item['status'], item['widget'], + True, False, sec_wid), 2) + else: + lay.addWidget( + self.getWidget( + item['status'], item['widget']), + 3, alignment=Qt.AlignCenter) + + return group
+ + + def _setupUi(self, title): + """.""" + wid, lay = self.getLayoutWidget() + self.setCentralWidget(wid) + pos = [1, 0, 1, 1] + lay.setContentsMargins(10, 0, 10, 0) + lay.addWidget( + QLabel("<strong>"+title+"</strong>"), + 0, 0, 1, 2, alignment=Qt.AlignCenter) + for title, info in IPS_DETAILS.items(): + pos[3] = 1 + if title == "General": + group = self.buildIPSDetail(info) + pos[3] = 2 + else: + group = self.buildGroup(info, title) + lay.addWidget( + group, pos[0], pos[1], pos[2], pos[3]) + pos[0] = 2 + if title != "General": + pos[1] += 1
+ + + +
+[docs] +class VgcDetailWindow(SiriusMainWindow, BaseFunctionsInterface): + """ Display VGC Detail Window""" + + def __init__(self, parent=None, prefix='', id_num=''): + """Init.""" + super().__init__(parent) + self.config = PVS_CONFIG["Vacuum"] + self.prefix = prefix + self.main_dev = self.config["prefix"] + self.setObjectName('LIApp') + self.number = id_num + title = "VGC "+str(self.number)+" Details" + self.setWindowTitle(title) + self.devpref = self.prefix + self.main_dev + self._setupUi(title) + +
+[docs] + def setupDevices(self, title, data, lay, col): + """ Display the infomation of three devices of the same group""" + row = 1 + for gen in range(3, 0, -1): + vgc_id = (self.number * 3)-(gen-1) + pv_number, generation = self.buildVacPv(vgc_id) + pv_suf = self.getSufixes(data) + if title == "Gauge": + widget = QLabel( + '<strong>'+self.getGroupTitle(data, vgc_id)+'</strong>', + alignment=Qt.AlignCenter) + elif isinstance(data, dict): + if title == "Setpoint": + show_title = False + if gen == 3: + show_title = True + widget = self.getSPTable( + pv_number, generation, data, show_title) + elif 'title' in data: + widget = self.getVgcSPRB( + data, pv_suf, pv_number, generation) + else: + pv_name = self.devpref + str(pv_number) + data['text'] + widget = self.getVgcLed( + pv_name, generation, data['sufix']) + else: + widget = self.getSimplePvWidget( + title, + pv_suf, pv_number, generation) + lay.addWidget(widget, row, col) + row += 1
+ + +
+[docs] + def buildVgcTable(self): + """ Create the information columns """ + wid, lay = self.getLayoutWidget() + pos = [0, 0] + for title, data in VGC_DETAILS.items(): + if title != 'led': + label = QLabel('<strong>'+title+'</strong>') + label.setAlignment(Qt.AlignCenter) + lay.addWidget( + label, pos[0], pos[1], + alignment=Qt.AlignCenter) + self.setupDevices(title, data, lay, pos[1]) + pos[1] += 1 + return wid
+ + + def _setupUi(self, title): + """.""" + wid, lay = self.getLayoutWidget("V") + self.setCentralWidget(wid) + lay.setContentsMargins(10, 0, 10, 0) + lay.addWidget( + QLabel("<strong>"+title+"</strong>"), + alignment=Qt.AlignCenter) + lay.addWidget(self.buildVgcTable()) + leg_list = [ + 'CCG', 'PRG', 'Gauge Status', 'Relay Status'] + lay.addWidget( + self.buildAllLegends(leg_list))
+ + + +
+[docs] +class DetailWindow(QWidget, BaseFunctionsInterface): + """ Display General Detail Window""" + + def __init__(self, parent=None): + """Init.""" + super().__init__(parent) + self.devpref = "" + self.setObjectName('LIApp') + self._setupUi() + +
+[docs] + def selWindow(self, cat): + """ Open selected window with click """ + if cat == "Pump": + window = IpsDetailWindow + else: + window = VgcDetailWindow + return window
+ + +
+[docs] + def setupAllDevices(self, title, data, lay, pos): + """ Display the VGC informations of one device""" + config = PVS_CONFIG["Vacuum"] + pv_range = config['iterations'] + self.devpref = config['prefix'] + for vgc_id in range(pv_range[0], pv_range[1]+1): + pv_number, generation = self.buildVacPv(vgc_id) + pos_temp = self.getVacPosition(vgc_id, False) + pos[0] = pos_temp[0] + pv_suf = self.getSufixes(data) + if title == "Gauge": + pos[1] = 0 + lay.addWidget( + self.setWindowBtn( + "Vacuum", vgc_id), pos[0], pos[1], 2, 1) + pos[1] += 1 + widget = QLabel( + '<strong>'+self.getGroupTitle(data, vgc_id)+'</strong>') + elif isinstance(data, dict): + if title == "Setpoint": + widget = self.getSPTable( + pv_number, generation, + data, pos[0] == 1, True) + elif 'title' in data: + widget = self.getVgcSPRB( + data, pv_suf, pv_number, generation) + else: + pv_name = self.devpref + pv_number + data['text'] + widget = self.getVgcLed( + pv_name, generation, data['sufix']) + else: + if title == "Gauge<br/>Message": + if generation == 3: + limits = [-4, -2] + else: + limits = [-11, -2] + widget = self.getProgressBar( + self.devpref+pv_number+config["bar"]+str(generation), + limits, COLORS["gre_blu"]) + else: + widget = self.getSimplePvWidget( + title, + pv_suf, pv_number, generation) + lay.addWidget( + widget, pos[0], pos[1], 2, 1, Qt.AlignCenter) + pos[0] += 1 + return pos
+ + +
+[docs] + def setupIPSControl(self, pv_name): + """ Display simple buttons for IPS Control """ + wid, lay = self.getLayoutWidget("G") + lay.setSpacing(0) + lay.setContentsMargins(0, 0, 0, 0) + pos = [0, 0] + for item in IPS_DETAILS["Status"]: + if 'title' in item: + if item['title'] not in ["State", "FAILED"]: + if item['title'] != "Local/\nRemote": + lbl = QLabel(item['title']) + lbl.setStyleSheet( + "font: 8pt;max-height:0.6em; min-width:2em;") + lay.addWidget(lbl, pos[0], pos[1], alignment=Qt.AlignCenter) + pos[0] += 1 + name = pv_name + item['control'] + lay.addWidget( + self.getWidget(name[12:], item['widget']), + pos[0], pos[1], alignment=Qt.AlignCenter) + widget = 'led' + if item['title'] == "Local/\nRemote": + widget = 'label' + name = pv_name + item['status'] + lay.addWidget( + self.getWidget(name[12:], widget, precision=False), + pos[0]+1, pos[1], alignment=Qt.AlignCenter) + pos[1] += 1 + pos[0] = 0 + + return wid
+ + +
+[docs] + def setupVgcListDet(self): + """ Display VGC Widget List with all VGC elements """ + wid, lay = self.getLayoutWidget("G") + pos = [0, 1] + for title, data in VGC_DETAILS.items(): + pos[0] = 0 + if title != 'led': + label = QLabel('<strong>'+title+'</strong>') + label.setAlignment(Qt.AlignCenter) + lay.addWidget(label, pos[0], pos[1], 1, 1) + pos[0] += 1 + pos = self.setupAllDevices(title, data, lay, pos) + pos[1] += 1 + return wid
+ + +
+[docs] + def setupIPSListDet(self): + """ Display IPS Widget List with all IPS elements """ + wid, lay = self.getLayoutWidget("V") + cat = "Pump" + config = PVS_CONFIG[cat] + self.devpref = config['prefix'] + pv_range = config["iterations"] + for item in range(pv_range[0], pv_range[1]+1): + pv_name = self.devpref + self.buildIdName(item) + widget, lay_item = self.getLayoutWidget("H") + lay_item.setSpacing(0) + lay_item.setContentsMargins(0, 2, 0, 0) + lay_item.addWidget( + self.setWindowBtn(cat, item), + alignment=Qt.AlignLeft) + lay_item.addWidget( + QLabel("<strong>IPS"+str(item)+"</strong>"), + alignment=Qt.AlignLeft) + self.buildIPSInfo(pv_name, lay_item, "H") + lay_item.addWidget( + self.setupIPSControl(pv_name)) + lay.addWidget(widget) + return wid
+ + +
+[docs] + def buildList(self, cat): + """ Select which widget list to build """ + if cat == "Vacuum": + wid = self.setupVgcListDet() + else: + wid = self.setupIPSListDet() + return wid
+ + +
+[docs] + def widgetLists(self): + """ Build all lists """ + wid, lay = self.getLayoutWidget("H") + lay.setContentsMargins(0, 0, 0, 0) + size = 3 + for cat in PVS_CONFIG: + if cat != "Valve": + group = QGroupBox() + lay_group = QVBoxLayout() + lay_group.setSpacing(0) + lay_group.setContentsMargins(0, 0, 0, 0) + group.setTitle(cat) + group.setLayout(lay_group) + lay_group.addWidget(self.buildList(cat)) + lay.addWidget(group, size) + size = 1 + return wid
+ + + def _setupUi(self): + """.""" + lay = QVBoxLayout() + lay.setContentsMargins(0, 0, 0, 0) + + lay.addWidget(self.widgetLists(), 5) + lay.addWidget(self.buildAllLegends(), 1) + self.setLayout(lay)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_va_control/functions.html b/_modules/siriushla/li_va_control/functions.html new file mode 100644 index 000000000..5478685a5 --- /dev/null +++ b/_modules/siriushla/li_va_control/functions.html @@ -0,0 +1,671 @@ + + + + + + siriushla.li_va_control.functions — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.li_va_control.functions

+""" Basic functions """
+import math as _math
+import qtawesome as _qta
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QLabel, QWidget, QGridLayout, \
+    QHBoxLayout, QVBoxLayout, QPushButton, QSizePolicy, QGroupBox
+from pydm.widgets.display_format import DisplayFormat as _DisplayFormat
+from ..li_rf_llrf.chart import ChartWindow
+from .. import util as _util
+from ..widgets import SiriusLabel, PyDMLed, PyDMLedMultiChannel, \
+    SiriusLineEdit, SiriusEnumComboBox, PyDMStateButton, SiriusLedAlert,\
+    SiriusPushButton, SiriusScaleIndicator
+from .util import COLORS, IPS_DETAILS, LEGEND
+from .widgets import LedLegend, QGroupBoxButton, \
+    PyDMLedMultiIncosistencyDetector
+
+
+
+[docs] +class BaseFunctionsInterface(): + """ Export basic functions to the Vacuum windows """ + +
+[docs] + def getLayout(self, orient="G"): + """ Get Layout with correct orientation """ + if orient == "G": + return QGridLayout() + elif orient == "H": + return QHBoxLayout() + return QVBoxLayout()
+ + +
+[docs] + def getLayoutWidget(self, orient="G"): + """ Get Widget with a layout inside """ + wid = QWidget() + lay = self.getLayout(orient) + wid.setLayout(lay) + return wid, lay
+ + +
+[docs] + def getWidget(self, name, wid_type='button', + keep_unit=False, precision=True): + """ Build and configure widgets used """ + pv_name = self.devpref + name + if wid_type == 'led': + if "ReadS.B4" in pv_name: + led_type = 'alert' + elif "GaugeSts" in pv_name: + led_type = 'inconsistent' + else: + led_type = 'normal' + widget = self.buildLed(pv_name, '', led_type) + elif wid_type == 'enum': + widget = SiriusEnumComboBox( + self, init_channel=pv_name) + widget.setStyleSheet("min-width:4em;max-height:1em;") + elif wid_type == 'state': + widget = PyDMStateButton( + self, init_channel=pv_name) + widget.setStyleSheet("min-height: 0.6em; min-width: 1.5em;") + elif wid_type == 'button': + widget = SiriusPushButton( + self, init_channel=pv_name, label='RESET', + pressValue=1, releaseValue=0) + else: + if wid_type == 'edit': + widget = SiriusLineEdit( + init_channel=pv_name) + widget.precisionFromPV = False + widget.precision = 2 + widget.setSizePolicy( + QSizePolicy.Maximum, QSizePolicy.Minimum) + else: + widget = SiriusLabel( + init_channel=pv_name, + keep_unit=keep_unit) + if precision and pv_name[-1] != 's': + widget.displayFormat = _DisplayFormat.Exponential + widget.setAlignment(Qt.AlignCenter) + widget.setStyleSheet( + "min-width:4em;max-width:5em;max-height:1em;") + return widget
+ + +
+[docs] + def getGroupTitle(self, cat, id_num): + """ Get element simple name """ + dev_id = id_num + if cat == "Pump": + name = "IPS" + else: + dev_number, dev_gen = self.buildIdsVac(id_num) + if dev_gen == 3: + dev_id = dev_number + name = "PRG" + else: + dev_id = dev_number * 2 + if dev_gen == 1: + dev_id -= 1 + name = "CCG" + return name + self.buildIdName(dev_id, False)
+ + +
+[docs] + def getSufixes(self, data): + """ Format sufixes based on info type """ + pv_suf = ["", ""] + if isinstance(data, str): + pv_suf[0] = data + elif isinstance(data, list): + pv_suf = data + elif isinstance(data, dict) and 'title' in data: + pv_suf = { + 'status': data['status'], + 'control': data['control'] + } + return pv_suf
+ + +
+[docs] + def setupUnitView(self, pv_name, color="#00000000", min_width=3): + """Create and format SiriusLabel""" + widget = SiriusLabel( + init_channel=pv_name, keep_unit=True) + styled = """ + min-height:0.75em;min-width: """+str(min_width)+"""em; + max-height:0.75em;max-width: """+str(min_width*5)+"""em; + background-color:"""+color+";" + widget.setStyleSheet(styled) + widget.showUnits = True + widget.setAlignment(Qt.AlignCenter) + if any(x in pv_name for x in ["RdPrs", "ReadP"]) \ + and pv_name[-1] != 's': + widget.precisionFromPV = False + widget.precision = 2 + widget.displayFormat = _DisplayFormat.Exponential + return widget
+ + +
+[docs] + def setWindowBtn(self, cat, id_num): + """ Create and configure button to open detail windows """ + button = QPushButton(_qta.icon('fa5s.ellipsis-h'), '', self) + if cat == 'Vacuum': + id_num, lx = self.buildIdsVac(id_num) + _util.connect_window( + button, self.selWindow(cat), + parent=self, id_num=id_num) + button.setStyleSheet("margin: 0.1em;") + return button
+ + +
+[docs] + def buildLed(self, pv_name, sufix_list, comp): + """ Build and configure different types of Led """ + if comp == 'normal': + if "Gauge" in pv_name: + comp = 'diff' + list_colors = None + if ".B3" in sufix_list: + list_colors = [COLORS['yellow'], COLORS['light_green']] + led = PyDMLed( + init_channel=pv_name + sufix_list, + color_list=list_colors) + elif comp == 'alert': + led = SiriusLedAlert( + self, init_channel=pv_name) + elif comp == 'on/off': + chan2vals = { + pv_name + sufix_list[0]: 1, + pv_name + sufix_list[1]: 0 + } + led = PyDMLedMultiChannel( + self, chan2vals) + else: + if len(sufix_list)>1: + chan2vals = { + pv_name + sufix_list[0]: 1, + pv_name + sufix_list[1]: 1 + } + else: + chan2vals = { + pv_name + sufix_list: 1 + } + led = PyDMLedMultiIncosistencyDetector( + self, chan2vals) + shape = getShape(comp) + led.shape = shape + if shape not in [1, 2]: + shape -= 2 + led.setStyleSheet( + "min-width:"+str(shape)+"em; max-width:"+str(shape)+"em;") + return led
+ + +
+[docs] + def SPRBWidget(self, title, control, readback, wid_type, + kp_unit=False, precision=True, sec_wid="label"): + """ + Build a setpoint and readback widget: + title + setpoint + readback + """ + wid, lay = self.getLayoutWidget("H") + lay.setContentsMargins(0, 1, 0, 1) + if title != "": + label = QLabel(title, alignment=Qt.AlignCenter) + label.setStyleSheet("min-width:5em;") + lay.addWidget(label) + lay.addWidget( + self.getWidget(control, wid_type, kp_unit, precision), + alignment=Qt.AlignRight) + widget = self.getWidget(readback, sec_wid, kp_unit, precision) + lay.addWidget( + widget, + alignment=Qt.AlignLeft) + return wid
+ + +
+[docs] + def getProgressBar(self, pv_name, limit, color=COLORS['purple']): + """ Create and configure Progress Bar """ + prog_bar = SiriusScaleIndicator( + init_channel=pv_name) + prog_bar.limitsFromChannel = False + prog_bar.showLimits = False + prog_bar.showValue = False + prog_bar.barIndicator = True + prog_bar.userLowerLimit = limit[0] + prog_bar.userUpperLimit = limit[1] + prog_bar.indicatorColor = color + width = 6 + if limit[1] == 200: + width = 8 + prog_bar.setStyleSheet('min-height:1em; min-width:'+str(width)+'em;') + return prog_bar
+ + +
+[docs] + def buildBasicGroup(self, cat, id_num, orient="V"): + """ Build anc configure group template """ + group = QGroupBoxButton( + title=self.getGroupTitle(cat, id_num)) + lay = self.getLayout(orient) + lay.setSpacing(0) + lay.setContentsMargins(0, 2, 0, 0) + group.setLayout(lay) + if orient == "H": + lay.addWidget( + self.setWindowBtn(cat, id_num), + alignment=Qt.AlignLeft) + else: + group.setObjectName("group") + group.setStyleSheet( + "QGroupBox#group{background-color:"+COLORS['btn_bg']+"};") + window = self.selWindow(cat) + if cat == 'Vacuum': + id_num, lx = self.buildIdsVac(id_num) + windowConfig = window(self, id_num=id_num) + _util.connect_window( + group, window, parent=self, id_num=id_num, + signal=group.clicked) + return lay, group
+ + +
+[docs] + def buildAllLegends(self, listleg=LEGEND): + """ Display all the legends """ + group = QGroupBox() + lay = QHBoxLayout() + group.setLayout(lay) + group.setContentsMargins(0, 0, 0, 0) + col = 0 + group.setTitle("LEGEND") + for leg in listleg: + if leg != 'size': + lay.addWidget( + self.setupLegend(leg), + alignment=Qt.AlignTop) + col += 1 + return group
+ + +
+[docs] + def setupLegend(self, legend): + """ Show one of the legends present in the LEGEND variable in util""" + wid, lay = self.getLayoutWidget() + lay.addWidget( + QLabel('<b>'+legend+'</b>'), + 0, 0, 1, 2, alignment=Qt.AlignCenter) + row = 1 + for item in LEGEND[legend]: + column = 0 + if 'color' in item: + shape = getShape(legend) + lay.addWidget( + LedLegend( + self, shape, + item['color'].name()), + row, column, 1, 1, + alignment=Qt.AlignRight | Qt.AlignVCenter) + column = 1 + + lay.addWidget( + QLabel(item['text']), + row, column, 1, 1, + alignment=Qt.AlignLeft) + row += 1 + return wid
+ + +
+[docs] + def buildIdName(self, id_num, is_valve=False): + """Format number in the PV name""" + pv_id = "" + if not is_valve: + if id_num < 10: + pv_id = "0" + pv_id += str(id_num) + return pv_id
+ + +
+[docs] + def buildVacPv(self, id_num): + """Generate VGC PV name with VGC id""" + dev_number, dev_gen = self.buildIdsVac(id_num) + pv_number = self.buildIdName(dev_number, False) + return pv_number, dev_gen
+ + +
+[docs] + def buildIdsVac(self, id_num): + """Get VGC group and individual identity and with VGC id""" + dev_number = _math.ceil(id_num / 3) + dev_gen = id_num % 3 + if not dev_gen: + dev_gen = 3 + return dev_number, dev_gen
+ + +
+[docs] + def getVgcSPRB(self, data, pv_list, num, gen, sec_wid='led'): + """ Use dict info to create a self.SPRBWidget """ + pv_name = {} + for data_type, name in pv_list.items(): + pv_name[data_type] = num + name + str(gen) + return self.SPRBWidget( + data['title'], pv_name['control'], + pv_name['status'], data['widget'], + precision=(data['widget'] != 'enum'), sec_wid=sec_wid)
+ + +
+[docs] + def getVgcLed(self, name, gen, suf_list): + """ Select led type based on VGC identity """ + if gen % 3 != 0: + comp = 'equal' + else: + comp = 'normal' + return self.buildLed(name, suf_list[gen % 3], comp)
+ + +
+[docs] + def getSPTable(self, num, gen, data, show_title=False, alternative=False): + """ Build and configure VGC SP table""" + pos = [0, 0] + wid, lay = self.getLayoutWidget() + lay.setSpacing(0) + lay.setContentsMargins(0, 0, 0, 0) + for title, obj_data in data.items(): + if show_title: + lay.addWidget( + headerWidget(title, alternative), + pos[0], pos[1], 1, 3, alignment=Qt.AlignCenter) + pos[0] += 1 + for sp_gen in data["No."][gen % 3]: + if title == "No.": + text = '' + if not alternative: + text = str(sp_gen) + widget = QLabel('<strong>'+text+'</strong>') + widget.setStyleSheet("min-width: 2em;") + widget.setAlignment(Qt.AlignCenter) + else: + pv_suf = self.getSufixes(obj_data) + if alternative: + if title == "SP" and sp_gen in [2, 6, 10]: + pv_suf = {'status': ':RdSH-', 'control': ':SetSH-'} + sp_gen -= 1 + if title == "SP-H" and sp_gen in [1, 5, 9]: + pv_suf = {'status': ':RdSP-', 'control': ':SetSP-'} + sp_gen += 1 + widget = self.getVgcSPRB( + obj_data, pv_suf, num, sp_gen, sec_wid='label') + lay.addWidget( + widget, pos[0], pos[1], + 1, 1, alignment=Qt.AlignCenter) + pos[0] += 1 + pos[1] += 3 + pos[0] = 0 + return wid
+ + +
+[docs] + def getSimplePvWidget(self, title, suf, num, gen): + """ Get simple VGC widget """ + pv_name = num + suf[0] + if title in ["Pressure<br/>Readback", "Gauge<br/>Message"]: + pv_name += str(gen) + suf[1] + wid_type = "label" + elif title == "Unit": + wid_type = "enum" + else: + wid_type = "label" + wid = self.getWidget(pv_name, wid_type) + return wid
+ + +
+[docs] + def getVacPosition(self, id_vgc, divide=True): + """ Get VGC widget position on the VGC Lists """ + pos = [0, 0] + pos[0], pos[1] = self.buildIdsVac(id_vgc) + if pos[1] == 3: + if divide: + pos[1] = 0 + else: + pos[0] += 10 + else: + pos[0] *= 2 + if pos[1] == 1: + pos[0] -= 1 + if divide: + pos[1] = 1 + return pos
+ + +
+[docs] + def buildIPSInfo(self, pv_name, lay, orient): + """ Display IPS measurement information """ + for info_type in ['voltage', 'current']: + info = IPS_DETAILS["General"][info_type] + name = pv_name + info["text"] + if info_type == 'current' and orient == 'H': + lay.addWidget( + self.getProgressBar(name, [0, 200]), + alignment=Qt.AlignCenter) + wid = self.setupUnitView( + name, info['color']) + lay.addWidget( + wid, alignment=Qt.AlignCenter) + return lay
+
+ + + +
+[docs] +def getShape(name): + """ Get led shape number """ + if any(x in name for x in ["PRG", "normal"]): + shape = PyDMLed.ShapeMap.Circle + elif any(x in name for x in ["CCG", "equal"]): + shape = PyDMLed.ShapeMap.Square + elif "on/off" in name: + shape = PyDMLed.ShapeMap.Triangle + else: + shape = PyDMLed.ShapeMap.Round + return shape
+ + + +
+[docs] +def headerWidget(title, alternative): + """ Get SP Table Header Widget """ + text = title + if alternative: + if title == "SP": + text = "Warning" + elif title == "SP-H": + text = "Alarm" + elif title == "No.": + text = "" + return QLabel('<strong>'+text+'</strong>')
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_va_control/main.html b/_modules/siriushla/li_va_control/main.html new file mode 100644 index 000000000..b1370d043 --- /dev/null +++ b/_modules/siriushla/li_va_control/main.html @@ -0,0 +1,414 @@ + + + + + + siriushla.li_va_control.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.li_va_control.main

+"""Main window of the Vacuum Control."""
+
+import os as _os
+from qtpy.QtCore import Qt, QEvent
+from qtpy.QtGui import QPixmap
+from qtpy.QtWidgets import QWidget, QGridLayout, QVBoxLayout, QLabel, \
+    QPushButton
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from ..widgets import RelativeWidget
+from ..widgets.windows import create_window_from_widget
+from .. import util as _util
+from .util import LEGEND, PVS_CONFIG, VGC_DETAILS
+from .chart import ChartWindow
+from .details import DetailWindow, IpsDetailWindow, VgcDetailWindow
+from .functions import BaseFunctionsInterface
+
+
+
+[docs] +class VacuumMain(QWidget, BaseFunctionsInterface): + """ Vaccum Control Main Window """ + + def __init__(self, parent=None, prefix=_VACA_PREFIX): + """.""" + super().__init__(parent=parent) + self.prefix = prefix + ('-' if prefix else '') + self.setObjectName('LIApp') + self.setWindowTitle('LI Vacuum') + self.image_container = QLabel() + self.pixmap = QPixmap(_os.path.join( + _os.path.abspath(_os.path.dirname(__file__)), "vacuum.png")) + self.relative_widgets = [] + self.pump_list = [] + self.vgc_list = [] + self.graphs = [] + self.gen_btn = [] + self._setupui() + +
+[docs] + def eventFilter(self, obj, event): + """Signal the resize event to the relative Widgets""" + if event.type() == QEvent.Resize: + for relative_item in self.relative_widgets: + relative_item.relativeResize() + return super().eventFilter(obj, event)
+ + +
+[docs] + def saveRelWid(self, widget, size, coord): + """ Save relative widget to list """ + rel_wid = RelativeWidget( + parent=self.image_container, + widget=widget, + relative_pos=coord + size) + self.relative_widgets.append(rel_wid)
+ + +
+[docs] + def saveWidToList(self, widget, cat): + """ Save widget to list """ + if cat == "Vacuum": + self.vgc_list.append(widget) + else: + self.pump_list.append(widget)
+ + +
+[docs] + def selWindow(self, cat): + """ Open selected window with click """ + if cat == "CCG Graphs": + window = ChartWindow + elif cat == "Pump": + window = IpsDetailWindow + elif cat == "Vacuum": + window = VgcDetailWindow + else: + window = create_window_from_widget( + DetailWindow, title='Vacuum Details', is_main=True, + withscroll=True, min_width=90, min_height=52.5) + return window
+ + +
+[docs] + def imageViewer(self): + """Build the image""" + self.image_container.setPixmap(self.pixmap) + self.image_container.installEventFilter(self) + self.image_container.setScaledContents(True) + self.image_container.setMinimumSize(1580, 0) + return self.image_container
+ + +
+[docs] + def setupVgcList(self, config): + """ Display VGC Widget List with all VGC elements """ + wid, lay = self.getLayoutWidget() + id_vgc = 1 + for item in self.vgc_list: + pos = self.getVacPosition(id_vgc) + lay.addWidget(item, pos[0], pos[1]) + self.saveRelWid( + wid, config['size'], config['coord']) + id_vgc += 1
+ + +
+[docs] + def setupIPSList(self, config): + """ Display IPS Widget List with all IPS elements """ + wid, lay = self.getLayoutWidget() + pos = [0, 0] + for item in self.pump_list: + if pos[0] >= 10 and pos[1] == 0: + pos[0] = 0 + pos[1] = 1 + lay.addWidget(item, pos[0], pos[1]) + self.saveRelWid( + wid, config['size'], config['coord']) + pos[0] += 1
+ + +
+[docs] + def setupLists(self, cat): + """ Select which widget list to build """ + config = PVS_CONFIG[cat]['list'] + if cat == "Vacuum": + self.setupVgcList(config) + else: + self.setupIPSList(config)
+ + +
+[docs] + def buildVacInfo(self, config, id_num, lay): + """ Display VGC basic information """ + + name, dev_gen = self.buildVacPv(id_num) + pv_name = config['prefix'] + name + led_config = VGC_DETAILS["led"] + led_name = pv_name+led_config["text"] + unit_name = pv_name+VGC_DETAILS["Pressure<br/>Readback"]+str(dev_gen) + lay.addWidget( + self.setupUnitView(unit_name), + alignment=Qt.AlignCenter) + led = self.getVgcLed(led_name, id_num, led_config["sufix"]) + lay.addWidget(led, alignment=Qt.AlignCenter)
+ + +
+[docs] + def getGroupWidgets(self, config, item, cat, orient): + """ Select and build group widget """ + + pv_name = self.buildIdName(item, cat == "Valve") + pv_name = config["prefix"] + pv_name + if cat == "Valve": + widget = self.buildLed( + pv_name, config['sufix'], "on/off") + elif cat == "Pump": + lay, widget = self.buildBasicGroup( + cat, item, orient) + self.buildIPSInfo( + pv_name, lay, orient) + else: + lay, widget = self.buildBasicGroup( + cat, item, orient) + self.buildVacInfo(config, item, lay) + return widget
+ + +
+[docs] + def setupMainWidgets(self, cat="Vacuum"): + """ Display relative widgets and save list items """ + lay = QVBoxLayout() + lay.setSpacing(0) + config = PVS_CONFIG[cat] + pv_range = config["iterations"] + lists = ['H', 'V'] + if cat == "Valve": + lists = [''] + for orient in lists: + for item in range(pv_range[0], pv_range[1]+1): + coord = config["position"][item-1] + widget = self.getGroupWidgets( + config, item, cat, orient) + if orient == 'H': + self.saveWidToList(widget, cat) + else: + self.saveRelWid( + widget, config["size"], coord) + if orient == 'H': + self.setupLists(cat)
+ + +
+[docs] + def buildAllLegendsRel(self): + """ Display Legend in a relative widget""" + size = LEGEND['size'] + coord = [50, 82.5] + title = QLabel( + "<strong>LEGEND</strong>", + alignment=Qt.AlignCenter) + self.saveRelWid( + title, [10, 10], coord) + coord[1] += 5 + for leg in ['CCG', 'PRG']: + self.saveRelWid( + self.setupLegend(leg), size, coord) + coord[0] += 6 + coord[1] -= 0.25
+ + +
+[docs] + def setupButtons(self): + """ Display button menu """ + size = [10, 8] + coord = [35, 85] + count = 0 + for title in ['Details', 'CCG Graphs']: + btn = QPushButton(title) + _util.connect_window( + btn, self.selWindow(title), self) + self.gen_btn.append(btn) + self.saveRelWid( + self.gen_btn[-1], + size, coord) + coord[1] += 5 + count += 1
+ + + def _setupui(self): + """.""" + lay = QGridLayout() + self.setLayout(lay) + + lay.addWidget(self.imageViewer(), 0, 0) + for wid_cat in PVS_CONFIG: + self.setupMainWidgets(wid_cat) + + self.buildAllLegendsRel() + self.setupButtons()
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/li_va_control/widgets.html b/_modules/siriushla/li_va_control/widgets.html new file mode 100644 index 000000000..a211fb05e --- /dev/null +++ b/_modules/siriushla/li_va_control/widgets.html @@ -0,0 +1,283 @@ + + + + + + siriushla.li_va_control.widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.li_va_control.widgets

+""" Contains the special widgets used in the windows """
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGroupBox
+from qtpy.QtGui import QPainter, QBrush, QPen, QColor
+from ..widgets import PyDMLedMultiChannel
+
+
+
+[docs] +class LedLegend(QWidget): + """ Drawing of a Led for the Legend """ + + def __init__(self, parent=None, shape=1, color='#FFFFFF'): + """.""" + super().__init__(parent=parent) + + if shape != 2: + size = [12, 12] + else: + size = [25, 10] + self.color = color + self.shape = shape + self.setMinimumWidth(size[0]) + self.setMaximumWidth(size[0]+10) + self.setMinimumHeight(size[1]) + self.setMaximumHeight(size[1]+10) + +
+[docs] + def getShape(self, painter, pos, size): + """ Draw different shapes of led """ + if self.shape == 1: + painter.drawEllipse( + pos[0], pos[1], size[0], size[1]) + elif self.shape == 2: + painter.drawRoundedRect( + pos[0], pos[1], size[0], size[1], 3, 15) + elif self.shape == 3: + painter.drawRect( + pos[0], pos[1], size[0], size[1]) + return painter
+ + +
+[docs] + def drawSingleLed(self, painter, color, pos_x, width): + """ Draw a single Led""" + own_size = [self.width()-1, self.height()-1] + pos = [own_size[0]*pos_x/100, 0] + size = [own_size[0]*width/100, own_size[1]] + painter.setBrush( + QBrush(color, Qt.SolidPattern)) + painter = self.getShape(painter, pos, size) + return painter
+ + +
+[docs] + def paintEvent(self, event): + """ Called to paint led on the window """ + painter = QPainter(self) + painter.setPen(QPen(Qt.black, 1, Qt.SolidLine)) + self.drawSingleLed(painter, QColor(self.color), 0, 100) + painter.end()
+
+ + + +
+[docs] +class PyDMLedMultiIncosistencyDetector(PyDMLedMultiChannel): + """ Drawing of a Led for the Legend """ + + LightGreen = QColor(0, 140, 0) + Yellow = QColor(210, 205, 0) + Red = QColor(207, 0, 0) + + def __init__( + self, parent=None, channels2values=dict(), + color_list=[Red, LightGreen, Yellow]): + """.""" + super().__init__( + parent=parent, + channels2values=channels2values, + color_list=color_list) + + def _update_statuses(self): + first_pv = list(self._address2status.keys())[0] + final_state = self._address2status[first_pv] + if not self._connected: + final_state = 2 + else: + for status in self._address2status.values(): + if status != final_state: + final_state = 2 + break + self.setState(final_state)
+ + + +
+[docs] +class QGroupBoxButton(QGroupBox): + """ A clickable GroupBox """ + + def __init__(self, parent=None, title=""): + """.""" + super().__init__(parent=parent) + self.setTitle(title) + self.setMouseTracking(True) + +
+[docs] + def mousePressEvent(self, event): + """ Emit a clicked function in the GroupBox """ + child = self.childAt(event.pos()) + if not child: + child = self + self.clicked.emit()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_fofb/base.html b/_modules/siriushla/si_ap_fofb/base.html new file mode 100644 index 000000000..49e7787b7 --- /dev/null +++ b/_modules/siriushla/si_ap_fofb/base.html @@ -0,0 +1,234 @@ + + + + + + siriushla.si_ap_fofb.base — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_ap_fofb.base

+"""Base module."""
+
+from qtpy.QtWidgets import QWidget
+
+import qtawesome as qta
+
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.fofb.csdev import HLFOFBConst
+
+from ..util import get_appropriate_color
+from ..as_ap_sofb.ioc_control.base import BaseObject as _BaseObject, \
+    BaseWidget as _BaseWidget
+
+
+
+[docs] +class BaseObject(_BaseObject): + """Base object.""" + + UM2M = 1e-6 + UM2NM = 1e3 + URAD2RAD = 1e-6 + + def __init__(self, device, prefix=''): + """Init.""" + self.prefix = prefix + self.device = _PVName(device) + self.devpref = self.device.substitute(prefix=prefix) + self._csorb = HLFOFBConst() + + @property + def acc(self): + """Accelerator.""" + return 'SI' + + @property + def acc_idx(self): + """Accelerator index.""" + return 0 + + @property + def isring(self): + """Whether accelerator is a ring.""" + return True
+ + + +
+[docs] +class BaseWidget(_BaseWidget, BaseObject): + """Base widget.""" + + def __init__(self, parent, device, prefix=''): + """Init.""" + BaseObject.__init__(self, device, prefix) + QWidget.__init__(self, parent) + self.setObjectName('SIApp')
+ + + +
+[docs] +def get_fofb_icon(color=True): + """Return default icon.""" + iconcolor = color if isinstance(color, str) else \ + get_appropriate_color('SI') if color else None + return qta.icon( + 'fa5s.hammer', 'fa5s.signal', options=[ + dict(scale_factor=0.85, offset=(0.15, 0.0)), + dict(scale_factor=0.7, offset=(0.0, 0.25), rotated=90, + vflip=True)], color=iconcolor)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_fofb/custom_widgets.html b/_modules/siriushla/si_ap_fofb/custom_widgets.html new file mode 100644 index 000000000..a78bd7d2b --- /dev/null +++ b/_modules/siriushla/si_ap_fofb/custom_widgets.html @@ -0,0 +1,1123 @@ + + + + + + siriushla.si_ap_fofb.custom_widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_ap_fofb.custom_widgets

+"""Custom widgets."""
+
+from functools import partial as _part
+import numpy as _np
+
+from qtpy.QtCore import Qt, Slot, QTimer
+from qtpy.QtGui import QColor, QPalette, QIcon
+from qtpy.QtWidgets import QComboBox, QSizePolicy as QSzPlcy, \
+    QLabel, QGridLayout, QWidget, QHBoxLayout, QPushButton, \
+    QVBoxLayout, QTabWidget, QCheckBox, QScrollArea, QMessageBox
+
+import qtawesome as qta
+from matplotlib import cm
+
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.clientconfigdb import ConfigDBClient, ConfigDBException
+from siriuspy.devices import Device, FOFBCtrlDCC, FamFOFBControllers
+from siriuspy.diagbeam.bpm.csdev import Const as _csbpm
+
+from pydm.widgets import PyDMPushButton
+
+from ..util import connect_window
+from ..widgets import SiriusConnectionSignal as _ConnSignal, SiriusLedAlert, \
+    SiriusDialog, PyDMLedMultiChannel, SiriusLabel, PyDMLed, SiriusLedState, \
+    CAPushButton
+from ..widgets.windows import create_window_from_widget
+from ..as_ap_configdb import LoadConfigDialog, SaveConfigDialog
+from ..common.afc_acq_core import LogicalTriggers
+from ..as_ap_sofb.graphics.base import Graph
+from .base import BaseObject, get_fofb_icon
+from .graphics import RefOrbViewWidget
+
+
+
+[docs] +class RefOrbWidget(BaseObject, QWidget): + """Reference Orbit widget.""" + + def __init__(self, parent, device, prefix=''): + BaseObject.__init__(self, device, prefix) + QWidget.__init__(self, parent) + + self._config_type = 'si_orbit' + self._client = ConfigDBClient(config_type=self._config_type) + + self._refzero = dict() + self._refzero['x'] = _np.zeros(self._csorb.nr_bpms, dtype=float) + self._refzero['y'] = _np.zeros(self._csorb.nr_bpms, dtype=float) + self._refx = _np.zeros(self._csorb.nr_bpms, dtype=float) + self._refy = _np.zeros(self._csorb.nr_bpms, dtype=float) + + self._ch_refx = _ConnSignal( + self.devpref.substitute(propty='RefOrbX-SP')) + self._ch_refy = _ConnSignal( + self.devpref.substitute(propty='RefOrbY-SP')) + self._ch_syncref = _ConnSignal( + self.devpref.substitute(propty='CtrlrSyncRefOrb-Cmd')) + + sofb_prefix = _PVName('SI-Glob:AP-SOFB').substitute(prefix=self.prefix) + self._ch_sofb_orbx = _ConnSignal( + sofb_prefix.substitute(propty='SlowOrbX-Mon')) + self._ch_sofb_orbx.new_value_signal[_np.ndarray].connect( + _part(self._watch_if_changed, 'x', 'SOFB SlowOrb')) + self._ch_sofb_orbx.new_value_signal[float].connect( + _part(self._watch_if_changed, 'x', 'SOFB SlowOrb')) + self._ch_sofb_orby = _ConnSignal( + sofb_prefix.substitute(propty='SlowOrbY-Mon')) + self._ch_sofb_orby.new_value_signal[_np.ndarray].connect( + _part(self._watch_if_changed, 'y', 'SOFB SlowOrb')) + self._ch_sofb_orby.new_value_signal[float].connect( + _part(self._watch_if_changed, 'y', 'SOFB SlowOrb')) + self._ch_sofb_refx = _ConnSignal( + sofb_prefix.substitute(propty='RefOrbX-RB')) + self._ch_sofb_refx.new_value_signal[_np.ndarray].connect( + _part(self._watch_if_changed, 'x', 'SOFB RefOrb')) + self._ch_sofb_refy = _ConnSignal( + sofb_prefix.substitute(propty='RefOrbY-RB')) + self._ch_sofb_refy.new_value_signal[_np.ndarray].connect( + _part(self._watch_if_changed, 'y', 'SOFB RefOrb')) + + self._setupUi() + + def _setupUi(self): + lbl_combo = QLabel( + 'Value: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self.combo = QComboBox() + self.combo.setSizePolicy(QSzPlcy.Expanding, QSzPlcy.Preferred) + self.combo.setMaxVisibleItems(10) + self._choose_reforb = [ + 'Zero', 'SOFB SlowOrb', 'SOFB RefOrb', + 'ref_orb', 'bba_orb', 'other...', + 'Out of Date'] + for item in self._choose_reforb: + self.combo.addItem(item) + self.combo.setCurrentText('Out of Date') + self.combo.activated.connect(self._add_reforb_entry) + + self.status = QPushButton(QIcon(), '', self) + self.status.setFlat(True) + self.status.setStyleSheet( + 'QPushButton{min-width: 25px; max-width: 25px; icon-size: 20px;}') + self.statusopacity = 0 + self.statusvalue = True + self.statustimer = QTimer() + self.statustimer.setInterval(100) + self.statustimer.timeout.connect(self._update_response_icon) + self.statustimer.start() + + self.graph = RefOrbViewWidget(self, self.device, self.prefix) + self.viewgraph = QPushButton(self) + self.viewgraph.setIcon(qta.icon('mdi.chart-line')) + self.viewgraph.setObjectName('btn') + self.viewgraph.setStyleSheet('#btn{max-width:25px; icon-size:25px;}') + self.viewgraph.clicked.connect(self.graph.show) + + lay = QGridLayout(self) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(lbl_combo, 0, 0) + lay.addWidget(self.combo, 0, 1) + lay.addWidget(self.status, 0, 2) + lay.addWidget(self.viewgraph, 0, 3) + + @Slot(int) + def _add_reforb_entry(self, index): + text = self.combo.itemText(index) + if text == 'Out of Date': + return + if not text.startswith('other'): + self._update_new_value(text) + return + win = LoadConfigDialog(self._config_type, self) + confname, status = win.exec_() + if not status: + self.combo.setCurrentText('Out of Date') + return + self.combo.insertItem(index, confname) + self.combo.setCurrentIndex(index) + self._update_new_value(confname) + + def _update_new_value(self, text): + # read + if text == 'Zero': + refx, refy = self._refzero['x'], self._refzero['y'] + elif text == 'SOFB SlowOrb': + refx = self._ch_sofb_orbx.value + refy = self._ch_sofb_orby.value + elif text == 'SOFB RefOrb': + refx = self._ch_sofb_refx.value + refy = self._ch_sofb_refy.value + else: + data = self._client.get_config_value(text) + refx, refy = data['x'], data['y'] + + # check + if refx is None or refy is None or \ + _np.asarray(refx).size != self._csorb.nr_bpms or \ + _np.asarray(refy).size != self._csorb.nr_bpms: + self.combo.setCurrentText('Out of Date') + self._show_response_icon(ok=False) + return + + self._refx = _np.asarray(refx) + self._refy = _np.asarray(refy) + + # send + self._ch_refx.send_value_signal[_np.ndarray].emit(self._refx) + self._ch_refy.send_value_signal[_np.ndarray].emit(self._refy) + + self._show_response_icon(ok=True) + + def _watch_if_changed(self, plane, orb, value): + myvalue = getattr(self, '_ref' + plane) + if orb != self.combo.currentText(): + return + if myvalue is not None and myvalue.size == value.size and \ + _np.allclose(value, myvalue, rtol=1e-7): + return + self.combo.setCurrentIndex(self.combo.count()-1) + + def _show_response_icon(self, ok=True): + self.statusvalue = ok + self.statusopacity = 1 + + def _update_response_icon(self): + if self.statusopacity <= 0: + return + name = 'fa5s.check' if self.statusvalue else 'fa5s.times' + color = 'blue' if self.statusvalue else 'red' + icon = qta.icon( + name, options=[{ + 'color': color, 'opacity': self.statusopacity}]) + self.status.setIcon(icon) + if self.statusopacity > 0: + self.statusopacity -= 0.2
+ + + +
+[docs] +class StatusDialog(SiriusDialog): + """Status Detail Dialog.""" + + def __init__( + self, parent, pvname, labels, cmds, title='', detail_button=None): + super().__init__(parent) + self.setObjectName('SIApp') + self.pvname = _PVName(pvname) + self.labels = labels + self.cmds = cmds + self.title = title + self.detail_button = detail_button + + lay = QGridLayout(self) + + label = QLabel( + '<h4>'+self.title+'</h4>', self, alignment=Qt.AlignCenter) + lay.addWidget(label, 0, 0, 1, 3) + + for idx, desc in enumerate(self.labels): + led = SiriusLedAlert(self, self.pvname, bit=idx) + lbl = QLabel(desc, self) + lay.addWidget(led, idx+1, 0) + lay.addWidget(lbl, idx+1, 1) + + if self.cmds[idx]: + btn = PyDMPushButton( + self, icon=qta.icon('fa5s.sync'), pressValue=1, + init_channel=self.cmds[idx]) + btn.setDefault(False) + btn.setAutoDefault(False) + btn.setObjectName('btn') + btn.setStyleSheet( + '#btn{min-width:25px; max-width:25px; icon-size:20px;}') + lay.addWidget(btn, idx+1, 2) + + if self.detail_button is not None: + lay.addWidget( + self.detail_button, len(self.labels)+1, 1, + alignment=Qt.AlignCenter)
+ + + +
+[docs] +class BPMSwModeWidget(BaseObject, QWidget): + """Auxiliary BPM switching control widget.""" + + def __init__(self, parent, device, prefix=''): + BaseObject.__init__(self, device, prefix) + QWidget.__init__(self, parent) + props = ['SwMode-Sel', ] + self._bpm_devs = [ + Device(b, props2init=props, auto_monitor_mon=True) + for b in self._csorb.bpm_names] + self._setupUi() + self._init_dict = {} + self._init = False + self._pv_objs = list() + for dev in self._bpm_devs: + pvo = dev.pv_object('SwMode-Sel') + pvo.add_callback(self._set_initial_value) + pvo.add_callback(self._update_current_value) + if pvo.connected: + self._set_initial_value(pvo.pvname, pvo.value) + self._pv_objs.append(pvo) + + def _setupUi(self): + lbl = QLabel( + 'SwMode: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + + self.sel = QComboBox(self) + self.sel.addItems(['switching', 'direct']) + + self.sts = PyDMLedMultiChannel(self) + + lay = QHBoxLayout(self) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(lbl) + lay.addWidget(self.sel) + lay.addWidget(self.sts) + + def _set_swithing_mode(self, text, do_sp=True): + mode = _csbpm.SwModes._fields.index(text) + if do_sp: + for dev in self._bpm_devs: + dev['SwMode-Sel'] = mode + else: + self.blockSignals(True) + self.sel.setCurrentText(text) + self.blockSignals(False) + + ch2vals = dict() + for bpm in self._csorb.bpm_names: + pvn = _PVName(bpm).substitute( + prefix=self.prefix, propty='SwMode-Sts') + ch2vals[pvn] = mode + self.sts.set_channels2values(ch2vals) + + def _set_initial_value(self, pvname, value, **kws): + if value is not None: + self._init_dict[pvname] = value + + if self._init or len(self._init_dict) < len(self._bpm_devs): + return + + self._init = True + + vals, cnts = _np.unique( + list(self._init_dict.values()), return_counts=True) + value = vals[_np.argmax(cnts)] + mode = _csbpm.SwModes._fields[value] + + ch2vals = dict() + for bpm in self._csorb.bpm_names: + pvn = _PVName(bpm).substitute( + prefix=self.prefix, propty='SwMode-Sts') + ch2vals[pvn] = value + self.sts.set_channels2values(ch2vals) + + self.sel.setCurrentText(mode) + self.sel.currentTextChanged.connect(self._set_swithing_mode) + + def _update_current_value(self, value, **kws): + if not self._init: + return + if not _np.all([pvo.value == value for pvo in self._pv_objs]): + return + mode = _csbpm.SwModes._fields[value] + self._set_swithing_mode(mode, do_sp=False)
+ + + +
+[docs] +class PSConfigWidget(BaseObject, QWidget): + """Basic widget to set and get a configuration from ServConf.""" + + def __init__(self, parent, device, prefix=''): + BaseObject.__init__(self, device, prefix) + QWidget.__init__(self, parent) + + self._config_type = 'si_fastorbcorr_psconfig' + self._client = ConfigDBClient(config_type=self._config_type) + self._enblrule = ( + '[{"name": "EnblRule", "property": "Enable", ' + + '"expression": "not ch[0]", "channels": [{"channel": "' + + self.devpref.substitute(propty='LoopState-Sts') + + '", "trigger": true}]}]') + + self._mat_sp = _ConnSignal( + self.devpref.substitute(propty='PSConfigMat-SP')) + self._mat_rb = _ConnSignal( + self.devpref.substitute(propty='PSConfigMat-RB')) + + self._setupUi() + + def _setupUi(self): + self._label_name = QLabel('') + + lbl_load = QLabel('Load:', self, alignment=Qt.AlignTop) + self._btn_load = CAPushButton('') + self._btn_load.rules = self._enblrule + self._btn_load.setIcon(qta.icon('mdi.cloud-upload-outline')) + self._btn_load.setToolTip('Load PSConfig from ServConf') + self._btn_load.clicked.connect(self._open_load_config_servconf) + + lbl_save = QLabel('Save:', self, alignment=Qt.AlignTop) + self._btn_save = CAPushButton('') + self._btn_save.setIcon(qta.icon('mdi.cloud-download-outline')) + self._btn_save.setToolTip('Save PSConfig to ServConf') + self._btn_save.clicked.connect(self._open_save_config_servconf) + + lay = QGridLayout(self) + lay.addWidget(lbl_load, 0, 0) + lay.addWidget(self._btn_load, 0, 1) + lay.addWidget(lbl_save, 0, 2) + lay.addWidget(self._btn_save, 0, 3) + lay.addWidget(self._label_name, 1, 0, 1, 4) + + def _open_load_config_servconf(self): + win = LoadConfigDialog(self._config_type, self) + win.configname.connect(self._set_psconfig) + win.show() + + def _open_save_config_servconf(self): + win = SaveConfigDialog(self._config_type, self) + win.configname.connect(self._save_psconfig) + win.show() + + def _set_psconfig(self, confname): + data = self._client.get_config_value(confname) + self._mat_sp.send_value_signal[_np.ndarray].emit( + _np.array(data).flatten()) + self._label_name.setText('Loaded ' + confname) + + def _save_psconfig(self, confname): + val = self._mat_rb.getvalue() + val = val.reshape(self._csorb.nr_chcv, -1) + try: + self._client.insert_config(confname, val.tolist()) + except (ConfigDBException, TypeError) as err: + QMessageBox.warning(self, 'Warning', str(err), QMessageBox.Ok)
+ + + +
+[docs] +class ControllersDetailDialog(BaseObject, SiriusDialog): + """Controllers detail dialog.""" + + def __init__(self, parent, device, prefix='', tab_selected=0): + BaseObject.__init__(self, device, prefix) + SiriusDialog.__init__(self, parent) + self.tab_selected = tab_selected + self.setObjectName('SIApp') + self.setWindowTitle('SI - FOFB - Controllers Details Dialog') + self.setWindowIcon(get_fofb_icon()) + + self.ctrlrs = FOFBCtrlDCC.DEVICES + ctrlr_offset = FamFOFBControllers.FOFBCTRL_BPMID_OFFSET + self.dccnames, self.dccids = list(), list() + for dcc in FOFBCtrlDCC.PROPDEVICES.ALL: + for ctrl in self.ctrlrs: + bid = ctrlr_offset - 1 + int(ctrl[3:5]) + self.dccnames.append(ctrl+':'+dcc) + self.dccids.append(bid) + for idx, bpm in enumerate(self._csorb.bpm_names): + self.dccnames.append(bpm+':DCCP2P') + bid = ((idx + 1) // 2) * 2 % 160 + self.dccids.append(bid) + + self._setupUi() + + self._ch_synenls = _ConnSignal( + self.devpref.substitute(propty='CtrlrSyncEnblList-Mon')) + self._ch_synenls.new_value_signal[_np.ndarray].connect( + self._update_dcc_enbllist) + self._ch_synenls.new_value_signal[_np.ndarray].connect( + self._update_refpacketloss) + + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + tab = QTabWidget(self) + tab.setObjectName('SITab') + tab.addTab(self._setupBPMIdsTab(), 'DCC BPM Ids') + tab.addTab(self._setupNetSyncTab(), 'Net Sync Status') + tab.addTab(self._setupLinkPartnerTab(), 'DCC Linked Partners') + tab.addTab(self._setupRefOrbTab(), 'RefOrb Sync Status') + tab.addTab(self._setupTimeFrameLenTab(), 'DCC TimeFrameLen') + tab.addTab(self._setupBPMLogTrigTab(), 'BPM Logical Trigger Configs') + tab.addTab(self._setupOrbDistTab(), 'Orbit Distortion Detection') + tab.addTab(self._setupPacketLossTab(), 'Packet Loss Detection') + tab.addTab(self._setupIntlkTab(), 'Loop Interlock') + tab.addTab(self._setupSYSIDExc(), 'SYSID Excitation States') + tab.setCurrentIndex(self.tab_selected) + + lay = QVBoxLayout(self) + lay.addWidget(tab) + + self.setStyleSheet('SiriusLabel{qproperty-alignment: AlignCenter;}') + + def _setupBPMIdsTab(self): + wid = QWidget() + lay = QGridLayout(wid) + lay.setSpacing(1) + lay.setAlignment(Qt.AlignLeft | Qt.AlignTop) + + # header + lay.addWidget( + QLabel('<h4>Device</h4>', self, alignment=Qt.AlignCenter), 0, 0) + lay.addWidget( + QLabel('<h4>BPMId</h4>', self, alignment=Qt.AlignCenter), 0, 1) + + # table + for idx, dcc in enumerate(self.dccnames): + row = idx + 1 + lbl = QLabel(dcc, self, alignment=Qt.AlignCenter) + pvn = _PVName(dcc).substitute(prefix=self.prefix) + 'BPMId-RB' + plb = SiriusLabel(self, pvn) + led = PyDMLedMultiChannel(self, {pvn: self.dccids[idx]}) + lay.addWidget(lbl, row, 0) + lay.addWidget(plb, row, 1) + lay.addWidget(led, row, 2) + + return self._build_scroll_area(wid) + + def _setupNetSyncTab(self): + wid = QWidget() + lay = QGridLayout(wid) + lay.setSpacing(1) + lay.setAlignment(Qt.AlignLeft | Qt.AlignTop) + + # header + lay.addWidget( + QLabel('<h4>Device</h4>', self, alignment=Qt.AlignCenter), 0, 0) + lay.addWidget( + QLabel('<h4>BPM Count</h4>', self, alignment=Qt.AlignCenter), 0, 1) + lay.addWidget( + QLabel('<h4>Enable</h4>', self, alignment=Qt.AlignCenter), 0, 2) + + # table + self.leds_sync, self.leds_dccsts = dict(), dict() + for idx, dcc in enumerate(self.dccnames): + row = idx + 1 + lbl = QLabel(dcc, self, alignment=Qt.AlignCenter) + pvn = _PVName(dcc).substitute(prefix=self.prefix) + 'BPMCnt-Mon' + plb = SiriusLabel(self, pvn) + lay.addWidget(lbl, row, 0) + lay.addWidget(plb, row, 1) + + pvn = _PVName(dcc).substitute(prefix=self.prefix) + 'CCEnable-Sts' + led = PyDMLed(self, pvn) + led.setObjectName('led_status') + led.shape = led.ShapeMap.Square + if 'FOFBCtrl' in dcc: + led.offColor = led.Red + self.leds_dccsts[dcc] = led + lay.addWidget(led, row, 2, alignment=Qt.AlignTop) + + if 'FMC' in dcc: + c2v = {pvn: FOFBCtrlDCC.DEF_FMC_BPMCNT} + led = PyDMLedMultiChannel(self, c2v) + self.leds_sync[dcc] = led + lay.addWidget(led, row, 3) + + return self._build_scroll_area(wid) + + def _update_dcc_enbllist(self, value): + for dcc, led in self.leds_sync.items(): + pvn = _PVName(dcc).substitute(prefix=self.prefix) + 'BPMCnt-Mon' + c2v = {pvn: int(_np.sum(value))} + led.set_channels2values(c2v) + for idx, bpm in enumerate(self._csorb.bpm_names): + led = self.leds_dccsts[bpm+':DCCP2P'] + if value[idx]: + led.offColor = led.Red + led.onColor = led.LightGreen + else: + led.offColor = led.DarkGreen + led.onColor = led.Red + + def _setupLinkPartnerTab(self): + wid = QWidget() + lay = QGridLayout(wid) + lay.setSpacing(1) + lay.setAlignment(Qt.AlignLeft | Qt.AlignTop) + + lpart_pvs = ['BPMId-RB', ] + [ + 'LinkPartnerCH'+str(idx)+'-Mon' for idx in range(8)] + + # header + lay.addWidget( + QLabel('<h4>Device</h4>', self, alignment=Qt.AlignCenter), 0, 0) + for idx, link in enumerate(lpart_pvs): + col = idx + 1 + text = '<h4>' + link.split('-')[0] + '</h4>' + lbl = QLabel(text, self, alignment=Qt.AlignCenter) + lay.addWidget(lbl, 0, col) + + # table + row = 1 + for dcc in self.dccnames: + lbl = QLabel(dcc, self, alignment=Qt.AlignCenter) + lay.addWidget(lbl, row, 0) + for idx, link in enumerate(lpart_pvs): + col = idx + 1 + pvn = _PVName(dcc).substitute(prefix=self.prefix) + link + plb = SiriusLabel(self, pvn) + lay.addWidget(plb, row, col) + row += 1 + + return self._build_scroll_area(wid) + + def _setupRefOrbTab(self): + self._refimpl = { + plane: _np.zeros(2*self._csorb.nr_bpms) + for plane in ['x', 'y']} + self._ch_refx = _ConnSignal( + self.devpref.substitute(propty='RefOrbHwX-Mon')) + self._ch_refx.new_value_signal[_np.ndarray].connect( + _part(self._update_reforb, 'x')) + self._ch_refy = _ConnSignal( + self.devpref.substitute(propty='RefOrbHwY-Mon')) + self._ch_refy.new_value_signal[_np.ndarray].connect( + _part(self._update_reforb, 'y')) + + # title + title = QLabel( + '<h4>Reference Orbit [X, Y] in Hardware Units [nm]</h4>', self, + alignment=Qt.AlignCenter) + + # graph + self.curve_hlref = dict() + colors = cm.jet(_np.linspace(0, 1, len(self.ctrlrs)))*255 + coloros = [QColor(*color) for color in colors] + graph_refs, c2v, visisel = dict(), dict(), dict() + for plane in ['x', 'y']: + graph_refs[plane] = Graph(self) + graph_refs[plane].showLegend = False + graph_refs[plane].setTitle('RefOrb'+plane.upper()) + + opts = dict( + y_channel='', name='HL RefOrb'+plane.upper(), + color='black', redraw_mode=2, + lineStyle=1, lineWidth=2, + symbol='o', symbolSize=10) + graph_refs[plane].addChannel(**opts) + self.curve_hlref[plane] = graph_refs[plane].curveAtIndex(0) + + for ctrl, coloro in zip(self.ctrlrs, coloros): + pvn = _PVName(ctrl).substitute( + prefix=self.prefix, propty='RefOrb'+plane.upper()+'-RB') + + c2v[pvn] = self._refimpl[plane] + + opts = dict( + y_channel=pvn, name='', color=coloro, redraw_mode=2, + lineStyle=1, lineWidth=2, symbol='o', symbolSize=10) + graph_refs[plane].addChannel(**opts) + curve = graph_refs[plane].curveAtIndex(-1) + + if ctrl not in visisel: + cbx = QCheckBox(ctrl[3:5], self) + cbx.setChecked(True) + cbx.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Maximum) + pal = cbx.palette() + pal.setColor(QPalette.Base, coloro) + pal.setColor(QPalette.Text, Qt.white) + cbx.setPalette(pal) + visisel[ctrl] = cbx + visisel[ctrl].stateChanged.connect(curve.setVisible) + + # led + self.led_reforb_c2v = c2v + self.led_ref = PyDMLedMultiChannel(self, c2v) + + # curves + lay_sel = QGridLayout() + lay_sel.setContentsMargins(0, 0, 0, 0) + colsel = 2 + for idx, cbx in enumerate(visisel.values()): + lay_sel.addWidget(cbx, idx // colsel, idx % colsel) + + wid = QWidget() + lay = QGridLayout(wid) + lay.addWidget(title, 0, 0) + lay.addWidget(self.led_ref, 0, 1, alignment=Qt.AlignRight) + for idx, graph in enumerate(graph_refs.values()): + lay.addWidget(graph, idx+1, 0) + lay.addLayout(lay_sel, 1, 1, len(graph_refs), 1) + return wid + + def _update_reforb(self, plane, value): + self._refimpl[plane] = value + self.curve_hlref[plane].receiveYWaveform(value) + prop = 'RefOrb'+plane.upper()+'-RB' + self.led_reforb_c2v.update({ + _PVName(ctrl).substitute( + prefix=self.prefix, propty=prop): value + for ctrl in self.ctrlrs}) + self.led_ref.set_channels2values(self.led_reforb_c2v) + + def _setupTimeFrameLenTab(self): + wid = QWidget() + lay = QGridLayout(wid) + lay.setSpacing(1) + lay.setAlignment(Qt.AlignLeft | Qt.AlignTop) + + # header + lay.addWidget( + QLabel('<h4>Device</h4>', self, alignment=Qt.AlignCenter), 0, 0) + lay.addWidget( + QLabel('<h4>TimeFrameLen</h4>', self, alignment=Qt.AlignCenter), + 0, 1) + + # table + self._led_timeframelen = dict() + for idx, dcc in enumerate(self.dccnames): + row = idx + 1 + lbl = QLabel(dcc, self, alignment=Qt.AlignCenter) + pvn = _PVName(dcc).substitute(prefix=self.prefix) + pvn += 'TimeFrameLen-RB' + plb = SiriusLabel(self, pvn) + led = PyDMLedMultiChannel(self) + self._led_timeframelen[pvn] = led + lay.addWidget(lbl, row, 0) + lay.addWidget(plb, row, 1) + lay.addWidget(led, row, 2) + + self._ch_tfl = _ConnSignal( + self.devpref.substitute(propty='TimeFrameLen-RB')) + self._ch_tfl.new_value_signal[int].connect( + self._update_reftimeframelen) + + return self._build_scroll_area(wid) + + def _update_reftimeframelen(self, value): + for pvn, led in self._led_timeframelen.items(): + led.set_channels2values({pvn: value}) + + def _setupOrbDistTab(self): + wid = QWidget() + lay = QGridLayout(wid) + lay.setSpacing(1) + lay.setAlignment(Qt.AlignLeft | Qt.AlignTop) + + # header + lay.addWidget( + QLabel('<h4>Device</h4>', self, alignment=Qt.AlignCenter), 0, 0) + lay.addWidget( + QLabel('<h4>Threshold</h4>', self, alignment=Qt.AlignCenter), 0, 1) + lay.addWidget( + QLabel('<h4>Enable</h4>', self, alignment=Qt.AlignCenter), 0, 2) + + # table + self.leds_odd = dict() + for idx, ctl in enumerate(self.ctrlrs): + row = idx + 1 + c2v = dict() + + lbl = QLabel(ctl, self, alignment=Qt.AlignCenter) + pvn = _PVName(ctl).substitute( + prefix=self.prefix, propty='MaxOrbDistortion-RB') + c2v[pvn] = 0 + plb = SiriusLabel(self, pvn) + lay.addWidget(lbl, row, 0) + lay.addWidget(plb, row, 1) + + pvn = _PVName(ctl).substitute( + prefix=self.prefix, propty='MaxOrbDistortionEnbl-Sts') + c2v[pvn] = 0 + led = SiriusLedState(self, pvn) + led.setObjectName('led_status') + led.shape = led.ShapeMap.Square + lay.addWidget(led, row, 2, alignment=Qt.AlignTop) + + led = PyDMLedMultiChannel(self, c2v) + self.leds_odd[ctl] = led + lay.addWidget(led, row, 3) + + self._ch_odt = _ConnSignal( + self.devpref.substitute(propty='LoopMaxOrbDistortion-RB')) + self._ch_odt.new_value_signal[float].connect( + self._update_reforbdist) + self._ch_odd = _ConnSignal( + self.devpref.substitute(propty='LoopMaxOrbDistortionEnbl-Sts')) + self._ch_odd.new_value_signal[int].connect( + self._update_reforbdist) + + return self._build_scroll_area(wid) + + def _update_reforbdist(self, _): + odt = self._ch_odt.value + odd = self._ch_odd.value + if odt is None or odd is None: + return + odt = int(odt*self.UM2NM) + for ctl, led in self.leds_odd.items(): + pref = _PVName(ctl).substitute(prefix=self.prefix) + c2v = { + pref.substitute(propty='MaxOrbDistortion-RB'): odt, + pref.substitute(propty='MaxOrbDistortionEnbl-Sts'): odd, + } + led.set_channels2values(c2v) + + def _setupPacketLossTab(self): + wid = QWidget() + lay = QGridLayout(wid) + lay.setSpacing(1) + lay.setAlignment(Qt.AlignLeft | Qt.AlignTop) + + # header + lay.addWidget( + QLabel('<h4>Device</h4>', self, alignment=Qt.AlignCenter), 0, 0) + lay.addWidget( + QLabel('<h4>MinBPMCount</h4>', self, alignment=Qt.AlignCenter), 0, 1) + lay.addWidget( + QLabel('<h4>Enable</h4>', self, alignment=Qt.AlignCenter), 0, 2) + + # table + self.leds_pld = dict() + for idx, ctl in enumerate(self.ctrlrs): + row = idx + 1 + c2v = dict() + + lbl = QLabel(ctl, self, alignment=Qt.AlignCenter) + pvn = _PVName(ctl).substitute( + prefix=self.prefix, propty='MinBPMCnt-RB') + c2v[pvn] = 0 + plb = SiriusLabel(self, pvn) + lay.addWidget(lbl, row, 0) + lay.addWidget(plb, row, 1) + + pvn = _PVName(ctl).substitute( + prefix=self.prefix, propty='MinBPMCntEnbl-Sts') + c2v[pvn] = 0 + led = SiriusLedState(self, pvn) + led.setObjectName('led_status') + led.shape = led.ShapeMap.Square + lay.addWidget(led, row, 2, alignment=Qt.AlignTop) + + led = PyDMLedMultiChannel(self, c2v) + self.leds_pld[ctl] = led + lay.addWidget(led, row, 3) + + self._ch_ple = _ConnSignal( + self.devpref.substitute(propty='LoopPacketLossDetecEnbl-Sts')) + self._ch_ple.new_value_signal[int].connect( + self._update_refpacketloss) + + return self._build_scroll_area(wid) + + def _update_refpacketloss(self, _): + plc = self._ch_synenls.value + ple = self._ch_ple.value + if plc is None or ple is None: + return + plc = int(_np.sum(plc)) + for ctl, led in self.leds_pld.items(): + pref = _PVName(ctl).substitute(prefix=self.prefix) + c2v = { + pref.substitute(propty='MinBPMCnt-RB'): plc, + pref.substitute(propty='MinBPMCntEnbl-Sts'): ple, + } + led.set_channels2values(c2v) + + def _setupIntlkTab(self): + wid = QWidget() + lay = QGridLayout(wid) + lay.setSpacing(1) + lay.setAlignment(Qt.AlignLeft | Qt.AlignTop) + + # header + lay.addWidget( + QLabel('<h4>Device</h4>', self, alignment=Qt.AlignCenter), 0, 0) + lay.addWidget( + QLabel('<h4>Interlock</h4>', self, alignment=Qt.AlignCenter), 0, 1) + + # table + for idx, dcc in enumerate(self.ctrlrs): + row = idx + 1 + lbl = QLabel(dcc, self, alignment=Qt.AlignCenter) + lay.addWidget(lbl, row, 0) + pvn = _PVName(dcc).substitute( + prefix=self.prefix, propty='LoopIntlk-Mon') + led = SiriusLedAlert(self, pvn) + led.setObjectName('led_status') + lay.addWidget(led, row, 1, alignment=Qt.AlignTop) + + return self._build_scroll_area(wid) + + def _setupBPMLogTrigTab(self): + wid = QWidget() + lay = QGridLayout(wid) + lay.setSpacing(1) + lay.setAlignment(Qt.AlignLeft | Qt.AlignTop) + + trigid = FamFOFBControllers.BPM_TRIGS_ID + propties = ['RcvSrc-Sts', 'RcvInSel-RB'] + + # header + devlbl = QLabel('<h4>BPM</h4>', self, alignment=Qt.AlignCenter) + lay.addWidget(devlbl, 0, 0, 2, 1) + text = f'<h4>TRIGGER {trigid}</h4>' + lbl = QLabel(text, self, alignment=Qt.AlignCenter) + lay.addWidget(lbl, 0, 1, 1, 2) + for idx, prop in enumerate(propties): + text = prop.split('-')[0] + lbl = QLabel(text, self, alignment=Qt.AlignCenter) + lay.addWidget(lbl, 1, idx+1) + + # table + for idxr, bpm in enumerate(self._csorb.bpm_names): + row = idxr + 2 + btn = QPushButton(qta.icon('fa5s.ellipsis-h'), '', self) + btn.setObjectName('btn') + btn.setStyleSheet( + '#btn{min-width:25px; max-width:25px; icon-size:20px;}') + btn.setDefault(False) + btn.setAutoDefault(False) + win = create_window_from_widget( + LogicalTriggers, title=bpm+': ACQ Logical Triggers') + connect_window( + btn, win, parent=self, prefix=self.prefix, device=bpm, + names=_csbpm.LogTrigIntern._fields) + lbl = QLabel(bpm, self, alignment=Qt.AlignCenter) + lbl.setObjectName('lbl_bpmname') + hwid = QWidget() + hwid.setObjectName('wid') + hwid.setStyleSheet('#wid{border: 1px solid gray;}') + hlay = QHBoxLayout(hwid) + hlay.setContentsMargins(2, 0, 2, 0) + hlay.addWidget(btn) + hlay.addWidget(lbl) + lay.addWidget(hwid, row, 0) + c2v = dict() + for idx, prop in enumerate(propties): + pvn = _PVName(bpm).substitute( + prefix=self.prefix, propty='TRIGGER'+str(trigid)+prop) + dval = FamFOFBControllers.DEF_BPMTRIG_RCVIN if 'RcvIn' \ + in prop else FamFOFBControllers.DEF_BPMTRIG_RCVSRC + c2v[pvn] = dval + plb = SiriusLabel(self, pvn) + lay.addWidget(plb, row, idx+1) + led = PyDMLedMultiChannel(self, c2v) + lay.addWidget(led, row, 7) + + return self._build_scroll_area(wid) + + def _setupSYSIDExc(self): + wid = QWidget() + lay = QGridLayout(wid) + lay.setSpacing(1) + lay.setAlignment(Qt.AlignLeft | Qt.AlignTop) + + # header + lay.addWidget( + QLabel('<h4>Device</h4>', self, alignment=Qt.AlignCenter), 0, 0) + lay.addWidget( + QLabel('<h4>FOFBAcc.Enbl.</h4>', self, alignment=Qt.AlignCenter), + 0, 1) + lay.addWidget( + QLabel('<h4>BPMPos.Enbl.</h4>', self, alignment=Qt.AlignCenter), + 0, 2) + + # table + for idx, ctl in enumerate(self.ctrlrs): + row = idx + 1 + lbl = QLabel(ctl, self, alignment=Qt.AlignCenter) + pvnacc = _PVName(ctl).substitute( + prefix=self.prefix, propty='SYSIDPRBSFOFBAccEn-Sts') + ledacc = SiriusLedState(self, pvnacc) + ledacc.shape = ledacc.ShapeMap.Square + ledacc.setObjectName('led_status') + pvnbpm = _PVName(ctl).substitute( + prefix=self.prefix, propty='SYSIDPRBSBPMPosEn-Sts') + ledbpm = SiriusLedState(self, pvnbpm) + ledbpm.shape = ledbpm.ShapeMap.Square + ledbpm.setObjectName('led_status') + ledsum = PyDMLedMultiChannel(self, {pvnacc: 0, pvnbpm: 0}) + lay.addWidget(lbl, row, 0) + lay.addWidget(ledacc, row, 1, alignment=Qt.AlignTop) + lay.addWidget(ledbpm, row, 2, alignment=Qt.AlignTop) + lay.addWidget(ledsum, row, 3) + + return self._build_scroll_area(wid) + + def _build_scroll_area(self, widget): + area = QScrollArea(self) + area.setSizeAdjustPolicy(QScrollArea.AdjustToContentsOnFirstShow) + area.setWidgetResizable(True) + area.setWidget(widget) + widget.setObjectName('widget') + widget.setStyleSheet( + '#widget{background-color: transparent;}' + 'QLabel{border: 1px solid gray; min-height: 1.5em;}' + '#lbl_bpmname{border: 0px solid gray; min-height: 1.5em;}' + '#led_status{border: 1px solid gray; min-height: 1.5em;}') + return area
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_fofb/graphics.html b/_modules/siriushla/si_ap_fofb/graphics.html new file mode 100644 index 000000000..f042d5531 --- /dev/null +++ b/_modules/siriushla/si_ap_fofb/graphics.html @@ -0,0 +1,701 @@ + + + + + + siriushla.si_ap_fofb.graphics — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_ap_fofb.graphics

+"""Graphics module."""
+
+from functools import partial as _part
+import numpy as _np
+
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QToolTip, QWidget, QVBoxLayout, QLabel, \
+    QHBoxLayout, QCheckBox, QGridLayout
+
+from pyqtgraph import mkBrush, mkPen
+
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.devices import StrengthConv
+from siriuspy.optics.constants import SI as SICte
+
+from ..widgets import SiriusConnectionSignal as _ConnSig, QDoubleSpinBoxPlus,\
+    SiriusDialog
+from ..as_ap_sofb.graphics.base import Graph, InfLine
+from .base import BaseObject
+
+
+
+[docs] +class MatrixWidget(BaseObject, QWidget): + """Matrix widget.""" + + def __init__(self, parent, device, propty, prefix=''): + """Init.""" + BaseObject.__init__(self, device, prefix) + QWidget.__init__(self, parent) + self.setObjectName('SIApp') + self._is_inv = 'Inv' in propty + self._is_coeff = 'Coeff' in propty + self._is_hw = 'Hw' in propty + self._inflines = [] + self._setupui() + self.mat = _ConnSig(self.devpref.substitute(propty=propty)) + self.mat.new_value_signal[_np.ndarray].connect(self._update_graph) + self._update_graph(None) + self._update_horizontal() + + def _setupui(self): + vbl = QVBoxLayout(self) + + if self._is_coeff: + text = 'Corrector Coefficients' + else: + text = 'Inverse' if self._is_inv else 'Transpose' + text += ' of Response Matrix - ' + text += 'Hardware Units' if self._is_hw else 'Physics Units' + + lab = QLabel(text, self, alignment=Qt.AlignCenter) + lab.setStyleSheet("font-weight: bold;") + vbl.addWidget(lab) + + graph = Graph(self) + vbl.addWidget(graph) + + self.spbox = QDoubleSpinBoxPlus(self) + self.spbox.setMinimum(0) + self.spbox.setMaximum(1000) + value = 1.0 if self._is_coeff or self._is_inv else 80.0 + self.spbox.setValue(value) + self.spbox.setKeyboardTracking(False) + self.spbox.editingFinished.connect(self._update_graph) + + hbl = QHBoxLayout() + vbl.addItem(hbl) + hbl.addWidget(QLabel('Lines spacing:', self)) + hbl.addWidget(self.spbox) + hbl.addStretch() + + graph.setShowLegend(False) + graph.setLabel('bottom', text='BPM Position', units='m') + if self._is_coeff: + yunits = 'count/nm' + else: + if self._is_hw: + yunits = 'count/nm' if self._is_inv else 'nm/count' + else: + yunits = 'rad/m' if self._is_inv else 'm/rad' + graph.setLabel('left', text='Matrix', units=yunits) + ncorr = self._csorb.nr_chcv if self._is_coeff else self._csorb.nr_corrs + for i in range(ncorr): + color = 'blue' + if i >= self._csorb.nr_ch: + color = 'red' + if i >= self._csorb.nr_ch+self._csorb.nr_cv: + color = 'black' + opts = dict( + y_channel='', + x_channel='', + name='', + color=color, + redraw_mode=2, + lineStyle=1, + lineWidth=1, + symbol='o', + symbolSize=10) + graph.addChannel(**opts) + graph.plotItem.scene().sigMouseMoved.connect(self._show_tooltip) + self.graph = graph + + def _show_tooltip(self, pos): + bname = self._csorb.bpm_nicknames + cname = self._csorb.ch_nicknames + self._csorb.cv_nicknames + ['RF', ] + bpos = self._csorb.bpm_pos + + graph = self.graph + curve = graph.curveAtIndex(0) + posx = curve.scatter.mapFromScene(pos).x() + ind = _np.argmin(_np.abs(_np.array(bpos)-posx)) + posy = curve.scatter.mapFromScene(pos).y() + + sbval = self.spbox.value() + if sbval == 0: + indy = 0 + else: + indy = int(posy // self.spbox.value()) + indy = max(min(indy, len(cname)-1), 0) + txt = 'BPM = {0:s}, Corr = {1:s}'.format(bname[ind], cname[indy]) + QToolTip.showText( + graph.mapToGlobal(pos.toPoint()), + txt, graph, graph.geometry(), 500) + + def _update_graph(self, *args): + sep = self.spbox.value() + val = self.mat.value + if val is None: + return + if self._is_inv: + val = val.reshape(self._csorb.nr_corrs, -1) + elif self._is_coeff: + val = val.reshape(self._csorb.nr_chcv, -1) + else: + val = val.reshape(-1, self._csorb.nr_corrs) + ncorr = self._csorb.nr_chcv if self._is_coeff else self._csorb.nr_corrs + for i in range(ncorr): + cur = self.graph.curveAtIndex(i) + if self._is_inv or self._is_coeff: + cur.receiveYWaveform(sep*i + val[i, :]) + else: + cur.receiveYWaveform(sep*i + val[:, i]) + + def _update_horizontal(self): + bpm_pos = _np.array(self._csorb.bpm_pos) + bpm_pos = [bpm_pos + i*SICte.length for i in range(2)] + bpm_pos = _np.hstack(bpm_pos) + ncorr = self._csorb.nr_chcv if self._is_coeff else self._csorb.nr_corrs + for i in range(ncorr): + cur = self.graph.curveAtIndex(i) + pos = bpm_pos + if self._is_inv or self._is_coeff: + pos = _np.hstack([-1, bpm_pos]) + cur.receiveXWaveform(pos) + + for cur in self._inflines: + self.graph.removeItem(cur) + self._inflines = [] + for i in range(3): + dic = {'style': 2, 'width': 2, 'color': '000'} + if i == 1: + dic = {'style': 1, 'width': 3, 'color': '000'} + pen = mkPen(**dic) + line = InfLine(pos=i*SICte.length+bpm_pos[0]/2, pen=pen) + self._inflines.append(line) + self.graph.addItem(line)
+ + + +
+[docs] +class CorrGainWidget(BaseObject, QWidget): + """Corrector gain widget.""" + + def __init__(self, parent, device, prefix=''): + """Init.""" + BaseObject.__init__(self, device, prefix) + QWidget.__init__(self, parent) + self.setObjectName('SIApp') + self._setupui() + self.gains = _ConnSig(self.devpref.substitute(propty='CorrGains-Mon')) + self.gains.new_value_signal[_np.ndarray].connect(self._update_graph) + self._update_horizontal() + + def _setupui(self): + vbl = QVBoxLayout(self) + lab = QLabel('Corrector Gains', self, alignment=Qt.AlignCenter) + lab.setStyleSheet("font-weight: bold;") + vbl.addWidget(lab) + + for plane in ['h', 'v']: + graph = Graph(self) + name = 'graph_' + plane + setattr(self, name, graph) + graph.setTitle('Horizontal' if plane == 'h' else 'Vertical') + graph.setObjectName(name) + graph.setStyleSheet('#'+name+'{min-width: 16em; min-height: 8em;}') + graph.setLabel('bottom', text='Position', units='m') + graph.setLabel('left', text='Gain') + graph.showLegend = False + color = 'blue' if plane == 'h' else 'red' + opts = dict( + y_channel='', x_channel='', name='', + color=color, redraw_mode=2, + lineStyle=1, lineWidth=1, + symbol='o', symbolSize=10) + graph.addChannel(**opts) + graph.plotItem.scene().sigMouseMoved.connect( + _part(self._show_tooltip, plane)) + vbl.addWidget(graph) + + def _show_tooltip(self, plane, pos): + if plane == 'h': + cname = self._csorb.ch_nicknames + xdata = self._csorb.ch_pos + else: + cname = self._csorb.cv_nicknames + xdata = self._csorb.cv_pos + + graph = getattr(self, 'graph_' + plane) + curve = graph.curveAtIndex(0) + posx = curve.scatter.mapFromScene(pos).x() + ind = _np.argmin(_np.abs(_np.array(xdata)-posx)) + txt = '{0:s}'.format(cname[ind]) + QToolTip.showText( + graph.mapToGlobal(pos.toPoint()), + txt, graph, graph.geometry(), 500) + + def _update_graph(self, *args): + val = self.gains.value + if val is None: + return + curve = self.graph_h.curveAtIndex(0) + curve.receiveYWaveform(_np.array(val[:self._csorb.nr_ch])) + curve = self.graph_v.curveAtIndex(0) + curve.receiveYWaveform(_np.array(val[self._csorb.nr_ch:])) + + def _update_horizontal(self): + curve = self.graph_h.curveAtIndex(0) + curve.receiveXWaveform(_np.array(self._csorb.ch_pos)) + curve = self.graph_v.curveAtIndex(0) + curve.receiveXWaveform(_np.array(self._csorb.cv_pos))
+ + + +
+[docs] +class RefOrbViewWidget(BaseObject, SiriusDialog): + """RefOrb View widget.""" + + def __init__(self, parent, device, prefix=''): + """Init.""" + BaseObject.__init__(self, device, prefix) + SiriusDialog.__init__(self, parent) + self.setObjectName('SIApp') + self._setupui() + self.refx = _ConnSig(self.devpref.substitute(propty='RefOrbX-RB')) + self.refx.new_value_signal[_np.ndarray].connect( + _part(self._update_implemented_ref, 'x')) + self.refy = _ConnSig(self.devpref.substitute(propty='RefOrbY-RB')) + self.refy.new_value_signal[_np.ndarray].connect( + _part(self._update_implemented_ref, 'y')) + self._update_horizontal() + + def _setupui(self): + vbl = QVBoxLayout(self) + lab = QLabel('Reference Orbit', self, alignment=Qt.AlignCenter) + lab.setStyleSheet("font-weight: bold;") + vbl.addWidget(lab) + + for plane in ['x', 'y']: + graph = Graph(self) + name = 'graph_' + plane + setattr(self, name, graph) + graph.setTitle('Horizontal' if plane == 'x' else 'Vertical') + graph.setObjectName(name) + graph.setStyleSheet( + '#'+name+'{min-width: 45em; min-height: 15em;}') + graph.setLabel('bottom', text='BPM Position', units='m') + graph.setLabel('left', text=plane, units='m') + color = 'blue' if plane == 'x' else 'red' + opts = dict( + y_channel='', x_channel='', name='Implemented', + color=color, redraw_mode=2, + lineStyle=1, lineWidth=2, + symbol='o', symbolSize=10) + graph.addChannel(**opts) + graph.plotItem.scene().sigMouseMoved.connect( + _part(self._show_tooltip, plane)) + graph.setShowLegend(False) + vbl.addWidget(graph) + + def _show_tooltip(self, plane, pos): + graph = getattr(self, 'graph_' + plane) + curve = graph.curveAtIndex(0) + posx = curve.scatter.mapFromScene(pos).x() + ind = _np.argmin(_np.abs(_np.array(self._csorb.bpm_pos)-posx)) + txt = '{0:s}'.format(self._csorb.bpm_nicknames[ind]) + QToolTip.showText( + graph.mapToGlobal(pos.toPoint()), + txt, graph, graph.geometry(), 500) + + def _update_horizontal(self): + bpm_pos = _np.array(self._csorb.bpm_pos) + for graph in [self.graph_x, self.graph_y]: + curve = graph.curveAtIndex(0) + curve.receiveXWaveform(bpm_pos) + + def _update_implemented_ref(self, plane, *args): + ref = getattr(self, 'ref' + plane) + value = ref.value + if value is None: + return + graph = getattr(self, 'graph_' + plane) + curve = graph.curveAtIndex(0) + curve.receiveYWaveform(self.UM2M*_np.array(value))
+ + + +
+[docs] +class KickWidget(BaseObject, QWidget): + """Corrector kicks widget.""" + + def __init__(self, parent, device, prefix=''): + """Init.""" + BaseObject.__init__(self, device, prefix) + QWidget.__init__(self, parent) + self.setObjectName('SIApp') + self._setupui() + self._psconv = { + psn: StrengthConv(psn, 'Ref-Mon', auto_monitor_mon=True) + for psn in self._csorb.ch_names + self._csorb.cv_names} + + for suffix in ['-Mon', 'Acc-Mon', 'Ref-Mon']: + for plane in ['h', 'v']: + propty = 'KickC' + plane.upper() + suffix + ktype = 'kick' + suffix.strip('-Mon').lower() + pvn = self.devpref.substitute(propty=propty) + chn = _ConnSig(pvn) + chn.new_value_signal[_np.ndarray].connect( + _part(self._update_graph, ktype, plane)) + setattr(self, ktype+plane, chn) + + self.limh = _ConnSig(self.devpref.substitute(propty='CHAccSatMax-RB')) + self.limh.new_value_signal[float].connect( + _part(self._update_graph, 'lim', 'h')) + self.limv = _ConnSig(self.devpref.substitute(propty='CVAccSatMax-RB')) + self.limv.new_value_signal[float].connect( + _part(self._update_graph, 'lim', 'v')) + + self.enblh = _ConnSig(self.devpref.substitute(propty='CHEnblList-RB')) + self.enblh.new_value_signal[_np.ndarray].connect( + _part(self._update_graph, 'enbl', 'h')) + self.enblv = _ConnSig(self.devpref.substitute(propty='CVEnblList-RB')) + self.enblv.new_value_signal[_np.ndarray].connect( + _part(self._update_graph, 'enbl', 'v')) + + self.energy = _ConnSig(_PVName('SI-Fam:PS-B1B2-1').substitute( + prefix=self.prefix, propty='EnergyRef-Mon')) + self.energy.new_value_signal[float].connect( + _part(self._update_graph, 'energy', 'h')) + self.energy.new_value_signal[float].connect( + _part(self._update_graph, 'energy', 'v')) + + self._update_horizontal() + + def _setupui(self): + lay = QGridLayout(self) + lab = QLabel( + '<h4>Fast Corrector Kicks</h4>', self, alignment=Qt.AlignCenter) + lay.addWidget(lab, 0, 0, 1, 2) + + cbkicks = dict() + hview = QHBoxLayout() + hview.addWidget(QLabel('Show: ', self)) + for curve in ['Acc', 'Ref', 'Mon']: + cbx = QCheckBox(curve, self) + checked = curve == 'Acc' + cbx.setChecked(checked) + cbkicks[curve] = cbx + hview.addWidget(cbx) + lay.addLayout(hview, 1, 0, alignment=Qt.AlignLeft) + + cblim = QCheckBox('Show Kick Limits', self) + cblim.setChecked(True) + lay.addWidget(cblim, 1, 1, alignment=Qt.AlignRight) + + row = 2 + for plane in ['h', 'v']: + graph = Graph(self) + name = 'graph_' + plane + setattr(self, name, graph) + graph.setTitle('Horizontal' if plane == 'h' else 'Vertical') + graph.setObjectName(name) + graph.setStyleSheet( + '#'+name+'{min-width: 45em; min-height: 15em;}') + graph.setLabel('bottom', text='Position', units='m') + graph.setLabel('left', text='Kick', units='rad') + graph.maxRedrawRate = 8 # [Hz] + + # kicks + opts = dict( + y_channel='', x_channel='', redraw_mode=2, + lineStyle=1, lineWidth=1, symbol='o', symbolSize=10) + # Current-Mon + opts['color'] = 'gray' + opts['name'] = 'Mon' + graph.addChannel(**opts) + curve = graph.curveAtIndex(0) + curve.setVisible(False) + cbkicks[opts['name']].toggled.connect(curve.setVisible) + # CurrentRef-Mon + opts['color'] = QColor(0, 125, 255) if plane == 'h' \ + else QColor(255, 125, 0) + opts['name'] = 'Ref' + graph.addChannel(**opts) + curve = graph.curveAtIndex(1) + curve.setVisible(False) + cbkicks[opts['name']].toggled.connect(curve.setVisible) + # FOFBAcc-Mon + opts['color'] = 'blue' if plane == 'h' else 'red' + opts['name'] = 'Acc' + graph.addChannel(**opts) + curve = graph.curveAtIndex(2) + cbkicks[opts['name']].toggled.connect(curve.setVisible) + + # limits + opts = dict( + y_channel='', x_channel='', + color='black', redraw_mode=2, + lineStyle=2, lineWidth=1) + opts['name'] = 'maxlim' + graph.addChannel(**opts) + graph.legend.removeItem('maxlim') + maxkick = graph.curveAtIndex(3) + opts['name'] = 'minlim' + graph.addChannel(**opts) + minkick = graph.curveAtIndex(4) + graph.legend.removeItem('minlim') + + cblim.toggled.connect(maxkick.setVisible) + cblim.toggled.connect(minkick.setVisible) + + graph.plotItem.scene().sigMouseMoved.connect( + _part(self._show_tooltip, plane)) + lay.addWidget(graph, row, 0, 1, 2) + row += 1 + + def _show_tooltip(self, plane, pos): + if plane == 'h': + cname = self._csorb.ch_nicknames + xdata = self._csorb.ch_pos + else: + cname = self._csorb.cv_nicknames + xdata = self._csorb.cv_pos + + graph = getattr(self, 'graph_' + plane) + curve = graph.curveAtIndex(0) + posx = curve.scatter.mapFromScene(pos).x() + ind = _np.argmin(_np.abs(_np.array(xdata)-posx)) + txt = '{0:s}'.format(cname[ind]) + QToolTip.showText( + graph.mapToGlobal(pos.toPoint()), + txt, graph, graph.geometry(), 500) + + def _update_graph(self, data, plane, value): + if value is None: + return + graph = getattr(self, 'graph_' + plane) + if data.startswith('kick'): + value = _np.asarray(value)*self.URAD2RAD + idx = 2 if data.endswith('acc') else \ + 1 if data.endswith('ref') else 0 + curve = graph.curveAtIndex(idx) + curve.receiveYWaveform(value) + elif data == 'enbl': + value = _np.asarray(value) + offcor = QColor('black') + offbrs, offpen, offsz = mkBrush(offcor), mkPen(offcor), 10 + for cidx in range(3): + curve = graph.curveAtIndex(cidx) + if curve.latest_y is None: + continue + onrgb = (127, 127, 127) if cidx == 0 else \ + (0, 125*(cidx == 1), 255) if plane == 'h' \ + else (255, 125*(cidx == 1), 0) + oncor = QColor(*onrgb) + onbrs, onpen, onsize = mkBrush(oncor), mkPen(oncor), 10 + brss, pens, sizes = [], [], [] + for val in value: + if val: + brss.append(onbrs) + pens.append(onpen) + sizes.append(onsize) + else: + brss.append(offbrs) + pens.append(offpen) + sizes.append(offsz) + curve.opts['symbolBrush'] = brss + curve.opts['symbolPen'] = pens + curve.opts['symbolSize'] = sizes + curve.redrawCurve() + else: + if data == 'energy': + value = self.limh.value if plane == 'h' \ + else self.limv.value + if value is None: + return + psnames = self._csorb.ch_names if plane == 'h' \ + else self._csorb.cv_names + maxlim = [ + self._psconv[psn].conv_current_2_strength(value) + for psn in psnames] + if None in maxlim: + return + maxlim = _np.array(maxlim)*self.URAD2RAD + maxc = graph.curveAtIndex(3) + maxc.receiveYWaveform(maxlim) + minlim = [ + self._psconv[psn].conv_current_2_strength(-value) + for psn in psnames] + if None in minlim: + return + minlim = _np.array(minlim)*self.URAD2RAD + minc = graph.curveAtIndex(4) + minc.receiveYWaveform(minlim) + + def _update_horizontal(self): + for plane in ['h', 'v']: + graph = getattr(self, 'graph_' + plane) + data = self._csorb.ch_pos if plane == 'h' else self._csorb.cv_pos + data = _np.array(data) + for idx in range(5): + curve = graph.curveAtIndex(idx) + curve.receiveXWaveform(data)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_fofb/main.html b/_modules/siriushla/si_ap_fofb/main.html new file mode 100644 index 000000000..34f3dde04 --- /dev/null +++ b/_modules/siriushla/si_ap_fofb/main.html @@ -0,0 +1,693 @@ + + + + + + siriushla.si_ap_fofb.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_ap_fofb.main

+"""High level FOFB main module."""
+
+import time as _time
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QPushButton, QWidget, QGridLayout, QMenu, \
+    QLabel, QVBoxLayout, QGroupBox, QMenuBar, QAction, QHBoxLayout, \
+    QSizePolicy as QSzPlcy, QDockWidget, QTabWidget
+import qtawesome as qta
+
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.fofb.csdev import ETypes as _FOFBEnums
+
+from ..util import connect_window, connect_newprocess
+from ..widgets import SiriusLedAlert, SiriusLabel, SiriusSpinbox, CALabel, \
+    PyDMLogLabel, SiriusMainWindow, PyDMStateButton, SiriusLedState, \
+    SiriusConnectionSignal as _ConnSignal, CAPushButton, SiriusEnumComboBox
+
+from .base import BaseObject, get_fofb_icon
+from .custom_widgets import RefOrbWidget, StatusDialog, BPMSwModeWidget, \
+    ControllersDetailDialog, PSConfigWidget
+from .respmat import RespMatWidget
+from .graphics import KickWidget
+
+
+
+[docs] +class MainWindow(BaseObject, SiriusMainWindow): + """FOFB Main Window.""" + + def __init__(self, parent=None, prefix='', device=''): + BaseObject.__init__(self, device, prefix=prefix) + SiriusMainWindow.__init__(self, parent) + self.setWindowTitle('SI - FOFB') + self.setObjectName('SIApp') + self.setWindowIcon(get_fofb_icon()) + self._enblrule = ( + '[{"name": "EnblRule", "property": "Enable", ' + + '"expression": "not ch[0]", "channels": [{"channel": "' + + self.devpref.substitute(propty='LoopState-Sts') + + '", "trigger": true}]}]') + self._setupUi() + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + # layout + self.log = self._setupLogWidget() + + self.kicks_view = KickWidget(self, self.device, self.prefix) + + self.control = self._setupControlWidget() + + self.setDocumentMode(False) + self.setDockNestingEnabled(True) + self.addDockWidget(Qt.LeftDockWidgetArea, self.log) + self.setCentralWidget(self.kicks_view) + self.addDockWidget(Qt.RightDockWidgetArea, self.control) + + # menu + menubar = QMenuBar(self) + self.setMenuBar(menubar) + + menuopen = QMenu('Open', menubar) + actions = ( + ('&FOFB Control', 'FOFB Control', '', True, self.control), + ('FOFB &Log', 'FOFB Log', '', True, self.log), + ) + for name, tool, short, check, doc in actions: + action = QAction(name, self) + action.setToolTip(tool) + action.setShortcut(short) + action.setCheckable(check) + action.setChecked(check) + action.setEnabled(True) + action.setVisible(True) + action.toggled.connect(doc.setVisible) + doc.visibilityChanged.connect(action.setChecked) + menuopen.addAction(action) + menubar.addAction(menuopen.menuAction()) + + acq2cmd = { + 'SYSID': 'sirius-hla-si-bs-fofbsysid.py', + 'LAMP': 'sirius-hla-si-ps-fastcorracq.py', + } + for acq, cmd in acq2cmd.items(): + acq_menu = menubar.addMenu(acq+' Acq.') + acq_menu.setObjectName('SIApp') + for i in range(1, 21): + txt = f'SI-{i:02}' + dev = f'IA-{i:02}RaBPM:BS-FOFBCtrl' + act = QAction(txt, acq_menu) + connect_newprocess(act, [cmd, dev]) + acq_menu.addAction(act) + + def _setupStatusWidget(self): + # correctors + lbl_corr = QLabel( + 'Correctors: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + + led_corr = SiriusLedAlert( + self, self.devpref.substitute(propty='CorrStatus-Mon')) + sts_corr = QPushButton('', self) + sts_corr.setIcon(qta.icon('fa5s.list-ul')) + sts_corr.setToolTip('Open Detailed Status View') + sts_corr.setObjectName('sts') + sts_corr.setStyleSheet( + '#sts{min-width:25px; max-width:25px; icon-size:20px;}') + pvname = self.devpref.substitute(propty='CorrStatus-Mon') + labels = _FOFBEnums.STS_LBLS_CORR + cmds = [None]*len(labels) + connect_window( + sts_corr, StatusDialog, parent=self, pvname=pvname, labels=labels, + cmds=cmds, title='Corrector Status') + + cnf_corr = PyDMPushButton( + self, pressValue=1, + init_channel=self.devpref.substitute(propty='CorrConfig-Cmd')) + cnf_corr.setToolTip('Send OpMode, AccFreeze, Coefficients and Gains') + cnf_corr.setIcon(qta.icon('fa5s.sync')) + cnf_corr.setObjectName('conf') + cnf_corr.setStyleSheet( + '#conf{min-width:25px; max-width:25px; icon-size:20px;}') + + # controllers + lbl_ctrl = QLabel( + 'Controllers: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + + led_ctrl = SiriusLedAlert( + self, self.devpref.substitute(propty='CtrlrStatus-Mon')) + sts_ctrl = QPushButton('', self) + sts_ctrl.setIcon(qta.icon('fa5s.list-ul')) + sts_ctrl.setToolTip('Open Detailed Status View') + sts_ctrl.setObjectName('sts') + sts_ctrl.setStyleSheet( + '#sts{min-width:25px; max-width:25px; icon-size:20px;}') + pvname = self.devpref.substitute(propty='CtrlrStatus-Mon') + labels = _FOFBEnums.STS_LBLS_FOFBCTRL + cmds = [None]*len(labels) + cmds[1] = self.devpref.substitute(propty='CtrlrConfBPMId-Cmd') + sofbpvname = _PVName('SI-Glob:AP-SOFB').substitute(prefix=self.prefix) + cmds[2] = sofbpvname.substitute(propty='SyncBPMs-Cmd') + cmds[4] = self.devpref.substitute(propty='CtrlrSyncRefOrb-Cmd') + cmds[5] = self.devpref.substitute(propty='CtrlrSyncTFrameLen-Cmd') + cmds[6] = self.devpref.substitute(propty='CtrlrConfBPMLogTrg-Cmd') + cmds[7] = self.devpref.substitute(propty='CtrlrSyncMaxOrbDist-Cmd') + cmds[8] = self.devpref.substitute( + propty='CtrlrSyncPacketLossDetec-Cmd') + cmds[9] = self.devpref.substitute(propty='CtrlrReset-Cmd') + cmds[10] = self.devpref.substitute(propty='CtrlrDsblSYSIDExc-Cmd') + dtl_ctrl = QPushButton('Details') + dtl_ctrl.setDefault(False) + dtl_ctrl.setAutoDefault(False) + dtl_ctrl.setIcon(qta.icon('fa5s.ellipsis-h')) + dtl_ctrl.setToolTip('Open Controllers Details') + dtl_ctrl.setObjectName('sts') + dtl_ctrl.setStyleSheet('#sts{icon-size:20px;}') + connect_window( + dtl_ctrl, ControllersDetailDialog, parent=self, + device=self.device, prefix=self.prefix) + connect_window( + sts_ctrl, StatusDialog, parent=self, pvname=pvname, labels=labels, + cmds=cmds, title='FOFB Controller Status', detail_button=dtl_ctrl) + + cnf_ctrl = PyDMPushButton( + self, pressValue=1, + init_channel=self.devpref.substitute(propty='CtrlrReset-Cmd')) + cnf_ctrl.setToolTip('Send Reset command to controllers') + cnf_ctrl.setIcon(qta.icon('fa5s.sync')) + cnf_ctrl.setObjectName('conf') + cnf_ctrl.setStyleSheet( + '#conf{min-width:25px; max-width:25px; icon-size:20px;}') + + wid = QGroupBox('Status') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignCenter) + lay.addWidget(lbl_corr, 0, 0) + lay.addWidget(led_corr, 0, 1) + lay.addWidget(sts_corr, 0, 2) + lay.addWidget(cnf_corr, 0, 3) + lay.addWidget(lbl_ctrl, 1, 0) + lay.addWidget(led_ctrl, 1, 1) + lay.addWidget(sts_ctrl, 1, 2) + lay.addWidget(cnf_ctrl, 1, 3) + return wid + + def _setupRefOrbWidget(self): + widget = RefOrbWidget(self, self.device, self.prefix) + + wid = QGroupBox('Ref.Orb.') + lay = QVBoxLayout(wid) + lay.addWidget(widget) + return wid + + def _setupLoopWidget(self): + ld_enbl = QLabel( + 'Enable: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + sb_enbl = PyDMStateButton( + self, self.devpref.substitute(propty='LoopState-Sel')) + lb_enbl = SiriusLedState( + self, self.devpref.substitute(propty='LoopState-Sts')) + + ld_gain_h = QLabel( + 'Gain H: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + sb_gain_h = SiriusSpinbox( + self, self.devpref.substitute(propty='LoopGainH-SP')) + lb_gain_h = SiriusLabel( + self, self.devpref.substitute(propty='LoopGainH-RB')) + lb_gain_mon_h = SiriusLabel( + self, self.devpref.substitute(propty='LoopGainH-Mon')) + + ld_gain_v = QLabel( + 'Gain V: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + sb_gain_v = SiriusSpinbox( + self, self.devpref.substitute(propty='LoopGainV-SP')) + lb_gain_v = SiriusLabel( + self, self.devpref.substitute(propty='LoopGainV-RB')) + lb_gain_mon_v = SiriusLabel( + self, self.devpref.substitute(propty='LoopGainV-Mon')) + + wid = QGroupBox('Loop') + lay = QGridLayout(wid) + lay.addWidget(QLabel('<h4>SP</h4>'), 0, 1, alignment=Qt.AlignCenter) + lay.addWidget(QLabel('<h4>RB</h4>'), 0, 2, alignment=Qt.AlignCenter) + lay.addWidget(QLabel('<h4>Mon</h4>'), 0, 3, alignment=Qt.AlignCenter) + lay.addWidget(ld_enbl, 1, 0) + lay.addWidget(sb_enbl, 1, 1) + lay.addWidget(lb_enbl, 1, 2) + lay.addWidget(ld_gain_h, 2, 0) + lay.addWidget(sb_gain_h, 2, 1) + lay.addWidget(lb_gain_h, 2, 2) + lay.addWidget(lb_gain_mon_h, 2, 3) + lay.addWidget(ld_gain_v, 3, 0) + lay.addWidget(sb_gain_v, 3, 1) + lay.addWidget(lb_gain_v, 3, 2) + lay.addWidget(lb_gain_mon_v, 3, 3) + return wid + + def _setupAuxCommWidget(self): + ld_orbdist = QLabel( + 'Orbit Dist. Detec.: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + sb_orbdist = PyDMStateButton( + self, self.devpref.substitute( + propty='LoopMaxOrbDistortionEnbl-Sel')) + lb_orbdist = SiriusLedState( + self, self.devpref.substitute( + propty='LoopMaxOrbDistortionEnbl-Sts')) + + self.ch_currzero = _ConnSignal( + self.devpref.substitute(propty='CorrSetCurrZero-Cmd')) + self.ch_clearacc = _ConnSignal( + self.devpref.substitute(propty='CorrSetAccClear-Cmd')) + btn_zero = CAPushButton('Reset Correctors current and Acc', self) + btn_zero.setDefault(False) + btn_zero.setAutoDefault(False) + btn_zero.rules = self._enblrule + btn_zero.clicked.connect(self._handle_reset_correctors) + + wid = QGroupBox('Aux. Commands') + lay = QGridLayout(wid) + lay.addWidget(btn_zero, 0, 0, 1, 3) + lay.addWidget(ld_orbdist, 1, 0) + lay.addWidget(sb_orbdist, 1, 1) + lay.addWidget(lb_orbdist, 1, 2) + lay.setColumnStretch(0, 2) + lay.setColumnStretch(1, 1) + lay.setColumnStretch(2, 1) + return wid + + def _setupDetailsWidget(self): + group2cmd = { + 'Correctors': { + 'Set all current to zero': 'CorrSetCurrZero-Cmd', + 'Clear all Acc': 'CorrSetAccClear-Cmd', + 'Set all PwrState to On': 'CorrSetPwrStateOn-Cmd', + 'Set all PwrState to Off': 'CorrSetPwrStateOff-Cmd', + 'Set all OpMode to Manual': 'CorrSetOpModeManual-Cmd', + 'Set all AccFreeze to Enbl': 'CorrSetAccFreezeEnbl-Cmd', + 'Set all AccFreeze to Dsbl': 'CorrSetAccFreezeDsbl-Cmd', + }, + 'Controllers': { + 'Sync Net': 'CtrlrSyncNet-Cmd', + 'Sync RefOrb': 'CtrlrSyncRefOrb-Cmd', + }, + 'BPMs': { + 'Configure BPM Log.Trigs.': 'CtrlrConfBPMLogTrg-Cmd', + }, + } + wid = QWidget() + lay = QVBoxLayout(wid) + lay.setContentsMargins(0, 0, 0, 0) + for group, commands in group2cmd.items(): + gbox = QGroupBox(group) + glay = QVBoxLayout(gbox) + + if 'Corr' in group: + glay2 = QGridLayout() + glay2.setContentsMargins(0, 0, 0, 0) + + for row, dev in enumerate(['CH', 'CV']): + lbl = QLabel( + dev+' Sat. Limit [A]: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + pref = self.devpref + spw = SiriusSpinbox( + self, pref.substitute(propty=dev+'AccSatMax-SP')) + rbw = SiriusLabel( + self, pref.substitute(propty=dev+'AccSatMax-RB')) + glay2.addWidget(lbl, row, 0) + glay2.addWidget(spw, row, 1) + glay2.addWidget(rbw, row, 2) + + lbl = QLabel( + 'Curr. Ramp Down Dur. [s]: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + pref = self.devpref + spw = SiriusSpinbox( + self, pref.substitute(propty='CorrSetCurrZeroDuration-SP')) + rbw = SiriusLabel( + self, pref.substitute(propty='CorrSetCurrZeroDuration-RB')) + glay2.addWidget(lbl, 2, 0) + glay2.addWidget(spw, 2, 1) + glay2.addWidget(rbw, 2, 2) + + lbl = QLabel( + 'Decimation [count]: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + pref = self.devpref + visrule = ( + '[{"name": "VisRule", "property": "Visible", ' + + '"expression": "ch[0] == 2", "channels": ' + + '[{"channel": "' + + pref.substitute(propty='FOFBAccDecimation-Sel') + + '", "trigger": true}]}]') + selw = SiriusEnumComboBox( + self, pref.substitute(propty='FOFBAccDecimation-Sel')) + stsw = SiriusLabel( + self, pref.substitute(propty='FOFBAccDecimation-Sts')) + stsw.rules = visrule.replace('==', '!=') + lbldiv = CALabel(':') + lbldiv.rules = visrule + spw = SiriusSpinbox( + self, pref.substitute(propty='FOFBAccDecimation-SP')) + spw.rules = visrule + spw.setVisible(False) + lblpro = CALabel('(') + lblpro.rules = visrule.replace('==', '!=') + rbw = SiriusLabel( + self, pref.substitute(propty='FOFBAccDecimation-RB')) + rbw.setStyleSheet('min-width: 4em;') + rbw.setAlignment(Qt.AlignCenter) + lblprc = CALabel(')') + lblprc.rules = visrule.replace('==', '!=') + hbox = QHBoxLayout() + hbox.addWidget(selw) + hbox.addWidget(stsw) + hbox.addWidget(lbldiv) + hbox.addWidget(spw) + hbox.addWidget(lblpro) + hbox.addWidget(rbw) + hbox.addWidget(lblprc) + glay2.addWidget(lbl, 3, 0) + glay2.addLayout(hbox, 3, 1, 1, 2) + + ld_psconfig = QLabel( + 'PS Config. Matrix: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + wid_psconfig = PSConfigWidget(self, self.device, prefix=self.prefix) + glay2.addWidget(ld_psconfig, 4, 0) + glay2.addWidget(wid_psconfig, 4, 1, 2, 2) + + glay.addLayout(glay2) + + elif 'Control' in group: + glay2 = QGridLayout() + glay2.setContentsMargins(0, 0, 0, 0) + + pref = self.devpref + lbl = QLabel( + 'TimeFrameLen: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + spw = SiriusSpinbox( + self, pref.substitute(propty='TimeFrameLen-SP')) + rbw = SiriusLabel( + self, pref.substitute(propty='TimeFrameLen-RB')) + glay2.addWidget(lbl, 0, 0) + glay2.addWidget(spw, 0, 1) + glay2.addWidget(rbw, 0, 2) + + lbl = QLabel( + 'Consider EnblList in Sync: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + pvn = pref.substitute(propty='CtrlrSyncUseEnblList-Sel') + sbt = PyDMStateButton(self, pvn) + sbt.rules = self._enblrule + led = SiriusLedState(self, pvn.substitute(propty_suffix='Sts')) + glay2.addWidget(lbl, 1, 0) + glay2.addWidget(sbt, 1, 1) + glay2.addWidget(led, 1, 2) + + lbl = QLabel( + 'Orbit Dist. Thres. [um]: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + spw = SiriusSpinbox( + self, pref.substitute(propty='LoopMaxOrbDistortion-SP')) + rbw = SiriusLabel( + self, pref.substitute(propty='LoopMaxOrbDistortion-RB')) + glay2.addWidget(lbl, 2, 0) + glay2.addWidget(spw, 2, 1) + glay2.addWidget(rbw, 2, 2) + + lbl = QLabel( + 'Enable Orbit Dist. Detec.: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + pvn = pref.substitute(propty='LoopMaxOrbDistortionEnbl-Sel') + sbt = PyDMStateButton(self, pvn) + led = SiriusLedState(self, pvn.substitute(propty_suffix='Sts')) + glay2.addWidget(lbl, 3, 0) + glay2.addWidget(sbt, 3, 1) + glay2.addWidget(led, 3, 2) + + lbl = QLabel( + 'Enable Packet Loss Detec.: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + pvn = pref.substitute(propty='LoopPacketLossDetecEnbl-Sel') + sbt = PyDMStateButton(self, pvn) + led = SiriusLedState(self, pvn.substitute(propty_suffix='Sts')) + glay2.addWidget(lbl, 4, 0) + glay2.addWidget(sbt, 4, 1) + glay2.addWidget(led, 4, 2) + + glay.addLayout(glay2) + elif 'BPM' in group: + swbpm = BPMSwModeWidget(self, self.device, self.prefix) + glay.addWidget(swbpm) + + for desc, cmd in commands.items(): + btn = PyDMPushButton( + self, label=desc, pressValue=1, + init_channel=self.devpref.substitute(propty=cmd)) + btn.setDefault(False) + btn.setAutoDefault(False) + btn.rules = self._enblrule + glay.addWidget(btn) + lay.addWidget(gbox) + return wid + + def _setupControlWidget(self): + self.controltabs = QTabWidget() + self.controltabs.setObjectName('SITab') + + # tab main + self.status = self._setupStatusWidget() + + self.loop = self._setupLoopWidget() + + self.auxcmd = self._setupAuxCommWidget() + + self.reforb = self._setupRefOrbWidget() + + self.respmat = RespMatWidget(self, self.device, self.prefix) + + maintab = QWidget() + lay = QVBoxLayout(maintab) + lay.addWidget(self.status) + lay.addWidget(self.loop) + lay.addWidget(self.auxcmd) + lay.addWidget(self.reforb) + lay.addWidget(self.respmat) + self.controltabs.addTab(maintab, 'Main') + + # tab aux + self.details = self._setupDetailsWidget() + + dettab = QWidget() + lay = QVBoxLayout(dettab) + lay.addWidget(self.details) + self.controltabs.addTab(dettab, 'Details') + + wid = QWidget() + lay = QVBoxLayout(wid) + lay.addWidget(self.controltabs) + + # dock widget + dockwid = QDockWidget(self) + dockwid.setObjectName('SIApp') + dockwid.setWindowTitle('FOFB Control') + sz_pol = QSzPlcy(QSzPlcy.Preferred, QSzPlcy.Preferred) + sz_pol.setVerticalStretch(1) + dockwid.setSizePolicy(sz_pol) + dockwid.setFloating(False) + dockwid.setFeatures(QDockWidget.AllDockWidgetFeatures) + dockwid.setAllowedAreas(Qt.AllDockWidgetAreas) + dockwid.setWidget(wid) + return dockwid + + def _setupLogWidget(self): + loglabel = PyDMLogLabel( + self, init_channel=self.devpref.substitute(propty='Log-Mon')) + loglabel.setObjectName('log') + loglabel.setStyleSheet('#log{min-width: 20em;}') + loglabel.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.MinimumExpanding) + loglabel.setAlternatingRowColors(True) + loglabel.maxCount = 2000 + + bt_clear = QPushButton('Clear Log', self) + bt_clear.clicked.connect(loglabel.clear) + + wid = QWidget() + lay = QVBoxLayout(wid) + lay.addWidget(loglabel) + lay.addWidget(bt_clear, alignment=Qt.AlignCenter) + + dockwid = QDockWidget(self) + dockwid.setObjectName('SIApp') + dockwid.setWindowTitle("FOFB Log") + sz_pol = QSzPlcy(QSzPlcy.Preferred, QSzPlcy.Preferred) + sz_pol.setVerticalStretch(1) + dockwid.setSizePolicy(sz_pol) + dockwid.setFloating(False) + dockwid.setFeatures(QDockWidget.AllDockWidgetFeatures) + dockwid.setAllowedAreas(Qt.AllDockWidgetAreas) + dockwid.setWidget(wid) + return dockwid + + def _handle_reset_correctors(self): + self.ch_clearacc.send_value_signal[float].emit(1) + _time.sleep(0.5) + self.ch_currzero.send_value_signal[float].emit(1)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_fofb/respmat.html b/_modules/siriushla/si_ap_fofb/respmat.html new file mode 100644 index 000000000..9c4ad09ac --- /dev/null +++ b/_modules/siriushla/si_ap_fofb/respmat.html @@ -0,0 +1,413 @@ + + + + + + siriushla.si_ap_fofb.respmat — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_ap_fofb.respmat

+"""RespMat."""
+
+from functools import partial as _part
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QPushButton, QHBoxLayout, QWidget, QGridLayout, \
+    QTabWidget, QAction, QMenu, QGroupBox, QVBoxLayout
+import qtawesome as qta
+
+from pydm.widgets.base import PyDMWidget
+from pydm.widgets import PyDMCheckbox
+
+from siriuspy.clientconfigdb import ConfigDBClient
+
+from ..util import connect_window, connect_newprocess
+from ..widgets.windows import create_window_from_widget
+from ..widgets import SiriusConnectionSignal as _ConnSignal, \
+    SiriusLedState, SiriusEnumComboBox, SiriusLabel, \
+    SelectionMatrixWidget as SelectionWidget
+
+from ..as_ap_sofb.ioc_control.respmat import RespMatWidget as _RespMatWidget
+from ..as_ap_sofb.ioc_control.respmat_enbllist import \
+    SingleSelMatrix as _SingleSelMatrix
+
+from .base import BaseObject, BaseWidget, get_fofb_icon
+from .graphics import CorrGainWidget
+
+
+
+[docs] +class RespMatWidget(_RespMatWidget, BaseWidget): + """FOFB RespMat widget.""" + + def __init__(self, parent, device, prefix=''): + BaseWidget.__init__(self, parent, device, prefix=prefix) + self.setWindowTitle('SI - FOFB') + self._enblrule = ( + '[{"name": "EnblRule", "property": "Enable", ' + + '"expression": "not ch[0]", "channels": [{"channel": "' + + self.devpref.substitute(propty='LoopState-Sts') + + '", "trigger": true}]}]') + self.setupui() + self.layout().setContentsMargins(0, 0, 0, 0) + self._config_type = 'si_fastorbcorr_respm' + self._client = ConfigDBClient(config_type=self._config_type) + self.EXT = self._csorb.respmat_fname.split('.')[1] + self.EXT_FLT = 'RespMat Files (*.{})'.format(self.EXT) + self.last_dir = self.DEFAULT_DIR + + self._respmat_sp = _ConnSignal( + self.devpref.substitute(propty='RespMat-SP')) + self._respmat_rb = _ConnSignal( + self.devpref.substitute(propty='RespMat-RB')) + +
+[docs] + def get_main_widget(self, parent): + main_wid = QWidget(parent) + main_lay = QVBoxLayout(main_wid) + + sel_gp = QGroupBox('Sel.') + sel_gp.setLayout(QHBoxLayout()) + sel_gp.layout().setContentsMargins(0, 0, 0, 0) + sel_wid = self.get_selection_lists_widget(sel_gp) + sel_gp.layout().addWidget(sel_wid) + main_lay.addWidget(sel_gp) + + norm_gp = QGroupBox('Norm.Mode') + pdm_cbb = SiriusEnumComboBox( + self, self.devpref.substitute(propty='InvRespMatNormMode-Sel')) + pdm_cbb.rules = self._enblrule + pdm_lbl = SiriusLabel( + self, self.devpref.substitute(propty='InvRespMatNormMode-Sts')) + nlay = QHBoxLayout(norm_gp) + nlay.setAlignment(Qt.AlignCenter) + nlay.addWidget(pdm_cbb) + nlay.addWidget(pdm_lbl) + main_lay.addWidget(norm_gp) + + svld_gp = QGroupBox('Load and Save') + svld_gp.setLayout(QHBoxLayout()) + svld_gp.layout().setContentsMargins(0, 0, 0, 0) + svld_wid = self.get_saveload_widget(svld_gp) + svld_gp.layout().addWidget(svld_wid) + main_lay.addWidget(svld_gp) + + return main_wid
+ + +
+[docs] + def get_selection_lists_widget(self, parent): + """Selection lists.""" + sel_wid = QWidget(parent) + sel_lay = QGridLayout(sel_wid) + sel_lay.setVerticalSpacing(15) + + icon = get_fofb_icon() + window = create_window_from_widget( + SelectionMatrix, + title=self.acc + ' - FOFB - Corrs and BPMs selection', + icon=icon) + btn = QPushButton('', sel_wid) + btn.setObjectName('btn') + btn.setIcon(qta.icon('fa5s.tasks')) + btn.setToolTip('Open window to select BPMs and correctors') + btn.setStyleSheet( + '#btn{min-width:3.8em; max-width:3.8em;\ + min-height:2em; max-height:2em; icon-size:25px;}') + connect_window( + btn, window, None, device=self.device, prefix=self.prefix, + rules=self._enblrule) + sel_lay.addWidget(btn, 0, 0) + + pdm_chbx = PyDMCheckbox( + sel_wid, self.devpref.substitute(propty='UseRF-Sel')) + pdm_chbx.rules = self._enblrule + pdm_chbx.setText('use RF') + pdm_led = SiriusLedState( + sel_wid, self.devpref.substitute(propty='UseRF-Sts')) + hlay = QHBoxLayout() + hlay.addStretch() + hlay.addWidget(pdm_chbx) + hlay.addWidget(pdm_led) + hlay.addStretch() + sel_lay.addLayout(hlay, 0, 1) + + btn = QPushButton('', sel_wid) + btn.setToolTip('Visualize Response Matrices') + btn.setIcon(qta.icon('mdi.chart-line')) + btn.setObjectName('btn') + btn.setStyleSheet('#btn{max-width:40px; icon-size:40px;}') + btnmenu = QMenu(btn) + cmd = ['sirius-hla-si-ap-fofb.py', '--matrix', '--matrixproperty'] + act_respm = QAction('RespMat - Physiscs Units', self) + connect_newprocess(act_respm, cmd + ['RespMat-Mon', ]) + btnmenu.addAction(act_respm) + act_invrespm = QAction('InvRespMat - Physiscs Units', self) + connect_newprocess(act_invrespm, cmd + ['InvRespMat-Mon', ]) + btnmenu.addAction(act_invrespm) + act_respmhw = QAction('RespMat - Hardware Units', self) + connect_newprocess(act_respmhw, cmd + ['RespMatHw-Mon', ]) + btnmenu.addAction(act_respmhw) + act_invrespmhw = QAction('InvRespMat - Hardware Units', self) + connect_newprocess(act_invrespmhw, cmd + ['InvRespMatHw-Mon', ]) + btnmenu.addAction(act_invrespmhw) + act_coeffs = QAction('Corrector Coefficients', self) + connect_newprocess(act_coeffs, cmd + ['CorrCoeffs-Mon', ]) + btnmenu.addAction(act_coeffs) + act_gains = QAction('Corrector Gains', self) + window = create_window_from_widget( + CorrGainWidget, title='Corrector Gains', icon=icon) + connect_window( + act_gains, window, None, device=self.device, prefix=self.prefix) + btnmenu.addAction(act_gains) + btn.setMenu(btnmenu) + sel_lay.addWidget(btn, 0, 2) + + return sel_wid
+
+ + + +
+[docs] +class SingleSelMatrix(_SingleSelMatrix, BaseObject): + """Create the Selection Matrices for BPMs and Correctors.""" + + def __init__(self, parent, dev, device, prefix='', rules=None): + """Initialize the matrix data of the specified dev.""" + + # initialize BaseObject + BaseObject.__init__(self, device, prefix=prefix) + self.dev = dev + self.devpos = { + 'BPMX': self._csorb.bpm_pos, + 'BPMY': self._csorb.bpm_pos, + 'CH': self._csorb.ch_pos, + 'CV': self._csorb.cv_pos} + self.devotpl = { + 'BPMX': 'BPMY', 'BPMY': 'BPMX', 'CH': 'CV', 'CV': 'CH'} + self.devnames = { + 'BPMX': (self._csorb.bpm_names, self._csorb.bpm_nicknames), + 'BPMY': (self._csorb.bpm_names, self._csorb.bpm_nicknames), + 'CH': (self._csorb.ch_names, self._csorb.ch_nicknames), + 'CV': (self._csorb.cv_names, self._csorb.cv_nicknames)} + + # initialize SelectionWidget + SelectionWidget.__init__( + self, parent=parent, title=dev + "List", + has_bothplanes=True, rules=rules) + + # initialize PyDMWidget + init_channel = self.devpref.substitute(propty=self.dev+'EnblList-RB') + PyDMWidget.__init__(self, init_channel=init_channel) + + self.pv_sp = _ConnSignal(init_channel.replace('-RB', '-SP')) + self.pv_otpl = _ConnSignal(self.devpref.substitute( + propty=self.devotpl[self.dev]+'EnblList-SP')) + + # connect signals and slots + self.applyChangesClicked.connect(self.send_value) + self.applyBothPlanesClicked.connect(_part(self.send_value, other=True)) + +
+[docs] + def get_headers(self): + _, nicks = self.devnames[self.dev] + top_headers = sorted({nick[2:] for nick in nicks}) + top_headers = top_headers[-2:] + top_headers[:-2] + side_headers = sorted({nick[:2] for nick in nicks}) + side_headers.append(side_headers[0]) + return top_headers, side_headers
+ + +
+[docs] + def get_positions(self): + top_headers, side_headers = self.headers + positions = list() + for idx in range(len(self.devnames[self.dev][0])): + _, nicks = self.devnames[self.dev] + rsize, hsize, i = len(nicks), len(side_headers), 0 + j = top_headers.index(nicks[idx][2:]) + if not (idx+1) % rsize: + i += hsize-1 + else: + i += ((idx % rsize) + 1) // len(top_headers) + positions.append((i, j)) + return positions
+
+ + + +
+[docs] +class SelectionMatrix(BaseWidget): + + def __init__(self, parent, device, prefix='', rules=None): + super().__init__(parent, device, prefix=prefix) + tab = QTabWidget(self) + tab.setObjectName('SITab') + hbl = QHBoxLayout(self) + hbl.addWidget(tab) + hbl.setContentsMargins(0, 0, 0, 0) + + for dev in ('BPMX', 'BPMY', 'CH', 'CV'): + wid = SingleSelMatrix( + tab, dev, self.device, prefix=self.prefix, rules=rules) + tab.addTab(wid, dev)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_fofb/trig_acq_config.html b/_modules/siriushla/si_ap_fofb/trig_acq_config.html new file mode 100644 index 000000000..5c9509251 --- /dev/null +++ b/_modules/siriushla/si_ap_fofb/trig_acq_config.html @@ -0,0 +1,520 @@ + + + + + + siriushla.si_ap_fofb.trig_acq_config — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_ap_fofb.trig_acq_config

+"""System identification module."""
+
+from functools import partial as _part
+
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QWidget, QGridLayout, QLabel, \
+    QGroupBox, QCheckBox, QSizePolicy as QSzPlcy, QVBoxLayout, \
+    QHBoxLayout, QTabWidget
+
+from pydm.widgets import PyDMLineEdit
+
+from siriuspy.namesys import SiriusPVName as _PVName, join_name
+
+from ..util import get_appropriate_color
+from ..widgets import SiriusLabel, PyDMStateButton, \
+    SiriusLedState, SiriusWaveformPlot
+from ..common.afc_acq_core.trig_acq_config import AcqBaseWindow
+from .base import get_fofb_icon
+
+
+
+[docs] +class FOFBAcqBaseWindow(AcqBaseWindow): + """FOFB acquisition base window""" + + CONV_IDX2BPM = { + 0: 'M1', + 1: 'M2', + 2: 'C1-1', + 3: 'C1-2', + 4: 'C2', + 5: 'C3-1', + 6: 'C3-2', + 7: 'C4', + } + + def __init__(self, parent=None, prefix='', device=''): + super().__init__(parent=parent, prefix=prefix, device=device) + self.corrs = [ + join_name( + sec='SI', sub=self.device.sub[:2]+sub, + dis='PS', dev='FC'+plane) + for sub in ['M1', 'M2', 'C2', 'C3'] for plane in ['H', 'V']] + self.setWindowTitle('SI - FOFB Acquisitions - ' + self.ACQCORE) + self.setWindowIcon(get_fofb_icon(color=self.app_color)) + self._setupUi() + + def _setupUi(self): + raise NotImplementedError
+ + + +
+[docs] +class FOFBAcqSYSIDWindow(FOFBAcqBaseWindow): + """FOFB system identification acquisition window.""" + + ACQCORE = 'SYSID' + + def _setupUi(self): + self.title = QLabel( + '<h2>'+self.device.substitute(propty_name='SYSID') + + ' Acquisitions < /h2 >', alignment=Qt.AlignCenter) + self.title.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + + self.wid_basic = self._basicSettingsWidget() + self.wid_prbs = self._PRBSSettingsWidget() + self.wid_trig = self._triggersWidget() + self.wid_graph = self._graphsWidget() + + wid = QWidget() + lay = QGridLayout(wid) + lay.addWidget(self.title, 0, 0, 1, 2) + lay.addWidget(self.wid_graph, 1, 0, 3, 1) + lay.addWidget(self.wid_basic, 1, 1) + lay.addWidget(self.wid_prbs, 2, 1) + lay.addWidget(self.wid_trig, 3, 1) + lay.setColumnStretch(0, 3) + lay.setColumnStretch(1, 1) + lay.setRowStretch(0, 3) + lay.setRowStretch(1, 3) + lay.setRowStretch(2, 1) + self.setCentralWidget(wid) + + def _PRBSSettingsWidget(self): + tabs = QTabWidget() + tabs.setObjectName(self.sec+'Tab') + tabs.addTab(self._PRBSGeneralSettingsWidget(), 'General') + tabs.addTab(self._PRBSFOFBAccSettingsWidget(), 'FOFBAcc Levels') + tabs.addTab(self._PRBSBPMsSettingsWidget(), 'BPM Levels') + + wid = QGroupBox('PRBS Settings', self) + lay = QHBoxLayout(wid) + lay.setContentsMargins(0, 9, 0, 9) + lay.addWidget(tabs) + return wid + + def _PRBSGeneralSettingsWidget(self): + ld_syncenb = QLabel('Sync Enable', self) + self.sb_syncenb = PyDMStateButton( + self, self._get_pvname('PRBSSyncEn-Sel')) + self.led_syncenb = SiriusLedState( + self, self._get_pvname('PRBSSyncEn-Sts')) + + ld_stepdur = QLabel('Step Duration', self) + self.sb_stepdur = PyDMLineEdit( + self, self._get_pvname('PRBSStepDuration-SP')) + self.lb_stepdur = SiriusLabel( + self, self._get_pvname('PRBSStepDuration-RB')) + + ld_lfsrlen = QLabel('LFSR Length', self) + self.sb_lfsrlen = PyDMLineEdit( + self, self._get_pvname('PRBSLFSRLength-SP')) + self.lb_lfsrlen = SiriusLabel( + self, self._get_pvname('PRBSLFSRLength-RB')) + + ld_movavgtap = QLabel('FOFBAcc. Mov. Avg. Taps', self) + self.sb_movavgtap = PyDMLineEdit( + self, self._get_pvname('PRBSFOFBAccMovAvgTaps-SP')) + self.lb_movavgtap = SiriusLabel( + self, self._get_pvname('PRBSFOFBAccMovAvgTaps-RB')) + + ld_correnb = QLabel('Enable Corrs.', self) + self.sb_correnb = PyDMStateButton( + self, self._get_pvname('PRBSFOFBAccEn-Sel')) + self.led_correnb = SiriusLedState( + self, self._get_pvname('PRBSFOFBAccEn-Sts')) + + ld_bpmenbl = QLabel('Enable BPMs', self) + self.sb_bpmenbl = PyDMStateButton( + self, self._get_pvname('PRBSBPMPosEn-Sel')) + self.led_bpmenbl = SiriusLedState( + self, self._get_pvname('PRBSBPMPosEn-Sts')) + + wid = QWidget(self) + lay = QGridLayout(wid) + lay.addWidget(ld_syncenb, 0, 0) + lay.addWidget(self.sb_syncenb, 0, 1) + lay.addWidget(self.led_syncenb, 0, 2, alignment=Qt.AlignLeft) + lay.addWidget(ld_stepdur, 1, 0) + lay.addWidget(self.sb_stepdur, 1, 1) + lay.addWidget(self.lb_stepdur, 1, 2) + lay.addWidget(ld_lfsrlen, 2, 0) + lay.addWidget(self.sb_lfsrlen, 2, 1) + lay.addWidget(self.lb_lfsrlen, 2, 2) + lay.addWidget(ld_movavgtap, 3, 0) + lay.addWidget(self.sb_movavgtap, 3, 1) + lay.addWidget(self.lb_movavgtap, 3, 2) + lay.addWidget(ld_correnb, 4, 0) + lay.addWidget(self.sb_correnb, 4, 1) + lay.addWidget(self.led_correnb, 4, 2, alignment=Qt.AlignLeft) + lay.addWidget(ld_bpmenbl, 5, 0) + lay.addWidget(self.sb_bpmenbl, 5, 1) + lay.addWidget(self.led_bpmenbl, 5, 2, alignment=Qt.AlignLeft) + return wid + + def _PRBSFOFBAccSettingsWidget(self): + wid = QWidget() + lay = QGridLayout(wid) + + for ridx, sub in enumerate(['M1', 'M2', 'C2', 'C3']): + row = ridx + 1 + + # row header + lblr = QLabel( + '<h4>'+sub+'</h4>', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + lblr.setObjectName('rowhead') + lay.addWidget(lblr, row, 0) + + for cidx, plan in enumerate(['H', 'V']): + col = cidx + 1 + if ridx == 0: + # column header + lblp = QLabel( + '<h4>FC'+plan+'</h4>', self, alignment=Qt.AlignCenter) + lbl0 = QLabel( + '<h4>Level 0</h4>', self, alignment=Qt.AlignCenter) + lbl1 = QLabel( + '<h4>Level 1</h4>', self, alignment=Qt.AlignCenter) + gridhead = QGridLayout() + gridhead.setContentsMargins(0, 0, 0, 0) + gridhead.addWidget(lblp, 0, 0, 1, 2) + gridhead.addWidget(lbl0, 1, 0) + gridhead.addWidget(lbl1, 1, 1) + lay.addLayout(gridhead, 0, col) + + # levels grid + gridlvls = QGridLayout() + gridlvls.setContentsMargins(6, 0, 6, 0) + gridlvls.setHorizontalSpacing(12) + gridlvls.setVerticalSpacing(6) + for lvl in range(2): + pvsp = join_name( + sec='SI', sub=self.device.sub[:2]+sub, + dis='PS', dev='FC'+plan, + propty_name=f'SYSIDPRBSFOFBAccLvl{lvl}', + propty_suffix='SP') + wsp = PyDMLineEdit(self, pvsp) + pvrb = pvsp.substitute(propty_suffix='RB') + wrb = SiriusLabel(self, pvrb) + gridlvls.addWidget(wsp, 0, lvl) + gridlvls.addWidget(wrb, 1, lvl) + lay.addLayout(gridlvls, row, col) + + wid.setStyleSheet( + 'QLineEdit{max-width: 5em;}' + '#rowhead{max-width:3.5em;}') + + return wid + + def _PRBSBPMsSettingsWidget(self): + graph = SiriusWaveformPlot() + graph.setObjectName('graph') + graph.setStyleSheet('#graph {min-height: 15em; min-width: 25em;}') + graph.maxRedrawRate = 2 + graph.mouseEnabledX = True + graph.setShowXGrid(True) + graph.setShowYGrid(True) + graph.setBackgroundColor(QColor(255, 255, 255)) + graph.setShowLegend(True) + graph.setAutoRangeX(True) + graph.setAutoRangeY(True) + graph.setAxisColor(QColor(0, 0, 0)) + graph.plotItem.getAxis('bottom').setStyle(tickTextOffset=15) + graph.plotItem.getAxis('left').setStyle(tickTextOffset=5) + + for plidx, plan in enumerate(['X', 'Y']): + for lvl in range(2): + for pvidx, suf in enumerate(['SP', 'RB']): + pvn = self._get_pvname(f'PRBSBPMPos{plan}Lvl{lvl}-{suf}') + color = self.DEFAULT_COLORS[pvidx + 2*lvl + 4*plidx] + opts = dict( + y_channel=pvn, + name=f'{plan} - Level {lvl} ({suf})', + color=color, + redraw_mode=2, + lineStyle=1, + lineWidth=1, + symbol=None, + symbolSize=None) + graph.addChannel(**opts) + return graph + + def _graphsWidget(self): + # PRBSData + gp_prbs = self._create_graph( + 'PRBS', {self._get_pvname('PRBSData'): 'PRBS'}) + + # TimeFrameData + gp_tframe = self._create_graph( + 'TimeFrame', {self._get_pvname('TimeFrameData'): 'TimeFrame'}) + + # PosXData + gp_posx = self._create_graph( + 'Pos X [nm]', + {self._get_pvname(f'BPM{i}PosXData'): self.CONV_IDX2BPM[i] + for i in range(8)}, add_scale=1e-9) + + # PosYData + gp_posy = self._create_graph( + 'Pos Y [nm]', + {self._get_pvname(f'BPM{i}PosYData'): self.CONV_IDX2BPM[i] + for i in range(8)}, add_scale=1e-9) + + # FOFBAccData + gp_fofbacc = self._create_graph( + 'FOFBAcc [A]', + {c.substitute(propty_name='SYSIDFOFBAccData'): + c.sub[2:]+'-'+c.dev[-1] for c in self.corrs}) + + cb_linkxaxis = QCheckBox('Link X axis', self) + cb_linkxaxis.stateChanged.connect(_part( + self._handle_graph_xaxis_link, gp_prbs, + [gp_tframe, gp_posx, gp_posy, gp_fofbacc])) + cb_linkxaxis.setChecked(True) + + wid = QWidget() + lay = QVBoxLayout(wid) + lay.addWidget(gp_prbs) + lay.addWidget(gp_tframe) + lay.addWidget(gp_posx) + lay.addWidget(gp_posy) + lay.addWidget(gp_fofbacc) + lay.addWidget(cb_linkxaxis, alignment=Qt.AlignLeft) + return wid
+ + + +
+[docs] +class FOFBAcqLAMPWindow(FOFBAcqBaseWindow): + """FOFB lamp acquisition window.""" + + ACQCORE = 'LAMP' + + def _setupUi(self): + self.title = QLabel( + '<h2>'+self.device.substitute(propty_name='LAMP') + + ' Acquisitions < /h2 >', alignment=Qt.AlignCenter) + self.title.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + + self.wid_basic = self._basicSettingsWidget() + self.wid_trig = self._triggersWidget() + self.tab_graphs = QTabWidget(self) + self.tab_graphs.setObjectName(self.sec+'Tab') + self.wid_graphphy = self._graphsWidget(is_raw=False) + self.tab_graphs.addTab(self.wid_graphphy, 'Conv. Data') + self.wid_graphraw = self._graphsWidget(is_raw=True) + self.tab_graphs.addTab(self.wid_graphraw, 'Raw Data') + self.tab_graphs.setCurrentIndex(0) + + wid = QWidget() + lay = QGridLayout(wid) + lay.addWidget(self.title, 0, 0, 1, 2) + lay.addWidget(self.tab_graphs, 1, 0, 2, 1) + lay.addWidget(self.wid_basic, 1, 1) + lay.addWidget(self.wid_trig, 2, 1) + lay.setColumnStretch(0, 3) + lay.setColumnStretch(1, 1) + lay.setRowStretch(0, 3) + lay.setRowStretch(1, 1) + self.setCentralWidget(wid) + + def _graphsWidget(self, is_raw): + pvname = 'LAMP{}' + ('Raw' if is_raw else '') + 'Data' + # Current + gp_curr = self._create_graph( + 'Current' + ('' if is_raw else ' [A]'), + {c.substitute(propty_name=pvname.format('Current')): + c.sub[2:]+'-'+c.dev[-1] for c in self.corrs}) + + # CurrentRef + gp_currref = self._create_graph( + 'CurrentRef' + ('' if is_raw else ' [A]'), + {c.substitute(propty_name=pvname.format('CurrentRef')): + c.sub[2:]+'-'+c.dev[-1] for c in self.corrs}) + + # Voltage + gp_volt = self._create_graph( + 'Voltage' + ('' if is_raw else ' [V]'), + {c.substitute(propty_name=pvname.format('Voltage')): + c.sub[2:]+'-'+c.dev[-1] for c in self.corrs}) + + cb_linkxaxis = QCheckBox('Link X axis', self) + cb_linkxaxis.stateChanged.connect(_part( + self._handle_graph_xaxis_link, gp_curr, [gp_currref, gp_volt, ])) + cb_linkxaxis.setChecked(True) + + wid = QWidget() + lay = QVBoxLayout(wid) + lay.addWidget(gp_curr) + lay.addWidget(gp_currref) + lay.addWidget(gp_volt) + lay.addWidget(cb_linkxaxis, alignment=Qt.AlignLeft) + return wid
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_genstatus/main.html b/_modules/siriushla/si_ap_genstatus/main.html new file mode 100644 index 000000000..e28735d3e --- /dev/null +++ b/_modules/siriushla/si_ap_genstatus/main.html @@ -0,0 +1,601 @@ + + + + + + siriushla.si_ap_genstatus.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_ap_genstatus.main

+"""Sirius General Status Window."""
+
+import numpy as _np
+
+from qtpy.QtCore import Qt, Slot, QEvent
+from qtpy.QtWidgets import QWidget, QGridLayout, QLabel, \
+    QVBoxLayout, QGroupBox, QHBoxLayout, QApplication
+from qtpy.QtGui import QColor, QFont, QBrush, QGradient
+
+import qtawesome as qta
+
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.search import PSSearch as _PSSearch, \
+    HLTimeSearch as _HLTimeSearch
+from siriuspy.clientarch.time import Time
+from siriuspy.csdev import Const as _Const
+from siriuspy.injctrl.csdev import Const as _InjConst
+from siriuspy.pwrsupply.csdev import Const as _PSConst
+
+from ..util import get_appropriate_color
+from ..widgets import SiriusMainWindow, SiriusTimePlot, SiriusFrame, \
+    SiriusLedState, SiriusLedAlert, SiriusConnectionSignal, \
+    PyDMLedMultiChannel, SiriusLabel
+from ..as_di_tune.controls import SITuneMonitor
+from ..as_ap_injection import InjSysStbyLed
+from ..as_ap_machshift import MachShiftLabel
+
+
+
+[docs] +class SIGenStatusWindow(SiriusMainWindow): + """Sirius General Status Window.""" + + def __init__(self, prefix=VACA_PREFIX, parent=None): + super().__init__(parent) + self.prefix = prefix + self.app = QApplication.instance() + self.app_color = get_appropriate_color('SI') + self.setObjectName('SIApp') + self.setWindowTitle('Sirius General Status') + self.setWindowIcon( + qta.icon('mdi.view-split-vertical', color=self.app_color)) + self._setupUi() + + def _setupUi(self): + # machine shift + self.ld_machsht = QLabel( + '<h3>Shift: </h3>', self, alignment=Qt.AlignCenter) + self.lb_machsht = MachShiftLabel(self, prefix=self.prefix) + self.lb_machsht.label.setStyleSheet('QLabel{font-size: 45pt;}') + + # injection mode + self.ld_injmode = QLabel( + '<h3>Inj.Mode: </h3>', self, alignment=Qt.AlignCenter) + injctrl_dev = _PVName('AS-Glob:AP-InjCtrl') + injctrl_dev = injctrl_dev.substitute(prefix=self.prefix) + pvname = injctrl_dev.substitute(propty='Mode-Sts') + self.lb_injmode = SiriusLabel(self, pvname, alignment=Qt.AlignCenter) + self.lb_injmode.setStyleSheet('QLabel{font-size: 45pt;}') + topupwids = list() + + self.ld_tunxt = QLabel( + '<h3>Next Inj.: </h3>', self, alignment=Qt.AlignCenter) + self.lb_tunxt = SiriusLabel( + self, injctrl_dev.substitute(propty='TopUpNextInj-Mon')) + self.lb_tunxt.displayFormat = SiriusLabel.DisplayFormat.Time + self.lb_tunxt.setAlignment(Qt.AlignCenter) + self.lb_tunxt.setStyleSheet('QLabel{font-size: 45pt;}') + box_tunxt = QWidget() + lay_tunxt = QVBoxLayout(box_tunxt) + lay_tunxt.setContentsMargins(0, 0, 0, 0) + lay_tunxt.addWidget(self.ld_tunxt) + lay_tunxt.addWidget(self.lb_tunxt) + topupwids.append(box_tunxt) + + self.ld_tusts = QLabel( + '<h3>Status: </h3>', self, alignment=Qt.AlignCenter) + self.lb_tusts = SiriusLabel( + self, injctrl_dev.substitute(propty='TopUpState-Sts')) + self.lb_tusts.setAlignment(Qt.AlignCenter) + self.lb_tusts.setStyleSheet('QLabel{font-size: 45pt;}') + box_tusts = QWidget() + lay_tusts = QVBoxLayout(box_tusts) + lay_tusts.setContentsMargins(0, 0, 0, 0) + lay_tusts.addWidget(self.ld_tusts) + lay_tusts.addWidget(self.lb_tusts) + topupwids.append(box_tusts) + + self.ld_tuperd = QLabel( + '<h3>Period: </h3>', self, alignment=Qt.AlignCenter) + self.lb_tuperd = SiriusLabel( + self, injctrl_dev.substitute(propty='TopUpPeriod-RB'), + keep_unit=True, alignment=Qt.AlignCenter) + self.lb_tuperd.showUnits = True + self.lb_tuperd.setStyleSheet('QLabel{font-size: 45pt;}') + box_tuperd = QWidget() + lay_tuperd = QVBoxLayout(box_tuperd) + lay_tuperd.setContentsMargins(0, 0, 0, 0) + lay_tuperd.addWidget(self.ld_tuperd) + lay_tuperd.addWidget(self.lb_tuperd) + topupwids.append(box_tuperd) + + self.ld_tunrpu = QLabel( + '<h3>Nr.Pulses: </h3>', self, alignment=Qt.AlignCenter) + self.lb_tunrpu = SiriusLabel( + self, injctrl_dev.substitute(propty='TopUpNrPulses-RB'), + alignment=Qt.AlignCenter) + self.lb_tunrpu.showUnits = True + self.lb_tunrpu.setStyleSheet('QLabel{font-size: 45pt;}') + box_tunrpu = QWidget() + lay_tunrpu = QVBoxLayout(box_tunrpu) + lay_tunrpu.setContentsMargins(0, 0, 0, 0) + lay_tunrpu.addWidget(self.ld_tunrpu) + lay_tunrpu.addWidget(self.lb_tunrpu) + topupwids.append(box_tunrpu) + + self._gbox_topup = self._create_groupbox( + 'Top-up status', topupwids, orientation='H') + self._gbox_topup.setVisible(False) + self.ch_injmode = SiriusConnectionSignal(pvname) + self.ch_injmode.new_value_signal[int].connect( + self._handle_injmode_settings_vis) + + box_macsts = QGridLayout() + box_macsts.addWidget(self.ld_machsht, 0, 0) + box_macsts.addWidget(self.lb_machsht, 1, 0) + box_macsts.addWidget(self.ld_injmode, 0, 1) + box_macsts.addWidget(self.lb_injmode, 1, 1) + + # interlock + pvname = _PVName('RA-RaSIA02:RF-IntlkCtrl:IntlkSirius-Mon') + pvname = pvname.substitute(prefix=self.prefix) + self._led_siriusintlk = SiriusLedAlert(self, pvname) + self._led_siriusintlk.setStyleSheet( + 'QLed{min-width:3em;min-height:3em;max-width:3em;max-height:3em;}') + self._gbox_siriusintlk = self._create_groupbox( + 'Sirius Interlock', self._led_siriusintlk) + + # injection system + self._led_injsyssts = InjSysStbyLed(self) + self._led_injsyssts.setStyleSheet( + 'QLed{min-width:3em;min-height:3em;max-width:3em;max-height:3em;}') + self._gbox_injsyssts = self._create_groupbox( + 'Injection System', self._led_injsyssts) + + # SI SOFB + pvname = _PVName('SI-Glob:AP-SOFB:LoopState-Sts') + pvname = pvname.substitute(prefix=self.prefix) + self._led_sofbloop = SiriusLedState(self, pvname) + self._led_sofbloop.setStyleSheet( + 'QLed{min-width:3em;min-height:3em;max-width:3em;max-height:3em;}') + self._led_sofbloop.offColor = SiriusLedState.Red + self._gbox_sofbloop = self._create_groupbox( + 'SOFB', self._led_sofbloop) + + # FOFB + pvname = _PVName('SI-Glob:AP-FOFB:LoopState-Sts') + pvname = pvname.substitute(prefix=self.prefix) + self._led_fofbloop = SiriusLedState(self, pvname) + self._led_fofbloop.setStyleSheet( + 'QLed{min-width:3em;min-height:3em;max-width:3em;max-height:3em;}') + self._led_fofbloop.offColor = SiriusLedState.Red + self._gbox_fofbloop = self._create_groupbox( + 'FOFB', self._led_fofbloop) + + # BbB + ledsbbb = list() + for axis in ['H', 'V', 'L']: + bbb_pref = _PVName('SI-Glob:DI-BbBProc-'+axis) + bbb_pref = bbb_pref.substitute(prefix=self.prefix) + stab_pref = _PVName('SI-Glob:AP-StabilityInfo') + chs2vals = { + bbb_pref.substitute(propty_name='FBCTRL'): 1, + bbb_pref.substitute(propty_name='CLKMISS'): 0, + bbb_pref.substitute(propty_name='PLL_UNLOCK'): 0, + bbb_pref.substitute(propty_name='DCM_UNLOCK'): 0, + bbb_pref.substitute(propty_name='ADC_OVR'): 0, + bbb_pref.substitute(propty_name='SAT'): 0, + bbb_pref.substitute(propty_name='FID_ERR'): 0, + stab_pref.substitute(propty='BbB'+axis+'Status-Mon'): 0, + } + led = PyDMLedMultiChannel(self, chs2vals) + led.setStyleSheet( + 'QLed{min-width:3em;min-height:3em;' + 'max-width:3em;max-height:3em;}') + led.offColor = SiriusLedState.Red + ledsbbb.append(led) + self._gbox_bbbloop = self._create_groupbox( + 'BbB', ledsbbb, orientation='H') + + # feedforward + chs2vals = dict() + ti_pref = _PVName('SI-01:TI-Mags-FFCorrs') + ti_src = _HLTimeSearch.get_hl_trigger_predef_db( + ti_pref)['Src']['enums'].index('Linac') + tiprop2val = { + 'State-Sts': _Const.OffOn.On, + 'Src-Sts': ti_src, + } + for prop, val in tiprop2val.items(): + pvn = ti_pref.substitute( + prefix=self.prefix, + propty=prop, + ) + chs2vals[pvn] = val + for psn in _PSSearch.get_psnames({'sec': 'SI', 'dev': 'FFC.*'}): + pvn = _PVName(psn).substitute( + prefix=self.prefix, + propty='OpMode-Sts', + ) + chs2vals[pvn] = _PSConst.States.RmpWfm + self._led_septff = PyDMLedMultiChannel(self, chs2vals) + self._led_septff.setStyleSheet( + 'QLed{min-width:3em;min-height:3em;' + 'max-width:3em;max-height:3em;}') + self._led_septff.offColor = SiriusLedState.Red + self._gbox_septff = self._create_groupbox( + 'Septa Feedforward', self._led_septff) + + # orbit interlock + pvname = _PVName('SI-Glob:AP-OrbIntlk:Enable-Sts') + pvname = pvname.substitute(prefix=self.prefix) + self._led_orbintlk = SiriusLedState(self, pvname) + self._led_orbintlk.setStyleSheet( + 'QLed{min-width:3em;min-height:3em;max-width:3em;max-height:3em;}') + self._led_orbintlk.offColor = SiriusLedState.Red + self._gbox_orbintlk = self._create_groupbox( + 'Orbit Interlock', self._led_orbintlk) + + # current + self.ld_curr = QLabel( + '<h3>Current [mA]</h3>', self, alignment=Qt.AlignCenter) + self.ld_curr.setStyleSheet('max-height: 2em;') + pvname = _PVName('SI-Glob:AP-CurrInfo:Current-Mon') + pvname = pvname.substitute(prefix=self.prefix) + self.lb_curr = SiriusLabel(self, pvname) + self.lb_curr.setAlignment(Qt.AlignCenter) + self.lb_curr.setStyleSheet( + 'QLabel{background-color: '+self.app_color+';font-size: 45pt;}') + pvname = _PVName('SI-Glob:AP-CurrInfo:StoredEBeam-Mon') + pvname = pvname.substitute(prefix=self.prefix) + self.frm_curr = SiriusFrame( + self, pvname, + color_list=[SiriusFrame.DarkGreen, SiriusFrame.LightGreen], + is_float=False) + self.frm_curr.borderWidth = 5 + self.frm_curr.add_widget(self.lb_curr) + box_curr = QWidget() + lay_curr = QVBoxLayout(box_curr) + lay_curr.setAlignment(Qt.AlignVCenter) + lay_curr.addWidget(self.ld_curr) + lay_curr.addWidget(self.frm_curr) + + # lifetime + self.ld_lifetime = QLabel( + '<h3>Lifetime</h3>', self, alignment=Qt.AlignCenter) + self.ld_lifetime.setStyleSheet('max-height: 2em;') + self.lb_lifetime = QLabel('0:00:00', self, alignment=Qt.AlignCenter) + self.lb_lifetime.setStyleSheet('QLabel{font-size: 45pt;}') + pvname = _PVName('SI-Glob:AP-CurrInfo:Lifetime-Mon') + pvname = pvname.substitute(prefix=self.prefix) + self.ch_lifetime = SiriusConnectionSignal(pvname) + self.ch_lifetime.new_value_signal[float].connect( + self.formatLifetimeLabel) + box_lt = QWidget() + lay_lt = QVBoxLayout(box_lt) + lay_lt.setAlignment(Qt.AlignVCenter) + lay_lt.addWidget(self.ld_lifetime) + lay_lt.addWidget(self.lb_lifetime) + + # tune + self.tune_mon = SITuneMonitor(self, self.prefix, description='short', + use_color_labels=False) + self.tune_mon.lb_tunefrach.setStyleSheet('QLabel{font-size: 45pt;}') + self.tune_mon.lb_tunefracv.setStyleSheet('QLabel{font-size: 45pt;}') + + # current history + self.curr_graph = SiriusTimePlot(self) + self.curr_graph.setObjectName('curr_graph') + self.curr_graph.setStyleSheet( + '#curr_graph{min-width: 20em; min-height: 14em;}') + self.curr_graph.showXGrid = True + self.curr_graph.showYGrid = True + self.curr_graph.backgroundColor = QColor(255, 255, 255) + for axis in self.curr_graph.getPlotItem().axes.values(): + sty = axis['item'].labelStyle + sty['font-size'] = '18pt' + axis['item'].setLabel(text=None, **sty) + self.curr_graph.setLabel('left', text='Current [mA]') + font = QFont() + font.setPointSize(18) + self.curr_graph.plotItem.getAxis('bottom').setStyle( + tickTextOffset=5, autoExpandTextSpace=False, + tickTextWidth=50, tickFont=font) + self.curr_graph.plotItem.getAxis('left').setStyle( + tickTextOffset=5, autoExpandTextSpace=False, + tickTextWidth=50, tickFont=font) + curr_pvname = _PVName('SI-Glob:AP-CurrInfo:Current-Mon') + curr_pvname = curr_pvname.substitute(prefix=self.prefix) + self.curr_graph.addYChannel( + y_channel=curr_pvname, name='Current', + color='blue', lineStyle=Qt.SolidLine, lineWidth=2) + self.curve = self.curr_graph.curveAtIndex(0) + self.curve.setFillLevel(0) + self.curve.setBrush(QBrush(QGradient(QGradient.ColdEvening))) + timespan = 12*60*60 + self.curr_graph.timeSpan = timespan + self.curr_graph.bufferSize = timespan*10 + self.curr_graph.maxRedrawRate = 2 + t_end = Time.now() + t_init = t_end - timespan + self.curr_graph.fill_curve_with_archdata( + self.curve, curr_pvname, + t_init=t_init.get_iso8601(), t_end=t_end.get_iso8601(), + process_type='mean', process_bin_intvl=10) + + hlay1 = QHBoxLayout() + hlay1.setSpacing(30) + hlay1.setAlignment(Qt.AlignVCenter) + hlay1.addWidget(box_curr) + hlay1.addWidget(box_lt) + hlay1.addWidget(self.tune_mon) + + hlay2 = QHBoxLayout() + hlay2.setSpacing(14) + hlay2.addWidget(self._gbox_siriusintlk) + hlay2.addWidget(self._gbox_injsyssts) + hlay2.addWidget(self._gbox_sofbloop) + hlay2.addWidget(self._gbox_fofbloop) + hlay2.addWidget(self._gbox_bbbloop) + hlay2.addWidget(self._gbox_septff) + hlay2.addWidget(self._gbox_orbintlk) + hlay2.setStretch(0, 1) + hlay2.setStretch(1, 1) + hlay2.setStretch(2, 1) + hlay2.setStretch(3, 1) + hlay2.setStretch(4, 1) + hlay2.setStretch(5, 1) + hlay2.setStretch(6, 1) + + cwid = QWidget() + lay = QGridLayout(cwid) + lay.setVerticalSpacing(16) + lay.setHorizontalSpacing(14) + lay.addLayout(box_macsts, 0, 0, 1, 3) + lay.addLayout(hlay1, 1, 0, 1, 3) + lay.addWidget(self.curr_graph, 2, 0, 1, 3) + lay.addLayout(hlay2, 3, 0, 1, 3) + lay.addWidget(self._gbox_topup, 4, 0, 1, 3) + lay.setRowStretch(0, 1) + lay.setRowStretch(1, 1) + lay.setRowStretch(2, 5) + lay.setRowStretch(3, 1) + lay.setRowStretch(4, 1) + lay.setColumnStretch(0, 1) + lay.setColumnStretch(1, 1) + lay.setColumnStretch(2, 1) + self.setCentralWidget(cwid) + +
+[docs] + @Slot(float) + def formatLifetimeLabel(self, value): + lt = 0 if _np.isnan(value) else value + H = int(lt // 3600) + m = int((lt % 3600) // 60) + s = int((lt % 3600) % 60) + lt_str = '{:d}:{:02d}:{:02d}'.format(H, m, s) + self.lb_lifetime.setText(lt_str)
+ + + def _create_groupbox(self, title, widgets, orientation='V'): + if not isinstance(widgets, list): + widgets = [widgets, ] + gbox = QGroupBox(title, self) + gbox.setStyleSheet( + 'QGroupBox{font-size: 12pt; font-weight: bold;}') + + lay = QVBoxLayout(gbox) if orientation == 'V' else QHBoxLayout(gbox) + lay.setAlignment(Qt.AlignCenter) + for idx, wid in enumerate(widgets): + lay.addWidget(wid) + lay.setStretch(idx, 1) + return gbox + + def _handle_injmode_settings_vis(self, value): + self._gbox_topup.setVisible(value == _InjConst.InjMode.TopUp) + +
+[docs] + def changeEvent(self, event): + """Change event handler.""" + if event.type() == QEvent.FontChange: + fontsize = self.app.font().pointSize() + + # labels + sty = 'QLabel{font-size: '+str(fontsize+35)+'pt;}' + self.lb_machsht.label.setStyleSheet(sty) + self.lb_injmode.setStyleSheet(sty) + self.lb_curr.setStyleSheet( + 'QLabel{background-color: '+self.app_color+';' + 'font-size: '+str(fontsize+35)+'pt;}') + self.lb_lifetime.setStyleSheet(sty) + self.tune_mon.lb_tunefrach.setStyleSheet(sty) + self.tune_mon.lb_tunefracv.setStyleSheet(sty) + self.lb_tunxt.setStyleSheet(sty) + self.lb_tusts.setStyleSheet(sty) + self.lb_tuperd.setStyleSheet(sty) + self.lb_tunrpu.setStyleSheet(sty) + + sty = 'QGroupBox{font-size: '+str(fontsize+2)+'pt;'+\ + 'font-weight: bold;}' + self._gbox_siriusintlk.setStyleSheet(sty) + self._gbox_injsyssts.setStyleSheet(sty) + self._gbox_sofbloop.setStyleSheet(sty) + self._gbox_fofbloop.setStyleSheet(sty) + self._gbox_bbbloop.setStyleSheet(sty) + self._gbox_topup.setStyleSheet(sty) + + # graph + graph_fontsize = fontsize + 2 + for ax in self.curr_graph.getPlotItem().axes.values(): + sty = ax['item'].labelStyle + sty['font-size'] = str(graph_fontsize) + 'pt' + ax['item'].setLabel(text=None, **sty) + + font = QFont() + font.setPointSize(graph_fontsize) + self.curr_graph.plotItem.getAxis('bottom').setStyle( + tickTextOffset=5, autoExpandTextSpace=False, + tickTextWidth=80, tickFont=font) + self.curr_graph.plotItem.getAxis('left').setStyle( + tickTextOffset=5, autoExpandTextSpace=False, + tickTextWidth=80, tickFont=font) + + self.ensurePolished()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_idff/custom_widgets.html b/_modules/siriushla/si_ap_idff/custom_widgets.html new file mode 100644 index 000000000..7c18bd8b0 --- /dev/null +++ b/_modules/siriushla/si_ap_idff/custom_widgets.html @@ -0,0 +1,221 @@ + + + + + + siriushla.si_ap_idff.custom_widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_ap_idff.custom_widgets

+"""Custom widgets."""
+
+import numpy as np
+
+from qtpy.QtCore import Qt, Slot
+
+from pydm.widgets import PyDMLineEdit
+from pydm.widgets.waveformplot import WaveformCurveItem
+
+from ..as_ap_configdb import LoadConfigDialog as _LoadConfigDialog
+
+
+
+[docs] +class ConfigLineEdit(PyDMLineEdit): + """Configuration line edit.""" + +
+[docs] + def mouseReleaseEvent(self, _): + """Reimplement mouseReleaseEvent.""" + config_type = 'si_idff' + popup = _LoadConfigDialog(config_type) + popup.configname.connect(self._config_changed) + popup.exec_()
+ + + def _config_changed(self, configname): + self.setText(configname) + self.send_value() + self.value_changed(configname)
+ + + +
+[docs] +class SectionedWaveformCurveItem(WaveformCurveItem): + + GAP_MIN = 0 # [mm] + GAP_MAX = 24 # [mm] + + def __init__(self, section, **kwargs): + super().__init__(**kwargs) + self.section = section + +
+[docs] + @Slot(np.ndarray) + def receiveYWaveform(self, new_waveform): + size = len(new_waveform)/4 + min = int(size*self.section) + max = int(size*(self.section+1)) + ydata = new_waveform[min:max] + npts = len(ydata) + xdata = self.GAP_MIN + (self.GAP_MAX - self.GAP_MIN) * np.arange(0, npts) / (npts - 1) + super().receiveXWaveform(xdata) + super().receiveYWaveform(ydata)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_idff/main.html b/_modules/siriushla/si_ap_idff/main.html new file mode 100644 index 000000000..0d18137d0 --- /dev/null +++ b/_modules/siriushla/si_ap_idff/main.html @@ -0,0 +1,546 @@ + + + + + + siriushla.si_ap_idff.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_ap_idff.main

+"""Main window."""
+
+from time import strftime, localtime
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QLabel, QGridLayout, QSizePolicy as QSzPlcy, \
+    QWidget, QGroupBox, QHBoxLayout, QVBoxLayout, QPushButton, QSpacerItem, \
+    QRadioButton, QButtonGroup, QStackedWidget
+from qtpy.QtGui import QColor
+
+import qtawesome as qta
+
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.envars import VACA_PREFIX as _VACA_PREFIX
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.search import IDSearch
+from siriuspy.idff.csdev import IDFFConst, ETypes as IDFFEnums
+
+from ..util import connect_window
+from ..widgets import SiriusMainWindow, SiriusLabel, SiriusSpinbox, \
+    PyDMStateButton, SiriusLedState, PyDMLogLabel, SiriusLedAlert, \
+    SiriusConnectionSignal, SiriusWaveformPlot
+from ..widgets.dialog import StatusDetailDialog
+from ..as_ps_control.control_widget.ControlWidgetFactory import \
+    ControlWidgetFactory
+from ..as_ps_control import PSDetailWindow
+from .custom_widgets import ConfigLineEdit, SectionedWaveformCurveItem
+from .util import get_idff_icon
+
+
+
+[docs] +class IDFFWindow(SiriusMainWindow): + """ID FF main window.""" + + def __init__(self, parent=None, prefix='', idname=''): + """Initialize.""" + super().__init__(parent) + self.prefix = prefix or _VACA_PREFIX + self.idname = idname + self._is_ivu = "IVU" in idname + self._idffname = IDFFConst(idname).idffname + self._idffdata = IDSearch.conv_idname_2_idff(self.idname) + self.device = _PVName(self._idffname) + self.dev_pref = _PVName(f"SI-{self.device.sub}:BS-IDFF-CHCV:") if self._is_ivu else \ + self.device.substitute(prefix=prefix) + self.setObjectName('IDApp') + self.setWindowTitle(self.device) + self.setWindowIcon(get_idff_icon()) + self._setupUi() + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + self.title = QLabel( + '<h2>' + self.idname + ' Feedforward Settings</h2>', + alignment=Qt.AlignCenter) + + wid = QWidget() + lay = QGridLayout(wid) + lay.addWidget(self.title, 0, 0, 1, 2) + if not self._is_ivu: + lay.addWidget(self._idStatusWidget(), 1, 0) + lay.addWidget(self._corrStatusWidget(), 2, 0) + lay.addWidget(self._basicSettingsWidget(), 3, 0) + lay.addWidget(self._logWidget(), 4, 0) + else: + lay.addWidget(self._ivuStatusWidget(), 1, 0, 1, 1) + lay.addWidget(self._ivuSettingsWidget(), 2, 0, 3, 1) + lay.addWidget(self._corrsMonitorWidget(), 1, 1, 4, 1) + self.setCentralWidget(wid) + + def _ivuStatusWidget(self): + gbox = QGroupBox('ID Status', self) + hlay = QHBoxLayout(gbox) + + lbl_gap = QLabel( + 'Gap: ', self) + gap_val = SiriusLabel( + self, self.dev_pref.substitute(propty='IDPos-Mon')) + gap_val.showUnits = True + + hlay.addWidget(lbl_gap) + hlay.addWidget(gap_val) + + return gbox + + def _format_timestamp_label(self, value): + self.timestamp.setText(strftime( + '%Y-%m-%d %H:%M:%S', localtime(value/1000))) + + def _ivuSettingsWidget(self): + gbox = QGroupBox('Settings', self) + lay = QGridLayout(gbox) + + ld_loopstate = QLabel('Loop State: ', self) + self.sb_loopstate = PyDMStateButton( + self, self.dev_pref.substitute(propty='LoopState-Sel')) + self.lb_loopstate = SiriusLedState( + self, self.dev_pref.substitute(propty='LoopState-Sts')) + + lbl_table_pointer = QLabel('Table Pointer: ', self) + self.table_pointer = SiriusLabel( + self, self.dev_pref.substitute(propty='TablePointer-Mon')) + + lbl_alarm = QLabel('Alarm: ', self) + self.alarm_led = SiriusLedState( + self, self.dev_pref.substitute(propty='Alarms-Mon')) + + alarm_details = QPushButton('', self) + alarm_details.setIcon(qta.icon('fa5s.list-ul')) + alarm_details.setToolTip('Open Detailed Alarms View') + alarm_details.setObjectName('sts') + alarm_details.setStyleSheet( + '#sts{min-width:25px; max-width:25px; icon-size:20px;}') + connect_window( + alarm_details, StatusDetailDialog, parent=self, + pvname=self.dev_pref.substitute(propty='Alarms-Mon'), + labels=["Mode/Polar. out of range", "Gap/phase out of range", + "Gap/phase high deviation", "Timeout for serial data"], + section='ID', title='FeedForward Status') + + self.clear_alarms = PyDMPushButton( + self, "Clear Alarms", pressValue=1, + init_channel=self.dev_pref.substitute(propty='ClearFlags-Cmd')) + + lbl_plc_counter = QLabel('PLC Counter: ', self) + self.plc_counter = SiriusLabel( + self, self.dev_pref.substitute(propty='PLCCounter-Mon')) + + lbl_timestamp = QLabel('PLC Timestamp: ', self) + self.timestamp = QLabel('0:00:00', self) + self.timestamp_mon = SiriusConnectionSignal( + self.dev_pref.substitute(propty='PLCTimestamp-Mon')) + self.timestamp_mon.new_value_signal[float].connect( + self._format_timestamp_label) + + buttonGroupWid = QWidget() + vlay = QVBoxLayout(buttonGroupWid) + self.button_group = QButtonGroup(buttonGroupWid) + self.button_group.buttonClicked.connect(lambda btn: self.stack.setCurrentIndex(self.button_group.id(btn))) + + self.stack = QStackedWidget() + self.plot_dict = {} + for idx, name in enumerate(["CH1", "CH2", "CV1", "CV2"]): + channel_btn = QRadioButton(name) + vlay.addWidget(channel_btn) + self.button_group.addButton(channel_btn, idx) + + if name == "CH1": + channel_btn.setChecked(True) + + graph = SiriusWaveformPlot() + graph.setShowLegend(True) + graph.autoRangeX = True + graph.autoRangeY = True + graph.showXGrid = True + graph.showYGrid = True + graph.showLegend = True + graph.setLabel('bottom', text='Index') + graph.setLabel('left', text='Current [A]') + graph.setBackgroundColor(QColor(255, 255, 255)) + self.addNewTableCurve(graph, name, idx) + self.stack.addWidget(graph) + self.plot_dict[name] = graph + + lay.addWidget(ld_loopstate, 0, 0) + lay.addWidget(self.sb_loopstate, 0, 1) + lay.addWidget(self.lb_loopstate, 0, 2) + lay.addWidget(lbl_table_pointer, 1, 0) + lay.addWidget(self.table_pointer, 1, 1, 1, 2) + lay.addWidget(lbl_alarm, 2, 0) + lay.addWidget(self.alarm_led, 2, 1) + lay.addWidget(alarm_details, 2, 2) + lay.addWidget(self.clear_alarms, 3, 0, 1, 3) + lay.addWidget(lbl_plc_counter, 4, 0) + lay.addWidget(self.plc_counter, 4, 1, 1, 2) + lay.addWidget(lbl_timestamp, 5, 0) + lay.addWidget(self.timestamp, 5, 1, 1, 2) + lay.addWidget(buttonGroupWid, 6, 0) + lay.addWidget(self.stack, 6, 1, 1, 2) + + return gbox + +
+[docs] + def addNewTableCurve(self, plt, name, section): + if 'CH' in name: + color_sp, color_rb = 'blue', 'darkBlue' + else: + color_sp, color_rb = 'red', 'darkRed' + + curve_sp = SectionedWaveformCurveItem( + section=section, + y_addr=self.dev_pref.substitute(propty='Table-SP'), + name="SP", + color=QColor(color_sp), + ) + plt._needs_redraw = False + plt.addCurve(curve_sp, curve_color=QColor(color_sp)) + curve_sp.data_changed.connect(plt.set_needs_redraw) + + curve_rb = SectionedWaveformCurveItem( + section=section, + y_addr=self.dev_pref.substitute(propty='Table-RB'), + name="RB", + color=QColor(color_rb), + ) + plt._needs_redraw = False + plt.addCurve(curve_rb, curve_color=QColor(color_rb)) + curve_rb.data_changed.connect(plt.set_needs_redraw) + + return plt
+ + + def _basicSettingsWidget(self): + ld_configname = QLabel( + 'Config. Name: ', self, alignment=Qt.AlignRight) + self.le_configname = ConfigLineEdit( + self, self.dev_pref.substitute(propty='ConfigName-SP')) + self.le_configname.setStyleSheet('min-width:10em; max-width:10em;') + self.lb_configname = SiriusLabel( + self, self.dev_pref.substitute(propty='ConfigName-RB')) + + ld_loopstate = QLabel( + 'Loop State: ', self, alignment=Qt.AlignRight) + self.sb_loopstate = PyDMStateButton( + self, self.dev_pref.substitute(propty='LoopState-Sel')) + self.lb_loopstate = SiriusLedState( + self, self.dev_pref.substitute(propty='LoopState-Sts')) + + ld_loopfreq = QLabel( + 'Loop Freq.: ', self, alignment=Qt.AlignRight) + self.sb_loopfreq = SiriusSpinbox( + self, self.dev_pref.substitute(propty='LoopFreq-SP')) + self.lb_loopfreq = SiriusLabel( + self, self.dev_pref.substitute(propty='LoopFreq-RB')) + + ld_calccorr = QLabel( + 'Calc. values:', self, alignment=Qt.AlignRight) + glay_calccorr = QGridLayout() + glay_calccorr.addWidget(ld_calccorr, 0, 0) + for ridx, corr in enumerate(['CH', 'CV', 'QS']): + row = ridx + 1 + hheader = QLabel(f'{corr}', alignment=Qt.AlignCenter) + hheader.setStyleSheet('.QLabel{font-weight: bold;}') + glay_calccorr.addWidget(hheader, row, 0) + for cidx in range(2): + col = cidx + 1 + if ridx == 0: + vheader = QLabel(f'{col}', alignment=Qt.AlignCenter) + vheader.setStyleSheet('.QLabel{font-weight: bold;}') + glay_calccorr.addWidget(vheader, 0, col) + propty = f'Corr{corr}{col}Current-Mon' + pvname = self.dev_pref.substitute(propty=propty) + lbl = SiriusLabel(self, pvname, keep_unit=True) + lbl.showUnits = True + glay_calccorr.addWidget(lbl, row, col) + + gbox = QGroupBox('Settings', self) + lay = QGridLayout(gbox) + lay.addWidget(ld_loopstate, 0, 0) + lay.addWidget(self.sb_loopstate, 0, 1) + lay.addWidget(self.lb_loopstate, 0, 2) + lay.addItem(QSpacerItem(0, 15, QSzPlcy.Ignored, QSzPlcy.Fixed), 1, 0) + lay.addWidget(ld_loopfreq, 2, 0) + lay.addWidget(self.sb_loopfreq, 2, 1) + lay.addWidget(self.lb_loopfreq, 2, 2, 1, 2) + lay.addWidget(ld_configname, 3, 0) + lay.addWidget(self.le_configname, 3, 1, 1, 3) + lay.addWidget(self.lb_configname, 4, 1, 1, 3) + lay.addItem(QSpacerItem(0, 15, QSzPlcy.Ignored, QSzPlcy.Fixed), 6, 0) + + if IDSearch.conv_idname_2_idff_qsnames(self.idname): + ld_controlqs = QLabel( + 'Control QS: ', self, alignment=Qt.AlignRight) + self.sb_controlqs = PyDMStateButton( + self, self.dev_pref.substitute(propty='ControlQS-Sel')) + self.lb_controlqs = SiriusLedState( + self, self.dev_pref.substitute(propty='ControlQS-Sts')) + + lay.addWidget(ld_controlqs, 5, 0) + lay.addWidget(self.sb_controlqs, 5, 1) + lay.addWidget(self.lb_controlqs, 5, 2) + + lay.addLayout(glay_calccorr, 7, 0, 1, 3) + + return gbox + + def _corrStatusWidget(self): + ld_corconf = QLabel( + 'Corr. Status: ', self, alignment=Qt.AlignRight) + self.led_corr = SiriusLedAlert( + self, self.dev_pref.substitute(propty='CorrStatus-Mon')) + pb_corsts = QPushButton('', self) + pb_corsts.setIcon(qta.icon('fa5s.list-ul')) + pb_corsts.setToolTip('Open Detailed Status View') + pb_corsts.setObjectName('sts') + pb_corsts.setStyleSheet( + '#sts{min-width:25px; max-width:25px; icon-size:20px;}') + connect_window( + pb_corsts, StatusDetailDialog, parent=self, + pvname=self.dev_pref.substitute(propty='CorrStatus-Mon'), + labels=IDFFEnums.STS_LBLS_CORR, section='ID', + title='Corrector Status') + self.pb_corconf = PyDMPushButton( + self, pressValue=1, + init_channel=self.dev_pref.substitute(propty='CorrConfig-Cmd')) + self.pb_corconf.setToolTip('Send PwrState and OpMode') + self.pb_corconf.setIcon(qta.icon('fa5s.sync')) + self.pb_corconf.setObjectName('conf') + self.pb_corconf.setStyleSheet( + '#conf{min-width:25px; max-width:25px; icon-size:20px;}') + + gbox = QGroupBox('Corrector Status', self) + lay = QGridLayout(gbox) + lay.addWidget(ld_corconf, 0, 0) + lay.addWidget(self.led_corr, 0, 1) + lay.addWidget(pb_corsts, 0, 2) + lay.addWidget(self.pb_corconf, 0, 3) + return gbox + + def _idStatusWidget(self): + gbox = QGroupBox('ID Status', self) + lay = QGridLayout(gbox) + + if self._idffdata['pparameter']: + pparam = _PVName(self._idffdata['pparameter']) + ld_pparam = QLabel( + pparam.propty_name + ': ', self, alignment=Qt.AlignRight) + self._lb_pparam = SiriusLabel(self, pparam, keep_unit=True) + self._lb_pparam.showUnits = True + lay.addWidget(ld_pparam, 0, 0) + lay.addWidget(self._lb_pparam, 0, 1) + + if self._idffdata['kparameter']: + kparam = _PVName(self._idffdata['kparameter']) + ld_kparam = QLabel( + kparam.propty_name + ': ', self, alignment=Qt.AlignRight) + self._lb_kparam = SiriusLabel(self, kparam, keep_unit=True) + self._lb_kparam.showUnits = True + lay.addWidget(ld_kparam, 1, 0) + lay.addWidget(self._lb_kparam, 1, 1) + + ld_polar = QLabel( + 'Polarization: ', self, alignment=Qt.AlignRight) + self.lb_polar = SiriusLabel( + self, self.dev_pref.substitute(propty='Polarization-Mon')) + lay.addItem(QSpacerItem(0, 15, QSzPlcy.Ignored, QSzPlcy.Fixed), 2, 0) + lay.addWidget(ld_polar, 3, 0) + lay.addWidget(self.lb_polar, 3, 1, 1, 3) + + return gbox + + def _logWidget(self): + self.log = PyDMLogLabel( + self, init_channel=self.dev_pref.substitute(propty='Log-Mon')) + self.log.setSizePolicy( + QSzPlcy.MinimumExpanding, QSzPlcy.MinimumExpanding) + self.log.setAlternatingRowColors(True) + self.log.maxCount = 2000 + + gbox = QGroupBox('Log', self) + lay = QVBoxLayout(gbox) + lay.addWidget(self.log) + return gbox + + def _corrsMonitorWidget(self): + widget = ControlWidgetFactory.factory( + self, section='SI', device='corrector-idff', + subsection=self.device.sub, orientation=Qt.Vertical) + for wid in widget.get_summary_widgets(): + detail_bt = wid.get_detail_button() + psname = detail_bt.text() + if not psname: + psname = detail_bt.toolTip() + connect_window(detail_bt, PSDetailWindow, self, psname=psname) + + gbox = QGroupBox('Correctors', self) + lay = QVBoxLayout(gbox) + lay.setContentsMargins(3, 3, 3, 3) + lay.addWidget(widget) + return gbox
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_idff/util.html b/_modules/siriushla/si_ap_idff/util.html new file mode 100644 index 000000000..50622ffb8 --- /dev/null +++ b/_modules/siriushla/si_ap_idff/util.html @@ -0,0 +1,182 @@ + + + + + + siriushla.si_ap_idff.util — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_ap_idff.util

+"""Utilities."""
+
+import qtawesome as qta
+from siriushla.util import get_appropriate_color
+
+
+
+[docs] +def get_idff_icon(color=True): + """Return IDFF icon.""" + color = get_appropriate_color('ID') if color else None + icon = qta.icon( + 'fa5s.hammer', 'mdi.current-ac', 'mdi.current-ac', 'mdi.equal', + options=[ + dict(scale_factor=0.3, color=color, offset=(-0.38, -0.01)), + dict(scale_factor=0.3, color=color, offset=(-0.05, -0.01)), + dict(scale_factor=0.3, color=color, offset=(0.15, -0.01)), + dict(scale_factor=1.05, color=color, offset=(0.05, 0.0))]) + return icon
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_orbintlk/base.html b/_modules/siriushla/si_ap_orbintlk/base.html new file mode 100644 index 000000000..582006385 --- /dev/null +++ b/_modules/siriushla/si_ap_orbintlk/base.html @@ -0,0 +1,279 @@ + + + + + + siriushla.si_ap_orbintlk.base — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_ap_orbintlk.base

+"""Base Object."""
+
+import math as _math
+import numpy as _np
+
+from epics.ca import ChannelAccessException
+
+from siriuspy.epics import PV as _PV
+from siriuspy.envars import VACA_PREFIX
+from siriuspy.namesys import SiriusPVName
+from siriuspy.clientconfigdb import ConfigDBClient
+from siriuspy.orbintlk.csdev import Const as _Const
+from siriuspy.devices.orbit_interlock import BaseOrbitIntlk
+
+
+
+[docs] +class BaseObject(BaseOrbitIntlk): + """Base SI BPM info object.""" + + CONV_NM2M = 1e-9 # [nm] --> [m] + CONV_UM2NM = 1e+3 # [um] --> [nm] + + _pvs = dict() + + def __init__(self, prefix=VACA_PREFIX): + super().__init__() + self._client = ConfigDBClient(config_type='si_orbit') + self.prefix = prefix + self.hlprefix = _Const.IOC_PREFIX.substitute(prefix=prefix) + + self._pv_facqrate_value = None + self._pv_monitrate_value = None + self._monitsum2intlksum_factor = 1 + + pvname = SiriusPVName(self.BPM_NAMES[0]).substitute( + propty='INFOMONITRate-RB', prefix=prefix) + self._pv_monitrate = _PV(pvname, callback=self._callback_get_rate) + pvname = SiriusPVName(self.BPM_NAMES[0]).substitute( + propty='INFOFAcqRate-RB', prefix=prefix) + self._pv_facqrate = _PV(pvname, callback=self._callback_get_rate) + + @property + def monitsum2intlksum_factor(self): + """Return factor between BPM Monit Sum and interlock Sum.""" + return self._monitsum2intlksum_factor + +
+[docs] + def get_ref_orb(self, configname): + """Get reference orbit from config [um]. + + Args: + configname (str): si orbit configuration name. + + Returns: + si_orbit: si orbit configuration value from ConfigDB + """ + try: + configvalue = self._client.get_config_value(configname) + value = dict() + value['x'] = _np.array(configvalue['x']) * self.CONV_UM2NM + value['y'] = _np.array(configvalue['y']) * self.CONV_UM2NM + except Exception: + value = dict() + value['x'] = _np.zeros(len(self.BPM_NAMES), dtype=float) + value['y'] = _np.zeros(len(self.BPM_NAMES), dtype=float) + return value
+ + + # --- pv handler methods --- + + def _create_pvs(self, propty): + if 'SlowSum' in propty: + pvname = SiriusPVName('SI-Glob:AP-SOFB').substitute(propty=propty) + else: + pvname = self.hlprefix.substitute(propty=propty) + if pvname in self._pvs: + return + auto_monitor = True + new_pv = _PV( + pvname, auto_monitor=auto_monitor, connection_timeout=0.01) + self._pvs[pvname] = new_pv + + def _get_values(self, propty): + if 'SlowSum' in propty: + pvname = SiriusPVName('SI-Glob:AP-SOFB').substitute(propty=propty) + else: + pvname = self.hlprefix.substitute(propty=propty) + self._pvs[pvname].wait_for_connection() + + try: + values = self._pvs[pvname].get() + except ChannelAccessException: + values = None + if values is None: + values = _np.zeros(len(self.BPM_NAMES), dtype=float) + elif propty in ['Intlk-Mon', 'IntlkLtc-Mon'] or \ + 'Lower' in propty or 'Upper' in propty: + values = 1 * _np.logical_not(values) + return values + + def _callback_get_rate(self, pvname, value, **kws): + if value is None: + return + if 'MONIT' in pvname: + self._pv_monitrate_value = value + elif 'FAcq' in pvname: + self._pv_facqrate_value = value + monit = self._pv_monitrate_value + facq = self._pv_facqrate_value + if None in [monit, facq]: + return + frac = monit/facq + factor = 2**_math.ceil(_math.log2(frac)) / frac + self._monitsum2intlksum_factor = factor
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_orbintlk/bpmdetail.html b/_modules/siriushla/si_ap_orbintlk/bpmdetail.html new file mode 100644 index 000000000..104a84a87 --- /dev/null +++ b/_modules/siriushla/si_ap_orbintlk/bpmdetail.html @@ -0,0 +1,473 @@ + + + + + + siriushla.si_ap_orbintlk.bpmdetail — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_ap_orbintlk.bpmdetail

+"""Individual BPM Orbit Interlock Window."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGridLayout, QLabel, QGroupBox, \
+    QSpacerItem, QSizePolicy as QSzPlc
+
+import qtawesome as qta
+
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName
+
+from ..widgets import SiriusMainWindow, SiriusLedState, SiriusLabel, \
+    PyDMStateButton, SiriusLedAlert, SiriusSpinbox, SiriusLineEdit
+from .base import BaseObject
+
+
+
+[docs] +class BPMOrbIntlkDetailWindow(BaseObject, SiriusMainWindow): + """Individual BPM Orbit Interlock Window.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + BaseObject.__init__(self, prefix) + SiriusMainWindow.__init__(self, parent) + + self.device = SiriusPVName(device) + self.devpref = self.device.substitute(prefix=prefix) + + self.setObjectName(self.device.sec+'App') + self.setWindowTitle(device+' Orbit Interlock Control Window') + + self._setupUi() + + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + wid = QWidget(self) + self.setCentralWidget(wid) + lay = QGridLayout(wid) + + title = QLabel( + '<h3>' + self.device + ' Orbit Interlock Control</h3>', + self, alignment=Qt.AlignCenter) + lay.addWidget(title, 0, 0, 1, 2) + + try: + down, up = self.get_down_up_bpms(self.device) + other = down if self.device == up else up + titlehelp = QLabel( + '<h3>(also refers to ' + other + ')</h3>', + self, alignment=Qt.AlignCenter) + lay.addWidget(titlehelp, 1, 0, 1, 2) + except ValueError: + pass + + # General Interlock + self._gb_gen = QGroupBox('General Interlock') + lay_gen = self._setupIntlkGenLayout() + self._gb_gen.setLayout(lay_gen) + lay.addWidget(self._gb_gen, 2, 0, 1, 2) + + # Position Interlock + self._gb_pos = QGroupBox('Position Interlock') + lay_pos = self._setupIntlkTypeLayout('Pos') + self._gb_pos.setLayout(lay_pos) + lay.addWidget(self._gb_pos, 3, 0) + + # Angulation Interlock + self._gb_ang = QGroupBox('Angulation Interlock') + lay_ang = self._setupIntlkTypeLayout('Ang') + self._gb_ang.setLayout(lay_ang) + lay.addWidget(self._gb_ang, 3, 1) + + def _setupIntlkGenLayout(self): + self._ld_genenbl = QLabel( + 'Enable: ', self, alignment=Qt.AlignRight | Qt.AlignBottom) + self._sb_genenbl = PyDMStateButton( + self, self.devpref.substitute(propty='IntlkEn-Sel')) + self._led_genenbl = SiriusLedState( + self, self.devpref.substitute(propty='IntlkEn-Sts')) + + self._ld_genclr = QLabel( + 'Reset: ', self, alignment=Qt.AlignRight | Qt.AlignBottom) + self._bt_genclr = PyDMPushButton( + self, + init_channel=self.devpref.substitute(propty='IntlkClr-Cmd'), + pressValue=1) + self._bt_genclr.setIcon(qta.icon('fa5s.sync')) + self._bt_genclr.setObjectName('clr') + self._bt_genclr.setStyleSheet( + '#clr{min-width:25px; max-width:25px; icon-size:20px;}') + + self._ld_intlkinst = QLabel( + 'Intantaneous Interlock: ', self, + alignment=Qt.AlignRight | Qt.AlignBottom) + self._led_intlkinst = SiriusLedAlert( + self, self.devpref.substitute(propty='Intlk-Mon')) + + self._ld_intlkltc = QLabel( + 'Latch Interlock: ', self, + alignment=Qt.AlignRight | Qt.AlignBottom) + self._led_intlkltc = SiriusLedAlert( + self, self.devpref.substitute(propty='IntlkLtc-Mon')) + + self._ld_minsumenbl = QLabel( + 'Min.Sum.Thres. Enable: ', self, + alignment=Qt.AlignRight | Qt.AlignBottom) + self._ld_minsumenbl.setToolTip( + 'If enabled, enable interlock only if minimum sum' + ' threshold is exceeded.') + self._sb_minsumenbl = PyDMStateButton( + self, self.devpref.substitute(propty='IntlkMinSumEn-Sel')) + self._led_minsumenbl = SiriusLedState( + self, self.devpref.substitute(propty='IntlkMinSumEn-Sts')) + + self._ld_minsumlim = QLabel( + 'Min.Sum.Thres.[sum count]: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + self._le_minsumlim = SiriusLineEdit( + self, self.devpref.substitute(propty='IntlkLmtMinSum-SP')) + self._le_minsumlim.setStyleSheet('QLineEdit{max-width: 12em;}') + self._lb_minsumlim = SiriusLabel( + self, self.devpref.substitute(propty='IntlkLmtMinSum-RB')) + self._lb_minsumlim.displayFormat = SiriusLabel.Exponential + self._lb_minsumlim.precisionFromPV = False + self._lb_minsumlim.precision = 16 + self._lb_minsumlim.showUnits = True + + lay = QGridLayout() + lay.setAlignment(Qt.AlignCenter) + lay.addWidget(self._ld_genenbl, 0, 0) + lay.addWidget(self._sb_genenbl, 0, 1) + lay.addWidget(self._led_genenbl, 0, 2, alignment=Qt.AlignLeft) + lay.addWidget(self._ld_genclr, 1, 0) + lay.addWidget(self._bt_genclr, 1, 1, alignment=Qt.AlignCenter) + lay.addWidget(self._ld_intlkinst, 2, 0) + lay.addWidget(self._led_intlkinst, 2, 1) + lay.addWidget(self._ld_intlkltc, 3, 0) + lay.addWidget(self._led_intlkltc, 3, 1) + lay.addItem(QSpacerItem(1, 15, QSzPlc.Ignored, QSzPlc.Fixed), 4, 0) + lay.addWidget(self._ld_minsumenbl, 5, 0) + lay.addWidget(self._sb_minsumenbl, 5, 1) + lay.addWidget(self._led_minsumenbl, 5, 2, alignment=Qt.AlignLeft) + lay.addWidget(self._ld_minsumlim, 6, 0) + lay.addWidget(self._le_minsumlim, 6, 1) + lay.addWidget(self._lb_minsumlim, 6, 2) + return lay + + def _setupIntlkTypeLayout(self, intlk): + unit = 'nm' + + ld_valx = QLabel( + intlk+'. X ['+unit+']: ', self, + alignment=Qt.AlignRight | Qt.AlignBottom) + lb_valx = SiriusLabel( + self, self.devpref.substitute(propty='Intlk'+intlk+'X-Mon')) + ld_valy = QLabel( + intlk+'. Y ['+unit+']: ', self, + alignment=Qt.AlignRight | Qt.AlignBottom) + lb_valy = SiriusLabel( + self, self.devpref.substitute(propty='Intlk'+intlk+'Y-Mon')) + + ld_enbl = QLabel( + 'Enable: ', self, alignment=Qt.AlignRight | Qt.AlignBottom) + sb_enbl = PyDMStateButton( + self, self.devpref.substitute(propty='Intlk'+intlk+'En-Sel')) + led_enbl = SiriusLedState( + self, self.devpref.substitute(propty='Intlk'+intlk+'En-Sts')) + + ld_clr = QLabel( + 'Reset: ', self, alignment=Qt.AlignRight | Qt.AlignBottom) + bt_clr = PyDMPushButton( + self, init_channel=self.devpref.substitute( + propty='Intlk'+intlk+'Clr-Cmd'), pressValue=1) + bt_clr.setIcon(qta.icon('fa5s.sync')) + bt_clr.setObjectName('clr') + bt_clr.setStyleSheet( + '#clr{min-width:25px; max-width:25px; icon-size:20px;}') + + ld_minx = QLabel( + 'Min.X Thres.['+unit+']: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + sb_minx = SiriusSpinbox( + self, self.devpref.substitute(propty='IntlkLmt'+intlk+'MinX-SP')) + sb_minx.limitsFromChannel = False + sb_minx.setMinimum(-1e9) + sb_minx.setMaximum(+1e9) + lb_minx = SiriusLabel( + self, self.devpref.substitute(propty='IntlkLmt'+intlk+'MinX-RB')) + + ld_maxx = QLabel( + 'Max.X Thres.['+unit+']: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + sb_maxx = SiriusSpinbox( + self, self.devpref.substitute(propty='IntlkLmt'+intlk+'MaxX-SP')) + sb_maxx.limitsFromChannel = False + sb_maxx.setMinimum(-1e9) + sb_maxx.setMaximum(+1e9) + lb_maxx = SiriusLabel( + self, self.devpref.substitute(propty='IntlkLmt'+intlk+'MaxX-RB')) + + ld_miny = QLabel( + 'Min.Y Thres.['+unit+']: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + sb_miny = SiriusSpinbox( + self, self.devpref.substitute(propty='IntlkLmt'+intlk+'MinY-SP')) + sb_miny.limitsFromChannel = False + sb_miny.setMinimum(-1e9) + sb_miny.setMaximum(+1e9) + lb_miny = SiriusLabel( + self, self.devpref.substitute(propty='IntlkLmt'+intlk+'MinY-RB')) + + ld_maxy = QLabel( + 'Max.Y Thres.['+unit+']: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + sb_maxy = SiriusSpinbox( + self, self.devpref.substitute(propty='IntlkLmt'+intlk+'MaxY-SP')) + sb_maxy.limitsFromChannel = False + sb_maxy.setMinimum(-1e9) + sb_maxy.setMaximum(+1e9) + lb_maxy = SiriusLabel( + self, self.devpref.substitute(propty='IntlkLmt'+intlk+'MaxY-RB')) + + ld_leglow = QLabel( + 'Lower', self, alignment=Qt.AlignCenter) + ld_leghigh = QLabel( + 'Upper', self, alignment=Qt.AlignCenter) + + ld_leginst = QLabel( + '<h4>Instantaneous</h4>', self, alignment=Qt.AlignCenter) + ld_leginst_x = QLabel( + 'X', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + led_inst_xlow = SiriusLedAlert( + self, self.devpref.substitute(propty='Intlk'+intlk+'LowerX-Mon')) + led_inst_xhigh = SiriusLedAlert( + self, self.devpref.substitute(propty='Intlk'+intlk+'UpperX-Mon')) + ld_leginst_y = QLabel( + 'Y', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + led_inst_ylow = SiriusLedAlert( + self, self.devpref.substitute(propty='Intlk'+intlk+'LowerY-Mon')) + led_inst_yhigh = SiriusLedAlert( + self, self.devpref.substitute(propty='Intlk'+intlk+'UpperY-Mon')) + + ld_legltc = QLabel( + '<h4>Latch</h4>', self, alignment=Qt.AlignCenter) + ld_legltc_x = QLabel( + 'X', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + led_ltc_xlow = SiriusLedAlert( + self, self.devpref.substitute( + propty='Intlk'+intlk+'LowerLtcX-Mon')) + led_ltc_xhigh = SiriusLedAlert( + self, self.devpref.substitute( + propty='Intlk'+intlk+'UpperLtcX-Mon')) + ld_legltc_y = QLabel( + 'Y', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + led_ltc_ylow = SiriusLedAlert( + self, self.devpref.substitute( + propty='Intlk'+intlk+'LowerLtcY-Mon')) + led_ltc_yhigh = SiriusLedAlert( + self, self.devpref.substitute( + propty='Intlk'+intlk+'UpperLtcY-Mon')) + + lay_mon = QGridLayout() + lay_mon.setAlignment(Qt.AlignCenter) + lay_mon.addWidget(ld_leglow, 0, 1) + lay_mon.addWidget(ld_leghigh, 0, 2) + lay_mon.addWidget(ld_leginst, 1, 0) + lay_mon.addWidget(ld_leginst_x, 2, 0) + lay_mon.addWidget(led_inst_xlow, 2, 1) + lay_mon.addWidget(led_inst_xhigh, 2, 2) + lay_mon.addWidget(ld_leginst_y, 3, 0) + lay_mon.addWidget(led_inst_ylow, 3, 1) + lay_mon.addWidget(led_inst_yhigh, 3, 2) + lay_mon.addWidget(ld_legltc, 4, 0) + lay_mon.addWidget(ld_legltc_x, 5, 0) + lay_mon.addWidget(led_ltc_xlow, 5, 1) + lay_mon.addWidget(led_ltc_xhigh, 5, 2) + lay_mon.addWidget(ld_legltc_y, 6, 0) + lay_mon.addWidget(led_ltc_ylow, 6, 1) + lay_mon.addWidget(led_ltc_yhigh, 6, 2) + + lay = QGridLayout() + lay.setAlignment(Qt.AlignTop) + lay.addWidget(ld_valx, 0, 0) + lay.addWidget(lb_valx, 0, 1) + lay.addWidget(ld_valy, 1, 0) + lay.addWidget(lb_valy, 1, 1) + lay.addWidget(ld_enbl, 2, 0) + lay.addWidget(sb_enbl, 2, 1) + lay.addWidget(led_enbl, 2, 2) + lay.addWidget(ld_clr, 3, 0) + lay.addWidget(bt_clr, 3, 1, alignment=Qt.AlignCenter) + lay.addWidget(ld_minx, 4, 0) + lay.addWidget(sb_minx, 4, 1) + lay.addWidget(lb_minx, 4, 2) + lay.addWidget(ld_maxx, 5, 0) + lay.addWidget(sb_maxx, 5, 1) + lay.addWidget(lb_maxx, 5, 2) + lay.addWidget(ld_miny, 6, 0) + lay.addWidget(sb_miny, 6, 1) + lay.addWidget(lb_miny, 6, 2) + lay.addWidget(ld_maxy, 7, 0) + lay.addWidget(sb_maxy, 7, 1) + lay.addWidget(lb_maxy, 7, 2) + lay.addItem(QSpacerItem(1, 15, QSzPlc.Ignored, QSzPlc.Fixed), 8, 0) + lay.addLayout(lay_mon, 9, 0, 1, 3) + return lay
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_orbintlk/custom_widgets.html b/_modules/siriushla/si_ap_orbintlk/custom_widgets.html new file mode 100644 index 000000000..d81c7faa8 --- /dev/null +++ b/_modules/siriushla/si_ap_orbintlk/custom_widgets.html @@ -0,0 +1,623 @@ + + + + + + siriushla.si_ap_orbintlk.custom_widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_ap_orbintlk.custom_widgets

+"""BPM Interlock Buttons."""
+
+import time as _time
+import numpy as _np
+
+from qtpy.QtCore import Qt, Signal, Slot, QSize
+from qtpy.QtWidgets import QPushButton, QComboBox, QSizePolicy as QSzPlcy, \
+    QWidget, QHBoxLayout, QCheckBox, QLabel, QGridLayout, QSpinBox, QGroupBox,\
+    QDoubleSpinBox, QDialog, QVBoxLayout, QScrollArea
+
+from pydm.widgets.base import PyDMWidget
+
+from ..widgets import SiriusLedState, QLed, SelectionMatrixWidget, \
+    SiriusConnectionSignal, SiriusLabel
+from ..widgets.dialog import ReportDialog, ProgressDialog
+from ..common.epics.task import EpicsConnector, EpicsSetter, \
+    EpicsChecker, EpicsWait
+from ..as_ap_configdb import LoadConfigDialog
+from .base import BaseObject
+
+
+
+[docs] +class RefOrbComboBox(QComboBox): + """Reference Orbit Selection ComboBox.""" + + refOrbChanged = Signal(str) + + def __init__(self, parent=None): + super().__init__(parent) + + self.setSizePolicy(QSzPlcy.Expanding, QSzPlcy.Preferred) + self.setMaxVisibleItems(10) + self._choose_reforb = [ + 'Zero', 'ref_orb', 'bba_orb', 'other...'] + for item in self._choose_reforb: + self.addItem(item) + self.setCurrentText('ref_orb') + self.activated.connect(self._add_reforb_entry) + + @Slot(int) + def _add_reforb_entry(self, index): + text = self.itemText(index) + if not text.startswith('other'): + self.refOrbChanged.emit(text) + return + win = LoadConfigDialog('si_orbit', self) + confname, status = win.exec_() + if not status: + self.setCurrentIndex(0) + return + self.insertItem(index, confname) + self.setCurrentIndex(index) + self.refOrbChanged.emit(confname)
+ + + +class _BPMSelectionWidget(BaseObject, SelectionMatrixWidget): + """BPM Base Selection Widget.""" + + def __init__( + self, parent=None, title='', propty='', prefix='', **kwargs): + """Init.""" + BaseObject.__init__(self, prefix) + + self.propty = propty + + SelectionMatrixWidget.__init__( + self, parent=parent, title=title, **kwargs) + + def sizeHint(self): + """Return the base size of the widget.""" + return QSize(500, 1200) + + def get_headers(self): + nicks = self.BPM_NICKNAMES + top_headers = sorted({nick[2:] for nick in nicks}) + top_headers = top_headers[-2:] + top_headers[:-2] + side_headers = sorted({nick[:2] for nick in nicks}) + side_headers.append(side_headers[0]) + return top_headers, side_headers + + def get_widgets(self): + widgets = list() + sz_polc = QSzPlcy(QSzPlcy.Fixed, QSzPlcy.Fixed) + for idx, nick in enumerate(self.BPM_NICKNAMES): + wid = QWidget(self.parent()) + tooltip = '{0}; Pos = {1:5.1f} m'.format( + nick, self.BPM_POS[idx]) + if self.propty: + item = SiriusLedState(self) + item.setParent(wid) + item.setSizePolicy(sz_polc) + item.setToolTip(tooltip) + else: + item = QCheckBox(self) + item.setSizePolicy(sz_polc) + hbl = QHBoxLayout(wid) + hbl.setContentsMargins(0, 0, 0, 0) + hbl.addWidget(item) + widgets.append(wid) + return widgets + + def get_positions(self): + top_headers, _ = self.headers + positions = list() + for idx, nick in enumerate(self.BPM_NICKNAMES): + i = (idx + 1) // len(top_headers) + j = top_headers.index(nick[2:]) + positions.append((i, j)) + return positions + + +
+[docs] +class BPMIntlkEnblWidget(_BPMSelectionWidget, PyDMWidget): + """BPM Orbit Interlock Enable Widget.""" + + def __init__(self, parent=None, propty='', title='', prefix=''): + """Init.""" + _BPMSelectionWidget.__init__( + self, parent=parent, propty=propty, title=title, prefix=prefix) + + address = self.hlprefix.substitute(prefix=self.prefix, propty=propty) + PyDMWidget.__init__(self, init_channel=address.replace('-SP', '-RB')) + + # initialize auxiliary attributes + self.propty = propty + + # create channels + self.pv_sel = SiriusConnectionSignal(address) + + self.setObjectName('SIApp') + self.setStyleSheet('#SIApp{min-width: 27em; max-width: 27em;}') + + # connect signals and slots + self.applyChangesClicked.connect(self.send_value) + +
+[docs] + def send_value(self): + """Send new value.""" + val = self.pv_sel.getvalue() + if val is None: + return + for idx, wid in enumerate(self.widgets): + led = wid.findChild(QLed) + if led.isSelected(): + val[idx] = int(not led.state) + led.setSelected(False) + self.pv_sel.send_value_signal[_np.ndarray].emit(val)
+ + +
+[docs] + def value_changed(self, new_val): + if not isinstance(new_val, _np.ndarray): + return + super(BPMIntlkEnblWidget, self).value_changed(new_val) + for i, wid in enumerate(self.widgets): + led = wid.findChild(QLed) + led.state = self.value[i] + self.adjustSize() + parent = self.parent() + while parent is not None: + parent.adjustSize() + if isinstance(parent, QDialog): + break + parent = parent.parent()
+ + +
+[docs] + def connection_changed(self, new_conn): + super(BPMIntlkEnblWidget, self).connection_changed(new_conn) + for wid in self.widgets: + led = wid.findChild(QLed) + led.setEnabled(new_conn)
+
+ + + +
+[docs] +class BPMIntlkLimSPWidget(BaseObject, QWidget): + """BPM Orbit Interlock Limit Setpoint Widget.""" + + def __init__(self, parent=None, metric='', prefix=''): + """Init.""" + BaseObject.__init__(self, prefix) + QWidget.__init__(self, parent) + + # initialize auxiliary attributes + self.metric = metric.lower() + if 'sum' in self.metric: + self.lim_sp = ['MinSumLim-SP', ] + self.title = 'Min.Sum. Thresholds' + elif 'pos' in self.metric: + self.lim_sp = [ + 'PosXMinLim-SP', 'PosXMaxLim-SP', + 'PosYMinLim-SP', 'PosYMaxLim-SP'] + self.title = 'Position Thresholds' + elif 'ang' in self.metric: + self.lim_sp = [ + 'AngXMinLim-SP', 'AngXMaxLim-SP', + 'AngYMinLim-SP', 'AngYMaxLim-SP'] + self.title = 'Angulation Thresholds' + else: + raise ValueError(metric) + + if 'sum' in self.metric: + self._create_pvs('SlowSumRaw-Mon') + self._summon = _np.zeros(len(self.BPM_NAMES), dtype=float) + else: + self._set_ref_orb('ref_orb') + + self.lim_pvs = { + p: SiriusConnectionSignal(self.hlprefix.substitute(propty=p)) + for p in self.lim_sp} + + # initialize super + self.setObjectName('SIApp') + + self._setupUi() + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + title = QLabel(self.title, self, alignment=Qt.AlignCenter) + title.setStyleSheet("font-weight: bold;") + title.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + + # limit setpoints + self._wid_lims = QGroupBox('Select Thresholds: ') + lay_lims = QGridLayout(self._wid_lims) + lay_lims.setAlignment(Qt.AlignTop) + + row = 0 + if 'sum' in self.metric: + text = '\nThresholds must be set in FAcq rate counts,\n'\ + 'considering polynomial calibration disabled.\n'\ + 'Here we make available you to read Sum-Mon\n'\ + 'values, in Monit rate counts, and convert them\n'\ + 'to orbit interlock counts using Monit/FAcq\n'\ + 'ratio. You can also apply a scale factor to the\n'\ + 'values read.\n\n' + self._label_help = QLabel(text, self) + lay_lims.addWidget(self._label_help, row, 0, 1, 2) + + row += 1 + self._pb_get = QPushButton('Get current Sum-Mon', self) + self._pb_get.released.connect(self._get_new_sum) + lay_lims.addWidget(self._pb_get, row, 0, 1, 2) + row += 1 + self._label_getsts = QLabel('\n', self) + lay_lims.addWidget(self._label_getsts, row, 0, 1, 2) + + row += 1 + self._label_scl = QLabel('Scale: ', self) + lay_lims.addWidget(self._label_scl, row, 0) + self._spin_scl = QDoubleSpinBox(self) + self._spin_scl.setDecimals(2) + self._spin_scl.setValue(1.00) + self._spin_scl.setMinimum(-100.00) + self._spin_scl.setMaximum(+100.00) + lay_lims.addWidget(self._spin_scl, row, 1) + else: + self._head_value = QLabel('Value', self, alignment=Qt.AlignCenter) + lay_lims.addWidget(self._head_value, 0, 1) + self._head_send = QLabel('Apply', self, alignment=Qt.AlignCenter) + lay_lims.addWidget(self._head_send, 0, 2) + + self._spins, self._checks = dict(), dict() + for lsp in self.lim_sp: + row += 1 + text = lsp.split('-')[0].split('Lim')[0]+' [nm]: ' + label = QLabel(text, self, alignment=Qt.AlignRight) + lay_lims.addWidget(label, row, 0) + spin = QSpinBox(self) + self._spins[lsp] = spin + spin.setValue(0) + spin.setMinimum(-1e9) + spin.setMaximum(1e9) + lay_lims.addWidget(spin, row, 1) + check = QCheckBox(self) + self._checks[lsp] = check + lay_lims.addWidget(check, row, 2, alignment=Qt.AlignCenter) + + row += 1 + self._label_reforb = QLabel( + '\nChoose Ref.Orb. to calculate reference\n' + + self.title.lower()+' around which we\napply the values above:') + lay_lims.addWidget(self._label_reforb, row, 0, 1, 3) + + row += 1 + self._cb_reforb = RefOrbComboBox(self) + self._cb_reforb.refOrbChanged.connect(self._set_ref_orb) + lay_lims.addWidget(self._cb_reforb, row, 0, 1, 3) + + if 'pos' in self.metric: + text = '\n\nBPM calculation consider the position\n' \ + 'estimative:' \ + '\n\n(pos@downstream+pos@upstream)/2\n\n' \ + 'where the pairs upstream/downstream\nfolow:\n' \ + ' - M1/M2\n' \ + ' - C1-1/C1-2\n' \ + ' - C2/C3-1\n' \ + ' - C3-2/C4\n' + elif 'ang' in self.metric: + text = '\n\nBPM calculation consider the angulation\n' \ + 'estimative:' \ + '\n\n(pos@downstream - pos@upstream)\n\n' \ + 'where the pairs upstream/downstream\nfolow:\n' \ + ' - M1/M2\n' \ + ' - C1-1/C1-2\n' \ + ' - C2/C3-1\n' \ + ' - C3-2/C4\n' + row += 1 + self._label_help = QLabel(text, self) + lay_lims.addWidget(self._label_help, row, 0, 1, 3) + + # BPM selection + groupsel = QGroupBox('Select BPMs:') + groupsel.setObjectName('groupsel') + groupsel.setStyleSheet( + '#groupsel{min-width: 27em; max-width: 27em;}') + self._bpm_sel = _BPMSelectionWidget( + self, show_toggle_all_false=False, + toggle_all_true_text='Select All', prefix=self.prefix) + lay_groupsel = QGridLayout(groupsel) + lay_groupsel.addWidget(self._bpm_sel) + + # connect signals and slots + self._bpm_sel.applyChangesClicked.connect(self.send_value) + + lay = QGridLayout(self) + lay.addWidget(title, 0, 0, 1, 2) + lay.addWidget(self._wid_lims, 1, 0) + lay.addWidget(groupsel, 1, 1) + + def _set_ref_orb(self, text): + self._reforb = dict() + if text.lower() == 'zero': + self._reforb['x'] = _np.zeros(len(self.BPM_NAMES), dtype=float) + self._reforb['y'] = _np.zeros(len(self.BPM_NAMES), dtype=float) + else: + data = self.get_ref_orb(text) + self._reforb['x'] = data['x'] + self._reforb['y'] = data['y'] + + def _get_new_sum(self): + self._summon = _np.array( + self._get_values('SlowSumRaw-Mon'), dtype=float) + text = 'Read at ' + _time.strftime( + '%d/%m/%Y %H:%M:%S\n', _time.localtime(_time.time())) + self._label_getsts.setText(text) + +
+[docs] + def send_value(self): + """Send new value.""" + idxsel = list() + for idx, wid in enumerate(self._bpm_sel.widgets): + check = wid.findChild(QCheckBox) + if check.isChecked(): + idxsel.append(idx) + check.setChecked(False) + idxsel = _np.array(idxsel, dtype=int) + if not idxsel.size: + return + + if 'sum' in self.metric: + sumintlk = self._summon * self.monitsum2intlksum_factor + allvals = self.lim_pvs[self.lim_sp[0]].getvalue().astype(_np.int_) + allvals[idxsel] = self._spin_scl.value() * sumintlk[idxsel] + allvals[idxsel] = self.calc_intlk_metric( + allvals, operation='min')[idxsel] + values = [allvals, ] + pvs = [self.hlprefix.substitute(propty=self.lim_sp[0]), ] + else: + pvs, values = list(), list() + for lsp in self.lim_sp: + if not self._checks[lsp].isChecked(): + continue + lval = self._spins[lsp].value() + plan = 'y' if 'y' in lsp.lower() else 'x' + metric = self.calc_intlk_metric( + self._reforb[plan], metric=self.metric) + allvals = self.lim_pvs[lsp].getvalue() + allvals[idxsel] = _np.round(metric[idxsel] + lval) + values.append(allvals) + pvs.append(self.hlprefix.substitute(propty=lsp)) + + delays = [0.0, ] * len(pvs) + + self._items_success = list() + self._items_fail = list() + conn = EpicsConnector(pvs, parent=self) + task_set = EpicsSetter(pvs, values, delays, parent=self) + task_sleep = EpicsWait([None, ]*10, wait_time=2.0, parent=self) + task_check = EpicsChecker(pvs, values, delays, parent=self) + task_check.itemChecked.connect(self._check_status) + + dlg = ProgressDialog( + ['Connecting...', 'Setting...', 'Waiting...', 'Checking...'], + [conn, task_set, task_sleep, task_check], parent=self) + ret = dlg.exec_() + if ret == dlg.Rejected: + return + + if self._items_fail: + report = ReportDialog(self._items_fail, self) + report.exec_() + return
+ + + @Slot(str, bool) + def _check_status(self, item, status): + if status: + self._items_success.append((item, True)) + else: + self._items_fail.append(item)
+ + + +
+[docs] +class MonitoredDevicesDialog(BaseObject, QDialog): + """Monitored Devices Detail Dialog.""" + + def __init__(self, parent=None, prefix='', propty=''): + """Init.""" + BaseObject.__init__(self, prefix) + QWidget.__init__(self, parent) + title = 'Monitored Devices' + self.setObjectName('SIApp') + self.setWindowTitle(title) + + self._desc = QLabel('<h4>'+title+'</h4>') + self._desc.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + self._label = SiriusLabel( + self, self.hlprefix.substitute(propty=propty)) + self._label.displayFormat = SiriusLabel.DisplayFormat.String + + scarea = QScrollArea(self) + scarea.setStyleSheet( + '.QScrollArea{min-height: 30em;}') + scarea.setSizeAdjustPolicy(scarea.AdjustToContents) + scarea.setWidgetResizable(True) + + scr_ar_wid = QWidget() + scr_ar_wid.setObjectName('scrollarea') + scr_ar_wid.setStyleSheet( + '#scrollarea {background-color: transparent;}') + gdl = QGridLayout(scr_ar_wid) + gdl.addWidget(self._desc) + gdl.addWidget(self._label) + scarea.setWidget(scr_ar_wid) + + lay = QVBoxLayout(self) + lay.addWidget(scarea)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_orbintlk/graphics.html b/_modules/siriushla/si_ap_orbintlk/graphics.html new file mode 100644 index 000000000..877ef1e5f --- /dev/null +++ b/_modules/siriushla/si_ap_orbintlk/graphics.html @@ -0,0 +1,1018 @@ + + + + + + siriushla.si_ap_orbintlk.graphics — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_ap_orbintlk.graphics

+"""Graph Widgets."""
+
+import time as _time
+import numpy as _np
+
+from qtpy.QtCore import Qt, Slot, Signal, QSize, QThread
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QGridLayout, QWidget, QLabel, QHBoxLayout, \
+    QComboBox, QToolTip, QSizePolicy as QSzPlcy, QTabWidget
+
+import qtawesome as qta
+
+from pyqtgraph import mkPen, mkBrush
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+
+from siriushla.util import run_newprocess
+from siriushla.widgets import SiriusWaveformPlot
+
+from .base import BaseObject
+from .custom_widgets import RefOrbComboBox
+
+
+
+[docs] +class GraphMonitorWidget(QWidget): + """Graph Monitor Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix): + super().__init__(parent) + self.prefix = prefix + self.setObjectName('SIApp') + self._setupUi() + + def _setupUi(self): + tab = QTabWidget(self) + tab.setObjectName('SITab') + tab.setStyleSheet(""" + QTabWidget::pane { + border-right: 2px solid gray; + border-bottom: 2px solid gray; + border-left: 2px solid gray; + }""") + tab.addTab(self._setupTab('Position'), 'Position') + tab.addTab(self._setupTab('Angle'), 'Angle') + tab.addTab(self._setupTab('Min.Sum. Threshold'), 'Min.Sum. Threshold') + + lay = QGridLayout(self) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(tab) + + def _setupTab(self, intlktype): + wid = QWidget() + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop) + + label = QLabel( + '<h3>'+intlktype+'</h3>', self, alignment=Qt.AlignCenter) + lay.addWidget(label, 0, 0) + + if intlktype == 'Min.Sum. Threshold': + graph = MinSumGraphWidget(self, self.prefix) + lay.addWidget(graph, 2, 0) + elif intlktype == 'Position': + propty_sel = GraphProptySelWidget(self) + lay.addWidget(propty_sel, 1, 0) + + graphx = PosXGraphWidget(self, self.prefix) + lay.addWidget(graphx, 2, 0) + legx = GraphLegendWidget(self, 'Pos', 'X') + lay.addWidget(legx, 3, 0) + graphy = PosYGraphWidget(self, self.prefix) + lay.addWidget(graphy, 4, 0) + legy = GraphLegendWidget(self, 'Pos', 'Y') + lay.addWidget(legy, 5, 0) + + propty_sel.propty_intlk_changed.connect( + graphx.update_propty_intlktype) + propty_sel.propty_reforb_changed.connect( + graphx.update_propty_reforb) + propty_sel.propty_comp_changed.connect( + graphx.update_propty_comptype) + propty_sel.propty_intlk_changed.connect( + graphy.update_propty_intlktype) + propty_sel.propty_reforb_changed.connect( + graphy.update_propty_reforb) + propty_sel.propty_comp_changed.connect( + graphy.update_propty_comptype) + elif intlktype == 'Angle': + propty_sel = GraphProptySelWidget(self) + lay.addWidget(propty_sel, 1, 0) + + graphx = AngXGraphWidget(self, self.prefix) + lay.addWidget(graphx, 2, 0) + legx = GraphLegendWidget(self, 'Ang', 'X') + lay.addWidget(legx, 3, 0) + graphy = AngYGraphWidget(self, self.prefix) + lay.addWidget(graphy, 4, 0) + legy = GraphLegendWidget(self, 'Ang', 'Y') + lay.addWidget(legy, 5, 0) + + propty_sel.propty_intlk_changed.connect( + graphx.update_propty_intlktype) + propty_sel.propty_reforb_changed.connect( + graphx.update_propty_reforb) + propty_sel.propty_comp_changed.connect( + graphx.update_propty_comptype) + propty_sel.propty_intlk_changed.connect( + graphy.update_propty_intlktype) + propty_sel.propty_reforb_changed.connect( + graphy.update_propty_reforb) + propty_sel.propty_comp_changed.connect( + graphy.update_propty_comptype) + + return wid
+ + + +
+[docs] +class GraphProptySelWidget(QWidget): + """Graph Interlock and Comparision Type Selelction Widget.""" + + propty_intlk_changed = Signal(str) + propty_comp_changed = Signal(str) + propty_reforb_changed = Signal(str) + + def __init__(self, parent=None): + super().__init__(parent) + + self._choose_plotopt = { + 'Instantaneous': ['General', ], + 'Latch': ['General', ], + } + self._init_intlkval = 'Latch' + + self._setupUi() + + def _setupUi(self): + self._label_prop = QLabel('Properties: ', self) + self._label_prop.setStyleSheet( + 'min-width: 8em; max-width: 8em;') + + self._label_intlk = QLabel('Interlock: ', self) + self._cb_intlk = QComboBox(self) + self._cb_intlk.setSizePolicy( + QSzPlcy.Expanding, QSzPlcy.Preferred) + intlkitems = list(self._choose_plotopt.keys()) + self._cb_intlk.addItems(intlkitems) + self._cb_intlk.setCurrentText(self._init_intlkval) + self._cb_intlk.currentTextChanged.connect( + self.propty_intlk_changed.emit) + self._cb_intlk.currentTextChanged.connect( + self._set_plotopt_items) + + self._label_comp = QLabel('', self, alignment=Qt.AlignRight) + icon = qta.icon('mdi.circle-outline') + pixmap = icon.pixmap(icon.actualSize(QSize(20, 20))) + self._label_comp.setPixmap(pixmap) + self._label_comp.setSizePolicy(QSzPlcy.Fixed, QSzPlcy.Fixed) + self._cb_comp = QComboBox(self) + self._cb_comp.setSizePolicy( + QSzPlcy.Expanding, QSzPlcy.Preferred) + compitems = self._choose_plotopt[self._init_intlkval] + self._cb_comp.addItems(compitems) + self._cb_comp.currentTextChanged.connect( + self.propty_comp_changed.emit) + + self._label_reforb = QLabel('Ref.Orb.: ') + self._cb_reforb = RefOrbComboBox(self) + self._cb_reforb.refOrbChanged.connect(self.propty_reforb_changed.emit) + + lay = QGridLayout(self) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(self._label_prop, 0, 0) + lay.addWidget(self._label_intlk, 0, 1) + lay.addWidget(self._cb_intlk, 0, 2) + lay.addWidget(self._label_comp, 0, 3) + lay.addWidget(self._cb_comp, 0, 4) + lay.addWidget(self._label_reforb, 0, 5) + lay.addWidget(self._cb_reforb, 0, 6) + + def _set_plotopt_items(self, key): + self._cb_comp.currentTextChanged.disconnect() + olditem = self._cb_comp.currentText() + self._cb_comp.clear() + newitems = self._choose_plotopt[self._cb_intlk.currentText()] + self._cb_comp.addItems(newitems) + if olditem in newitems: + self._cb_comp.setCurrentText(olditem) + else: + self._cb_comp.setCurrentIndex(0) + self.propty_comp_changed.emit(self._cb_comp.currentText()) + self._cb_comp.currentTextChanged.connect( + self.propty_comp_changed.emit)
+ + + +
+[docs] +class GraphLegendWidget(QWidget): + """Graph Legend Widget.""" + + def __init__(self, parent=None, metric='', plan=''): + super().__init__(parent) + self._metric = metric + self._plan = plan.upper() + + self._setupUi() + + def _setupUi(self): + self._label_leg = QLabel('Legend: ', self) + + self._label_symcur = QLabel('', self, alignment=Qt.AlignRight) + icon_cur = qta.icon( + 'fa5s.window-minimize', offset=(0.0, -0.4), rotated=-45, + color='red' if self._plan == 'Y' else 'blue') + pixmap_cur = icon_cur.pixmap(icon_cur.actualSize(QSize(20, 20))) + self._label_symcur.setPixmap(pixmap_cur) + self._label_symcur.setSizePolicy(QSzPlcy.Fixed, QSzPlcy.Fixed) + self._label_labcur = QLabel(self._metric + self._plan) + + self._label_symlim = QLabel() + icon_lim = qta.icon( + 'fa5s.window-minimize', 'fa5s.window-minimize', + options=[ + dict(scale_factor=0.4, offset=(-0.1, 0.0), + rotated=-45, color='black'), + dict(scale_factor=0.4, offset=(0.3, 0.0), + rotated=-45, color='black')]) + pixmap_lim = icon_lim.pixmap(icon_lim.actualSize(QSize(20, 20))) + self._label_symlim.setPixmap(pixmap_lim) + self._label_symlim.setSizePolicy(QSzPlcy.Fixed, QSzPlcy.Fixed) + self._label_lablim = QLabel(self._plan+' Thres RB') + + self._label_sym0 = QLabel('', self, alignment=Qt.AlignRight) + icon_s0 = qta.icon('mdi.cards-diamond-outline') + pixmap = icon_s0.pixmap(icon_s0.actualSize(QSize(20, 20))) + self._label_sym0.setPixmap(pixmap) + self._label_sym0.setSizePolicy(QSzPlcy.Fixed, QSzPlcy.Fixed) + self._label_lab0 = QLabel(self._plan+' Min/Max Intlk Mon') + + self._label_sym1 = QLabel('', self, alignment=Qt.AlignRight) + icon_s1 = qta.icon('mdi.circle-outline') + pixmap = icon_s1.pixmap(icon_s1.actualSize(QSize(20, 20))) + self._label_sym1.setPixmap(pixmap) + self._label_sym0.setSizePolicy(QSzPlcy.Fixed, QSzPlcy.Fixed) + self._label_lab1 = QLabel('X | Y Intlk Mon') + + self._label_symnok = QLabel('', self, alignment=Qt.AlignRight) + icon_nok = qta.icon('mdi.square', color='red') + pixmap_nok = icon_nok.pixmap(icon_nok.actualSize(QSize(20, 20))) + self._label_symnok.setPixmap(pixmap_nok) + self._label_symnok.setSizePolicy(QSzPlcy.Fixed, QSzPlcy.Fixed) + self._label_labnok = QLabel('Intlk Triggered (Limit exceeded)') + + self._label_symok = QLabel() + icon_ok = qta.icon('mdi.square', color='#00d900') + pixmap_ok = icon_ok.pixmap(icon_ok.actualSize(QSize(20, 20))) + self._label_symok.setPixmap(pixmap_ok) + self._label_symok.setSizePolicy(QSzPlcy.Fixed, QSzPlcy.Fixed) + self._label_labok = QLabel('Intlk Off (All ok)') + + lay = QHBoxLayout(self) + lay.setAlignment(Qt.AlignTop) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(self._label_leg) + lay.addStretch() + lay.addWidget(self._label_symcur) + lay.addWidget(self._label_labcur) + lay.addStretch() + lay.addWidget(self._label_symlim) + lay.addWidget(self._label_lablim) + lay.addStretch() + lay.addWidget(self._label_sym0) + lay.addWidget(self._label_lab0) + lay.addStretch() + lay.addWidget(self._label_sym1) + lay.addWidget(self._label_lab1) + lay.addStretch() + lay.addWidget(self._label_symnok) + lay.addWidget(self._label_labnok) + lay.addStretch() + lay.addWidget(self._label_symok) + lay.addWidget(self._label_labok)
+ + + +
+[docs] +class Graph(BaseObject, SiriusWaveformPlot): + """BPM orbit interlock data graph.""" + + def __init__(self, parent, intlktype): + """Init.""" + BaseObject.__init__(self) + SiriusWaveformPlot.__init__(self, parent) + self.setBackgroundColor(QColor(255, 255, 255)) + self.setAutoRangeX(True) + self.setAutoRangeY(True) + self.setShowXGrid(True) + self.setShowYGrid(True) + self.plotItem.setLabel('bottom', 's', units='m') + self._nok_pen = mkPen(QColor('black')) + self._nok_brush = mkBrush(QColor(255, 0, 0)) + self._ok_pen = mkPen(QColor('black')) + self._ok_brush = mkBrush(QColor(0, 200, 0)) + self._none_pen = mkPen(QColor('black')) + self._none_brush = mkBrush(QColor(220, 220, 220)) + + self._intlktype = intlktype + if 'Sum' in intlktype: + self.title = 'Min.Sum. Threshold' + ylabel, yunit = 'Sum', 'count' + elif 'Pos' in intlktype: + self.title = 'Position '+intlktype[-1] + ylabel, yunit = 'Position', 'm' + elif 'Ang' in intlktype: + self.title = 'Angulation '+intlktype[-1] + ylabel, yunit = 'Angulation', 'm' + self.plotItem.setLabel('left', ylabel, units=yunit) + + self._tooltips = [ + '{0}; Pos = {1:5.1f} m'.format( + self.BPM_NICKNAMES[idx], self.BPM_POS[idx]) + for idx in range(len(self.BPM_NAMES))] + self._c0 = 518.396 # SI length + self._x_data = _np.asarray(self.BPM_POS) + self._has_max = 'Sum' not in intlktype + + curve_idx = 0 + self.addChannel( + y_channel='MinLim', + x_channel='Pos', color='black', + lineStyle=2, lineWidth=2, + symbol='d', symbolSize=8) + self.minlim = self.curveAtIndex(curve_idx) + self._pen_min = None + self._brush_min = None + self.minlim.receiveXWaveform(self._x_data) + self.y_data_min = _np.zeros(self._x_data.size) + + if self._has_max: + curve_idx += 1 + self.addChannel( + y_channel='MaxLim', + x_channel='Pos', color='black', + lineStyle=3, lineWidth=2, + symbol='d', symbolSize=8) + self.maxlim = self.curveAtIndex(curve_idx) + self._pen_max = None + self._brush_max = None + self.maxlim.receiveXWaveform(self._x_data) + self.y_data_max = _np.zeros(self._x_data.size) + + curve_idx += 1 + name = 'Sum' if 'Sum' in intlktype else intlktype + color = 'red' if 'Y' in intlktype else 'blue' \ + if 'X' in intlktype else 'black' + self.addChannel( + y_channel=name, + x_channel='Pos', color=color, + lineStyle=1, lineWidth=3, + symbol='o', symbolSize=8) + self.meas = self.curveAtIndex(curve_idx) + self._pen_meas = None + self._brush_meas = None + self.meas.receiveXWaveform(self._x_data) + self.y_data_meas = _np.zeros(self._x_data.size) + + # connect sigMouseMoved + self.plotItem.scene().sigMouseMoved.connect(self._handle_mouse_moved) + + @property + def tooltips(self): + """Return tooltips.""" + return self._tooltips + + @property + def x_data(self): + """Return x_data.""" + return self._x_data + + @property + def y_data_meas(self): + """Return y_data for meas curve.""" + return self._y_data_meas + + @y_data_meas.setter + def y_data_meas(self, new): + self._y_data_meas = self._set_y_data(new) + self._redraw_curve( + self.meas, self._y_data_meas, self._pen_meas, self._brush_meas) + + @property + def symbols_meas(self): + """Return symbols for meas curve.""" + return self._symbols_meas + + @symbols_meas.setter + def symbols_meas(self, new): + self._symbols_meas = new + self._pen_meas, self._brush_meas = self._set_symbols(new) + + @property + def y_data_min(self): + """Return y_data for min curve.""" + return self._y_data_min + + @y_data_min.setter + def y_data_min(self, new): + self._y_data_min = self._set_y_data(new) + self._redraw_curve( + self.minlim, self._y_data_min, self._pen_min, self._brush_min) + + @property + def symbols_min(self): + """Return symbols for min curve.""" + return self._symbols_min + + @symbols_min.setter + def symbols_min(self, new): + self._symbols_min = new + self._pen_min, self._brush_min = self._set_symbols(new) + + @property + def y_data_max(self): + """Return y_data for max curve.""" + return self._y_data_max + + @y_data_max.setter + def y_data_max(self, new): + self._y_data_max = self._set_y_data(new) + self._redraw_curve( + self.maxlim, self._y_data_max, self._pen_max, self._brush_max) + + @property + def symbols_max(self): + """Return symbols for max curve.""" + return self._symbols_max + + @symbols_max.setter + def symbols_max(self, new): + self._symbols_max = new + self._pen_max, self._brush_max = self._set_symbols(new) + + def _set_y_data(self, new): + if new is None or any([n is None for n in new]): + return _np.array([0, ]) + return _np.array(new) + + def _set_symbols(self, new): + if new is not None: + all_brush, all_pen = [], [] + for sym in new: + if sym: + all_pen.append(self._ok_pen) + all_brush.append(self._ok_brush) + else: + all_pen.append(self._nok_pen) + all_brush.append(self._nok_brush) + pen = all_pen + brush = all_brush + else: + pen = None + brush = None + return pen, brush + + def _redraw_curve(self, curve, ydata, symbolpen, symbolbrush): + curve.receiveYWaveform(ydata) + curve.opts['symbolPen'] = symbolpen + curve.opts['symbolBrush'] = symbolbrush + curve.redrawCurve() + + def _handle_mouse_moved(self, pos): + """Show tooltip at mouse move.""" + posx = self.meas.scatter.mapFromScene(pos).x() + posx = posx % self._c0 + ind = _np.argmin(_np.abs(_np.array(self._x_data)-posx)) + txt = self.tooltips[ind] + QToolTip.showText( + self.mapToGlobal(pos.toPoint()), txt, self, self.geometry(), 500) + +
+[docs] + def mouseDoubleClickEvent(self, event): + """Reimplement mouseDoubleClickEvent.""" + posx = self.meas.xData + view = self.plotItem.getViewBox() + pos = view.mapSceneToView(event.pos()) + idx = _np.argmin(_np.abs(posx-pos.x())) + bpmname = self.BPM_NAMES[idx] + self._open_detail(bpmname) + super().mouseDoubleClickEvent(event)
+ + + def _open_detail(self, bpmname): + """Open BPM detail window.""" + run_newprocess(['sirius-hla-as-di-bpm.py', bpmname])
+ + + +class _BaseGraphWidget(BaseObject, QWidget): + """Power supply graph monitor widget.""" + + INTLKTYPE = '' + PROPTY_MEAS_DATA = '' + PROPTY_MEAS_SYMB = '' + PROPTY_MIN_DATA = '' + PROPTY_MIN_SYMB = '' + PROPTY_MAX_DATA = '' + PROPTY_MAX_SYMB = '' + + propIntlkTypeChanged = Signal(str) + propCompTypeChanged = Signal(str) + refOrbChanged = Signal(_np.ndarray) + + def __init__(self, parent=None, prefix=_vaca_prefix): + BaseObject.__init__(self, prefix) + QWidget.__init__(self, parent) + + self._property_intlktype = 'Latch' + self._property_comptype = 'General' + self._plan = '' if 'Sum' in self.INTLKTYPE else self.INTLKTYPE[-1] + self._plan = self._plan.lower() + self._reforb = _np.zeros(len(self.BPM_NAMES), dtype=float) + self.update_propty_reforb('ref_orb') + + self._setupUi() + + self._thread = _UpdateGraphThread( + self.INTLKTYPE, self.PROPTY_MEAS_DATA, self.PROPTY_MEAS_SYMB, + self.PROPTY_MIN_DATA, self.PROPTY_MIN_SYMB, + self.PROPTY_MAX_DATA, self.PROPTY_MAX_SYMB, + self._property_intlktype, self._property_comptype, self._reforb, + prefix=self.prefix, parent=self) + self.propIntlkTypeChanged.connect(self._thread.set_propintlktype) + self.propCompTypeChanged.connect(self._thread.set_propcomptype) + self.refOrbChanged.connect(self._thread.set_reforb) + self._thread.dataChanged.connect(self._update_curve) + self._thread.finished.connect(self._thread.deleteLater) + self._thread.start() + + @Slot(str) + def update_propty_intlktype(self, text): + """Update interlock type property.""" + self._property_intlktype = text + self.propIntlkTypeChanged.emit(self._property_intlktype) + + @Slot(str) + def update_propty_comptype(self, text): + """Update comparision type property.""" + self._property_comptype = text + self.propCompTypeChanged.emit(self._property_comptype) + + @Slot(str) + def update_propty_reforb(self, text): + """Update reference orbit property.""" + self._property_reforb = text + if text.lower() == 'zero': + self._reforb = _np.zeros(len(self.BPM_NAMES), dtype=float) + elif self._plan: + data = self.get_ref_orb(text) + self._reforb = _np.array(data[self._plan], dtype=float) + self.refOrbChanged.emit(self._reforb) + + def _setupUi(self): + self.graph = Graph(self, self.INTLKTYPE) + self.graph.setObjectName('graph') + + lay = QGridLayout(self) + lay.setContentsMargins(0, 6, 0, 0) + lay.addWidget(self.graph, 0, 0) + + self.setStyleSheet('#graph{min-width:60em;min-height:12em;}') + + def _update_curve(self, curve_symb_data): + curve, symb, data = curve_symb_data + setattr(self.graph, 'symbols_'+curve, symb) + setattr(self.graph, 'y_data_'+curve, data) + + def closeEvent(self, event): + """Finish thread on close.""" + self._thread.exit_task() + self._wait_thread() + super().closeEvent(event) + + def _wait_thread(self): + init = _time.time() + try: + while self._thread.isRunning(): + _time.sleep(0.1) + if _time.time() - init > 10: + raise Exception('Thread will not leave') + except RuntimeError: + pass + + +class _UpdateGraphThread(BaseObject, QThread): + """Update Graph Thread.""" + + UPDATE_FREQ = 2 # [Hz] + dataChanged = Signal(list) + + def __init__(self, intlktype, meas_data, meas_symb, + min_data, min_symb, max_data, max_symb, + propintlktype, propcomptype, reforb, + prefix='', parent=None): + BaseObject.__init__(self, prefix='') + QThread.__init__(self, parent) + + self.intlktype = intlktype + self.metric = intlktype[:-1].lower() + self.meas_data = meas_data + self.meas_symb = meas_symb + self.min_data = min_data + self.min_symb = min_symb + self.max_data = max_data + self.max_symb = max_symb + self._propintlktype = propintlktype + self._propcomptype = propcomptype + self._reforb = reforb + self._refmetric = _np.array(self.calc_intlk_metric( + self._reforb, metric=self.metric)) + + self._quit_task = False + + def set_propintlktype(self, new): + """Update property intlktype.""" + self._propintlktype = new + + def set_propcomptype(self, new): + """Update property comptype.""" + self._propcomptype = new + + def set_reforb(self, new): + """Update reference orbit.""" + self._reforb = new + self._refmetric = _np.array(self.calc_intlk_metric( + self._reforb, metric=self.metric)) + + def exit_task(self): + """Set flag to quit thread.""" + self._quit_task = True + + def run(self): + """Run task.""" + while not self._quit_task: + _t0 = _time.time() + self._update_data() + _dt = _time.time() - _t0 + + sleep = 1/self.UPDATE_FREQ - _dt + if sleep > 0: + _time.sleep(sleep) + + def _update_data(self): + if self.meas_data: + # symb meas + if self.meas_symb: + symb_propty = self.meas_symb[ + self._propintlktype][self._propcomptype] + if isinstance(symb_propty, dict): + for var in symb_propty['var']: + self._create_pvs(var) + vals = [_np.array(self._get_values(var)) + for var in symb_propty['var']] + symb_values = list(symb_propty['op'](*vals)) + else: + self._create_pvs(symb_propty) + symb_values = self._get_values(symb_propty) + symbols_meas = symb_values + else: + symbols_meas = None + + # data meas + self._create_pvs(self.meas_data) + vals = _np.array(self._get_values(self.meas_data), dtype=float) + if self.metric in ['pos', 'ang']: + vals -= self._refmetric + vals *= self.CONV_NM2M + else: + # sum case + vals *= self.monitsum2intlksum_factor + y_data_meas = list(vals) + + self.dataChanged.emit(['meas', symbols_meas, y_data_meas]) + + if self.min_data: + # symb min + self._create_pvs(self.min_data) + if self.min_symb and self._propintlktype in self.min_symb: + symb_propty = self.min_symb[self._propintlktype] + if symb_propty: + self._create_pvs(symb_propty) + symbols_min = self._get_values(symb_propty) + else: + symbols_min = None + else: + symbols_min = None + + # data min + vals = _np.array(self._get_values(self.min_data), dtype=float) + if self.metric in ['pos', 'ang']: + vals -= self._refmetric + vals *= self.CONV_NM2M + y_data_min = list(vals) + + self.dataChanged.emit(['min', symbols_min, y_data_min]) + + if self.max_data: + # symb max + self._create_pvs(self.max_data) + if self.max_symb and self._propintlktype in self.max_symb: + symb_propty = self.max_symb[self._propintlktype] + if symb_propty: + self._create_pvs(symb_propty) + symbols_max = self._get_values(symb_propty) + else: + symbols_max = None + else: + symbols_max = None + + # data max + vals = _np.array(self._get_values(self.max_data), dtype=float) + if self.metric in ['pos', 'ang']: + vals -= self._refmetric + vals *= self.CONV_NM2M + y_data_max = list(vals) + + self.dataChanged.emit(['max', symbols_max, y_data_max]) + + +
+[docs] +class MinSumGraphWidget(_BaseGraphWidget): + """MinSum Graph Widget.""" + + INTLKTYPE = 'MinSum' + PROPTY_MEAS_DATA = 'SlowSumRaw-Mon' + PROPTY_MEAS_SYMB = '' + PROPTY_MIN_DATA = 'IntlkLmtMinSum-RB' + PROPTY_MIN_SYMB = '' + PROPTY_MAX_DATA = '' + PROPTY_MAX_SYMB = ''
+ + + +
+[docs] +class PosXGraphWidget(_BaseGraphWidget): + """Position Graph Widget.""" + + INTLKTYPE = 'PosX' + PROPTY_MEAS_DATA = 'IntlkPosX-Mon' + PROPTY_MEAS_SYMB = { + 'Instantaneous': { + 'General': 'Intlk-Mon', + }, + 'Latch': { + 'General': 'IntlkLtc-Mon', + }, + } + PROPTY_MIN_DATA = 'IntlkLmtPosMinX-RB' + PROPTY_MIN_SYMB = { + 'Instantaneous': 'IntlkPosLowerX-Mon', + 'Latch': 'IntlkPosLowerLtcX-Mon'} + PROPTY_MAX_DATA = 'IntlkLmtPosMaxX-RB' + PROPTY_MAX_SYMB = { + 'Instantaneous': 'IntlkPosUpperX-Mon', + 'Latch': 'IntlkPosUpperLtcX-Mon'}
+ + + +
+[docs] +class PosYGraphWidget(_BaseGraphWidget): + """Position Graph Widget.""" + + INTLKTYPE = 'PosY' + PROPTY_MEAS_DATA = 'IntlkPosY-Mon' + PROPTY_MEAS_SYMB = { + 'Instantaneous': { + 'General': 'Intlk-Mon', + }, + 'Latch': { + 'General': 'IntlkLtc-Mon', + }, + } + PROPTY_MIN_DATA = 'IntlkLmtPosMinY-RB' + PROPTY_MIN_SYMB = { + 'Instantaneous': 'IntlkPosLowerY-Mon', + 'Latch': 'IntlkPosLowerLtcY-Mon', + } + PROPTY_MAX_DATA = 'IntlkLmtPosMaxY-RB' + PROPTY_MAX_SYMB = { + 'Instantaneous': 'IntlkPosUpperY-Mon', + 'Latch': 'IntlkPosUpperLtcY-Mon', + }
+ + + +
+[docs] +class AngXGraphWidget(_BaseGraphWidget): + """Angulation Graph Widget.""" + + INTLKTYPE = 'AngX' + PROPTY_MEAS_DATA = 'IntlkAngX-Mon' + PROPTY_MEAS_SYMB = { + 'Instantaneous': { + 'General': 'Intlk-Mon', + }, + 'Latch': { + 'General': 'IntlkLtc-Mon', + }, + } + PROPTY_MIN_DATA = 'IntlkLmtAngMinX-RB' + PROPTY_MIN_SYMB = { + 'Instantaneous': 'IntlkAngLowerX-Mon', + 'Latch': 'IntlkAngLowerLtcX-Mon', + } + PROPTY_MAX_DATA = 'IntlkLmtAngMaxX-RB' + PROPTY_MAX_SYMB = { + 'Instantaneous': 'IntlkAngUpperX-Mon', + 'Latch': 'IntlkAngUpperLtcX-Mon', + }
+ + + +
+[docs] +class AngYGraphWidget(_BaseGraphWidget): + """Angulation Graph Widget.""" + + INTLKTYPE = 'AngY' + PROPTY_MEAS_DATA = 'IntlkAngY-Mon' + PROPTY_MEAS_SYMB = { + 'Instantaneous': { + 'General': 'Intlk-Mon', + }, + 'Latch': { + 'General': 'IntlkLtc-Mon', + }, + } + PROPTY_MIN_DATA = 'IntlkLmtAngMinY-RB' + PROPTY_MIN_SYMB = { + 'Instantaneous': 'IntlkAngLowerY-Mon', + 'Latch': 'IntlkAngLowerLtcY-Mon', + } + PROPTY_MAX_DATA = 'IntlkLmtAngMaxY-RB' + PROPTY_MAX_SYMB = { + 'Instantaneous': 'IntlkAngUpperY-Mon', + 'Latch': 'IntlkAngUpperLtcY-Mon', + }
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_ap_orbintlk/main.html b/_modules/siriushla/si_ap_orbintlk/main.html new file mode 100644 index 000000000..6d138eb3e --- /dev/null +++ b/_modules/siriushla/si_ap_orbintlk/main.html @@ -0,0 +1,483 @@ + + + + + + siriushla.si_ap_orbintlk.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_ap_orbintlk.main

+"""BPM Orbit Interlock Main Window."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGridLayout, QLabel, QGroupBox, \
+    QPushButton, QSizePolicy as QSzPlcy, QVBoxLayout, QMenuBar, QAction
+
+import qtawesome as qta
+
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.orbintlk.csdev import ETypes as _ETypes
+
+from ..widgets import SiriusMainWindow, SiriusPushButton, SiriusLedAlert, \
+    PyDMLogLabel, SiriusEnumComboBox, SiriusSpinbox, SiriusLabel, \
+    SiriusLedState, PyDMStateButton
+from ..widgets.dialog import StatusDetailDialog
+from ..widgets.windows import create_window_from_widget
+from ..util import get_appropriate_color, connect_window, connect_newprocess
+from .base import BaseObject
+from .custom_widgets import BPMIntlkEnblWidget, BPMIntlkLimSPWidget, \
+    MonitoredDevicesDialog
+from .graphics import GraphMonitorWidget
+
+
+
+[docs] +class BPMOrbIntlkMainWindow(BaseObject, SiriusMainWindow): + """BPM Orbit Interlock Control Window.""" + + def __init__(self, parent=None, prefix=_vaca_prefix): + """Init.""" + BaseObject.__init__(self, prefix) + SiriusMainWindow.__init__(self, parent) + + self.setObjectName('SIApp') + self.setWindowTitle('Orbit Interlock Control Window') + color = get_appropriate_color('SI') + self.setWindowIcon(qta.icon( + 'mdi.currency-sign', 'mdi.alarm-light', + options=[ + dict(scale_factor=1, color=color), + dict(scale_factor=0.45, color=color), + ])) + + self._setupUi() + self.setFocusPolicy(Qt.StrongFocus) + + def _setupUi(self): + wid = QWidget(self) + lay = QGridLayout(wid) + self.setCentralWidget(wid) + + # title + self.title = QLabel( + '<h3>Orbit Interlock</h3>', self, alignment=Qt.AlignCenter) + + # Log + self._log = self._setupLogWidget() + + # Graphs + self._graphs = GraphMonitorWidget(self, self.prefix) + + # high level control + self._gb_ctrl = self._setupHLGroup() + + # layout + lay.addWidget(self.title, 0, 0, 1, 3) + lay.addWidget(self._log, 1, 0) + lay.addWidget(self._graphs, 1, 1) + lay.addWidget(self._gb_ctrl, 1, 2) + + self._create_menu() + + def _setupLogWidget(self): + loglabel = PyDMLogLabel( + self, init_channel=self.hlprefix.substitute(propty='Log-Mon')) + loglabel.setObjectName('log') + loglabel.setStyleSheet('#log{min-width: 20em;}') + loglabel.setSizePolicy(QSzPlcy.Minimum, QSzPlcy.MinimumExpanding) + loglabel.setAlternatingRowColors(True) + loglabel.maxCount = 2000 + + bt_clear = QPushButton('Clear Log', self) + bt_clear.clicked.connect(loglabel.clear) + + wid = QGroupBox('IOC Log') + lay = QVBoxLayout(wid) + lay.addWidget(loglabel) + lay.addWidget(bt_clear, alignment=Qt.AlignCenter) + return wid + + def _setupGlobStatusGroup(self): + wid = QGroupBox('Global Status') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop | Qt.AlignHCenter) + + for i, sts in enumerate(['BPM', 'Timing', 'LLRF']): + lblsprop = f'STS_LBLS_{sts.upper()}' + lbl = QLabel( + f'{sts}: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + pvname = self.hlprefix.substitute(propty=f'{sts}Status-Mon') + led = SiriusLedAlert(self, pvname) + pbt = self._create_detail_button() + connect_window( + pbt, StatusDetailDialog, parent=self, pvname=pvname, + labels=getattr(_ETypes, lblsprop), title=f'{sts} Status') + lay.addWidget(lbl, i, 1) + lay.addWidget(led, i, 2) + lay.addWidget(pbt, i, 3) + + if sts != 'LLRF': + pbt = QPushButton('', self) + pbt.setIcon(qta.icon('fa5s.ellipsis-v')) + pbt.setObjectName('sts') + pbt.setStyleSheet( + '#sts{min-width:18px; max-width:18px; icon-size:20px;}') + connect_window( + pbt, MonitoredDevicesDialog, parent=self, + prefix=self.prefix, propty=f'{sts}MonitoredDevices-Mon') + lay.addWidget(pbt, i, 0) + + return wid + + def _setupGlobSettingsGroup(self): + wid = QGroupBox('Global Settings') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop | Qt.AlignHCenter) + + ld_enbl = QLabel( + 'Enable: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + sb_enbl = PyDMStateButton( + self, self.hlprefix.substitute(propty='Enable-Sel')) + lb_enbl = SiriusLedState( + self, self.hlprefix.substitute(propty='Enable-Sts')) + lay.addWidget(ld_enbl, 0, 0) + lay.addWidget(sb_enbl, 0, 1) + lay.addWidget(lb_enbl, 0, 2) + + lbl_rst = QLabel( + 'Reset all interlocks: ', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + pvname = self.hlprefix.substitute(propty='Reset-Cmd') + pb_rst = PyDMPushButton(self, pressValue=1, init_channel=pvname) + pb_rst.setToolTip('Send reset for BPM flags, EVG and LLRF') + pb_rst.setIcon(qta.icon('fa5s.sync')) + pb_rst.setObjectName('rst') + pb_rst.setStyleSheet( + '#rst{min-width:25px; max-width:25px; icon-size:20px;}') + lay.addWidget(lbl_rst, 1, 0) + lay.addWidget(pb_rst, 1, 1) + + desc2propty = { + 'Reset Timing Lock Latches': 'ResetTimingLockLatches-Cmd', + 'Configure EVG interlock': 'ConfigEVG-Cmd', + 'Configure Fout RxEnbl': 'ConfigFouts-Cmd', + 'Configure AFC Timing RTM Loop': 'ConfigAFCTiming-Cmd', + 'Reset AFC Timing RTM Clocks': 'ResetAFCTimingRTMClk-Cmd', + 'Configure HL triggers': 'ConfigHLTriggers-Cmd', + 'Configure LLRF interlocks': 'ConfigLLRFIntlk-Cmd', + 'Configure BPMs': 'ConfigBPMs-Cmd', + 'Configure AFC Phys.Triggers': 'ConfigAFCPhyTrigs-Cmd', + } + row = 2 + for desc, propty in desc2propty.items(): + pvname = self.hlprefix.substitute(propty=propty) + pbt = PyDMPushButton( + self, pressValue=1, init_channel=pvname, label=desc) + lay.addWidget(pbt, row, 0, 1, 3) + row += 1 + + return wid + + def _setupBPMIntlkSettingsGroup(self): + intlk2pvstr = { + 'Min.Sum.': 'MinSum', + 'Pos.': 'Pos', + 'Ang.': 'Ang', + } + ld_enblsel = QLabel( + 'Enable: ', alignment=Qt.AlignRight | Qt.AlignVCenter) + ld_lim = QLabel( + 'Thresholds: ', alignment=Qt.AlignRight | Qt.AlignVCenter) + ld_clr = QLabel( + 'Reset: ', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + + wid = QGroupBox('BPM Settings') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop | Qt.AlignRight) + lay.addWidget(ld_enblsel, 1, 0) + lay.addWidget(ld_lim, 2, 0) + lay.addWidget(ld_clr, 3, 0) + + col = 1 + for intlktype, pvstr in intlk2pvstr.items(): + lblcol = QLabel( + f'<h4>{intlktype}</h4>', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + lay.addWidget(lblcol, 0, col, alignment=Qt.AlignCenter) + + if intlktype.startswith(('Min', 'Pos', 'Ang')): + sel_enbl_wind = create_window_from_widget( + BPMIntlkEnblWidget, + title='BPM Orbit Interlock - '+intlktype+' Enable State') + bt_enblsel = QPushButton(qta.icon('fa5s.tasks'), '', self) + bt_enblsel.setToolTip('Open window to set BPMs enable state.') + bt_enblsel.setObjectName('sel') + bt_enblsel.setStyleSheet( + '#sel{min-width:25px; max-width:25px; icon-size:20px;}') + connect_window( + bt_enblsel, sel_enbl_wind, parent=self, + propty=pvstr+'EnblList-SP', title=intlktype + ' Enable', + prefix=self.prefix) + lay.addWidget(bt_enblsel, 1, col, alignment=Qt.AlignCenter) + + sel_lim_wind = create_window_from_widget( + BPMIntlkLimSPWidget, + title='BPM Orbit Interlock - '+intlktype + + (' Threshold' if 'Thres' not in intlktype else '') + + ' Setpoint') + bt_lim = QPushButton(qta.icon('fa5s.tasks'), '', self) + bt_lim.setToolTip('Open window to set BPMs thresholds.') + bt_lim.setObjectName('sel') + bt_lim.setStyleSheet( + '#sel{min-width:25px; max-width:25px; icon-size:20px;}') + connect_window( + bt_lim, sel_lim_wind, parent=self, + metric=intlktype, prefix=self.prefix) + lay.addWidget(bt_lim, 2, col, alignment=Qt.AlignCenter) + + if 'Sum' not in intlktype: + propty = f'ResetBPM{pvstr}-Cmd' + bt_clr = SiriusPushButton( + parent=self, pressValue=1, icon=qta.icon('fa5s.sync'), + init_channel=self.hlprefix.substitute( + prefix=self.prefix, propty=propty)) + bt_clr.setObjectName('clr') + bt_clr.setStyleSheet( + '#clr{min-width:25px; max-width:25px; icon-size:20px;}') + lay.addWidget(bt_clr, 3, col, alignment=Qt.AlignCenter) + + col += 1 + + return wid + + def _setupBPMAcqSettingsGroup(self): + wid = QGroupBox('BPM Acq. Settings') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop | Qt.AlignHCenter) + + props = [ + 'PsMtmAcqChannel-Sel', + 'PsMtmAcqSamplesPre-SP', + 'PsMtmAcqSamplesPost-SP', + ] + for row, prop in enumerate(props): + desc = prop.split('-')[0].split('Acq')[1]+':' + spn = self.hlprefix.substitute(prefix=self.prefix, propty=prop) + rbn = spn.substitute( + propty=prop.replace('Sel', 'Sts').replace('SP', 'RB')) + + ldw = QLabel(desc, self, alignment=Qt.AlignRight | Qt.AlignVCenter) + spw = SiriusEnumComboBox if spn.endswith('Sel') else SiriusSpinbox + widsp = spw(self, spn) + widrb = SiriusLabel(self, rbn) + lay.addWidget(ldw, row, 0) + lay.addWidget(widsp, row, 1) + lay.addWidget(widrb, row, 2) + + ld_config = QLabel( + 'Send Acq. Config.', self, + alignment=Qt.AlignRight | Qt.AlignVCenter) + bt_config = SiriusPushButton( + parent=self, pressValue=1, icon=qta.icon('fa5s.sync'), + init_channel=self.hlprefix.substitute( + prefix=self.prefix, propty='PsMtmAcqConfig-Cmd')) + lay.addWidget(ld_config, 3, 0) + lay.addWidget(bt_config, 3, 1, alignment=Qt.AlignCenter) + + return wid + + def _setupHLGroup(self): + wid = QGroupBox('IOC Control') + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignTop | Qt.AlignHCenter) + + # Global Status + self._gb_globsts = self._setupGlobStatusGroup() + + # Global Settings + self._gb_globsett = self._setupGlobSettingsGroup() + + # BPM Interlock Settings + self._gb_bpmintlk = self._setupBPMIntlkSettingsGroup() + + # BPM Acquisition Settings + self._gb_bpmacq = self._setupBPMAcqSettingsGroup() + + lay.addWidget(self._gb_globsts) + lay.addWidget(self._gb_globsett) + lay.addWidget(self._gb_bpmintlk) + lay.addWidget(self._gb_bpmacq) + + return wid + + def _create_detail_button(self): + pbt = QPushButton('', self) + pbt.setIcon(qta.icon('fa5s.list-ul')) + pbt.setObjectName('sts') + pbt.setStyleSheet( + '#sts{min-width:25px; max-width:25px; icon-size:20px;}') + return pbt + + def _create_menu(self): + menubar = QMenuBar(self) + timon = QAction('Open Timing Monitor', menubar) + connect_newprocess( + timon, [f'sirius-hla-as-ti-control.py', '-t', 'monitor']) + menubar.addAction(timon) + self.layout().setMenuBar(menubar)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_bbb/acquisition.html b/_modules/siriushla/si_di_bbb/acquisition.html new file mode 100644 index 000000000..488232cd3 --- /dev/null +++ b/_modules/siriushla/si_di_bbb/acquisition.html @@ -0,0 +1,1025 @@ + + + + + + siriushla.si_di_bbb.acquisition — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_di_bbb.acquisition

+"""BbB Acquisition Module."""
+import os as _os
+from PyQt5.QtWidgets import QHBoxLayout
+
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QColor, QPixmap
+from qtpy.QtWidgets import QLabel, QWidget, QGridLayout, QPushButton, \
+    QGroupBox, QVBoxLayout, QSizePolicy as QSzPlcy, QSpacerItem
+from pydm.widgets import PyDMEnumComboBox, PyDMLineEdit
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..util import connect_window
+from ..widgets import SiriusFrame, PyDMStateButton, SiriusLedState, \
+    SiriusLabel, SiriusSpinbox
+from ..widgets.windows import create_window_from_widget
+
+from .custom_widgets import WfmGraph
+from .util import set_bbb_color, get_bbb_icon
+
+
+class _BbBModalAnalysis(QWidget):
+    """BbB Modal Analysis Widget."""
+
+    def __init__(
+            self, parent=None, prefix=_vaca_prefix, device='',
+            acq_type='SRAM'):
+        """Init."""
+        super().__init__(parent)
+        self._prefix = prefix
+        self._device = _PVName(device)
+        self.acq_type = acq_type
+        self.dev_pref = self._device.substitute(prefix=prefix)
+        self.prop_pref = self.dev_pref + f':{acq_type:s}_'
+        self.setObjectName('SIApp')
+        self._setupUi()
+
+    def _setupUi(self):
+        gp_mode = WfmGraph(self)
+        gp_mode.setStyleSheet('min-height: 10em;')
+        gp_mode.setPlotTitle('Modal Amplitudes')
+        gp_mode.getAxis('bottom').setLabel('Mode Number')
+        gp_mode.getAxis('left').setLabel('CNT')
+        gp_mode.add_scatter_curve(
+            ychannel=self.prop_pref + 'MD_MODES',
+            color=QColor('red'),
+            lineStyle=Qt.SolidLine)
+
+        gp_spec = WfmGraph(self)
+        gp_spec.setStyleSheet('min-height: 10em;')
+        gp_spec.setPlotTitle('Single Mode Spectrum')
+        gp_spec.getAxis('bottom').setLabel('Frequency (kHz)')
+        gp_spec.getAxis('left').setLabel('CNT')
+        gp_spec.add_scatter_curve(
+            ychannel=self.prop_pref+'MD_SPEC',
+            xchannel=self.prop_pref+'FREQ',
+            color=QColor('blue'),
+            lineStyle=Qt.SolidLine)
+        gp_spec.add_marker(
+            name='Marker',
+            xchannel=self.prop_pref+'MD_PEAKFREQ',
+            ychannel=self.prop_pref+'MD_PEAK',
+            color=QColor('red'), symbol='o')
+
+        ld_enbl = QLabel('Acq. Enable', self)
+        cb_enbl = PyDMStateButton(self, self.prop_pref+'MD_ENABLE')
+
+        ld_sel = QLabel('Acq. Mode', self)
+        cb_sel = PyDMEnumComboBox(self, self.prop_pref+'MD_SMODE')
+
+        ld_sbnd = QLabel('Sideband', self, alignment=Qt.AlignRight)
+        sb_sbnd = SiriusSpinbox(self, self.prop_pref+'MD_FTUNE')
+        sb_sbnd.showUnits = True
+
+        ld_span = QLabel('Span', self, alignment=Qt.AlignRight)
+        sb_span = SiriusSpinbox(self, self.prop_pref+'MD_FSPAN')
+        sb_span.showUnits = True
+
+        ld_mode = QLabel('Mode', self, alignment=Qt.AlignRight)
+        sb_mode = SiriusSpinbox(self, self.prop_pref+'MD_MSEL')
+
+        ld_avg = QLabel('Sample Avg', self, alignment=Qt.AlignRight)
+        sb_avg = SiriusSpinbox(self, self.prop_pref+'MD_AVG')
+
+        gb_ctrl = QGroupBox('Acquisition control', self)
+        lay_ctrl = QGridLayout(gb_ctrl)
+        lay_ctrl.addWidget(ld_enbl, 0, 0)
+        lay_ctrl.addWidget(cb_enbl, 1, 0)
+        lay_ctrl.addWidget(ld_sel, 2, 0)
+        lay_ctrl.addWidget(cb_sel, 3, 0)
+        lay_ctrl.addWidget(ld_sbnd, 0, 1)
+        lay_ctrl.addWidget(sb_sbnd, 0, 2)
+        lay_ctrl.addWidget(ld_span, 1, 1)
+        lay_ctrl.addWidget(sb_span, 1, 2)
+        lay_ctrl.addWidget(ld_mode, 2, 1)
+        lay_ctrl.addWidget(sb_mode, 2, 2)
+        lay_ctrl.addWidget(ld_avg, 3, 1)
+        lay_ctrl.addWidget(sb_avg, 3, 2)
+
+        # Markers
+        ld_rng = QLabel('Range (kHz)', self, alignment=Qt.AlignCenter)
+        le_low = PyDMLineEdit(self, self.prop_pref+'MD_SP_LOW')
+        le_high = PyDMLineEdit(self, self.prop_pref+'MD_SP_HIGH')
+        cb_mode = PyDMEnumComboBox(self, self.prop_pref+'MD_SP_SEARCH')
+
+        ld_mnum = QLabel('Mode #', self, alignment=Qt.AlignRight)
+        lb_mnum = SiriusLabel(self, self.prop_pref+'MD_MAXMODE')
+
+        ld_mamp = QLabel('Mode Amp.', self, alignment=Qt.AlignRight)
+        lb_mamp = SiriusLabel(self, self.prop_pref+'MD_MAXVAL')
+
+        ld_peak = QLabel('Value', self, alignment=Qt.AlignRight)
+        lb_peak = SiriusLabel(self, self.prop_pref+'MD_PEAK')
+
+        ld_pfrq = QLabel('Freq', self, alignment=Qt.AlignRight)
+        lb_pfrq = SiriusLabel(self, self.prop_pref+'MD_PEAKFREQ')
+        lb_pfrq.showUnits = True
+
+        ld_tune = QLabel('Tune', self, alignment=Qt.AlignRight)
+        lb_tune = SiriusLabel(self, self.prop_pref+'MD_PEAKTUNE')
+
+        gb_mark = QGroupBox('Marker', self)
+        lay_mark = QGridLayout(gb_mark)
+        lay_mark.addWidget(ld_rng, 0, 0)
+        lay_mark.addWidget(le_low, 1, 0)
+        lay_mark.addWidget(le_high, 2, 0)
+        lay_mark.addWidget(cb_mode, 3, 0)
+        lay_mark.addWidget(ld_mnum, 0, 1)
+        lay_mark.addWidget(lb_mnum, 0, 2)
+        lay_mark.addWidget(ld_mamp, 1, 1)
+        lay_mark.addWidget(lb_mamp, 1, 2)
+        lay_mark.addWidget(ld_peak, 2, 1)
+        lay_mark.addWidget(lb_peak, 2, 2)
+        lay_mark.addWidget(ld_pfrq, 3, 1)
+        lay_mark.addWidget(lb_pfrq, 3, 2)
+        lay_mark.addWidget(ld_tune, 4, 1)
+        lay_mark.addWidget(lb_tune, 4, 2)
+
+        ld_name = QLabel(
+            '<h2>'+self.acq_type+' Modal Analysis</h2>', self,
+            alignment=Qt.AlignCenter)
+
+        self.setLayout(QHBoxLayout())
+        wid = QWidget(self)
+        self.layout().addWidget(wid)
+        set_bbb_color(wid, self._device)
+        lay = QGridLayout(wid)
+        lay.addWidget(ld_name, 0, 0, 1, 2)
+        lay.addWidget(gp_mode, 1, 0, 1, 2)
+        lay.addWidget(gp_spec, 2, 0, 1, 2)
+        lay.addWidget(gb_ctrl, 3, 0)
+        lay.addWidget(gb_mark, 3, 1)
+        lay.setRowStretch(1, 2)
+        lay.setRowStretch(2, 2)
+
+
+class _BbBAcqBase(QWidget):
+    """BbB Acquisition Base Widget."""
+
+    TYPE = ''
+
+    def __init__(self, parent=None, prefix=_vaca_prefix, device=''):
+        """Init."""
+        super().__init__(parent)
+        set_bbb_color(self, device)
+        self._prefix = prefix
+        self._device = _PVName(device)
+        self.dev_pref = self._device.substitute(prefix=prefix)
+        self._setupUi()
+
+    def _setupUi(self):
+        ctrl_wid = self._setupControlsWidget()
+        wfm_wid = self._setupWaveformsWidget()
+
+        lay = QGridLayout(self)
+        lay.addWidget(ctrl_wid, 0, 0)
+        lay.addWidget(wfm_wid, 0, 1)
+
+    def _setupControlsWidget(self):
+        ld_growenbl = QLabel('Grow/Damp Enable', self)
+        cb_growenbl = PyDMEnumComboBox(self, self.dev_pref+':GDEN')
+
+        ld_down = QLabel('Rec. Downsample ', self)
+        sb_down = SiriusSpinbox(self, self.dev_pref+':'+self.TYPE+'_REC_DS')
+
+        ld_rawdata = QLabel('Raw Data', self)
+        cb_rawdata = PyDMStateButton(self, self.dev_pref+':'+self.TYPE+'_DUMP')
+
+        ld_acqtime = QLabel('Acquisition Time', self)
+        sb_acqtime = SiriusSpinbox(self, self.dev_pref+':'+self.TYPE+'_ACQTIME')
+        sb_acqtime.showUnits = True
+
+        ld_holdoff = QLabel('Hold-Off Time', self)
+        sb_holdoff = SiriusSpinbox(self, self.dev_pref+':'+self.TYPE+'_HOLDTIME')
+        sb_holdoff.showUnits = True
+
+        ld_posttrg = QLabel('Post Trigger', self)
+        sb_posttrg = SiriusSpinbox(self, self.dev_pref+':'+self.TYPE+'_POSTTIME')
+        sb_posttrg.showUnits = True
+        fr_posttrg = SiriusFrame(
+            self, self.dev_pref+':'+self.TYPE+'_POSTREG_SUBWR')
+        fr_posttrg.add_widget(sb_posttrg)
+
+        ld_growtime = QLabel('Growth Time', self)
+        sb_growtime = SiriusSpinbox(self, self.dev_pref+':'+self.TYPE+'_GDTIME')
+        sb_growtime.showUnits = True
+        fr_growtime = SiriusFrame(
+            self, self.dev_pref+':'+self.TYPE+'_GDREG_SUBWR')
+        fr_growtime.add_widget(sb_growtime)
+
+        ld_acqlen = QLabel('Acquisition Length', self)
+        lb_acqlen = SiriusLabel(
+            self, self.dev_pref+':'+self.TYPE+'_ACQ_TURNS', keep_unit=True)
+        lb_acqlen.showUnits = True
+
+        ld_psttrglen = QLabel('Post Trigger Length', self)
+        lb_psttrglen = SiriusLabel(
+            self, self.dev_pref+':'+self.TYPE+'_POST_TURNS', keep_unit=True)
+        lb_psttrglen.showUnits = True
+
+        bt_modal = QPushButton('Modal Analysis', self)
+
+        window = create_window_from_widget(
+            _BbBModalAnalysis, title='SRAM Modal Analysis',
+            icon=get_bbb_icon(), is_main=True)
+        connect_window(
+            bt_modal, window, self, prefix=self._prefix,
+            device=self._device, acq_type=self.TYPE)
+
+        gbox_dtacq = QGroupBox('Data Acquisition', self)
+        lay_dtacq = QGridLayout(gbox_dtacq)
+        lay_dtacq.addWidget(ld_growenbl, 0, 0)
+        lay_dtacq.addWidget(cb_growenbl, 0, 1)
+        lay_dtacq.addWidget(ld_down, 1, 0)
+        lay_dtacq.addWidget(sb_down, 1, 1)
+        lay_dtacq.addWidget(ld_rawdata, 2, 0)
+        lay_dtacq.addWidget(cb_rawdata, 2, 1)
+        lay_dtacq.addWidget(ld_acqtime, 3, 0)
+        lay_dtacq.addWidget(sb_acqtime, 3, 1)
+        lay_dtacq.addWidget(ld_holdoff, 4, 0)
+        lay_dtacq.addWidget(sb_holdoff, 4, 1)
+        lay_dtacq.addWidget(ld_posttrg, 5, 0)
+        lay_dtacq.addWidget(fr_posttrg, 5, 1)
+        lay_dtacq.addWidget(ld_growtime, 6, 0)
+        lay_dtacq.addWidget(fr_growtime, 6, 1)
+        lay_dtacq.addWidget(ld_acqlen, 7, 0)
+        lay_dtacq.addWidget(lb_acqlen, 7, 1)
+        lay_dtacq.addWidget(ld_psttrglen, 8, 0)
+        lay_dtacq.addWidget(lb_psttrglen, 8, 1)
+        lay_dtacq.addWidget(bt_modal, 9, 0, 1, 2)
+
+        ld_acqtyp = QLabel(
+            '<h4>Acq Type</h4>', self, alignment=Qt.AlignCenter)
+        cb_acqtyp = PyDMEnumComboBox(
+            self, self.dev_pref+':'+self.TYPE+'_POSTSEL')
+
+        gbox_acqtyp = QGroupBox(self)
+        lay_acqtyp = QVBoxLayout(gbox_acqtyp)
+        lay_acqtyp.addWidget(ld_acqtyp)
+        lay_acqtyp.addWidget(cb_acqtyp)
+
+        ld_trgexten = QLabel('Internal/External', self)
+        cb_trgexten = PyDMEnumComboBox(
+            self, self.dev_pref+':'+self.TYPE+'_HWTEN')
+
+        ld_trginsel = QLabel('Selection', self)
+        cb_trginsel = PyDMEnumComboBox(
+            self, self.dev_pref+':'+self.TYPE+'_TRIG_IN_SEL')
+
+        ld_trgarm = QLabel('Arm', self)
+        cb_trgarm = PyDMStateButton(self, self.dev_pref+':'+self.TYPE+'_ARM')
+        lb_armmon = SiriusLedState(
+            self, self.dev_pref+':'+self.TYPE+'_ARM_MON')
+
+        ld_trgbrarm = QLabel('Auto re-arm', self)
+        cb_trgbrarm = PyDMStateButton(
+            self, self.dev_pref+':'+self.TYPE+'_BR_ARM')
+
+        ld_rst = QLabel('Trigger 1/2 Cap.:', self)
+        lb_rst1 = SiriusLabel(self, self.dev_pref+':'+self.TYPE+'_CAP_TRIG1')
+        lb_rst2 = SiriusLabel(self, self.dev_pref+':'+self.TYPE+'_CAP_TRIG2')
+
+        gbox_trig = QGroupBox('Trigger', self)
+        lay_trig = QGridLayout(gbox_trig)
+        lay_trig.setAlignment(Qt.AlignTop)
+        lay_trig.addWidget(ld_trgexten, 0, 0)
+        lay_trig.addWidget(cb_trgexten, 0, 1, 1, 2)
+        lay_trig.addWidget(ld_trginsel, 1, 0)
+        lay_trig.addWidget(cb_trginsel, 1, 1, 1, 2)
+        lay_trig.addWidget(ld_trgarm, 2, 0)
+        lay_trig.addWidget(cb_trgarm, 2, 1)
+        lay_trig.addWidget(lb_armmon, 2, 2)
+        lay_trig.addWidget(ld_trgbrarm, 3, 0)
+        lay_trig.addWidget(cb_trgbrarm, 3, 1)
+        lay_trig.addWidget(ld_rst, 4, 0)
+        lay_trig.addWidget(lb_rst1, 4, 1)
+        lay_trig.addWidget(lb_rst2, 4, 2)
+        lay_trig.setRowStretch(5, 2)
+
+        pixmap = QPixmap(_os.path.join(
+            _os.path.abspath(_os.path.dirname(__file__)), 'grow_damp.png'))
+        img_wid = QLabel(self)
+        img_wid.setPixmap(pixmap)
+        img_wid.setScaledContents(True)
+
+        wid = QWidget()
+        lay = QGridLayout(wid)
+        lay.setContentsMargins(0, 0, 0, 0)
+        lay.addWidget(gbox_acqtyp, 0, 0)
+        lay.addWidget(gbox_dtacq, 1, 0)
+        lay.addWidget(gbox_trig, 2, 0)
+        lay.addWidget(img_wid, 4, 0)
+        lay.setRowStretch(3, 5)
+        lay.setRowStretch(5, 5)
+
+        wid.setStyleSheet("SiriusFrame{max-height: 1.8em;}")
+
+        return wid
+
+    def _setupWaveformsWidget(self):
+        gp_mean = WfmGraph(self)
+        gp_mean.setPlotTitle('Mean')
+        gp_mean.getAxis('bottom').setLabel('Bunch number')
+        gp_mean.getAxis('left').setLabel('CNT')
+        gp_mean.add_scatter_curve(
+            ychannel=self.dev_pref+':'+self.TYPE+'_MEAN',
+            xchannel=self.dev_pref+':'+self.TYPE+'_XSC',
+            color=QColor('red'),
+            lineStyle=Qt.SolidLine)
+
+        gp_maxrms = WfmGraph(self)
+        gp_maxrms.setPlotTitle('Max RMS Channel (filtered)')
+        gp_maxrms.getAxis('bottom').setLabel('Time (ms)')
+        gp_maxrms.getAxis('left').setLabel('CNT')
+        gp_maxrms.add_scatter_curve(
+            ychannel=self.dev_pref+':'+self.TYPE+'_MAXRMS',
+            xchannel=self.dev_pref+':'+self.TYPE+'_TSC',
+            color=QColor('blue'),
+            lineStyle=Qt.SolidLine)
+
+        gp_rms = WfmGraph(self)
+        gp_rms.setPlotTitle('RMS')
+        gp_rms.getAxis('bottom').setLabel('Bunch number')
+        gp_rms.getAxis('left').setLabel('CNT')
+        gp_rms.add_scatter_curve(
+            ychannel=self.dev_pref+':'+self.TYPE+'_RMS',
+            xchannel=self.dev_pref+':'+self.TYPE+'_XSC',
+            color=QColor('green'),
+            lineStyle=Qt.SolidLine)
+
+        gp_avgspe = WfmGraph(self)
+        gp_avgspe.setPlotTitle('Average spectrum')
+        gp_avgspe.getAxis('bottom').setLabel('Frequency (kHz)')
+        gp_avgspe.getAxis('left').setLabel('dB')
+        gp_avgspe.add_scatter_curve(
+            ychannel=self.dev_pref+':'+self.TYPE+'_SPEC',
+            xchannel=self.dev_pref+':'+self.TYPE+'_FREQ',
+            color=QColor('blue'),
+            lineStyle=Qt.SolidLine)
+        gp_avgspe.add_marker(
+            name='Marker 1',
+            xchannel=self.dev_pref+':'+self.TYPE+'_PEAKFREQ1',
+            ychannel=self.dev_pref+':'+self.TYPE+'_PEAK1',
+            color=QColor('red'), symbol='o')
+        gp_avgspe.add_marker(
+            name='Marker 2',
+            xchannel=self.dev_pref+':'+self.TYPE+'_PEAKFREQ2',
+            ychannel=self.dev_pref+':'+self.TYPE+'_PEAK2',
+            color=QColor('magenta'), symbol='s')
+
+        lay_graph = QGridLayout()
+        lay_graph.setContentsMargins(9, 9, 9, 9)
+        lay_graph.addWidget(gp_mean, 0, 0)
+        lay_graph.addWidget(gp_maxrms, 0, 1)
+        lay_graph.addWidget(gp_rms, 1, 0)
+        lay_graph.addWidget(gp_avgspe, 1, 1)
+
+        ld_acqenbl = QLabel('Acq. Enable', self)
+        cb_acqenbl = PyDMStateButton(
+            self, self.dev_pref+':'+self.TYPE+'_ACQ_EN')
+
+        ld_acqsing = QLabel('Acq. Mode', self)
+        cb_acqsing = PyDMEnumComboBox(
+            self, self.dev_pref+':'+self.TYPE+'_ACQ_SINGLE')
+
+        ld_mean = QLabel('Mean', self, alignment=Qt.AlignCenter)
+        lb_mean = SiriusLabel(self, self.dev_pref+':'+self.TYPE+'_MEANVAL')
+
+        ld_rms = QLabel('RMS', self, alignment=Qt.AlignCenter)
+        lb_rms = SiriusLabel(self, self.dev_pref+':'+self.TYPE+'_RMSVAL')
+
+        ld_ampp2p = QLabel('Amp P-P', self, alignment=Qt.AlignCenter)
+        lb_ampp2p = SiriusLabel(self, self.dev_pref+':'+self.TYPE+'_AMP_PP')
+
+        ld_maxrms = QLabel('Max RMS', self, alignment=Qt.AlignCenter)
+        lb_maxrms = SiriusLabel(self, self.dev_pref+':'+self.TYPE+'_MAXRMSVAL')
+
+        ld_bunpatt = QLabel('Bunch\npattern', self)
+        le_bunpatt = PyDMLineEdit(
+            self, self.dev_pref+':'+self.TYPE+'_ACQ_PATTERN')
+
+        ld_avg = QLabel('Sample Avg', self)
+        sb_avg = SiriusSpinbox(self, self.dev_pref+':'+self.TYPE+'_SP_AVG')
+
+        gbox_acqctrl = QGroupBox('Acquisition control', self)
+        lay_acqctrl = QGridLayout(gbox_acqctrl)
+        lay_acqctrl.addWidget(ld_acqenbl, 0, 0)
+        lay_acqctrl.addWidget(cb_acqenbl, 0, 1)
+        lay_acqctrl.addWidget(ld_acqsing, 1, 0)
+        lay_acqctrl.addWidget(cb_acqsing, 1, 1)
+        lay_acqctrl.addWidget(ld_avg, 2, 0)
+        lay_acqctrl.addWidget(sb_avg, 2, 1)
+        lay_acqctrl.addItem(
+            QSpacerItem(15, 1, QSzPlcy.Fixed, QSzPlcy.Ignored), 0, 2, 3, 1)
+        lay_acqctrl.addWidget(ld_mean, 0, 3)
+        lay_acqctrl.addWidget(lb_mean, 0, 4)
+        lay_acqctrl.addWidget(ld_ampp2p, 0, 5)
+        lay_acqctrl.addWidget(lb_ampp2p, 0, 6)
+        lay_acqctrl.addWidget(ld_rms, 1, 3)
+        lay_acqctrl.addWidget(lb_rms, 1, 4)
+        lay_acqctrl.addWidget(ld_maxrms, 1, 5)
+        lay_acqctrl.addWidget(lb_maxrms, 1, 6)
+        lay_acqctrl.addWidget(ld_bunpatt, 2, 3)
+        lay_acqctrl.addWidget(le_bunpatt, 2, 4, 1, 3)
+
+        # Markers
+        ld_mk1 = QLabel('1', self, alignment=Qt.AlignCenter)
+        ld_mk2 = QLabel('2', self, alignment=Qt.AlignCenter)
+        ld_span = QLabel('Span (kHz)', self, alignment=Qt.AlignCenter)
+        ld_mode = QLabel('Mode', self, alignment=Qt.AlignCenter)
+        ld_val = QLabel('Value', self, alignment=Qt.AlignCenter)
+        ld_pfrq = QLabel('Freq', self, alignment=Qt.AlignCenter)
+        ld_tune = QLabel('Tune', self, alignment=Qt.AlignCenter)
+
+        le_low1 = PyDMLineEdit(self, self.dev_pref+':'+self.TYPE+'_SP_LOW1')
+        le_high1 = PyDMLineEdit(self, self.dev_pref+':'+self.TYPE+'_SP_HIGH1')
+        cb_mode1 = PyDMEnumComboBox(
+            self, self.dev_pref+':'+self.TYPE+'_SP_SEARCH1')
+        lb_peak1 = SiriusLabel(self, self.dev_pref+':'+self.TYPE+'_PEAK1')
+        lb_peak1.showUnits = True
+        lb_pfrq1 = SiriusLabel(self, self.dev_pref+':'+self.TYPE+'_PEAKFREQ1')
+        lb_pfrq1.showUnits = True
+        lb_tune1 = SiriusLabel(self, self.dev_pref+':'+self.TYPE+'_PEAKTUNE1')
+
+        le_low2 = PyDMLineEdit(self, self.dev_pref+':'+self.TYPE+'_SP_LOW2')
+        le_high2 = PyDMLineEdit(self, self.dev_pref+':'+self.TYPE+'_SP_HIGH2')
+        cb_mode2 = PyDMEnumComboBox(
+            self, self.dev_pref+':'+self.TYPE+'_SP_SEARCH2')
+        lb_peak2 = SiriusLabel(self, self.dev_pref+':'+self.TYPE+'_PEAK2')
+        lb_peak2.showUnits = True
+        lb_pfrq2 = SiriusLabel(self, self.dev_pref+':'+self.TYPE+'_PEAKFREQ2')
+        lb_pfrq2.showUnits = True
+        lb_tune2 = SiriusLabel(self, self.dev_pref+':'+self.TYPE+'_PEAKTUNE2')
+
+        gbox_mark = QGroupBox('Markers', self)
+        lay_mark = QGridLayout(gbox_mark)
+        lay_mark.addWidget(ld_span, 0, 1, 1, 2)
+        lay_mark.addWidget(ld_mode, 0, 3)
+        lay_mark.addWidget(ld_val, 0, 4)
+        lay_mark.addWidget(ld_pfrq, 0, 5)
+        lay_mark.addWidget(ld_tune, 0, 6)
+        lay_mark.addWidget(ld_mk1, 1, 0)
+        lay_mark.addWidget(le_low1, 1, 1)
+        lay_mark.addWidget(le_high1, 1, 2)
+        lay_mark.addWidget(cb_mode1, 1, 3)
+        lay_mark.addWidget(lb_peak1, 1, 4)
+        lay_mark.addWidget(lb_pfrq1, 1, 5)
+        lay_mark.addWidget(lb_tune1, 1, 6)
+        lay_mark.addWidget(ld_mk2, 2, 0)
+        lay_mark.addWidget(le_low2, 2, 1)
+        lay_mark.addWidget(le_high2, 2, 2)
+        lay_mark.addWidget(cb_mode2, 2, 3)
+        lay_mark.addWidget(lb_peak2, 2, 4)
+        lay_mark.addWidget(lb_pfrq2, 2, 5)
+        lay_mark.addWidget(lb_tune2, 2, 6)
+
+        wid = QWidget()
+        lay = QGridLayout(wid)
+        lay.setContentsMargins(0, 0, 0, 0)
+        lay.addLayout(lay_graph, 0, 0, 1, 2)
+        lay.addWidget(gbox_acqctrl, 1, 0)
+        lay.addWidget(gbox_mark, 1, 1)
+        lay.setRowStretch(0, 5)
+        lay.setRowStretch(1, 1)
+        lay.setColumnStretch(0, 1)
+        lay.setColumnStretch(1, 1)
+        return wid
+
+
+
+[docs] +class BbBAcqSRAM(_BbBAcqBase): + """BbB SRAM Acquisition Widget.""" + + TYPE = 'SRAM'
+ + + +
+[docs] +class BbBAcqBRAM(_BbBAcqBase): + """BbB BRAM Acquisition Widget.""" + + TYPE = 'BRAM'
+ + + +
+[docs] +class BbBAcqSB(QWidget): + """BbB Tune Tracking Acquisition Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._setupUi() + + def _setupUi(self): + ctrl_wid = self._setupControlsWidget() + wfm_wid = self._setupWaveformsWidget() + lay = QGridLayout(self) + lay.addWidget(ctrl_wid, 0, 0) + lay.addWidget(wfm_wid, 0, 1) + + def _setupControlsWidget(self): + ld_acqtime = QLabel('Acquisition Time [ms]', self) + sb_acqtime = SiriusSpinbox(self, self.dev_pref+':SB_ACQTIME') + + ld_bunid = QLabel('Bunch Number', self) + sb_bunid = SiriusSpinbox(self, self.dev_pref+':SB_BUNCH_ID') + + ld_acqsmpl = QLabel('Acq Samples', self) + lb_acqsmpl = SiriusLabel(self, self.dev_pref+':SB_ACQ_SAMPLES') + + ld_currbun = QLabel('Current Bunch', self) + lb_currbun = SiriusLabel(self, self.dev_pref+':SB_RAW_BUNCH_ID') + + gbox_dtacq = QGroupBox('Data Acquisition', self) + lay_dtacq = QGridLayout(gbox_dtacq) + lay_dtacq.addWidget(ld_acqtime, 0, 0) + lay_dtacq.addWidget(sb_acqtime, 0, 1) + lay_dtacq.addWidget(ld_bunid, 1, 0) + lay_dtacq.addWidget(sb_bunid, 1, 1) + lay_dtacq.addWidget(ld_acqsmpl, 2, 0) + lay_dtacq.addWidget(lb_acqsmpl, 2, 1) + lay_dtacq.addWidget(ld_currbun, 3, 0) + lay_dtacq.addWidget(lb_currbun, 3, 1) + + ld_trgexten = QLabel('Internal/External', self) + cb_trgexten = PyDMEnumComboBox(self, self.dev_pref+':SB_EXTEN') + + ld_trginsel = QLabel('Selection', self) + cb_trginsel = PyDMEnumComboBox(self, self.dev_pref+':SB_TRIG_IN_SEL') + + ld_trgarm = QLabel('Arm', self) + cb_trgarm = PyDMStateButton(self, self.dev_pref+':SB_ARM') + lb_armmon = SiriusLedState(self, self.dev_pref+':SB_ARM_MON') + + ld_trgbrarm = QLabel('Auto re-arm', self) + cb_trgbrarm = PyDMStateButton(self, self.dev_pref+':SB_BR_ARM') + + gbox_trig = QGroupBox('Trigger', self) + lay_trig = QGridLayout(gbox_trig) + lay_trig.addWidget(ld_trgexten, 0, 0) + lay_trig.addWidget(cb_trgexten, 0, 1, 1, 2) + lay_trig.addWidget(ld_trginsel, 1, 0) + lay_trig.addWidget(cb_trginsel, 1, 1, 1, 2) + lay_trig.addWidget(ld_trgarm, 2, 0) + lay_trig.addWidget(cb_trgarm, 2, 1) + lay_trig.addWidget(lb_armmon, 2, 2) + lay_trig.addWidget(ld_trgbrarm, 3, 0) + lay_trig.addWidget(cb_trgbrarm, 3, 1) + + ld_phtrkctrl = QLabel( + '<h4>Controls</h4>', self, alignment=Qt.AlignCenter) + + ld_bunnr = QLabel('Bunch Number', self) + sb_bunnr = SiriusSpinbox(self, self.dev_pref+':SB_BUNCH_ID') + + ld_gain = QLabel('Gain', self) + sb_gain = SiriusSpinbox(self, self.dev_pref+':PHTRK_GAIN') + + ld_sp = QLabel('Setpoint [deg]', self) + sb_sp = SiriusSpinbox(self, self.dev_pref+':PHTRK_SETPT') + + ld_range = QLabel('Range [kHz]', self) + sb_range = SiriusSpinbox(self, self.dev_pref+':PHTRK_RANGE') + + ld_dec = QLabel('Decimation', self) + sb_dec = SiriusSpinbox(self, self.dev_pref+':PHTRK_DECIM') + + ld_rate = QLabel('Rate', self) + lb_rate = SiriusLabel(self, self.dev_pref+':PHTRK_RATE') + lb_rate.showUnits = True + + ld_bw = QLabel('Bandwidth', self) + lb_bw = SiriusLabel(self, self.dev_pref+':PHTRK_BANDWIDTH') + lb_bw.showUnits = True + + ld_loopctrl = QLabel('Loop Control', self) + cb_loopctrl = PyDMStateButton(self, self.dev_pref+':PHTRK_LOOPCTRL') + + ld_drv2 = QLabel('Use Drive 2', self) + cb_drv2 = PyDMStateButton(self, self.dev_pref+':DRIVE2_TRACK') + + ld_mod = QLabel('Modulation', self) + cb_mod = PyDMStateButton(self, self.dev_pref+':PHTRK_MOD') + + lay_phtrkctrl = QGridLayout() + lay_phtrkctrl.addWidget(ld_phtrkctrl, 0, 0, 1, 2) + lay_phtrkctrl.addWidget(ld_bunnr, 1, 0) + lay_phtrkctrl.addWidget(sb_bunnr, 1, 1) + lay_phtrkctrl.addWidget(ld_gain, 2, 0) + lay_phtrkctrl.addWidget(sb_gain, 2, 1) + lay_phtrkctrl.addWidget(ld_sp, 3, 0) + lay_phtrkctrl.addWidget(sb_sp, 3, 1) + lay_phtrkctrl.addWidget(ld_range, 4, 0) + lay_phtrkctrl.addWidget(sb_range, 4, 1) + lay_phtrkctrl.addWidget(ld_dec, 5, 0) + lay_phtrkctrl.addWidget(sb_dec, 5, 1) + lay_phtrkctrl.addWidget(ld_rate, 6, 0) + lay_phtrkctrl.addWidget(lb_rate, 6, 1) + lay_phtrkctrl.addWidget(ld_bw, 7, 0) + lay_phtrkctrl.addWidget(lb_bw, 7, 1) + lay_phtrkctrl.addWidget(ld_loopctrl, 8, 0) + lay_phtrkctrl.addWidget(cb_loopctrl, 8, 1) + lay_phtrkctrl.addWidget(ld_drv2, 9, 0) + lay_phtrkctrl.addWidget(cb_drv2, 9, 1) + lay_phtrkctrl.addWidget(ld_mod, 10, 0) + lay_phtrkctrl.addWidget(cb_mod, 10, 1) + + ld_phtrkdata = QLabel( + '<h4>Data</h4>', self, alignment=Qt.AlignCenter) + + ld_mag = QLabel('Magnitude', self) + lb_mag = SiriusLabel(self, self.dev_pref+':PHTRK_MAG') + lb_mag.showUnits = True + + ld_trgain = QLabel('Transfer Gain', self) + lb_trgain = SiriusLabel(self, self.dev_pref+':PHTRK_TFGAIN') + lb_trgain.showUnits = True + + ld_nshift = QLabel('Normalizing Shift', self) + lb_nshift = SiriusLabel(self, self.dev_pref+':PHTRK_SHIFT') + + ld_phase = QLabel('Phase', self) + lb_phase = SiriusLabel(self, self.dev_pref+':PHTRK_PHASE') + lb_phase.showUnits = True + + ld_error = QLabel('Error', self) + lb_error = SiriusLabel(self, self.dev_pref+':PHTRK_ERROR') + lb_error.showUnits = True + + ld_trfreq = QLabel('Tracking Frequency', self) + lb_trfreq = SiriusLabel(self, self.dev_pref+':PHTRK_FREQ0') + lb_trfreq.showUnits = True + + ld_trtune = QLabel('Tracking Tune', self) + lb_trtune = SiriusLabel(self, self.dev_pref+':PHTRK_TUNE') + + lay_phtrkdata = QGridLayout() + lay_phtrkdata.addWidget(ld_phtrkdata, 0, 0, 1, 2) + lay_phtrkdata.addWidget(ld_mag, 1, 0) + lay_phtrkdata.addWidget(lb_mag, 1, 1) + lay_phtrkdata.addWidget(ld_trgain, 2, 0) + lay_phtrkdata.addWidget(lb_trgain, 2, 1) + lay_phtrkdata.addWidget(ld_nshift, 3, 0) + lay_phtrkdata.addWidget(lb_nshift, 3, 1) + lay_phtrkdata.addWidget(ld_phase, 4, 0) + lay_phtrkdata.addWidget(lb_phase, 4, 1) + lay_phtrkdata.addWidget(ld_error, 5, 0) + lay_phtrkdata.addWidget(lb_error, 5, 1) + lay_phtrkdata.addWidget(ld_trfreq, 6, 0) + lay_phtrkdata.addWidget(lb_trfreq, 6, 1) + lay_phtrkdata.addWidget(ld_trtune, 7, 0) + lay_phtrkdata.addWidget(lb_trtune, 7, 1) + + gbox_phtrk = QGroupBox('Phase Tracking', self) + lay_phtrk = QGridLayout(gbox_phtrk) + lay_phtrk.setHorizontalSpacing(20) + lay_phtrk.addLayout(lay_phtrkctrl, 0, 0) + lay_phtrk.addLayout(lay_phtrkdata, 1, 0) + + gbox_phtrk.setStyleSheet(""" + SiriusLabel{ + min-width: 6em; max-width: 6em; + }""") + + wid = QWidget() + lay = QGridLayout(wid) + lay.addWidget(gbox_dtacq, 0, 0) + lay.addWidget(gbox_trig, 1, 0) + lay.addWidget(gbox_phtrk, 2, 0) + return wid + + def _setupWaveformsWidget(self): + gp_bunsig = WfmGraph(self) + gp_bunsig.setPlotTitle('Bunch Signal') + gp_bunsig.getAxis('bottom').setLabel('Time (ms)') + gp_bunsig.getAxis('left').setLabel('CNT') + gp_bunsig.add_scatter_curve( + ychannel=self.dev_pref+':SB_RAW', + xchannel=self.dev_pref+':SB_TSC', + color=QColor('blue'), lineStyle=Qt.SolidLine, + nchannel=self.dev_pref+':SB_RAW_SAMPLES') + + gp_mag = WfmGraph(self) + gp_mag.setPlotTitle('Magnitude') + gp_mag.getAxis('bottom').setLabel('Frequency (kHz)') + gp_mag.getAxis('left').setLabel('dB') + gp_mag.add_scatter_curve( + ychannel=self.dev_pref+':SB_MAG', + xchannel=self.dev_pref+':SB_FREQ', + color=QColor('blue'), lineStyle=Qt.SolidLine) + gp_mag.add_marker( + self.dev_pref+':SB_PEAKFREQ1', + self.dev_pref+':SB_PEAK1', + name='Mag', color=QColor('magenta'), symbol='o') + + gp_phs = WfmGraph(self) + gp_phs.setPlotTitle('Phase') + gp_phs.getAxis('bottom').setLabel('Frequency (kHz)') + gp_phs.getAxis('left').setLabel('deg') + gp_phs.add_scatter_curve( + ychannel=self.dev_pref+':SB_PHASE', + xchannel=self.dev_pref+':SB_FREQ', + color=QColor('blue'), lineStyle=Qt.SolidLine) + gp_phs.add_marker( + self.dev_pref+':SB_PEAKFREQ1', + self.dev_pref+':SB_PHASE1', + name='Phs', color=QColor('magenta'), symbol='o') + + ld_tfenbl = QLabel('Transfer Function Enable', self) + cb_tfenbl = PyDMEnumComboBox(self, self.dev_pref+':SB_TF_ENABLE') + + ld_nrptsfft = QLabel('Number of points for FFT/Window', self) + cb_nrptsfft = PyDMEnumComboBox(self, self.dev_pref+':SB_NFFT') + + ld_fftovlap = QLabel('Overlap (Autolimited to NFFT/2)', self) + cb_fftovlap = PyDMEnumComboBox( + self, self.dev_pref+':SB_NOVERLAP') + + ld_delaycal = QLabel('Delay Cal [ns]', self) + le_delaycal = PyDMLineEdit(self, self.dev_pref+':SB_DEL_CAL') + + ld_avg = QLabel('Averaging', self) + sb_avg = SiriusSpinbox(self, self.dev_pref+':SB_SP_AVG') + + gbox_fftsett = QGroupBox(self) + lay_fftsett = QGridLayout(gbox_fftsett) + lay_fftsett.addWidget(ld_tfenbl, 0, 0) + lay_fftsett.addWidget(cb_tfenbl, 0, 1) + lay_fftsett.addWidget(ld_nrptsfft, 1, 0) + lay_fftsett.addWidget(cb_nrptsfft, 1, 1) + lay_fftsett.addWidget(ld_fftovlap, 2, 0) + lay_fftsett.addWidget(cb_fftovlap, 2, 1) + lay_fftsett.addWidget(ld_delaycal, 3, 0) + lay_fftsett.addWidget(le_delaycal, 3, 1) + lay_fftsett.addWidget(ld_avg, 4, 0) + lay_fftsett.addWidget(sb_avg, 4, 1) + + lay_graph = QGridLayout() + lay_graph.addWidget(gp_bunsig, 0, 0) + lay_graph.addWidget(gp_mag, 0, 1) + lay_graph.addWidget(gbox_fftsett, 1, 0) + lay_graph.addWidget(gp_phs, 1, 1) + + ld_acqenbl = QLabel('Acq. Enable', self) + cb_acqenbl = PyDMStateButton(self, self.dev_pref+':SB_ACQ_EN') + + ld_acqsing = QLabel('Acq. Mode', self) + cb_acqsing = PyDMEnumComboBox(self, self.dev_pref+':SB_ACQ_SINGLE') + + ld_mean = QLabel('Mean', self, alignment=Qt.AlignCenter) + lb_mean = SiriusLabel(self, self.dev_pref+':SB_MEANVAL') + + ld_rms = QLabel('RMS', self, alignment=Qt.AlignCenter) + lb_rms = SiriusLabel(self, self.dev_pref+':SB_RMSVAL') + + ld_ampp2p = QLabel('Amp P-P', self, alignment=Qt.AlignCenter) + lb_ampp2p = SiriusLabel(self, self.dev_pref+':SB_AMP_PP') + + ld_bunid = QLabel('Bunch ID', self, alignment=Qt.AlignCenter) + lb_bunid = SiriusLabel(self, self.dev_pref+':SB_RAW_BUNCH_ID') + + gbox_acqctrl = QGroupBox('Acquisition control', self) + lay_acqctrl = QGridLayout(gbox_acqctrl) + lay_acqctrl.addWidget(ld_acqenbl, 0, 0) + lay_acqctrl.addWidget(cb_acqenbl, 0, 1) + lay_acqctrl.addWidget(ld_acqsing, 1, 0) + lay_acqctrl.addWidget(cb_acqsing, 1, 1) + lay_acqctrl.addItem( + QSpacerItem(15, 1, QSzPlcy.Fixed, QSzPlcy.Ignored), 0, 2, 2, 1) + lay_acqctrl.addWidget(ld_mean, 0, 3) + lay_acqctrl.addWidget(lb_mean, 0, 4) + lay_acqctrl.addWidget(ld_ampp2p, 0, 5) + lay_acqctrl.addWidget(lb_ampp2p, 0, 6) + lay_acqctrl.addWidget(ld_rms, 1, 3) + lay_acqctrl.addWidget(lb_rms, 1, 4) + lay_acqctrl.addWidget(ld_bunid, 1, 5) + lay_acqctrl.addWidget(lb_bunid, 1, 6) + + # Marker + ld_mkspan = QLabel('Span (kHz)', self, alignment=Qt.AlignCenter) + le_mklow = PyDMLineEdit(self, self.dev_pref+':SB_SP_LOW1') + le_mkhigh = PyDMLineEdit(self, self.dev_pref+':SB_SP_HIGH1') + + ld_mkmode = QLabel('Mode', self, alignment=Qt.AlignCenter) + cb_mkmode = PyDMEnumComboBox(self, self.dev_pref+':SB_SP_SEARCH1') + + ld_mkfreq = QLabel('Frequency', self, alignment=Qt.AlignCenter) + lb_mkfreq = SiriusLabel(self, self.dev_pref+':SB_PEAKFREQ1') + lb_mkfreq.showUnits = True + + ld_mktune = QLabel('Tune', self, alignment=Qt.AlignCenter) + lb_mktune = SiriusLabel(self, self.dev_pref+':SB_PEAKTUNE1') + lb_mktune.showUnits = True + + ld_mkmag = QLabel('Magnitude', self, alignment=Qt.AlignCenter) + lb_mkmag = SiriusLabel(self, self.dev_pref+':SB_PEAK1') + lb_mkmag.showUnits = True + + ld_mkphs = QLabel('Phase', self, alignment=Qt.AlignCenter) + lb_mkphs = SiriusLabel(self, self.dev_pref+':SB_PHASE1') + lb_mkphs.showUnits = True + + lay = QGridLayout() + lay.addWidget(ld_mkfreq, 1, 0) + lay.addWidget(lb_mkfreq, 2, 0) + lay.addWidget(ld_mktune, 1, 1) + lay.addWidget(lb_mktune, 2, 1) + lay.addWidget(ld_mkmag, 1, 2) + lay.addWidget(lb_mkmag, 2, 2) + lay.addWidget(ld_mkphs, 1, 3) + lay.addWidget(lb_mkphs, 2, 3) + lay.setRowStretch(0, 2) + lay.setRowStretch(3, 2) + + gbox_mk = QGroupBox('Marker', self) + lay_mk = QGridLayout(gbox_mk) + lay_mk.addWidget(ld_mkmode, 0, 0) + lay_mk.addWidget(cb_mkmode, 0, 1) + lay_mk.addWidget(ld_mkspan, 1, 0, 1, 2) + lay_mk.addWidget(le_mklow, 2, 0) + lay_mk.addWidget(le_mkhigh, 2, 1) + lay_mk.addLayout(lay, 0, 2, 3, 1) + + wid = QWidget() + lay = QGridLayout(wid) + lay.addLayout(lay_graph, 0, 0, 1, 2) + lay.addWidget(gbox_acqctrl, 1, 0) + lay.addWidget(gbox_mk, 1, 1) + lay.setRowStretch(0, 5) + lay.setRowStretch(1, 1) + lay.setColumnStretch(0, 1) + lay.setColumnStretch(1, 1) + return wid
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_bbb/advanced_settings.html b/_modules/siriushla/si_di_bbb/advanced_settings.html new file mode 100644 index 000000000..18a483ae8 --- /dev/null +++ b/_modules/siriushla/si_di_bbb/advanced_settings.html @@ -0,0 +1,707 @@ + + + + + + siriushla.si_di_bbb.advanced_settings — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_di_bbb.advanced_settings

+"""BbB Devices Module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QLabel, QWidget, QGridLayout, QGroupBox, QHBoxLayout
+import qtawesome as qta
+from pydm.widgets import PyDMEnumComboBox
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..widgets import SiriusFrame, SiriusLabel, SiriusPushButton, \
+    SiriusSpinbox, SiriusScaleIndicator
+
+from .util import set_bbb_color
+
+
+
+[docs] +class BbBAdvancedSettingsWidget(QWidget): + """BbB Advanced Settings Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self.prefix = prefix + self.device = device + self._setupUi() + + def _setupUi(self): + dac_wid = BbBSlowDACsWidget(self, self.prefix, self.device) + adc_wid = BbBADCWidget(self, self.prefix, self.device) + devs_wid = BbBGeneralSettingsWidget(self, self.prefix, self.device) + intlk = BbBInterlock(self, self.prefix, self.device) + + lay = QGridLayout(self) + lay.addWidget(devs_wid, 1, 1) + lay.addWidget(intlk, 1, 3) + lay.addWidget(adc_wid, 3, 1) + lay.addWidget(dac_wid, 3, 3) + lay.setColumnStretch(0, 3) + lay.setColumnStretch(2, 3) + lay.setColumnStretch(4, 3) + lay.setRowStretch(0, 3) + lay.setRowStretch(2, 3) + lay.setRowStretch(4, 3)
+ + + +
+[docs] +class BbBGeneralSettingsWidget(QWidget): + """BbB General Settings Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._setupUi() + + def _setupUi(self): + ld_maindev = QLabel( + '<h3>General Settings</h3>', self, alignment=Qt.AlignCenter) + + # # Delay Lines + ld_adcclock = QLabel('ADC Clock', self) + sb_adcclock = SiriusSpinbox(self, self.dev_pref+':ECLDEL0') + fr_adcclock = SiriusFrame(self, self.dev_pref+':ECLDEL0_SUBWR') + fr_adcclock.add_widget(sb_adcclock) + + ld_fidclock = QLabel('Fiducial Clock', self) + sb_fidclock = SiriusSpinbox(self, self.dev_pref+':ECLDEL1') + fr_fidclock = SiriusFrame(self, self.dev_pref+':ECLDEL1_SUBWR') + fr_fidclock.add_widget(sb_fidclock) + + ld_fiducial = QLabel('Fiducial', self) + sb_fiducial = SiriusSpinbox(self, self.dev_pref+':ECLDEL2') + fr_fiducial = SiriusFrame(self, self.dev_pref+':ECLDEL2_SUBWR') + fr_fiducial.add_widget(sb_fiducial) + + ld_dacclock = QLabel('DAC Clock', self) + sb_dacclock = SiriusSpinbox(self, self.dev_pref+':ECLDEL3') + fr_dacclock = SiriusFrame(self, self.dev_pref+':ECLDEL3_SUBWR') + fr_dacclock.add_widget(sb_dacclock) + + gbox_delaylines = QGroupBox('Delay lines', self) + lay_delaylines = QGridLayout(gbox_delaylines) + lay_delaylines.addWidget(ld_adcclock, 0, 0) + lay_delaylines.addWidget(fr_adcclock, 0, 1) + lay_delaylines.addWidget(ld_fidclock, 1, 0) + lay_delaylines.addWidget(fr_fidclock, 1, 1) + lay_delaylines.addWidget(ld_fiducial, 2, 0) + lay_delaylines.addWidget(fr_fiducial, 2, 1) + lay_delaylines.addWidget(ld_dacclock, 3, 0) + lay_delaylines.addWidget(fr_dacclock, 3, 1) + + # # Thresholds and offsets + ld_lvl = QLabel('<h4>Level</h4>', self, alignment=Qt.AlignCenter) + ld_enbl = QLabel('<h4>Enbl</h4>', self, alignment=Qt.AlignCenter) + ld_v = QLabel('<h4>V</h4>', self, alignment=Qt.AlignCenter) + ld_edge = QLabel('<h4>Edge</h4>', self, alignment=Qt.AlignCenter) + + ld_fid = QLabel('Fiducial', self) + cb_fidlvl = PyDMEnumComboBox(self, self.dev_pref+':LEVEL_FID') + cb_fidlvlenbl = PyDMEnumComboBox( + self, self.dev_pref+':LEVEL_FID_ENABLE') + cb_fidlvlenbl.setStyleSheet('max-width:3em;') + sb_fidv = SiriusSpinbox(self, self.dev_pref+':AD5644_V_CH9') + sb_fidv.showUnits = True + fr_fidv = SiriusFrame(self, self.dev_pref+':AD5644CH9_SUBWR') + fr_fidv.add_widget(sb_fidv) + + ld_trg1 = QLabel('Trigger 1', self) + cb_trg1lvl = PyDMEnumComboBox(self, self.dev_pref+':LEVEL_TRIG1') + cb_trg1lvlenbl = PyDMEnumComboBox( + self, self.dev_pref+':LEVEL_TRIG1_ENABLE') + cb_trg1lvlenbl.setStyleSheet('max-width:3em;') + sb_trg1lvlv = SiriusSpinbox(self, self.dev_pref+':LEVEL_VTRIG1') + sb_trg1lvlv.showUnits = True + fr_trg1lvlv = SiriusFrame( + self, self.dev_pref+':AD5644CH10_SUBWR') + fr_trg1lvlv.add_widget(sb_trg1lvlv) + cb_trg1edge = PyDMEnumComboBox(self, self.dev_pref+':TRIG1INV') + cb_trg1edge.setStyleSheet('max-width:3.2em;') + + ld_trg2 = QLabel('Trigger 2', self) + cb_trg2lvl = PyDMEnumComboBox(self, self.dev_pref+':LEVEL_TRIG2') + cb_trg2lvlenbl = PyDMEnumComboBox( + self, self.dev_pref+':LEVEL_TRIG2_ENABLE') + cb_trg2lvlenbl.setStyleSheet('max-width:3em;') + sb_trg2lvlv = SiriusSpinbox(self, self.dev_pref+':LEVEL_VTRIG2') + sb_trg2lvlv.showUnits = True + fr_trg2lvlv = SiriusFrame(self, self.dev_pref+':AD5644CH8_SUBWR') + fr_trg2lvlv.add_widget(sb_trg2lvlv) + cb_trg2edge = PyDMEnumComboBox(self, self.dev_pref+':TRIG2INV') + cb_trg2edge.setStyleSheet('max-width:3.2em;') + + ld_dacoff = QLabel('DAC Offset', self) + sb_dacoff = SiriusSpinbox(self, self.dev_pref+':AD5644_V_CH11') + sb_dacoff.showUnits = True + fr_dacoff = SiriusFrame(self, self.dev_pref+':AD5644CH11_SUBWR') + fr_dacoff.add_widget(sb_dacoff) + + gbox_thoff = QGroupBox('Thresholds and Offsets', self) + lay_thoff = QGridLayout(gbox_thoff) + lay_thoff.addWidget(ld_lvl, 0, 1) + lay_thoff.addWidget(ld_enbl, 0, 2) + lay_thoff.addWidget(ld_v, 0, 3) + lay_thoff.addWidget(ld_edge, 0, 4) + lay_thoff.addWidget(ld_fid, 1, 0) + lay_thoff.addWidget(cb_fidlvl, 1, 1) + lay_thoff.addWidget(cb_fidlvlenbl, 1, 2) + lay_thoff.addWidget(fr_fidv, 1, 3) + lay_thoff.addWidget(ld_trg1, 2, 0) + lay_thoff.addWidget(cb_trg1lvl, 2, 1) + lay_thoff.addWidget(cb_trg1lvlenbl, 2, 2) + lay_thoff.addWidget(fr_trg1lvlv, 2, 3) + lay_thoff.addWidget(cb_trg1edge, 2, 4) + lay_thoff.addWidget(ld_trg2, 3, 0) + lay_thoff.addWidget(cb_trg2lvl, 3, 1) + lay_thoff.addWidget(cb_trg2lvlenbl, 3, 2) + lay_thoff.addWidget(fr_trg2lvlv, 3, 3) + lay_thoff.addWidget(cb_trg2edge, 3, 4) + lay_thoff.addWidget(ld_dacoff, 4, 0) + lay_thoff.addWidget(fr_dacoff, 4, 3) + lay_thoff.setColumnStretch(0, 3) + lay_thoff.setColumnStretch(1, 2) + lay_thoff.setColumnStretch(2, 1) + lay_thoff.setColumnStretch(3, 5) + lay_thoff.setColumnStretch(4, 1) + + # # FIR + ld_sfir = QLabel('Shaper FIR ([C0 2^17 C2])', self) + + ld_firc0 = QLabel('C0', self) + sb_firc0 = SiriusSpinbox(self, self.dev_pref+':SHAPE_C0') + fr_firc0 = SiriusFrame(self, self.dev_pref+':SHAPE_C0_SUBWR') + fr_firc0.add_widget(sb_firc0) + + ld_firc2 = QLabel('C2', self) + sb_firc2 = SiriusSpinbox(self, self.dev_pref+':SHAPE_C2') + fr_firc2 = SiriusFrame(self, self.dev_pref+':SHAPE_C2_SUBWR') + fr_firc2.add_widget(sb_firc2) + + lay_fir = QHBoxLayout() + lay_fir.addStretch() + lay_fir.addWidget(ld_sfir) + lay_fir.addStretch() + lay_fir.addWidget(ld_firc0) + lay_fir.addWidget(fr_firc0) + lay_fir.addStretch() + lay_fir.addWidget(ld_firc2) + lay_fir.addWidget(fr_firc2) + lay_fir.addStretch() + + lay = QGridLayout(self) + lay.addWidget(ld_maindev, 0, 1, 1, 2) + lay.addWidget(gbox_delaylines, 1, 1) + lay.addWidget(gbox_thoff, 1, 2) + lay.addLayout(lay_fir, 2, 1, 1, 2) + lay.setColumnStretch(0, 3) + lay.setColumnStretch(3, 3) + lay.setRowStretch(3, 3) + + self.setStyleSheet("""SiriusFrame{max-height: 1.8em;}""")
+ + + +
+[docs] +class BbBSlowDACsWidget(QWidget): + """BbB Slow DACs Settings Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._setupUi() + + def _setupUi(self): + ld_dacs = QLabel( + '<h3>AD5644 DACs</h3>', self, alignment=Qt.AlignCenter) + + ld_dacch0 = QLabel('0', self, alignment=Qt.AlignCenter) + ld_dacch0.setStyleSheet('font-weight: bold; max-width: 3em;') + sb_dacch0 = SiriusSpinbox(self, self.dev_pref+':AD5644_V_CH0') + sb_dacch0.showUnits = True + fr_dacch0 = SiriusFrame(self, self.dev_pref+':AD5644CH0_SUBWR') + fr_dacch0.add_widget(sb_dacch0) + + ld_dacch1 = QLabel('1', self, alignment=Qt.AlignCenter) + ld_dacch1.setStyleSheet('font-weight: bold; max-width: 3em;') + sb_dacch1 = SiriusSpinbox(self, self.dev_pref+':AD5644_V_CH1') + sb_dacch1.showUnits = True + fr_dacch1 = SiriusFrame(self, self.dev_pref+':AD5644CH1_SUBWR') + fr_dacch1.add_widget(sb_dacch1) + + ld_dacch2 = QLabel('2', self, alignment=Qt.AlignCenter) + ld_dacch2.setStyleSheet('font-weight: bold; max-width: 3em;') + sb_dacch2 = SiriusSpinbox(self, self.dev_pref+':AD5644_V_CH2') + sb_dacch2.showUnits = True + fr_dacch2 = SiriusFrame(self, self.dev_pref+':AD5644CH2_SUBWR') + fr_dacch2.add_widget(sb_dacch2) + + ld_dacch3 = QLabel('3', self, alignment=Qt.AlignCenter) + ld_dacch3.setStyleSheet('font-weight: bold; max-width: 3em;') + sb_dacch3 = SiriusSpinbox(self, self.dev_pref+':AD5644_V_CH3') + sb_dacch3.showUnits = True + fr_dacch3 = SiriusFrame(self, self.dev_pref+':AD5644CH3_SUBWR') + fr_dacch3.add_widget(sb_dacch3) + + ld_dacref0 = QLabel('Ref\n0-3', self, alignment=Qt.AlignCenter) + ld_dacref0.setStyleSheet('font-weight: bold; max-width: 3em;') + cb_dacref0 = PyDMEnumComboBox(self, self.dev_pref+':AD5644REF0_BO') + + ld_dacch4 = QLabel('4', self, alignment=Qt.AlignCenter) + ld_dacch4.setStyleSheet('font-weight: bold; max-width: 3em;') + sb_dacch4 = SiriusSpinbox(self, self.dev_pref+':AD5644_V_CH4') + sb_dacch4.showUnits = True + fr_dacch4 = SiriusFrame(self, self.dev_pref+':AD5644CH4_SUBWR') + fr_dacch4.add_widget(sb_dacch4) + + ld_dacch5 = QLabel('5', self, alignment=Qt.AlignCenter) + ld_dacch5.setStyleSheet('font-weight: bold; max-width: 3em;') + sb_dacch5 = SiriusSpinbox(self, self.dev_pref+':AD5644_V_CH5') + sb_dacch5.showUnits = True + fr_dacch5 = SiriusFrame(self, self.dev_pref+':AD5644CH5_SUBWR') + fr_dacch5.add_widget(sb_dacch5) + + ld_dacch6 = QLabel('6', self, alignment=Qt.AlignCenter) + ld_dacch6.setStyleSheet('font-weight: bold; max-width: 3em;') + sb_dacch6 = SiriusSpinbox(self, self.dev_pref+':AD5644_V_CH6') + sb_dacch6.showUnits = True + fr_dacch6 = SiriusFrame(self, self.dev_pref+':AD5644CH6_SUBWR') + fr_dacch6.add_widget(sb_dacch6) + + ld_dacch7 = QLabel('7', self, alignment=Qt.AlignCenter) + ld_dacch7.setStyleSheet('font-weight: bold; max-width: 3em;') + sb_dacch7 = SiriusSpinbox(self, self.dev_pref+':AD5644_V_CH7') + sb_dacch7.showUnits = True + fr_dacch7 = SiriusFrame(self, self.dev_pref+':AD5644CH7_SUBWR') + fr_dacch7.add_widget(sb_dacch7) + + ld_dacref1 = QLabel('Ref\n4-7', self, alignment=Qt.AlignCenter) + ld_dacref1.setStyleSheet('font-weight: bold; max-width: 3em;') + cb_dacref1 = PyDMEnumComboBox(self, self.dev_pref+':AD5644REF1_BO') + + cb_dacmode = PyDMEnumComboBox(self, self.dev_pref+':AD5644TEST_BO') + + lay = QGridLayout(self) + lay.setAlignment(Qt.AlignCenter | Qt.AlignTop) + lay.setHorizontalSpacing(15) + lay.setVerticalSpacing(15) + lay.addWidget(ld_dacs, 0, 1, 1, 5) + lay.addWidget(ld_dacch0, 1, 1) + lay.addWidget(fr_dacch0, 1, 2) + lay.addWidget(ld_dacch1, 2, 1) + lay.addWidget(fr_dacch1, 2, 2) + lay.addWidget(ld_dacch2, 3, 1) + lay.addWidget(fr_dacch2, 3, 2) + lay.addWidget(ld_dacch3, 4, 1) + lay.addWidget(fr_dacch3, 4, 2) + lay.addWidget(ld_dacref0, 5, 1) + lay.addWidget(cb_dacref0, 5, 2) + lay.addWidget(ld_dacch4, 1, 4) + lay.addWidget(fr_dacch4, 1, 5) + lay.addWidget(ld_dacch5, 2, 4) + lay.addWidget(fr_dacch5, 2, 5) + lay.addWidget(ld_dacch6, 3, 4) + lay.addWidget(fr_dacch6, 3, 5) + lay.addWidget(ld_dacch7, 4, 4) + lay.addWidget(fr_dacch7, 4, 5) + lay.addWidget(ld_dacref1, 5, 4) + lay.addWidget(cb_dacref1, 5, 5) + lay.addWidget(cb_dacmode, 6, 1, 1, 5)
+ + + +
+[docs] +class BbBADCWidget(QWidget): + """BbB 8-Channel ADC Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._setupUi() + + def _setupUi(self): + ld_adc = QLabel( + '<h3>8-Channel ADC</h3>', self, alignment=Qt.AlignCenter) + + ld_adcch0 = QLabel( + '<h4>Channel 0</h4>', self, alignment=Qt.AlignCenter) + si_adcch0 = SiriusScaleIndicator(self, self.dev_pref+':MAX1202_CH0') + si_adcch0.showUnits = True + si_adcch0.setObjectName('ch0') + si_adcch0.setStyleSheet('#ch0{min-height:6em; min-width:8em;}') + + ld_adcch1 = QLabel( + '<h4>Channel 1</h4>', self, alignment=Qt.AlignCenter) + si_adcch1 = SiriusScaleIndicator(self, self.dev_pref+':MAX1202_CH1') + si_adcch1.showUnits = True + si_adcch1.setObjectName('ch1') + si_adcch1.setStyleSheet('#ch1{min-height:6em; min-width:8em;}') + + ld_adcch2 = QLabel( + '<h4>Channel 2</h4>', self, alignment=Qt.AlignCenter) + si_adcch2 = SiriusScaleIndicator(self, self.dev_pref+':MAX1202_CH2') + si_adcch2.showUnits = True + si_adcch2.setObjectName('ch2') + si_adcch2.setStyleSheet('#ch2{min-height:6em; min-width:8em;}') + + ld_adcch3 = QLabel( + '<h4>Channel 3</h4>', self, alignment=Qt.AlignCenter) + si_adcch3 = SiriusScaleIndicator(self, self.dev_pref+':MAX1202_CH3') + si_adcch3.showUnits = True + si_adcch3.setObjectName('ch3') + si_adcch3.setStyleSheet('#ch3{min-height:6em; min-width:8em;}') + + ld_adcch4 = QLabel( + '<h4>Channel 4</h4>', self, alignment=Qt.AlignCenter) + si_adcch4 = SiriusScaleIndicator(self, self.dev_pref+':MAX1202_CH4') + si_adcch4.showUnits = True + si_adcch4.setObjectName('ch4') + si_adcch4.setStyleSheet('#ch4{min-height:6em; min-width:8em;}') + + ld_adcch5 = QLabel( + '<h4>Channel 5</h4>', self, alignment=Qt.AlignCenter) + si_adcch5 = SiriusScaleIndicator(self, self.dev_pref+':MAX1202_CH5') + si_adcch5.showUnits = True + si_adcch5.setObjectName('ch5') + si_adcch5.setStyleSheet('#ch5{min-height:6em; min-width:8em;}') + + ld_adcch6 = QLabel( + '<h4>Channel 6</h4>', self, alignment=Qt.AlignCenter) + si_adcch6 = SiriusScaleIndicator(self, self.dev_pref+':MAX1202_CH6') + si_adcch6.showUnits = True + si_adcch6.setObjectName('ch6') + si_adcch6.setStyleSheet('#ch6{min-height:6em; min-width:8em;}') + + ld_adcch7 = QLabel( + '<h4>Channel 7</h4>', self, alignment=Qt.AlignCenter) + si_adcch7 = SiriusScaleIndicator(self, self.dev_pref+':MAX1202_CH7') + si_adcch7.showUnits = True + si_adcch7.setObjectName('ch7') + si_adcch7.setStyleSheet('#ch7{min-height:6em; min-width:8em;}') + + lay = QGridLayout(self) + lay.setAlignment(Qt.AlignCenter | Qt.AlignTop) + lay.setHorizontalSpacing(15) + lay.setVerticalSpacing(15) + lay.addWidget(ld_adc, 0, 0, 1, 4) + lay.addWidget(ld_adcch0, 1, 0) + lay.addWidget(ld_adcch2, 1, 1) + lay.addWidget(ld_adcch4, 1, 2) + lay.addWidget(ld_adcch6, 1, 3) + lay.addWidget(si_adcch0, 2, 0) + lay.addWidget(si_adcch2, 2, 1) + lay.addWidget(si_adcch4, 2, 2) + lay.addWidget(si_adcch6, 2, 3) + lay.addWidget(ld_adcch1, 3, 0) + lay.addWidget(ld_adcch3, 3, 1) + lay.addWidget(ld_adcch5, 3, 2) + lay.addWidget(ld_adcch7, 3, 3) + lay.addWidget(si_adcch1, 4, 0) + lay.addWidget(si_adcch3, 4, 1) + lay.addWidget(si_adcch5, 4, 2) + lay.addWidget(si_adcch7, 4, 3)
+ + + +
+[docs] +class BbBInterlock(QWidget): + """BbB Interlock Settings Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._setupUi() + + def _setupUi(self): + ld_intlk = QLabel( + '<h3>Interlock Controls</h3>', self, alignment=Qt.AlignCenter) + + ld_sp = QLabel('Setpoint', self, alignment=Qt.AlignCenter) + # ld_sp.setStyleSheet('font-weight: bold; max-width: 3em;') + ld_cyc = QLabel('RF/4 Cycles', self, alignment=Qt.AlignCenter) + # ld_cyc.setStyleSheet('font-weight: bold; max-width: 3em;') + + ld_sat = QLabel('Saturation Time', self) + sb_sat = SiriusSpinbox(self, self.dev_pref+':ILOCK_TSAT') + sb_sat.showUnits = True + lb_sat = SiriusLabel(self, self.dev_pref+':ILOCK_TSAT_T2C') + lb_sat.setAlignment(Qt.AlignCenter) + + ld_tim = QLabel('Timeout', self) + sb_tim = SiriusSpinbox(self, self.dev_pref+':ILOCK_TOUT') + sb_tim.showUnits = True + lb_tim = SiriusLabel(self, self.dev_pref+':ILOCK_TOUT_T2C') + lb_tim.setAlignment(Qt.AlignCenter) + + pvn = self.dev_pref+':ILOCK_TRIPPED' + lb_sts = SiriusLabel(self, init_channel=pvn) + lb_sts.enum_strings = ['Status Ok', 'Interlocked'] + lb_sts.displayFormat = lb_sts.DisplayFormat.String + fr_sts = SiriusFrame(self, pvn, is_float=True) + fr_sts.borderWidth = 2 + fr_sts.add_widget(lb_sts) + pb_rst = SiriusPushButton( + self, init_channel=self.dev_pref+':ILOCK_RESET', pressValue=1, + releaseValue=0) + pb_rst.setText('Reset') + pb_rst.setToolTip('Reset Counts') + pb_rst.setIcon(qta.icon('fa5s.sync')) + wd_sts = QWidget(self) + wd_sts.setLayout(QHBoxLayout()) + wd_sts.layout().addStretch() + wd_sts.layout().addWidget(fr_sts) + wd_sts.layout().addStretch() + wd_sts.layout().addWidget(pb_rst) + wd_sts.layout().addStretch() + + ld_sens = QLabel( + '<h3>Sensitivity Controls</h3>', self, alignment=Qt.AlignCenter) + + ld_tun = QLabel('Fractional Tune', self) + sb_tun = SiriusSpinbox(self, self.dev_pref+':ILOCK_TUNE') + sb_tun.showUnits = True + + ld_tap = QLabel('Filter Taps', self) + sb_tap = SiriusSpinbox(self, self.dev_pref+':ILOCK_TAPS') + sb_tap.showUnits = True + + ld_cal = QLabel('Calibration', self) + sb_cal = SiriusSpinbox(self, self.dev_pref+':ILOCK_FE_CAL') + sb_cal.showUnits = True + + ld_ncur = QLabel('Nominal Current', self) + sb_ncur = SiriusSpinbox(self, self.dev_pref+':ILOCK_CURRENT') + sb_ncur.showUnits = True + + ld_thr = QLabel('Threshold', self) + sb_thr = SiriusSpinbox(self, self.dev_pref+':ILOCK_THRESH') + sb_thr.showUnits = True + + pb_upt = SiriusPushButton( + self, init_channel=self.dev_pref+':ILOCK_UPDATE', pressValue=1, + releaseValue=0) + pb_upt.setText('Update Filter') + pb_upt.setToolTip('Update Filter Config') + pb_upt.setIcon(qta.icon('mdi.sync')) + pb_upt.setStyleSheet("icon-size:20px;") + + pb_ld = SiriusPushButton( + self, init_channel=self.dev_pref+':BO_CPCOEFF', pressValue=1, + releaseValue=0) + pb_ld.setText('Apply Filter') + pb_ld.setToolTip('Apply Filter Config to Feedback') + pb_ld.setIcon(qta.icon('mdi.upload')) + pb_ld.setStyleSheet("icon-size:20px;") + + lay = QGridLayout(self) + lay.setAlignment(Qt.AlignCenter | Qt.AlignTop) + lay.addWidget(ld_intlk, 0, 0, 1, 5) + lay.addWidget(ld_sp, 1, 1) + lay.addWidget(ld_cyc, 1, 2) + lay.addWidget(ld_sat, 2, 0) + lay.addWidget(sb_sat, 2, 1) + lay.addWidget(lb_sat, 2, 2) + lay.addWidget(ld_tim, 3, 0) + lay.addWidget(sb_tim, 3, 1) + lay.addWidget(lb_tim, 3, 2) + lay.addWidget(wd_sts, 4, 0, 1, 3) + lays = QGridLayout() + lays.addWidget(ld_sens, 0, 0, 1, 4) + lays.addWidget(ld_tun, 1, 0) + lays.addWidget(sb_tun, 1, 1) + lays.addWidget(ld_tap, 2, 0) + lays.addWidget(sb_tap, 2, 1) + lays.addWidget(ld_cal, 3, 0) + lays.addWidget(sb_cal, 3, 1) + lays.addWidget(ld_ncur, 4, 0) + lays.addWidget(sb_ncur, 4, 1) + lays.addWidget(ld_thr, 1, 2) + lays.addWidget(sb_thr, 1, 3) + lays.addWidget(pb_upt, 3, 2, 1, 2) + lays.addWidget(pb_ld, 4, 2, 1, 2) + lay.addLayout(lays, 5, 0, 1, 3)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_bbb/bbb.html b/_modules/siriushla/si_di_bbb/bbb.html new file mode 100644 index 000000000..2d16db810 --- /dev/null +++ b/_modules/siriushla/si_di_bbb/bbb.html @@ -0,0 +1,554 @@ + + + + + + siriushla.si_di_bbb.bbb — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_di_bbb.bbb

+"""BbB Control Module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QLabel, QWidget, QGridLayout, \
+    QGroupBox, QSpacerItem, QSizePolicy as QSzPlcy, QPushButton, QHBoxLayout
+import qtawesome as qta
+from pydm.widgets import PyDMEnumComboBox
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..util import connect_window, connect_newprocess
+from ..widgets.windows import create_window_from_widget
+from ..widgets import SiriusMainWindow, SiriusLedAlert, PyDMStateButton, \
+    PyDMLedMultiChannel, DetachableTabWidget, SiriusLabel, SiriusPushButton, \
+    SiriusSpinbox
+
+from .acquisition import BbBAcqSRAM, BbBAcqBRAM, BbBAcqSB
+from .coefficients import BbBCoefficientsWidget
+from .advanced_settings import BbBAdvancedSettingsWidget
+from .pwr_amps import BbBPwrAmpsWidget
+from .masks import BbBMasksWidget
+from .drive import BbBDriveSettingsWidget
+from .environment import BbBEnvironmMonWidget
+from .timing import BbBTimingWidget
+from .util import get_bbb_icon, set_bbb_color
+
+
+
+[docs] +class BbBControlWindow(SiriusMainWindow): + """BbB Control Window.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """.""" + super().__init__(parent) + self.prefix = prefix + self.device = _PVName(device) + self.dev_pref = self.device.substitute(prefix=prefix) + self.setWindowTitle(device+' Control Window') + self.setObjectName('SIApp') + self.setWindowIcon(get_bbb_icon()) + self._setupUi() + + def _setupUi(self): + label = QLabel( + '<h1>'+self.device+'</h1>', self, + alignment=Qt.AlignCenter) + + main_wid = BbBMainSettingsWidget( + self, self.prefix, self.device, resume=False) + coeff_wid = BbBCoefficientsWidget(self, self.prefix, self.device) + drive_wid = BbBDriveSettingsWidget(self, self.prefix, self.device) + sram_wid = BbBAcqSRAM(self, self.prefix, self.device) + bram_wid = BbBAcqBRAM(self, self.prefix, self.device) + sb_wid = BbBAcqSB(self, self.prefix, self.device) + mask_wid = BbBMasksWidget(self, self.prefix, self.device) + timing_wid = BbBTimingWidget(self, self.prefix, self.device) + pwr_amp_wid = BbBPwrAmpsWidget(self, self.prefix, self.device) + env_wid = BbBEnvironmMonWidget(self, self.prefix, self.device) + advanced_wid = BbBAdvancedSettingsWidget( + self, self.prefix, self.device) + + tab = DetachableTabWidget(self) + tab.setObjectName('SITab') + set_bbb_color(tab, self.device) + tab.addTab(main_wid, 'Main') + tab.addTab(sram_wid, 'SRAM') + tab.addTab(bram_wid, 'BRAM') + tab.addTab(mask_wid, 'Masks') + tab.addTab(coeff_wid, 'Coefficients') + tab.addTab(drive_wid, 'Drive') + tab.addTab(sb_wid, 'Tune Tracking') + tab.addTab(pwr_amp_wid, 'Pwr. Amps.') + tab.addTab(timing_wid, 'Timing') + tab.addTab(advanced_wid, 'Advanced Conf.') + tab.addTab(env_wid, 'Environment') + tab.setCurrentIndex(1) + + cw = QWidget(self) + self.setCentralWidget(cw) + lay = QGridLayout(cw) + lay.addWidget(label, 0, 0) + lay.addWidget(tab, 1, 0)
+ + + +
+[docs] +class BbBMainSettingsWidget(QWidget): + """BbB Main Senttings Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device='', + resume=True): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + typ2label = { + 'H': 'Horizontal', + 'V': 'Vertical', + 'L': 'Longitudinal'} + self._label = typ2label[self._device[-1]] + self._is_resumed = resume + self._setupUi() + + def _setupUi(self): + fbsett_wid = self._setupFeedbackSettings() + status_wid = self._setupStatusWidget() + + lay = QGridLayout(self) + lay.setAlignment(Qt.AlignTop | Qt.AlignCenter) + if self._is_resumed: + led_gensts = SiriusLedAlert(self, self.dev_pref+':ERRSUM') + dev_label = QLabel( + '<h3>'+self._label+'</h3>', self, alignment=Qt.AlignCenter) + self.pb_detail = QPushButton(qta.icon('fa5s.ellipsis-v'), '', self) + self.pb_detail.setObjectName('dtls') + self.pb_detail.setStyleSheet( + '#dtls{min-width:20px;max-width:20px;icon-size:15px;}') + cmd = ['sirius-hla-si-di-bbb.py', '-dev', self.dev_pref] + if self._prefix: + cmd.extend(['-p', self._prefix]) + connect_newprocess(self.pb_detail, cmd, self) + hbox_label = QHBoxLayout() + hbox_label.setContentsMargins(0, 0, 0, 0) + hbox_label.addWidget(led_gensts, alignment=Qt.AlignLeft) + hbox_label.addWidget(dev_label) + hbox_label.addWidget(self.pb_detail, alignment=Qt.AlignRight) + hbox_label.setStretch(0, 1) + hbox_label.setStretch(1, 10) + hbox_label.setStretch(2, 1) + + wid = QWidget(self) + wid.setObjectName('box') + wid.setStyleSheet(""" + #box{border: 2px solid gray;}""") + lay_box = QGridLayout(wid) + lay_box.setVerticalSpacing(15) + lay_box.addLayout(hbox_label, 0, 0) + lay_box.addWidget(fbsett_wid, 1, 0) + lay_box.addWidget(status_wid, 2, 0) + + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(wid) + else: + info_wid = BbBInfoWidget(self, self._prefix, self._device) + lay.addWidget(fbsett_wid, 0, 1) + lay.addWidget(status_wid, 0, 2) + lay.addWidget(info_wid, 0, 3) + lay.setColumnStretch(0, 3) + lay.setColumnStretch(4, 3) + lay.setRowStretch(1, 3) + + def _setupFeedbackSettings(self): + ld_fbenbl = QLabel('Enable', self) + pb_fbenbl = PyDMStateButton(self, self.dev_pref+':FBCTRL') + + ld_coefsel = QLabel('Coeficient Set', self) + cb_coefsel = PyDMEnumComboBox(self, self.dev_pref+':SETSEL') + + ld_sftgain = QLabel('Shift Gain', self) + sb_sftgain = SiriusSpinbox(self, self.dev_pref+':SHIFTGAIN') + + ld_downspl = QLabel('Downsampling', self) + sb_downspl = SiriusSpinbox(self, self.dev_pref+':PROC_DS') + + ld_satthrs = QLabel('Sat. Threshold [%]', self) + sb_satthrs = SiriusSpinbox(self, self.dev_pref+':SAT_THRESHOLD') + + lay = QGridLayout() + lay.addWidget(ld_fbenbl, 1, 0) + lay.addWidget(pb_fbenbl, 1, 1) + lay.addWidget(ld_coefsel, 2, 0) + lay.addWidget(cb_coefsel, 2, 1) + lay.addWidget(ld_sftgain, 3, 0) + lay.addWidget(sb_sftgain, 3, 1) + lay.addWidget(ld_downspl, 4, 0) + lay.addWidget(sb_downspl, 4, 1) + lay.addWidget(ld_satthrs, 5, 0) + lay.addWidget(sb_satthrs, 5, 1) + + if self._is_resumed: + wid = QWidget() + wid.setLayout(lay) + fb_label = QLabel( + '<h4>Feedback Settings</h4>', self, alignment=Qt.AlignCenter) + lay.setContentsMargins(0, 0, 0, 0) + lay.setVerticalSpacing(12) + lay.addWidget(fb_label, 0, 0, 1, 2) + else: + wid = QGroupBox('Feedback Settings', self) + wid.setLayout(lay) + + ld_gensts = QLabel('Setup Status', self) + led_gensts = SiriusLedAlert(self, self.dev_pref+':ERRSUM') + lay.addWidget(ld_gensts, 6, 0) + lay.addWidget(led_gensts, 6, 1) + return wid + + def _setupStatusWidget(self): + if self._is_resumed: + ld_status = QLabel('<h4>Status</h4>', self) + + chs2vals = { + self.dev_pref+':CLKMISS': 0, + self.dev_pref+':PLL_UNLOCK': 0, + self.dev_pref+':DCM_UNLOCK': 0, + self.dev_pref+':ADC_OVR': 0, + self.dev_pref+':SAT': 0, + self.dev_pref+':FID_ERR': 0, + } + led_status = PyDMLedMultiChannel(self, chs2vals) + led_status.setStyleSheet( + 'QLed{min-width:1.29em; max-width:1.29em;}') + wind = create_window_from_widget( + BbBStatusWidget, title='BbB Status Details') + connect_window( + led_status, wind, resume=True, + parent=self, signal=led_status.clicked, + prefix=self._prefix, device=self._device) + + wid = QWidget() + lay = QGridLayout(wid) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(ld_status, 0, 0) + lay.addWidget(led_status, 0, 1) + else: + status = BbBStatusWidget(self, self._prefix, self._device) + wid = QGroupBox('Status', self) + lay = QGridLayout(wid) + lay.addWidget(status, 0, 0) + return wid
+ + + +
+[docs] +class BbBStatusWidget(QWidget): + """.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device='', + resume=False): + """Init.""" + super().__init__(parent) + self.setObjectName('SIApp') + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._is_resumed = resume + self._setupUi() + + def _setupUi(self): + ld_clkmis = QLabel('Clock missing', alignment=Qt.AlignCenter) + led_clkmis = SiriusLedAlert(self, self.dev_pref+':CLKMISS') + lb_clkmis = SiriusLabel(self, self.dev_pref+':CLKMISS_COUNT') + + ld_pllulk = QLabel('PLL Unlocked', alignment=Qt.AlignCenter) + led_pllulk = SiriusLedAlert(self, self.dev_pref+':PLL_UNLOCK') + lb_pllulk = SiriusLabel(self, self.dev_pref+':PLL_UNLOCK_COUNT') + + ld_dcmulk = QLabel('DCM unlocked', alignment=Qt.AlignCenter) + led_dcmulk = SiriusLedAlert(self, self.dev_pref+':DCM_UNLOCK') + lb_dcmulk = SiriusLabel(self, self.dev_pref+':DCM_UNLOCK_COUNT') + + ld_avcovr = QLabel('ADC Overrange', alignment=Qt.AlignCenter) + led_avcovr = SiriusLedAlert(self, self.dev_pref+':ADC_OVR') + lb_avcovr = SiriusLabel(self, self.dev_pref+':ADC_OVR_COUNT') + + ld_outsat = QLabel('Output satured', alignment=Qt.AlignCenter) + led_outsat = SiriusLedAlert(self, self.dev_pref+':SAT') + lb_outsat = SiriusLabel(self, self.dev_pref+':SAT_COUNT') + + ld_fiderr = QLabel('Fiducial Error', alignment=Qt.AlignCenter) + led_fiderr = SiriusLedAlert(self, self.dev_pref+':FID_ERR') + lb_fiderr = SiriusLabel(self, self.dev_pref+':FID_ERR_COUNT') + + ld_intvl = QLabel('Interval [s]', alignment=Qt.AlignCenter) + lb_intvl = SiriusLabel(self, self.dev_pref+':RST_COUNT') + pb_intvl = SiriusPushButton( + self, init_channel=self.dev_pref+':CNTRST', pressValue=1, + releaseValue=0) + pb_intvl.setText('Reset') + pb_intvl.setToolTip('Reset Counts') + pb_intvl.setIcon(qta.icon('fa5s.sync')) + pb_intvl.setObjectName('conf') + + wid = QWidget(self) + set_bbb_color(wid, self._device) + lay = QGridLayout(wid) + lay.setContentsMargins(0, 0, 0, 0) + if self._is_resumed: + lay.addWidget( + QLabel('<h3>Status</h3>', self, alignment=Qt.AlignCenter), + 0, 0, 1, 3) + lay.addItem( + QSpacerItem(1, 10, QSzPlcy.Ignored, QSzPlcy.Fixed), 1, 0) + lay.addWidget( + QLabel('<h4>Description</h4>', self, alignment=Qt.AlignCenter), + 2, 1) + lay.addWidget( + QLabel('<h4>Count</h4>', self, alignment=Qt.AlignCenter), 2, 2) + lay.addWidget(led_clkmis, 3, 0) + lay.addWidget(ld_clkmis, 3, 1) + lay.addWidget(lb_clkmis, 3, 2) + lay.addWidget(led_pllulk, 4, 0) + lay.addWidget(ld_pllulk, 4, 1) + lay.addWidget(lb_pllulk, 4, 2) + lay.addWidget(led_dcmulk, 5, 0) + lay.addWidget(ld_dcmulk, 5, 1) + lay.addWidget(lb_dcmulk, 5, 2) + lay.addWidget(led_avcovr, 6, 0) + lay.addWidget(ld_avcovr, 6, 1) + lay.addWidget(lb_avcovr, 6, 2) + lay.addWidget(led_outsat, 7, 0) + lay.addWidget(ld_outsat, 7, 1) + lay.addWidget(lb_outsat, 7, 2) + lay.addWidget(led_fiderr, 8, 0) + lay.addWidget(ld_fiderr, 8, 1) + lay.addWidget(lb_fiderr, 8, 2) + lay.addItem(QSpacerItem(1, 10, QSzPlcy.Ignored, QSzPlcy.Fixed), 8, 0) + hlay = QHBoxLayout() + lay.addLayout(hlay, 9, 0, 1, 3) + hlay.addWidget(ld_intvl) + hlay.addWidget(lb_intvl) + hlay.addStretch() + hlay.addWidget(pb_intvl) + + mainlay = QHBoxLayout(self) + mainlay.setContentsMargins(0, 0, 0, 0) + mainlay.addWidget(wid)
+ + + +
+[docs] +class BbBInfoWidget(QGroupBox): + """BbB Info Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._setupUi() + + def _setupUi(self): + self.setTitle('System Information') + + ld_rffreq = QLabel('Nominal RF Frequency', self) + lb_rffreq = SiriusLabel(self, self.dev_pref+':RF_FREQ') + lb_rffreq.showUnits = True + + ld_revfrq = QLabel('Revolution Frequency', self) + lb_revfrq = SiriusLabel(self, self.dev_pref+':FREV') + lb_revfrq.showUnits = True + + ld_hn = QLabel('Harmonic Number', self) + lb_hn = SiriusLabel(self, self.dev_pref+':HARM_NUM') + + ld_gtwrvw = QLabel('Gateway Revision', self) + lb_gtwrvw = SiriusLabel(self, self.dev_pref+':REVISION') + + ld_gtwtyp = QLabel('Gateway Type', self) + lb_gtwtyp = SiriusLabel(self, self.dev_pref+':GW_TYPE') + lb_gtwtyp.displayFormat = SiriusLabel.DisplayFormat.Hex + + ld_ipaddr = QLabel('IP Address', self) + lb_ipaddr = SiriusLabel(self, self.dev_pref+':IP_ADDR') + + lay = QGridLayout(self) + lay.setVerticalSpacing(15) + lay.addWidget(ld_rffreq, 0, 0) + lay.addWidget(lb_rffreq, 0, 1) + lay.addWidget(ld_revfrq, 1, 0) + lay.addWidget(lb_revfrq, 1, 1) + lay.addWidget(ld_hn, 2, 0) + lay.addWidget(lb_hn, 2, 1) + lay.addWidget(ld_gtwrvw, 3, 0) + lay.addWidget(lb_gtwrvw, 3, 1) + lay.addWidget(ld_gtwtyp, 4, 0) + lay.addWidget(lb_gtwtyp, 4, 1) + lay.addWidget(ld_ipaddr, 5, 0) + lay.addWidget(lb_ipaddr, 5, 1) + + self.setStyleSheet( + "SiriusLabel{qproperty-alignment: AlignCenter;}")
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_bbb/coefficients.html b/_modules/siriushla/si_di_bbb/coefficients.html new file mode 100644 index 000000000..20dc114ed --- /dev/null +++ b/_modules/siriushla/si_di_bbb/coefficients.html @@ -0,0 +1,543 @@ + + + + + + siriushla.si_di_bbb.coefficients — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_di_bbb.coefficients

+"""BbB Coefficients Module."""
+
+import numpy as _np
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QLabel, QWidget, QGridLayout, QGroupBox, QTabWidget
+import qtawesome as qta
+from pydm.widgets import PyDMEnumComboBox, PyDMLineEdit, PyDMPushButton
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..widgets import SiriusLedAlert, SiriusLabel, PyDMStateButton, \
+    SiriusLedState, SiriusSpinbox
+from .custom_widgets import WfmGraph
+from .util import set_bbb_color
+
+
+
+[docs] +class Label(SiriusLabel): + """.""" + +
+[docs] + def value_changed(self, new_value): + """.""" + if isinstance(new_value, _np.ndarray): + new_value = new_value[0] + return super().value_changed(new_value)
+
+ + + +
+[docs] +class BbBCoefficientsWidget(QWidget): + """BbB Coefficients Settings Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._setupUi() + + def _setupUi(self): + gbox_feedback = self._setupFBSettingsWidget() + gbox_coefview = self._setupCoefficientsViewWidget() + gbox_coefedit = self._setupCoefficientsEditWidget() + + lay = QGridLayout(self) + lay.setAlignment(Qt.AlignLeft | Qt.AlignTop) + lay.setVerticalSpacing(9) + lay.setHorizontalSpacing(15) + lay.addWidget(gbox_coefedit, 0, 0, 1, 2) + lay.addWidget(gbox_feedback, 1, 0) + if not self.dev_pref.endswith('-L'): + gbox_bun_clean = self._setupBCSettingsWidget() + lay.addWidget(gbox_bun_clean, 1, 1) + + lay.addWidget(gbox_coefview, 0, 2, 2, 1) + lay.setColumnStretch(0, 2) + lay.setColumnStretch(2, 1) + + def _setupCoefficientsEditWidget(self, parent=None): + wid = QGroupBox('Edit Coefficients', parent or self) + + le_coefdesc = PyDMLineEdit(self, self.dev_pref+':DESC_COEFF') + graph_coefs = WfmGraph(wid) + graph_coefs.add_scatter_curve( + ychannel=self.dev_pref+':COEFF', lineStyle=Qt.SolidLine) + + graph_fftmag = WfmGraph(wid) + graph_fftmag.setObjectName('graph') + graph_fftmag.setStyleSheet('#graph{min-height: 12em;}') + graph_fftmag.setLabel('left', text='Magnitude [dB]') + graph_fftmag.setLabel('bottom', text='Fractional Freq.') + graph_fftmag.add_scatter_curve( + ychannel=self.dev_pref+':FTF_MAG', + xchannel=self.dev_pref+':FTF_FREQ', + color=QColor('blue'), lineWidth=2, lineStyle=Qt.SolidLine, + symbolSize=4) + graph_fftmag.add_scatter_curve( + ychannel=self.dev_pref+':FTF_GTUNE', + xchannel=self.dev_pref+':FTF_FTUNE', + name='Tune', color=QColor('red')) + + graph_fftphs = WfmGraph(wid) + graph_fftphs.setLabel('left', text='Phase [°]') + graph_fftphs.setLabel('bottom', text='Fractional Freq.') + graph_fftphs.add_scatter_curve( + ychannel=self.dev_pref+':FTF_PHASE', + xchannel=self.dev_pref+':FTF_FREQ', + color=QColor('blue'), lineWidth=2, lineStyle=Qt.SolidLine, + symbolSize=4) + graph_fftphs.add_scatter_curve( + ychannel=self.dev_pref+':FTF_PTUNE', + xchannel=self.dev_pref+':FTF_FTUNE', + name='Tune', color=QColor('red')) + + ld_fractune = QLabel( + '<h4> Marker:</h4>', wid, alignment=Qt.AlignLeft | Qt.AlignVCenter) + ld_ftval = QLabel( + 'Frequency [0-1]', wid, alignment=Qt.AlignRight | Qt.AlignVCenter) + sb_ftval = SiriusSpinbox(wid, self.dev_pref+':FTF_TUNE') + ld_ftgain = QLabel( + 'Gain [dB]', wid, alignment=Qt.AlignRight | Qt.AlignVCenter) + lb_ftgain = Label(wid, self.dev_pref+':FTF_GTUNE') + lb_ftgain.precisionFromPV = False + lb_ftgain.precision = 2 + ld_ftphs = QLabel( + 'Phase [°]', wid, alignment=Qt.AlignRight | Qt.AlignVCenter) + lb_ftphs = Label(wid, self.dev_pref+':FTF_PTUNE') + lb_ftphs.precisionFromPV = False + lb_ftphs.precision = 2 + + lay_genft = QGridLayout() + lay_genft.setVerticalSpacing(6) + lay_genft.setHorizontalSpacing(9) + lay_genft.addWidget(ld_fractune, 0, 0) + lay_genft.addWidget(ld_ftval, 0, 2) + lay_genft.addWidget(sb_ftval, 0, 3) + lay_genft.addWidget(ld_ftgain, 0, 5) + lay_genft.addWidget(lb_ftgain, 0, 6) + lay_genft.addWidget(ld_ftphs, 0, 8) + lay_genft.addWidget(lb_ftphs, 0, 9) + lay_genft.setRowStretch(1, 2) + lay_genft.setRowStretch(4, 2) + lay_genft.setRowStretch(7, 2) + lay_genft.setRowStretch(10, 2) + + coef_edit_wid = self._setupCoeffSettingsWidget() + + lay = QGridLayout(wid) + lay.setVerticalSpacing(15) + lay.addWidget(coef_edit_wid, 0, 0, 2, 1) + lay.addWidget(le_coefdesc, 0, 1) + lay.addWidget(graph_coefs, 1, 1) + lay.addWidget(graph_fftmag, 2, 0) + lay.addWidget(graph_fftphs, 2, 1) + lay.addLayout(lay_genft, 3, 0, 1, 2) + return wid + + def _setupCoeffSettingsWidget(self): + ld_coefchoo = QLabel('Choose Set', self, alignment=Qt.AlignRight) + cb_coefchoo = PyDMEnumComboBox(self, self.dev_pref+':LDSET') + + pb_coefload = PyDMPushButton( + parent=self, label='Apply Set', icon=qta.icon('mdi.upload'), + init_channel=self.dev_pref+':BO_CPCOEFF', pressValue=1) + pb_coefload.setStyleSheet("icon-size:20px;") + pb_coefvrfy = PyDMPushButton( + parent=self, label='Verify Set', + icon=qta.icon('mdi.check-circle-outline'), + init_channel=self.dev_pref+':BO_CVERIFY', pressValue=1) + pb_coefvrfy.setStyleSheet("icon-size:20px;") + + ld_gen = QLabel( + '<h4>Generate Coefficients</h4>', self, alignment=Qt.AlignCenter) + ld_gengain = QLabel( + 'Gain [0-1]', self, alignment=Qt.AlignRight) + sb_gengain = SiriusSpinbox(self, self.dev_pref+':FLT_GAIN') + ld_genphs = QLabel('Phase [°]', self, alignment=Qt.AlignRight) + sb_genphs = SiriusSpinbox(self, self.dev_pref+':FLT_PHASE') + ld_genfreq = QLabel( + 'Frequency [0-1]', self, alignment=Qt.AlignRight) + sb_genfreq = SiriusSpinbox(self, self.dev_pref+':FLT_FREQ') + ld_genntap = QLabel( + 'Number of taps', self, alignment=Qt.AlignRight) + sb_genntap = SiriusSpinbox(self, self.dev_pref+':FLT_TAPS') + + wid = QWidget(self) + lay_genset = QGridLayout(wid) + lay_genset.setVerticalSpacing(6) + lay_genset.setHorizontalSpacing(9) + lay_genset.addWidget(ld_gen, 0, 1, 1, 2) + lay_genset.addWidget(ld_gengain, 1, 1) + lay_genset.addWidget(sb_gengain, 1, 2) + lay_genset.addWidget(ld_genphs, 2, 1) + lay_genset.addWidget(sb_genphs, 2, 2) + lay_genset.addWidget(ld_genfreq, 3, 1) + lay_genset.addWidget(sb_genfreq, 3, 2) + lay_genset.addWidget(ld_genntap, 4, 1) + lay_genset.addWidget(sb_genntap, 4, 2) + lay_genset.addWidget(ld_coefchoo, 5, 1) + lay_genset.addWidget(cb_coefchoo, 5, 2) + lay = QGridLayout() + lay_genset.addLayout(lay, 6, 1, 1, 2) + lay.addWidget(pb_coefload, 0, 0) + lay.addWidget(pb_coefvrfy, 0, 2) + lay.setColumnStretch(1, 2) + lay_genset.setRowStretch(7, 2) + lay_genset.setColumnStretch(0, 2) + lay_genset.setColumnStretch(3, 2) + return wid + + def _setupFBSettingsWidget(self): + gbox_settings = QGroupBox('FeedBack Settings', self) + + ld_fbpatt = QLabel('Feedback Mask', self) + le_fbpatt = PyDMLineEdit(self, self.dev_pref+':FB_PATTERN') + + ld_cfpatt = QLabel('Alternate Mask', self) + le_cfpatt = PyDMLineEdit(self, self.dev_pref+':CF_PATTERN') + + ld_alter_inuse = QLabel('Alternate Set In Use', self) + led_alter_inuse = SiriusLedState( + self, self.dev_pref+':CF_PATTERN_SUB.VALB') + + ld_fbenbl = QLabel('Enable', self) + pb_fbenbl = PyDMStateButton(self, self.dev_pref+':FBCTRL') + + ld_coefsel = QLabel('Coeficient Set', self) + cb_coefsel = PyDMEnumComboBox(self, self.dev_pref+':SETSEL') + + ld_sftgain = QLabel('Shift Gain', self) + sb_sftgain = SiriusSpinbox(self, self.dev_pref+':SHIFTGAIN') + + ld_downspl = QLabel('Downsampling', self) + sb_downspl = SiriusSpinbox(self, self.dev_pref+':PROC_DS') + + ld_satthrs = QLabel('Sat. Threshold [%]', self) + sb_satthrs = SiriusSpinbox(self, self.dev_pref+':SAT_THRESHOLD') + + lay_patt = QGridLayout() + lay_patt.addWidget(ld_fbpatt, 0, 0) + lay_patt.addWidget(le_fbpatt, 0, 1) + lay_patt.addWidget(ld_cfpatt, 1, 0) + lay_patt.addWidget(le_cfpatt, 1, 1) + lay_patt.addWidget(ld_alter_inuse, 2, 0) + lay_patt.addWidget(led_alter_inuse, 2, 1) + + lay = QGridLayout(gbox_settings) + lay.addWidget(ld_fbenbl, 0, 1) + lay.addWidget(pb_fbenbl, 0, 2) + lay.addWidget(ld_downspl, 0, 4) + lay.addWidget(sb_downspl, 0, 5) + lay.addWidget(ld_coefsel, 1, 1) + lay.addWidget(cb_coefsel, 1, 2) + lay.addWidget(ld_sftgain, 1, 4) + lay.addWidget(sb_sftgain, 1, 5) + lay.addWidget(ld_satthrs, 2, 1) + lay.addWidget(sb_satthrs, 2, 2) + lay.addLayout(lay_patt, 4, 1, 1, 5) + lay.setColumnStretch(0, 3) + lay.setColumnStretch(6, 3) + lay.setColumnStretch(3, 2) + lay.setRowStretch(3, 2) + lay.setRowStretch(5, 3) + + return gbox_settings + + def _setupBCSettingsWidget(self): + gbox_settings = QGroupBox('Bunch Cleaning Settings', self) + + ld_bcenbl = QLabel('Enable', self) + cb_bcenbl = PyDMStateButton(self, self.dev_pref+':CLEAN_ENABLE') + + ld_bcamp = QLabel('Amplitude', self) + sb_bcamp = SiriusSpinbox(self, self.dev_pref+':CLEAN_AMPL') + lb_svamp = SiriusLabel(self, self.dev_pref+':CLEAN_SAVE_AMPL') + + ld_bctune = QLabel('Tune', self) + sb_bctune = SiriusSpinbox(self, self.dev_pref+':CLEAN_TUNE') + lb_svfreq = SiriusLabel(self, self.dev_pref+':CLEAN_SAVE_FREQ') + + ld_bcspan = QLabel('Span', self) + le_bcspan = PyDMLineEdit(self, self.dev_pref+':CLEAN_SPAN') + lb_svspan = SiriusLabel(self, self.dev_pref+':CLEAN_SAVE_SPAN') + + ld_bcper = QLabel('Period', self) + le_bcper = PyDMLineEdit(self, self.dev_pref+':CLEAN_PERIOD') + lb_svper = SiriusLabel(self, self.dev_pref+':CLEAN_SAVE_PERIOD') + + ld_bcpatt = QLabel('Mask', self) + le_bcpatt = PyDMLineEdit(self, self.dev_pref+':CLEAN_PATTERN') + + lay_clean = QGridLayout(gbox_settings) + lay_clean.addWidget(QLabel('SAVED VALS.'), 0, 2) + + lay_clean.addWidget(ld_bcamp, 1, 0) + lay_clean.addWidget(sb_bcamp, 1, 1) + lay_clean.addWidget(lb_svamp, 1, 2) + lay_clean.addWidget(ld_bctune, 2, 0) + lay_clean.addWidget(sb_bctune, 2, 1) + lay_clean.addWidget(lb_svfreq, 2, 2) + lay_clean.addWidget(ld_bcspan, 3, 0) + lay_clean.addWidget(le_bcspan, 3, 1) + lay_clean.addWidget(lb_svspan, 3, 2) + lay_clean.addWidget(ld_bcper, 4, 0) + lay_clean.addWidget(le_bcper, 4, 1) + lay_clean.addWidget(lb_svper, 4, 2) + lay_clean.addWidget(ld_bcenbl, 5, 0) + lay_clean.addWidget(cb_bcenbl, 5, 1) + lay = QGridLayout() + lay.addWidget(ld_bcpatt, 0, 0) + lay.addWidget(le_bcpatt, 0, 1) + lay_clean.addLayout(lay, 6, 0, 1, 3) + return gbox_settings + + def _setupCoefficientsViewWidget(self): + ld_coef0 = QLabel('<h4>Set 0</h4>', self) + ld_coef0.setStyleSheet('max-width: 3em;') + lb_coef0 = SiriusLabel(self, self.dev_pref+':DESC_CSET0') + lb_coef0.setStyleSheet('background-color: #DCDCDC;') + led_coef0 = SiriusLedAlert(self, self.dev_pref+':CVERIFY.C') + led_coef0.setStyleSheet( + 'min-width: 1.29em; max-width: 1.29em;') + + graph_coef0 = WfmGraph(self) + graph_coef0.add_scatter_curve( + ychannel=self.dev_pref+':CSET0', lineStyle=Qt.SolidLine) + + ld_coef1 = QLabel('<h4>Set 1</h4>', self) + ld_coef1.setStyleSheet('max-width: 3em;') + lb_coef1 = SiriusLabel(self, self.dev_pref+':DESC_CSET1') + lb_coef1.setStyleSheet('background-color: #DCDCDC;') + led_coef1 = SiriusLedAlert(self, self.dev_pref+':CVERIFY.D') + led_coef1.setStyleSheet( + 'min-width: 1.29em; max-width: 1.29em;') + + graph_coef1 = WfmGraph(self) + graph_coef1.add_scatter_curve( + ychannel=self.dev_pref+':CSET1', lineStyle=Qt.SolidLine) + + ld_coef2 = QLabel('<h4>Set 2</h4>', self) + ld_coef2.setStyleSheet('max-width: 3em;') + lb_coef2 = SiriusLabel(self, self.dev_pref+':DESC_CSET2') + lb_coef2.setStyleSheet('background-color: #DCDCDC;') + led_coef2 = SiriusLedAlert(self, self.dev_pref+':CVERIFY.G') + led_coef2.setStyleSheet( + 'min-width: 1.29em; max-width: 1.29em;') + + graph_coef2 = WfmGraph(self) + graph_coef2.add_scatter_curve( + ychannel=self.dev_pref+':CSET2', lineStyle=Qt.SolidLine) + + ld_coef3 = QLabel('<h4>Set 3</h4>', self) + ld_coef3.setStyleSheet('max-width: 3em;') + lb_coef3 = SiriusLabel(self, self.dev_pref+':DESC_CSET3') + lb_coef3.setStyleSheet('background-color: #DCDCDC;') + led_coef3 = SiriusLedAlert(self, self.dev_pref+':CVERIFY.H') + led_coef3.setStyleSheet('min-width: 1.29em; max-width: 1.29em;') + + graph_coef3 = WfmGraph(self) + graph_coef3.add_scatter_curve( + ychannel=self.dev_pref+':CSET3', lineStyle=Qt.SolidLine) + + gbox_coefview = QGroupBox('Coefficient Sets View', self) + gbox_coefview.setLayout(QGridLayout()) + tab_coefview = QTabWidget(gbox_coefview) + gbox_coefview.layout().addWidget(tab_coefview, 0, 0) + + norm_wid = QWidget(tab_coefview) + tab_coefview.addTab(norm_wid, 'Normal') + lay_norm = QGridLayout(norm_wid) + lay_norm.addWidget(ld_coef0, 0, 0) + lay_norm.addWidget(lb_coef0, 0, 1) + lay_norm.addWidget(led_coef0, 0, 2) + lay_norm.addWidget(graph_coef0, 1, 0, 1, 3) + lay_norm.addWidget(ld_coef1, 2, 0) + lay_norm.addWidget(lb_coef1, 2, 1) + lay_norm.addWidget(led_coef1, 2, 2) + lay_norm.addWidget(graph_coef1, 3, 0, 1, 3) + + alter_wid = QWidget(tab_coefview) + tab_coefview.addTab(alter_wid, 'Alternate') + lay_alter = QGridLayout(alter_wid) + lay_alter.addWidget(ld_coef2, 0, 3) + lay_alter.addWidget(lb_coef2, 0, 4) + lay_alter.addWidget(led_coef2, 0, 5) + lay_alter.addWidget(graph_coef2, 1, 3, 1, 3) + lay_alter.addWidget(ld_coef3, 2, 3) + lay_alter.addWidget(lb_coef3, 2, 4) + lay_alter.addWidget(led_coef3, 2, 5) + lay_alter.addWidget(graph_coef3, 3, 3, 1, 3) + return gbox_coefview
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_bbb/custom_widgets.html b/_modules/siriushla/si_di_bbb/custom_widgets.html new file mode 100644 index 000000000..23dec8d6a --- /dev/null +++ b/_modules/siriushla/si_di_bbb/custom_widgets.html @@ -0,0 +1,294 @@ + + + + + + siriushla.si_di_bbb.custom_widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_di_bbb.custom_widgets

+"""Custom Widgets Module."""
+
+from functools import partial as _part
+
+import numpy as np
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QColor
+from pyqtgraph import mkBrush
+
+from ..widgets import SiriusTimePlot, SiriusConnectionSignal, \
+    SiriusWaveformPlot
+
+
+
+[docs] +class WfmGraph(SiriusWaveformPlot): + """SiriusWaveformPlot rederivation.""" + + def __init__(self, *args, **kwargs): + """.""" + super().__init__(*args, **kwargs) + self.setObjectName('graph') + self.setStyleSheet( + '#graph {min-height: 6em; min-width: 15em;}') + + self.maxRedrawRate = 2 + + self.autoRangeX = True + self.autoRangeY = True + self.minXRange = 0.0 + self.maxXRange = 1.0 + + self.showXGrid = True + self.showYGrid = True + self.showLegend = False + self.setAxisColor(QColor(0, 0, 0)) + self.backgroundColor = QColor(255, 255, 255) + + self._markers = dict() + self._curves_names = [] + +
+[docs] + def add_scatter_curve( + self, ychannel='', xchannel='', name='', color=QColor('blue'), + lineStyle=Qt.NoPen, lineWidth=1, symbolSize=10, nchannel=None, + offset=None): + """.""" + self.addChannel( + x_channel='', y_channel='', + name=name, color=color, lineStyle=lineStyle, lineWidth=lineWidth, + symbol='o', symbolSize=symbolSize) + curve = self.curveAtIndex(-1) + curve.opts['symbolBrush'] = mkBrush(color) + curve.nchannel = None + curve.offset = offset + if nchannel is not None: + curve.nchannel = SiriusConnectionSignal(nchannel) + x_chan_obj = SiriusConnectionSignal(xchannel) + x_chan_obj.new_value_signal[np.ndarray].connect( + _part(self._update_waveform_value, curve, 'X')) + y_chan_obj = SiriusConnectionSignal(ychannel) + y_chan_obj.new_value_signal[np.ndarray].connect( + _part(self._update_waveform_value, curve, 'Y')) + self._curves_names.append(((x_chan_obj, y_chan_obj), curve))
+ + +
+[docs] + def add_marker( + self, xchannel, ychannel, name, + color=QColor('blue'), symbol='o', symbolSize=10): + """.""" + self.addChannel( + x_channel='FAKE:X', y_channel='FAKE:Y', + name=name, color=color, + lineStyle=Qt.NoPen, lineWidth=1, + symbol=symbol, symbolSize=symbolSize) + curve = self.curveAtIndex(-1) + curve.opts['symbolBrush'] = mkBrush(color) + + x_chan_obj = SiriusConnectionSignal(xchannel) + x_chan_obj.new_value_signal[float].connect( + _part(self._update_marker_value, curve, 'X')) + y_chan_obj = SiriusConnectionSignal(ychannel) + y_chan_obj.new_value_signal[float].connect( + _part(self._update_marker_value, curve, 'Y')) + self._markers[name] = [(x_chan_obj, y_chan_obj), curve]
+ + + def _update_marker_value(self, curve, axis, value): + func = getattr(curve, 'receive'+axis+'Waveform') + func(np.array([value, ])) + + def _update_waveform_value(self, curve, axis, value): + func = getattr(curve, 'receive'+axis+'Waveform') + offset = curve.offset or 0.0 + value = value + offset + if curve.nchannel is None: + func(value) + return + npoints = curve.nchannel.value + if npoints is None: + func(value) + else: + func(value[:npoints])
+ + + +
+[docs] +class TimeGraph(SiriusTimePlot): + """SiriusTimePlot rederivation.""" + + def __init__(self, *args, **kwargs): + """.""" + super().__init__(*args, **kwargs) + self.setObjectName('graph') + self.setStyleSheet( + '#graph {min-height: 6em; min-width: 8em;}') + + self.autoRangeX = True + self.autoRangeY = True + self.minXRange = 0.0 + self.maxXRange = 1.0 + + self.showXGrid = True + self.showYGrid = True + self.showLegend = False + self.setAxisColor(QColor(0, 0, 0)) + self.backgroundColor = QColor(255, 255, 255)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_bbb/drive.html b/_modules/siriushla/si_di_bbb/drive.html new file mode 100644 index 000000000..6baf3b476 --- /dev/null +++ b/_modules/siriushla/si_di_bbb/drive.html @@ -0,0 +1,354 @@ + + + + + + siriushla.si_di_bbb.drive — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_di_bbb.drive

+"""BbB Drive Module."""
+
+import os as _os
+
+from qtpy.QtGui import QPixmap, QColor
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QLabel, QWidget, QGridLayout, QSpacerItem, \
+    QHBoxLayout
+from pydm.widgets import PyDMEnumComboBox, PyDMLineEdit
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..widgets import PyDMStateButton, SiriusFrame, SiriusLabel, SiriusSpinbox
+
+from .util import set_bbb_color
+from .custom_widgets import WfmGraph
+
+
+
+[docs] +class BbBSingleDriveSettingsWidget(QWidget): + """BbB Drive Settings Widget.""" + + def __init__( + self, parent=None, prefix=_vaca_prefix, device='', dr_num=None): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._driver_num = dr_num + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + if self._driver_num is not None: + self.dev_pref += f':DRIVE{dr_num:d}_' + else: + self.dev_pref += f':DRIVE_' + self._setupUi() + + def _setupUi(self): + if self._driver_num is None: + ld_drive = QLabel( + '<h3>Drive Pattern Generator</h3>', self, + alignment=Qt.AlignCenter) + else: + ld_drive = QWidget(self) + ld_drive.setLayout(QHBoxLayout()) + labd = QLabel( + f'<h3>Driver {self._driver_num:d}, NCO BITS: </h3>', + ld_drive, alignment=Qt.AlignRight) + labd.setAlignment(Qt.AlignLeft | Qt.AlignVCenter) + lab = SiriusLabel(ld_drive, self.dev_pref+'BITS') + lab.setStyleSheet('font-size: 13pt; font-weight: bold;') + lab.setAlignment(Qt.AlignLeft | Qt.AlignVCenter) + ld_drive.layout().addStretch() + ld_drive.layout().addWidget(labd) + ld_drive.layout().addWidget(lab) + ld_drive.layout().addStretch() + + ld_amp = QLabel('Amplitude', self) + sb_amp = SiriusSpinbox(self, self.dev_pref+'AMPL') + + ld_freq = QLabel('Frequency', self) + sb_freq = SiriusSpinbox(self, self.dev_pref+'FREQ') + + ld_wav = QLabel('Waveform', self) + cb_wav = PyDMEnumComboBox(self, self.dev_pref+'WAVEFORM') + + ld_tmod = QLabel('Time MODulation', self) + cb_tmod = PyDMStateButton(self, self.dev_pref+'MOD') + + ld_span = QLabel('Span', self) + sb_span = SiriusSpinbox(self, self.dev_pref+'SPAN') + + ld_perd = QLabel('Period', self) + sb_perd = SiriusSpinbox(self, self.dev_pref+'PERIOD') + + ld_patt = QLabel('Drive Pattern', self) + le_patt = PyDMLineEdit(self, self.dev_pref+'PATTERN') + + lb_actfreq = SiriusLabel(self, self.dev_pref+'FREQ_ACT_STRING') + lb_actspan = SiriusLabel(self, self.dev_pref+'SPAN_ACT_STRING') + lb_actperd = SiriusLabel(self, self.dev_pref+'PERIOD_ACT') + + lay = QGridLayout(self) + lay.addWidget(ld_drive, 0, 1, 1, 3) + lay.addWidget(ld_tmod, 2, 1) + lay.addWidget(cb_tmod, 2, 2) + lay.addWidget(ld_amp, 3, 1) + lay.addWidget(sb_amp, 3, 2) + lay.addWidget(ld_freq, 4, 1) + lay.addWidget(lb_actfreq, 4, 3) + lay.addWidget(sb_freq, 4, 2) + lay.addWidget(ld_wav, 5, 1) + lay.addWidget(cb_wav, 5, 2) + lay.addWidget(ld_span, 6, 1) + lay.addWidget(sb_span, 6, 2) + lay.addWidget(lb_actspan, 6, 3) + lay.addWidget(ld_perd, 7, 1) + lay.addWidget(sb_perd, 7, 2) + lay.addWidget(lb_actperd, 7, 3) + lay.addWidget(ld_patt, 8, 1) + lay.addWidget(le_patt, 8, 2, 1, 2) + lay.addItem(QSpacerItem(1, 10), 9, 1) + lay.addItem(QSpacerItem(1, 10), 13, 1) + if self._driver_num in {None, 1}: + pixmap = QPixmap(_os.path.join( + _os.path.abspath(_os.path.dirname(__file__)), 'drive.png')) + il_drive = QLabel(self) + il_drive.setPixmap(pixmap) + il_drive.setScaledContents(True) + lay.addWidget(il_drive, 14, 1, 1, 3, alignment=Qt.AlignCenter) + else: + wid = QWidget(self) + wid.setLayout(QHBoxLayout()) + wid.layout().addStretch() + + propty = f':PHTRK_LOOPCTRL{self._driver_num:d}' + pv = self._prefix + self._device + propty + lab = SiriusLabel(self, init_channel=pv) + lab.enum_strings = ['Tracking Off', 'Tracking On'] + lab.displayFormat = lab.DisplayFormat.String + frame = SiriusFrame(self, pv, is_float=True) + frame.borderWidth = 2 + frame.add_widget(lab) + wid.layout().addWidget(frame) + wid.layout().addStretch() + + lab = QLabel('Track. Freq: ', self) + wid.layout().addWidget(lab) + propty = f':PHTRK_FREQ{self._driver_num:d}' + pv = self._prefix + self._device + propty + freq = SiriusLabel(self, init_channel=pv) + wid.layout().addWidget(freq) + wid.layout().addStretch() + + lay.addWidget(wid, 14, 1, 1, 3) + lay.setRowStretch(15, 5) + lay.setColumnStretch(0, 5) + lay.setColumnStretch(4, 5)
+ + + +
+[docs] +class BbBDriveSettingsWidget(QWidget): + """BbB Drive Settings Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._prefix = prefix + self._device = device + self._setupUi() + + def _setupUi(self): + self.setLayout(QGridLayout()) + ld_drive = QLabel( + '<h2>Drive Pattern Generators</h2>', + self, alignment=Qt.AlignCenter) + self.layout().addWidget(ld_drive, 0, 0, 1, 5) + for i in range(3): + drive = BbBSingleDriveSettingsWidget( + prefix=self._prefix, device=self._device, dr_num=i) + self.layout().addWidget(drive, 1, 2*i) + self.layout().setColumnStretch(1, 2) + self.layout().setColumnStretch(3, 2) + + dev_pref = self._prefix + self._device + graph_exct = WfmGraph(self) + graph_exct.setAutoRangeY(False) + graph_exct.setYRange(-0.01, 1.08) + graph_exct.showLegend = True + graph_exct.axisColor = QColor('black') + graph_exct.add_scatter_curve( + ychannel=dev_pref+':DRIVE0_MASK', + xchannel=dev_pref+':SRAM_XSC', + name='Drive0', color=QColor('red')) + graph_exct.add_scatter_curve( + ychannel=dev_pref+':DRIVE1_MASK', + xchannel=dev_pref+':SRAM_XSC', + name='Drive1', color=QColor('magenta'), offset=0.02) + graph_exct.add_scatter_curve( + ychannel=dev_pref+':DRIVE2_MASK', + xchannel=dev_pref+':SRAM_XSC', + name='Drive2', color=QColor('orange'), offset=0.04) + graph_exct.setLabel('left', '') + + self.layout().addWidget(graph_exct, 3, 0, 1, 5) + self.layout().addItem(QSpacerItem(20, 20), 2, 0)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_bbb/environment.html b/_modules/siriushla/si_di_bbb/environment.html new file mode 100644 index 000000000..016351253 --- /dev/null +++ b/_modules/siriushla/si_di_bbb/environment.html @@ -0,0 +1,337 @@ + + + + + + siriushla.si_di_bbb.environment — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_di_bbb.environment

+"""BbB Environment Module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QLabel, QWidget, QGridLayout
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..widgets import SiriusLabel
+from .custom_widgets import TimeGraph
+from .util import set_bbb_color
+
+
+
+[docs] +class BbBEnvironmMonWidget(QWidget): + """BbB Environment Monitor Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._setupUi() + + def _setupUi(self): + graph_fpgatemp = TimeGraph(background='w') + graph_fpgatemp.timeSpan = 300 + graph_fpgatemp.addYChannel( + self.dev_pref+':TEMP_FPGA', color=QColor('blue')) + graph_fpgatemp.setPlotTitle('FPGA temperature') + graph_fpgatemp.setLabel('left', 'Temp. [°C]', color='gray') + + graph_pcbtemp = TimeGraph(background='w') + graph_pcbtemp.timeSpan = 300 + graph_pcbtemp.addYChannel( + self.dev_pref+':TEMP_AMB', color=QColor('blue')) + graph_pcbtemp.setPlotTitle('PCB temperature') + graph_pcbtemp.setLabel('left', 'Temp. [°C]', color='gray') + + graph_exttemp = TimeGraph(background='w') + graph_exttemp.timeSpan = 300 + graph_exttemp.setPlotTitle('Ext.1 (blue) and Ext.2(red)') + graph_exttemp.addYChannel( + self.dev_pref+':TEMP_EXT1', color=QColor('blue')) + graph_exttemp.addYChannel( + self.dev_pref+':TEMP_EXT2', color=QColor('red')) + graph_exttemp.setLabel('left', 'Temp. [°C]', color='gray') + + graph_bulkvolt = TimeGraph(background='w') + graph_bulkvolt.timeSpan = 300 + graph_bulkvolt.addYChannel( + self.dev_pref+':VBULK', color=QColor('red')) + graph_bulkvolt.setPlotTitle('Bulk Supply voltage') + graph_bulkvolt.setLabel('left', 'Voltage [V]', color='gray') + + graph_digivolt = TimeGraph(background='w') + graph_digivolt.timeSpan = 300 + graph_digivolt.addYChannel( + self.dev_pref+':VCC', color=QColor('red')) + graph_digivolt.setPlotTitle('Digital 3.3V') + graph_digivolt.setLabel('left', 'Voltage [V]', color='gray') + + graph_fpgavolt = TimeGraph(background='w') + graph_fpgavolt.timeSpan = 300 + graph_fpgavolt.addYChannel( + self.dev_pref+':VINT', color=QColor('red')) + graph_fpgavolt.setPlotTitle('FPGA core supply voltage') + graph_fpgavolt.setLabel('left', 'Voltage [V]', color='gray') + + lay_graphs = QGridLayout() + lay_graphs.setContentsMargins(0, 0, 0, 0) + lay_graphs.addWidget(graph_exttemp, 0, 0, 1, 2) + lay_graphs.addWidget(graph_fpgatemp, 0, 2, 1, 2) + lay_graphs.addWidget(graph_pcbtemp, 0, 4, 1, 2) + lay_graphs.addWidget(graph_bulkvolt, 1, 0, 1, 2) + lay_graphs.addWidget(graph_digivolt, 1, 2, 1, 2) + lay_graphs.addWidget(graph_fpgavolt, 1, 4, 1, 2) + + ld_fpgatemp = QLabel( + '<h4>FPGA temp</h4>', self, alignment=Qt.AlignRight) + lb_fpgatemp = SiriusLabel(self, self.dev_pref+':TEMP_FPGA') + lb_fpgatemp.showUnits = True + + ld_pcbtemp = QLabel( + '<h4>PCB temp</h4>', self, alignment=Qt.AlignRight) + lb_pcbtemp = SiriusLabel(self, self.dev_pref+':TEMP_AMB') + lb_pcbtemp.showUnits = True + + ld_exttemp1 = QLabel( + '<h4>External temp 1</h4>', self, alignment=Qt.AlignRight) + lb_exttemp1 = SiriusLabel(self, self.dev_pref+':TEMP_EXT1') + lb_exttemp1.showUnits = True + + ld_exttemp2 = QLabel( + '<h4>External temp 2</h4>', self, alignment=Qt.AlignRight) + lb_exttemp2 = SiriusLabel(self, self.dev_pref+':TEMP_EXT2') + lb_exttemp2.showUnits = True + + ld_bulkvolt = QLabel( + '<h4>Bulk Supply</h4>', self, alignment=Qt.AlignRight) + lb_bulkvolt = SiriusLabel(self, self.dev_pref+':VBULK') + lb_bulkvolt.showUnits = True + + ld_digivolt = QLabel( + '<h4>Digital 3.3V</h4>', self, alignment=Qt.AlignRight) + lb_digivolt = SiriusLabel(self, self.dev_pref+':VCC') + lb_digivolt.showUnits = True + + ld_fpgavolt = QLabel( + '<h4>FPGA core supply</h4>', self, alignment=Qt.AlignRight) + lb_fpgavolt = SiriusLabel(self, self.dev_pref+':VINT') + lb_fpgavolt.showUnits = True + + ld_anal3p3volt = QLabel( + '<h4>Analog 3.3V</h4>', self, alignment=Qt.AlignRight) + lb_anal3p3volt = SiriusLabel(self, self.dev_pref+':VMON33') + lb_anal3p3volt.showUnits = True + + ld_cputemp = QLabel( + '<h4>CPU temp</h4>', self, alignment=Qt.AlignRight) + lb_cputemp = SiriusLabel(self, self.dev_pref+':HWMON_CPU_TEMP') + lb_cputemp.showUnits = True + + ld_cpufan = QLabel( + '<h4>CPU fan</h4>', self, alignment=Qt.AlignRight) + lb_cpufan = SiriusLabel( + self, self.dev_pref+':HWMON_CPU_FAN', keep_unit=True) + lb_cpufan.showUnits = True + + ld_chassisfan = QLabel( + '<h4>Chassis fan</h4>', self, alignment=Qt.AlignRight) + lb_chassisfan = SiriusLabel( + self, self.dev_pref+':HWMON_CHASSIS_FAN', keep_unit=True) + lb_chassisfan.showUnits = True + + ld_anal5volt = QLabel( + '<h4>Analog 5V</h4>', self, alignment=Qt.AlignRight) + lb_anal5volt = SiriusLabel(self, self.dev_pref+':VMON5') + lb_anal5volt.showUnits = True + + lay_labels = QGridLayout() + lay_labels.setContentsMargins(0, 0, 0, 0) + lay_labels.addWidget(ld_fpgatemp, 0, 0) + lay_labels.addWidget(lb_fpgatemp, 0, 1) + lay_labels.addWidget(ld_pcbtemp, 0, 2) + lay_labels.addWidget(lb_pcbtemp, 0, 3) + lay_labels.addWidget(ld_exttemp1, 0, 4) + lay_labels.addWidget(lb_exttemp1, 0, 5) + lay_labels.addWidget(ld_exttemp2, 0, 6) + lay_labels.addWidget(lb_exttemp2, 0, 7) + lay_labels.addWidget(ld_bulkvolt, 1, 0) + lay_labels.addWidget(lb_bulkvolt, 1, 1) + lay_labels.addWidget(ld_digivolt, 1, 2) + lay_labels.addWidget(lb_digivolt, 1, 3) + lay_labels.addWidget(ld_fpgavolt, 1, 4) + lay_labels.addWidget(lb_fpgavolt, 1, 5) + lay_labels.addWidget(ld_anal3p3volt, 1, 6) + lay_labels.addWidget(lb_anal3p3volt, 1, 7) + lay_labels.addWidget(ld_cputemp, 2, 0) + lay_labels.addWidget(lb_cputemp, 2, 1) + lay_labels.addWidget(ld_cpufan, 2, 2) + lay_labels.addWidget(lb_cpufan, 2, 3) + lay_labels.addWidget(ld_chassisfan, 2, 4) + lay_labels.addWidget(lb_chassisfan, 2, 5) + lay_labels.addWidget(ld_anal5volt, 2, 6) + lay_labels.addWidget(lb_anal5volt, 2, 7) + + lay = QGridLayout(self) + lay.addLayout(lay_graphs, 0, 0) + lay.addLayout(lay_labels, 1, 0)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_bbb/gpio.html b/_modules/siriushla/si_di_bbb/gpio.html new file mode 100644 index 000000000..bcabdb649 --- /dev/null +++ b/_modules/siriushla/si_di_bbb/gpio.html @@ -0,0 +1,417 @@ + + + + + + siriushla.si_di_bbb.gpio — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_di_bbb.gpio

+"""BbB GPIO Module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QLabel, QWidget, QGridLayout, QGroupBox, \
+    QHBoxLayout, QVBoxLayout
+from pydm.widgets import PyDMEnumComboBox
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..widgets import PyDMStateButton, SiriusLabel, SiriusSpinbox, \
+    SiriusScaleIndicator
+
+
+
+[docs] +class BbBGPIOWidget(QWidget): + """BbB GPIO Settings Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + self.setObjectName('SIApp') + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._setupUi() + + def _setupUi(self): + ld_gpio = QLabel( + f'<h3>GPIO Settings ({self.dev_pref.device_name:s})</h3>', self, + alignment=Qt.AlignCenter) + + vlay1 = QVBoxLayout() + vlay1.addWidget(self._setupFrontBackEndRegsWidget()) + vlay1.addWidget(self._setupOtherControlsWidget()) + + vlay2 = QVBoxLayout() + vlay2.addWidget(self._setupPhaseServoLoopWidget()) + vlay2.addWidget(self._setupThermoWidget()) + + lay = QGridLayout(self) + lay.addWidget(ld_gpio, 0, 1, 1, 2) + lay.addLayout(vlay1, 1, 1) + lay.addLayout(vlay2, 1, 2) + lay.addWidget(self._setupMonitorsWidget(), 2, 1, 1, 2) + lay.setColumnStretch(0, 3) + lay.setColumnStretch(3, 3) + lay.setRowStretch(3, 3) + + self.setStyleSheet("SiriusLabel{qproperty-alignment: AlignCenter;}") + + def _setupGPIOSelectionWidget(self): + # # GPIO Selection + ld_gpiosel = QLabel('<h4>Select GPIO</h4>', self) + cb_gpiosel = PyDMEnumComboBox(self, self.dev_pref+':GPIO_SEL') + + gbox_gpiosel = QGroupBox(self) + lay_gpiosel = QHBoxLayout(gbox_gpiosel) + lay_gpiosel.addWidget(ld_gpiosel) + lay_gpiosel.addWidget(cb_gpiosel) + return gbox_gpiosel + + def _setupFrontBackEndRegsWidget(self): + # # Front/back end registers + ld_gpiohph = QLabel('Horiz. Phase', self) + sb_gpiohph = SiriusSpinbox(self, self.dev_pref+':FBELT_X_PHASE_SETPT') + ld_gpiohat = QLabel('Horiz. Atten.', self) + sb_gpiohat = SiriusSpinbox(self, self.dev_pref+':FBE_X_ATT') + ld_gpiovph = QLabel('Vert. Phase', self) + sb_gpiovph = SiriusSpinbox(self, self.dev_pref+':FBELT_Y_PHASE_SETPT') + ld_gpiovat = QLabel('Vert. Atten.', self) + sb_gpiovat = SiriusSpinbox(self, self.dev_pref+':FBE_Y_ATT') + ld_gpiolph = QLabel('Long. Phase', self) + sb_gpiolph = SiriusSpinbox(self, self.dev_pref+':FBELT_SERVO_SETPT') + ld_gpiolat = QLabel('Long. Atten.', self) + sb_gpiolat = SiriusSpinbox(self, self.dev_pref+':FBE_Z_ATT') + ld_gpiobeph = QLabel('Back-end Phase', self) + sb_gpiobeph = SiriusSpinbox(self, self.dev_pref+':FBE_BE_PHASE') + ld_gpiobeat = QLabel('Back-end Atten.', self) + sb_gpiobeat = SiriusSpinbox(self, self.dev_pref+':FBE_BE_ATT') + # # Phases + ld_gpiophss = QLabel('<h4>Phases</h4>', self, alignment=Qt.AlignCenter) + lb_gpiohph = SiriusLabel(self, self.dev_pref+':FBE_X_PHASE') + lb_gpiovph = SiriusLabel(self, self.dev_pref+':FBE_Y_PHASE') + lb_gpiolph = SiriusLabel(self, self.dev_pref+':FBE_Z_PHASE') + lay_phases = QGridLayout() + lay_phases.addWidget(ld_gpiophss, 0, 0, 1, 10) + lay_phases.addWidget(QLabel('L:'), 1, 1) + lay_phases.addWidget(lb_gpiolph, 1, 2) + lay_phases.addWidget(QLabel('H:'), 1, 4) + lay_phases.addWidget(lb_gpiohph, 1, 5) + lay_phases.addWidget(QLabel('V:'), 1, 7) + lay_phases.addWidget(lb_gpiovph, 1, 8) + lay_phases.setColumnStretch(0, 2) + lay_phases.setColumnStretch(3, 2) + lay_phases.setColumnStretch(6, 2) + lay_phases.setColumnStretch(9, 2) + + gbox_fbend = QGroupBox('Front/back end registers', self) + lay_fbend = QGridLayout(gbox_fbend) + lay_fbend.addWidget(ld_gpiobeat, 0, 0) + lay_fbend.addWidget(sb_gpiobeat, 0, 1) + lay_fbend.addWidget(ld_gpiolat, 1, 0) + lay_fbend.addWidget(sb_gpiolat, 1, 1) + lay_fbend.addWidget(ld_gpiohat, 2, 0) + lay_fbend.addWidget(sb_gpiohat, 2, 1) + lay_fbend.addWidget(ld_gpiovat, 3, 0) + lay_fbend.addWidget(sb_gpiovat, 3, 1) + lay_fbend.addWidget(ld_gpiobeph, 4, 0) + lay_fbend.addWidget(sb_gpiobeph, 4, 1) + lay_fbend.addWidget(ld_gpiolph, 5, 0) + lay_fbend.addWidget(sb_gpiolph, 5, 1) + lay_fbend.addWidget(ld_gpiohph, 6, 0) + lay_fbend.addWidget(sb_gpiohph, 6, 1) + lay_fbend.addWidget(ld_gpiovph, 7, 0) + lay_fbend.addWidget(sb_gpiovph, 7, 1) + lay_fbend.addLayout(lay_phases, 8, 0, 1, 2) + return gbox_fbend + + def _setupPhaseServoLoopWidget(self): + # # Phase Servo Loop + ld_gpiolctrl = QLabel('Loop Ctrl', self) + cb_gpiolctrl = PyDMStateButton(self, self.dev_pref+':FBELT_SERVO_MODE') + + ld_gpiolsign = QLabel('Loop Sign', self) + cb_gpiolsign = PyDMEnumComboBox( + self, self.dev_pref+':FBELT_SERVO_SIGN') + + ld_gpiogain = QLabel('Gain', self) + sb_gpiogain = SiriusSpinbox(self, self.dev_pref+':FBELT_SERVO_GAIN') + + ld_gpiooff = QLabel('Offset', self) + sb_gpiooff = SiriusSpinbox(self, self.dev_pref+':FBELT_SERVO_OFFSET') + + ld_gpiohtrk = QLabel('Hor. Trk.', self) + cb_gpiohtrk = PyDMStateButton( + self, self.dev_pref+':FBELT_SERVO_X_TRACK') + + ld_gpiovtrk = QLabel('Vert. Trk.', self) + cb_gpiovtrk = PyDMStateButton( + self, self.dev_pref+':FBELT_SERVO_Y_TRACK') + + gbox_phsloop = QGroupBox('Phase Servo Loop', self) + lay_phsloop = QGridLayout(gbox_phsloop) + lay_phsloop.addWidget(ld_gpiolctrl, 0, 0) + lay_phsloop.addWidget(cb_gpiolctrl, 0, 1) + lay_phsloop.addWidget(ld_gpiolsign, 1, 0) + lay_phsloop.addWidget(cb_gpiolsign, 1, 1) + lay_phsloop.addWidget(ld_gpiogain, 2, 0) + lay_phsloop.addWidget(sb_gpiogain, 2, 1) + lay_phsloop.addWidget(ld_gpiooff, 3, 0) + lay_phsloop.addWidget(sb_gpiooff, 3, 1) + lay_phsloop.addWidget(ld_gpiohtrk, 4, 0) + lay_phsloop.addWidget(cb_gpiohtrk, 4, 1) + lay_phsloop.addWidget(ld_gpiovtrk, 5, 0) + lay_phsloop.addWidget(cb_gpiovtrk, 5, 1) + return gbox_phsloop + + def _setupThermoWidget(self): + # # DS1822 ROM/Thermometer + ld_gpiosts = QLabel('Status', self) + lb_gpiosts = SiriusLabel(self, self.dev_pref+':FBE_DS1822_STAT') + + ld_gpiocsum = QLabel('CheckSum', self) + lb_gpiocsum = SiriusLabel(self, self.dev_pref+':FBE_DS1822_XSUM') + + ld_gpiomod = QLabel('Modification', self) + lb_gpiomod = SiriusLabel(self, self.dev_pref+':FBE_MOD_SENSE') + + ld_gpiodevid = QLabel('Device ID', self) + lb_gpiodevid = SiriusLabel(self, self.dev_pref+':FBE_DS1822_DEVID') + lb_gpiodevid.displayFormat = SiriusLabel.DisplayFormat.Hex + + ld_gpioser = QLabel('Serial', self) + lb_gpioser = SiriusLabel(self, self.dev_pref+':FBE_DS1822_SERIAL') + + ld_gpiotemp = QLabel('Temperature', self) + lb_gpiotemp = SiriusLabel(self, self.dev_pref+':FBE_TEMP') + lb_gpiotemp.showUnits = True + + gbox_thermo = QGroupBox('DS1822 ROM/Thermometer', self) + lay_thermo = QGridLayout(gbox_thermo) + lay_thermo.addWidget(ld_gpiosts, 0, 0) + lay_thermo.addWidget(lb_gpiosts, 0, 1) + lay_thermo.addWidget(ld_gpiocsum, 1, 0) + lay_thermo.addWidget(lb_gpiocsum, 1, 1) + lay_thermo.addWidget(ld_gpiomod, 2, 0) + lay_thermo.addWidget(lb_gpiomod, 2, 1) + lay_thermo.addWidget(ld_gpiodevid, 3, 0) + lay_thermo.addWidget(lb_gpiodevid, 3, 1) + lay_thermo.addWidget(ld_gpioser, 4, 0) + lay_thermo.addWidget(lb_gpioser, 4, 1) + lay_thermo.addWidget(ld_gpiotemp, 5, 0) + lay_thermo.addWidget(lb_gpiotemp, 5, 1) + return gbox_thermo + + def _setupOtherControlsWidget(self): + # # FBE + ld_gpiomode = QLabel('Mode', self) + cb_gpiomode = PyDMStateButton(self, self.dev_pref+':FBELT_FAN_MODE') + + ld_gpiofanspd = QLabel('Fan Speed', self) + lb_gpiofanspd = SiriusLabel( + self, self.dev_pref+':FBE_FANMON', keep_unit=True) + lb_gpiofanspd.showUnits = True + + ld_gpiotempsp = QLabel('Temperature Setpoint', self) + sb_gpiotempsp = SiriusSpinbox(self, self.dev_pref+':FBELT_FAN_SETPT') + + gbox_fbe = QGroupBox('Fan Control', self) + lay_fbe = QGridLayout(gbox_fbe) + lay_fbe.addWidget(ld_gpiomode, 0, 0) + lay_fbe.addWidget(cb_gpiomode, 0, 1) + lay_fbe.addWidget(ld_gpiofanspd, 1, 0) + lay_fbe.addWidget(lb_gpiofanspd, 1, 1) + lay_fbe.addWidget(ld_gpiotempsp, 2, 0) + lay_fbe.addWidget(sb_gpiotempsp, 2, 1) + return gbox_fbe + + def _setupMonitorsWidget(self): + # # ADC Average + si_gpioadcav = SiriusScaleIndicator(self, self.dev_pref+':CIC_MEAN') + si_gpioadcav.setObjectName('si') + si_gpioadcav.setStyleSheet('#si{min-height: 4em;}') + + gbox_adcav = QGroupBox('ADC Average', self) + lay_adcav = QGridLayout(gbox_adcav) + lay_adcav.addWidget(si_gpioadcav) + + # # Phase servo output + si_gpioservodlt = SiriusScaleIndicator( + self, self.dev_pref+':FBELT_SERVO_DELTA') + ld_gpioservomax = QLabel( + '<h4>Max</h4>', self, alignment=Qt.AlignCenter) + sb_gpioservomax = SiriusSpinbox( + self, self.dev_pref+':FBELT_SERVO_MAXDELTA') + + gbox_phsout = QGroupBox('Phase Servo Output', self) + lay_phsout = QGridLayout(gbox_phsout) + lay_phsout.addWidget(si_gpioservodlt, 0, 0, 2, 1) + lay_phsout.addWidget(ld_gpioservomax, 0, 1, alignment=Qt.AlignBottom) + lay_phsout.addWidget(sb_gpioservomax, 1, 1, alignment=Qt.AlignTop) + lay_phsout.setColumnStretch(0, 4) + lay_phsout.setColumnStretch(1, 1) + + wid = QWidget() + lay = QHBoxLayout(wid) + lay.setContentsMargins(0, 0, 0, 0) + lay.addWidget(gbox_adcav) + lay.addWidget(gbox_phsout) + lay.setStretch(0, 4) + lay.setStretch(1, 5) + return wid
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_bbb/main.html b/_modules/siriushla/si_di_bbb/main.html new file mode 100644 index 000000000..a8837bbdb --- /dev/null +++ b/_modules/siriushla/si_di_bbb/main.html @@ -0,0 +1,241 @@ + + + + + + siriushla.si_di_bbb.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_di_bbb.main

+"""BbB Main Module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QGridLayout, QLabel, QWidget, QHBoxLayout, \
+    QPushButton, QComboBox
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+
+from ..util import connect_window
+from ..widgets import SiriusMainWindow
+from ..widgets.windows import create_window_from_widget
+
+from .bbb import BbBMainSettingsWidget
+from .util import get_bbb_icon, set_bbb_color
+from .gpio import BbBGPIOWidget
+
+
+
+[docs] +class BbBMainWindow(SiriusMainWindow): + """BbB Main Window.""" + + def __init__(self, parent=None, prefix=_vaca_prefix): + """.""" + super().__init__(parent) + self.prefix = prefix + self.setWindowTitle('BbB Control Window') + self.setObjectName('SIApp') + self.setWindowIcon(get_bbb_icon()) + self._bbb_widgets = list() + self._setupUi() + + def _setupUi(self): + self._ld_bbb = QLabel( + '<h3>BbB Control Window</h3>', self, alignment=Qt.AlignCenter) + + self._but_fbe = QPushButton('FBE', self) + + window = create_window_from_widget( + BbBGPIOWidget, title='Front-Back End', icon=get_bbb_icon(), + is_main=True) + connect_window( + self._but_fbe, window, self, prefix=self.prefix, + device='') # device will be filled by the QComboBox callback + + cbox = QComboBox(self) + cbox.addItems(['L', 'H', 'V']) + cbox.currentTextChanged.connect(self._change_fbe_proc) + cbox.setCurrentIndex(2) + + hlay = QHBoxLayout() + hlay.addWidget(QLabel('Plane', self)) + hlay.addWidget(cbox) + hlay.addWidget(self._but_fbe) + hlay.addStretch() + hlay.addWidget(self._ld_bbb) + hlay.addStretch() + + idcs_types = ['H', 'V', 'L'] + + cwt = QWidget(self) + self.setCentralWidget(cwt) + lay = QGridLayout(cwt) + + for col, idc in enumerate(idcs_types): + dev_pref = 'SI-Glob:DI-BbBProc-'+idc + + wid = BbBMainSettingsWidget(self, self.prefix, dev_pref) + set_bbb_color(wid, dev_pref) + lay.addWidget(wid, 1, col) + self._bbb_widgets.append(wid) + + lay.addLayout(hlay, 0, 0, 1, len(idcs_types)) + lay.setRowStretch(0, 1) + lay.setRowStretch(1, 6) + + def _change_fbe_proc(self, proc): + self._but_fbe.kwargs['device'] = 'SI-Glob:DI-BbBProc-' + proc
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_bbb/masks.html b/_modules/siriushla/si_di_bbb/masks.html new file mode 100644 index 000000000..c8a22439e --- /dev/null +++ b/_modules/siriushla/si_di_bbb/masks.html @@ -0,0 +1,245 @@ + + + + + + siriushla.si_di_bbb.masks — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_di_bbb.masks

+"""BbB Devices Module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QLabel, QWidget, QGridLayout, QSpacerItem
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from .custom_widgets import WfmGraph
+from .util import set_bbb_color
+
+
+
+[docs] +class BbBMasksWidget(QWidget): + """BbB Masks Settings Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._setupUi() + + def _setupUi(self): + ld_exct_masks = QLabel( + '<h3>Excitation Masks</h3>', self, alignment=Qt.AlignCenter) + ld_spec_masks = QLabel( + '<h3>Spectrum Averaging Masks</h3>', self, + alignment=Qt.AlignCenter) + + graph_exct = WfmGraph(self) + graph_exct.setAutoRangeY(False) + graph_exct.setYRange(-0.01, 1.08) + graph_exct.showLegend = True + graph_exct.axisColor = QColor('black') + graph_exct.add_scatter_curve( + ychannel=self.dev_pref+':FB_MASK', + xchannel=self.dev_pref+':SRAM_XSC', + name='Feedback', color=QColor('blue')) + graph_exct.add_scatter_curve( + ychannel=self.dev_pref+':CF_MASK', + xchannel=self.dev_pref+':SRAM_XSC', + name='Alternate', color=QColor('green'), offset=0.02) + graph_exct.add_scatter_curve( + ychannel=self.dev_pref+':DRIVE0_MASK', + xchannel=self.dev_pref+':SRAM_XSC', + name='Drive0', color=QColor('red'), offset=0.04) + graph_exct.add_scatter_curve( + ychannel=self.dev_pref+':DRIVE1_MASK', + xchannel=self.dev_pref+':SRAM_XSC', + name='Drive1', color=QColor('magenta'), offset=0.06) + graph_exct.add_scatter_curve( + ychannel=self.dev_pref+':DRIVE2_MASK', + xchannel=self.dev_pref+':SRAM_XSC', + name='Drive2', color=QColor('orange'), offset=0.08) + graph_exct.setLabel('left', '') + + graph_spec = WfmGraph(self) + graph_spec.setAutoRangeY(False) + graph_spec.setYRange(-0.01, 1.08) + graph_spec.showLegend = True + graph_spec.axisColor = QColor('black') + graph_spec.add_scatter_curve( + ychannel=self.dev_pref+':SRAM_ACQ_MASK', + xchannel=self.dev_pref+':SRAM_XSC', + name='SRAM', color=QColor('red')) + graph_spec.add_scatter_curve( + ychannel=self.dev_pref+':BRAM_ACQ_MASK', + xchannel=self.dev_pref+':BRAM_XSC', + name='BRAM', color=QColor('blue'), offset=0.02) + graph_spec.setLabel('left', '') + + lay = QGridLayout(self) + lay.addWidget(ld_exct_masks, 0, 0) + lay.addWidget(graph_exct, 1, 0) + lay.addItem(QSpacerItem(20, 20), 2, 0) + lay.addWidget(ld_spec_masks, 3, 0) + lay.addWidget(graph_spec, 4, 0)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_bbb/pwr_amps.html b/_modules/siriushla/si_di_bbb/pwr_amps.html new file mode 100644 index 000000000..4a79a769c --- /dev/null +++ b/_modules/siriushla/si_di_bbb/pwr_amps.html @@ -0,0 +1,496 @@ + + + + + + siriushla.si_di_bbb.pwr_amps — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_di_bbb.pwr_amps

+"""BbB Devices Module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QLabel, QWidget, QGridLayout, QGroupBox, \
+    QHBoxLayout, QSizePolicy as QSzPlcy, QSpacerItem
+import qtawesome as qta
+from pydm.widgets import PyDMLineEdit
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..widgets import PyDMStateButton, SiriusLedState, SiriusSpinbox, \
+    SiriusLabel, PyDMLed, SiriusPushButton, SiriusScaleIndicator
+
+from .util import set_bbb_color
+
+
+
+[docs] +class BbBPwrAmpsWidget(QWidget): + """BbB Power Amplifiers Settings Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._setupUi() + + def _setupUi(self): + lay_mc = QGridLayout(self) + lay_mc.setContentsMargins(0, 0, 0, 0) + if self._device.endswith('-L'): + lay_mc.addWidget(self._setupMiniCircWidget(0), 0, 0) + lay_mc.addWidget(self._setupMiniCircWidget(1), 0, 1) + else: + lay_mc.addWidget(self._setupTransverse(), 0, 0) + + def _setupSerialAmpWidget(self): + ld_serial = QLabel( + '<h3>Serial/USB amplifier</h3>', self, alignment=Qt.AlignCenter) + + ld_lctrl = QLabel('Line Control', self) + bt_lctrl = PyDMStateButton(self, self.dev_pref+':SERIAL_CTRL_LINE') + + ld_rfctrl = QLabel('RF Control', self) + bt_rfctrl = PyDMStateButton(self, self.dev_pref+':SERIAL_CTRL_RF') + + ld_pwrfreq = QLabel( + 'Power Meter Calibration Frequency', + self, alignment=Qt.AlignCenter) + le_pwrfreq = PyDMLineEdit(self, self.dev_pref+':SERIAL_CALFREQ') + le_pwrfreq.showUnits = True + + gbox_ctrl = QGroupBox(self) + lay_ctrl = QGridLayout(gbox_ctrl) + lay_ctrl.addWidget(ld_lctrl, 0, 0, alignment=Qt.AlignRight) + lay_ctrl.addWidget(bt_lctrl, 0, 1, alignment=Qt.AlignLeft) + lay_ctrl.addWidget(ld_rfctrl, 0, 2, alignment=Qt.AlignRight) + lay_ctrl.addWidget(bt_rfctrl, 0, 3, alignment=Qt.AlignLeft) + lay_ctrl.addWidget(ld_pwrfreq, 1, 0, 1, 2, alignment=Qt.AlignRight) + lay_ctrl.addWidget(le_pwrfreq, 1, 2, 1, 2, alignment=Qt.AlignLeft) + lay_ctrl.setColumnStretch(0, 1) + lay_ctrl.setColumnStretch(1, 1) + lay_ctrl.setColumnStretch(2, 1) + lay_ctrl.setColumnStretch(3, 1) + + ld_fwrpwr = QLabel( + '<h4>Forward Power</h4>', self, alignment=Qt.AlignCenter) + si_fwrpwr = SiriusScaleIndicator(self, self.dev_pref+':SERIAL_FWD') + si_fwrpwr.indicatorColor = QColor('blue') + si_fwrpwr.barIndicator = True + si_fwrpwr.showUnits = True + si_fwrpwr.setObjectName('fwrpwr') + si_fwrpwr.setStyleSheet('#fwrpwr{min-height:6em; min-width:8em;}') + + ld_revpwr = QLabel( + '<h4>Reverse Power</h4>', self, alignment=Qt.AlignCenter) + si_revpwr = SiriusScaleIndicator(self, self.dev_pref+':SERIAL_REV') + si_revpwr.indicatorColor = QColor('red') + si_revpwr.barIndicator = True + si_revpwr.showUnits = True + si_revpwr.setObjectName('revpwr') + si_revpwr.setStyleSheet('#revpwr{min-height:6em; min-width:8em;}') + + ld_id = QLabel('ID', self) + lb_id = SiriusLabel(self, self.dev_pref+':SERIAL_ID') + lb_id.displayFormat = SiriusLabel.DisplayFormat.String + hbox_id = QHBoxLayout() + hbox_id.setContentsMargins(0, 0, 0, 0) + hbox_id.addWidget(ld_id) + hbox_id.addWidget(lb_id) + hbox_id.setStretch(0, 1) + hbox_id.setStretch(1, 5) + + gbox_mon = QGroupBox(self) + lay_mon = QGridLayout(gbox_mon) + lay_mon.addWidget(ld_fwrpwr, 0, 0) + lay_mon.addWidget(si_fwrpwr, 1, 0) + lay_mon.addWidget(ld_revpwr, 0, 1) + lay_mon.addWidget(si_revpwr, 1, 1) + lay_mon.addLayout(hbox_id, 2, 0, 1, 2) + + wid = QWidget() + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignCenter) + lay.addItem( + QSpacerItem(10, 1, QSzPlcy.MinimumExpanding, QSzPlcy.Fixed), 0, 0) + lay.addWidget(ld_serial, 0, 1) + lay.addWidget(gbox_ctrl, 1, 1) + lay.addWidget(gbox_mon, 2, 1) + lay.addItem( + QSpacerItem(10, 10, QSzPlcy.MinimumExpanding, + QSzPlcy.MinimumExpanding), 3, 2) + return wid + + def _setupMilmegaWidget(self, unit): + unit_label = str(unit) + ld_mmdb15 = QLabel( + '<h3>Milmega DB-15 '+unit_label+'</h3>', self, + alignment=Qt.AlignCenter) + ld_mmdesc = QLabel( + 'Milmega via DB-15 custom cable\nand ' + '8 channel ADC (unit '+unit_label+')', + self, alignment=Qt.AlignCenter) + + ld_rfsts = QLabel('RF Status', self) + led_rfsts = PyDMLed( + self, self.dev_pref+':MMGRAW_'+unit_label+'_RF') + led_rfsts.onColor = PyDMLed.LightGreen + led_rfsts.offColor = PyDMLed.Red + lb_rfsts = SiriusLabel( + self, self.dev_pref+':MMGRAW_'+unit_label+'_RF') + + ld_fltlac = QLabel('Fault Latch', self) + led_fltlac = PyDMLed( + self, self.dev_pref+':MMGRAW_'+unit_label+'_FAULT') + led_fltlac.onColor = PyDMLed.LightGreen + led_fltlac.offColor = PyDMLed.Red + lb_fltlac = SiriusLabel( + self, self.dev_pref+':MMGRAW_'+unit_label+'_FAULT') + + ld_slope = QLabel('Slope', self) + le_slope = PyDMLineEdit( + self, self.dev_pref+':MMGRAW_'+unit_label+'_SLOPE') + le_slope.showUnits = True + ld_offset = QLabel('Offset', self) + le_offset = PyDMLineEdit( + self, self.dev_pref+':MMGRAW_'+unit_label+'_OFFSET') + le_offset.showUnits = True + + gbox_ctrl = QGroupBox(self) + lay_ctrl = QGridLayout(gbox_ctrl) + lay_ctrl.addWidget(ld_rfsts, 0, 0) + lay_ctrl.addWidget(led_rfsts, 0, 1) + lay_ctrl.addWidget(lb_rfsts, 0, 2) + lay_ctrl.addWidget(ld_fltlac, 1, 0) + lay_ctrl.addWidget(led_fltlac, 1, 1) + lay_ctrl.addWidget(lb_fltlac, 1, 2) + lay_ctrl.addWidget(ld_slope, 2, 0) + lay_ctrl.addWidget(le_slope, 2, 1, 1, 2) + lay_ctrl.addWidget(ld_offset, 3, 0) + lay_ctrl.addWidget(le_offset, 3, 1, 1, 2) + + ld_fwrpwr = QLabel( + '<h4>Forward Power</h4>', self, alignment=Qt.AlignCenter) + si_fwrpwr = SiriusScaleIndicator( + self, self.dev_pref+':MMGRAW_'+unit_label+'_FWD') + si_fwrpwr.barIndicator = True + si_fwrpwr.indicatorColor = QColor('blue') + si_fwrpwr.showUnits = True + si_fwrpwr.setObjectName('fwrpwr') + si_fwrpwr.setStyleSheet('#fwrpwr{min-height:6em; min-width:8em;}') + + ld_revpwr = QLabel( + '<h4>Reverse Power</h4>', self, alignment=Qt.AlignCenter) + si_revpwr = SiriusScaleIndicator( + self, self.dev_pref+':MMGRAW_'+unit_label+'_REV') + si_revpwr.barIndicator = True + si_revpwr.indicatorColor = QColor('red') + si_revpwr.showUnits = True + si_revpwr.setObjectName('revpwr') + si_revpwr.setStyleSheet('#revpwr{min-height:6em; min-width:8em;}') + + gbox_mon = QGroupBox(self) + lay_mon = QGridLayout(gbox_mon) + lay_mon.addWidget(ld_fwrpwr, 0, 0) + lay_mon.addWidget(si_fwrpwr, 1, 0) + lay_mon.addWidget(ld_revpwr, 2, 0) + lay_mon.addWidget(si_revpwr, 3, 0) + + wid = QWidget() + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignCenter | Qt.AlignTop) + lay.addWidget(ld_mmdb15) + lay.addWidget(ld_mmdesc) + lay.addWidget(gbox_ctrl) + lay.addWidget(gbox_mon) + return wid + + def _setupMiniCircWidget(self, unit): + unit_label = str(unit) + ld_mczt102 = QLabel( + '<h3>Mini-Circuits Zt-102 '+unit_label+'</h3>', + self, alignment=Qt.AlignCenter) + ld_mcdesc = QLabel( + 'Mini-Circuits ZT-102 DE-9\nmonitoring ' + 'interface (unit '+unit_label+')', self, + alignment=Qt.AlignCenter) + + ld_fault = QLabel('RF Status', self) + led_fault = PyDMLed(self, self.dev_pref+':MCLRAW_'+unit_label+'_FAULT') + led_fault.onColor = PyDMLed.LightGreen + led_fault.offColor = PyDMLed.Red + lb_fault = SiriusLabel( + self, self.dev_pref+':MCLRAW_'+unit_label+'_FAULT') + + ld_temp = QLabel('Temperature', self) + lb_temp = SiriusLabel( + self, self.dev_pref+':MCLRAW_'+unit_label+'_TEMP') + lb_temp.showUnits = True + + ld_fwrloss = QLabel('Fwd Loss', self) + le_fwrloss = PyDMLineEdit( + self, self.dev_pref+':MCLRAW_'+unit_label+'_FWDLOSS') + le_fwrloss.showUnits = True + ld_revloss = QLabel('Rev Loss', self) + le_revloss = PyDMLineEdit( + self, self.dev_pref+':MCLRAW_'+unit_label+'_REVLOSS') + le_revloss.showUnits = True + + gbox_ctrl = QGroupBox(self) + lay_ctrl = QGridLayout(gbox_ctrl) + lay_ctrl.addWidget(ld_fault, 0, 0) + lay_ctrl.addWidget(led_fault, 0, 1) + lay_ctrl.addWidget(lb_fault, 0, 2) + lay_ctrl.addWidget(ld_temp, 1, 0) + lay_ctrl.addWidget(lb_temp, 1, 1, 1, 2) + lay_ctrl.addWidget(ld_fwrloss, 2, 0) + lay_ctrl.addWidget(le_fwrloss, 2, 1, 1, 2) + lay_ctrl.addWidget(ld_revloss, 3, 0) + lay_ctrl.addWidget(le_revloss, 3, 1, 1, 2) + + ld_fwrpwr = QLabel( + '<h4>Forward Power</h4>', self, alignment=Qt.AlignCenter) + si_fwrpwr = SiriusScaleIndicator( + self, self.dev_pref+':MCLRAW_'+unit_label+'_FWD') + si_fwrpwr.barIndicator = True + si_fwrpwr.indicatorColor = QColor('blue') + si_fwrpwr.showUnits = True + si_fwrpwr.setObjectName('fwrpwr') + si_fwrpwr.setStyleSheet('#fwrpwr{min-height:6em; min-width:8em;}') + + ld_revpwr = QLabel( + '<h4>Reverse Power</h4>', self, alignment=Qt.AlignCenter) + si_revpwr = SiriusScaleIndicator( + self, self.dev_pref+':MCLRAW_'+unit_label+'_REV') + si_revpwr.barIndicator = True + si_revpwr.indicatorColor = QColor('red') + si_revpwr.showUnits = True + si_revpwr.setObjectName('revpwr') + si_revpwr.setStyleSheet('#revpwr{min-height:6em; min-width:8em;}') + + gbox_mon = QGroupBox(self) + lay_mon = QGridLayout(gbox_mon) + lay_mon.addWidget(ld_fwrpwr, 0, 0) + lay_mon.addWidget(si_fwrpwr, 1, 0) + lay_mon.addWidget(ld_revpwr, 2, 0) + lay_mon.addWidget(si_revpwr, 3, 0) + + wid = QWidget() + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignCenter | Qt.AlignTop) + lay.addWidget(ld_mczt102) + lay.addWidget(ld_mcdesc) + lay.addWidget(gbox_ctrl) + lay.addWidget(gbox_mon) + return wid + + def _setupTransverse(self): + pref = self.dev_pref.substitute(dev='BbBAmp'+self._device.idx, idx='') + + ld_main = QLabel( + '<h3>AR Amplifier</h3>', self, alignment=Qt.AlignCenter) + + conf = SiriusPushButton( + self, init_channel=pref+':Rst-Cmd', pressValue=1, releaseValue=0) + conf.setText('Reset') + conf.setToolTip('Reset State') + conf.setIcon(qta.icon('fa5s.sync')) + conf.setObjectName('conf') + conf_lay = QHBoxLayout() + conf_lay.addStretch() + conf_lay.addWidget(conf) + conf_lay.addStretch() + + ld_enbl = QLabel('Enable', self) + led_enbl = SiriusLedState(self, pref+':Enbl-Sts') + pb_enbl = PyDMStateButton(self, pref+':Enbl-Sel') + + ld_gainauto = QLabel('Gain lock\n(dB to steps)', self) + led_gainauto = SiriusLedState(self, pref+':GainAuto-Sts') + pb_gainauto = PyDMStateButton(self, pref+':GainAuto-Sel') + + ld_gain_db = QLabel('Gain [dB]', self) + sp_gain_db = SiriusSpinbox(self, pref+':Gain-SP') + lb_gain_db = SiriusLabel(self, init_channel=pref+':Gain-RB') + + ld_gain_st = QLabel('Gain [steps]', self) + sp_gain_st = SiriusSpinbox(self, pref+':GainStep-SP') + lb_gain_st = SiriusLabel(self, init_channel=pref+':GainStep-RB') + + wid = QWidget() + lay = QGridLayout(wid) + lay.setAlignment(Qt.AlignCenter | Qt.AlignTop) + lay.addWidget(ld_main, 0, 0, 1, 3) + lay.addLayout(conf_lay, 1, 0, 1, 3) + lay.addWidget(ld_enbl, 2, 0) + lay.addWidget(pb_enbl, 2, 1) + lay.addWidget(led_enbl, 2, 2) + lay.addWidget(ld_gainauto, 3, 0) + lay.addWidget(pb_gainauto, 3, 1) + lay.addWidget(led_gainauto, 3, 2) + lay.addWidget(ld_gain_db, 4, 0) + lay.addWidget(sp_gain_db, 4, 1) + lay.addWidget(lb_gain_db, 4, 2) + lay.addWidget(ld_gain_st, 5, 0) + lay.addWidget(sp_gain_st, 5, 1) + lay.addWidget(lb_gain_st, 5, 2) + return wid
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_bbb/timing.html b/_modules/siriushla/si_di_bbb/timing.html new file mode 100644 index 000000000..bb8d931d2 --- /dev/null +++ b/_modules/siriushla/si_di_bbb/timing.html @@ -0,0 +1,292 @@ + + + + + + siriushla.si_di_bbb.timing — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_di_bbb.timing

+"""BbB Timing Module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QLabel, QWidget, QGridLayout, \
+    QGroupBox
+import qtawesome as qta
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..widgets import SiriusFrame, SiriusSpinbox, SiriusLabel, \
+    SiriusPushButton, SiriusSpinbox
+from .util import set_bbb_color
+
+
+
+[docs] +class BbBTimingWidget(QWidget): + """BbB Timing Settings Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + set_bbb_color(self, device) + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._setupUi() + + def _setupUi(self): + ld_timing = QLabel( + '<h3>Timing</h3>', self, alignment=Qt.AlignCenter) + + # Feedback Timing + ld_adcdelay = QLabel('ADC Delay [ps]', self) + sb_adcdelay = SiriusSpinbox(self, self.dev_pref+':TADC') + ld_dacdelay = QLabel('DAC Delay [ps]', self) + sb_dacdelay = SiriusSpinbox(self, self.dev_pref+':TDAC') + ld_outdelay = QLabel('Output Delay', self) + sb_outdelay = SiriusSpinbox(self, self.dev_pref+':DELAY') + + gbox_fbti = QGroupBox('Feedback Timing', self) + lay_fbti = QGridLayout(gbox_fbti) + lay_fbti.addWidget(ld_adcdelay, 0, 0) + lay_fbti.addWidget(sb_adcdelay, 0, 1) + lay_fbti.addWidget(ld_dacdelay, 1, 0) + lay_fbti.addWidget(sb_dacdelay, 1, 1) + lay_fbti.addWidget(ld_outdelay, 2, 0) + lay_fbti.addWidget(sb_outdelay, 2, 1) + + # Timing Control + ld_clkrst = QLabel('Clock Reset', self) + pb_clkrst = SiriusPushButton( + self, init_channel=self.dev_pref+':CLKRST', pressValue=1, + releaseValue=0) + pb_clkrst.setText('Reset') + pb_clkrst.setToolTip('Reset Clock') + pb_clkrst.setIcon(qta.icon('fa5s.sync')) + pb_clkrst.setObjectName('conf') + + ld_fidsigoff = QLabel('FID Signal Offset [ps]', self) + sb_fidsigoff = SiriusSpinbox(self, self.dev_pref+':OFF_FIDS') + sb_fidsigoff.limitsFromChannel = False + sb_fidsigoff.setMinimum(0) + sb_fidsigoff.setMaximum(3000) + ld_fiddelay = QLabel('Fiducial Delay', self) + sb_fiddelay = SiriusSpinbox(self, self.dev_pref+':FID_DELAY') + fr_fiddelay = SiriusFrame(self, self.dev_pref+':FID_DELAY_SUBWR') + fr_fiddelay.add_widget(sb_fiddelay) + + gbox_tictrl = QGroupBox('Timing Control', self) + lay_tictrl = QGridLayout(gbox_tictrl) + lay_tictrl.addWidget(ld_clkrst, 0, 0) + lay_tictrl.addWidget(pb_clkrst, 0, 1) + lay_tictrl.addWidget(ld_fidsigoff, 1, 0) + lay_tictrl.addWidget(sb_fidsigoff, 1, 1) + lay_tictrl.addWidget(ld_fiddelay, 2, 0) + lay_tictrl.addWidget(fr_fiddelay, 2, 1) + + # Frequency counters + ld_fcntch0 = QLabel('Input Clock', self) + lb_fcntch0 = SiriusLabel(self, self.dev_pref+':FREQ_CNT_CH0') + lb_fcntch0.precisionFromPV = False + lb_fcntch0.precision = 6 + lb_fcntch0.showUnits = True + ld_fcntch1 = QLabel('ACLK (RF/2)', self) + lb_fcntch1 = SiriusLabel(self, self.dev_pref+':FREQ_CNT_CH1') + lb_fcntch1.precisionFromPV = False + lb_fcntch1.precision = 6 + lb_fcntch1.showUnits = True + ld_fcntch2 = QLabel('ACLK3 (RF/3)', self) + lb_fcntch2 = SiriusLabel(self, self.dev_pref+':FREQ_CNT_CH2') + lb_fcntch2.precisionFromPV = False + lb_fcntch2.precision = 6 + lb_fcntch2.showUnits = True + ld_fcntch3 = QLabel('DAC Clock', self) + lb_fcntch3 = SiriusLabel(self, self.dev_pref+':FREQ_CNT_CH3') + lb_fcntch3.precisionFromPV = False + lb_fcntch3.precision = 6 + lb_fcntch3.showUnits = True + ld_fcntch4 = QLabel('RF/4 Processing Clock', self) + lb_fcntch4 = SiriusLabel(self, self.dev_pref+':FREQ_CNT_CH4') + lb_fcntch4.precisionFromPV = False + lb_fcntch4.precision = 6 + lb_fcntch4.showUnits = True + + gbox_fcnts = QGroupBox('Frequency counters', self) + lay_fcnts = QGridLayout(gbox_fcnts) + lay_fcnts.addWidget(ld_fcntch0, 0, 0) + lay_fcnts.addWidget(lb_fcntch0, 0, 1) + lay_fcnts.addWidget(ld_fcntch1, 1, 0) + lay_fcnts.addWidget(lb_fcntch1, 1, 1) + lay_fcnts.addWidget(ld_fcntch2, 2, 0) + lay_fcnts.addWidget(lb_fcntch2, 2, 1) + lay_fcnts.addWidget(ld_fcntch3, 3, 0) + lay_fcnts.addWidget(lb_fcntch3, 3, 1) + lay_fcnts.addWidget(ld_fcntch4, 4, 0) + lay_fcnts.addWidget(lb_fcntch4, 4, 1) + + lay = QGridLayout(self) + lay.addWidget(ld_timing, 0, 1, 1, 2) + lay.addWidget(gbox_fbti, 1, 1) + lay.addWidget(gbox_tictrl, 1, 2) + lay.addWidget(gbox_fcnts, 2, 1, 1, 2) + lay.setColumnStretch(0, 3) + lay.setColumnStretch(3, 3) + lay.setRowStretch(3, 3) + + self.setStyleSheet("SiriusFrame{max-height: 1.8em;}")
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_bbb/util.html b/_modules/siriushla/si_di_bbb/util.html new file mode 100644 index 000000000..20e6cd7ff --- /dev/null +++ b/_modules/siriushla/si_di_bbb/util.html @@ -0,0 +1,202 @@ + + + + + + siriushla.si_di_bbb.util — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_di_bbb.util

+"""BbB Util Module."""
+
+from qtpy.QtGui import QColor, QPalette
+import qtawesome as qta
+
+from ..util import get_appropriate_color
+
+
+
+[docs] +def get_bbb_icon(): + """Get BbB icon.""" + clr = get_appropriate_color('SI') + icon = qta.icon( + 'fa5s.hammer', 'mdi.ellipse', 'mdi.ellipse', 'mdi.ellipse', + options=[ + dict( + scale_factor=0.4, offset=(-0.25, -0.20), color=clr, + rotated=15), + dict(scale_factor=0.3, offset=(-0.30, +0.20), color=clr), + dict(scale_factor=0.3, offset=(+0.00, +0.07), color=clr), + dict(scale_factor=0.3, offset=(+0.30, +0.20), color=clr), + ]) + return icon
+ + + +
+[docs] +def set_bbb_color(obj, device): + """Set BbB color.""" + ncolor = '#b3e5ff' if device.endswith('H') \ + else '#ffb3b3' if device.endswith('V') \ + else '#f5f5f0' + color = QColor(ncolor) + pal = obj.palette() + pal.setColor(QPalette.Background, color) + obj.setAutoFillBackground(True) + obj.setPalette(pal)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_equalize_bpms/main.html b/_modules/siriushla/si_di_equalize_bpms/main.html new file mode 100644 index 000000000..9b5622958 --- /dev/null +++ b/_modules/siriushla/si_di_equalize_bpms/main.html @@ -0,0 +1,653 @@ + + + + + + siriushla.si_di_equalize_bpms.main — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_di_equalize_bpms.main

+"""Main module of the Application Interface."""
+import os as _os
+import sys as _sys
+import logging as _log
+from threading import Thread
+import pathlib as _pathlib
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QPushButton, QGridLayout, QSpinBox, \
+    QLabel, QGroupBox, QDoubleSpinBox, QComboBox, QFileDialog, QMessageBox
+
+import qtawesome as qta
+
+from siriuspy.devices import EqualizeBPMs
+from siriuspy.clientconfigdb import ConfigDBException
+from siriushla import util
+from siriushla.widgets import SiriusMainWindow, SiriusLogDisplay, \
+    MatplotlibWidget
+from siriushla.widgets.windows import create_window_from_widget
+from siriushla.as_ap_configdb import LoadConfigDialog, SaveConfigDialog
+
+
+
+[docs] +class BPMsEqualizeSwitching(SiriusMainWindow): + """.""" + + EXTS = '.pickle', '.pkl', '.h5', '.hdf5', '.hdf', '.hd5' + EXT_FLT = ( + 'Pickle Files (*.pickle *.pkl);;' + 'HDF5 file (*.h5 *.hdf5 *.hdf *.hd5)') + DEFAULT_DIR = _pathlib.Path.home().as_posix() + DEFAULT_DIR += _os.path.sep + _os.path.join( + 'shared', 'screens-iocs', 'data_by_day') + + def __init__(self, parent=None): + """.""" + super().__init__(parent=parent) + + root = _log.getLogger() + handler = _log.StreamHandler(_sys.stdout) + root.setLevel(_log.INFO) + handler.setLevel(_log.INFO) + formatter = _log.Formatter('%(levelname)7s ::: %(message)s') + handler.setFormatter(formatter) + root.addHandler(handler) + + self.bpms_eq = EqualizeBPMs(logger=root) + self._last_dir = self.DEFAULT_DIR + self._thread = Thread() + self._orbits = None + self.setupui() + self.setObjectName('SIApp') + color = util.get_appropriate_color('SI') + icon = qta.icon( + 'mdi.approximately-equal-box', options=[dict(color=color)]) + self.setWindowIcon(icon) + +
+[docs] + def setupui(self): + """.""" + self.setWindowModality(Qt.WindowModal) + self.setWindowTitle("SI - BPMs - Equalize Switching") + self.setDocumentMode(False) + self.setDockNestingEnabled(True) + + mwid = self.create_central_widget() + self.setCentralWidget(mwid)
+ + +
+[docs] + def create_central_widget(self): + """.""" + wid = QWidget(self) + lay = QGridLayout() + wid.setLayout(lay) + + wid.layout().addWidget( + QLabel(f'<h1>Equalize Switching </h1>', wid), + 0, 0, 1, 2, alignment=Qt.AlignCenter) + + ctrls = self.get_acq_control_widget(wid) + anly = self.get_analysis_control_widget(wid) + status = self.get_status_widget(wid) + apply = self.get_application_widget(wid) + saveload = self.get_saveload_widget(wid) + plots = self.get_plots_widget(wid) + check = self.get_check_data_widget(wid) + updt_orb = self.get_update_reforb_widget(wid) + + lay.addWidget(ctrls, 1, 0) + lay.addWidget(saveload, 2, 0) + lay.addWidget(anly, 3, 0) + lay.addWidget(plots, 4, 0) + lay.addWidget(apply, 5, 0) + lay.addWidget(check, 6, 0) + lay.addWidget(updt_orb, 7, 0) + lay.addWidget(status, 1, 1, 7, 1) + return wid
+ + +
+[docs] + def get_acq_control_widget(self, parent): + """.""" + wid = QGroupBox('Measurement Control', parent) + lay = QGridLayout() + wid.setLayout(lay) + + self.cb_acqstrat = QComboBox(wid) + self.cb_acqstrat.addItems(self.bpms_eq.AcqStrategies._fields) + self.cb_acqstrat.setCurrentIndex(self.bpms_eq.acq_strategy) + + self.sp_invredgain = QDoubleSpinBox(self) + self.sp_invredgain.setRange(0, 1) + self.sp_invredgain.setSingleStep(0.01) + self.sp_invredgain.setValue(self.bpms_eq.acq_inverse_reduced_gain) + + self.sp_acqtimeout = QDoubleSpinBox(self) + self.sp_acqtimeout.setRange(0, 120) + self.sp_acqtimeout.setSingleStep(1) + self.sp_acqtimeout.setValue(self.bpms_eq.acq_timeout) + + self.sp_nrpoints = QSpinBox(self) + self.sp_nrpoints.setRange(100, 100000) + self.sp_nrpoints.setSingleStep(1) + self.sp_nrpoints.setValue(self.bpms_eq.acq_nrpoints) + + pusb_start = QPushButton(qta.icon('mdi.play'), 'Acquire Data', wid) + pusb_start.clicked.connect(self._start_activity) + pusb_start.setObjectName('meas') + + lb_acqstrat = QLabel('Acquisition Strategy', wid) + lb_invredgain = QLabel('Inverse Reduced Gain', wid) + lb_acqtimeout = QLabel('Timeout [s]', wid) + lb_nrpoints = QLabel('Number of Points', wid) + + lay.addWidget(lb_acqstrat, 0, 1, alignment=Qt.AlignRight) + lay.addWidget(self.cb_acqstrat, 0, 2) + lay.addWidget(lb_invredgain, 1, 1, alignment=Qt.AlignRight) + lay.addWidget(self.sp_invredgain, 1, 2) + lay.addWidget(lb_acqtimeout, 2, 1, alignment=Qt.AlignRight) + lay.addWidget(self.sp_acqtimeout, 2, 2) + lay.addWidget(lb_nrpoints, 3, 1, alignment=Qt.AlignRight) + lay.addWidget(self.sp_nrpoints, 3, 2) + lay.addWidget(pusb_start, 5, 1, 1, 2, alignment=Qt.AlignCenter) + lay.setRowMinimumHeight(4, 20) + lay.setColumnStretch(3, 2) + lay.setColumnStretch(0, 2) + return wid
+ + +
+[docs] + def get_analysis_control_widget(self, parent): + """.""" + wid = QGroupBox('Analysis Control', parent) + lay = QGridLayout() + wid.setLayout(lay) + self.cb_procmeth = QComboBox(wid) + self.cb_procmeth.addItems(self.bpms_eq.ProcMethods._fields) + self.cb_procmeth.setCurrentIndex(self.bpms_eq.proc_method) + + self.lb_procmeth = QLabel(wid) + self.lb_procmeth.setText( + self.bpms_eq.PROCMETHODSMEANING[self.bpms_eq.proc_method_str]) + self.cb_procmeth.currentTextChanged.connect( + lambda x: self.lb_procmeth.setText( + self.bpms_eq.PROCMETHODSMEANING[x])) + + pusb_proc = QPushButton(qta.icon('mdi.chart-line'), 'Process', wid) + pusb_proc.clicked.connect(self._start_activity) + pusb_proc.setObjectName('proc') + + lay.addWidget(QLabel('Process Method:', wid), 0, 0) + lay.addWidget(self.cb_procmeth, 0, 1) + lay.addWidget(pusb_proc, 0, 3) + lay.addWidget(self.lb_procmeth, 1, 0, 1, 4) + lay.setColumnStretch(2, 2) + lay.setColumnStretch(4, 2) + return wid
+ + +
+[docs] + def get_check_data_widget(self, parent): + """.""" + wid = QGroupBox('Check Equalization', parent) + lay = QGridLayout() + wid.setLayout(lay) + + pusb_check = QPushButton( + qta.icon('mdi.play'), 'Get Data for Check', wid) + pusb_check.clicked.connect(self._start_activity) + pusb_check.setObjectName('check') + + pusb_pcheck = QPushButton('Plot to Check', wid) + pusb_pcheck.setObjectName('check') + pusb_pcheck.clicked.connect(self._plot) + + lay.addWidget(pusb_check, 0, 1) + lay.addWidget(pusb_pcheck, 0, 3) + lay.setColumnStretch(0, 2) + lay.setColumnStretch(2, 2) + lay.setColumnStretch(4, 2) + return wid
+ + +
+[docs] + def get_status_widget(self, parent): + """.""" + wid = QGroupBox('Status', parent) + lay = QGridLayout() + wid.setLayout(lay) + + self.log_label = SiriusLogDisplay(wid, level=_log.INFO) + self.log_label.logFormat = '%(message)s' + lay.addWidget(self.log_label, 0, 0) + return wid
+ + +
+[docs] + def get_application_widget(self, parent): + """.""" + wid = QGroupBox('Apply to BPMs', parent) + lay = QGridLayout() + wid.setLayout(lay) + pusb_appnew = QPushButton( + qta.icon('ei.arrow-down'), 'Apply New Gains', wid) + pusb_appnew.clicked.connect(self._apply_new) + pusb_appold = QPushButton( + qta.icon('ei.arrow-down'), 'Restore Initial Gains', wid) + pusb_appold.clicked.connect(self._apply_old) + lay.addWidget(pusb_appnew, 0, 1) + lay.addWidget(pusb_appold, 0, 3) + lay.setColumnStretch(0, 2) + lay.setColumnStretch(2, 2) + lay.setColumnStretch(4, 2) + return wid
+ + +
+[docs] + def get_saveload_widget(self, parent): + """.""" + svld_wid = QGroupBox('Save and Load Data', parent) + svld_lay = QGridLayout(svld_wid) + + pbld = QPushButton('Load', svld_wid) + pbld.setIcon(qta.icon('mdi.file-upload-outline')) + pbld.setToolTip('Load data from file') + pbld.clicked.connect(self._load_data_from_file) + + pbsv = QPushButton('Save', svld_wid) + pbsv.setIcon(qta.icon('mdi.file-download-outline')) + pbsv.setToolTip('Save data to file') + pbsv.clicked.connect(self._save_data_to_file) + + svld_lay.addWidget(pbsv, 0, 1) + svld_lay.addWidget(pbld, 0, 3) + svld_lay.setColumnStretch(0, 2) + svld_lay.setColumnStretch(2, 2) + svld_lay.setColumnStretch(4, 2) + return svld_wid
+ + +
+[docs] + def get_plots_widget(self, parent): + """.""" + wid = QGroupBox('Make Some Plots', parent) + lay = QGridLayout(wid) + wid.setLayout(lay) + + pusb_mean = QPushButton('Antennas Mean', wid) + pusb_mean.clicked.connect(self._plot) + pusb_mean.setObjectName('mean') + pusb_gains = QPushButton('Antennas Gains', wid) + pusb_gains.clicked.connect(self._plot) + pusb_gains.setObjectName('gains') + pusb_dorb = QPushButton('Orbit Variation', wid) + pusb_dorb.setObjectName('dorb') + pusb_dorb.clicked.connect(self._plot) + pusb_idcs = QPushButton('Cycle Indices', wid) + pusb_idcs.setObjectName('idcs') + pusb_idcs.clicked.connect(self._plot) + lay.addWidget(pusb_mean, 1, 1) + lay.addWidget(pusb_gains, 1, 3) + lay.addWidget(pusb_dorb, 2, 1) + lay.addWidget(pusb_idcs, 2, 3) + lay.setRowStretch(0, 2) + lay.setRowStretch(3, 2) + lay.setColumnStretch(0, 2) + lay.setColumnStretch(2, 2) + lay.setColumnStretch(4, 2) + return wid
+ + +
+[docs] + def get_update_reforb_widget(self, parent): + """.""" + wid = QGroupBox('Update Orbits', parent) + lay = QGridLayout(wid) + wid.setLayout(lay) + + self.cb_orb = QComboBox(wid) + self.cb_orb.addItems(['bba_orb', 'ref_orb', 'servconf']) + self.cb_orb.currentTextChanged.connect(self._load_orbit) + pb_orb = QPushButton( + qta.icon('ei.arrow-down'), 'Save New Orbit', wid) + pb_orb.clicked.connect(self._save_orbit) + + lay.addWidget( + QLabel('Config to change: '), 0, 0, alignment=Qt.AlignCenter) + lay.addWidget(self.cb_orb, 0, 1) + lay.addWidget(pb_orb, 0, 3) + lay.setColumnStretch(2, 2) + lay.setRowStretch(1, 2) + return wid
+ + + def _start_activity(self): + """.""" + if self._thread.is_alive(): + _log.error('There is another measurement happening.') + return + if self.sender().objectName().startswith('meas'): + self._thread = Thread(target=self._do_meas, daemon=True) + elif self.sender().objectName().startswith('check'): + self._thread = Thread(target=self._do_check, daemon=True) + else: + self._thread = Thread(target=self._process_data, daemon=True) + self._thread.start() + + def _do_check(self): + try: + self.bpms_eq.acquire_data_for_checking() + except Exception as err: + _log.error(str(err)) + return + + def _do_meas(self): + self.bpms_eq.acq_strategy = int(self.cb_acqstrat.currentIndex()) + self.bpms_eq.acq_nrpoints = int(self.sp_nrpoints.value()) + self.bpms_eq.acq_inverse_reduced_gain = float( + self.sp_invredgain.value()) + self.bpms_eq.acq_timeout = float(self.sp_acqtimeout.value()) + + try: + self.bpms_eq.acquire_bpm_data() + except Exception as err: + _log.error(str(err)) + return + self._process_data() + + def _process_data(self): + _log.info('Processing data') + self.bpms_eq.proc_method = int(self.cb_procmeth.currentIndex()) + try: + self.bpms_eq.process_data() + except Exception as err: + _log.error('Problem processing data.') + _log.error(str(err)) + _log.info('Processing Done!') + + def _apply_new(self): + gains = self.bpms_eq.data.get('gains_new') + if gains is None: + _log.error('New gains not found.') + return + try: + self.bpms_eq.set_gains(gains) + except Exception as err: + _log.error(str(err)) + _log.info('New gains applied.') + + def _apply_old(self): + gains = self.bpms_eq.data.get('gains_init') + if gains is None: + _log.error('Initial gains not found.') + return + try: + self.bpms_eq.set_gains(gains) + except Exception as err: + _log.error(str(err)) + _log.info('Old gains applied.') + + def _save_data_to_file(self, _): + filename = QFileDialog.getSaveFileName( + caption='Define a File Name to Save Data', + directory=self._last_dir, + filter=self.EXT_FLT) + fname = filename[0] + if not fname: + return + self._last_dir, _ = _os.path.split(fname) + self.bpms_eq.save_data(fname, overwrite=True) + _log.info(f'File Saved ... {fname.split("/")[-1]}') + + def _load_data_from_file(self): + filename = QFileDialog.getOpenFileName( + caption='Select a Data File.', directory=self._last_dir, + filter=self.EXT_FLT) + fname = filename[0] + if not fname: + return + self._last_dir, _ = _os.path.split(fname) + self.bpms_eq.load_data(fname) + _log.info(f'File Loaded ... {fname.split("/")[-1]}') + self.cb_acqstrat.setCurrentIndex(self.bpms_eq.acq_strategy) + self.sp_nrpoints.setValue(self.bpms_eq.acq_nrpoints) + self.sp_invredgain.setValue(self.bpms_eq.acq_inverse_reduced_gain) + self.sp_acqtimeout.setValue(self.bpms_eq.acq_timeout) + self.cb_procmeth.setCurrentIndex(self.bpms_eq.proc_method) + + def _plot(self): + name = self.sender().objectName() + fig = None + if name.startswith('dorb'): + fig, axs = self.bpms_eq.plot_orbit_distortion() + winname = 'Orbit Variation' + elif name.startswith('gains'): + fig, axs = self.bpms_eq.plot_gains() + winname = 'Gains' + elif name.startswith('mean'): + fig, axs = self.bpms_eq.plot_antennas_mean() + winname = 'Antennas Mean' + elif name.startswith('idcs'): + fig, axs = self.bpms_eq.plot_semicycle_indices() + winname = 'Cycle Indices' + elif name.startswith('check'): + fig, axs = self.bpms_eq.plot_antennas_for_check() + winname = 'Check Equalization' + if fig is None: + _log.error('Error with plot.') + return + height = fig.get_figheight() + width = fig.get_figwidth() + wind = create_window_from_widget(MatplotlibWidget, winname) + obj = wind(self, figure=fig) + obj.resize(width*100, height*100) + obj.show() + + def _load_orbit(self, confname=None): + if confname is None: + confname = self.sender().currentText() + win = LoadConfigDialog('si_orbit', self) + if confname.startswith('servconf'): + confname, status = win.exec_() + if not status: + _log.warning('Loading aborted by user.') + return + self._orbits = win.client.get_config_value( + confname, config_type='si_orbit') + _log.info(f'Orbit configuration named {confname} was loaded.') + + def _save_orbit(self): + if self._orbits is None: + self._load_orbit(self.cb_orb.currentText()) + dorbx = self.bpms_eq.data.get('dorbx') + dorby = self.bpms_eq.data.get('dorby') + if dorbx is None: + _log.error('Must Acquire and process data first.') + return + data = dict() + data['x'] = self._orbits['x'] + dorbx + data['y'] = self._orbits['y'] + dorby + + win = SaveConfigDialog('si_orbit', self) + + def _save(confname): + try: + win.client.insert_config( + confname, data, config_type='si_orbit') + except (ConfigDBException, TypeError) as err: + _log.warning(str(err)) + QMessageBox.warning(self, 'Warning', str(err), QMessageBox.Ok) + + # win.configname.connect(_save) + confname, status = win.exec_() + if not status: + _log.warning('Saving aborted by user.') + return + _save(confname) + _log.info('Configuration saved.')
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_di_scraps/Scrap_monitor.html b/_modules/siriushla/si_di_scraps/Scrap_monitor.html new file mode 100644 index 000000000..093b6be64 --- /dev/null +++ b/_modules/siriushla/si_di_scraps/Scrap_monitor.html @@ -0,0 +1,280 @@ + + + + + + siriushla.si_di_scraps.Scrap_monitor — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_di_scraps.Scrap_monitor

+"""HLA SI Scrapers monitoring Window."""
+
+from qtpy.QtCore import QPoint
+from siriushla.widgets import SiriusConnectionSignal
+from siriushla.common.diff_ctrl import DiffCtrlDevMonitor, DiffCtrlView
+
+
+
+[docs] +class ScraperMonitoring(DiffCtrlDevMonitor): + """Scraper Monitor Widget.""" + + def _createConnectors(self): + """Create connectors to monitor device positions.""" + self._scrap_pospos = 0 + self.conn_scrap_pospos = SiriusConnectionSignal( + self.device.substitute(propty=self.pos_name+'SlitPos-RB')) + self.conn_scrap_pospos.new_value_signal[float].connect(self._setDevPos) + self._scrap_negpos = 0 + self.conn_scrap_negpos = SiriusConnectionSignal( + self.device.substitute(propty=self.neg_name+'SlitPos-RB')) + self.conn_scrap_negpos.new_value_signal[float].connect(self._setDevPos) + + def _setDevPos(self, new_value): + """Set Scraper Widget positions.""" + if self.pos_name in self.sender().address: + self._scrap_pospos = new_value + elif self.neg_name in self.sender().address: + self._scrap_negpos = new_value + self.updateDevWidget() + + def _setupControlWidgets(self): + """Setup control widgets channels/labels.""" + self.lb_descctrl1.setText(self.pos_label+' Pos.[mm]:') + self.lb_descctrl1.setStyleSheet( + 'min-width: 10.5em; max-width: 10.5em;') + self.sb_ctrl1.channel = \ + self.device.substitute(propty=self.pos_name+'SlitPos-SP') + self.lb_ctrl1.channel = \ + self.device.substitute(propty=self.pos_name+'SlitPos-RB') + self.lb_descctrl2.setText(self.neg_label+' Pos.[mm]:') + self.lb_descctrl2.setStyleSheet( + 'min-width: 10.5em; max-width: 10.5em;') + self.sb_ctrl2.channel = \ + self.device.substitute(propty=self.neg_name+'SlitPos-SP') + self.lb_ctrl2.channel = \ + self.device.substitute(propty=self.neg_name+'SlitPos-RB') + +
+[docs] + def updateDevWidget(self): + """Update Scraper illustration.""" + self.style().unpolish(self.dev_widget.widget_draw) + self.style().polish(self.dev_widget.widget_draw) + widget_w = self.dev_widget.widget_draw.width() + widget_h = self.dev_widget.widget_draw.height() + vacuum_chamber_d = 24 if self.orientation == 'H' else 9 # mm + + if self.orientation == 'H': + rect_h = widget_h*3/5 + rect_w = rect_h/2 + circle_d = rect_w + factor = circle_d/vacuum_chamber_d + xpos = widget_h/2 - self._scrap_pospos*factor + xneg = widget_h/2 - self._scrap_negpos*factor + left = round(xpos - rect_w) + right = round(xneg) + + self.dev_widget.PyDMDrawingRectangle_HLeft.resize(rect_w, rect_h) + self.dev_widget.PyDMDrawingRectangle_HLeft.move( + QPoint(left, (widget_h-rect_h)/2)) + self.dev_widget.PyDMDrawingRectangle_HRight.resize(rect_w, rect_h) + self.dev_widget.PyDMDrawingRectangle_HRight.move( + QPoint(right, (widget_h-rect_h)/2)) + + elif self.orientation == 'V': + rect_w = widget_h*3/5 + rect_h = rect_w/2 + circle_d = rect_h + factor = circle_d/vacuum_chamber_d + xpos = widget_h/2 - self._scrap_pospos*factor + xneg = widget_h/2 - self._scrap_negpos*factor + upp = round(xpos - rect_h) + down = round(xneg) + + self.dev_widget.PyDMDrawingRectangle_VUp.resize(rect_w, rect_h) + self.dev_widget.PyDMDrawingRectangle_VUp.move( + QPoint((widget_w-rect_w)/2, upp)) + self.dev_widget.PyDMDrawingRectangle_VDown.resize(rect_w, rect_h) + self.dev_widget.PyDMDrawingRectangle_VDown.move( + QPoint((widget_w-rect_w)/2, down)) + + self.dev_widget.PyDMDrawingCircle.resize(circle_d, circle_d) + self.dev_widget.PyDMDrawingCircle.move(QPoint( + (widget_w-circle_d)/2, (widget_h-circle_d)/2)) + + axis_w = self.dev_widget.axis.width() + axis_h = self.dev_widget.axis.height() + self.dev_widget.axis.move(QPoint((widget_w-axis_w), (widget_h-axis_h)))
+ + +
+[docs] + def channels(self): + """Return channels.""" + return [self.conn_scrap_pospos, self.conn_scrap_negpos]
+
+ + + +
+[docs] +class ScrapersView(DiffCtrlView): + """Scrapers View Widget.""" + + DEVICE_PREFIX = 'SI-01SA:DI-Scrap' + DEVICE_CLASS = ScraperMonitoring
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_id_control/apu.html b/_modules/siriushla/si_id_control/apu.html new file mode 100644 index 000000000..bc51436a4 --- /dev/null +++ b/_modules/siriushla/si_id_control/apu.html @@ -0,0 +1,665 @@ + + + + + + siriushla.si_id_control.apu — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_id_control.apu

+"""APU Control Module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QGroupBox, QGridLayout, QLabel, \
+    QHBoxLayout, QSizePolicy as QSzPlcy, QSpacerItem, QPushButton
+import qtawesome as qta
+from pydm.widgets import PyDMPushButton
+
+from siriushla.util import connect_window
+from siriushla.widgets import PyDMLed, SiriusLedAlert, \
+    SiriusLedState, PyDMLedMultiChannel, SiriusLabel, SiriusSpinbox
+
+from .base import IDCommonControlWindow, IDCommonDialog, \
+    IDCommonSummaryBase, IDCommonSummaryHeader, IDCommonSummaryWidget
+
+
+
+[docs] +class APUControlWindow(IDCommonControlWindow): + """APU Control Window.""" + + def _mainControlsWidget(self): + self._ld_kx = QLabel('Kx', self) + self._sb_kx = SiriusSpinbox( + self, self.dev_pref.substitute(propty='Kx-SP')) + self._lb_kx = SiriusLabel( + self, self.dev_pref.substitute(propty='Kx-Mon')) + + self._ld_phs = QLabel('Phase [mm]', self) + self._sb_phs = SiriusSpinbox( + self, self.dev_pref.substitute(propty='Phase-SP')) + self._lb_phs = SiriusLabel( + self, self.dev_pref.substitute(propty='Phase-Mon')) + + self._ld_phsspd = QLabel('Phase Speed [mm/s]', self) + self._sb_phsspd = SiriusSpinbox( + self, self.dev_pref.substitute(propty='PhaseSpeed-SP')) + self._lb_phsspd = SiriusLabel( + self, self.dev_pref.substitute(propty='PhaseSpeed-Mon')) + + self._ld_ismov = QLabel('Motion', self) + self._pb_stop = PyDMPushButton( + self, label='', icon=qta.icon('fa5s.stop')) + self._pb_stop.setToolTip('Stop all motion, lock all brakes.') + self._pb_stop.channel = self.dev_pref.substitute(propty='DevCtrl-Cmd') + self._pb_stop.pressValue = 1 # Stop + self._pb_stop.setObjectName('Stop') + self._pb_stop.setStyleSheet( + '#Stop{min-width:30px; max-width:30px; icon-size:25px;}') + self._pb_start = PyDMPushButton( + self, label='', icon=qta.icon('fa5s.play')) + self._pb_start.setToolTip( + 'Start automatic motion towards previously entered setpoint.') + self._pb_start.channel = self.dev_pref.substitute(propty='DevCtrl-Cmd') + self._pb_start.pressValue = 3 # Start + self._pb_start.setObjectName('Start') + self._pb_start.setStyleSheet( + '#Start{min-width:30px; max-width:30px; icon-size:25px;}') + self._led_ismov = SiriusLedState(self, self.dev_pref+':Moving-Mon') + self._led_motenbl = SiriusLedState( + self, self.dev_pref.substitute(propty='MotorsEnbld-Mon')) + hbox_motion = QHBoxLayout() + hbox_motion.setSpacing(15) + hbox_motion.addWidget(self._pb_stop) + hbox_motion.addWidget(self._pb_start) + hbox_motion.addWidget(self._led_ismov) + hbox_motion.addWidget(self._led_motenbl) + + gbox = QGroupBox('Main Controls', self) + lay = QGridLayout(gbox) + lay.addWidget(self._ld_kx, 0, 0) + lay.addWidget(self._sb_kx, 0, 1) + lay.addWidget(self._lb_kx, 0, 2) + lay.addWidget(self._ld_phs, 1, 0) + lay.addWidget(self._sb_phs, 1, 1) + lay.addWidget(self._lb_phs, 1, 2) + lay.addWidget(self._ld_phsspd, 2, 0) + lay.addWidget(self._sb_phsspd, 2, 1) + lay.addWidget(self._lb_phsspd, 2, 2) + lay.addItem( + QSpacerItem(1, 10, QSzPlcy.Ignored, QSzPlcy.Fixed), 3, 0) + lay.addWidget(self._ld_ismov, 4, 0) + lay.addLayout(hbox_motion, 4, 1, 1, 2) + gbox.setStyleSheet( + '.QLabel{qproperty-alignment: "AlignRight | AlignVCenter";}') + return gbox + + def _statusWidget(self): + self._ld_alarm = QLabel( + 'Alarms', self, alignment=Qt.AlignCenter) + self._led_alarm = SiriusLedAlert( + self, self.dev_pref.substitute(propty='Alarm-Mon')) + self._pb_alarmdetail = QPushButton( + qta.icon('fa5s.ellipsis-h'), '', self) + self._pb_alarmdetail.setObjectName('dtl') + self._pb_alarmdetail.setStyleSheet( + "#dtl{min-width:25px; max-width:25px; icon-size:20px;}") + connect_window( + self._pb_alarmdetail, APUAlarmDetails, self, + prefix=self._prefix, device=self._device) + + self._ld_intlk = QLabel( + 'Interlocks', self, alignment=Qt.AlignCenter) + self._led_intlkresume = PyDMLedMultiChannel( + self, {self.dev_pref.substitute(propty='IntlkInStop-Mon'): 0, + self.dev_pref.substitute(propty='IntlkInEOpnGap-Mon'): 0, + self.dev_pref.substitute(propty='IntlkOutPwrEnbld-Mon'): 1}) + self._pb_intlkdetail = QPushButton( + qta.icon('fa5s.ellipsis-h'), '', self) + self._pb_intlkdetail.setObjectName('dtl') + self._pb_intlkdetail.setStyleSheet( + "#dtl{min-width:25px; max-width:25px; icon-size:20px;}") + connect_window( + self._pb_intlkdetail, APUInterlockDetails, self, + prefix=self._prefix, device=self._device) + + self._ld_hwsys = QLabel( + 'Hardware\n&LowLevel', self, alignment=Qt.AlignCenter) + self._led_hwsysresume = PyDMLedMultiChannel( + self, + {self.dev_pref.substitute(propty='StateHw-Mon'): { + 'value': [0x4C, 0x3C], 'comp': 'in'}, + self.dev_pref.substitute(propty='State-Mon'): { + 'value': [1, 4], 'comp': 'in'}, + self.dev_pref.substitute(propty='IsOperational-Mon'): 1}) + self._led_hwsysresume.offColor = PyDMLed.Yellow + self._led_hwsysresume.onColor = PyDMLed.LightGreen + self._pb_hwsysdetail = QPushButton( + qta.icon('fa5s.ellipsis-h'), '', self) + self._pb_hwsysdetail.setObjectName('dtl') + self._pb_hwsysdetail.setStyleSheet( + "#dtl{min-width:25px; max-width:25px; icon-size:20px;}") + connect_window( + self._pb_hwsysdetail, APUHardLLDetails, self, + prefix=self._prefix, device=self._device) + + self._ld_reset = QLabel( + 'Reset', self, alignment=Qt.AlignCenter) + self._pb_reset = PyDMPushButton( + self, label='', icon=qta.icon('fa5s.sync')) + self._pb_reset.setToolTip('Reset active alarms.') + self._pb_reset.channel = self.dev_pref.substitute(propty='DevCtrl-Cmd') + self._pb_reset.pressValue = 2 # Reset + self._pb_reset.setObjectName('Reset') + self._pb_reset.setStyleSheet( + '#Reset{min-width:30px; max-width:30px; icon-size:25px;}') + + gbox_alrmintlk = QGroupBox('Status') + lay_alrmintlk = QGridLayout(gbox_alrmintlk) + lay_alrmintlk.addWidget(self._pb_alarmdetail, 0, 0) + lay_alrmintlk.addWidget(self._ld_alarm, 0, 1) + lay_alrmintlk.addWidget(self._led_alarm, 0, 2) + lay_alrmintlk.addWidget(self._pb_intlkdetail, 1, 0) + lay_alrmintlk.addWidget(self._ld_intlk, 1, 1) + lay_alrmintlk.addWidget(self._led_intlkresume, 1, 2) + lay_alrmintlk.addWidget(self._pb_hwsysdetail, 2, 0) + lay_alrmintlk.addWidget(self._ld_hwsys, 2, 1) + lay_alrmintlk.addWidget(self._led_hwsysresume, 2, 2) + lay_alrmintlk.addWidget(self._ld_reset, 3, 1) + lay_alrmintlk.addWidget(self._pb_reset, 3, 2) + return gbox_alrmintlk + + def _ctrlModeWidget(self): + self._led_ctrlmode = PyDMLed( + self, self.dev_pref.substitute(propty='IsRemote-Mon')) + self._led_ctrlmode.offColor = PyDMLed.Red + self._led_ctrlmode.onColor = PyDMLed.LightGreen + self._lb_ctrlmode = SiriusLabel( + self, self.dev_pref.substitute(propty='Interface-Mon')) + + gbox_ctrlmode = QGroupBox('Control Mode') + lay_ctrlmode = QHBoxLayout(gbox_ctrlmode) + lay_ctrlmode.setAlignment(Qt.AlignCenter) + lay_ctrlmode.addWidget(self._led_ctrlmode) + lay_ctrlmode.addWidget(self._lb_ctrlmode) + return gbox_ctrlmode + + def _auxCommandsWidget(self): + self._ld_speedlim = QLabel('Max Phase\nSpeed [mm/s]', self) + self._sb_speedlim = SiriusSpinbox( + self, self.dev_pref.substitute(propty='MaxPhaseSpeed-SP')) + self._sb_speedlim.setStyleSheet('max-width:4.5em;') + self._lb_speedlim = SiriusLabel( + self, self.dev_pref.substitute(propty='MaxPhaseSpeed-RB')) + + self._ld_homeaxis = QLabel('Do homing', self) + self._pb_home = PyDMPushButton( + self, label='', icon=qta.icon('mdi.keyboard-return')) + self._pb_home.setToolTip('Execute homing for selected axis.') + self._pb_home.channel = self.dev_pref.substitute(propty='DevCtrl-Cmd') + self._pb_home.pressValue = 10 # Home + self._pb_home.setObjectName('Home') + self._pb_home.setStyleSheet( + '#Home{min-width:30px; max-width:30px; icon-size:25px;}') + + self._ld_standby = QLabel('Enable Standby Mode', self) + self._pb_standby = PyDMPushButton( + self, label='', icon=qta.icon('mdi.alpha-a-box-outline')) + self._pb_standby.setToolTip( + 'Enable standby mode for automatic motion.') + self._pb_standby.channel = \ + self.dev_pref.substitute(propty='DevCtrl-Cmd') + self._pb_standby.pressValue = 5 # Standby + self._pb_standby.setObjectName('Standby') + self._pb_standby.setStyleSheet( + '#Standby{min-width:30px; max-width:30px; icon-size:25px;}') + + self._ld_lastcomm = QLabel('Last Command', self) + self._lb_lastcomm = SiriusLabel( + self, self.dev_pref.substitute(propty='LastDevCtrlCmd-Mon')) + + gbox = QGroupBox('Auxiliary Commands', self) + lay = QGridLayout(gbox) + lay.addWidget(self._ld_speedlim, 0, 0) + lay.addWidget(self._sb_speedlim, 0, 1) + lay.addWidget(self._lb_speedlim, 0, 2) + lay.addItem( + QSpacerItem(1, 10, QSzPlcy.Ignored, QSzPlcy.Fixed), 1, 0) + lay.addWidget(self._ld_homeaxis, 2, 0) + lay.addWidget(self._pb_home, 2, 1, 1, 2, alignment=Qt.AlignCenter) + lay.addWidget(self._ld_standby, 3, 0) + lay.addWidget(self._pb_standby, 3, 1, 1, 2, alignment=Qt.AlignCenter) + lay.addWidget(self._ld_lastcomm, 4, 0) + lay.addWidget(self._lb_lastcomm, 4, 1, 1, 2) + gbox.setStyleSheet( + '.QLabel{qproperty-alignment: "AlignRight | AlignVCenter";}') + return gbox
+ + + +
+[docs] +class APUAlarmDetails(IDCommonDialog): + """APU Alarm Details Dialog.""" + + def __init__(self, parent=None, prefix='', device=''): + super().__init__( + parent, prefix, device, title=device+' Alarm Details') + + def _setupUi(self): + self._ld_almaxctrl = QLabel('<h4>Axis Control</h4>', self) + + self._ld_almflag = QLabel('Flag', self) + self._lb_almflag = SiriusLabel( + self, self.dev_pref.substitute(propty='AlrmPhase-Mon')) + + self._ld_almeid = QLabel('Error ID Code', self) + self._lb_almeid = SiriusLabel( + self, self.dev_pref.substitute(propty='AlrmPhaseErrID-Mon')) + + self._ld_almsttdw = QLabel('State DWord', self) + self._lb_almsttdw = SiriusLabel( + self, self.dev_pref.substitute(propty='AlrmPhaseSttDW-Mon')) + + self._ld_almsttcode = QLabel('State Code', self) + self._lb_almsttcode = SiriusLabel( + self, self.dev_pref.substitute(propty='AlrmPhaseStt-Mon')) + + self._ld_almrack = QLabel('<h4>Rack</h4>', self) + + self._ld_almestop = QLabel('E-Stop button pressed', self) + self._led_almestop = PyDMLed( + self, self.dev_pref.substitute(propty='AlrmRackEStop-Mon')) + self._led_almestop.offColor = PyDMLed.LightGreen + self._led_almestop.onColor = PyDMLed.Red + + self._ld_almkillpres = QLabel('Kill switch pressed', self) + self._led_almkillpres = PyDMLed( + self, self.dev_pref.substitute(propty='AlrmRackKill-Mon')) + self._led_almkillpres.offColor = PyDMLed.LightGreen + self._led_almkillpres.onColor = PyDMLed.Red + + self._ld_almkilldsbl = QLabel('Kill switches disabled', self) + self._led_almkilldsbl = PyDMLed( + self, self.dev_pref.substitute(propty='AlrmRackKillDsbld-Mon')) + self._led_almkilldsbl.offColor = PyDMLed.LightGreen + self._led_almkilldsbl.onColor = PyDMLed.Red + + self._ld_almpwrdsbl = QLabel('Power disabled', self) + self._led_almpwrdsbl = PyDMLed( + self, self.dev_pref.substitute(propty='AlrmRackPwrDsbld-Mon')) + self._led_almpwrdsbl.offColor = PyDMLed.LightGreen + self._led_almpwrdsbl.onColor = PyDMLed.Red + + lay = QGridLayout(self) + lay.addWidget( + QLabel('<h4>Alarms</h4>', self, + alignment=Qt.AlignCenter), 0, 0, 1, 2) + lay.addWidget(self._ld_almaxctrl, 1, 0, 1, 2) + lay.addWidget(self._ld_almflag, 2, 0) + lay.addWidget(self._lb_almflag, 2, 1) + lay.addWidget(self._ld_almeid, 3, 0) + lay.addWidget(self._lb_almeid, 3, 1) + lay.addWidget(self._ld_almsttdw, 4, 0) + lay.addWidget(self._lb_almsttdw, 4, 1) + lay.addWidget(self._ld_almsttcode, 5, 0) + lay.addWidget(self._lb_almsttcode, 5, 1) + lay.addItem(QSpacerItem(1, 10, QSzPlcy.Ignored, QSzPlcy.Fixed), 6, 0) + lay.addWidget(self._ld_almrack, 7, 0, 1, 2) + lay.addWidget(self._ld_almestop, 8, 0) + lay.addWidget(self._led_almestop, 8, 1) + lay.addWidget(self._ld_almkillpres, 9, 0) + lay.addWidget(self._led_almkillpres, 9, 1) + lay.addWidget(self._ld_almkilldsbl, 10, 0) + lay.addWidget(self._led_almkilldsbl, 10, 1) + lay.addWidget(self._ld_almpwrdsbl, 11, 0) + lay.addWidget(self._led_almpwrdsbl, 11, 1)
+ + + +
+[docs] +class APUInterlockDetails(IDCommonDialog): + """APU Interlock Details Dialog.""" + + def __init__(self, parent=None, prefix='', device=''): + super().__init__( + parent, prefix, device, title=device+' Interlock Details') + + def _setupUi(self): + self._ld_ilkistop = QLabel('Stop\n(Input)', self) + self._led_ilkistop = PyDMLed( + self, self.dev_pref.substitute(propty='IntlkInStop-Mon')) + self._led_ilkistop.offColor = PyDMLed.LightGreen + self._led_ilkistop.onColor = PyDMLed.Red + self._lb_ilkistop = SiriusLabel( + self, self.dev_pref.substitute(propty='IntlkInStop-Mon')) + hbox_ilkistop = QHBoxLayout() + hbox_ilkistop.addWidget(self._led_ilkistop) + hbox_ilkistop.addWidget(self._lb_ilkistop) + + self._ld_ilkieopn = QLabel('Emergency Open Gap\n(Input)', self) + self._led_ilkieopn = PyDMLed( + self, self.dev_pref.substitute(propty='IntlkInEOpnGap-Mon')) + self._led_ilkieopn.offColor = PyDMLed.LightGreen + self._led_ilkieopn.onColor = PyDMLed.Red + self._lb_ilkieopn = SiriusLabel( + self, self.dev_pref.substitute(propty='IntlkInEOpnGap-Mon')) + hbox_eopngap = QHBoxLayout() + hbox_eopngap.addWidget(self._led_ilkieopn) + hbox_eopngap.addWidget(self._lb_ilkieopn) + + self._ld_ilkogapopn = QLabel('Gap Opened\n(Output)', self) + self._lb_ilkogapopn = SiriusLabel( + self, self.dev_pref.substitute(propty='IntlkOutGapStt-Mon')) + self._lb_ilkogapopn.setAlignment(Qt.AlignCenter) + + self._ld_ilkopwr = QLabel('Power Enabled\n(Output)', self) + self._led_ilkopwr = PyDMLed( + self, self.dev_pref.substitute(propty='IntlkOutPwrEnbld-Mon')) + self._led_ilkopwr.offColor = PyDMLed.Red + self._led_ilkopwr.onColor = PyDMLed.LightGreen + + lay = QGridLayout(self) + lay.addWidget( + QLabel('<h4>Interlock status</h4>', self, + alignment=Qt.AlignCenter), 0, 0, 1, 2) + lay.addWidget(self._ld_ilkistop, 1, 0) + lay.addLayout(hbox_ilkistop, 1, 1) + lay.addWidget(self._ld_ilkieopn, 2, 0) + lay.addLayout(hbox_eopngap, 2, 1) + lay.addWidget(self._ld_ilkogapopn, 3, 0) + lay.addWidget(self._lb_ilkogapopn, 3, 1) + lay.addWidget(self._ld_ilkopwr, 4, 0) + lay.addWidget(self._led_ilkopwr, 4, 1)
+ + + +
+[docs] +class APUHardLLDetails(IDCommonDialog): + """APU Hardware and LowLevel Details Dialog.""" + + def __init__(self, parent=None, prefix='', device=''): + super().__init__( + parent, prefix, device, + title=device+' Hardware and LowLevel Details') + + def _setupUi(self): + self._ld_stthw = QLabel('Hardware state', self) + self._led_stthw = PyDMLedMultiChannel( + self, channels2values={ + self.dev_pref.substitute(propty='StateHw-Mon'): + {'value': [0x4C, 0x3C], 'comp': 'in'}}) # in [Op, Ready] + self._led_stthw.offColor = PyDMLed.Yellow + self._led_stthw.onColor = PyDMLed.LightGreen + self._led_stthw.setObjectName('led') + self._led_stthw.setStyleSheet('#led{max-width: 1.29em;}') + self._led_stthw.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Preferred) + self._lb_stthw = SiriusLabel( + self, self.dev_pref.substitute(propty='StateHw-Mon')) + + self._ld_sttsys = QLabel('System state', self) + self._led_sttsys = PyDMLedMultiChannel( + self, channels2values={ + self.dev_pref.substitute(propty='State-Mon'): + {'value': [1, 4], 'comp': 'in'}}) # in [Op, Standby] + self._led_sttsys.offColor = PyDMLed.Yellow + self._led_sttsys.onColor = PyDMLed.LightGreen + self._led_sttsys.setObjectName('led') + self._led_sttsys.setStyleSheet('#led{max-width: 1.29em;}') + self._led_sttsys.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Preferred) + self._lb_sttsys = SiriusLabel( + self, self.dev_pref.substitute(propty='State-Mon')) + + self._ld_isopr = QLabel('Is operational', self) + self._led_isopr = PyDMLed( + self, self.dev_pref.substitute(propty='IsOperational-Mon')) + self._led_isopr.offColor = PyDMLed.Red + self._led_isopr.onColor = PyDMLed.LightGreen + self._led_isopr.setStyleSheet('max-width: 1.29em;') + self._led_isopr.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Preferred) + + lay_hwsys = QGridLayout(self) + lay_hwsys.addWidget( + QLabel('<h4>Hardware&&LowLevel</h4>', self, + alignment=Qt.AlignCenter), 0, 0, 1, 3) + lay_hwsys.addWidget(self._ld_stthw, 2, 0) + lay_hwsys.addWidget(self._led_stthw, 2, 1) + lay_hwsys.addWidget(self._lb_stthw, 2, 2) + lay_hwsys.addWidget(self._ld_sttsys, 3, 0) + lay_hwsys.addWidget(self._led_sttsys, 3, 1) + lay_hwsys.addWidget(self._lb_sttsys, 3, 2) + lay_hwsys.addWidget(self._ld_isopr, 4, 0) + lay_hwsys.addWidget(self._led_isopr, 4, 1)
+ + + +
+[docs] +class APUSummaryBase(IDCommonSummaryBase): + """APU Summary Base Widget.""" + + MODEL_WIDTHS = ( + ('Alarms', 4), + ('Phase', 6), + ('Phase Speed', 6), + ('Start', 4), + ('Stop', 4), + )
+ + + +
+[docs] +class APUSummaryHeader(IDCommonSummaryHeader, APUSummaryBase): + """APU Summary Header."""
+ + + +
+[docs] +class APUSummaryWidget(IDCommonSummaryWidget, APUSummaryBase): + """APU Summary Widget.""" + + def _get_widgets(self, prop): + wids, orientation = super()._get_widgets(prop) + if not wids: + orientation = 'v' + if prop == 'Alarms': + led = PyDMLedMultiChannel( + self, + {self.dev_pref.substitute(propty='Alarm-Mon'): 0, + self.dev_pref.substitute(propty='IntlkInStop-Mon'): 0, + self.dev_pref.substitute(propty='IntlkInEOpnGap-Mon'): 0, + self.dev_pref.substitute(propty='IntlkOutPwrEnbld-Mon'): 1, + self.dev_pref.substitute(propty='IsOperational-Mon'): 1}) + wids.append(led) + elif prop == 'Phase': + spb = SiriusSpinbox( + self, self.dev_pref.substitute(propty='Phase-SP')) + wids.append(spb) + lbl = SiriusLabel( + self, self.dev_pref.substitute(propty='Phase-Mon')) + wids.append(lbl) + elif prop == 'Phase Speed': + spb = SiriusSpinbox( + self, self.dev_pref.substitute(propty='PhaseSpeed-SP')) + wids.append(spb) + lbl = SiriusLabel( + self, self.dev_pref.substitute(propty='PhaseSpeed-Mon')) + wids.append(lbl) + elif prop == 'Start': + btn = PyDMPushButton(self, label='', icon=qta.icon('fa5s.play')) + btn.setToolTip( + 'Start automatic motion towards previously entered setpoint.') + btn.channel = self.dev_pref.substitute(propty='DevCtrl-Cmd') + btn.pressValue = 3 # Start + btn.setObjectName('Start') + btn.setStyleSheet( + '#Start{min-width:30px; max-width:30px; icon-size:25px;}') + wids.append(btn) + elif prop == 'Stop': + btn = PyDMPushButton(self, label='', icon=qta.icon('fa5s.stop')) + btn.setToolTip('Stop all motion, lock all brakes.') + btn.channel = self.dev_pref.substitute(propty='DevCtrl-Cmd') + btn.pressValue = 1 # Stop + btn.setObjectName('Stop') + btn.setStyleSheet( + '#Stop{min-width:30px; max-width:30px; icon-size:25px;}') + wids.append(btn) + return wids, orientation
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_id_control/base.html b/_modules/siriushla/si_id_control/base.html new file mode 100644 index 000000000..86e544690 --- /dev/null +++ b/_modules/siriushla/si_id_control/base.html @@ -0,0 +1,420 @@ + + + + + + siriushla.si_id_control.base — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_id_control.base

+"""ID Common classes module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGroupBox, QGridLayout, QLabel, \
+    QHBoxLayout, QSizePolicy as QSzPlcy, QPushButton, QVBoxLayout
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName as _PVName
+from siriuspy.search import IDSearch
+
+from siriushla.util import connect_newprocess
+from siriushla.widgets import SiriusMainWindow, SiriusLedState, \
+    PyDMStateButton, SiriusDialog
+
+from .util import get_id_icon
+
+
+
+[docs] +class IDCommonControlWindow(SiriusMainWindow): + """ID Common Control Window.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + self._prefix = prefix + self._device = _PVName(device) + self._beamline = IDSearch.conv_idname_2_beamline(self._device) + self.dev_pref = self._device.substitute(prefix=prefix) + self.setWindowTitle(device+' Control Window - '+self._beamline) + self.setObjectName('IDApp') + self.setWindowIcon(get_id_icon()) + self._setupUi() + + def _setupUi(self): + self._label_title = QLabel( + '<h3>'+self._device+' Control - '+self._beamline+'</h3 >', self, + alignment=Qt.AlignCenter) + self._label_title.setStyleSheet('max-height:1.29em;') + + vlay1 = QVBoxLayout() + vlay1.addWidget(self._mainControlsWidget()) + try: + aux_cmds = self._auxCommandsWidget() + vlay1.addWidget(aux_cmds) + except NotImplementedError: + pass + + vlay2 = QVBoxLayout() + try: + ctrl_mode = self._ctrlModeWidget() + vlay2.addWidget(ctrl_mode) + except NotImplementedError: + pass + vlay2.addWidget(self._beamLinesCtrlWidget()) + try: + status = self._statusWidget() + vlay2.addWidget(status) + except NotImplementedError: + pass + + cwid = QWidget() + self.setCentralWidget(cwid) + lay = QGridLayout(cwid) + lay.addWidget(self._label_title, 0, 0, 1, 2) + lay.addLayout(vlay1, 1, 0) + lay.addLayout(vlay2, 1, 1) + + try: + ffsett = self._ffSettingsWidget() + lay.addWidget(ffsett, 2, 0, 1, 2) + except NotImplementedError: + pass + + def _mainControlsWidget(self): + raise NotImplementedError + + def _statusWidget(self): + raise NotImplementedError + + def _ctrlModeWidget(self): + raise NotImplementedError + + def _beamLinesCtrlWidget(self): + self._ld_blinesenbl = QLabel('Enable', self) + self._sb_blinesenbl = PyDMStateButton( + self, self.dev_pref.substitute(propty='BeamLineCtrlEnbl-Sel')) + self._led_blinesenbl = SiriusLedState( + self, self.dev_pref.substitute(propty='BeamLineCtrlEnbl-Sts')) + self._ld_blinesmon = QLabel('Status', self) + self._led_blinesmon = SiriusLedState( + self, self.dev_pref.substitute(propty='BeamLineCtrl-Mon')) + + gbox_blines = QGroupBox('Beam Lines Control', self) + lay_blines = QGridLayout(gbox_blines) + lay_blines.addWidget(self._ld_blinesenbl, 0, 0) + lay_blines.addWidget(self._sb_blinesenbl, 0, 1) + lay_blines.addWidget(self._led_blinesenbl, 0, 2) + lay_blines.addWidget(self._ld_blinesmon, 1, 0) + lay_blines.addWidget(self._led_blinesmon, 1, 1, 1, 2) + return gbox_blines + + def _auxCommandsWidget(self): + raise NotImplementedError + + def _ffSettingsWidget(self): + raise NotImplementedError
+ + + +
+[docs] +class IDCommonDialog(SiriusDialog): + """ID Common Auxiliary Dialog.""" + + def __init__(self, parent=None, prefix='', device='', title=''): + super().__init__(parent) + self._prefix = prefix + self._device = _PVName(device) + self.dev_pref = self._device.substitute(prefix=prefix) + self.setObjectName('IDApp') + self.setWindowTitle(title) + self._setupUi() + + def _setupUi(self): + raise NotImplementedError
+ + + +
+[docs] +class IDCommonSummaryBase(QWidget): + """ID Common Summary Widget.""" + + MODEL_WIDTHS = () + + def __init__(self, parent=None): + """Init.""" + super().__init__(parent) + self.setObjectName('IDApp') + self.prop2width = ( + ('Beamline', 9), + ('Device', 9), + ) + self.MODEL_WIDTHS + ( + ('Moving', 4), + ('BeamLine Enable', 6), + ('Beamline Control', 4), + )
+ + + +
+[docs] +class IDCommonSummaryHeader(IDCommonSummaryBase): + """ID Common Summary Header.""" + + def __init__(self, parent=None): + """Init.""" + super().__init__(parent) + self._setupUi() + + def _setupUi(self): + layout = QHBoxLayout(self) + for name, size in self.prop2width: + text = name.replace(' ', '\n') + label = QLabel(text, self, alignment=Qt.AlignCenter) + label.setStyleSheet( + 'min-width:{0}em; max-width:{0}em;' + 'font-weight:bold;'.format(str(size))) + label.setSizePolicy(QSzPlcy.Fixed, QSzPlcy.Preferred) + layout.addWidget(label)
+ + + +
+[docs] +class IDCommonSummaryWidget(IDCommonSummaryBase): + """ID Common Summary Widget.""" + + def __init__(self, parent=None, prefix=_vaca_prefix, device=''): + """Init.""" + super().__init__(parent) + self._prefix = prefix + self._device = _PVName(device) + self._beamline = IDSearch.conv_idname_2_beamline(self._device) + self.dev_pref = self._device.substitute(prefix=prefix) + self._setupUi() + + def _get_widgets(self, prop): + wids = list() + orientation = 'v' + if prop == 'Beamline': + lbl = QLabel( + '<h4>'+self._beamline+'</h4>', self, alignment=Qt.AlignCenter) + wids.append(lbl) + elif prop == 'Device': + btn = QPushButton(self._device, self) + connect_newprocess( + btn, ['sirius-hla-si-id-control.py', '-dev', self._device]) + wids.append(btn) + elif prop == 'Moving': + led = SiriusLedState( + self, self.dev_pref.substitute(propty='Moving-Mon')) + wids.append(led) + elif prop == 'BeamLine Enable': + self._sb_blenbl = PyDMStateButton( + self, self.dev_pref.substitute(propty='BeamLineCtrlEnbl-Sel')) + wids.append(self._sb_blenbl) + led = SiriusLedState( + self, self.dev_pref.substitute(propty='BeamLineCtrlEnbl-Sts')) + wids.append(led) + orientation = 'h' + elif prop == 'Beamline Control': + led = SiriusLedState( + self, self.dev_pref.substitute(propty='BeamLineCtrl-Mon')) + wids.append(led) + return wids, orientation + + def _setupUi(self): + layout = QHBoxLayout(self) + for prop, width in self.prop2width: + objname = prop.replace(' ', '') + items, orientation = self._get_widgets(prop) + + widget = QWidget(self) + lay = QVBoxLayout() if orientation == 'v' else QHBoxLayout() + lay.setContentsMargins(0, 0, 0, 0) + lay.setAlignment(Qt.AlignCenter) + lay.setSpacing(0) + widget.setLayout(lay) + + for item in items: + lay.addWidget(item) + + widget.setObjectName(objname) + widget.setStyleSheet( + '#{0}{{min-width:{1}em; max-width:{1}em;}}'.format( + objname, str(width))) + layout.addWidget(widget) + +
+[docs] + def enable_beamline_control(self): + """Enable beamline control.""" + if self._sb_blenbl.isEnabled(): + if not self._sb_blenbl.value: + self._sb_blenbl.send_value()
+ + +
+[docs] + def disable_beamline_control(self): + """Disable beamline control.""" + if self._sb_blenbl.isEnabled(): + if self._sb_blenbl.value: + self._sb_blenbl.send_value()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_id_control/delta.html b/_modules/siriushla/si_id_control/delta.html new file mode 100644 index 000000000..d594ff554 --- /dev/null +++ b/_modules/siriushla/si_id_control/delta.html @@ -0,0 +1,596 @@ + + + + + + siriushla.si_id_control.delta — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_id_control.delta

+"""DELTA Control Module."""
+
+from qtpy.QtCore import Qt, QSize
+from qtpy.QtWidgets import QGroupBox, QLabel, \
+    QHBoxLayout, QVBoxLayout, QWidget, QPushButton, \
+    QGridLayout, QSizePolicy as QSzPlcy
+import qtawesome as qta
+from pydm.widgets import PyDMPushButton
+
+from siriuspy.epics import PV
+
+from ..util import connect_newprocess, connect_window
+from ..widgets import SiriusLedAlert, SiriusLabel, SiriusSpinbox, \
+    PyDMLogLabel, PyDMLed, SiriusEnumComboBox, SiriusLineEdit
+from ..widgets.dialog import StatusDetailDialog
+
+from .base import IDCommonControlWindow, \
+    IDCommonSummaryBase, IDCommonSummaryHeader, IDCommonSummaryWidget
+
+
+
+[docs] +class DELTAControlWindowUtils(): + """.""" + + STATUS_PVS = { + "Alarms": ( + "Alarm-Mon", "AlarmBits-Mon", "AlarmLabels-Cte" + ), + "Interlock": ( + "Intlk-Mon", "IntlkBits-Mon", "IntlkLabels-Cte" + ), + "Is Operational": "IsOperational-Mon", + "PLC State": "PLCState-Mon", + "Sw": { + "Killed": "KillSw-Mon", + "Limit": "LimSw-Mon" + }, + "Logs": { + "IOC Log": "Log-Mon", + "Sequencer State Machine Log": "StateMachineLog-Mon" + } + } + + MAIN_CONTROL_PVS = { + "KParam": { + "SP": "KParam-SP", + "RB": "KParam-RB", + "Mon": "KParam-Mon" + }, + "KParam Speed": { + "SP": "KParamVelo-SP", + "RB": "KParamVelo-RB", + }, + "Change KParam": { + "pvname": "KParamChange-Cmd", + "icon": "fa5s.play" + }, + "PParam": { + "SP": "PParam-SP", + "RB": "PParam-RB", + "Mon": "PParam-Mon" + }, + "PParam Speed": { + "SP": "PParamVelo-SP", + "RB": "PParamVelo-RB", + }, + "Change PParam": { + "pvname": "PParamChange-Cmd", + "icon": "fa5s.play" + }, + "Polarization": { + "SP": "Pol-Sel", + "RB": "Pol-Sts", + "Mon": "Pol-Mon" + }, + "Change Polarization": { + "pvname": "PolChange-Cmd", + "icon": "fa5s.play" + }, + "Moving": "Moving-Mon", + "Motors Enabled": "MotorsEnbld-Mon", + "Abort": { + "pvname": "Abort-Cmd", + "icon": "fa5s.stop" + } + } + + AUX_CONTROL_PVS = { + "Max. Speed": { + "SP": "MaxVelo-SP", + "RB": "MaxVelo-RB", + }, + "Max. Acc.": { + "SP": "MaxAcc-SP", + "RB": "MaxAcc-RB", + }, + "Header": ( + "KParam", "PParam" + ), + "Acceleration": ( + "KParamAcc-SP", "KParamAcc-RB", + "PParamAcc-SP", "PParamAcc-RB" + ), + "Tolerance": ( + "PosTol-SP", "PosTol-RB", + "PolTol-SP", "PolTol-RB" + ), + "Start Parking": { + "pvname": "StartParking-Cmd", + "icon": "fa5s.parking" + } + }
+ + + +
+[docs] +class DELTAControlWindow(IDCommonControlWindow, DELTAControlWindowUtils): + """DELTA Control Window.""" + + def _mainControlsWidget(self): + group = QGroupBox('Main Controls') + lay = QGridLayout() + group.setLayout(lay) + + row = 0 + for title, pv_info in self.MAIN_CONTROL_PVS.items(): + label = QLabel( + title, self, alignment=Qt.AlignRight | Qt.AlignVCenter) + label.setFixedWidth(150) + lay.addWidget(label, row, 0) + + if title in ("Moving", "Motors Enabled"): + self._createMotion(pv_info, lay, row) + elif title in ["KParam", "PParam", "KParam Speed", "PParam Speed"]: + self._createParam(pv_info, lay, row) + elif title == "Polarization": + self._createPolarization(pv_info, lay, row) + elif isinstance(pv_info, str): + pvname = self.dev_pref.substitute(propty=pv_info) + lbl = SiriusLabel(self, init_channel=pvname) + lbl.setAlignment(Qt.AlignLeft | Qt.AlignVCenter) + lbl.setMinimumWidth(125) + lbl.showUnits = True + lbl.setMaximumHeight(40) + lay.addWidget(lbl, row, 1, 1, 2) + else: + self._createIconBtns(pv_info, lay, row) + row += 1 + + return group + + def _statusWidget(self): + return self._createStatusGroup("Status", self.STATUS_PVS) + + def _auxCommandsWidget(self): + group = QGroupBox('Auxiliary Controls') + lay = QGridLayout() + group.setLayout(lay) + + row = 0 + for title, pv_info in self.AUX_CONTROL_PVS.items(): + if "Header" not in title: + label = QLabel( + title, self, alignment=Qt.AlignRight | Qt.AlignVCenter) + lay.addWidget(label, row, 0) + + if title in ["Max. Speed", "Max. Acc."]: + self._createParam(pv_info, lay, row) + elif title in ["Abort", "Start Parking"]: + self._createIconBtns(pv_info, lay, row) + elif "Header" in title: + self._createHeaders(pv_info, lay, row) + else: + self._createAccTol(pv_info, lay, row) + row += 1 + + return group + + def _ctrlModeWidget(self): + gbox_ctrlmode = QGroupBox('Control Mode') + lay_ctrlmode = QHBoxLayout(gbox_ctrlmode) + lay_ctrlmode.setAlignment(Qt.AlignCenter) + + label = QLabel("Is Remote") + lay_ctrlmode.addWidget(label, alignment=Qt.AlignRight) + + self._led_ctrlmode = PyDMLed( + self, self.dev_pref.substitute(propty='IsRemote-Mon')) + self._led_ctrlmode.offColor = PyDMLed.Red + self._led_ctrlmode.onColor = PyDMLed.LightGreen + lay_ctrlmode.addWidget(self._led_ctrlmode, alignment=Qt.AlignLeft) + + return gbox_ctrlmode + + def _ffSettingsWidget(self): + but = QPushButton('Feedforward Settings', self) + connect_newprocess( + but, ['sirius-hla-si-ap-idff.py', self._device]) + return but + + # --- auxiliary methods --- + + def _createParam(self, pv_info, lay, row): + pvname = self.dev_pref.substitute(propty=pv_info["SP"]) + cb = SiriusLineEdit(self, init_channel=pvname) + lay.addWidget(cb, row, 1, 1, 1) + lay.setContentsMargins(3, 3, 3, 3) + + col = 2 + for key in ["RB", "Mon"]: + if key not in pv_info: + continue + pvname = self.dev_pref.substitute(propty=pv_info[key]) + lbl = SiriusLabel(self, init_channel=pvname, keep_unit=True) + lbl.setMinimumWidth(125) + lbl.showUnits = True + lbl.setAlignment(Qt.AlignCenter) + lay.addWidget(lbl, row, col, 1, 1) + col += 1 + + def _createMotion(self, pv_info, lay, row): + pvname = self.dev_pref.substitute(propty=pv_info) + led = PyDMLed(self, init_channel=pvname) + led.setMaximumWidth(50) + lay.addWidget(led, row, 1, 1, 1) + + def _createPolarization(self, pv_info, lay, row): + + pvname = self.dev_pref.substitute(propty=pv_info["SP"]) + cb = SiriusEnumComboBox(self, init_channel=pvname) + cb.setMinimumWidth(50) + lay.addWidget(cb, row, 1, 1, 1) + lay.setContentsMargins(0, 0, 0, 0) + + col = 2 + for key in ["RB", "Mon"]: + pvname = self.dev_pref.substitute(propty=pv_info[key]) + lbl = SiriusLabel(self, init_channel=pvname) + lbl.setMinimumWidth(125) + lbl.showUnits = True + lbl.setAlignment(Qt.AlignCenter) + lay.addWidget(lbl, row, col, 1, 1) + col += 1 + + def _createDetailedLedBtn(self, pv_tuple): + + btn = QPushButton('', self) + btn.setIcon(qta.icon('fa5s.list-ul')) + btn.setObjectName('sts') + btn.setStyleSheet( + '#sts{min-width:25px; max-width:25px; icon-size:20px;}') + pvname = self.dev_pref.substitute(propty=pv_tuple[0]) + pvname_labels = self.dev_pref.substitute(propty=pv_tuple[1]) + + try: + pv = PV(pvname_labels) + pv.wait_for_connection(timeout=5) + labels = pv.get() + connect_window( + btn, StatusDetailDialog, self, pvname=pvname, + labels=list(labels), section="ID") + except: + btn.setEnabled(False) + return btn + + def _createStatusWidget(self, title, pv_suffix): + pv_tuple = tuple() + wid = QWidget() + lay = QHBoxLayout() + lay.setContentsMargins(0, 0, 0, 0) + wid.setLayout(lay) + + label = QLabel(title, self, alignment=Qt.AlignRight | Qt.AlignVCenter) + lay.addWidget(label) + + if isinstance(pv_suffix, tuple): + pv_tuple = (pv_suffix[1], pv_suffix[2]) + pv_suffix = pv_suffix[0] + + pvname = self.dev_pref.substitute(propty=pv_suffix) + if 'PLC State' in title: + led = SiriusLabel(self, pvname) + else: + led = SiriusLedAlert(init_channel=pvname) + lay.addWidget(led, alignment=Qt.AlignLeft) + + if pv_tuple: + detailed_btn = self._createDetailedLedBtn(pv_tuple) + lay.addWidget(detailed_btn, alignment=Qt.AlignLeft) + + return wid + + def _createLogWidget(self, title, pv_suffix): + wid = QWidget() + lay = QVBoxLayout() + lay.setContentsMargins(0, 0, 0, 0) + wid.setLayout(lay) + + label = QLabel(title, self) + lay.addWidget(label) + + pvname = self.dev_pref.substitute(propty=pv_suffix) + log = PyDMLogLabel(init_channel=pvname) + lay.addWidget(log) + + return wid + + def _createStatusGroup(self, title, pvs): + group = QGroupBox() + lay = QVBoxLayout() + group.setLayout(lay) + group.setTitle(title) + + pos = [0, 0] + for title, pv_info in pvs.items(): + if isinstance(pv_info, dict): + widget = self._createStatusGroup(title, pv_info) + else: + if "Log" in title: + widget = self._createLogWidget(title, pv_info) + else: + widget = self._createStatusWidget(title, pv_info) + lay.addWidget(widget) + pos[1] += 1 + + return group + + def _createIconBtns(self, pv_info, lay, row): + btn = PyDMPushButton(self, label='', icon=qta.icon(pv_info["icon"])) + btn.channel = self.dev_pref.substitute(propty=pv_info["pvname"]) + btn.pressValue = 1 + btn.setIconSize(QSize(20, 20)) + btn.setMaximumWidth(25) + btn.setStyleSheet( + '#Start{min-width:30px; max-width:30px; icon-size:25px;}') + lay.addWidget(btn, row, 1, 1, 4) + + def _createHeaders(self, pv_info, lay, row): + col = 1 + for header_lbl in pv_info: + lbl = QLabel(header_lbl, self, alignment=Qt.AlignCenter) + lbl.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) + lay.addWidget(lbl, row, col, 1, 2) + col += 2 + + def _createAccTol(self, pv_info, lay, row): + col = 1 + for enum in range(0, 2): + pvname = self.dev_pref.substitute(propty=pv_info[enum*2]) + edit = SiriusLineEdit(self, init_channel=pvname) + lay.addWidget(edit, row, col, 1, 1) + + pvname = self.dev_pref.substitute(propty=pv_info[(enum*2)+1]) + lbl = SiriusLabel(self, init_channel=pvname, keep_unit=True) + lbl.showUnits = True + lbl.setAlignment(Qt.AlignCenter) + lay.addWidget(lbl, row, col+1, 1, 1) + col += 2
+ + + +
+[docs] +class DELTASummaryBase(IDCommonSummaryBase): + """DELTA Summary Base Widget.""" + + MODEL_WIDTHS = ( + ('Alarms', 4), + ('Interlock', 4), + ('KParam', 6), + ('KParam Speed', 6), + ('Start', 4), + ('Stop', 4), + )
+ + + +
+[docs] +class DELTASummaryHeader(IDCommonSummaryHeader, DELTASummaryBase): + """DELTA Summary Header."""
+ + + +
+[docs] +class DELTASummaryWidget(IDCommonSummaryWidget, DELTASummaryBase): + """DELTA Summary Widget.""" + + def _get_widgets(self, prop): + wids, orientation = super()._get_widgets(prop) + if prop == 'Alarms': + led = SiriusLedAlert( + self, self.dev_pref.substitute(propty='Alarm-Mon')) + wids.append(led) + if prop == 'Interlock': + led = SiriusLedAlert( + self, self.dev_pref.substitute(propty='Intlk-Mon')) + wids.append(led) + elif prop == 'KParam': + spb = SiriusSpinbox( + self, self.dev_pref.substitute(propty='KParam-SP')) + wids.append(spb) + lbl = SiriusLabel( + self, self.dev_pref.substitute(propty='KParam-Mon')) + wids.append(lbl) + elif prop == 'KParam Speed': + spb = SiriusSpinbox( + self, self.dev_pref.substitute(propty='KParamVelo-SP')) + wids.append(spb) + lbl = SiriusLabel( + self, self.dev_pref.substitute(propty='KParamVelo-RB')) + wids.append(lbl) + elif prop == 'Start': + btn = PyDMPushButton(self, label='', icon=qta.icon('fa5s.play')) + btn.channel = self.dev_pref.substitute(propty='KParamChange-Cmd') + btn.pressValue = 1 + btn.setObjectName('Start') + btn.setStyleSheet( + '#Start{min-width:30px; max-width:30px; icon-size:25px;}') + wids.append(btn) + elif prop == 'Stop': + btn = PyDMPushButton(self, label='', icon=qta.icon('fa5s.stop')) + btn.setToolTip('Stop all motion, lock all brakes.') + btn.channel = self.dev_pref.substitute(propty='Abort-Cmd') + btn.pressValue = 1 + btn.setObjectName('Stop') + btn.setStyleSheet( + '#Stop{min-width:30px; max-width:30px; icon-size:25px;}') + wids.append(btn) + return wids, orientation
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_id_control/epu.html b/_modules/siriushla/si_id_control/epu.html new file mode 100644 index 000000000..4288fe606 --- /dev/null +++ b/_modules/siriushla/si_id_control/epu.html @@ -0,0 +1,616 @@ + + + + + + siriushla.si_id_control.epu — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_id_control.epu

+"""EPU Control Module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QGroupBox, QGridLayout, QLabel, \
+    QHBoxLayout, QSizePolicy as QSzPlcy, QSpacerItem, QPushButton
+import qtawesome as qta
+from pydm.widgets import PyDMPushButton
+
+from ..util import connect_newprocess, connect_window
+from ..widgets import PyDMLogLabel, SiriusLedAlert, PyDMLed, \
+    SiriusLedState, PyDMLedMultiChannel, SiriusLabel, SiriusSpinbox, \
+    SiriusEnumComboBox
+
+from .base import IDCommonControlWindow, IDCommonDialog, \
+    IDCommonSummaryBase, IDCommonSummaryHeader, IDCommonSummaryWidget
+
+
+
+[docs] +class EPUControlWindow(IDCommonControlWindow): + """EPU Control Window.""" + + def _mainControlsWidget(self): + gbox = QGroupBox('Main Controls', self) + lay = QGridLayout(gbox) + + row = 0 + for prop in ['Phase', 'Gap']: + ld_prop = QLabel(prop+' [mm]', self) + sb_prop = SiriusSpinbox( + self, self.dev_pref.substitute(propty=prop+'-SP')) + lb_prop = SiriusLabel( + self, self.dev_pref.substitute(propty=prop+'-RB')) + lb_propmon = SiriusLabel( + self, self.dev_pref.substitute(propty=prop+'-Mon')) + + ld_propspd = QLabel(prop+' Speed [mm/s]', self) + sb_propspd = SiriusSpinbox( + self, self.dev_pref.substitute(propty=prop+'Speed-SP')) + lb_propspd = SiriusLabel( + self, self.dev_pref.substitute(propty=prop+'Speed-RB')) + lb_propspdmon = SiriusLabel( + self, self.dev_pref.substitute(propty=prop+'Speed-Mon')) + + axis = 'A and B' if prop == 'Phase' else 'S and I' + ld_enbl = QLabel('Allow '+prop+' Motion', self) + ld_enbl.setToolTip('Enable '+axis+' Axis and Release Brakes') + pvname = self.dev_pref.substitute( + propty='EnblAndRelease'+prop+'-Sel') + pb_movdsbl = PyDMPushButton( + parent=self, label='Dsbl', init_channel=pvname, pressValue=0) + pb_movdsbl.setObjectName('btn') + pb_movdsbl.setStyleSheet('#btn{min-width:3em; max-width:3em;}') + pb_movenbl = PyDMPushButton( + parent=self, label='Enbl', init_channel=pvname, pressValue=1) + pb_movenbl.setObjectName('btn') + pb_movenbl.setStyleSheet('#btn{min-width:3em; max-width:3em;}') + led_movsts = SiriusLedState( + self, self.dev_pref.substitute( + propty='AllowedToChange'+prop+'-Mon')) + hbox_enbl = QHBoxLayout() + hbox_enbl.setContentsMargins(0, 0, 0, 0) + hbox_enbl.setSpacing(3) + hbox_enbl.addWidget(pb_movdsbl) + hbox_enbl.addWidget(pb_movenbl) + hbox_enbl.addWidget(led_movsts) + hbox_enbl.addStretch() + + ld_propismov = QLabel(prop+' Motion', self) + pb_propstop = PyDMPushButton( + self, label='', icon=qta.icon('fa5s.stop')) + pb_propstop.setToolTip( + 'Stop all'+prop+'motion, lock all brakes.') + pvname = self.dev_pref.substitute(propty='Stop'+prop+'-Cmd') + pb_propstop.channel = pvname + pb_propstop.pressValue = 1 # Stop + pb_propstop.setObjectName('Stop') + pb_propstop.setStyleSheet( + '#Stop{min-width:30px; max-width:30px; icon-size:25px;}') + pb_propstart = PyDMPushButton( + self, label='', icon=qta.icon('fa5s.play')) + pb_propstart.setToolTip( + 'Start automatic '+prop+' motion towards previously ' + 'entered setpoint.') + pvname = self.dev_pref.substitute(propty='Change'+prop+'-Cmd') + pb_propstart.channel = pvname + pb_propstart.pressValue = 1 + pb_propstart.setObjectName('Start') + pb_propstart.setStyleSheet( + '#Start{min-width:30px; max-width:30px; icon-size:25px;}') + hbox_mov = QHBoxLayout() + hbox_mov.setSpacing(24) + hbox_mov.addWidget(pb_propstop) + hbox_mov.addWidget(pb_propstart) + hbox_mov.addStretch() + + lay.addWidget(ld_prop, row, 0) + lay.addWidget(sb_prop, row, 1) + lay.addWidget(lb_prop, row, 2) + lay.addWidget(lb_propmon, row, 3) + lay.addWidget(ld_propspd, row+1, 0) + lay.addWidget(sb_propspd, row+1, 1) + lay.addWidget(lb_propspd, row+1, 2) + lay.addWidget(lb_propspdmon, row+1, 3) + lay.addWidget(ld_enbl, row+2, 0) + lay.addLayout(hbox_enbl, row+2, 1, 1, 3) + lay.addWidget(ld_propismov, row+3, 0) + lay.addLayout(hbox_mov, row+3, 1, 1, 3) + lay.addItem( + QSpacerItem(1, 15, QSzPlcy.Ignored, QSzPlcy.Fixed), row+4, 0) + + row += 5 + + self._ld_pol = QLabel('Polarization', self) + self._cb_pol = SiriusEnumComboBox( + self, self.dev_pref.substitute(propty='Polarization-Sel')) + self._lb_prop = SiriusLabel( + self, self.dev_pref.substitute(propty='Polarization-Sts')) + self._lb_propmon = SiriusLabel( + self, self.dev_pref.substitute(propty='Polarization-Mon')) + self._ld_polmov = QLabel('Polarization Motion', self) + self._pb_polstart = PyDMPushButton( + self, label='', icon=qta.icon('fa5s.play')) + self._pb_polstart.setToolTip( + 'Start automatic Polarization motion towards previously ' + 'entered setpoint.') + pvname = self.dev_pref.substitute(propty='ChangePolarization-Cmd') + self._pb_polstart.channel = pvname + self._pb_polstart.pressValue = 1 + self._pb_polstart.setObjectName('Start') + self._pb_polstart.setStyleSheet( + '#Start{min-width:30px; max-width:30px; icon-size:25px;}') + + self._ld_stopall = QLabel('Stop All Motion', self) + self._pb_stopall = PyDMPushButton( + self, label='', icon=qta.icon('fa5s.times')) + self._pb_stopall.setToolTip('Stop all motion, lock all brakes.') + pvname = self.dev_pref.substitute(propty='Stop-Cmd') + self._pb_stopall.channel = pvname + self._pb_stopall.pressValue = 1 + self._pb_stopall.setObjectName('Stop') + self._pb_stopall.setStyleSheet( + '#Stop{min-width:30px; max-width:30px; icon-size:25px;}') + + self._ld_ismov = QLabel('Moving', self) + self._led_ismov = SiriusLedState( + self, self.dev_pref.substitute(propty='Moving-Mon')) + + lay.addWidget(self._ld_pol, row, 0) + lay.addWidget(self._cb_pol, row, 1) + lay.addWidget(self._lb_prop, row, 2) + lay.addWidget(self._lb_propmon, row, 3) + lay.addWidget(self._ld_polmov, row+1, 0) + lay.addWidget(self._pb_polstart, row+1, 1) + lay.addItem( + QSpacerItem(1, 15, QSzPlcy.Ignored, QSzPlcy.Fixed), row+2, 0) + lay.addWidget(self._ld_stopall, row+3, 0) + lay.addWidget(self._pb_stopall, row+3, 1) + lay.addWidget(self._ld_ismov, row+4, 0) + lay.addWidget(self._led_ismov, row+4, 1, alignment=Qt.AlignLeft) + + gbox.setStyleSheet( + '.QLabel{qproperty-alignment: "AlignRight | AlignVCenter";}') + return gbox + + def _statusWidget(self): + self._pb_dtlsts = QPushButton('', self) + self._pb_dtlsts.setIcon(qta.icon('fa5s.list-ul')) + self._pb_dtlsts.setToolTip('Open Detailed Status View') + self._pb_dtlsts.setObjectName('sts') + self._pb_dtlsts.setStyleSheet( + '#sts{min-width:25px; max-width:25px; icon-size:20px;}') + connect_window( + self._pb_dtlsts, EPUDriveDetails, self, + prefix=self._prefix, device=self._device) + + self._ld_isbusy = QLabel('Is Busy', self) + self._led_isbusy = SiriusLedAlert( + self, self.dev_pref.substitute(propty='IsBusy-Mon')) + self._led_isbusy.onColor = SiriusLedAlert.Yellow + + self._ld_status = QLabel('Status', self) + self._led_status = SiriusLedAlert( + self, self.dev_pref.substitute(propty='Status-Mon')) + + self._log = PyDMLogLabel( + self, init_channel=self.dev_pref.substitute(propty='Log-Mon')) + self._log.setSizePolicy( + QSzPlcy.MinimumExpanding, QSzPlcy.MinimumExpanding) + self._log.setAlternatingRowColors(True) + self._log.maxCount = 2000 + + self._bt_logclear = QPushButton('Clear Log', self) + self._bt_logclear.clicked.connect(self._log.clear) + + gbox = QGroupBox('Status') + gbox.setSizePolicy(QSzPlcy.MinimumExpanding, QSzPlcy.Preferred) + lay = QGridLayout(gbox) + lay.addWidget(self._led_isbusy, 0, 0, alignment=Qt.AlignRight) + lay.addWidget(self._ld_isbusy, 0, 1) + lay.addWidget(self._pb_dtlsts, 0, 2, alignment=Qt.AlignRight) + lay.addWidget(self._led_status, 1, 0, alignment=Qt.AlignRight) + lay.addWidget(self._ld_status, 1, 1) + lay.addWidget(self._log, 2, 0, 1, 3) + lay.addWidget(self._bt_logclear, 3, 0, 1, 3, alignment=Qt.AlignCenter) + return gbox + + def _auxCommandsWidget(self): + gbox = QGroupBox('Auxiliary Commands', self) + lay = QGridLayout(gbox) + + row = 0 + for prop in ['Phase', 'Gap']: + ld_phsspdlim = QLabel('Max '+prop+' Speed [mm/s]', self) + sb_phsspdlim = SiriusSpinbox( + self, self.dev_pref.substitute(propty='Max'+prop+'Speed-SP')) + sb_phsspdlim.setStyleSheet('max-width:4.5em;') + lb_phsspdlim = SiriusLabel( + self, self.dev_pref.substitute(propty='Max'+prop+'Speed-RB')) + + ld_pwrenbl = QLabel('Enable '+prop+' Drives Power', self) + pvname = self.dev_pref.substitute(propty='EnblPwr'+prop+'-Cmd') + pb_pwrenbl = PyDMPushButton( + parent=self, label='', icon=qta.icon('fa5s.plug'), + init_channel=pvname, pressValue=1) + pb_pwrenbl.setObjectName('btn') + pb_pwrenbl.setStyleSheet( + '#btn{min-width:30px; max-width:30px; icon-size:25px;}') + led_pwrsts = SiriusLedState( + self, self.dev_pref.substitute(propty='Pwr'+prop+'-Mon')) + led_pwrsts.offColor = PyDMLed.Red + + lay.addWidget(ld_phsspdlim, row, 0) + lay.addWidget(sb_phsspdlim, row, 1) + lay.addWidget(lb_phsspdlim, row, 2) + lay.addWidget(ld_pwrenbl, row+1, 0) + lay.addWidget(pb_pwrenbl, row+1, 1) + lay.addWidget(led_pwrsts, row+1, 2, alignment=Qt.AlignLeft) + lay.addItem( + QSpacerItem(1, 15, QSzPlcy.Ignored, QSzPlcy.Fixed), row+2, 0) + row += 3 + + ld_pwrenbl = QLabel('Enable All Drives Power', self) + pvname = self.dev_pref.substitute(propty='EnblPwrAll-Cmd') + pb_pwrenbl = PyDMPushButton( + parent=self, label='', icon=qta.icon('fa5s.plug'), + init_channel=pvname, pressValue=1) + pb_pwrenbl.setObjectName('btn') + pb_pwrenbl.setStyleSheet( + '#btn{min-width:30px; max-width:30px; icon-size:25px;}') + c2v = { + self.dev_pref.substitute(propty='PwrPhase-Mon'): 1, + self.dev_pref.substitute(propty='PwrGap-Mon'): 1} + led_pwrsts = PyDMLedMultiChannel(self, channels2values=c2v) + lay.addWidget(ld_pwrenbl, row, 0) + lay.addWidget(pb_pwrenbl, row, 1) + lay.addWidget(led_pwrsts, row, 2, alignment=Qt.AlignLeft) + row += 1 + + ld_clrerr = QLabel('Clear Drive Errors', self) + pvname = self.dev_pref.substitute(propty='ClearErr-Cmd') + pb_clrerr = PyDMPushButton( + parent=self, label='', icon=qta.icon('fa5s.sync'), + init_channel=pvname, pressValue=1) + pb_clrerr.setObjectName('btn') + pb_clrerr.setStyleSheet( + '#btn{min-width:30px; max-width:30px; icon-size:25px;}') + lay.addWidget(ld_clrerr, row, 0) + lay.addWidget(pb_clrerr, row, 1) + row += 1 + + gbox.setStyleSheet( + '.QLabel{qproperty-alignment: "AlignRight | AlignVCenter";}') + return gbox + + def _ffSettingsWidget(self): + but = QPushButton('Feedforward Settings', self) + connect_newprocess( + but, ['sirius-hla-si-ap-idff.py', self._device]) + return but
+ + + +
+[docs] +class EPUSummaryBase(IDCommonSummaryBase): + """EPU Summary Base Widget.""" + + MODEL_WIDTHS = ( + ('Status', 4), + # ('Phase', 6), + # ('Phase Speed', 6), + # ('Start Phase', 4), + # ('Stop Phase', 4), + ('Gap', 6), + ('Gap Speed', 6), + ('Start Gap', 4), + ('Stop Gap', 4), + )
+ + + +
+[docs] +class EPUSummaryHeader(IDCommonSummaryHeader, EPUSummaryBase): + """EPU Summary Header."""
+ + + +
+[docs] +class EPUSummaryWidget(IDCommonSummaryWidget, EPUSummaryBase): + """EPU Summary Widget.""" + + def _get_widgets(self, prop): + wids, orientation = super()._get_widgets(prop) + if not wids: + orientation = 'v' + if prop == 'Status': + led = SiriusLedAlert( + self, self.dev_pref.substitute(propty='Status-Mon')) + wids.append(led) + elif prop == 'Phase': + spb = SiriusSpinbox( + self, self.dev_pref.substitute(propty='Phase-SP')) + wids.append(spb) + lbl = SiriusLabel( + self, self.dev_pref.substitute(propty='Phase-Mon')) + wids.append(lbl) + elif prop == 'Phase Speed': + spb = SiriusSpinbox( + self, self.dev_pref.substitute(propty='PhaseSpeed-SP')) + wids.append(spb) + lbl = SiriusLabel( + self, self.dev_pref.substitute(propty='PhaseSpeed-Mon')) + wids.append(lbl) + elif prop == 'Start Phase': + btn = PyDMPushButton(self, label='', icon=qta.icon('fa5s.play')) + btn.setToolTip( + 'Start automatic motion towards previously entered setpoint.') + btn.channel = self.dev_pref.substitute(propty='ChangePhase-Cmd') + btn.pressValue = 1 + btn.setObjectName('Start') + btn.setStyleSheet( + '#Start{min-width:30px; max-width:30px; icon-size:25px;}') + wids.append(btn) + elif prop == 'Stop Phase': + btn = PyDMPushButton(self, label='', icon=qta.icon('fa5s.stop')) + btn.setToolTip('Stop all motion, lock all brakes.') + btn.channel = self.dev_pref.substitute(propty='StopPhase-Cmd') + btn.pressValue = 1 + btn.setObjectName('Stop') + btn.setStyleSheet( + '#Stop{min-width:30px; max-width:30px; icon-size:25px;}') + wids.append(btn) + elif prop == 'Gap': + spb = SiriusSpinbox( + self, self.dev_pref.substitute(propty='Gap-SP')) + wids.append(spb) + lbl = SiriusLabel( + self, self.dev_pref.substitute(propty='Gap-Mon')) + wids.append(lbl) + elif prop == 'Gap Speed': + spb = SiriusSpinbox( + self, self.dev_pref.substitute(propty='GapSpeed-SP')) + wids.append(spb) + lbl = SiriusLabel( + self, self.dev_pref.substitute(propty='GapSpeed-Mon')) + wids.append(lbl) + elif prop == 'Start Gap': + btn = PyDMPushButton(self, label='', icon=qta.icon('fa5s.play')) + btn.setToolTip( + 'Start automatic motion towards previously entered setpoint.') + btn.channel = self.dev_pref.substitute(propty='ChangeGap-Cmd') + btn.pressValue = 1 + btn.setObjectName('Start') + btn.setStyleSheet( + '#Start{min-width:30px; max-width:30px; icon-size:25px;}') + wids.append(btn) + elif prop == 'Stop Gap': + btn = PyDMPushButton(self, label='', icon=qta.icon('fa5s.stop')) + btn.setToolTip('Stop all motion, lock all brakes.') + btn.channel = self.dev_pref.substitute(propty='StopGap-Cmd') + btn.pressValue = 1 + btn.setObjectName('Stop') + btn.setStyleSheet( + '#Stop{min-width:30px; max-width:30px; icon-size:25px;}') + wids.append(btn) + return wids, orientation
+ + + +
+[docs] +class EPUDriveDetails(IDCommonDialog): + """EPU Drive Details.""" + + def __init__(self, parent=None, prefix='', device=''): + """Init.""" + super().__init__( + parent, prefix, device, title=device+' Drive Details') + + def _setupUi(self): + ld_respos = QLabel('Resolver Pos', self) + ld_encpos = QLabel('Encoder Pos', self) + ld_diagcode = QLabel('Diag Code', self) + ld_diagmsg = QLabel('Diag Msg', self) + ld_moving = QLabel('Moving', self) + + gbox = QGroupBox('Drive Status', self) + glay = QGridLayout(gbox) + glay.addWidget(ld_respos, 1, 0) + glay.addWidget(ld_encpos, 2, 0) + glay.addWidget(ld_diagcode, 3, 0) + glay.addWidget(ld_diagmsg, 4, 0) + glay.addWidget(ld_moving, 5, 0) + + for idx, drive in enumerate(['A', 'B', 'S', 'I']): + col = idx + 1 + ld_drive = QLabel('Drive '+drive, self) + + pvname = self.dev_pref.substitute( + propty='Drive'+drive+'ResolverPos-Mon') + lb_respos = SiriusLabel(self, pvname) + + pvname = self.dev_pref.substitute( + propty='Drive'+drive+'EncoderPos-Mon') + lb_encpos = SiriusLabel(self, pvname) + + pvname = self.dev_pref.substitute( + propty='Drive'+drive+'DiagCode-Mon') + lb_diagcode = SiriusLabel(self, pvname) + + pvname = self.dev_pref.substitute( + propty='Drive'+drive+'DiagMsg-Mon') + lb_diagmsg = SiriusLabel(self, pvname) + lb_diagmsg.displayFormat = lb_diagmsg.DisplayFormat.String + + pvname = self.dev_pref.substitute( + propty='Drive'+drive+'Moving-Mon') + lb_moving = SiriusLabel(self, pvname) + + glay.addWidget(ld_drive, 0, col) + glay.addWidget(lb_respos, 1, col) + glay.addWidget(lb_encpos, 2, col) + glay.addWidget(lb_diagcode, 3, col) + glay.addWidget(lb_diagmsg, 4, col) + glay.addWidget(lb_moving, 5, col) + + gbox.setStyleSheet( + 'QLabel{qproperty-alignment: AlignCenter; max-width: 12em;}') + lay = QHBoxLayout(self) + lay.addWidget(gbox)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_id_control/id_control.html b/_modules/siriushla/si_id_control/id_control.html new file mode 100644 index 000000000..9e0baf271 --- /dev/null +++ b/_modules/siriushla/si_id_control/id_control.html @@ -0,0 +1,393 @@ + + + + + + siriushla.si_id_control.id_control — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.si_id_control.id_control

+"""ID Control Module."""
+
+import os as _os
+from qtpy.QtGui import QMovie
+from qtpy.QtCore import Qt, Slot, QSize
+from qtpy.QtWidgets import QVBoxLayout, QWidget, QGroupBox, QGridLayout, \
+    QLabel, QAction, QMenu
+from pydm.connection_inspector import ConnectionInspector
+
+from siriuspy.envars import VACA_PREFIX as _vaca_prefix
+from siriuspy.namesys import SiriusPVName as _PVName
+
+from ..widgets import SiriusMainWindow, SiriusConnectionSignal
+
+from .apu import APUSummaryHeader, APUSummaryWidget
+from .delta import DELTASummaryHeader, DELTASummaryWidget
+from .ivu import IVUSummaryHeader, IVUSummaryWidget
+from .util import get_id_icon
+
+
+
+[docs] +class IDControl(SiriusMainWindow): + """ID Control Window.""" + + def __init__(self, parent=None, prefix=_vaca_prefix): + super().__init__(parent) + self._prefix = prefix + self.setObjectName('IDApp') + self.setWindowTitle('ID Controls') + self.setWindowIcon(get_id_icon()) + self._id_widgets = list() + self._channels_mov = list() + self._setupUi() + self._create_actions() + + def _setupUi(self): + cwid = QWidget() + self.setCentralWidget(cwid) + + label = QLabel('<h3>ID Control Window</h3>', + self, alignment=Qt.AlignCenter) + label.setStyleSheet('QLabel{min-height: 3em; max-height: 3em;}') + + self.label_mov1 = QLabel(self) + self.label_mov1.setVisible(False) + self.label_mov1.setStyleSheet( + 'QLabel{min-height: 3em; max-height: 3em;}') + self.label_mov2 = QLabel(self) + self.label_mov2.setVisible(False) + self.label_mov2.setStyleSheet( + 'QLabel{min-height: 3em; max-height: 3em;}') + self.movie_mov = QMovie(_os.path.join( + _os.path.abspath(_os.path.dirname(__file__)), 'hula.gif')) + self.movie_mov.setScaledSize(QSize(50, 50)) + self.label_mov1.setMovie(self.movie_mov) + self.label_mov2.setMovie(self.movie_mov) + + self._gbox_apu = QGroupBox('APU', self) + self._gbox_apu.setLayout(self._setupAPULayout()) + + self._gbox_epu = QGroupBox('DELTA', self) + self._gbox_epu.setLayout(self._setupDELTALayout()) + + self._gbox_ivu = QGroupBox('IVU', self) + self._gbox_ivu.setLayout(self._setupIVULayout()) + + lay = QGridLayout(cwid) + lay.addWidget(self.label_mov1, 0, 0) + lay.addWidget(label, 0, 1) + lay.addWidget(self.label_mov2, 0, 2) + lay.addWidget(self._gbox_apu, 1, 0, 1, 3) + lay.addWidget(self._gbox_epu, 2, 0, 1, 3) + lay.addWidget(self._gbox_ivu, 3, 0, 1, 3) + lay.setColumnStretch(0, 1) + lay.setColumnStretch(1, 15) + lay.setColumnStretch(2, 1) + + def _setupAPULayout(self): + lay = QVBoxLayout() + lay.setAlignment(Qt.AlignTop) + + self._apu_header = APUSummaryHeader(self) + lay.addWidget(self._apu_header) + + idlist = ['SI-06SB:ID-APU22', 'SI-07SP:ID-APU22', + 'SI-09SA:ID-APU22', 'SI-11SP:ID-APU58', + 'SI-17SA:ID-APU22'] + for idname in idlist: + apu_wid = APUSummaryWidget(self, self._prefix, idname) + lay.addWidget(apu_wid) + self._id_widgets.append(apu_wid) + ch_mov = SiriusConnectionSignal(_PVName(idname).substitute( + prefix=self._prefix, propty='Moving-Mon')) + ch_mov.new_value_signal[float].connect(self._handle_moving_vis) + self._channels_mov.append(ch_mov) + + return lay + + # def _setupEPULayout(self): + # lay = QVBoxLayout() + # lay.setAlignment(Qt.AlignTop) + + # self._epu_header = EPUSummaryHeader(self) + # lay.addWidget(self._epu_header) + + # idlist = ['SI-10SB:ID-EPU50', ] + # for idname in idlist: + # epu_wid = EPUSummaryWidget(self, self._prefix, idname) + # lay.addWidget(epu_wid) + # self._id_widgets.append(epu_wid) + # ch_mov = SiriusConnectionSignal(_PVName(idname).substitute( + # prefix=self._prefix, propty='Moving-Mon')) + # ch_mov.new_value_signal[int].connect(self._handle_moving_vis) + # self._channels_mov.append(ch_mov) + + # return lay + + def _setupDELTALayout(self): + lay = QVBoxLayout() + lay.setAlignment(Qt.AlignTop) + + self._delta_header = DELTASummaryHeader(self) + lay.addWidget(self._delta_header) + + idlist = ['SI-10SB:ID-DELTA52', ] + for idname in idlist: + delta_wid = DELTASummaryWidget(self, self._prefix, idname) + lay.addWidget(delta_wid) + self._id_widgets.append(delta_wid) + ch_mov = SiriusConnectionSignal(_PVName(idname).substitute( + prefix=self._prefix, propty='Moving-Mon')) + ch_mov.new_value_signal[int].connect(self._handle_moving_vis) + self._channels_mov.append(ch_mov) + + return lay + + def _setupIVULayout(self): + lay = QVBoxLayout() + lay.setAlignment(Qt.AlignTop) + + self._delta_header = IVUSummaryHeader(self) + lay.addWidget(self._delta_header) + + idlist = ['SI-08SB:ID-IVU18', 'SI-14SB:ID-IVU18'] + for idname in idlist: + delta_wid = IVUSummaryWidget(self, self._prefix, idname) + lay.addWidget(delta_wid) + self._id_widgets.append(delta_wid) + ch_mov = SiriusConnectionSignal(_PVName(idname).substitute( + prefix=self._prefix, propty='Moving-Mon')) + ch_mov.new_value_signal[int].connect(self._handle_moving_vis) + self._channels_mov.append(ch_mov) + + return lay + + # def _setupPAPULayout(self): + # lay = QVBoxLayout() + # lay.setAlignment(Qt.AlignTop) + + # self._epu_header = PAPUSummaryHeader(self) + # lay.addWidget(self._epu_header) + + # idlist = ['SI-17SA:ID-PAPU50', ] + # for idname in idlist: + # epu_wid = PAPUSummaryWidget(self, self._prefix, idname) + # lay.addWidget(epu_wid) + # self._id_widgets.append(epu_wid) + # ch_mov = SiriusConnectionSignal(_PVName(idname).substitute( + # prefix=self._prefix, propty='Moving-Mon')) + # ch_mov.new_value_signal[int].connect(self._handle_moving_vis) + # self._channels_mov.append(ch_mov) + + # return lay + + def _create_actions(self): + self.blctrl_enbl_act = QAction("Enable Beamline Control", self) + self.blctrl_enbl_act.triggered.connect( + lambda: self._set_beamline_control(True)) + self.blctrl_dsbl_act = QAction("Disable Beamline Control", self) + self.blctrl_dsbl_act.triggered.connect( + lambda: self._set_beamline_control(False)) + + @Slot(bool) + def _set_beamline_control(self, state): + """Execute enable/disable beamline control actions.""" + for widget in self._id_widgets: + try: + if state: + widget.enable_beamline_control() + else: + widget.disable_beamline_control() + except TypeError: + pass + +
+[docs] + def contextMenuEvent(self, event): + """Show a custom context menu.""" + point = event.pos() + menu = QMenu("Actions", self) + menu.addAction(self.blctrl_enbl_act) + menu.addAction(self.blctrl_dsbl_act) + menu.addSeparator() + action = menu.addAction('Show Connections...') + action.triggered.connect(self.show_connections) + menu.popup(self.mapToGlobal(point))
+ + +
+[docs] + def show_connections(self, checked): + """Show connections.""" + _ = checked + conn = ConnectionInspector(self) + conn.show()
+ + + def _handle_moving_vis(self, value): + """Handle visualization of moving state label.""" + _ = value + show = any([ + ch.connected and ch.value != 0 + for ch in self._channels_mov]) + self.label_mov1.setVisible(show) + self.label_mov2.setVisible(show) + if show: + self.movie_mov.start() + else: + self.movie_mov.stop()
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_id_control/papu.html b/_modules/siriushla/si_id_control/papu.html new file mode 100644 index 000000000..79b85c180 --- /dev/null +++ b/_modules/siriushla/si_id_control/papu.html @@ -0,0 +1,551 @@ + + + + + + siriushla.si_id_control.papu — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_id_control.papu

+"""PAPU Control Module."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QGroupBox, QGridLayout, QLabel, QFormLayout, \
+    QHBoxLayout, QSizePolicy as QSzPlcy, QSpacerItem, QPushButton, QVBoxLayout
+import qtawesome as qta
+from pydm.widgets import PyDMPushButton
+
+from ..util import connect_newprocess, connect_window
+from ..widgets import PyDMLogLabel, PyDMLed, PyDMLedMultiChannel, \
+    SiriusLedState, SiriusLabel, SiriusSpinbox
+
+from .base import IDCommonControlWindow, IDCommonDialog, \
+    IDCommonSummaryBase, IDCommonSummaryHeader, IDCommonSummaryWidget
+
+
+
+[docs] +class PAPUControlWindow(IDCommonControlWindow): + """PAPU Control Window.""" + + def _mainControlsWidget(self): + gbox = QGroupBox('Main Controls', self) + lay = QGridLayout(gbox) + + self._ld_phs = QLabel('Phase [mm]', self) + self._sb_phs = SiriusSpinbox( + self, self.dev_pref.substitute(propty='Phase-SP')) + self._lb_phs = SiriusLabel( + self, self.dev_pref.substitute(propty='Phase-RB')) + self._lb_phsmon = SiriusLabel( + self, self.dev_pref.substitute(propty='Phase-Mon')) + self._lb_phsmon.setStyleSheet('QLabel{min-width:6em;}') + + self._ld_phsspd = QLabel('Phase Speed [mm/s]', self) + self._sb_phsspd = SiriusSpinbox( + self, self.dev_pref.substitute(propty='PhaseSpeed-SP')) + self._lb_phsspd = SiriusLabel( + self, self.dev_pref.substitute(propty='PhaseSpeed-RB')) + self._lb_phsspdmon = SiriusLabel( + self, self.dev_pref.substitute(propty='PhaseSpeed-Mon')) + self._lb_phsspdmon.setStyleSheet('QLabel{min-width:6em;}') + + self._ld_enbl = QLabel('Allow Phase Motion', self) + self._ld_enbl.setToolTip('Enable Axis and Release Brakes') + pvname = self.dev_pref.substitute(propty='EnblAndReleasePhase-Sel') + self._pb_movdsbl = PyDMPushButton( + parent=self, label='Dsbl', init_channel=pvname, pressValue=0) + self._pb_movdsbl.setObjectName('btn') + self._pb_movdsbl.setStyleSheet('#btn{min-width:3em; max-width:3em;}') + self._pb_movenbl = PyDMPushButton( + parent=self, label='Enbl', init_channel=pvname, pressValue=1) + self._pb_movenbl.setObjectName('btn') + self._pb_movenbl.setStyleSheet('#btn{min-width:3em; max-width:3em;}') + self._led_movsts = SiriusLedState( + self, self.dev_pref.substitute(propty='AllowedToChangePhase-Mon')) + hbox_enbl = QHBoxLayout() + hbox_enbl.setContentsMargins(0, 0, 0, 0) + hbox_enbl.setSpacing(3) + hbox_enbl.addWidget(self._pb_movdsbl) + hbox_enbl.addWidget(self._pb_movenbl) + hbox_enbl.addWidget(self._led_movsts) + hbox_enbl.addStretch() + + self._ld_phsismov = QLabel('Phase Motion', self) + self._pb_phsstop = PyDMPushButton( + self, label='', icon=qta.icon('fa5s.stop')) + self._pb_phsstop.setToolTip('Stop all phase motion, lock all brakes.') + pvname = self.dev_pref.substitute(propty='StopPhase-Cmd') + self._pb_phsstop.channel = pvname + self._pb_phsstop.pressValue = 1 # Stop + self._pb_phsstop.setObjectName('Stop') + self._pb_phsstop.setStyleSheet( + '#Stop{min-width:30px; max-width:30px; icon-size:25px;}') + self._pb_phsstart = PyDMPushButton( + self, label='', icon=qta.icon('fa5s.play')) + self._pb_phsstart.setToolTip( + 'Start automatic Phase motion towards previously ' + 'entered setpoint.') + pvname = self.dev_pref.substitute(propty='ChangePhase-Cmd') + self._pb_phsstart.channel = pvname + self._pb_phsstart.pressValue = 1 + self._pb_phsstart.setObjectName('Start') + self._pb_phsstart.setStyleSheet( + '#Start{min-width:30px; max-width:30px; icon-size:25px;}') + + self._led_ismov = SiriusLedState( + self, self.dev_pref.substitute(propty='Moving-Mon')) + hbox_mov = QHBoxLayout() + hbox_mov.setSpacing(24) + hbox_mov.addWidget(self._pb_phsstop) + hbox_mov.addWidget(self._pb_phsstart) + hbox_mov.addWidget(self._led_ismov) + hbox_mov.addStretch() + + lay.addWidget(self._ld_phs, 0, 0) + lay.addWidget(self._sb_phs, 0, 1) + lay.addWidget(self._lb_phs, 0, 2) + lay.addWidget(self._lb_phsmon, 0, 3) + lay.addWidget(self._ld_phsspd, 1, 0) + lay.addWidget(self._sb_phsspd, 1, 1) + lay.addWidget(self._lb_phsspd, 1, 2) + lay.addWidget(self._lb_phsspdmon, 1, 3) + lay.addWidget(self._ld_enbl, 2, 0) + lay.addLayout(hbox_enbl, 2, 1, 1, 3) + lay.addWidget(self._ld_phsismov, 3, 0) + lay.addLayout(hbox_mov, 3, 1, 1, 3) + lay.addItem(QSpacerItem(1, 15, QSzPlcy.Ignored, QSzPlcy.Fixed), 4, 0) + + gbox.setStyleSheet( + '.QLabel{qproperty-alignment: "AlignRight | AlignVCenter";}') + return gbox + + def _statusWidget(self): + self._ld_drivests = QLabel( + 'Drive Status:', self, alignment=Qt.AlignRight | Qt.AlignVCenter) + self._lb_drivests = SiriusLabel( + self, self.dev_pref.substitute(propty='DiagMessage-Mon')) + self._lb_drivests.setStyleSheet('QLabel{min-width: 10em;}') + self._lb_drivests.displayFormat = SiriusLabel.DisplayFormat.String + self._led_drivests = PyDMLedMultiChannel( + self, { + self.dev_pref.substitute(propty='Code-Mon'): { + 'comp': 'in', 'value': ['A211', 'A012']}}) + + self._pb_dtlsts = QPushButton('', self) + self._pb_dtlsts.setIcon(qta.icon('fa5s.list-ul')) + self._pb_dtlsts.setToolTip('Open Detailed Status View') + self._pb_dtlsts.setObjectName('sts') + self._pb_dtlsts.setStyleSheet( + '#sts{min-width:25px; max-width:25px; icon-size:20px;}') + connect_window( + self._pb_dtlsts, PAPUDetails, self, + prefix=self._prefix, device=self._device) + + self._log = PyDMLogLabel( + self, init_channel=self.dev_pref.substitute(propty='Log-Mon')) + self._log.setSizePolicy( + QSzPlcy.MinimumExpanding, QSzPlcy.MinimumExpanding) + self._log.setAlternatingRowColors(True) + self._log.maxCount = 2000 + + self._bt_logclear = QPushButton('Clear Log', self) + self._bt_logclear.clicked.connect(self._log.clear) + + gbox = QGroupBox('Status') + gbox.setSizePolicy(QSzPlcy.MinimumExpanding, QSzPlcy.Preferred) + lay = QGridLayout(gbox) + lay.addWidget(self._ld_drivests, 0, 0) + lay.addWidget(self._lb_drivests, 0, 1) + lay.addWidget(self._led_drivests, 0, 2) + lay.addWidget(self._pb_dtlsts, 0, 3, alignment=Qt.AlignRight) + lay.addWidget(self._log, 1, 0, 1, 4) + lay.addWidget(self._bt_logclear, 2, 0, 1, 4, alignment=Qt.AlignCenter) + return gbox + + def _auxCommandsWidget(self): + btnname = 'btn' + btnsty = '#btn{min-width:30px; max-width:30px; icon-size:25px;}' + + gbox = QGroupBox('Auxiliary Commands', self) + + self._ld_phsspdlim = QLabel('Max Phase Speed [mm/s]', self) + self._sb_phsspdlim = SiriusSpinbox( + self, self.dev_pref.substitute(propty='MaxPhaseSpeed-SP')) + self._sb_phsspdlim.setStyleSheet('max-width:4.5em;') + self._lb_phsspdlim = SiriusLabel( + self, self.dev_pref.substitute(propty='MaxPhaseSpeed-RB')) + + self._ld_pwrenbl = QLabel('Enable Phase Drives Power', self) + pvname = self.dev_pref.substitute(propty='EnblPwrPhase-Cmd') + self._pb_pwrenbl = PyDMPushButton( + parent=self, label='', icon=qta.icon('fa5s.plug'), + init_channel=pvname, pressValue=1) + self._pb_pwrenbl.setObjectName(btnname) + self._pb_pwrenbl.setStyleSheet(btnsty) + self._led_pwrsts = SiriusLedState( + self, self.dev_pref.substitute(propty='PwrPhase-Mon')) + self._led_pwrsts.offColor = PyDMLed.Red + + self._ld_homeaxis = QLabel('Do homing', self) + self._pb_home = PyDMPushButton( + self, label='', icon=qta.icon('mdi.keyboard-return')) + self._pb_home.setToolTip('Execute homing for selected axis.') + self._pb_home.channel = self.dev_pref.substitute(propty='Home-Cmd') + self._pb_home.pressValue = 1 + self._pb_home.setObjectName(btnname) + self._pb_home.setStyleSheet(btnsty) + self._led_home = SiriusLabel( + self, self.dev_pref.substitute(propty='Home-Mon')) + + self._ld_parkspd = QLabel('Park Speed [mm/s]', self) + self._sb_parkspd = SiriusSpinbox( + self, self.dev_pref.substitute(propty='ParkSpeed-SP')) + self._sb_parkspd.setStyleSheet('max-width:4.5em;') + self._lb_parkspd = SiriusLabel( + self, self.dev_pref.substitute(propty='ParkSpeed-RB')) + + self._ld_park = QLabel('Do parking', self) + pvname = self.dev_pref.substitute(propty='Park-Cmd') + self._pb_park = PyDMPushButton( + parent=self, label='', icon=qta.icon('fa5s.parking'), + init_channel=pvname, pressValue=1) + self._pb_park.setObjectName(btnname) + self._pb_park.setStyleSheet(btnsty) + + self._ld_gotomin = QLabel('Go to minimum Phase', self) + pvname = self.dev_pref.substitute(propty='GoToMinPhase-Cmd') + self._pb_gotomin = PyDMPushButton( + parent=self, label='Go to minimum', + init_channel=pvname, pressValue=1) + self._ld_gotoop = QLabel('Go to operation Phase', self) + pvname = self.dev_pref.substitute(propty='GoToOpPhase-Cmd') + self._pb_gotoop = PyDMPushButton( + parent=self, label='Go to operation', + init_channel=pvname, pressValue=1) + + self._ld_clrerr = QLabel('Clear Drive Errors', self) + pvname = self.dev_pref.substitute(propty='ClearErr-Cmd') + self._pb_clrerr = PyDMPushButton( + parent=self, label='', icon=qta.icon('fa5s.sync'), + init_channel=pvname, pressValue=1) + self._pb_clrerr.setObjectName(btnname) + self._pb_clrerr.setStyleSheet(btnsty) + + lay = QGridLayout(gbox) + lay.addWidget(self._ld_phsspdlim, 0, 0) + lay.addWidget(self._sb_phsspdlim, 0, 1) + lay.addWidget(self._lb_phsspdlim, 0, 2) + lay.addItem(QSpacerItem(1, 8, QSzPlcy.Ignored, QSzPlcy.Fixed), 1, 0) + lay.addWidget(self._ld_pwrenbl, 2, 0) + lay.addWidget(self._pb_pwrenbl, 2, 1) + lay.addWidget(self._led_pwrsts, 2, 2, alignment=Qt.AlignLeft) + lay.addItem(QSpacerItem(1, 8, QSzPlcy.Ignored, QSzPlcy.Fixed), 3, 0) + lay.addWidget(self._ld_homeaxis, 4, 0) + lay.addWidget(self._pb_home, 4, 1) + lay.addWidget(self._led_home, 4, 2, alignment=Qt.AlignLeft) + lay.addItem(QSpacerItem(1, 8, QSzPlcy.Ignored, QSzPlcy.Fixed), 5, 0) + lay.addWidget(self._ld_parkspd, 6, 0) + lay.addWidget(self._sb_parkspd, 6, 1) + lay.addWidget(self._lb_parkspd, 6, 2) + lay.addWidget(self._ld_park, 7, 0) + lay.addWidget(self._pb_park, 7, 1) + lay.addItem(QSpacerItem(1, 8, QSzPlcy.Ignored, QSzPlcy.Fixed), 8, 0) + lay.addWidget(self._ld_gotomin, 9, 0) + lay.addWidget(self._pb_gotomin, 9, 1, 1, 2) + lay.addWidget(self._ld_gotoop, 10, 0) + lay.addWidget(self._pb_gotoop, 10, 1, 1, 2) + lay.addItem(QSpacerItem(1, 8, QSzPlcy.Ignored, QSzPlcy.Fixed), 11, 0) + lay.addWidget(self._ld_clrerr, 12, 0) + lay.addWidget(self._pb_clrerr, 12, 1) + + gbox.setStyleSheet( + '.QLabel{qproperty-alignment: "AlignRight | AlignVCenter";}') + return gbox + + def _ffSettingsWidget(self): + but = QPushButton('Feedforward Settings', self) + connect_newprocess( + but, ['sirius-hla-si-ap-idff.py', self._device]) + return but
+ + + +
+[docs] +class PAPUSummaryBase(IDCommonSummaryBase): + """PAPU Summary Base Widget.""" + + MODEL_WIDTHS = ( + ('Status', 4), + ('Phase', 6), + ('Phase Speed', 6), + ('Start Phase', 4), + ('Stop Phase', 4), + )
+ + + +
+[docs] +class PAPUSummaryHeader(IDCommonSummaryHeader, PAPUSummaryBase): + """PAPU Summary Header."""
+ + + +
+[docs] +class PAPUSummaryWidget(IDCommonSummaryWidget, PAPUSummaryBase): + """PAPU Summary Widget.""" + + def _get_widgets(self, prop): + wids, orientation = super()._get_widgets(prop) + if not wids: + orientation = 'v' + if prop == 'Status': + led = SiriusLedState( + self, self.dev_pref.substitute( + propty='AllowedToChangePhase-Mon')) + led.offColor = led.Red + wids.append(led) + elif prop == 'Phase': + spb = SiriusSpinbox( + self, self.dev_pref.substitute(propty='Phase-SP')) + wids.append(spb) + lbl = SiriusLabel( + self, self.dev_pref.substitute(propty='Phase-Mon')) + wids.append(lbl) + elif prop == 'Phase Speed': + spb = SiriusSpinbox( + self, self.dev_pref.substitute(propty='PhaseSpeed-SP')) + wids.append(spb) + lbl = SiriusLabel( + self, self.dev_pref.substitute(propty='PhaseSpeed-Mon')) + wids.append(lbl) + elif prop == 'Start Phase': + btn = PyDMPushButton(self, label='', icon=qta.icon('fa5s.play')) + btn.setToolTip( + 'Start automatic motion towards previously entered setpoint.') + btn.channel = self.dev_pref.substitute(propty='ChangePhase-Cmd') + btn.pressValue = 1 + btn.setObjectName('Start') + btn.setStyleSheet( + '#Start{min-width:30px; max-width:30px; icon-size:25px;}') + wids.append(btn) + elif prop == 'Stop Phase': + btn = PyDMPushButton(self, label='', icon=qta.icon('fa5s.stop')) + btn.setToolTip('Stop all motion, lock all brakes.') + btn.channel = self.dev_pref.substitute(propty='StopPhase-Cmd') + btn.pressValue = 1 + btn.setObjectName('Stop') + btn.setStyleSheet( + '#Stop{min-width:30px; max-width:30px; icon-size:25px;}') + wids.append(btn) + return wids, orientation
+ + + +
+[docs] +class PAPUDetails(IDCommonDialog): + """PAPU Details.""" + + def __init__(self, parent=None, prefix='', device=''): + """Init.""" + super().__init__( + parent, prefix, device, title=device+' Drive Details') + + def _setupUi(self): + connbox = QGroupBox('Connection', self) + flay = QFormLayout(connbox) + flay.setLabelAlignment(Qt.AlignRight) + for pvn in ['Connected-Mon', 'MsgServerConnected-Mon', + 'IoServerConnected-Mon', 'SerialConnected-Mon']: + lbl = pvn.split('-')[0] + ':' + wid = SiriusLedState(self, self.dev_pref.substitute(propty=pvn)) + flay.addRow(lbl, wid) + + drivebox = QGroupBox('Drive Status', self) + glay = QGridLayout(drivebox) + propties = ['ResolverPos-Mon', 'Torque-Mon', 'MotorTemp-Mon', + 'Code-Mon', 'DiagMessage-Mon'] + for row, pvn in enumerate(propties): + lbl = QLabel(pvn.split('-')[0] + ':', self) + glay.addWidget(lbl, row, 0, alignment=Qt.AlignRight) + wid = SiriusLabel(self, self.dev_pref.substitute(propty=pvn)) + wid.showUnits = True + if pvn == 'DiagMessage-Mon': + wid.displayFormat = wid.DisplayFormat.String + glay.addWidget(wid, row, 1) + + c2v = None + if pvn == 'Code-Mon': + c2v = {self.dev_pref.substitute( + propty=pvn): {'comp': 'in', 'value': ['A211', 'A012']}} + elif pvn == 'MotorTemp-Mon': + c2v = {self.dev_pref.substitute( + propty=pvn): {'comp': 'lt', 'value': 90}} + if c2v: + led = PyDMLedMultiChannel(self, c2v) + led.offColor = led.Yellow + glay.addWidget(led, row, 2, alignment=Qt.AlignLeft) + + self.setStyleSheet( + 'QLabel{qproperty-alignment: AlignCenter; max-width: 12em;}') + lay = QVBoxLayout(self) + lay.addWidget(connbox) + lay.addWidget(drivebox)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/si_id_control/util.html b/_modules/siriushla/si_id_control/util.html new file mode 100644 index 000000000..62fd7846f --- /dev/null +++ b/_modules/siriushla/si_id_control/util.html @@ -0,0 +1,176 @@ + + + + + + siriushla.si_id_control.util — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.si_id_control.util

+import qtawesome as qta
+from siriushla.util import get_appropriate_color
+
+
+
+[docs] +def get_id_icon(): + color = get_appropriate_color('ID') + icon = qta.icon('mdi.current-ac', 'mdi.current-ac', 'mdi.equal', options=[ + dict(scale_factor=0.48, color=color, offset=(-0.16, -0.01)), + dict(scale_factor=0.48, color=color, offset=(0.16, -0.01)), + dict(scale_factor=2.4, color=color, offset=(0.0, 0.0))]) + return icon
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/sirius_application.html b/_modules/siriushla/sirius_application.html new file mode 100644 index 000000000..674ecf5f7 --- /dev/null +++ b/_modules/siriushla/sirius_application.html @@ -0,0 +1,302 @@ + + + + + + siriushla.sirius_application — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.sirius_application

+"""Definition of the Sirius Application class."""
+import sys
+import os
+import time
+import traceback
+import logging as _log
+from io import StringIO
+from qtpy.QtWidgets import QMessageBox
+from pydm import PyDMApplication, data_plugins
+
+from .util import get_window_id, set_style
+
+# Set the process umask so we don't have problems with logfile permissions
+os.umask(0)
+
+# Create log file
+LOGFILE = '/tmp/sirius-hla.log'
+try:
+    open(LOGFILE, 'a').close()
+    os.chmod(LOGFILE, 0o666)
+except (OSError, PermissionError):
+    pass
+
+
+# Configure Logging
+fmt = '%(levelname)7s | %(asctime)s | ' +\
+      '%(module)15s.%(funcName)-20s[%(lineno)4d] ::: %(message)s'
+_log.basicConfig(
+    format=fmt, datefmt='%F %T', level=_log.INFO,
+    filename=LOGFILE, filemode='a')
+
+
+# https://riverbankcomputing.com/pipermail/pyqt/2009-May/022961.html
+
+[docs] +def excepthook(exctype, excvalue, tracebackobj): + """ + Global function to catch unhandled exceptions. + + @param exctype exception type + @param excvalue exception value + @param tracebackobj traceback object + """ + app = SiriusApplication.instance() + if app is None: + app = SiriusApplication(None, sys.argv) + + separator = '-' * 120 + '\n' + notice = \ + 'An unhandled exception occurred. Please report the problem '\ + 'via email to <{}>.\nA log has {{}}been written to "{}".\n\n'\ + 'Error information:\n'.format("ana.clara@lnls.br", LOGFILE) + timestring = time.strftime("%Y-%m-%d, %H:%M:%S") + '\n' + + tbinfofile = StringIO() + traceback.print_tb(tracebackobj, None, tbinfofile) + tbinfofile.seek(0) + tbinfo = tbinfofile.read() + + errmsg = '%s: \n%s\n' % (str(exctype), str(excvalue)) + sections = [timestring, errmsg, tbinfo] + msg = separator.join(sections) + try: + with open(LOGFILE, 'a') as fil: + fil.write('\n' + msg + '\n') + try: + os.chmod(LOGFILE, 0o666) + except OSError: + pass + except PermissionError: + notice = notice.format('NOT ') + else: + notice = notice.format('') + errorbox = QMessageBox() + errorbox.setText(notice) + errorbox.setInformativeText(msg) + errorbox.setIcon(QMessageBox.Critical) + errorbox.setWindowTitle('Error') + errorbox.setStyleSheet( + '#qt_msgbox_informativelabel {min-width: 40em;}') + errorbox.exec_()
+ + + +sys.excepthook = excepthook + + +
+[docs] +class SiriusApplication(PyDMApplication): + """Derivation of PyDMApplication used in Sirius HLA.""" + + def __init__(self, ui_file=None, command_line_args=[], + use_main_window=False, **kwargs): + """Create an attribute to hold open windows.""" + super().__init__(ui_file=ui_file, command_line_args=command_line_args, + use_main_window=use_main_window, **kwargs) + size = min(*self._get_desktop_geometry()) + if size < 1080: + font = self.font() + font.setPointSize(7) + self.setFont(font) + set_style(self) + self._windows = dict() + +
+[docs] + def open_window(self, w_class, parent=None, **kwargs): + """Open new window. + + A new window will be created if it is not already open. Otherwise, the + existing window is brought to focus. + """ + # One top level widget as the parent? + wid = get_window_id(w_class, **kwargs) + try: + self._show(wid) + self._windows[wid].activateWindow() + except (KeyError, RuntimeError): + # KeyError - Window does not exist + # RuntimeError: wrapped C/C++ object of type x has been deleted + self._create_and_show(wid, w_class, parent, **kwargs)
+ + + def _show(self, wid): + if self._windows[wid].isHidden(): + self._windows[wid].show() + elif self._windows[wid].isMinimized(): + self._windows[wid].showNormal() + + def _create_and_show(self, wid, w_class, parent, **kwargs): + with data_plugins.connection_queue(): + window = w_class(parent=parent, **kwargs) + self._windows[wid] = window + self._windows[wid].show() + + def _get_desktop_geometry(self): + size = self.primaryScreen().virtualSize() + return size.width(), size.height()
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/tb_di_slits/Slit_monitor.html b/_modules/siriushla/tb_di_slits/Slit_monitor.html new file mode 100644 index 000000000..2e7555708 --- /dev/null +++ b/_modules/siriushla/tb_di_slits/Slit_monitor.html @@ -0,0 +1,274 @@ + + + + + + siriushla.tb_di_slits.Slit_monitor — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.tb_di_slits.Slit_monitor

+#!/usr/bin/env python-sirius
+"""HLA TB Slits monitoring Window."""
+
+from qtpy.QtCore import QPoint
+from siriushla.widgets import SiriusConnectionSignal
+from siriushla.common.diff_ctrl import DiffCtrlDevMonitor, DiffCtrlView
+
+
+
+[docs] +class SlitMonitoring(DiffCtrlDevMonitor): + """Class to create Slits Monitor Widget.""" + + def _setupControlWidgets(self): + """Setup control widgets channels/labels.""" + self.lb_descctrl1.setText('Center [mm]:') + self.sb_ctrl1.channel = self.device.substitute(propty='Center-SP') + self.lb_ctrl1.channel = self.device.substitute(propty='Center-RB') + self.lb_descctrl2.setText('Width [mm]:') + self.sb_ctrl2.channel = self.device.substitute(propty='Width-SP') + self.lb_ctrl2.channel = self.device.substitute(propty='Width-RB') + + def _createConnectors(self): + """Create connectors to monitor device positions.""" + self._slit_center = 0 + self._slit_width = 0 + self.conn_slitcenter = SiriusConnectionSignal( + self.device.substitute(propty='Center-RB')) + self.conn_slitcenter.new_value_signal[float].connect(self._setDevPos) + self.conn_slitwidth = SiriusConnectionSignal( + self.device.substitute(propty='Width-RB')) + self.conn_slitwidth.new_value_signal[float].connect(self._setDevPos) + + def _setDevPos(self, new_value): + """Set Slit Widget positions.""" + if 'Center' in self.sender().address: + self._slit_center = new_value # considering mm + elif 'Width' in self.sender().address: + self._slit_width = new_value + self.updateDevWidget() + +
+[docs] + def updateDevWidget(self): + """Update Slit illustration.""" + self.style().unpolish(self.dev_widget.widget_draw) + self.style().polish(self.dev_widget.widget_draw) + widget_w = self.dev_widget.widget_draw.width() + widget_h = self.dev_widget.widget_draw.height() + vacuum_chamber_d = 36 # mm + + if self.orientation == 'H': + rect_h = widget_h*3/5 + rect_w = rect_h/2 + circle_d = rect_w + factor = circle_d/vacuum_chamber_d + xc = (widget_w/2 - self._slit_center*factor) + xw = self._slit_width*factor + left = round(xc - rect_w - xw/2) + right = round(xc + xw/2) + + self.dev_widget.PyDMDrawingRectangle_HLeft.resize(rect_w, rect_h) + self.dev_widget.PyDMDrawingRectangle_HLeft.move( + QPoint(left, (widget_h-rect_h)/2)) + self.dev_widget.PyDMDrawingRectangle_HRight.resize(rect_w, rect_h) + self.dev_widget.PyDMDrawingRectangle_HRight.move( + QPoint(right, (widget_h-rect_h)/2)) + + elif self.orientation == 'V': + rect_w = widget_h*3/5 + rect_h = rect_w/2 + circle_d = rect_h + factor = circle_d/vacuum_chamber_d + xc = (widget_h/2 - self._slit_center*factor) + xw = self._slit_width*factor + up = round(xc - rect_h - xw/2) + down = round(xc + xw/2) + + self.dev_widget.PyDMDrawingRectangle_VUp.resize(rect_w, rect_h) + self.dev_widget.PyDMDrawingRectangle_VUp.move( + QPoint((widget_w-rect_w)/2, up)) + self.dev_widget.PyDMDrawingRectangle_VDown.resize(rect_w, rect_h) + self.dev_widget.PyDMDrawingRectangle_VDown.move( + QPoint((widget_w-rect_w)/2, down)) + + self.dev_widget.PyDMDrawingCircle.resize(circle_d, circle_d) + self.dev_widget.PyDMDrawingCircle.move(QPoint( + (widget_w-circle_d)/2, (widget_h-circle_d)/2)) + + axis_w = self.dev_widget.axis.width() + axis_h = self.dev_widget.axis.height() + self.dev_widget.axis.move(QPoint( + (widget_w-axis_w), (widget_h-axis_h)))
+ + +
+[docs] + def channels(self): + """Return channels.""" + return [self.conn_slitcenter, self.conn_slitwidth]
+
+ + + +
+[docs] +class SlitsView(DiffCtrlView): + """Class to create Slits View Widget.""" + + DEVICE_PREFIX = 'TB-01:DI-Slit' + DEVICE_CLASS = SlitMonitoring
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/util.html b/_modules/siriushla/util.html new file mode 100644 index 000000000..cb4bb3de2 --- /dev/null +++ b/_modules/siriushla/util.html @@ -0,0 +1,411 @@ + + + + + + siriushla.util — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.util

+"""Util module."""
+import os as _os
+import time as _time
+import subprocess as _subprocess
+import pkg_resources as _pkg_resources
+from functools import partial as _part
+
+from qtpy.QtCore import QFile as _QFile, Signal as _Signal, QThread as _QThread
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QPushButton, QAction, QApplication, QDialog, \
+    QHBoxLayout, QLabel
+import qtawesome as qta
+from pydm.utilities.stylesheet import _get_style_data as pydm_get_style_data
+
+
+THREAD = None
+
+
+
+[docs] +def get_package_version(): + fname = _pkg_resources.resource_filename(__name__, 'VERSION') + with open(fname, 'r') as _f: + version = _f.read().strip() + return version
+ + + +
+[docs] +def get_monitor_icon(icon_name, color=None): + color = color or QColor(50, 50, 50) + return qta.icon(icon_name, 'mdi.monitor', options=[ + dict(scale_factor=0.8, color=color, offset=(0.0, -0.07)), + dict(scale_factor=1.4, color=color, offset=(0.0, 0.00))])
+ + + +
+[docs] +def set_style(app): + """Implement sirius-hla-style.css as default Qt resource file HLA.""" + abspath = _os.path.abspath(_os.path.dirname(__file__)) + fname = _os.path.join(abspath, 'sirius-hla-style.css') + stream = _QFile(fname) + if stream.open(_QFile.ReadOnly): + style = str(stream.readAll(), 'utf-8') + stream.close() + pydm_style = pydm_get_style_data() + app.setStyleSheet(style + '\n' + pydm_style) + else: + print('set_style: "{0}": {1}'.format(fname, stream.errorString()))
+ + + +
+[docs] +def get_window_id(w_class, **kwargs): + """Serialize parameters.""" + return ''.join([w_class.__name__, str(kwargs)])
+ + + +
+[docs] +def connect_window(widget, w_class, parent, signal=None, **kwargs): + """Connect a widget to a window.""" + signal = signal or get_appropriate_signal(widget) + app = QApplication.instance() + widget.w_class = w_class + widget.kwargs = kwargs + signal.connect(lambda: app.open_window( + app.sender().w_class, parent=parent, **app.sender().kwargs))
+ + + +
+[docs] +def connect_newprocess(widget, cmd, is_window=True, parent=None, signal=None, + is_pydm=False, **kwargs): + """Execute a child program in a new process.""" + signal = signal or get_appropriate_signal(widget) + signal.connect(lambda: run_newprocess(cmd, is_pydm=is_pydm, **kwargs)) + if is_window: + signal.connect(_part(_show_loading_message, parent, cmd, is_pydm))
+ + + +
+[docs] +def check_process(cmd, is_window=True, is_pydm=False): + # Maximize the window if it exists, else create a new one + scmd = (_subprocess.list2cmdline(cmd) if isinstance(cmd, list) else cmd) + window = '' + pid = '' + if is_pydm: + cmdsplit = scmd.split() + _, _, sec, _, app = cmdsplit[0].split('-')[:5] + options = cmdsplit[-1] if len(cmdsplit) > 1 else '' + app = app.split('.py')[0] + scmd = ('ps hx -o pid,command= | grep [s]iriushlacon' + + f' | grep {app} | grep "/bin/pydm"') + if options: + scmd += f' | grep "{options}"' + if sec in {'bo', 'tb', 'ts', 'si'}: + scmd += ' | grep ' + sec.upper() + elif sec == 'as': + name1 = _os.path.join(app, 'main') + name2 = _os.path.join(app, app) + scmd += f' | grep "{name1}\\|{name2}"' + infos = _subprocess.getoutput(scmd).split('\n') + for info in infos: + if not info: + continue + pidc, comm = info.split()[:2] + window = check_window_by_pid(pidc, comm) + if window: + pid = pidc + break + else: + sess = _subprocess.getoutput( + 'ps -A -o sess,args | grep "[p]s -A -o sess,args" | xargs ' + '| cut -f1 -d " " -') + info = _subprocess.getoutput( + 'ps h -A -o pid,sess,command= | grep "['+scmd[0]+']' + + scmd[1:]+'" | grep '+sess) + if info and is_window: + info = info.split('\n')[0] + pid, _, comm = info.split()[:3] + window = check_window_by_pid(pid, comm) + if pid and not window: + infos = _subprocess.getoutput( + 'ps h -o pid,command= --ppid ' + pid).split('\n') + for info in infos: + if not info: + continue + pidc, comm = info.split()[:2] + window = check_window_by_pid(pidc, comm) + if window: + pid = pidc + break + return pid, window
+ + + +
+[docs] +def check_window_by_pid(pid, comm): + if 'edm' in comm: + wind = _subprocess.getoutput('wmctrl -lpx | grep edm | grep SIRIUS') + else: + wind = _subprocess.getoutput('wmctrl -lpx | grep ' + pid) + if not wind: + return '' + window = wind.split('\n')[0].split()[0] + return window
+ + + +
+[docs] +def run_newprocess(cmd, is_window=True, is_pydm=False, **kwargs): + pid, window = check_process(cmd, is_window=is_window, is_pydm=is_pydm) + if window: + _subprocess.run( + "wmctrl -iR " + window, stdin=_subprocess.PIPE, shell=True) + elif not pid: + _subprocess.Popen(cmd, **kwargs)
+ + + +
+[docs] +def get_appropriate_color(section='SI'): + dic = { + 'AS': '#d7ccc8', + 'LI': '#f3d2d5', + 'TB': '#fcaac7', + 'BO': '#c8e6c9', + 'TS': '#b2ebf2', + 'SI': '#56aeff', + 'ID': '#bbbbdd', + 'IT': '#ffece6', + } + if section not in dic: + return '#efefef' + return dic[section]
+ + + +
+[docs] +def get_appropriate_signal(widget): + if isinstance(widget, QAction): + signal = widget.triggered + elif isinstance(widget, QPushButton): + signal = widget.clicked + else: + raise AttributeError("Undefined signal for {}".format(widget)) + return signal
+ + + +def _show_loading_message(parent, cmd, is_pydm=False): + global THREAD + THREAD = LoadingThread(parent, cmd=cmd, is_pydm=is_pydm) + message = LoadingDialog(parent, 'Wait', '<h3>Loading Window</h3>') + THREAD.openmessage.connect(message.show) + THREAD.closemessage.connect(message.close) + THREAD.start() + + +
+[docs] +class LoadingDialog(QDialog): + + def __init__(self, parent, title, message): + super().__init__(parent=parent) + self.setWindowTitle(title) + lay = QHBoxLayout(self) + lay.addWidget(QLabel(message))
+ + + +
+[docs] +class LoadingThread(_QThread): + + openmessage = _Signal() + closemessage = _Signal() + + def __init__(self, parent=None, cmd='', is_pydm=False): + super().__init__(parent=parent) + self.cmd = cmd + self.is_pydm = is_pydm + +
+[docs] + def run(self): + self.openmessage.emit() + wind = '' + for _ in range(500): + _, wind = check_process(self.cmd, is_pydm=self.is_pydm) + if wind: + break + _time.sleep(0.01) + self.closemessage.emit()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/QDoubleScrollBar.html b/_modules/siriushla/widgets/QDoubleScrollBar.html new file mode 100644 index 000000000..cc9d7ce46 --- /dev/null +++ b/_modules/siriushla/widgets/QDoubleScrollBar.html @@ -0,0 +1,455 @@ + + + + + + siriushla.widgets.QDoubleScrollBar — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.QDoubleScrollBar

+"""QDoubleScrollBar module."""
+
+import logging
+import numpy as _np
+
+from qtpy.QtWidgets import QInputDialog, QScrollBar, QMenu, QToolTip
+from qtpy.QtCore import Qt, Signal, Slot, Property, QPoint
+
+logger = logging.getLogger(__name__)
+logger.setLevel(logging.INFO)
+
+
+
+[docs] +class QDoubleScrollBar(QScrollBar): + """A QScrollBar that handles float values.""" + + rangeChanged = Signal(float, float) + sliderMoved = Signal(float) + valueChanged = Signal(float) + + def __init__(self, orientation=Qt.Horizontal, parent=None): + """Init.""" + self._decimals = 0 + self._scale = 1 + super(QDoubleScrollBar, self).__init__(orientation, parent) + super().rangeChanged.connect(self._intercept_rangeChanged) + super().sliderMoved.connect(self._intercept_sliderMoved) + super().valueChanged.connect(self._intercept_valueChanged) + + menu = QMenu(self) + ac = menu.addAction('Set Single Step') + ac.triggered.connect(self.dialogSingleStep) + ac = menu.addAction('Set Page Step') + ac.triggered.connect(self.dialogPageStep) + menu.addSeparator() + ac = menu.addAction("Left edge") + ac.triggered.connect(lambda: self.triggerAction(self.SliderToMinimum)) + ac = menu.addAction("Right edge") + ac.triggered.connect(lambda: self.triggerAction(self.SliderToMaximum)) + self.contextMenu = menu + +
+[docs] + @Slot(bool) + def dialogSingleStep(self, value): + """Show dialog to set singleStep.""" + mini = 1/self._scale + maxi = (self.maximum - self.minimum)/10 + d, okPressed = QInputDialog.getDouble(self, "Single Step", + "Single Step:", self.singleStep, + mini, maxi, self._decimals) + if okPressed: + self.setSingleStep(d)
+ + +
+[docs] + def dialogPageStep(self, value): + """Show dialog to set pageStep.""" + mini = 10/self._scale + maxi = (self.maximum - self.minimum) + d, okPressed = QInputDialog.getDouble(self, "Page Step", "Page Step:", + self.pageStep, + mini, maxi, self._decimals) + if okPressed: + self.setPageStep(d)
+ + +
+[docs] + def contextMenuEvent(self, ev): + """Show context menu.""" + self.contextMenu.exec_(ev.globalPos())
+ + +
+[docs] + def getDecimals(self): + """Return decimals.""" + return self._decimals
+ + +
+[docs] + def setDecimals(self, value): + """Set decimals.""" + mini = self.getMinimum() + maxi = self.getMaximum() + sgstep = self.getSingleStep() + pgstep = self.getPageStep() + val = self.getValue() + slpos = self.getSliderPosition() + + self._decimals = value + self._scale = 10**value + self.setMinimum(mini) + self.setMaximum(maxi) + self.setSingleStep(sgstep) + self.setPageStep(pgstep) + self.setValue(val) + self.setSliderPosition(slpos)
+ + + decimals = Property(int, getDecimals, setDecimals) + +
+[docs] + def getMinimum(self): + """Return minimum value.""" + return super().minimum()/self._scale
+ + +
+[docs] + def setMinimum(self, value): + """Set minimum value.""" + if _np.isnan(value): + value = 0 + try: + mini = round(value*self._scale) + mini = min(mini, 2**31-1) + mini = max(-2**31, mini) + super().setMinimum(mini) + except (OverflowError, ValueError) as err: + logging.warning(str(err), '(value=' + str(value) + ')')
+ + + minimum = Property(float, getMinimum, setMinimum) + +
+[docs] + def getMaximum(self): + """Return maximum value.""" + return super().maximum()/self._scale
+ + +
+[docs] + def setMaximum(self, value): + """Set maximum value.""" + if _np.isnan(value): + value = 0 + try: + maxi = round(value*self._scale) + maxi = min(maxi, 2**31-1) + maxi = max(-2**31, maxi) + super().setMaximum(maxi) + except (OverflowError, ValueError) as err: + logging.warning(str(err), '(value=' + str(value) + ')')
+ + + maximum = Property(float, getMaximum, setMaximum) + +
+[docs] + def getSingleStep(self): + """Get single step.""" + return super().singleStep()/self._scale
+ + +
+[docs] + def setSingleStep(self, value): + """Set single step.""" + val = round(value*self._scale) + rang = super().maximum() - super().minimum() + if not val: + super().setSingleStep(1) + elif val > round(rang/10): + super().setSingleStep(round(rang/10)) + else: + super().setSingleStep(val)
+ + + singleStep = Property(float, getSingleStep, setSingleStep) + +
+[docs] + def getPageStep(self): + """Get page step.""" + return super().pageStep()/self._scale
+ + +
+[docs] + def setPageStep(self, value): + """Set page step.""" + val = round(value*self._scale) + rang = super().maximum() - super().minimum() + if val < 10: + super().setPageStep(10) + elif val > round(rang): + super().setPageStep(round(rang)) + else: + super().setPageStep(val)
+ + + pageStep = Property(float, getPageStep, setPageStep) + +
+[docs] + def getValue(self): + """Get value.""" + return super().value()/self._scale
+ + +
+[docs] + @Slot(float) + def setValue(self, value): + """Set value.""" + if value is None: + return + try: + val = round(value*self._scale) + val = min(val, 2**31-1) + val = max(-2**31, val) + super().setValue(val) + except (OverflowError, ValueError) as err: + logging.warning(str(err), '(value=' + str(value) + ')')
+ + + value = Property(float, getValue, setValue) + +
+[docs] + def getSliderPosition(self): + """Get slider position.""" + return super().sliderPosition()/self._scale
+ + +
+[docs] + def setSliderPosition(self, value): + """Set slider position.""" + pos = round(value*self._scale) + pos = min(pos, 2**31-1) + pos = max(-2**31, pos) + super().setSliderPosition(pos)
+ + + sliderPosition = Property(float, getSliderPosition, setSliderPosition) + +
+[docs] + def keyPressEvent(self, event): + """Reimplement keyPressEvent.""" + singlestep = self.getSingleStep() + pagestep = self.getPageStep() + ctrl_hold = self.app.queryKeyboardModifiers() == Qt.ControlModifier + if ctrl_hold and (event.key() == Qt.Key_Left): + self.setSingleStep(10*singlestep) + self.setPageStep(10*pagestep) + self._show_step_tooltip() + elif ctrl_hold and (event.key() == Qt.Key_Right): + self.setSingleStep(0.1*singlestep) + self.setPageStep(0.1*pagestep) + self._show_step_tooltip() + else: + super().keyPressEvent(event)
+ + + def _show_step_tooltip(self): + QToolTip.showText( + self.mapToGlobal( + QPoint(self.x()+self.width()/2, self.y()-2*self.height())), + 'Single step: '+str(self.singleStep) + + '\nPage step: '+str(self.pageStep), + self, self.rect(), 1000) + +
+[docs] + @Slot(float, float) + def setRange(self, mini, maxi): + """Set range.""" + mini = max(-2**31, round(mini/self._scale)) + maxi = min(round(maxi*self._scale), 2**31-1) + super().setRange(mini, maxi)
+ + + @Slot(int, int) + def _intercept_rangeChanged(self, mini, maxi): + self.rangeChanged.emit(mini/self._scale, maxi/self._scale) + + @Slot(int) + def _intercept_sliderMoved(self, value): + self.sliderMoved.emit(value/self._scale) + + @Slot(int) + def _intercept_valueChanged(self, value): + self.valueChanged.emit(value/self._scale)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/QLed.html b/_modules/siriushla/widgets/QLed.html new file mode 100644 index 000000000..fb5980f6e --- /dev/null +++ b/_modules/siriushla/widgets/QLed.html @@ -0,0 +1,541 @@ + + + + + + siriushla.widgets.QLed — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.widgets.QLed

+"""QLed module.
+
+Based on Robert Kent's LED Widget for the PyQt Framework, available on
+https://pypi.python.org/pypi/QLed or https://github.com/jazzycamel/QLed.
+"""
+
+import os as _os
+from colorsys import rgb_to_hls, hls_to_rgb
+from qtpy.QtWidgets import QApplication, QWidget, QGridLayout, \
+                            QStyleOption, QFrame
+from qtpy.QtGui import QPainter, QColor
+from qtpy.QtCore import Signal, Qt, QSize, QTimer, QByteArray, \
+                        QRectF, Property, Q_ENUMS, QFile
+from qtpy.QtSvg import QSvgRenderer
+
+
+
+[docs] +class ShapeMap: + """Shape enum mapping class.""" + + Circle = 1 + Round = 2 + Square = 3 + Triangle = 4 + Rectangle = 5
+ + + +
+[docs] +class QLed(QFrame, ShapeMap): + """QLed class.""" + + ShapeMap = ShapeMap + Q_ENUMS(ShapeMap) + + abspath = _os.path.abspath(_os.path.dirname(__file__)) + shapesdict = dict() + f = QFile(_os.path.join(abspath, 'resources/led_shapes/circle.svg')) + if f.open(QFile.ReadOnly): + shapesdict[ShapeMap.Circle] = str(f.readAll(), 'utf-8') + f.close() + f = QFile(_os.path.join(abspath, 'resources/led_shapes/round.svg')) + if f.open(QFile.ReadOnly): + shapesdict[ShapeMap.Round] = str(f.readAll(), 'utf-8') + f.close() + f = QFile(_os.path.join(abspath, 'resources/led_shapes/square.svg')) + if f.open(QFile.ReadOnly): + shape = str(f.readAll(), 'utf-8') + shapesdict[ShapeMap.Square] = shape + shapesdict[ShapeMap.Rectangle] = shape + f.close() + f = QFile(_os.path.join(abspath, 'resources/led_shapes/triangle.svg')) + if f.open(QFile.ReadOnly): + shapesdict[ShapeMap.Triangle] = str(f.readAll(), 'utf-8') + f.close() + + Green = QColor(15, 105, 0) + DarkGreen = QColor(20, 80, 10) + LightGreen = QColor(0, 140, 0) + Red = QColor(207, 0, 0) + DarkRed = QColor(120, 0, 0) + Blue = QColor(0, 0, 255) + Gray = QColor(90, 90, 90) + SelColor = QColor(0, 0, 0) + NotSelColor1 = QColor(251, 244, 252) + NotSelColor2 = QColor(173, 173, 173) + Yellow = QColor(210, 205, 0) + + clicked = Signal() + selected = Signal(bool) + + def __init__(self, parent=None, **kwargs): + """Class constructor.""" + super().__init__(parent, **kwargs) + self.m_state = 0 + self.m_stateColors = [self.Red, self.Green] + + self.m_dsblColor = self.Gray + self.m_shape = self.ShapeMap.Circle + + self._pressed = False + self._isselected = False + self.renderer = QSvgRenderer() + +
+[docs] + def getState(self): + """Value property getter.""" + return self.m_state
+ + +
+[docs] + def setState(self, value): + """Value property setter.""" + self.m_state = value + self.update()
+ + + state = Property(bool, getState, setState) + +
+[docs] + def getOnColor(self): + """On color property getter.""" + return self.m_stateColors[1]
+ + +
+[docs] + def setOnColor(self, newColor): + """On color property setter.""" + self.m_stateColors[1] = newColor + self.update()
+ + + onColor = Property(QColor, getOnColor, setOnColor) + +
+[docs] + def getOffColor(self): + """Off color property getter.""" + return self.m_stateColors[0]
+ + +
+[docs] + def setOffColor(self, newColor): + """Off color property setter.""" + self.m_stateColors[0] = newColor + self.update()
+ + + offColor = Property(QColor, getOffColor, setOffColor) + + @property + def stateColors(self): + """Color list property getter.""" + return list(self.m_stateColors) + + @stateColors.setter + def stateColors(self, new_colors): + """Color list property setter.""" + if not isinstance(new_colors, (list, tuple)) or\ + len(new_colors) < 2 or not isinstance(new_colors[0], QColor): + return + self.m_stateColors = list(new_colors) + +
+[docs] + def getDsblColor(self): + """Disabled color property getter.""" + return self.m_dsblColor
+ + +
+[docs] + def setDsblColor(self, newColor): + """Disabled color property setter.""" + self.m_dsblColor = newColor + self.update()
+ + + dsblColor = Property(QColor, getDsblColor, setDsblColor) + +
+[docs] + def getShape(self): + """Shape property getter.""" + return self.m_shape
+ + +
+[docs] + def setShape(self, newShape): + """Shape property setter.""" + self.m_shape = newShape + self.update()
+ + + shape = Property(ShapeMap, getShape, setShape) + +
+[docs] + def sizeHint(self): + """Return the base size of the widget according to shape.""" + if self.m_shape == self.ShapeMap.Triangle: + return QSize(48, 36) + elif self.m_shape == self.ShapeMap.Round: + return QSize(72, 36) + elif self.m_shape == self.ShapeMap.Rectangle: + return QSize(36, 72) + return QSize(36, 36)
+ + +
+[docs] + def adjust(self, r, g, b): + """Adjust the color to set on svg code.""" + def normalise(x): + return x/255.0 + + def denormalise(x): + if x <= 1: + return int(x*255.0) + else: + return 255.0 + + (h, l, s) = rgb_to_hls(normalise(r), normalise(g), normalise(b)) + (nr, ng, nb) = hls_to_rgb(h, l*1.5, s) + + return (denormalise(nr), denormalise(ng), denormalise(nb))
+ + +
+[docs] + def getRGBfromQColor(self, qcolor): + """Convert QColors to a tupple of rgb colors to set on svg code.""" + redhex = qcolor.red() + greenhex = qcolor.green() + bluehex = qcolor.blue() + return (redhex, greenhex, bluehex)
+ + +
+[docs] + def paintEvent(self, event): + """Handle appearence of the widget on state updates.""" + self.style().unpolish(self) + self.style().polish(self) + option = QStyleOption() + option.initFrom(self) + + h = option.rect.height() + w = option.rect.width() + if self.m_shape in (self.Triangle, self.Round, self.Rectangle): + aspect = (4/3.0) if self.m_shape == self.ShapeMap.Triangle \ + else 2.0 if self.m_shape == self.ShapeMap.Round \ + else (1/2.0) + ah = w/aspect + aw = w + if ah > h: + ah = h + aw = h*aspect + x = abs(aw-w)/2.0 + y = abs(ah-h)/2.0 + bounds = QRectF(x, y, aw, ah) + else: + size = min(w, h) + x = abs(size-w)/2.0 + y = abs(size-h)/2.0 + bounds = QRectF(x, y, size, size) + + painter = QPainter(self) + painter.setRenderHint(QPainter.Antialiasing, True) + + ind = self.m_state % len(self.m_stateColors) + dark_r, dark_g, dark_b = self.getRGBfromQColor(self.m_stateColors[ind]) + if not self.isEnabled(): + dark_r, dark_g, dark_b = self.getRGBfromQColor(self.m_dsblColor) + + sel1_r, sel1_g, sel1_b = self.getRGBfromQColor(self.SelColor) + sel2_r, sel2_g, sel2_b = self.getRGBfromQColor(self.SelColor) + opc = '1.000' + if not self.isSelected(): + sel1_r, sel1_g, sel1_b = self.getRGBfromQColor(self.NotSelColor1) + sel2_r, sel2_g, sel2_b = self.getRGBfromQColor(self.NotSelColor2) + opc = '0.145' + + dark_str = "rgb(%d,%d,%d)" % (dark_r, dark_g, dark_b) + light_str = "rgb(%d,%d,%d)" % self.adjust(dark_r, dark_g, dark_b) + sel1_str = "rgb(%d,%d,%d)" % (sel1_r, sel1_g, sel1_b) + sel2_str = "rgb(%d,%d,%d)" % (sel2_r, sel2_g, sel2_b) + + shape_bytes = bytes(self.shapesdict[self.m_shape] % ( + sel1_str, opc, sel2_str, dark_str, light_str), 'utf-8') + + self.renderer.load(QByteArray(shape_bytes)) + self.renderer.render(painter, bounds)
+ + +
+[docs] + def mousePressEvent(self, event): + """Handle mouse press event.""" + self._pressed = True + super().mousePressEvent(event)
+ + +
+[docs] + def mouseReleaseEvent(self, event): + """Handle mouse release event.""" + if self._pressed: + self._pressed = False + self.clicked.emit() + super().mouseReleaseEvent(event)
+ + +
+[docs] + def toggleState(self): + """Toggle state property.""" + self.m_state = 0 if self.m_state else 1 + self.update()
+ + +
+[docs] + def isSelected(self): + """Return selected state of object.""" + return self._isselected
+ + +
+[docs] + def setSelected(self, sel): + """Configure selected state of object.""" + self._isselected = bool(sel) + self.selected.emit(self._isselected) + self.update()
+ + +
+[docs] + def toggleSelected(self): + """Toggle isSelected property.""" + self.setSelected(not self.isSelected())
+
+ + + +if __name__ == "__main__": + from sys import argv, exit + + class Test(QWidget): + """Test class.""" + + def __init__(self, parent=None): + """Test class constructor.""" + QWidget.__init__(self, parent) + + self.setWindowTitle("QLed Test") + + _l = QGridLayout() + self.setLayout(_l) + + colorsdict = {'Red': QColor(207, 0, 0), + 'Green': QColor(15, 105, 0), + 'Yellow': QColor(210, 205, 0), + 'Orange': QColor(218, 70, 21), + 'Purple': QColor(135, 0, 131), + 'Blue': QColor(0, 3, 154)} + + self.leds = [] + for row, shape in enumerate(QLed.shapesdict.keys()): + for col, color in enumerate(colorsdict.keys()): + led = QLed(self) + led.setOnColor(colorsdict[color]) + led.setOffColor(QColor(90, 90, 90)) + led.setShape(shape) + _l.addWidget(led, row, col, Qt.AlignCenter) + self.leds.append(led) + + self.toggleLeds() + + def toggleLeds(self): + """Toggle leds state.""" + for led in self.leds: + led.toggleState() + QTimer.singleShot(1000, self.toggleLeds) + + a = QApplication(argv) + t = Test() + t.show() + t.raise_() + exit(a.exec_()) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/bar_graph.html b/_modules/siriushla/widgets/bar_graph.html new file mode 100644 index 000000000..c03ef7073 --- /dev/null +++ b/_modules/siriushla/widgets/bar_graph.html @@ -0,0 +1,568 @@ + + + + + + siriushla.widgets.bar_graph — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.widgets.bar_graph

+"""This module defines a widget that represent a PV as bar graph."""
+import logging
+
+import epics
+import numpy as np
+import pyqtgraph as pg
+
+from pydm.widgets.channel import PyDMChannel
+from qtpy.QtCore import QTimer, QSize
+
+logging.basicConfig(level=logging.DEBUG)
+
+
+
+[docs] +class BarGraphModel: + """Model for BarGraphWidget.""" + + def __init__(self, waveform=[], width=1, brush="b", scale=1): + """Set waveform and parameters.""" + self._pvname = None + + self._waveform = waveform + + self._size = len(self._waveform) + self.x = range(self.size) + + self.width = width + self.brush = brush + self.scale = scale + + @property + def waveform(self): + """Return the value read from PV.""" + return self._waveform + + @waveform.setter + def waveform(self, waveform): + self._waveform = waveform + self.size = len(waveform) + + @property + def size(self): + """Return size of PV array.""" + return self._size + + @size.setter + def size(self, size): + self._size = size + self.x = range(self._size) + +
+[docs] + def connected(self): + """Return always connected.""" + return True
+
+ + + +
+[docs] +class EpicsBarGraphModel: + """Handle the model data to be represented as a bar graph.""" + + TIMEOUT = 0.2 + + def __init__(self, width=1, brush=None, scale=1, update_interval=1000): + """Set model data. + + pvname - pv to be represented as a graph + size - size of the array + scale - scale the array values + update_interval - interval to read PV and update view + """ + self._pvname = None + + self._size = 0 + self.x = range(self.size) + + self.width = width + self.brush = brush + self.scale = scale + self.update_interval = update_interval + + self._connect() + + @property + def pvname(self): + """Name of the PV to retrieve value.""" + return self._pvname + + @pvname.setter + def pvname(self, pvname): + self._pvname = pvname + self._connect() + + self.x = range(self._size) + + @property + def waveform(self): + """Retrun the value read from PV.""" + waveform = self.pv.get(timeout=self.TIMEOUT) + return [val*self.scale for val in waveform] + + @property + def size(self): + """Return size of PV array.""" + return self._size + + @size.setter + def size(self, size): + self._size = size + + @property + def connected(self): + """Return connection status.""" + return self.pv.status + + def _connect(self): + if self.pvname is not None: + self.pv = epics.PV(self.pvname) + self.pv.wait_for_connection(timeout=self.TIMEOUT) + if self.pv is None: + logging.warning("Failed to connect to PV.") + else: + self.pv.get(timeout=self.TIMEOUT) + self.size = self.pv.count + else: + self.pv = None
+ + + +
+[docs] +class PyDMBarGraphModel: + """Data model for the bar graph widget based on PyDMChannel.""" + + def __init__(self, init_channel=None, width=1, brush=None, + scale=1, update_interval=1000): + """Set epics channel connection. + + init_channel - pv to be represented as a graph + size - size of the array + scale - scale the array values + update_interval - interval to read PV and update view + """ + self.channel = init_channel + self._channels = None + + self._connected = False + + self._size = 0 + self.x = range(self.size) + + self.width = width + self.brush = brush + self.scale = scale + self.update_interval = update_interval + + self._value = None + self._waveform = [] + + @property + def waveform(self): + """Return waveform array.""" + waveform = self._value + if waveform is None: + return None + return np.array([val*self.scale for val in waveform]) + + @waveform.setter + def waveform(self, waveform): + self._value = waveform + + @property + def size(self): + """Return size of PV array.""" + return self._size + + @size.setter + def size(self, size): + self._size = size + self.x = range(self._size) + + @property + def connected(self): + """Return connection status.""" + return self._connected + +
+[docs] + def connectionChanged(self, conn): + """Slot called when connection state changes.""" + logging.debug("Connection changed to {}".format(conn)) + self._connected = conn
+ + +
+[docs] + def valueChanged(self, value): + """Slot called when value changes.""" + self.waveform = value + self.size = len(value)
+ + + # @Slot(list) + # def waveformChanged(self, waveform): + # """Slot called when value changes (PV of type array).""" + # self.waveform = waveform + + # @Slot(int) + # def countChanged(self, count): + # """Slot called when count changes.""" + # self.size = count + +
+[docs] + def channels(self): + """Define slots and signals mappings for the epics channel.""" + if self._channels is None: + self._channels = [ + PyDMChannel( + address=self.channel, + connection_slot=lambda conn: self.connectionChanged(conn), + value_slot=lambda val: self.valueChanged(val))] + # waveform_slot=lambda wvfrm: self.waveformChanged(wvfrm), + # count_slot=lambda count: self.countChanged(count))] + return self._channels
+
+ + + +
+[docs] +class BaseBarGraphWidget(pg.PlotWidget): + """Widget that represents a waveform as a bar graph. + + Uses pyqtgraph (PlotWidget and BarGraphItem) to represent a wave, + usually an array, as a bar graph. + + Functions: + set_scale - sets a scale factor for viewing the graph; + set_width - set the widtg of the bars; + set_brush - set brush color. + """ + + # Public Interface +
+[docs] + def set_scale(self, scale): + """Set scale.""" + self.model.scale = scale
+ + +
+[docs] + def set_width(self, width): + """Set bar width.""" + self.model.width = width
+ + +
+[docs] + def set_brush(self, color): + """Set brush color.""" + self.model.brush = color
+ + + # Private methods + def _plot(self): + y = self.model.waveform + if y is None: + logging.warning("Failed to read PV value") + return + + if not self.model.connected: + logging.warning("Connection is down") + return + + item = pg.BarGraphItem(x=self.model.x, height=y, + width=self.model.width, brush=self.model.brush) + self.addItem(item) + self.plot() + + def _update(self): + self.clear() + self._plot() + +
+[docs] + def sizeHint(self): + """Preferred size.""" + return QSize(2048, 400)
+
+ + + +
+[docs] +class BarGraphWidget(BaseBarGraphWidget): + """Widget to show a waveform as graph of bars. + + Functions: + set_waveform - plot a waveform (array) as a bar graph; + Also see BaseBarGraphWidget. + """ + + def __init__(self, **kwargs): + """Init PlotWidget. + + Constructor optional parameters: + - scale: scale factor; + - width: bar width; + - brush: brush color; + - waveform: waveform to be displayed. + """ + super().__init__() + self.model = BarGraphModel(**kwargs) + + # Public Interface +
+[docs] + def set_waveform(self, waveform): + """Set waveform.""" + self.model.waveform = waveform + self._update()
+
+ + + +
+[docs] +class PyDMBarGraph(BaseBarGraphWidget): + """Widget that represents a PV as a bar graph. + + The widget reads a PV value and updates it synchronously. + + Functions: + set_update_interval - set the update interval at which the PV value is + is queried and the view is updated; + Also see BaseBarGraphWidget. + """ + + def __init__(self, channel=None, **kwargs): + """Set model and start timer. + + Constructor parameters: + - channel: pv channel to be read; + - scale: scale factor; + - width: bar width; + - brush: brush color; + - update_interval: interval to update view. + """ + super().__init__() + self.model = PyDMBarGraphModel(init_channel=channel, **kwargs) + self.update_timer = QTimer(self) + self.update_timer.timeout.connect(self._update) + + # Public interface +
+[docs] + def start(self): + """Start running timer.""" + self.update_timer.start(self.model.update_interval)
+ + +
+[docs] + def stop(self): + """Stop.""" + self.update_timer.stop()
+ + +
+[docs] + def set_update_interval(self, interval): + """Set timer update interval.""" + self.update_timer.stop() + self.model.update_interval = interval + self.update_timer.start(self.model.update_interval)
+ + +
+[docs] + def channels(self): + """Used by PyDmApplication to set the model channel.""" + if isinstance(self.model, PyDMBarGraphModel): + return self.model.channels() + return [PyDMChannel()]
+
+ + + +if __name__ == "__main__": + import sys + from pydm import PyDMApplication + + app = PyDMApplication(None, sys.argv) + w = BarGraphWidget() + w.set_scale(100) + w.set_brush("b") + pv = "fac-lnls455-linux-SI-13C4:DI-DCCT:BbBCurrent-Mon" + w.model.channel = pv + w.show() + sys.exit(app.exec_()) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/detachable_tabwidget.html b/_modules/siriushla/widgets/detachable_tabwidget.html new file mode 100644 index 000000000..60bc09197 --- /dev/null +++ b/_modules/siriushla/widgets/detachable_tabwidget.html @@ -0,0 +1,373 @@ + + + + + + siriushla.widgets.detachable_tabwidget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.detachable_tabwidget

+"""."""
+from qtpy.QtWidgets import QTabBar, QTabWidget, qApp, QMessageBox
+from qtpy.QtCore import Signal, Slot, QPoint, Qt
+from qtpy.QtGui import QCursor
+
+from ..widgets import SiriusMainWindow
+
+
+
+[docs] +class DetachableTabWidget(QTabWidget): + """ + The DetachableTabWidget adds additional functionality to Qt's + QTabWidget that allows it to detach and re-attach tabs. + + Detach tabs by double clicking the tab + + Adapted from https://stackoverflow.com/questions/47267195/in-pyqt-is-it-possible-to-detach-tabs-from-a-qtabwidget + + Original by Stack Overflow user: Blackwood, 13/11/2017 + """ + + def __init__(self, parent=None): + """.""" + + super().__init__(parent=parent) + + self.tabBar = TabBar(self) + self.tabBar.onDetachTabSignal.connect(self.detachTab) + self.setTabBar(self.tabBar) + + # Used to keep a reference to detached tabs since their QMainWindow + # does not have a parent + self.detachedTabs = dict() + + # Close all detached tabs if the application is closed explicitly + qApp.aboutToQuit.connect(self.closeDetachedTabs) # @UndefinedVariable + +
+[docs] + @Slot(int, QPoint) + def detachTab(self, index, point): + """Detach tab from TabWidget.""" + # Get the tab content + name = self.objectName() + text = self.tabText(index) + icon = self.tabIcon(index) + if icon.isNull(): + icon = self.window().windowIcon() + contentWidget = self.widget(index) + + try: + contentWidgetRect = contentWidget.frameGeometry() + except AttributeError: + return + + # Create a new detached tab window + detachedTab = DetachedTab(name, text, contentWidget, parent=self) + detachedTab.setWindowModality(Qt.NonModal) + detachedTab.setWindowIcon(icon) + detachedTab.setGeometry(contentWidgetRect) + detachedTab.onAttachSignal.connect(self.attachTabSlot) + detachedTab.move(point) + detachedTab.show() + + # Create a reference to maintain access to the detached tab + self.detachedTabs[text] = (detachedTab, index)
+ + +
+[docs] + def attachTab(self, contentWidget, name, icon, index): + """Attach tab to QTabWidget.""" + # Create an image from the given icon (for comparison) + if not icon.isNull(): + try: + tabIconPixmap = icon.pixmap(icon.availableSizes()[0]) + tabIconImage = tabIconPixmap.toImage() + except IndexError: + tabIconImage = None + else: + tabIconImage = None + + # Create an image of the main window icon (for comparison) + if not icon.isNull(): + try: + windowIconPixmap = self.window().windowIcon().pixmap( + icon.availableSizes()[0]) + windowIconImage = windowIconPixmap.toImage() + except IndexError: + windowIconImage = None + else: + windowIconImage = None + + # Determine if the given image and the main window icon are the same. + # If they are, then do not add the icon to the tab + if tabIconImage == windowIconImage: + index = self.insertTab(index, contentWidget, name) + else: + index = self.insertTab(index, contentWidget, icon, name) + # Make this tab the current tab + if index > -1: + self.setCurrentIndex(index)
+ + +
+[docs] + @Slot(str) + def attachTabSlot(self, name): + """Slot responsible for attaching tab to QTabWidget.""" + wind, index = self.detachedTabs[name] + + # Create references to the detached tab's content and icon + indcs = sorted(idx for _, idx in self.detachedTabs.values()) + index -= indcs.index(index) + contentWidget = wind.contentWidget + icon = wind.windowIcon() + + # Make the content widget a child of this widget + contentWidget.setParent(self) + wind.onAttachSignal.disconnect() + wind.do_close() + del self.detachedTabs[name] + + self.attachTab(contentWidget, name, icon, index)
+ + +
+[docs] + def closeDetachedTabs(self): + """Slot responsible for clsing detached tabs.""" + for dettab, _ in self.detachedTabs.values(): + dettab.do_close()
+
+ + + +
+[docs] +class DetachedTab(SiriusMainWindow): + """Reimplement SiriusMainWindow to accomodated detached tabs.""" + onAttachSignal = Signal(str) + + def __init__(self, name, text, contentWidget, parent=None): + """.""" + SiriusMainWindow.__init__(self, parent) + self._do_close = False + self.setObjectName(name[:2] + 'App') + self.setWindowTitle(text) + + self.menuBar().addAction('Attach Tab', self._retach_tab) + self.contentWidget = contentWidget + self.setCentralWidget(self.contentWidget) + self.contentWidget.show() + +
+[docs] + def do_close(self): + """.""" + self._do_close = True + self.close()
+ + +
+[docs] + def closeEvent(self, event): + """.""" + if self._do_close: + event.accept() + else: + event.ignore() + # self._retach_tab() + QMessageBox.information( + self, 'Operation not Permitted', + 'It is not possible to close this window.\n' + + 'Please click in the MenuBar option "Attach Tab" '+ + 'to re-attach it to the original TabWidget.')
+ + + @Slot() + def _retach_tab(self): + self.onAttachSignal.emit(self.windowTitle())
+ + + +
+[docs] +class TabBar(QTabBar): + """Reimplement QTabBar to add DoubleClickEvent handling.""" + onDetachTabSignal = Signal(int, QPoint) + + def __init__(self, parent=None): + """.""" + QTabBar.__init__(self, parent) + + self.setAcceptDrops(True) + self.setToolTip('Double click to detach Tab.') + self.setElideMode(Qt.ElideRight) + self.setSelectionBehaviorOnRemove(QTabBar.SelectLeftTab) + + self.mouseCursor = QCursor() + +
+[docs] + def mouseDoubleClickEvent(self, event): + """.""" + event.accept() + self.onDetachTabSignal.emit( + self.tabAt(event.pos()), self.mouseCursor.pos())
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/dialog/progress_dialog.html b/_modules/siriushla/widgets/dialog/progress_dialog.html new file mode 100644 index 000000000..c8c09efa0 --- /dev/null +++ b/_modules/siriushla/widgets/dialog/progress_dialog.html @@ -0,0 +1,311 @@ + + + + + + siriushla.widgets.dialog.progress_dialog — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.dialog.progress_dialog

+"""Dialog that handle thread that implement a task interface.
+
+Task QThread Interface:
+- itemDone: Signal
+- size: method that return task size
+- exit_task: set quit_thread flag True
+"""
+import time
+from qtpy.QtCore import Signal, QThread
+from qtpy.QtWidgets import QDialog, QVBoxLayout, QLabel, QPushButton, \
+    QProgressBar
+
+
+
+[docs] +class ProgressDialog(QDialog): + """Progress dialog. + + Parameters + ---------- + label - string or list of strings + task - QThread or list of QThread (implementing task interface) + parent - QObject + """ + + canceled = Signal() + + def __init__(self, label, task, parent=None): + """Constructor.""" + super().__init__(parent) + self._label = label + self._task = task + + if (isinstance(self._label, (list, tuple)) and + isinstance(self._task, (list, tuple)) and + len(self._label) == len(self._task)) or \ + (isinstance(self._label, str) and + isinstance(self._task, QThread)): + pass + else: + raise ValueError() + + self._setup_ui() + + def _setup_ui(self): + self.layout = QVBoxLayout() + + self.dlg_label = QLabel(self) + self.cur_item_label = QLabel(self) + self.progress_bar = QProgressBar(self) + self.cancel = QPushButton('Cancel', self) + + self.layout.addWidget(self.dlg_label) + self.layout.addWidget(self.cur_item_label) + self.layout.addWidget(self.progress_bar) + self.layout.addWidget(self.cancel) + + self.setLayout(self.layout) + + # Set initial value + self.progress_bar.setValue(0) + + # Set progress bar limits and connect signals + self.progress_bar.setMinimum(0) + if hasattr(self._task, '__iter__'): + self.dlg_label.setText(self._label[0]) + self._task[0].currentItem.connect(self.cur_item_label.setText) + self._task[0].itemDone.connect(self.inc_value) + pb_max = self._task[0].size() + for i in range(1, len(self._task)): + self._task[i].currentItem.connect(self.cur_item_label.setText) + self._task[i].itemDone.connect(self.inc_value) + self._task[i-1].completed.connect(self._update_label) + self._task[i-1].completed.connect(self._task[i].start) + self._task[i-1].finished.connect(self._task[i-1].deleteLater) + pb_max += self._task[i].size() + self.progress_bar.setMaximum(pb_max) + self._task[-1].completed.connect(lambda: self._exit_dlg(1)) + self._task[-1].finished.connect(self._task[-1].deleteLater) + else: + self.dlg_label.setText(self._label) + self._task.currentItem.connect(self.cur_item_label.setText) + self._task.itemDone.connect(self.inc_value) + self._task.finished.connect(self._task.deleteLater) + self._task.completed.connect(lambda: self._exit_dlg(1)) + self.progress_bar.setMaximum(self._task.size()) + + self.cancel.pressed.connect(self.canceled.emit) + self.canceled.connect(lambda: self._exit_dlg(0)) + self.progress_bar.valueChanged.connect(self._is_finished) + + def _update_label(self): + next_idx = self._label.index(self.dlg_label.text()) + 1 + if next_idx < len(self._label): + self.dlg_label.setText(self._label[next_idx]) + + def _exit_dlg(self, result): + if hasattr(self._task, '__iter__'): + for task in self._task: + task.exit_task() + self._wait_task(self._task[-1]) + else: + self._task.exit_task() + self._wait_task(self._task) + if result == 1: + self.accept() + elif result == 0: + self.reject() + + def _wait_task(self, task): + init = time.time() + try: + while task.isRunning(): + time.sleep(0.1) + if time.time() - init > 10: + self._exit_dlg(0) + raise Exception('Thread will not leave') + except RuntimeError: + pass + + def _is_finished(self): + if self.progress_bar.value() == self.progress_bar.maximum(): + self._exit_dlg(1) + +
+[docs] + def set_value(self, value): + """Set progress bar value.""" + self.progress_bar.setValue(value)
+ + +
+[docs] + def inc_value(self): + """Increase value.""" + self.progress_bar.setValue(self.progress_bar.value()+1)
+ + +
+[docs] + def exec_(self): + """Override.""" + if hasattr(self._task, '__iter__'): + self._task[0].start() + else: + self._task.start() + return super().exec_()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/dialog/ps_status_dialog.html b/_modules/siriushla/widgets/dialog/ps_status_dialog.html new file mode 100644 index 000000000..3bfc28175 --- /dev/null +++ b/_modules/siriushla/widgets/dialog/ps_status_dialog.html @@ -0,0 +1,226 @@ + + + + + + siriushla.widgets.dialog.ps_status_dialog — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.dialog.ps_status_dialog

+"""List with power supplies cycling status."""
+
+from qtpy.QtWidgets import QListWidget, QApplication, QDialog, QVBoxLayout, \
+    QLabel, QPushButton
+
+from siriushla.as_ps_control.PSDetailWindow import PSDetailWindow
+
+
+
+[docs] +class PSList(QListWidget): + """PS List.""" + + def __init__(self, pwrsupplies=set(), parent=None): + """Constructor.""" + super().__init__(parent) + self._pwrsupplies = pwrsupplies + self._setup_ui() + self.doubleClicked.connect(self._open_detail) + + @property + def pwrsupplies(self): + """List items.""" + return self._pwrsupplies + + @pwrsupplies.setter + def pwrsupplies(self, pwrsupplies): + self._pwrsupplies = pwrsupplies + self._setup_ui() + + def _setup_ui(self): + self.clear() + self.addItems(self._pwrsupplies) + + def _open_detail(self, index): + app = QApplication.instance() + psname = index.data() + app.open_window(PSDetailWindow, parent=self, **{'psname': psname})
+ + + +
+[docs] +class PSStatusDialog(QDialog): + """Dialog to show list of pwrsupplies not ok.""" + + def __init__(self, pwrsupplies=set(), text='', parent=None): + super().__init__(parent) + self.pwrsupplies = pwrsupplies + self.text = text + self._setup_ui() + + def _setup_ui(self): + label = QLabel(self.text, self) + self._status_list = PSList(self.pwrsupplies, self) + self._ok_bt = QPushButton('Ok', self) + self._ok_bt.clicked.connect(self.close) + + lay = QVBoxLayout() + lay.addWidget(label) + lay.addWidget(self._status_list) + lay.addWidget(self._ok_bt) + self.setLayout(lay)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/dialog/pv_status_dialog.html b/_modules/siriushla/widgets/dialog/pv_status_dialog.html new file mode 100644 index 000000000..cd056da8a --- /dev/null +++ b/_modules/siriushla/widgets/dialog/pv_status_dialog.html @@ -0,0 +1,225 @@ + + + + + + siriushla.widgets.dialog.pv_status_dialog — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.dialog.pv_status_dialog

+"""Status PV detail dialog."""
+
+import time as _time
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QGridLayout, QLabel
+
+from siriuspy.namesys import SiriusPVName
+from siriushla.widgets.windows import SiriusDialog
+from siriushla.widgets.signal_channel import SiriusConnectionSignal
+from siriushla.widgets.led import SiriusLedAlert
+
+
+
+[docs] +class StatusDetailDialog(SiriusDialog): + """Status Detail Dialog.""" + + def __init__( + self, pvname='', labels=None, pvname_labels='', + section='', parent=None, title=''): + super().__init__(parent) + try: + self.pvname = SiriusPVName(pvname) + except: + self.pvname = pvname + self.section = section + if not section: + self.section = self.pvname.sec + self.setObjectName(self.section+'App') + self.labels = list() if labels is None else labels + self.title = title + if not labels: + labels_pv = pvname_labels or pvname.replace('-Mon', 'Labels-Cte') + ch = SiriusConnectionSignal(labels_pv) + ch.new_value_signal[str].connect(self._updateLabels) + ch.new_value_signal[list].connect(self._updateLabels) + self._setupUi() + + def _setupUi(self): + if self.title: + label = QLabel('<h4>'+self.title+'</h4>', + self, alignment=Qt.AlignCenter) + else: + label = QLabel('<h4>'+self.pvname.device_name+'</h4>', + self, alignment=Qt.AlignCenter) + lay = QGridLayout(self) + lay.addWidget(label, 0, 0, 1, 2) + self._fillLabels() + + def _updateLabels(self, labels): + if isinstance(labels, str): + labels = labels.split('\n') + self.labels = labels + self._fillLabels() + + def _fillLabels(self): + for idx, desc in enumerate(self.labels): + led = SiriusLedAlert(self, self.pvname, bit=idx) + lbl = QLabel(desc, self) + self.layout().addWidget(led, idx+1, 0) + self.layout().addWidget(lbl, idx+1, 1)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/dialog/report_dialog.html b/_modules/siriushla/widgets/dialog/report_dialog.html new file mode 100644 index 000000000..56847c400 --- /dev/null +++ b/_modules/siriushla/widgets/dialog/report_dialog.html @@ -0,0 +1,200 @@ + + + + + + siriushla.widgets.dialog.report_dialog — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.dialog.report_dialog

+"""Report dialog."""
+from qtpy.QtCore import QSize
+from qtpy.QtWidgets import QLabel, QPushButton, QListWidget, QVBoxLayout, \
+    QDialog
+
+
+
+[docs] +class ReportDialog(QDialog): + """Show a list of items.""" + + def __init__(self, items, parent=None): + """Constructor.""" + super().__init__(parent) + self._items = items + self._setup_ui() + self.setWindowTitle('Report') + + def _setup_ui(self): + self.layout = QVBoxLayout() + self.setLayout(self.layout) + + if self._items: + self.header = QLabel('Failed PVs', self) + self.layout.addWidget(self.header) + self.items_list = QListWidget(self) + self.items_list.addItems(self._items) + self.layout.addWidget(self.items_list) + self.setMinimumSize(QSize(600, 300)) + else: + self.header = QLabel('Done', self) + self.layout.addWidget(self.header) + self.setMinimumSize(QSize(300, 100)) + self.ok_btn = QPushButton('Ok', self) + self.layout.addWidget(self.ok_btn) + + self.ok_btn.clicked.connect(self.accept)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/enum_combo_box.html b/_modules/siriushla/widgets/enum_combo_box.html new file mode 100644 index 000000000..bb29654d7 --- /dev/null +++ b/_modules/siriushla/widgets/enum_combo_box.html @@ -0,0 +1,188 @@ + + + + + + siriushla.widgets.enum_combo_box — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.enum_combo_box

+"""Sirius Enum ComboBox."""
+
+from qtpy.QtCore import Qt
+from pydm.widgets import PyDMEnumComboBox
+
+
+
+[docs] +class SiriusEnumComboBox(PyDMEnumComboBox): + """Subclass PyDMEnumComboBox to reimplement whellEvent.""" + + def __init__(self, parent, init_channel=None): + """Initialize object.""" + super().__init__(parent=parent, init_channel=init_channel) + self.setFocusPolicy(Qt.StrongFocus) + +
+[docs] + def wheelEvent(self, event): + """Reimplement wheel event to ignore event when out of focus.""" + if not self.hasFocus(): + event.ignore() + else: + super().wheelEvent(event)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/frame.html b/_modules/siriushla/widgets/frame.html new file mode 100644 index 000000000..864ae3a4a --- /dev/null +++ b/_modules/siriushla/widgets/frame.html @@ -0,0 +1,403 @@ + + + + + + siriushla.widgets.frame — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.widgets.frame

+"""Sirius Frame."""
+
+from qtpy.QtCore import Property
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QHBoxLayout, QVBoxLayout
+from pydm.widgets.frame import PyDMFrame
+
+
+class _BaseFrame(PyDMFrame):
+    """Sirius Base Frame."""
+
+    LightGreen = QColor(0, 255, 0)
+    MediumGreen = QColor(25, 156, 109)
+    DarkGreen = QColor(20, 80, 10)
+    Yellow = QColor(255, 254, 122)
+    DarkYellow = QColor(255, 255, 0)
+    Red = QColor(255, 0, 0)
+    MediumBlue = QColor(15, 102, 255)
+    LightBlue = QColor(142, 183, 255)
+    LightViolet = QColor(204, 179, 255)
+    LightSalmon = QColor(255, 179, 179)
+    Salmon = QColor(255, 105, 97)
+    Lavender = QColor(151, 122, 196)
+    DarkCyan = QColor(95, 131, 184)
+    LightGray = QColor(229, 228, 226)
+    Gray = QColor(90, 90, 90)
+    DarkGray = QColor(132, 136, 132)
+    Magenta = QColor('magenta')
+
+    def __init__(self, parent=None, init_channel=None,
+                 color_list=None, is_float=True, orientation='H'):
+        """Init."""
+        super().__init__(parent, init_channel)
+        self._border_color = _BaseFrame.LightGray
+        self._border_width = 4
+        self._is_float = is_float
+        self.stateColors = color_list
+
+        layclass = self._get_layout_class(orientation)
+        lay = layclass(self)
+        lay.setContentsMargins(4, 4, 4, 4)
+        self.setObjectName('frame')
+
+    @Property(int)
+    def borderWidth(self):
+        """
+        Border width in pixels.
+
+        Returns
+        -------
+        use : int
+            The width in use
+        """
+        return self._border_width
+
+    @borderWidth.setter
+    def borderWidth(self, new_val):
+        """
+        Border width in pixels.
+
+        Parameters
+        ----------
+        new_val : int
+            The new width to use
+        """
+        if self._border_width != new_val:
+            self._border_width = new_val
+            self.layout().setContentsMargins(
+                new_val, new_val, new_val, new_val)
+
+    @Property(QColor)
+    def offColor(self):
+        """
+        Border off color.
+
+        Returns
+        -------
+        color : QColor
+            The color in use
+        """
+        return self._stateColors[0]
+
+    @offColor.setter
+    def offColor(self, new_val):
+        """
+        Border off color.
+
+        Parameters
+        ----------
+        new_val : QColor
+            The new color to use
+        """
+        if self._stateColors[0] != new_val:
+            self._stateColors[0] = new_val
+            self._update_border_color()
+
+    @Property(QColor)
+    def onColor(self):
+        """
+        Border on color.
+
+        Returns
+        -------
+        color : QColor
+            The color in use
+        """
+        return self._stateColors[1]
+
+    @onColor.setter
+    def onColor(self, new_val):
+        """
+        Border on color.
+
+        Parameters
+        ----------
+        new_val : QColor
+            The new color to use
+        """
+        if self._stateColors[1] != new_val:
+            self._stateColors[1] = new_val
+            self._update_border_color()
+
+    @Property(list)
+    def stateColors(self):
+        """
+        State color list property.
+
+        Returns
+        -------
+        use : list of QColors
+            State colors in use
+        """
+        return list(self._stateColors)
+
+    @stateColors.setter
+    def stateColors(self, new_colors):
+        """
+        State color list property.
+
+        Parameters
+        ----------
+        new_colors : list of QColors
+            The new state colors to use
+        """
+        if not isinstance(new_colors, (list, tuple)) or len(new_colors) < 2:
+            return
+        self._stateColors = list(new_colors)
+        self._update_border_color()
+
+    def _update_border_color(self):
+        """Must be defined in derived object, must call _update_style_sheet."""
+        raise NotImplementedError
+
+    def _update_style_sheet(self):
+        stylesheet = '#frame{background-color: '
+        stylesheet += self._border_color.name()
+        stylesheet += '; border-radius: 0px;}'
+
+        self.setStyleSheet(stylesheet)
+
+    def _get_layout_class(self, orientation):
+        if orientation == 'H':
+            return QHBoxLayout
+        return QVBoxLayout
+
+    def add_widget(self, widget):
+        self.layout().addWidget(widget)
+
+
+
+[docs] +class SiriusFrame(_BaseFrame): + """Sirius Frame.""" + + default_colorlist = [_BaseFrame.LightGreen, _BaseFrame.Red] + + def __init__(self, parent=None, init_channel=None, + color_list=None, is_float=True, orientation='H'): + """Init.""" + color_list = color_list or SiriusFrame.default_colorlist + super().__init__( + parent=parent, init_channel=init_channel, + color_list=color_list, is_float=is_float, + orientation=orientation) + + def _update_border_color(self): + if self.value is None or not hasattr(self, '_is_float') or \ + not hasattr(self, '_stateColors'): + return + if not self._is_float: + ind = self.value % len(self._stateColors) + self._border_color = self._stateColors[ind] + else: + self._border_color = self._stateColors[1] if self.value else \ + self._stateColors[0] + + self._update_style_sheet() + +
+[docs] + def value_changed(self, new_value): + super().value_changed(new_value) + self._update_border_color()
+
+ + + +
+[docs] +class SiriusAlarmFrame(_BaseFrame): + """Sirius Alarm Frame.""" + + default_colorlist = [ + _BaseFrame.LightGreen, _BaseFrame.DarkYellow, _BaseFrame.Red, + _BaseFrame.Magenta, _BaseFrame.LightGray] + + def __init__(self, parent=None, init_channel=None, orientation='H'): + """Init.""" + super().__init__( + parent=parent, init_channel=init_channel, + color_list=SiriusAlarmFrame.default_colorlist, + is_float=False, orientation=orientation) + + def _update_border_color(self): + if not hasattr(self, '_stateColors'): + return + idx = 0 if self._alarm_state == _BaseFrame.ALARM_NONE else \ + 1 if self._alarm_state == _BaseFrame.ALARM_MINOR else \ + 2 if self._alarm_state == _BaseFrame.ALARM_MAJOR else \ + 3 if self._alarm_state == _BaseFrame.ALARM_INVALID else 4 + self._border_color = self._stateColors[idx] + + self._update_style_sheet() + +
+[docs] + def alarm_severity_changed(self, new_value): + super().alarm_severity_changed(new_value) + self._update_border_color()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/horizontal_ruler.html b/_modules/siriushla/widgets/horizontal_ruler.html new file mode 100644 index 000000000..66082eb21 --- /dev/null +++ b/_modules/siriushla/widgets/horizontal_ruler.html @@ -0,0 +1,181 @@ + + + + + + siriushla.widgets.horizontal_ruler — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.horizontal_ruler

+"""Horizontal Ruler Widget."""
+from qtpy.QtWidgets import QFrame
+
+
+[docs] +class HorizontalRuler(QFrame): + + def __init__(self, parent=None): + super().__init__(parent) + self.setFrameShape(QFrame.HLine) + self.setFrameShadow(QFrame.Sunken) + self.setFixedHeight(30) + +
+[docs] + def setHeight(self, height): + self.setFixedHeight(height)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/label.html b/_modules/siriushla/widgets/label.html new file mode 100644 index 000000000..62d65ce64 --- /dev/null +++ b/_modules/siriushla/widgets/label.html @@ -0,0 +1,332 @@ + + + + + + siriushla.widgets.label — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.widgets.label

+"""Sirius Label."""
+
+from pyqtgraph import functions as func
+from qtpy.QtWidgets import QLabel, QApplication
+from qtpy.QtCore import Qt, Property, Q_ENUMS
+from pydm.utilities import units
+from pydm.widgets.base import PyDMPrimitiveWidget
+from pydm.widgets.display_format import DisplayFormat, parse_value_for_display
+from pydm.widgets.base import PyDMWidget, TextFormatter
+from pydm.utilities import is_pydm_app, is_qt_designer
+
+from siriuspy.clientarch import Time as _Time
+
+
+
+[docs] +class SiriusLabel(QLabel, TextFormatter, PyDMWidget, DisplayFormat): + """ + A QLabel with support for Channels and more from PyDM + + Parameters + ---------- + parent : QWidget + The parent widget for the Label + init_channel : str, optional + The channel to be used by the widget. + keep_unit : bool, optional + If True, label do not use unit convertion feature. + Default to False. + """ + Q_ENUMS(DisplayFormat) + DisplayFormat = DisplayFormat + DisplayFormat.Time = 6 + DisplayFormat.BSMPUDCVersion = 7 + + def __init__(self, parent=None, init_channel=None, keep_unit=False, **kws): + """Init.""" + QLabel.__init__(self, parent, **kws) + PyDMWidget.__init__(self, init_channel=init_channel) + self.app = QApplication.instance() + self.setTextFormat(Qt.PlainText) + self.setTextInteractionFlags(Qt.NoTextInteraction) + self.setText("######") + self._display_format_type = self.DisplayFormat.Default + self._string_encoding = "utf_8" + self._conv = 1 + self._keep_unit = keep_unit + if is_pydm_app(): + self._string_encoding = self.app.get_string_encoding() + + if 'Text' not in SiriusLabel.RULE_PROPERTIES: + SiriusLabel.RULE_PROPERTIES = PyDMWidget.RULE_PROPERTIES.copy() + SiriusLabel.RULE_PROPERTIES.update( + {'Text': ['value_changed', str]}) + + @Property(DisplayFormat) + def displayFormat(self): + """Display Format.""" + return self._display_format_type + + @displayFormat.setter + def displayFormat(self, new_type): + if self._display_format_type == new_type: + return + self._display_format_type = new_type + if not is_qt_designer(): + # Trigger the update of display format + self.value_changed(self.value) + +
+[docs] + def update_format_string(self): + """ + Reconstruct the format string to be used when representing the + output value. + + Returns + ------- + format_string : str + The format string to be used including or not the precision + and unit + """ + self.format_string = "{}" + if isinstance(self.value, (int, float)): + self.format_string = "{:." + str(self.precision) + "f}" + if self._show_units and self._unit != "": + if self._keep_unit: + self.format_string += " {}".format(self._unit) + else: + unt_opt = units.find_unit_options(self._unit) + if unt_opt: + unt_si = [u for u in unt_opt if units.find_unit(u) == 1][0] + self._conv = units.convert(self._unit, unt_si) + else: + self._conv = 1 + unt_si = self._unit + self.format_string += " {}"+"{}".format(unt_si) + return self.format_string
+ + +
+[docs] + def value_changed(self, new_value): + """ + Callback invoked when the Channel value is changed. + Sets the value of new_value accordingly at the Label. + + Parameters + ---------- + new_value : str, int, float, bool or np.ndarray + The new value from the channel. The type depends on the channel. + """ + super(SiriusLabel, self).value_changed(new_value) + # If it is a DiaplayFormat.Time, parse with siriuspy.clientarch.Time + if self._display_format_type == self.DisplayFormat.Time: + time = _Time(int(new_value)).time().isoformat() \ + if new_value is not None else '' + self.setText(time) + return + + # If it is a version string, replace multiple whitespaces with a + # single one + if self._display_format_type == self.DisplayFormat.BSMPUDCVersion: + version = new_value[:16] + " " + new_value[16:] \ + if new_value is not None else '' + version = " ".join(version.split()) + self.setText(version) + return + + new_value = parse_value_for_display( + value=new_value, precision=self.precision, + display_format_type=self._display_format_type, + string_encoding=self._string_encoding, widget=self) + # If the value is a string, just display it as-is, no formatting + # needed. + if isinstance(new_value, str): + if self._show_units and self._unit != "": + new_value = "{} {}".format(new_value, self._unit) + self.setText(new_value) + return + # If the value is an enum, display the appropriate enum string for + # the value. + if self.enum_strings and isinstance(new_value, (int, float)): + try: + self.setText(self.enum_strings[int(new_value)]) + except IndexError: + self.setText(f'Index Overflow [{new_value}]') + return + # If the value is a number (float or int), display it using a + # format string if necessary. + if isinstance(new_value, (int, float)): + if self._show_units and self._unit != '' and not self._keep_unit: + new_value *= self._conv + sc, prf = func.siScale(new_value) + self.setText(self.format_string.format(sc*new_value, prf)) + else: + self.setText(self.format_string.format(new_value)) + return + # If you made it this far, just turn whatever the heck the value + # is into a string and display it. + self.setText(str(new_value))
+
+ + + +
+[docs] +class CALabel(QLabel, PyDMPrimitiveWidget): + """QLabel with rules."""
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/led.html b/_modules/siriushla/widgets/led.html new file mode 100644 index 000000000..bae3cd0f0 --- /dev/null +++ b/_modules/siriushla/widgets/led.html @@ -0,0 +1,822 @@ + + + + + + siriushla.widgets.led — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.widgets.led

+"""Led widgets."""
+
+from qtpy.QtWidgets import QListWidget, QVBoxLayout, QLabel, QPushButton, \
+    QGridLayout, QCheckBox
+from qtpy.QtCore import Qt
+from copy import deepcopy as _dcopy
+import logging as _log
+import numpy as _np
+from qtpy.QtGui import QColor
+from qtpy.QtCore import Property, Slot, Signal
+from pydm.widgets.base import PyDMWidget
+from pydm.widgets.channel import PyDMChannel
+from .waveformplot import SiriusWaveformPlot
+from .windows import SiriusDialog
+from .QLed import QLed
+
+
+
+[docs] +class PyDMLed(QLed, PyDMWidget): + """ + A QLed with support for Channels and more from PyDM. + + Parameters + ---------- + parent : QWidget + The parent widget for the led. + init_channel : str, optional + The channel to be used by the widget. + bit : int + Bit of the PV value to be handled. + color_list : int + List of QColor objects for each state the channel can assume. + """ + + default_colorlist = [ + QLed.DarkGreen, QLed.LightGreen, QLed.Yellow, QLed.Red] + + def __init__(self, parent=None, init_channel=None, bit=-1, + color_list=None): + """Init.""" + QLed.__init__(self, parent) + PyDMWidget.__init__(self, init_channel=init_channel) + self.pvbit = bit + self.stateColors = color_list or self.default_colorlist + + @Property(int) + def pvbit(self): + """PV bit to be handled by the led.""" + return self._bit + + @pvbit.setter + def pvbit(self, bit): + if bit >= 0: + self._bit = int(bit) + self._mask = 1 << bit + else: + self._bit = -1 + self._mask = None + +
+[docs] + def value_changed(self, new_val): + """ + Receive new value and set led color accordingly. + + For int or float data type the standard led behaviour is to be red when + the value is 0, and green otherwise. + + If a :attr:`bit` is set the value received will be treated as an int + and the bit value is extracted using a mask. The led represents the + value of the chosen bit. + """ + PyDMWidget.value_changed(self, new_val) + if new_val is None: + return + if isinstance(new_val, _np.ndarray): + _log.warning('PyDMLed received a numpy array to ' + + self.channel+' ('+str(new_val)+')!') + return + value = int(new_val) + if self._bit < 0: # Led represents value of PV + self.setState(value) + else: # Led represents specific bit of PV + bit_val = (value & self._mask) >> self._bit + self.setState(bit_val)
+
+ + + +
+[docs] +class SiriusLedState(PyDMLed): + """PyDMLed specialization to represent 2 states in dark/light green.""" + + def __init__(self, parent=None, init_channel=None, bit=-1): + """Call super and set on/off colors.""" + super().__init__(parent, init_channel, bit) + self.setOffColor(PyDMLed.DarkGreen) + self.setOnColor(PyDMLed.LightGreen) + +
+[docs] + def value_changed(self, new_val): + """Reimplement value_changed to filter bug.""" + if isinstance(new_val, _np.ndarray): + _log.warning('SiriusLedState received a numpy array to ' + + self.channel+' ('+str(new_val)+')!') + return + super().value_changed(new_val)
+
+ + + +
+[docs] +class SiriusLedAlert(PyDMLed): + """PyDMLed specialization to represent 2 states in red/light green.""" + + def __init__(self, parent=None, init_channel=None, bit=-1): + """Call super and set on/off colors.""" + super().__init__(parent, init_channel, bit) + self.setOnColor(PyDMLed.Red) + self.setOffColor(PyDMLed.LightGreen) + +
+[docs] + def value_changed(self, new_val): + """If no bit is set, treat new_val as 2 states, zero and non-zero.""" + if isinstance(new_val, _np.ndarray): + _log.warning('SiriusLedAlert received a numpy array to ' + + self.channel+' ('+str(new_val)+')!') + return + value = int(new_val != 0) if self._bit < 0 else new_val + super().value_changed(value)
+
+ + + +
+[docs] +class PyDMLedMultiChannel(QLed, PyDMWidget): + """ + A QLed with support for checking values of several Channels. + + The led state notify if a set of PVs is in a desired state or not. + + Parameters + ---------- + parent : QWidget + The parent widget for the led. + channels2values: dict + A dict with channels as keys and desired PVs values as values. + Values can be either a scalar, to simple comparision, or a dict. + This dict can have as keys: + - 'value' (the value to use in comparision); + - 'comp' (a string that select the type of comparision, can be + 'eq', 'ne', 'gt', 'lt', 'ge', 'le'); + - and 'bit' (select a bit of the pv to compare to 'value'). + """ + + warning = Signal(list) + normal = Signal(list) + + default_colorlist = [PyDMLed.Red, PyDMLed.LightGreen, PyDMLed.Gray] + + def __init__(self, parent=None, channels2values=dict(), color_list=None): + """Init.""" + QLed.__init__(self, parent) + PyDMWidget.__init__(self) + self.stateColors = _dcopy(color_list) or self.default_colorlist + self._connected = False + + self._operations_dict = {'eq': self._eq, + 'cl': self._cl, + 'ne': self._ne, + 'gt': self._gt, + 'lt': self._lt, + 'ge': self._ge, + 'le': self._le, + 'in': self._in, + 'wt': self._wt, + 'ou': self._ou} + + self._address2values = dict() + self._address2channel = dict() + self._address2conn = dict() + self._address2status = dict() + self._address2currvals = dict() + self.set_channels2values(_dcopy(channels2values)) + + @property + def channels2values(self): + """Return channels2values dict.""" + return _dcopy(self._address2values) + + @property + def channels2status(self): + """Return channels2status dict.""" + return _dcopy(self._address2status) + +
+[docs] + def set_channels2values(self, new_channels2values): + """Set channels2values.""" + self._address2values = _dcopy(new_channels2values) + + if not new_channels2values: + self.setEnabled(False) + else: + self.setEnabled(True) + + # Check which channel can be removed + address2pop = list() + for address in self._address2channel.keys(): + if address not in new_channels2values.keys(): + address2pop.append(address) + + # Remove channels + for address in address2pop: + self._address2channel[address].disconnect() + self._address2channel.pop(address) + self._address2status.pop(address) + self._address2conn.pop(address) + self._address2currvals.pop(address) + + # Add new channels + for address, value in new_channels2values.items(): + if address not in self._address2channel.keys(): + self._address2conn[address] = False + self._address2status[address] = 'UNDEF' + self._address2currvals[address] = 'UNDEF' + channel = PyDMChannel( + address=address, + connection_slot=self.connection_changed, + value_slot=self.value_changed) + channel.connect() + self._address2channel[address] = channel + self._address2values[address] = value + + self._channels = list(self._address2channel.values()) + + # redo comparisions + for ad, des in self._address2values.items(): + self._address2status[ad] = self._check_status( + ad, des, self._address2currvals[ad]) + + self._update_statuses()
+ + +
+[docs] + def value_changed(self, new_val): + """Receive new value and set led color accordingly.""" + if not self.sender(): # do nothing when sender is None + return + address = self.sender().address + desired = self._address2values[address] + self._address2currvals[address] = new_val + + is_desired = self._check_status(address, desired, new_val) + self._address2status[address] = is_desired + if not is_desired: + self.warning.emit([address, new_val]) + else: + self.normal.emit([address, new_val]) + self._update_statuses()
+ + + def _check_status(self, address, desired, current): + if current is None: + return False + elif isinstance(current, str) and current == 'UNDEF': + return False + + kws = dict() + if isinstance(desired, dict): + if 'bit' in desired.keys(): + bit = desired['bit'] + mask = 1 << bit + current = (current & mask) >> bit + if 'comp' in desired.keys(): + fun = self._operations_dict[desired['comp']] + else: + fun = self._operations_dict['eq'] + if 'abs_tol' in desired.keys(): + kws['abs_tol'] = desired['abs_tol'] + if 'rel_tol' in desired.keys(): + kws['rel_tol'] = desired['rel_tol'] + desired_value = desired['value'] + else: + fun = self._operations_dict['eq'] + desired_value = desired + if fun != self._wt and (desired_value is not None) and \ + (type(current) != type(desired_value)) and \ + isinstance(current, _np.ndarray): + _log.warning('PyDMLedMultiChannel received a numpy array to ' + + address+' ('+str(current)+')!') + return + + if desired_value is None: + is_desired = True + else: + is_desired = fun(current, desired_value, **kws) + return is_desired + + def _update_statuses(self): + state = 1 + if not self._connected: + state = 2 + else: + for status in self._address2status.values(): + if status == 'UNDEF' or not status: + state = 0 + break + self.setState(state) + +
+[docs] + @Slot(bool) + def connection_changed(self, conn): + """Reimplement connection_changed to handle all channels.""" + if not self.sender(): # do nothing when sender is None + return + address = self.sender().address + self._address2conn[address] = conn + allconn = True + for conn in self._address2conn.values(): + allconn &= conn + PyDMWidget.connection_changed(self, allconn) + self._connected = allconn + self._update_statuses()
+ + + @staticmethod + def _eq(val1, val2, **kws): + return not PyDMLedMultiChannel._ne(val1, val2, **kws) + + @staticmethod + def _cl(val1, val2, **kws): + val1 = _np.asarray(val1) + val2 = _np.asarray(val2) + if val1.dtype != val2.dtype or val1.size != val2.size: + return False + atol = kws.get('abs_tol', 1e-8) + rtol = kws.get('rel_tol', 1e-5) + return _np.allclose(val1, val2, atol=atol, rtol=rtol) + + @staticmethod + def _ne(val1, val2, **kws): + val1 = _np.asarray(val1) + val2 = _np.asarray(val2) + return _np.all(val1 != val2) + + @staticmethod + def _gt(val1, val2, **kws): + val1 = _np.asarray(val1) + val2 = _np.asarray(val2) + return _np.all(val1 > val2) + + @staticmethod + def _lt(val1, val2, **kws): + val1 = _np.asarray(val1) + val2 = _np.asarray(val2) + return _np.all(val1 < val2) + + @staticmethod + def _ge(val1, val2, **kws): + val1 = _np.asarray(val1) + val2 = _np.asarray(val2) + return _np.all(val1 >= val2) + + @staticmethod + def _le(val1, val2, **kws): + val1 = _np.asarray(val1) + val2 = _np.asarray(val2) + return _np.all(val1 <= val2) + + @staticmethod + def _in(val1, val2, **kws): + return val1 in val2 + + @staticmethod + def _wt(val1, val2, **kws): + return val2[0] < val1 < val2[1] + + @staticmethod + def _ou(val1, val2, **kws): + """Whether val1 is out of range (val2[0], val2[1]).""" + return val1 < val2[0] or val1 > val2[1] + +
+[docs] + def mouseDoubleClickEvent(self, ev): + pv_groups, texts = list(), list() + pvs_err, pvs_und = set(), set() + for k, v in self._address2conn.items(): + if not v: + pvs_und.add(k) + if pvs_und: + pv_groups.append(pvs_und) + texts.append('There are disconnected PVs!') + + for k, v in self._address2status.items(): + if not v and k not in pvs_und: + pvs_err.add(k) + if pvs_err: + pv_groups.append(pvs_err) + texts.append( + 'There are PVs with values different\n' + 'from the desired ones!') + + if pv_groups: + msg = MultiChannelStatusDialog( + parent=self, pvs=pv_groups, + text=texts, fun_show_diff=self._show_diff) + msg.exec_() + super().mouseDoubleClickEvent(ev)
+ + + def _show_diff(self, address): + des_val = self._address2values[address] + if isinstance(self._address2values[address], dict): + des_val = des_val['value'] + curr_val = self._address2currvals[address] + dialog = _DiffStatus(self, des_val, curr_val) + dialog.exec_()
+ + + +
+[docs] +class PyDMLedMultiConnection(QLed, PyDMWidget): + """ + A QLed with support for checking connection of several Channels. + + The led state notify if a set of PVs is connected. + + Parameters + ---------- + parent : QWidget + The parent widget for the led. + channels: list + A list of channels. + """ + + warning = Signal(list) + normal = Signal(list) + + default_colorlist = [PyDMLed.Red, PyDMLed.LightGreen] + + def __init__(self, parent=None, channels=list(), color_list=None): + """Init.""" + QLed.__init__(self, parent) + PyDMWidget.__init__(self) + self.stateColors = color_list or self.default_colorlist + + self._address2conn = dict() + self._address2channel = dict() + self.set_channels(channels) + + @property + def channels2conn(self): + """Return dict with connection state of each channel.""" + return _dcopy(self._address2conn) + +
+[docs] + def set_channels(self, new_channels): + if not new_channels: + self.setEnabled(False) + else: + self.setEnabled(True) + + # Check which channel can be removed + address2pop = list() + for address in self._address2channel.keys(): + if address not in new_channels: + address2pop.append(address) + else: + new_channels.remove(address) + + # Remove channels + for address in address2pop: + self._address2channel[address].disconnect() + self._address2channel.pop(address) + self._address2conn.pop(address) + + # Add new channels + for address in new_channels: + self._address2conn[address] = False + channel = PyDMChannel( + address=address, connection_slot=self.connection_changed) + channel.connect() + self._address2channel[address] = channel + + self._channels = list(self._address2channel.values()) + + self._update_state()
+ + +
+[docs] + @Slot(bool) + def connection_changed(self, conn): + """Reimplement connection_changed to handle all channels.""" + if not self.sender(): # do nothing when sender is None + return + address = self.sender().address + if not conn: + self.warning.emit([address, conn]) + else: + self.normal.emit([address, conn]) + self._address2conn[address] = conn + self._update_state()
+ + + def _update_state(self): + allconn = True + for conn in self._address2conn.values(): + allconn &= conn + self.setState(allconn) + self._connected = allconn + +
+[docs] + def mouseDoubleClickEvent(self, ev): + pvs = set() + for k, v in self._address2conn.items(): + if not v: + pvs.add(k) + if pvs: + msg = MultiChannelStatusDialog( + parent=self, pvs=pvs, + text='There are disconnected PVs!') + msg.exec_() + super().mouseDoubleClickEvent(ev)
+
+ + + +
+[docs] +class MultiChannelStatusDialog(SiriusDialog): + + def __init__(self, parent=None, text='', pvs=set(), fun_show_diff=None): + super().__init__(parent) + self.setWindowTitle('Channels Status') + self._fun_show_diff = fun_show_diff + if isinstance(pvs, set): + pvs = [pvs, ] + text = [text, ] + + lay = QVBoxLayout(self) + for pvg, txt in zip(pvs, text): + label = QLabel(txt, self) + pv_list = _PVList(pvg, self) + if fun_show_diff: + pv_list.clicked_item_data.connect(fun_show_diff) + lay.addWidget(label) + lay.addWidget(pv_list) + + self._ok_bt = QPushButton('Ok', self) + self._ok_bt.clicked.connect(self.close) + lay.addWidget(self._ok_bt)
+ + + +class _PVList(QListWidget): + """PV List.""" + + clicked_item_data = Signal(str) + + def __init__(self, pvs=set(), parent=None): + """Constructor.""" + super().__init__(parent) + self.addItems(pvs) + self.doubleClicked.connect(self.emit_item_data) + + def emit_item_data(self, index): + self.clicked_item_data.emit(index.data()) + + +class _DiffStatus(SiriusDialog): + + def __init__(self, parent=None, desired=None, current=None): + super().__init__(parent) + self.setWindowTitle('Diff Status') + self._desired = desired + self._current = current + self._setupUi() + + def _setupUi(self): + self._text = 'It is all ok!' + self._plot = None + if isinstance(self._desired, type(self._current)): + if isinstance(self._desired, (_np.ndarray, tuple, list)): + if len(self._desired) != len(self._current): + self._text = \ + 'Implemented and desired values have different\n'\ + 'lenghts: {} and {}, respectively!'.format( + len(self._current), len(self._desired)) + else: + self._text = 'Difference: ' + self._plot = SiriusWaveformPlot() + self._plot.addChannel(y_channel='DES', color='blue') + self._plot.addChannel(y_channel='CURR', color='black') + self._plot.addChannel(y_channel='DIFF', color='magenta') + self._plot.autoRangeX = True + self._plot.autoRangeY = True + self._plot.setLabel('left', '') + self._plot.setBackgroundColor(QColor(255, 255, 255)) + self._desired_curve = self._plot.curveAtIndex(0) + self._desired_curve.receiveYWaveform(self._desired) + self._desired_curve.redrawCurve() + self._current_curve = self._plot.curveAtIndex(1) + self._current_curve.receiveYWaveform(self._current) + self._current_curve.redrawCurve() + self._diff_curve = self._plot.curveAtIndex(2) + diff = self._current-self._desired + self._diff_curve.receiveYWaveform(diff) + self._diff_curve.redrawCurve() + elif isinstance(self._desired, (int, float, str)): + self._text = 'Implemented: {}\nDesired: {}'.format( + self._current, self._desired) + elif self._current == 'UNDEF': + self._text = 'PV is disconnected!' + elif isinstance(self._desired, (tuple, list)): + self._text = 'Implemented value ({}) is not within\n' \ + 'desired interval ({})!'.format( + self._current, self._desired) + else: + self._text = 'Implemented value (of type {}) has type\n' \ + 'different from desired ({})!'.format( + type(self._current), type(self._desired)) + + lay = QGridLayout(self) + self._label = QLabel(self._text, self, alignment=Qt.AlignCenter) + self._label.setStyleSheet("min-width: 20em;") + lay.addWidget(self._label, 0, 0, 1, 3) + if self._plot: + lay.addWidget(self._plot, 1, 0, 1, 3) + self.show_des = QCheckBox('Desired') + self.show_des.setChecked(True) + self.show_des.setStyleSheet('color: blue;') + self.show_des.stateChanged.connect(self._desired_curve.setVisible) + lay.addWidget(self.show_des, 2, 0) + self.show_cur = QCheckBox('Implemented') + self.show_cur.setChecked(True) + self.show_cur.setStyleSheet('color: black;') + self.show_cur.stateChanged.connect(self._current_curve.setVisible) + lay.addWidget(self.show_cur, 2, 1) + self.show_dif = QCheckBox('Diff') + self.show_dif.setChecked(True) + self.show_dif.setStyleSheet('color: magenta;') + self.show_dif.stateChanged.connect(self._diff_curve.setVisible) + lay.addWidget(self.show_dif, 2, 2) + self._ok_bt = QPushButton('Ok', self) + self._ok_bt.clicked.connect(self.close) + lay.addWidget(self._ok_bt, 3, 1) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/ledit_scrollbar.html b/_modules/siriushla/widgets/ledit_scrollbar.html new file mode 100644 index 000000000..4a0d741e4 --- /dev/null +++ b/_modules/siriushla/widgets/ledit_scrollbar.html @@ -0,0 +1,211 @@ + + + + + + siriushla.widgets.ledit_scrollbar — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.ledit_scrollbar

+"""Defines PyDM widget with a line edit and a double scrollbar."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGridLayout, QStyle, QStyleOption, \
+    QSizePolicy as QSzPol
+from qtpy.QtGui import QPainter
+from .scrollbar import PyDMScrollBar
+from .line_edit import SiriusLineEdit
+
+
+
+[docs] +class PyDMLinEditScrollbar(QWidget): + """Composition of a LineEdit and a Scrollbar to set a float PV.""" + + def __init__(self, parent=None, init_channel=None): + """Init.""" + super().__init__(parent) + self._init_channel = init_channel + + layout = QGridLayout(self) + layout.setContentsMargins(0, 0, 0, 0) + layout.setSpacing(2) + + self.lineedit = SiriusLineEdit( + parent=self, init_channel=init_channel) + self.lineedit.setAlignment(Qt.AlignCenter) + self.lineedit.setStyleSheet("SiriusLineEdit{min-height:1.29em;}") + self.lineedit.setSizePolicy(QSzPol.Expanding, QSzPol.Preferred) + + self.scrollbar = PyDMScrollBar( + parent=self, init_channel=init_channel) + self.scrollbar.wheelEvent = lambda event: event.ignore() + self.scrollbar.setTracking(False) + self.scrollbar.setStyleSheet("PyDMScrollBar{max-height:0.7em;}") + + layout.addWidget(self.lineedit, 0, 0, 2, 1) + layout.addWidget(self.scrollbar, 2, 0, 1, 1) + +
+[docs] + def paintEvent(self, event): + """Need to override paintEvent in order to apply CSS.""" + opt = QStyleOption() + opt.initFrom(self) + p = QPainter(self) + self.style().drawPrimitive(QStyle.PE_Widget, opt, p, self)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/line_edit.html b/_modules/siriushla/widgets/line_edit.html new file mode 100644 index 000000000..5d6502809 --- /dev/null +++ b/_modules/siriushla/widgets/line_edit.html @@ -0,0 +1,220 @@ + + + + + + siriushla.widgets.line_edit — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.widgets.line_edit

+"""PyDMLine edit with validator."""
+import locale
+import numpy as np
+
+from qtpy.QtCore import QRegExp
+from qtpy.QtGui import QRegExpValidator
+
+from pydm.widgets.line_edit import PyDMLineEdit
+
+
+
+[docs] +class SiriusLineEdit(PyDMLineEdit): + """LineEdit with validator.""" + +
+[docs] + def update_format_string(self): + """ + Accept a unit to display with a channel's value + + The unit may or may not be displayed based on the :attr:`showUnits` + attribute. Receiving a new value for the unit causes the display to + reset. + """ + if self.channeltype is float: + decimal_point = locale.localeconv()['decimal_point'] + # decimal_point = '.' + if self._show_units and self._unit != "": + re = QRegExp( + '(-?)(0|([1-9][0-9]*))(\\{}[0-9]+)?( {})?' + .format(decimal_point, self._unit)) + else: + re = QRegExp('(-?)(0|([1-9][0-9]*))(\\{}[0-9]+)?' + .format(decimal_point)) + validator = QRegExpValidator(re, self) + self.setValidator(validator) + super().update_format_string()
+
+ + + +
+[docs] +class SiriusWaveformLineEdit(SiriusLineEdit): + """Line Edit with bugfix for waveform setpoints.""" + +
+[docs] + def value_changed(self, value): + """Force value to be a numpy array.""" + super().value_changed( + np.array([value]) + if type(value) is not np.ndarray + else value + )
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/loading_dialog.html b/_modules/siriushla/widgets/loading_dialog.html new file mode 100644 index 000000000..4199d9560 --- /dev/null +++ b/_modules/siriushla/widgets/loading_dialog.html @@ -0,0 +1,209 @@ + + + + + + siriushla.widgets.loading_dialog — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.loading_dialog

+from qtpy.QtCore import Slot
+from qtpy.QtWidgets import QDialog, QLabel, QVBoxLayout, QProgressBar
+
+
+
+[docs] +class LoadingDialog(QDialog): + def __init__(self, title, maximum, parent=None): + super(LoadingDialog, self).__init__(parent) + #self.setAttribute(Qt.WA_DeleteOnClose) + + self._may_close = False + + layout = QVBoxLayout() + layout.addWidget(QLabel("Loading...", self)) + self.progress = QProgressBar(self) + self.progress.setMinimum(0) + self.progress.setMaximum(maximum) + layout.addWidget(self.progress) + + self.setWindowTitle(title) + self.setLayout(layout) + +
+[docs] + @Slot(int) + def update(self, value): + self.progress.setValue(value)
+ + +
+[docs] + @Slot(int) + def done(self, r): + self._may_close = True + super(LoadingDialog, self).done(r)
+ + +
+[docs] + def closeEvent(self, event): + if self._may_close: + super(LoadingDialog, self).closeEvent(event) + else: + event.ignore()
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/log_display.html b/_modules/siriushla/widgets/log_display.html new file mode 100644 index 000000000..765ec37c7 --- /dev/null +++ b/_modules/siriushla/widgets/log_display.html @@ -0,0 +1,250 @@ + + + + + + siriushla.widgets.log_display — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.log_display

+"""SiriusLogDisplay."""
+
+import logging
+from qtpy.QtCore import Slot, Signal
+from pydm.widgets.logdisplay import GuiHandler, PyDMLogDisplay
+
+
+logger = logging.getLogger(__name__)
+
+
+
+[docs] +class SiriusGuiHandler(GuiHandler): + message = Signal(str, int) + + def __init__(self, level=logging.NOTSET, parent=None): + """.""" + super().__init__(level=level, parent=parent) + self.level = level + +
+[docs] + def emit(self, record): + """ + Emit formatted log messages when received but only if level is set. + """ + # Avoid garbage to be presented when master log is running with DEBUG. + if self.level == logging.NOTSET: + return + self.message.emit(self.format(record), record.levelno)
+
+ + + +
+[docs] +class SiriusLogDisplay(PyDMLogDisplay): + """ + Standard display for Log Output + + This widget handles instantating a ``GuiHandler`` and displaying log + messages to a ``QPlainTextEdit``. The level of the log can be changed from + inside the widget itself, allowing users to select from any of the + ``.levels`` specified by the widget. + + Parameters + ---------- + parent : QObject, optional + + logname : str + Name of log to display in widget + + level : logging.Level + Initial level of log display + + """ + Colors = { + PyDMLogDisplay.LogLevels.DEBUG: 'black', + PyDMLogDisplay.LogLevels.INFO: 'black', + PyDMLogDisplay.LogLevels.WARNING: 'yellow', + PyDMLogDisplay.LogLevels.ERROR: 'red', + PyDMLogDisplay.LogLevels.CRITICAL: 'red', + } + + def __init__(self, parent=None, logname=None, level=logging.NOTSET): + """.""" + super().__init__(parent=parent, logname=logname, level=level) + # Create Widgets + self.handler.message.disconnect(self.write) + self.log.removeHandler(self.handler) + self.handler = SiriusGuiHandler(level=level, parent=self) + self.handler.setFormatter(logging.Formatter(self.default_format)) + self.log.addHandler(self.handler) + self.handler.message.connect(self.writehtml) + +
+[docs] + @Slot(str, int) + def writehtml(self, message, levelno): + """Write a message to the log display.""" + # We split the incoming message by new lines. In prior iterations of + # this widget it was discovered that large blocks of text cause issues + # at the Qt level. + for msg in message.split(self.terminator): + self.text.appendHtml( + f'<p style="color:{self.Colors[levelno]:s}">{msg:s}</p>')
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/log_label.html b/_modules/siriushla/widgets/log_label.html new file mode 100644 index 000000000..1cc41a1b6 --- /dev/null +++ b/_modules/siriushla/widgets/log_label.html @@ -0,0 +1,377 @@ + + + + + + siriushla.widgets.log_label — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.widgets.log_label

+"""Log label."""
+
+from qtpy.QtWidgets import QListWidget, QListWidgetItem
+from qtpy.QtCore import Property, Q_ENUMS
+from qtpy.QtGui import QColor
+
+from pydm.data_plugins import plugin_for_address
+from pydm.widgets.base import PyDMWidget, TextFormatter
+from pydm.widgets.display_format import DisplayFormat, parse_value_for_display
+
+from siriuspy.clientarch import Time as _Time
+
+
+
+[docs] +class PyDMLogLabel(QListWidget, TextFormatter, PyDMWidget, DisplayFormat): + """ + A QListWidget with support for Channels and more from PyDM. + + Parameters + ---------- + parent : QWidget + The parent widget for the Label + init_channel : str, optional + The channel to be used by the widget. + """ + + DisplayFormat = DisplayFormat + Q_ENUMS(DisplayFormat) + + errorcolor = QColor(255, 0, 0) + warncolor = QColor(200, 200, 0) + + def __init__(self, parent=None, init_channel=None, replace=None): + QListWidget.__init__(self, parent) + PyDMWidget.__init__(self, init_channel=init_channel) + self._buffer_size = 1000 + self._prepend_date_time = True + self._display_format_type = DisplayFormat.String + self._string_encoding = "utf_8" + self._date_time_fmt = '%Y/%m/%d-%H:%M:%S' + self._replace = list() if replace is None else replace + + channel = '' if init_channel is None else init_channel + self._plugin_conns = plugin_for_address(channel).connections + +
+[docs] + def value_changed(self, new_value): + """ + Callback invoked when the Channel value is changed. + + Sets the value of new_value accordingly at the Label. + + Parameters + ---------- + new_value : str, int, float, bool or np.ndarray + The new value from the channel. The type depends on the channel. + """ + super(PyDMLogLabel, self).value_changed(new_value) + + new_value = parse_value_for_display( + value=new_value, + precision=self._prec, + display_format_type=self._display_format_type, + string_encoding=self._string_encoding, + widget=self) + + if self.count() > self._buffer_size: + self.clear() + + prefix = '' + if self._prepend_date_time: + timestamp = self._plugin_conns[self.channel].pv.timestamp + prefix += _Time(timestamp).strftime(self._date_time_fmt) + prefix += ' ' + # If the value is a string, just display it as-is, no formatting + # needed. + item = None + if isinstance(new_value, str): + if self._replace: + last_item = self.item(self.count()-1) + if last_item is not None: + last_text = last_item.text().lower() + for r in self._replace: + if r.lower() in new_value.lower() and \ + r.lower() in last_text.lower(): + item = last_item + item.setText(prefix + new_value) + return + if item is None: + item = QListWidgetItem(prefix + new_value) + if new_value.lower().startswith(('err', 'fatal')): + item.setForeground(self.errorcolor) + elif new_value.lower().startswith('warn'): + item.setForeground(self.warncolor) + # If the value is an enum, display the appropriate enum string for + # the value. + elif self.enum_strings is not None and isinstance(new_value, int): + try: + item = QListWidgetItem(prefix + self.enum_strings[new_value]) + except IndexError: + item = QListWidgetItem("**INVALID**") + # If the value is a number (float or int), display it using a + # format string if necessary. + elif isinstance(new_value, (int, float)): + item = QListWidgetItem(prefix+self.format_string.format(new_value)) + # If you made it this far, just turn whatever the heck the value + # is into a string and display it. + else: + item = QListWidgetItem(prefix + str(new_value)) + + if item is not None: + self.addItem(item) + self.scrollToBottom()
+ + + @Property(DisplayFormat) + def displayFormat(self): + """ + The format to display data. + + Returns + ------- + int + """ + return self._display_format_type + + @displayFormat.setter + def displayFormat(self, new_type): + """ + The maximum number of entries to show. + + When maximum is exceeded the widget is cleared. + + Returns + ------- + int + """ + if self._display_format_type != new_type: + self._display_format_type = new_type + # Trigger the update of display format + if self.value is not None: + self.value_changed(self.value) + + @Property(int) + def bufferSize(self): + """ + The maximum number of entries to show. + + When maximum is exceeded the widget is cleared. + + Returns + ------- + int + """ + return int(self._buffer_size) + + @bufferSize.setter + def bufferSize(self, value): + """ + The maximum number of entries to show. + + When maximum is exceeded the widget is cleared. + + Parameters + ---------- + value : int + """ + self._buffer_size = int(value) + + @Property(bool) + def prependDateTime(self): + """ + Define if the date and time information will be prepended to the text. + + Returns + ------- + bool + """ + return self._prepend_date_time + + @prependDateTime.setter + def prependDateTime(self, value): + """ + Define if the date and time information will be prepended to the text. + + Parameters + ---------- + value : bool + """ + self._prepend_date_time = bool(value) + + @Property(str) + def dateTimeFmt(self): + """ + Define the format of the datetime information to be prepended. + + Returns + ------- + str + """ + return self._date_time_fmt + + @dateTimeFmt.setter + def dateTimeFmt(self, value): + """ + Define the format of the datetime information to be prepended. + + Parameters + ---------- + value : str + """ + self._date_time_fmt = str(value)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/matplotlib.html b/_modules/siriushla/widgets/matplotlib.html new file mode 100644 index 000000000..30724ae87 --- /dev/null +++ b/_modules/siriushla/widgets/matplotlib.html @@ -0,0 +1,238 @@ + + + + + + siriushla.widgets.matplotlib — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.widgets.matplotlib

+"""Derive matplotlib FigureCanvas to resize labels in ZoomIn/ZoomOut."""
+from qtpy.QtCore import QEvent
+from qtpy.QtWidgets import QApplication, QSizePolicy, QWidget, QVBoxLayout
+from matplotlib.backends.backend_qt5agg import \
+    FigureCanvasQTAgg as FigureCanvas, NavigationToolbar2QT
+from matplotlib.figure import Figure
+
+
+
+[docs] +class MatplotlibCanvas(FigureCanvas): + """MatplotlibCanvas class.""" + + def __init__(self, figure=None, parent=None): + """.""" + figure = figure or Figure() + super().__init__(figure) + self.setParent(parent) + self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) + self.updateGeometry() + +
+[docs] + def changeEvent(self, event): + """Reimplement changeEvent to handle labels resizing.""" + if event.type() == QEvent.FontChange: + self.app = QApplication.instance() + fontsize = self.app.font().pointSize() + + axes = self.figure.get_axes() + handles = [] + labels = [] + for axis in axes: + axis.tick_params(labelsize=fontsize) + xl = axis.get_xlabel() + axis.set_xlabel(xl, {'size': fontsize}) + yl = axis.get_ylabel() + axis.set_ylabel(yl, {'size': fontsize}) + title = axis.get_title() + axis.set_title(title, {'size': fontsize}) + legh, legl = axis.get_legend_handles_labels() + if legl: + handles.extend(legh) + labels.extend(legl) + if labels: + axes[0].legend(handles, labels, fontsize=fontsize) + + self.figure.canvas.draw()
+
+ + + +
+[docs] +class MatplotlibWidget(QWidget): + """MatplotlibWidget class.""" + + def __init__(self, parent=None, figure=None, toolbar_position='bottom'): + """.""" + super().__init__(parent) + self.setLayout(QVBoxLayout()) + self.figure = figure or Figure() + self.canvas = MatplotlibCanvas(self.figure, self) + if toolbar_position is None: + self.layout().addWidget(self.canvas) + self.navtool = None + return + self.navtool = NavigationToolbar2QT(self.canvas, self) + self.navtool.setObjectName('toolbar') + if toolbar_position.lower().startswith('bottom'): + self.layout().addWidget(self.canvas) + self.layout().addWidget(self.navtool) + else: + self.layout().addWidget(self.navtool) + self.layout().addWidget(self.canvas)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/process_image.html b/_modules/siriushla/widgets/process_image.html new file mode 100644 index 000000000..e6796077e --- /dev/null +++ b/_modules/siriushla/widgets/process_image.html @@ -0,0 +1,613 @@ + + + + + + siriushla.widgets.process_image — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.process_image

+"""Process Image Widget."""
+
+import numpy as np
+
+from qtpy.QtCore import Qt
+from qtpy.QtGui import QColor
+from qtpy.QtWidgets import QLabel, QGridLayout, QGroupBox, QFormLayout, \
+    QWidget, QHBoxLayout, QPushButton
+
+import qtawesome as qta
+from pyqtgraph import PlotCurveItem, mkPen
+
+from pydm.widgets import PyDMImageView, PyDMEnumComboBox, PyDMPushButton
+
+from siriuspy.namesys import SiriusPVName
+
+from ..util import connect_window
+from .windows import create_window_from_widget
+from .signal_channel import SiriusConnectionSignal
+from .spinbox import SiriusSpinbox
+from .state_button import PyDMStateButton
+from .label import SiriusLabel
+from .led import SiriusLedState
+
+
+
+[docs] +class SiriusProcessImage(QWidget): + def __init__(self, parent=None, device='', convertion_set=True, + orientation='V'): + super().__init__(parent) + self._dev = SiriusPVName(device) + self._conv_set = convertion_set + self._ori = orientation + self._setupUi() + + def _setupUi(self): + self.image_view = PyDMImageView( + parent=self, + image_channel=self._dev+':Image-RB', + width_channel=self._dev+':Width-RB') + self.image_view.setObjectName('image') + self.image_view.setStyleSheet( + '#image{min-width:20em; min-height:20em;}') + self.image_view.maxRedrawRate = 5 + self.image_view.colorMap = self.image_view.Jet + self.image_view.readingOrder = self.image_view.Clike + self._roixproj = SiriusConnectionSignal(self._dev+':ROIProjX-Mon') + self._roiyproj = SiriusConnectionSignal(self._dev+':ROIProjY-Mon') + self._roixfit = SiriusConnectionSignal(self._dev+':ROIGaussFitX-Mon') + self._roiyfit = SiriusConnectionSignal(self._dev+':ROIGaussFitY-Mon') + self._roixaxis = SiriusConnectionSignal(self._dev+':ROIAxisX-Mon') + self._roiyaxis = SiriusConnectionSignal(self._dev+':ROIAxisY-Mon') + self._roistartx = SiriusConnectionSignal(self._dev+':ROIStartX-Mon') + self._roistarty = SiriusConnectionSignal(self._dev+':ROIStartY-Mon') + self._roiendx = SiriusConnectionSignal(self._dev+':ROIEndX-Mon') + self._roiendy = SiriusConnectionSignal(self._dev+':ROIEndY-Mon') + self._roixproj.new_value_signal[np.ndarray].connect(self._update_roi) + self.plt_roi = PlotCurveItem([0, 0, 500, 500, 0], [0, 500, 500, 0, 0]) + pen = mkPen() + pen.setColor(QColor('red')) + pen.setWidth(1) + self.plt_roi.setPen(pen) + self.image_view.addItem(self.plt_roi) + self.plt_fit_x = PlotCurveItem([0, 0], [0, 400]) + self.plt_fit_y = PlotCurveItem([0, 0], [0, 400]) + self.plt_his_x = PlotCurveItem([0, 0], [0, 400]) + self.plt_his_y = PlotCurveItem([0, 0], [0, 400]) + pen = mkPen() + pen.setColor(QColor('yellow')) + self.plt_his_x.setPen(pen) + self.plt_his_y.setPen(pen) + self.image_view.addItem(self.plt_fit_x) + self.image_view.addItem(self.plt_fit_y) + self.image_view.addItem(self.plt_his_x) + self.image_view.addItem(self.plt_his_y) + + gb_conf = self._get_config_widget(self) + gb_posi = self._get_position_widget(self) + gb_size = self._get_size_widget(self) + + gl = QGridLayout(self) + gl.setContentsMargins(0, 0, 0, 0) + if self._ori == 'V': + gl.addWidget(self.image_view, 0, 0, 1, 2) + gl.addWidget(gb_posi, 1, 0) + gl.addWidget(gb_size, 1, 1) + gl.addWidget(gb_conf, 2, 0, 1, 2) + else: + gl.addWidget(self.image_view, 0, 0, 1, 2) + gl.addWidget(gb_conf, 0, 2, 2, 1) + gl.addWidget(gb_posi, 1, 0) + gl.addWidget(gb_size, 1, 1) + gl.setColumnStretch(0, 5) + gl.setColumnStretch(1, 5) + gl.setColumnStretch(2, 1) + + def _get_config_widget(self, parent): + gb_pos = QGroupBox('Image Processing ', parent) + + meth_sp = PyDMEnumComboBox( + gb_pos, init_channel=self._dev+':CalcMethod-Sel') + meth_lb = SiriusLabel(gb_pos, init_channel=self._dev+':CalcMethod-Sts') + meth_ld = QLabel('Method', gb_pos) + + nrpt_ld = QLabel('Num. Pts.', gb_pos) + nrpt_sp = SiriusSpinbox( + gb_pos, init_channel=self._dev+':NrAverages-SP') + rdb = SiriusLabel(gb_pos, init_channel=self._dev+':NrAverages-RB') + rdb.setAlignment(Qt.AlignLeft | Qt.AlignVCenter) + slsh = QLabel('/', gb_pos, alignment=Qt.AlignCenter) + slsh.setStyleSheet('min-width:0.7em; max-width:0.7em;') + cnt = SiriusLabel(gb_pos, init_channel=self._dev+':BufferSize-Mon') + cnt.setAlignment(Qt.AlignRight | Qt.AlignVCenter) + cnt.setToolTip('Current Buffer Size') + pbt = PyDMPushButton( + gb_pos, init_channel=self._dev+':ResetBuffer-Cmd', pressValue=1) + pbt.setToolTip('Reset Buffer') + pbt.setIcon(qta.icon('mdi.delete-empty')) + pbt.setObjectName('rst') + pbt.setStyleSheet( + '#rst{min-width:25px; max-width:25px; icon-size:20px;}') + nrpt_wd = QWidget(gb_pos) + hbl = QHBoxLayout(nrpt_wd) + hbl.addWidget(pbt) + hbl.addStretch() + hbl.addWidget(cnt) + hbl.addWidget(slsh) + hbl.addWidget(rdb) + + rsx_sp = SiriusSpinbox(gb_pos, init_channel=self._dev+':ROISizeX-SP') + rsx_lb = SiriusLabel(gb_pos, init_channel=self._dev+':ROISizeX-RB') + rsx_ld = QLabel('ROI Size X', gb_pos) + + rsy_sp = SiriusSpinbox(gb_pos, init_channel=self._dev+':ROISizeY-SP') + rsy_lb = SiriusLabel(gb_pos, init_channel=self._dev+':ROISizeY-RB') + rsy_ld = QLabel('ROI Size Y', gb_pos) + + ra_bt = PyDMStateButton( + gb_pos, init_channel=self._dev+':ROIAutoCenter-Sel') + ra_lb = SiriusLabel( + gb_pos, init_channel=self._dev+':ROIAutoCenter-Sts') + ra_ld = QLabel('Auto Center:', gb_pos) + + rcx_sp = SiriusSpinbox(gb_pos, init_channel=self._dev+':ROICenterX-SP') + rcx_lb = SiriusLabel(gb_pos, init_channel=self._dev+':ROICenterX-RB') + rcx_ld = QLabel('ROI Center X', gb_pos) + + rcy_sp = SiriusSpinbox(gb_pos, init_channel=self._dev+':ROICenterY-SP') + rcy_lb = SiriusLabel(gb_pos, init_channel=self._dev+':ROICenterY-RB') + rcy_ld = QLabel('ROI Center Y', gb_pos) + + sts_bt = QPushButton(qta.icon('fa5s.ellipsis-h'), '', gb_pos) + sts_bt.setToolTip('Open Detailed Configs') + sts_bt.setObjectName('sts') + sts_bt.setStyleSheet( + '#sts{min-width:25px; max-width:25px; icon-size:20px;}') + Window = create_window_from_widget( + _DetailedWidget, title='Image Processing Detailed Configs') + connect_window( + sts_bt, Window, gb_pos, device=self._dev, + convertion_set=self._conv_set) + hlay = QHBoxLayout() + hlay.addWidget(sts_bt, alignment=Qt.AlignRight) + + lay = QGridLayout(gb_pos) + if self._ori == 'V': + lay.addWidget(meth_ld, 0, 0, 2, 1, alignment=Qt.AlignLeft) + lay.addWidget(meth_sp, 0, 1) + lay.addWidget(meth_lb, 1, 1) + lay.addWidget(nrpt_ld, 2, 0, alignment=Qt.AlignLeft) + lay.addWidget(nrpt_sp, 2, 1) + lay.addWidget(nrpt_wd, 3, 0, 1, 2) + lay.addWidget(rsx_ld, 4+0, 0, 2, 1, alignment=Qt.AlignLeft) + lay.addWidget(rsx_sp, 4+0, 1) + lay.addWidget(rsx_lb, 4+1, 1) + lay.addWidget(rsy_ld, 6+0, 0, 2, 1, alignment=Qt.AlignLeft) + lay.addWidget(rsy_sp, 6+0, 1) + lay.addWidget(rsy_lb, 6+1, 1) + lay.addWidget(sts_bt, 0, 0+4, alignment=Qt.AlignRight) + lay.addWidget(ra_ld, 2+0, 0+3, 2, 1, alignment=Qt.AlignLeft) + lay.addWidget(ra_bt, 2+0, 1+3) + lay.addWidget(ra_lb, 2+1, 1+3, alignment=Qt.AlignLeft) + lay.addWidget(rcx_ld, 4+0, 0+3, 2, 1, alignment=Qt.AlignLeft) + lay.addWidget(rcx_sp, 4+0, 1+3) + lay.addWidget(rcx_lb, 4+1, 1+3) + lay.addWidget(rcy_ld, 6+0, 0+3, 2, 1, alignment=Qt.AlignLeft) + lay.addWidget(rcy_sp, 6+0, 1+3) + lay.addWidget(rcy_lb, 6+1, 1+3) + else: + lay.addWidget(meth_ld, 0, 0, 2, 1, alignment=Qt.AlignLeft) + lay.addWidget(meth_sp, 0, 1) + lay.addWidget(meth_lb, 1, 1) + lay.addWidget(nrpt_ld, 2, 0, alignment=Qt.AlignLeft) + lay.addWidget(nrpt_sp, 2, 1) + lay.addWidget(nrpt_wd, 3, 0, 1, 2) + lay.addWidget(rsx_ld, 4+0, 0, 2, 1, alignment=Qt.AlignLeft) + lay.addWidget(rsx_sp, 4+0, 1) + lay.addWidget(rsx_lb, 4+1, 1) + lay.addWidget(rsy_ld, 6+0, 0, 2, 1, alignment=Qt.AlignLeft) + lay.addWidget(rsy_sp, 6+0, 1) + lay.addWidget(rsy_lb, 6+1, 1) + lay.addWidget(ra_ld, 8+0, 0, 2, 1, alignment=Qt.AlignLeft) + lay.addWidget(ra_bt, 8+0, 1) + lay.addWidget(ra_lb, 8+1, 1, alignment=Qt.AlignLeft) + lay.addWidget(rcx_ld, 10+0, 0, 2, 1, alignment=Qt.AlignLeft) + lay.addWidget(rcx_sp, 10+0, 1) + lay.addWidget(rcx_lb, 10+1, 1) + lay.addWidget(rcy_ld, 12+0, 0, 2, 1, alignment=Qt.AlignLeft) + lay.addWidget(rcy_sp, 12+0, 1) + lay.addWidget(rcy_lb, 12+1, 1) + lay.addWidget(sts_bt, 14, 0, alignment=Qt.AlignLeft) + lay.setRowStretch(15, 5) + + return gb_pos + + def _get_position_widget(self, parent): + gb_posi = QGroupBox('Position [px / mm]', parent) + fl_posi = QFormLayout(gb_posi) + + wid = QWidget(gb_posi) + wid.setLayout(QHBoxLayout()) + xave = SiriusLabel(wid, init_channel=self._dev+':BeamCenterX-Mon') + xavemm = SiriusLabel(wid, init_channel=self._dev+':BeamCentermmX-Mon') + xave.setAlignment(Qt.AlignVCenter | Qt.AlignRight) + xavemm.setAlignment(Qt.AlignVCenter | Qt.AlignLeft) + sep = QLabel('/', wid) + sep.setStyleSheet('max-width:0.7em;') + wid.layout().addWidget(xave) + wid.layout().addWidget(sep) + wid.layout().addWidget(xavemm) + fl_posi.addRow(QLabel( + 'X =', gb_posi, alignment=Qt.AlignBottom), wid) + + wid = QWidget(gb_posi) + wid.setLayout(QHBoxLayout()) + yave = SiriusLabel(wid, init_channel=self._dev+':BeamCenterY-Mon') + yavemm = SiriusLabel(wid, init_channel=self._dev+':BeamCentermmY-Mon') + yave.setAlignment(Qt.AlignVCenter | Qt.AlignRight) + yavemm.setAlignment(Qt.AlignVCenter | Qt.AlignLeft) + sep = QLabel('/', wid) + sep.setStyleSheet('max-width:0.7em;') + wid.layout().addWidget(yave) + wid.layout().addWidget(sep) + wid.layout().addWidget(yavemm) + fl_posi.addRow(QLabel( + 'Y =', gb_posi, alignment=Qt.AlignBottom), wid) + + return gb_posi + + def _get_size_widget(self, parent): + gb_size = QGroupBox('Size [px / mm]', parent) + fl_size = QFormLayout(gb_size) + + wid = QWidget(gb_size) + wid.setLayout(QHBoxLayout()) + xave = SiriusLabel(wid, init_channel=self._dev+':BeamSizeX-Mon') + xavemm = SiriusLabel(wid, init_channel=self._dev+':BeamSizemmX-Mon') + xave.setAlignment(Qt.AlignVCenter | Qt.AlignRight) + xavemm.setAlignment(Qt.AlignVCenter | Qt.AlignLeft) + sep = QLabel('/', wid) + sep.setStyleSheet('max-width:0.7em;') + wid.layout().addWidget(xave) + wid.layout().addWidget(sep) + wid.layout().addWidget(xavemm) + fl_size.addRow(QLabel( + 'X =', gb_size, alignment=Qt.AlignBottom), wid) + + wid = QWidget(gb_size) + wid.setLayout(QHBoxLayout()) + yave = SiriusLabel(wid, init_channel=self._dev+':BeamSizeY-Mon') + yavemm = SiriusLabel(wid, init_channel=self._dev+':BeamSizemmY-Mon') + yave.setAlignment(Qt.AlignVCenter | Qt.AlignRight) + yavemm.setAlignment(Qt.AlignVCenter | Qt.AlignLeft) + sep = QLabel('/', wid) + sep.setStyleSheet('max-width:0.7em;') + wid.layout().addWidget(yave) + wid.layout().addWidget(sep) + wid.layout().addWidget(yavemm) + fl_size.addRow(QLabel( + 'Y =', gb_size, alignment=Qt.AlignBottom), wid) + + return gb_size + + def _update_roi(self): + xaxis = self._roixaxis.getvalue() + yaxis = self._roiyaxis.getvalue() + xproj = self._roixproj.getvalue() + yproj = self._roiyproj.getvalue() + xfit = self._roixfit.getvalue() + yfit = self._roiyfit.getvalue() + notnone = xaxis is not None + notnone &= yaxis is not None + notnone &= xproj is not None + notnone &= yproj is not None + notnone &= xfit is not None + notnone &= yfit is not None + if notnone: + samesize = xaxis.size == xproj.size + samesize &= xaxis.size == xfit.size + samesize &= yaxis.size == yproj.size + samesize &= yaxis.size == yfit.size + if samesize: + xproj = xproj/np.max(xproj) * 400 + yaxis[0] + yproj = yproj/np.max(yproj) * 400 + xaxis[0] + xfit = xfit/np.max(xfit) * 400 + yaxis[0] + yfit = yfit/np.max(yfit) * 400 + xaxis[0] + self.plt_his_x.setData(xaxis, xproj) + self.plt_his_y.setData(yproj, yaxis) + self.plt_fit_x.setData(xaxis, xfit) + self.plt_fit_y.setData(yfit, yaxis) + + srtx = self._roistartx.getvalue() + srty = self._roistarty.getvalue() + endx = self._roiendx.getvalue() + endy = self._roiendy.getvalue() + if set([None, ]) - set([srtx, srty, endx, endy]): + self.plt_roi.setData( + [srtx, srtx, endx, endx, srtx], + [srty, endy, endy, srty, srty])
+ + + +class _DetailedWidget(QWidget): + """Process Image Detail Control.""" + + def __init__(self, parent=None, device='', convertion_set=True): + super().__init__(parent=parent) + self._dev = SiriusPVName(device) + sec = 'ID' if 'BL' in self._dev else self._dev.sec + self._conv_set = convertion_set + self.setObjectName(sec+'App') + self._setupui() + + def _setupui(self): + self.setLayout(QFormLayout()) + self.layout().setSpacing(0) + + self.layout().addRow(QLabel( + '<h4>Image Processing Detailed Controls</h4>', self, + alignment=Qt.AlignTop | Qt.AlignHCenter)) + + wid = QWidget(self) + wid.setLayout(QHBoxLayout()) + sttbtn = PyDMEnumComboBox( + wid, init_channel=self._dev+':ReadingOrder-Sel') + lbl = SiriusLabel(wid, init_channel=self._dev+':ReadingOrder-Sts') + wid.layout().addWidget(sttbtn) + wid.layout().addWidget(lbl) + self.layout().addRow(QLabel( + 'Reading Order', self, alignment=Qt.AlignBottom), wid) + + wid = QWidget(self) + wid.setLayout(QHBoxLayout()) + sttbtn = PyDMStateButton(wid, init_channel=self._dev+':ImgFlipX-Sel') + lbl = SiriusLedState(wid, init_channel=self._dev+':ImgFlipX-Sts') + wid.layout().addWidget(sttbtn) + wid.layout().addWidget(lbl) + self.layout().addRow(QLabel( + 'Flip Horintal', self, alignment=Qt.AlignBottom), wid) + + wid = QWidget(self) + wid.setLayout(QHBoxLayout()) + sttbtn = PyDMStateButton(wid, init_channel=self._dev+':ImgFlipY-Sel') + lbl = SiriusLedState(wid, init_channel=self._dev+':ImgFlipY-Sts') + wid.layout().addWidget(sttbtn) + wid.layout().addWidget(lbl) + self.layout().addRow(QLabel( + 'Flip Vertical', self, alignment=Qt.AlignBottom), wid) + + wid = QWidget(self) + wid.setLayout(QHBoxLayout()) + spnbox = SiriusSpinbox(wid, init_channel=self._dev+':ImgCropLow-SP') + lbl = SiriusLabel(wid, init_channel=self._dev+':ImgCropLow-RB') + wid.layout().addWidget(spnbox) + wid.layout().addWidget(lbl) + self.layout().addRow(QLabel( + 'Min. Pixel Val.', self, alignment=Qt.AlignBottom), wid) + + wid = QWidget(self) + wid.setLayout(QHBoxLayout()) + sttbtn = PyDMStateButton(wid, init_channel=self._dev+':ImgCropUse-Sel') + lbl = SiriusLedState(wid, init_channel=self._dev+':ImgCropUse-Sts') + wid.layout().addWidget(sttbtn) + wid.layout().addWidget(lbl) + self.layout().addRow(QLabel( + 'Crop Image Levels', self, alignment=Qt.AlignBottom), wid) + + wid = QWidget(self) + wid.setLayout(QHBoxLayout()) + spnbox = SiriusSpinbox(wid, init_channel=self._dev+':ImgCropHigh-SP') + lbl = SiriusLabel(wid, init_channel=self._dev+':ImgCropHigh-RB') + wid.layout().addWidget(spnbox) + wid.layout().addWidget(lbl) + self.layout().addRow(QLabel( + 'Max. Pixel Val.', self, alignment=Qt.AlignBottom), wid) + + wid = QWidget(self) + wid.setLayout(QHBoxLayout()) + if self._conv_set: + spb = SiriusSpinbox(wid, init_channel=self._dev+':Px2mmScaleX-SP') + lbl = SiriusLabel(wid, init_channel=self._dev+':Px2mmScaleX-RB') + wid.layout().addWidget(spb) + wid.layout().addWidget(lbl) + else: + lbl = SiriusLabel(wid, init_channel=self._dev+':Px2mmScaleX-Cte') + wid.layout().addWidget(lbl) + self.layout().addRow(QLabel( + 'Pxl 2 mm Scale X', self, alignment=Qt.AlignBottom), wid) + + wid = QWidget(self) + wid.setLayout(QHBoxLayout()) + if self._conv_set: + spb = SiriusSpinbox(wid, init_channel=self._dev+':Px2mmScaleY-SP') + lbl = SiriusLabel(wid, init_channel=self._dev+':Px2mmScaleY-RB') + wid.layout().addWidget(spb) + wid.layout().addWidget(lbl) + else: + lbl = SiriusLabel(wid, init_channel=self._dev+':Px2mmScaleY-Cte') + wid.layout().addWidget(lbl) + self.layout().addRow(QLabel( + 'Pxl 2 mm Scale Y', self, alignment=Qt.AlignBottom), wid) + + wid = QWidget(self) + wid.setLayout(QHBoxLayout()) + sttbtn = PyDMStateButton( + wid, init_channel=self._dev+':Px2mmAutoCenter-Sel') + lbl = SiriusLedState( + wid, init_channel=self._dev+':Px2mmAutoCenter-Sts') + wid.layout().addWidget(sttbtn) + wid.layout().addWidget(lbl) + self.layout().addRow(QLabel( + 'Auto Center', self, alignment=Qt.AlignBottom), wid) + + wid = QWidget(self) + wid.setLayout(QHBoxLayout()) + spnbox = SiriusSpinbox(wid, init_channel=self._dev+':Px2mmCenterX-SP') + lbl = SiriusLabel(wid, init_channel=self._dev+':Px2mmCenterX-RB') + wid.layout().addWidget(spnbox) + wid.layout().addWidget(lbl) + self.layout().addRow(QLabel( + 'Pxl 2 mm Center X', self, alignment=Qt.AlignBottom), wid) + + wid = QWidget(self) + wid.setLayout(QHBoxLayout()) + spnbox = SiriusSpinbox(wid, init_channel=self._dev+':Px2mmCenterY-SP') + lbl = SiriusLabel(wid, init_channel=self._dev+':Px2mmCenterY-RB') + wid.layout().addWidget(spnbox) + wid.layout().addWidget(lbl) + self.layout().addRow(QLabel( + 'Pxl 2 mm Center Y', self, alignment=Qt.AlignBottom), wid) +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/pushbutton.html b/_modules/siriushla/widgets/pushbutton.html new file mode 100644 index 000000000..6e20f8a57 --- /dev/null +++ b/_modules/siriushla/widgets/pushbutton.html @@ -0,0 +1,295 @@ + + + + + + siriushla.widgets.pushbutton — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.widgets.pushbutton

+"""Sirius pushbutton."""
+
+from qtpy.QtCore import Slot, Property
+from qtpy.QtWidgets import QPushButton
+
+from pydm.widgets.base import PyDMPrimitiveWidget
+from pydm.widgets import PyDMPushButton
+
+
+
+[docs] +class SiriusPushButton(PyDMPushButton): + """ + Basic PushButton to send a fixed value. + + The PyDMPushButton is meant to hold a specific value, and send that value + to a channel when it is clicked, much like the MessageButton does in EDM. + The PyDMPushButton works in two different modes of operation, first, a + fixed value can be given to the :attr:`.pressValue` attribute, whenever the + button is clicked a signal containing this value will be sent to the + connected channel. This is the default behavior of the button. However, if + the :attr:`.relativeChange` is set to True, the fixed value will be added + to the current value of the channel. This means that the button will + increment a channel by a fixed amount with every click, a consistent + relative move + + Parameters + ---------- + parent : QObject, optional + Parent of PyDMPushButton + + init_channel : str, optional + ID of channel to manipulate + + label : str, optional + String to place on button + + icon : QIcon, optional + An Icon to display on the PyDMPushButton + + pressValue : int, float, str + Value to be sent when the button is pressed + + releaseValue : int, float, str + Value to be sent when the button is released + + relative : bool, optional + Choice to have the button perform a relative put, instead of always + setting to an absolute value + + """ + + def __init__(self, parent=None, init_channel=None, label='', icon=None, + pressValue=1, releaseValue=None, relative=False): + PyDMPushButton.__init__( + self, parent=parent, label=label, icon=icon, + pressValue=pressValue, relative=relative, + init_channel=init_channel) + self._releaseValue = releaseValue + self.clicked.disconnect(self.sendValue) + self.pressed.connect(self.sendValue) + self.released.connect(self.sendReleaseValue) + + @Property(str) + def releaseValue(self): + """ + This property holds the value to send back through the channel. + + The type of this value does not matter because it is automatically + converted to match the prexisting value type of the channel. However, + the sign of the value matters. Not used when relative flag is True. + + Returns + ------- + str + """ + if self._releaseValue is None: + return None + return str(self._releaseValue) + + @releaseValue.setter + def releaseValue(self, value): + """ + This property holds the value to send back through the channel. + + The type of this value does not matter because it is automatically + converted to match the prexisting value type of the channel. However, + the sign of the value matters. Not used when relative flag is True. + + Parameters + ---------- + value : str + """ + if value is None: + self._releaseValue = None + elif str(value) != self._releaseValue: + self._releaseValue = str(value) + +
+[docs] + @Slot() + def sendReleaseValue(self): + """ + Send a new value to the channel. + + This function interprets the settings of the PyDMPushButton and sends + the appropriate value out through the :attr:`.send_value_signal`. + + Returns + ------- + None if any of the following condition is False: + 1. There's no new value (pressValue) for the widget + 2. There's no initial or current value for the widget + 3. The relative flag is True + Otherwise, return the value sent to the channel: + 1. The value sent to the channel is the same as the releaseValue + """ + if self._releaseValue is None or self.value is None or self._relative: + return None + + send_value = self._releaseValue + self.send_value_signal[self.channeltype].emit( + self.channeltype(send_value)) + return send_value
+
+ + + +
+[docs] +class CAPushButton(QPushButton, PyDMPrimitiveWidget): + """QPushButton with rules."""
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/pvnames_tree.html b/_modules/siriushla/widgets/pvnames_tree.html new file mode 100644 index 000000000..0300d3bc6 --- /dev/null +++ b/_modules/siriushla/widgets/pvnames_tree.html @@ -0,0 +1,781 @@ + + + + + + siriushla.widgets.pvnames_tree — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.pvnames_tree

+"""PVName selection tree view."""
+import re
+import uuid
+from copy import deepcopy as _dcopy
+from qtpy.QtCore import Qt, QSize, Signal, QThread, Slot
+from qtpy.QtWidgets import QTreeWidget, QTreeWidgetItem, QProgressDialog, \
+    QAction, QMenu, QLabel, QWidget, QVBoxLayout, QHBoxLayout, QLineEdit, \
+    QHeaderView
+
+from siriuspy.namesys import SiriusPVName
+
+
+
+[docs] +class QTreeItem(QTreeWidgetItem): + """Tree Item.""" + + def __init__(self, string_list, parent=None): + """Init.""" + super().__init__(parent, string_list) + self._shown = set() + self._status = { + Qt.Checked: set(), Qt.Unchecked: set(), Qt.PartiallyChecked: set()} + self._myhash = uuid.uuid4() + + @property + def myhash(self): + return self._myhash + +
+[docs] + def isLeaf(self): + """Return if is Leaf.""" + if self.childCount() > 0: + return False + return True
+ + +
+[docs] + def setHidden(self, status): + """Overhide setHidden method.""" + super().setHidden(status) + if isinstance(self.parent(), QTreeItem): + self.parent().childHidden(self, status)
+ + +
+[docs] + def childHidden(self, child, status): + """Set child hidden.""" + getattr(self._shown, 'discard' if status else 'add')(child.myhash) + status = not self._shown + super().setHidden(status) + if isinstance(self.parent(), QTreeItem): + self.parent().childHidden(self, status)
+ + +
+[docs] + def setData(self, column, role, value): + """Set data.""" + if column == 0 and role == Qt.CheckStateRole: + if self.checkState(0) == Qt.PartiallyChecked: + value = Qt.Unchecked + # Trigger parent check + if isinstance(self.parent(), QTreeItem): + self.parent().childChecked(self, column, value) + # Trigger children check + if value in (Qt.Checked, Qt.Unchecked): + if self.childCount() == 0: + if self.checkState(column) != value: + self.treeWidget().parent().itemChecked.emit( + self, column, value) + super().setData(column, role, value) + else: + for chil in range(self.childCount()): + if not self.child(chil).isHidden(): + self.child(chil).setData( + column, Qt.CheckStateRole, value) + else: + super().setData(column, role, value)
+ + + def _check_children(self): + """Child was checked.""" + check = self._status + if check[Qt.PartiallyChecked]: + return Qt.PartiallyChecked + elif check[Qt.Checked] and check[Qt.Unchecked]: + return Qt.PartiallyChecked + elif check[Qt.Checked]: + return Qt.Checked + return Qt.Unchecked + +
+[docs] + def childChecked(self, child, column, status): + """Child was checked.""" + self._status[status].add(child.myhash) + left = self._status.keys() - {status, } + for sts in left: + self._status[sts].discard(child.myhash) + + mystate = self.checkState(column) + if status == Qt.PartiallyChecked: + status = Qt.PartiallyChecked + elif status != mystate: + status = self._check_children() + else: + status = mystate + + super().setData(column, Qt.CheckStateRole, status) + if isinstance(self.parent(), QTreeItem): + self.parent().childChecked(self, column, status)
+
+ + + +
+[docs] +class BuildTree(QThread): + """QThread to build tree.""" + + currentItem = Signal(str) + itemDone = Signal() + completed = Signal() + + def __init__(self, obj): + """Init.""" + super().__init__(obj) + self.obj = obj + self._quit_task = False + +
+[docs] + def size(self): + """Return task size.""" + return len(self.obj.items)
+ + +
+[docs] + def exit_task(self): + """Set flag to quit thread.""" + self._quit_task = True
+ + +
+[docs] + def run(self): + """Build tree.""" + for item in self.obj.items: + if self._quit_task: + break + name = item + if not isinstance(name, str): + name = item[0] + self.currentItem.emit(name) + self.obj._add_item(item) + self.itemDone.emit() + self.completed.emit()
+
+ + + +
+[docs] +class Tree(QTreeWidget): + + def __init__(self, parent=None): + super().__init__(parent) + # self.header().setSectionsMovable(False) + +
+[docs] + def resizeEvent(self, event): + # self.setColumnWidth(0, self.width()*3/6) + self.setColumnWidth(1, self.width()*1.3/6) + # self.setColumnWidth(2, self.width()*0.4/6) + if not self.header().isHidden(): + self.header().setSectionResizeMode(0, QHeaderView.Stretch) + self.header().setSectionResizeMode(1, QHeaderView.Fixed) + self.header().setSectionResizeMode(2, QHeaderView.ResizeToContents) + self.header().setStretchLastSection(False) + super().resizeEvent(event)
+
+ + + +
+[docs] +class PVNameTree(QWidget): + """Build a tree with SiriusPVNames.""" + + itemChecked = Signal(QTreeItem, int, int) + updateItemCheckedCount = Signal(int) + + def __init__(self, items=tuple(), tree_levels=tuple(), + checked_levels=tuple(), parent=None): + """Constructor.""" + super().__init__(parent) + + self._item_map = dict() + + self._pnames = tree_levels + self._leafs = list() + self._nr_checked_items = 0 + + self._setup_ui() + self._create_actions() + + self.check_children = True + self.check_parent = True + + self.check_requested_levels(checked_levels) + + self.items = _dcopy(items) + self.tree.expanded.connect( + lambda idx: self.tree.resizeColumnToContents(idx.column())) + + def _setup_ui(self): + self._msg = QLabel(self) + + # Add Selection Tree + self._check_count = QLabel(self, alignment=Qt.AlignRight) + self.tree = Tree(self) + self.tree.setColumnCount(3) + self.tree.setHeaderHidden(False) + self.tree.setHeaderLabels(['Name', 'Value', 'Delay']) + + self.updateItemCheckedCount.emit(0) + self.itemChecked.connect(self._item_checked) + + # Add filter for tree + self._filter_le = QLineEdit(self) + self._filter_le.setPlaceholderText("Filter Items...") + self._filter_le.textChanged.connect(self._filter_items) + + self.setLayout(QVBoxLayout()) + hl = QHBoxLayout() + hl.addWidget(self._msg) + hl.addWidget(self._check_count) + self.layout().addWidget(self._filter_le) + self.layout().addLayout(hl) + self.layout().addWidget(self.tree) + + def _create_actions(self): + self._act_check_all = QAction("Check All", self) + self._act_check_all.triggered.connect(self.check_all) + self._act_uncheck_all = QAction("Uncheck All", self) + self._act_uncheck_all.triggered.connect(self.uncheck_all) + self._act_expand_all = QAction("Expand All", self) + self._act_expand_all.triggered.connect(self.expand_all) + self._act_collapse_all = QAction("Collapse All", self) + self._act_collapse_all.triggered.connect(self.collapse_all) + +
+[docs] + def clear(self): + """Clear tree.""" + self._items = tuple() + self._leafs = list() + self._item_map = dict() + self.tree.clear() + self._nr_checked_items = 0
+ + + @property + def message(self): + return self._msg.text() + + @message.setter + def message(self, text): + return self._msg.setText(text) + + @property + def items(self): + """Items.""" + return self._items + + @items.setter + def items(self, value): + self.tree.clear() + self._items = _dcopy(value) + self._add_items() + self._filter_items(self._filter_le.text()) + +
+[docs] + def check_all(self): + """Check all items.""" + for item in self._leafs: + if not item.isHidden(): + item.setCheckState(0, Qt.Checked)
+ + +
+[docs] + def uncheck_all(self): + """Uncheck all items.""" + for item in self._leafs: + if not item.isHidden(): + item.setCheckState(0, Qt.Unchecked)
+ + +
+[docs] + def expand_all(self): + """Expand all items.""" + for item in self._item_map.values(): + if item.childCount() > 0: + item.setExpanded(True)
+ + +
+[docs] + def collapse_all(self): + self.tree.collapseAll()
+ + +
+[docs] + @staticmethod + def mag_group(name): + """Return magnet group.""" + if re.match('^B\w*(-[0-9])?$', name.dev): + return 'Dipole' + elif re.match('^Q[A-RT-Z0-9]\w*(-[0-9])?$', name.dev): + if re.match('Fam', name.sub): + return 'Quadrupole' + elif re.match('SI', name.sec): + return 'Trim' + else: + return 'Quadrupole' + elif re.match('^QS.*$', name.dev): + return 'Quadrupole Skew' + elif re.match('^Spect.*$', name.dev): + return 'Spectrometer' + elif re.match('^Slnd.*$', name.dev): + return 'Solenoid' + elif re.match('^S\w*(-[0-9])?$', name.dev): + return 'Sextupole' + elif re.match('^C(H|V)(-[0-9])?$', name.dev): + return 'Corrector' + elif re.match('^FC\w*(-[0-9])?$', name.dev): + return 'Fast Corrector' + elif re.match('.*Kckr.*$', name.dev): + return 'Kicker' + elif re.match('.*Sept.*$', name.dev): + return 'Septum' + elif re.match('Ping.*$', name.dev): + return 'Pinger' + elif re.match('^Lens.*$', name.dev): + return 'Lens' + else: + return 'Other'
+ + +
+[docs] + def check_requested_levels(self, levels): + """Set requested levels checked.""" + for level in levels: + self._item_map[level].setCheckState(0, Qt.Checked)
+ + + def _add_item(self, item): + + if isinstance(item, str): + pvname = item + row = [item, ] + else: + if not isinstance(item[0], str): + raise ValueError + pvname = item[0] + row = [item[0], ] + row.extend([str(i) for i in item[1:]]) + # pvals = [] + parent = self.tree.invisibleRootItem() + parent_key = '' + # if pvname.count(':') == 2 and pvname.count('-') == 3: + try: + pvname = SiriusPVName(pvname) + except (IndexError, ValueError): + pass + # Deal with LI LLRF PVs: + if pvname.startswith('LA'): + dic_ = {'sec': 'LI', 'dis': 'RF', 'dev': 'LLRF'} + for p in self._pnames: + key = dic_.get(p, 'DLLRF') + if key: + item_key = parent_key + key + # item = self._item_map.symbol(item_key) + item = self._item_map[item_key] \ + if item_key in self._item_map else None + if item is not None: + parent = item + else: + new_item = QTreeItem([key], parent) + new_item.setCheckState(0, Qt.Unchecked) + # self._item_map.add_symbol(item_key, new_item) + self._item_map[item_key] = new_item + # parent.addChild(new_item) + parent = new_item + parent_key = item_key + # Deal with BO LLRF PVs: + elif pvname.startswith('BR'): + dic_ = {'sec': 'BO', 'dis': 'RF', 'dev': 'DLLRF'} + for p in self._pnames: + key = dic_.get(p, 'DLLRF') + if key: + item_key = parent_key + key + # item = self._item_map.symbol(item_key) + item = self._item_map[item_key] \ + if item_key in self._item_map else None + if item is not None: + parent = item + else: + new_item = QTreeItem([key], parent) + new_item.setCheckState(0, Qt.Unchecked) + # self._item_map.add_symbol(item_key, new_item) + self._item_map[item_key] = new_item + # parent.addChild(new_item) + parent = new_item + parent_key = item_key + elif pvname.startswith('SR'): + dic_ = {'sec': 'SI', 'dis': 'RF', 'dev': 'DLLRF'} + for p in self._pnames: + key = dic_.get(p, 'DLLRF') + if key: + item_key = parent_key + key + # item = self._item_map.symbol(item_key) + item = self._item_map[item_key] \ + if item_key in self._item_map else None + if item is not None: + parent = item + else: + new_item = QTreeItem([key], parent) + new_item.setCheckState(0, Qt.Unchecked) + # self._item_map.add_symbol(item_key, new_item) + self._item_map[item_key] = new_item + # parent.addChild(new_item) + parent = new_item + parent_key = item_key + elif pvname.startswith('RF'): + dic_ = {'sec': 'AS', 'dis': 'RF', 'dev': 'RFGen'} + for p in self._pnames: + key = dic_.get(p, 'RFGen') + if key: + item_key = parent_key + key + # item = self._item_map.symbol(item_key) + item = self._item_map[item_key] \ + if item_key in self._item_map else None + if item is not None: + parent = item + else: + new_item = QTreeItem([key], parent) + new_item.setCheckState(0, Qt.Unchecked) + # self._item_map.add_symbol(item_key, new_item) + self._item_map[item_key] = new_item + # parent.addChild(new_item) + parent = new_item + parent_key = item_key + elif pvname.startswith('RA'): + sec = 'BO' if pvname.startswith('RA-RaBO') else 'SI' + dic_ = {'sec': sec, 'dis': 'RF', 'dev': 'LLRF'} + for p in self._pnames: + key = dic_.get(p, 'LLRF') + if key: + item_key = parent_key + key + item = self._item_map[item_key] \ + if item_key in self._item_map else None + if item is not None: + parent = item + else: + new_item = QTreeItem([key], parent) + new_item.setCheckState(0, Qt.Unchecked) + self._item_map[item_key] = new_item + parent = new_item + parent_key = item_key + elif isinstance(pvname, SiriusPVName): + # Parse it with SiriusPVName + pvname = SiriusPVName(pvname) + # Parse PVName + for p in self._pnames: + try: + key = getattr(pvname, p) + except AttributeError: + key = getattr(PVNameTree, p)(pvname) + if key: + item_key = parent_key + key + # item = self._item_map.symbol(item_key) + item = self._item_map[item_key] \ + if item_key in self._item_map else None + if item is not None: + parent = item + else: + new_item = QTreeItem([key], parent) + new_item.setCheckState(0, Qt.Unchecked) + # self._item_map.add_symbol(item_key, new_item) + self._item_map[item_key] = new_item + # parent.addChild(new_item) + parent = new_item + parent_key = item_key + else: + key = pvname[:2] + item_key = parent_key + key + item = self._item_map[item_key] \ + if item_key in self._item_map else None + if item is None: + new_item = QTreeItem([key], parent) + new_item.setCheckState(0, Qt.Unchecked) + self._item_map[item_key] = new_item + parent = new_item + else: + parent = item + # Insert leaf node pvname + new_item = QTreeItem(row, parent) + new_item.setCheckState(0, Qt.Unchecked) + self._item_map[pvname] = new_item + self._leafs.append(new_item) + + def _add_items(self): + # Connect signals + t = BuildTree(self) + t.finished.connect(t.deleteLater) + dlg = None + if len(self.items) > 1500: + dlg = QProgressDialog( + labelText='Building Tree', + minimum=0, maximum=len(self._items), parent=self) + t.itemDone.connect(lambda: dlg.setValue(dlg.value() + 1)) + t.finished.connect(dlg.close) + # Start + t.start() + if dlg: + dlg.exec_() + t.wait() + +
+[docs] + def checked_items(self): + """Return checked items.""" + return [item.data(0, Qt.DisplayRole) for item in self._leafs + if item.checkState(0) == Qt.Checked]
+ + +
+[docs] + def sizeHint(self): + """Override sizehint.""" + return QSize(600, 600)
+ + +
+[docs] + def contextMenuEvent(self, event): + """Show context menu.""" + menu = QMenu(self) + menu.addAction(self._act_check_all) + menu.addAction(self._act_uncheck_all) + menu.addSeparator() + menu.addAction(self._act_expand_all) + menu.addAction(self._act_collapse_all) + menu.popup(event.globalPos())
+ + + @Slot(str) + def _filter_items(self, text): + """Filter pvnames based on text inserted at line edit.""" + selected_pvs = 0 + try: + pattern = re.compile(text, re.I) + except Exception: + return + + for node in self._leafs: + if pattern.search(node.data(0, 0)): + node.setHidden(False) + selected_pvs += 1 + else: + # node.setCheckState(0, Qt.Unchecked) + node.setHidden(True) + self._msg.setText('Showing {} Items.'.format(selected_pvs)) + + @Slot(QTreeItem, int, int) + def _item_checked(self, item, column, value): + if item.childCount() == 0: + if value == Qt.Checked: + self._nr_checked_items += 1 + elif value == Qt.Unchecked: + self._nr_checked_items -= 1 + self._check_count.setText( + '{} Items checked.'.format(self._nr_checked_items)) + self.updateItemCheckedCount.emit(self._nr_checked_items)
+ + + +if __name__ == "__main__": + # import sys + from siriushla.sirius_application import SiriusApplication + + app = SiriusApplication() + + items = [] + for i in range(800): + items.extend([('SI-Fam:PS-B1B1{}:PwrState-Sel'.format(i), 1, 0.0), + ('BO-Fam:PS-QD{}:Current-SP'.format(i), 1, 0.0), + ('BO-Fam:PS-B-{}:PwrState-Sel'.format(i), 1, 0.0)]) + w = PVNameTree( + items=items, tree_levels=('sec', 'mag_group'), + checked_levels=('BOQuadrupole', )) + w.show() + # w.items = items + # w.check_requested_levels(('BOQuadrupole', )) + + # sys.exit(app.exec_()) + app.exec_() +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/relative_widget.html b/_modules/siriushla/widgets/relative_widget.html new file mode 100644 index 000000000..d6785d445 --- /dev/null +++ b/_modules/siriushla/widgets/relative_widget.html @@ -0,0 +1,195 @@ + + + + + + siriushla.widgets.relative_widget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.relative_widget

+from qtpy.QtWidgets import QWidget, QHBoxLayout
+
+
+[docs] +class RelativeWidget(QWidget): + ''' Widget that stays in a relative position in the window ''' + ''' Relative position and size are given + as a percentage based on the size of the parents''' + + def __init__(self, parent=None, widget=None, relative_pos=None): + """.""" + super().__init__(parent=parent) + self.parent = parent + lay = QHBoxLayout() + lay.addWidget(widget) + self.setLayout(lay) + self.posX = relative_pos[0] + self.posY = relative_pos[1] + self.width = relative_pos[2] + self.height = relative_pos[3] + +
+[docs] + def relativeResize(self): + ''' Resize and position in according to the relative position ''' + self.move( + self.parent.geometry().width() * self.posX / 100, + self.parent.geometry().height() * self.posY / 100) + self.resize( + self.parent.geometry().width() * self.width / 100, + self.parent.geometry().height() * self.height / 100)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/scrollbar.html b/_modules/siriushla/widgets/scrollbar.html new file mode 100644 index 000000000..6265305ce --- /dev/null +++ b/_modules/siriushla/widgets/scrollbar.html @@ -0,0 +1,243 @@ + + + + + + siriushla.widgets.scrollbar — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.widgets.scrollbar

+"""PyDMScrollBar module."""
+
+from qtpy.QtCore import Qt, Signal
+from .QDoubleScrollBar import QDoubleScrollBar
+from pydm.widgets.base import PyDMWritableWidget, TextFormatter
+
+
+
+[docs] +class PyDMScrollBar(QDoubleScrollBar, TextFormatter, PyDMWritableWidget): + """ + A QDoubleScrollBar with support for Channels and more from PyDM. + + Parameters + ---------- + parent : QWidget + The parent widget for the scroll bar + init_channel : str, optional + The channel to be used by the widget. + orientation : Qt.Horizontal, Qt.Vertical + Orientation of the scroll bar + precision : int + Precision to be use. Used to calculate size of the scroll bar step + + """ + + value_changed_signal = Signal([int], [float], [str]) + connected_signal = Signal() + disconnected_signal = Signal() + + def __init__(self, parent=None, orientation=Qt.Horizontal, + init_channel=None): + """Init.""" + QDoubleScrollBar.__init__(self, orientation, parent) + PyDMWritableWidget.__init__(self, init_channel) + + self.setFocusPolicy(Qt.StrongFocus) + self.setInvertedControls(False) + + self.setTracking(True) + self.actionTriggered.connect(self.send_value) + +
+[docs] + def widget_ctx_menu(self): + """Return context menu.""" + return self.contextMenu
+ + +
+[docs] + def send_value(self): + """Emit a :attr:`send_value_signal` to update channel value.""" + value = self.sliderPosition + if self._connected and self.channeltype is not None: + self.send_value_signal[self.channeltype].emit( + self.channeltype(value))
+ + +
+[docs] + def ctrl_limit_changed(self, which, new_limit): + """Set new upper/lower limits as maximum/minimum values.""" + PyDMWritableWidget.ctrl_limit_changed(self, which, new_limit) + + if which == "UPPER": + self.setMaximum(self._upper_ctrl_limit) + else: + self.setMinimum(self._lower_ctrl_limit)
+ + +
+[docs] + def precision_changed(self, new_precision): + """Set the step size based on the new precision value received.""" + TextFormatter.precision_changed(self, new_precision) + self.setDecimals(round(self._prec)) + self.setSingleStep(1/10**self._prec) + self.setPageStep(10/10**self._prec)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/selection_matrix.html b/_modules/siriushla/widgets/selection_matrix.html new file mode 100644 index 000000000..80fab9c50 --- /dev/null +++ b/_modules/siriushla/widgets/selection_matrix.html @@ -0,0 +1,517 @@ + + + + + + siriushla.widgets.selection_matrix — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.selection_matrix

+"""Selection Widget."""
+
+from functools import partial as _part
+
+from qtpy.QtWidgets import QGridLayout, QHBoxLayout, QLabel, QCheckBox,\
+    QScrollArea, QWidget, QPushButton, QSizePolicy as QSzPol
+from qtpy.QtCore import Qt, QRect, QPoint, Signal
+from qtpy.QtGui import QBrush, QColor, QPainter
+
+from siriushla.widgets.led import SiriusLedAlert
+
+from .QLed import QLed
+from .pushbutton import CAPushButton
+
+
+
+[docs] +class SelectionMatrixWidget(QWidget): + """Widget to perform component selection. + + Parameters + ---------- + parent : QWidget, optional + The parent widget for the SelectionMatrixWidget. + title: str, optional + Widget title. + has_bothplanes: bool, optional + Whether to show button to send applyBothPlanesClicked signal. + Default: False. + toggle_all_false_text: string, optional + Text to be displayed in toggleAllItems to False button. + Default: 'Disable All'. + show_toggle_all_false: bool, optional + Whether to show button to send toggleAllItems to False. + Default: True. + toggle_all_true_text: string, optional + Text to be displayed in toggleAllItems to True button. + Default: 'Enable All'. + show_toggle_all_true: bool, optional + Whether to show button to send toggleAllItems to True. + Default: True. + use_scroll: bool, optional + Whether to use or not QScrollArea. + Default: True. + rules: + PyDM rules to be applied in write buttons. + Default: None. + + Signals + ------- + applyChangesClicked: + emitted when "Apply Changes" button is clicked + applyBothPlanesClicked: + emitted when "Apply Both Planes" button is clicked + """ + + applyChangesClicked = Signal() + applyBothPlanesClicked = Signal() + + def __init__( + self, parent=None, title='', has_bothplanes=False, + toggle_all_false_text='Disable All', show_toggle_all_false=True, + toggle_all_true_text='Enable All', show_toggle_all_true=True, + use_scroll=True, rules=None): + """Init.""" + super().__init__(parent) + + self.title = title + self.has_bothplanes = has_bothplanes + self.toggle_all_false_text = toggle_all_false_text + self.show_toggle_all_false = show_toggle_all_false + self.toggle_all_true_text = toggle_all_true_text + self.show_toggle_all_true = show_toggle_all_true + self.use_scroll = use_scroll + self.enbl_rules = rules + + self.begin = QPoint() + self.end = QPoint() + + self._top_headers, self._side_headers = self.get_headers() + self._widgets = self.get_widgets() + self._positions = self.get_positions() + self._top_header_wids, self._side_header_wids = list(), list() + self._setupUi() + + def _setupUi(self, side_header_size_em=2, top_header_size_em=2): + lay = QGridLayout(self) + + if self.title: + lab = QLabel(self.title, self, alignment=Qt.AlignCenter) + lab.setStyleSheet("font-weight: bold;") + lay.addWidget(lab, 0, 0, 1, 1) + + # scroll area + widgets matrix + scr_ar_wid = QWidget() + scr_ar_wid.setObjectName('scrollarea') + scr_ar_wid.setStyleSheet( + '#scrollarea {background-color: transparent;}') + if self.use_scroll: + scr_ar = QScrollArea(self) + scr_ar.setWidget(scr_ar_wid) + scr_ar.setWidgetResizable(True) + scr_ar.setSizeAdjustPolicy(scr_ar.AdjustToContents) + lay.addWidget(scr_ar, 1, 0, 1, 1) + else: + scr_ar_wid.setSizePolicy(QSzPol.Maximum, QSzPol.Maximum) + lay.addWidget(scr_ar_wid, 1, 0, 1, 1) + + glay = QGridLayout(scr_ar_wid) + glay.setContentsMargins(0, 0, 0, 0) + for i, head in enumerate(self._top_headers): + head_wid = QPushButton(head, self) + head_wid.setStyleSheet(f'min-width:{top_header_size_em:f}em;') + head_wid.clicked.connect( + _part(self.selectWidgetsAt, i, isrow=False)) + self._top_header_wids.append(head_wid) + glay.addWidget(head_wid, 0, i+1) + for i, head in enumerate(self._side_headers): + head_wid = QPushButton(head, self) + head_wid.setStyleSheet(f'min-width:{side_header_size_em:f}em;') + head_wid.clicked.connect( + _part(self.selectWidgetsAt, i, isrow=True)) + self._side_header_wids.append(head_wid) + glay.addWidget(head_wid, i+1, 0) + for i, wid in enumerate(self._widgets): + pos = self._positions[i] + glay.addWidget(wid, pos[0]+1, pos[1]+1) + led = wid.findChild(QLed) + if not led: + continue + led.clicked.connect(led.toggleSelected) + + # action buttons + hlay = QHBoxLayout() + hlay.addStretch() + + self.btn_unsel_all = QPushButton('Undo Selection') + self.btn_unsel_all.setDefault(True) + self.btn_unsel_all.clicked.connect(self.undoItemsSelection) + hlay.addWidget(self.btn_unsel_all) + hlay.addStretch() + + self.btn_dsbl_all = QPushButton(self.toggle_all_false_text) + self.btn_dsbl_all.clicked.connect(_part(self.toggleAllItems, False)) + self.btn_dsbl_all.setVisible(self.show_toggle_all_false) + hlay.addWidget(self.btn_dsbl_all) + if self.show_toggle_all_false: + hlay.addStretch() + + self.btn_enbl_all = QPushButton(self.toggle_all_true_text) + self.btn_enbl_all.clicked.connect(_part(self.toggleAllItems, True)) + self.btn_enbl_all.setVisible(self.show_toggle_all_true) + hlay.addWidget(self.btn_enbl_all) + if self.show_toggle_all_true: + hlay.addStretch() + + self.btn_send = CAPushButton('Apply Changes') + self.btn_send.rules = self.enbl_rules + self.btn_send.clicked.connect(self.applyChangesClicked.emit) + hlay.addWidget(self.btn_send) + hlay.addStretch() + + if self.has_bothplanes: + self.btn_send_otpl = CAPushButton('Apply Both Planes') + self.btn_send_otpl.rules = self.enbl_rules + self.btn_send_otpl.clicked.connect( + self.applyBothPlanesClicked.emit) + hlay.addWidget(self.btn_send_otpl) + hlay.addStretch() + + lay.addLayout(hlay, 2, 0, 1, 1) + + lay.setSizeConstraint(lay.SetMinimumSize) + +
+[docs] + def paintEvent(self, _): + """Paint event to draw selection rectangle.""" + if self.begin == self.end: + return + painter = QPainter(self) + brush = QBrush(QColor(100, 10, 10, 40)) + painter.setBrush(brush) + painter.drawRect(QRect(self.begin, self.end))
+ + +
+[docs] + def mousePressEvent(self, event): + """Mouse press event.""" + self.begin = event.pos() + self.end = event.pos() + self.update()
+ + +
+[docs] + def mouseMoveEvent(self, event): + """Mouse move event.""" + self.end = event.pos() + self.update()
+ + +
+[docs] + def mouseReleaseEvent(self, event): + """Mouse release event.""" + self.end = event.pos() + self.selectItems() + self.begin = event.pos() + self.update()
+ + +
+[docs] + def selectItems(self): + """Select items.""" + for wid in self._widgets: + if not wid.isVisible(): + continue + led = wid.findChild(QLed) + if led and self._is_within_area(led): + led.toggleSelected() + check = wid.findChild(QCheckBox) + if check and self._is_within_area(check): + check.toggle()
+ + + def _is_within_area(self, wid): + pos = wid.mapTo(self, wid.pos()) + _sz = wid.size() + _x1 = pos.x()+_sz.width()/2 > self.begin.x() + _x2 = pos.x()+_sz.width()/2 > self.end.x() + _y1 = pos.y()+_sz.height()/2 > self.begin.y() + _y2 = pos.y()+_sz.height()/2 > self.end.y() + if _x1 != _x2 and _y1 != _y2: + return True + return False + +
+[docs] + def undoItemsSelection(self): + """Undo items selection.""" + for wid in self._widgets: + led = wid.findChild(QLed) + if led: + led.setSelected(False) + check = wid.findChild(QCheckBox) + if check: + check.setChecked(False)
+ + +
+[docs] + def toggleAllItems(self, value): + """Toggle all items.""" + for wid in self._widgets: + led = wid.findChild(QLed) + if led: + new_sel = (bool(led.state) != value) + if isinstance(led, SiriusLedAlert): + if not new_sel: + led.setSelected(True) + else: + if new_sel: + led.setSelected(True) + check = wid.findChild(QCheckBox) + if check: + check.setChecked(value)
+ + +
+[docs] + def selectWidgetsAt(self, idx, isrow=False): + """Select widgets at idx (row or column).""" + for i, wid in enumerate(self._widgets): + row, col = self._positions[i] + if (isrow and row == idx) or (not isrow and col == idx): + led = wid.findChild(QLed) + if led: + led.toggleSelected() + check = wid.findChild(QCheckBox) + if check: + check.toggle()
+ + + # --- properties --- + + @property + def headers(self): + """Return top and side header text lists, respectively.""" + return self._top_headers, self._side_headers + + @property + def header_widgets(self): + """Return top and side header widget lists, respectively.""" + return self._top_header_wids, self._side_header_wids + + @property + def widgets(self): + """Return widget list.""" + return self._widgets + + @property + def positions(self): + """Return widget position list.""" + return self._positions + + # --- specific methods, should be implemented in derivation --- + +
+[docs] + def get_headers(self): + """ + Should be implemented in class derivation. + + Return + ------ + top_headers: tuple or list + A list of strings for top headers of the selection matrix widget. + side_headers: tuple or list + A list of strings for side headers of the selection matrix widget. + """ + raise NotImplementedError
+ + +
+[docs] + def get_widgets(self): + """ + Should be implemented in class derivation. + + Return + ------ + widgets: tuple or list + A tuple or list of widgets to be put in matrix. + """ + raise NotImplementedError
+ + +
+[docs] + def get_positions(self): + """ + Should be implemented in class derivation. + + Return + ------ + positions: tuple or list + A tuple or list of layout positions for each widget + returned by get_widgets. + """ + raise NotImplementedError
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/signal_channel.html b/_modules/siriushla/widgets/signal_channel.html new file mode 100644 index 000000000..a8b9fbbae --- /dev/null +++ b/_modules/siriushla/widgets/signal_channel.html @@ -0,0 +1,260 @@ + + + + + + siriushla.widgets.signal_channel — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.signal_channel

+#!/usr/bin/env python-sirius
+
+from copy import deepcopy as _dcopy
+import numpy as _np
+from qtpy.QtCore import Signal, Slot, QObject
+from pydm.widgets.channel import PyDMChannel
+
+
+
+[docs] +class SiriusConnectionSignal(QObject, PyDMChannel): + send_value_signal = Signal( + [int], [float], [str], [bool], [_np.ndarray], [list]) + new_value_signal = Signal( + [int], [float], [str], [bool], [_np.ndarray], [list]) + connection_state_signal = Signal(bool) + write_access_signal = Signal(bool) + enum_strings_signal = Signal(tuple) + unit_signal = Signal(str) + prec_signal = Signal(int) + new_severity_signal = Signal(int) + upper_ctrl_limit_signal = Signal([float], [int]) + lower_ctrl_limit_signal = Signal([float], [int]) + + def __init__(self, address, **kws): + QObject.__init__(self) + PyDMChannel.__init__(self, address, **kws) + + self.connection_slot = self._connection_slot + self.value_slot = self._value_slot + self.severity_slot = self._severity_slot + self.write_access_slot = self._write_access_slot + self.enum_strings_slot = self._enum_strings_slot + self.unit_slot = self._unit_slot + self.prec_slot = self._prec_slot + self.upper_ctrl_limit_slot = self._upper_ctrl_limit_slot + self.lower_ctrl_limit_slot = self._lower_ctrl_limit_slot + self.value_signal = self.send_value_signal + + self.channeltype = None + self._value = None + self.connected = None + self.connect() + +
+[docs] + def getvalue(self): + if self.connected and self._value is not None: + return _dcopy(self._value)
+ + + value = property(fget=getvalue) + + @Slot(bool) + def _connection_slot(self, connection): + self.connected = connection + self.connection_state_signal.emit(connection) + + @Slot(int) + @Slot(str) + @Slot(float) + @Slot(list) + @Slot(_np.ndarray) + def _value_slot(self, value): + self.channeltype = type(value) + self._value = value + self.new_value_signal[self.channeltype].emit(value) + + @Slot(int) + def _severity_slot(self, severity): + self.new_severity_signal.emit(severity) + + @Slot(bool) + def _write_access_slot(self, write_access): + self.write_access_signal.emit(write_access) + + @Slot(tuple) + def _enum_strings_slot(self, enum_strings): + self.enum_strings_signal.emit(enum_strings) + + @Slot(str) + def _unit_slot(self, unit): + self.unit_signal.emit(unit) + + @Slot(int) + def _prec_slot(self, prec): + self.prec_signal.emit(prec) + + @Slot(int) + @Slot(float) + def _upper_ctrl_limit_slot(self, upper_ctrl_limit): + self.upper_ctrl_limit_signal.emit(upper_ctrl_limit) + + @Slot(int) + @Slot(float) + def _lower_ctrl_limit_slot(self, lower_ctrl_limit): + self.lower_ctrl_limit_signal.emit(lower_ctrl_limit)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/spectrogram_view.html b/_modules/siriushla/widgets/spectrogram_view.html new file mode 100644 index 000000000..c3fb7dd8f --- /dev/null +++ b/_modules/siriushla/widgets/spectrogram_view.html @@ -0,0 +1,1681 @@ + + + + + + siriushla.widgets.spectrogram_view — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.spectrogram_view

+"""SiriusSpectrogramView widget.
+
+Based on ImageView from pydm and GradientLegend from pyqtgraph.
+"""
+
+import numpy as np
+import logging
+from qtpy.QtWidgets import QActionGroup, QToolTip, QMenu
+from qtpy.QtGui import QColor, QLinearGradient, QBrush, QPen
+from qtpy.QtCore import Signal, Slot, Property, QTimer, Q_ENUMS, \
+    QThread, Qt, QRectF, QPointF
+from pyqtgraph import ViewBox, ImageItem, AxisItem, GraphicsLayoutWidget, \
+    ColorMap, GraphicsWidget, LabelItem, PlotCurveItem, mkPen
+from pydm.widgets.channel import PyDMChannel
+from pydm.widgets.colormaps import cmaps, cmap_names, PyDMColorMap
+from pydm.widgets.base import PyDMWidget
+from pydm.widgets.image import ReadingOrder
+
+logger = logging.getLogger(__name__)
+
+
+class _GradientLegend(GraphicsWidget):
+    """Class to make GradientLegend a GraphicsWidget.
+
+    Draws a color gradient rectangle along with text labels denoting the value
+    at specific points along the gradient.
+
+    Parameters
+    ----------
+    size : list of int, optional
+        Size of the widget within the GraphicsWidget rectangle.
+    colors : a list of RGB codes, optional
+        The lookup table to be used to design the gradient.
+    labels : dict of keys = strings and values = int
+        The labels that will appear along the colorbar.
+        The values determine the sequence of labels in descending order.
+    minVal : int, optional
+        If labels is None, so only minVal and maxVal are displayed in the
+        beggining and in the end of the colorbar.
+    maxVal : int, optional
+        If labels is None, so only minVal and maxVal are displayed in the
+        beggining and in the end of the colorbar.
+    """
+
+    def __init__(self, size=None, colors=None,
+                 labels=None, minVal=None, maxVal=None):
+        GraphicsWidget.__init__(self)
+        self.setAcceptedMouseButtons(Qt.NoButton)
+        self.size = size
+
+        # if min and max values are None, assume normalized data
+        self.minVal = 0 if minVal is None else minVal
+        self.maxVal = 1 if maxVal is None else maxVal
+        self.labels = {1: 'min', 0: 'max'} if labels is None else labels
+        self.label_format = '{: .3f}'
+        self.gradient = QLinearGradient()
+        if colors is None:
+            self.colors = [[0, 0, 0], [255, 0, 0]]
+        else:
+            self.colors = colors
+        self.setIntColorScale(colors=self.colors,
+                              minVal=self.minVal, maxVal=self.maxVal,
+                              labels=self.labels)
+
+    def setIntColorScale(self, colors, minVal=None, maxVal=None, labels=None):
+        # generate color gradient
+        g = QLinearGradient()
+        for i in range(len(colors)):
+            x = float(i)/len(colors)
+            g.setColorAt(x, QColor(colors[i][0], colors[i][1], colors[i][2]))
+        self._setGradient(g)
+
+        # add labels
+        if labels is None and (minVal is None or maxVal is None):
+            self.setLabels(self.labels)
+        elif labels is None:
+            self.setLabels({1: str(minVal), 0: str(maxVal)})
+        else:
+            self.setLabels(labels)
+
+    def _setGradient(self, g):
+        self.gradient = g
+        self.update()
+
+    def setLimits(self, data):
+        minVal = data[0]
+        maxVal = data[1]
+        if minVal == self.minVal and maxVal == self.maxVal:
+            return
+        self.minVal = minVal
+        self.maxVal = maxVal
+        for k in self.labels.keys():
+            newv = minVal + (1-k)*(maxVal - minVal)
+            newv = self.label_format.format(newv)
+            self.labels[k] = newv
+        self.setLabels(self.labels)
+
+    def setLabels(self, l):
+        """
+        Define labels to appear next to the color scale.
+
+        Accepts a dict of {text: value} pairs.
+        """
+        self.labels = l
+        self.update()
+
+    def paint(self, p, opt, widget):
+        GraphicsWidget.paint(self, p, opt, widget)
+        rect = self.boundingRect()  # Boundaries of visible area in scene coord
+        size = self.size if self.size is not None \
+            else [rect.right()-rect.left(), rect.bottom() - rect.top()]
+
+        # determine max width of all labels
+        textPadding = 2  # in px
+        labelWidth = 0
+        labelHeight = 0
+        for val in self.labels.values():
+            b = p.boundingRect(QRectF(0, 0, 0, 0),
+                               Qt.AlignLeft | Qt.AlignVCenter, str(val))
+            labelWidth = max(labelWidth, b.width())
+            labelHeight = max(labelHeight, b.height())
+
+        x1_back = (rect.right() - rect.left() - size[0])/2
+        x2_back = (rect.right() - rect.left() + size[0])/2
+        y1_back = (rect.bottom() - rect.top() - size[1])/2
+        y2_back = (rect.bottom() - rect.top() + size[1])/2
+
+        x1_grad = x1_back + textPadding*2
+        x2_grad = x2_back - (labelWidth + textPadding*2)
+        y1_grad = y1_back + (labelHeight/2 + textPadding)
+        y2_grad = y2_back - (labelHeight/2 + textPadding)
+
+        # Draw background
+        p.setPen(QPen(QColor(0, 0, 0, 0)))
+        p.setBrush(QBrush(QColor(255, 255, 255, 0)))
+        rect = QRectF(QPointF(x1_back, y1_back),
+                      QPointF(x2_back, y2_back))
+        p.drawRect(rect)
+
+        # Draw color bar
+        self.gradient.setStart(0, y2_grad)
+        self.gradient.setFinalStop(0, y1_grad)
+        p.setPen(QPen(QColor(0, 0, 0)))
+        p.setBrush(self.gradient)
+        rect = QRectF(QPointF(x1_grad, y1_grad),
+                      QPointF(x2_grad, y2_grad))
+        p.drawRect(rect)
+
+        # draw labels
+        tx = x2_grad + textPadding*2
+        lw = labelWidth
+        lh = labelHeight
+        for key, val in self.labels.items():
+            y = y1_grad + key * (y2_grad-y1_grad)
+            p.drawText(QRectF(tx, y - lh/2.0, lw, lh),
+                       Qt.AlignLeft | Qt.AlignVCenter, str(val))
+
+        self.setMinimumWidth(labelWidth + 2*textPadding + 20)
+
+
+
+[docs] +class SpectrogramUpdateThread(QThread): + """Thread to update image.""" + + updateSignal = Signal(list) + + def __init__(self, spectrogram_view): + """Initialize Thread.""" + QThread.__init__(self) + self.spectrogram_view = spectrogram_view + +
+[docs] + def run(self): + """Thread main.""" + img = self.spectrogram_view.image_waveform + needs_redraw = self.spectrogram_view.needs_redraw + image_dimensions = len(img.shape) + width = self.spectrogram_view.imageWidth + reading_order = self.spectrogram_view.readingOrder + normalize_data = self.spectrogram_view._normalize_data + cm_min = self.spectrogram_view.cm_min + cm_max = self.spectrogram_view.cm_max + if not needs_redraw: + logging.debug( + "ImageUpdateThread - needs redraw is False. Aborting.") + return + if image_dimensions == 1: + if width < 1: + # We don't have a width for this image yet, so we can't draw it + logging.debug( + "ImageUpdateThread - no width available. Aborting.") + return + try: + if reading_order == ReadingOrder.Clike: + img = img.reshape((-1, width), order='C') + else: + img = img.reshape((width, -1), order='F') + except ValueError: + logger.error("Invalid width for image during reshape: %d", + width) + if len(img) <= 0: + return + logging.debug("ImageUpdateThread - Will Process Image") + img = self.spectrogram_view.process_image(img) + if normalize_data: + mini = img.min() + maxi = img.max() + else: + mini = cm_min + maxi = cm_max + logging.debug("ImageUpdateThread - Emit Update Signal") + self.updateSignal.emit([mini, maxi, img]) + logging.debug("ImageUpdateThread - Set Needs Redraw -> False") + self.spectrogram_view.needs_redraw = False
+
+ + + +
+[docs] +class SiriusSpectrogramView( + GraphicsLayoutWidget, PyDMWidget, PyDMColorMap, ReadingOrder): + """ + A SpectrogramView with support for Channels and more from PyDM. + + If there is no :attr:`channelWidth` it is possible to define the width of + the image with the :attr:`width` property. + + The :attr:`normalizeData` property defines if the colors of the images are + relative to the :attr:`colorMapMin` and :attr:`colorMapMax` property or to + the minimum and maximum values of the image. + + Use the :attr:`newImageSignal` to hook up to a signal that is emitted when + a new image is rendered in the widget. + + Parameters + ---------- + parent : QWidget + The parent widget for the Label + image_channel : str, optional + The channel to be used by the widget for the image data. + xaxis_channel : str, optional + The channel to be used by the widget to receive the image width + (if ReadingOrder == Clike), and to set the xaxis values + yaxis_channel : str, optional + The channel to be used by the widget to receive the image width + (if ReadingOrder == Fortranlike), and to set the yaxis values + background : QColor, optional + QColor to set the background color of the GraphicsView + """ + + Q_ENUMS(PyDMColorMap) + Q_ENUMS(ReadingOrder) + + color_maps = cmaps + + def __init__(self, parent=None, image_channel=None, + xaxis_channel=None, yaxis_channel=None, + roioffsetx_channel=None, roioffsety_channel=None, + roiwidth_channel=None, roiheight_channel=None, + title='', background='w', + image_width=0, image_height=0): + """Initialize widget.""" + GraphicsLayoutWidget.__init__(self, parent) + PyDMWidget.__init__(self) + self.thread = None + self._imagechannel = None + self._xaxischannel = None + self._yaxischannel = None + self._roioffsetxchannel = None + self._roioffsetychannel = None + self._roiwidthchannel = None + self._roiheightchannel = None + self._channels = 7*[None, ] + self.image_waveform = np.zeros(0) + self._image_width = image_width if not xaxis_channel else 0 + self._image_height = image_height if not yaxis_channel else 0 + self._roi_offsetx = 0 + self._roi_offsety = 0 + self._roi_width = 0 + self._roi_height = 0 + self._normalize_data = False + self._auto_downsample = True + self._last_yaxis_data = None + self._last_xaxis_data = None + self._auto_colorbar_lims = True + self.format_tooltip = '{0:.4g}, {1:.4g}' + + # ViewBox and imageItem. + self._view = ViewBox() + self._image_item = ImageItem() + self._view.addItem(self._image_item) + + # ROI + self.ROICurve = PlotCurveItem([0, 0, 0, 0, 0], [0, 0, 0, 0, 0]) + self.ROIColor = QColor('red') + pen = mkPen() + pen.setColor(QColor('transparent')) + pen.setWidth(1) + self.ROICurve.setPen(pen) + self._view.addItem(self.ROICurve) + + # Axis. + self.xaxis = AxisItem('bottom') + self.xaxis.setPen(QColor(0, 0, 0)) + if not xaxis_channel: + self.xaxis.setVisible(False) + self.yaxis = AxisItem('left') + self.yaxis.setPen(QColor(0, 0, 0)) + if not yaxis_channel: + self.yaxis.setVisible(False) + + # Colorbar legend. + self.colorbar = _GradientLegend() + + # Title. + start_row = 0 + if title: + self.title = LabelItem(text=title, color='#000000') + self.addItem(self.title, 0, 0, 1, 3) + start_row = 1 + + # Set layout. + self.addItem(self._view, start_row, 1) + self.addItem(self.yaxis, start_row, 0) + self.addItem(self.colorbar, start_row, 2) + self.addItem(self.xaxis, start_row+1, 1) + self.setBackground(background) + self.ci.layout.setColumnSpacing(0, 0) + self.ci.layout.setRowSpacing(start_row, 0) + + # Set color map limits. + self.cm_min = 0.0 + self.cm_max = 255.0 + + # Set default reading order of numpy array data to Clike. + self._reading_order = ReadingOrder.Clike + + # Make a right-click menu for changing the color map. + self.cm_group = QActionGroup(self) + self.cmap_for_action = {} + for cm in self.color_maps: + action = self.cm_group.addAction(cmap_names[cm]) + action.setCheckable(True) + self.cmap_for_action[action] = cm + + # Set the default colormap. + self._cm_colors = None + self.colorMap = PyDMColorMap.Inferno + + # Setup the redraw timer. + self.needs_redraw = False + self.redraw_timer = QTimer(self) + self.redraw_timer.timeout.connect(self.redrawImage) + self._redraw_rate = 30 + self.maxRedrawRate = self._redraw_rate + self.newImageSignal = self._image_item.sigImageChanged + + # Set Channels. + self.imageChannel = image_channel + self.xAxisChannel = xaxis_channel + self.yAxisChannel = yaxis_channel + self.ROIOffsetXChannel = roioffsetx_channel + self.ROIOffsetYChannel = roioffsety_channel + self.ROIWidthChannel = roiwidth_channel + self.ROIHeightChannel = roiheight_channel + + # Handle view range changed + self._view.sigRangeChanged.connect(self._update_axis_range) + self._view.suggestPadding = lambda x: 0.0 + + # Context menu + self.contextMenuEvent = None + cm_menu = QMenu("Color Map") + for act in self.cmap_for_action.keys(): + cm_menu.addAction(act) + cm_menu.triggered.connect(self._changeColorMap) + self._view.scene().contextMenu.append(cm_menu) + + # --- Colormap methods --- + def _changeColorMap(self, action): + """ + Method invoked by the colormap Action Menu. + + Changes the current colormap used to render the image. + + Parameters + ---------- + action : QAction + """ + self.colorMap = self.cmap_for_action[action] + + @Property(float) + def colorMapMin(self): + """ + Minimum value for the colormap. + + Returns + ------- + float + """ + return self.cm_min + + @colorMapMin.setter + @Slot(float) + def colorMapMin(self, new_min): + """ + Set the minimum value for the colormap. + + Parameters + ---------- + new_min : float + """ + if self.cm_min != new_min: + self.cm_min = new_min + if self.cm_min > self.cm_max: + self.cm_max = self.cm_min + + @Property(float) + def colorMapMax(self): + """ + Maximum value for the colormap. + + Returns + ------- + float + """ + return self.cm_max + + @colorMapMax.setter + @Slot(float) + def colorMapMax(self, new_max): + """ + Set the maximum value for the colormap. + + Parameters + ---------- + new_max : float + """ + if self.cm_max != new_max: + self.cm_max = new_max + if self.cm_max < self.cm_min: + self.cm_min = self.cm_max + +
+[docs] + def setColorMapLimits(self, mn, mx): + """ + Set the limit values for the colormap. + + Parameters + ---------- + mn : int + The lower limit + mx : int + The upper limit + """ + if mn >= mx: + return + self.cm_max = mx + self.cm_min = mn
+ + + @Property(PyDMColorMap) + def colorMap(self): + """ + Return the color map used by the SpectrogramView. + + Returns + ------- + PyDMColorMap + """ + return self._colormap + + @colorMap.setter + def colorMap(self, new_cmap): + """ + Set the color map used by the SpectrogramView. + + Parameters + ------- + new_cmap : PyDMColorMap + """ + self._colormap = new_cmap + self._cm_colors = self.color_maps[new_cmap] + self.setColorMap() + for action in self.cm_group.actions(): + if self.cmap_for_action[action] == self._colormap: + action.setChecked(True) + else: + action.setChecked(False) + +
+[docs] + def setColorMap(self, cmap=None): + """ + Update the image colormap. + + Parameters + ---------- + cmap : ColorMap + """ + if not cmap: + if not self._cm_colors.any(): + return + # Take default values + pos = np.linspace(0.0, 1.0, num=len(self._cm_colors)) + cmap = ColorMap(pos, self._cm_colors) + self._view.setBackgroundColor(cmap.map(0)) + lut = cmap.getLookupTable(0.0, 1.0, alpha=False) + self.colorbar.setIntColorScale(colors=lut) + self._image_item.setLookupTable(lut)
+ + + # --- Connection Slots --- +
+[docs] + @Slot(bool) + def image_connection_state_changed(self, conn): + """ + Callback invoked when the Image Channel connection state is changed. + + Parameters + ---------- + conn : bool + The new connection state. + """ + if conn: + self.redraw_timer.start() + else: + self.redraw_timer.stop()
+ + +
+[docs] + @Slot(bool) + def yaxis_connection_state_changed(self, connected): + """ + Callback invoked when the TimeAxis Channel connection state is changed. + + Parameters + ---------- + conn : bool + The new connection state. + """ + self._timeaxis_connected = connected
+ + +
+[docs] + @Slot(bool) + def roioffsetx_connection_state_changed(self, conn): + """ + Run when the ROIOffsetX Channel connection state changes. + + Parameters + ---------- + conn : bool + The new connection state. + + """ + if not conn: + self._roi_offsetx = 0
+ + +
+[docs] + @Slot(bool) + def roioffsety_connection_state_changed(self, conn): + """ + Run when the ROIOffsetY Channel connection state changes. + + Parameters + ---------- + conn : bool + The new connection state. + + """ + if not conn: + self._roi_offsety = 0
+ + +
+[docs] + @Slot(bool) + def roiwidth_connection_state_changed(self, conn): + """ + Run when the ROIWidth Channel connection state changes. + + Parameters + ---------- + conn : bool + The new connection state. + + """ + if not conn: + self._roi_width = 0
+ + +
+[docs] + @Slot(bool) + def roiheight_connection_state_changed(self, conn): + """ + Run when the ROIHeight Channel connection state changes. + + Parameters + ---------- + conn : bool + The new connection state. + + """ + if not conn: + self._roi_height = 0
+ + + # --- Value Slots --- +
+[docs] + @Slot(np.ndarray) + def image_value_changed(self, new_image): + """ + Callback invoked when the Image Channel value is changed. + + We try to do as little as possible in this method, because it + gets called every time the image channel updates, which might + be extremely often. Basically just store the data, and set + a flag requesting that the image be redrawn. + + Parameters + ---------- + new_image : np.ndarray + The new image data. This can be a flat 1D array, or a 2D array. + """ + if new_image is None or new_image.size == 0: + return + logging.debug("SpectrogramView Received New Image: Needs Redraw->True") + self.image_waveform = new_image + self.needs_redraw = True + if not self._image_height and self._image_width: + self._image_height = new_image.size/self._image_width + elif not self._image_width and self._image_height: + self._image_width = new_image.size/self._image_height
+ + +
+[docs] + @Slot(np.ndarray) + @Slot(float) + def xaxis_value_changed(self, new_array): + """ + Callback invoked when the Image Width Channel value is changed. + + Parameters + ---------- + new_array : np.ndarray + The new x axis array + """ + if new_array is None: + return + if isinstance(new_array, float): + new_array = np.array([new_array, ]) + self._last_xaxis_data = new_array + if self._reading_order == self.Clike: + self._image_width = new_array.size + else: + self._image_height = new_array.size + self.needs_redraw = True
+ + +
+[docs] + @Slot(np.ndarray) + @Slot(float) + def yaxis_value_changed(self, new_array): + """ + Callback invoked when the TimeAxis Channel value is changed. + + Parameters + ---------- + new_array : np.array + The new y axis array + """ + if new_array is None: + return + if isinstance(new_array, float): + new_array = np.array([new_array, ]) + self._last_yaxis_data = new_array + if self._reading_order == self.Fortranlike: + self._image_width = new_array.size + else: + self._image_height = new_array.size + self.needs_redraw = True
+ + +
+[docs] + @Slot(int) + def roioffsetx_value_changed(self, new_offset): + """ + Run when the ROIOffsetX Channel value changes. + + Parameters + ---------- + new_offsetx : int + The new image ROI horizontal offset + + """ + if new_offset is None: + return + self._roi_offsetx = new_offset + self.redrawROI()
+ + +
+[docs] + @Slot(int) + def roioffsety_value_changed(self, new_offset): + """ + Run when the ROIOffsetY Channel value changes. + + Parameters + ---------- + new_offsety : int + The new image ROI vertical offset + + """ + if new_offset is None: + return + self._roi_offsety = new_offset + self.redrawROI()
+ + +
+[docs] + @Slot(int) + def roiwidth_value_changed(self, new_width): + """ + Run when the ROIWidth Channel value changes. + + Parameters + ---------- + new_width : int + The new image ROI width + + """ + if new_width is None: + return + self._roi_width = int(new_width) + self.redrawROI()
+ + +
+[docs] + @Slot(int) + def roiheight_value_changed(self, new_height): + """ + Run when the ROIHeight Channel value changes. + + Parameters + ---------- + new_height : int + The new image ROI height + + """ + if new_height is None: + return + self._roi_height = int(new_height) + self.redrawROI()
+ + + # --- Image update methods --- +
+[docs] + def process_image(self, image): + """ + Boilerplate method. + + To be used by applications in order to add calculations and also modify + the image before it is displayed at the widget. + + .. warning:: + This code runs in a separated QThread so it **MUST** not try to + write to QWidgets. + + Parameters + ---------- + image : np.ndarray + The Image Data as a 2D numpy array + + Returns + ------- + np.ndarray + The Image Data as a 2D numpy array after processing. + """ + return image
+ + +
+[docs] + def redrawImage(self): + """ + Set the image data into the ImageItem, if needed. + + If necessary, reshape the image to 2D first. + """ + if self.thread is not None and not self.thread.isFinished(): + logger.warning( + "Image processing has taken longer than the refresh rate.") + return + self.thread = SpectrogramUpdateThread(self) + self.thread.updateSignal.connect(self._updateDisplay) + logging.debug("SpectrogramView RedrawImage Thread Launched") + self.thread.start()
+ + + def _update_axis_range(self, *_): + if self._last_xaxis_data is not None: + iszx = self._last_xaxis_data.size + ixMin = self._last_xaxis_data.min() + ixMax = self._last_xaxis_data.max() + else: + iszx = self.imageWidth if self.readingOrder == self.Clike \ + else self.imageHeight + ixMin = 0 + ixMax = iszx + + if self._last_yaxis_data is not None: + iszy = self._last_yaxis_data.size + iyMin = self._last_yaxis_data.min() + iyMax = self._last_yaxis_data.max() + else: + iszy = self.imageHeight if self.readingOrder == self.Clike \ + else self.imageWidth + iyMin = 0 + iyMax = iszy + + [_vx, _vy] = self._view.viewRange() + limsx = np.array(_vx) / iszx * (ixMax-ixMin) + ixMin + limsy = np.array(_vy) / iszy * (iyMax-iyMin) + iyMin + if not np.any(np.isnan(limsx)): + self.xaxis.setRange(limsx[0], limsx[1]) + if not np.any(np.isnan(limsy)): + self.yaxis.setRange(limsy[0], limsy[1]) + + @Slot(list) + def _updateDisplay(self, data): + logging.debug("SpectrogramView Update Display with new image") + if self.autoSetColorbarLims: + self.colorbar.setLimits(data) + mini, maxi = data[0], data[1] + img = data[2] + self._image_item.setLevels([mini, maxi]) + self._image_item.setImage( + img, + autoLevels=False, + autoDownsample=self.autoDownsample) + + # ROI update methods +
+[docs] + def redrawROI(self): + startx = self._roi_offsetx + endx = self._roi_offsetx + self._roi_width + starty = self._roi_offsety + endy = self._roi_offsety + self._roi_height + self.ROICurve.setData( + [startx, startx, endx, endx, startx], + [starty, endy, endy, starty, starty])
+ + +
+[docs] + def showROI(self, show): + """Set ROI visibility.""" + pen = mkPen() + if show: + pen.setColor(self.ROIColor) + else: + pen.setColor(QColor('transparent')) + self.ROICurve.setPen(pen)
+ + + # --- Properties --- + @Property(bool) + def autoDownsample(self): + """ + Return if we should or not apply the autoDownsample option. + + Return + ------ + bool + """ + return self._auto_downsample + + @autoDownsample.setter + def autoDownsample(self, new_value): + """ + Whether we should or not apply the autoDownsample option. + + Parameters + ---------- + new_value: bool + """ + if new_value != self._auto_downsample: + self._auto_downsample = new_value + + @Property(bool) + def autoSetColorbarLims(self): + """ + Return if we should or not auto set colorbar limits. + + Return + ------ + bool + """ + return self._auto_colorbar_lims + + @autoSetColorbarLims.setter + def autoSetColorbarLims(self, new_value): + """ + Whether we should or not auto set colorbar limits. + + Parameters + ---------- + new_value: bool + """ + if new_value != self._auto_colorbar_lims: + self._auto_colorbar_lims = new_value + + @Property(int) + def imageWidth(self): + """ + Return the width of the image. + + Return + ------ + int + """ + return self._image_width + + @imageWidth.setter + def imageWidth(self, new_width): + """ + Set the width of the image. + + Can be overridden by :attr:`xAxisChannel` and :attr:`yAxisChannel`. + + Parameters + ---------- + new_width: int + """ + boo = self._image_width != int(new_width) + boo &= not self._xaxischannel + boo &= not self._yaxischannel + if boo: + self._image_width = int(new_width) + + @Property(int) + def imageHeight(self): + """ + Return the height of the image. + + Return + ------ + int + """ + return self._image_height + + @Property(int) + def ROIOffsetX(self): + """ + Return the ROI offset in X axis in pixels. + + Return + ------ + int + """ + return self._roi_offsetx + + @ROIOffsetX.setter + def ROIOffsetX(self, new_offset): + """ + Set the ROI offset in X axis in pixels. + + Can be overridden by :attr:`ROIOffsetXChannel`. + + Parameters + ---------- + new_offset: int + """ + if new_offset is None: + return + boo = self._roi_offsetx != int(new_offset) + boo &= not self._roioffsetxchannel + if boo: + self._roi_offsetx = int(new_offset) + self.redrawROI() + + @Property(int) + def ROIOffsetY(self): + """ + Return the ROI offset in Y axis in pixels. + + Return + ------ + int + """ + return self._roi_offsety + + @ROIOffsetY.setter + def ROIOffsetY(self, new_offset): + """ + Set the ROI offset in Y axis in pixels. + + Can be overridden by :attr:`ROIOffsetYChannel`. + + Parameters + ---------- + new_offset: int + """ + if new_offset is None: + return + boo = self._roi_offsety != int(new_offset) + boo &= not self._roioffsetychannel + if boo: + self._roi_offsety = int(new_offset) + self.redrawROI() + + @Property(int) + def ROIWidth(self): + """ + Return the ROI width in pixels. + + Return + ------ + int + """ + return self._roi_width + + @ROIWidth.setter + def ROIWidth(self, new_width): + """ + Set the ROI width in pixels. + + Can be overridden by :attr:`ROIWidthChannel`. + + Parameters + ---------- + new_width: int + """ + if new_width is None: + return + boo = self._roi_width != int(new_width) + boo &= not self._roiwidthchannel + if boo: + self._roi_width = int(new_width) + self.redrawROI() + + @Property(int) + def ROIHeight(self): + """ + Return the ROI height in pixels. + + Return + ------ + int + """ + return self._roi_height + + @ROIHeight.setter + def ROIHeight(self, new_height): + """ + Set the ROI height in pixels. + + Can be overridden by :attr:`ROIHeightChannel`. + + Parameters + ---------- + new_height: int + """ + if new_height is None: + return + boo = self._roi_height != int(new_height) + boo &= not self._roiheightchannel + if boo: + self._roi_height = int(new_height) + self.redrawROI() + + @Property(bool) + def normalizeData(self): + """ + Return True if the colors are relative to data maximum and minimum. + + Returns + ------- + bool + """ + return self._normalize_data + + @normalizeData.setter + @Slot(bool) + def normalizeData(self, new_norm): + """ + Define if the colors are relative to minimum and maximum of the data. + + Parameters + ---------- + new_norm: bool + """ + if self._normalize_data != new_norm: + self._normalize_data = new_norm + + @Property(ReadingOrder) + def readingOrder(self): + """ + Return the reading order of the :attr:`imageChannel` array. + + Returns + ------- + ReadingOrder + """ + return self._reading_order + + @readingOrder.setter + def readingOrder(self, order): + """ + Set reading order of the :attr:`imageChannel` array. + + Parameters + ---------- + order: ReadingOrder + """ + if self._reading_order != order: + self._reading_order = order + + if order == self.Clike: + if self._last_xaxis_data is not None: + self._image_width = self._last_xaxis_data.size + if self._last_yaxis_data is not None: + self._image_height = self._last_yaxis_data.size + elif order == self.Fortranlike: + if self._last_yaxis_data is not None: + self._image_width = self._last_yaxis_data.size + if self._last_xaxis_data is not None: + self._image_height = self._last_xaxis_data.size + + @Property(int) + def maxRedrawRate(self): + """ + The maximum rate (in Hz) at which the plot will be redrawn. + + The plot will not be redrawn if there is not new data to draw. + + Returns + ------- + int + """ + return self._redraw_rate + + @maxRedrawRate.setter + def maxRedrawRate(self, redraw_rate): + """ + The maximum rate (in Hz) at which the plot will be redrawn. + + The plot will not be redrawn if there is not new data to draw. + + Parameters + ------- + redraw_rate : int + """ + self._redraw_rate = redraw_rate + self.redraw_timer.setInterval(int((1.0 / self._redraw_rate) * 1000)) + + # --- Events rederivations --- +
+[docs] + def keyPressEvent(self, ev): + """Handle keypress events.""" + return
+ + +
+[docs] + def mouseMoveEvent(self, ev): + if not self._image_item.width() or not self._image_item.height(): + super().mouseMoveEvent(ev) + return + pos = ev.pos() + posaux = self._image_item.mapFromDevice(ev.pos()) + if not posaux: + return + if posaux.x() < 0 or posaux.x() >= self._image_item.width() or \ + posaux.y() < 0 or posaux.y() >= self._image_item.height(): + super().mouseMoveEvent(ev) + return + + pos_scene = self._view.mapSceneToView(pos) + x = round(pos_scene.x()) + y = round(pos_scene.y()) + + if self.xAxisChannel and self._last_xaxis_data is not None: + maxx = len(self._last_xaxis_data)-1 + x = x if x < maxx else maxx + valx = self._last_xaxis_data[x] + else: + valx = x + + if self.yAxisChannel and self._last_yaxis_data is not None: + maxy = len(self._last_yaxis_data)-1 + y = y if y < maxy else maxy + valy = self._last_yaxis_data[y] + else: + valy = y + + txt = self.format_tooltip.format(valx, valy) + QToolTip.showText( + self.mapToGlobal(pos), txt, self, self.geometry(), 5000) + super().mouseMoveEvent(ev)
+ + + # --- Channels --- + @Property(str) + def imageChannel(self): + """ + The channel address in use for the image data . + + Returns + ------- + str + Channel address + """ + if self._imagechannel: + return str(self._imagechannel.address) + else: + return '' + + @imageChannel.setter + def imageChannel(self, value): + """ + The channel address in use for the image data . + + Parameters + ---------- + value : str + Channel address + """ + if self._imagechannel != value: + # Disconnect old channel + if self._imagechannel: + self._imagechannel.disconnect() + # Create and connect new channel + self._imagechannel = PyDMChannel( + address=value, + connection_slot=self.image_connection_state_changed, + value_slot=self.image_value_changed, + severity_slot=self.alarmSeverityChanged) + self._channels[0] = self._imagechannel + self._imagechannel.connect() + + @Property(str) + def xAxisChannel(self): + """ + The channel address in use for the x-axis of image. + + Returns + ------- + str + Channel address + """ + if self._xaxischannel: + return str(self._xaxischannel.address) + else: + return '' + + @xAxisChannel.setter + def xAxisChannel(self, value): + """ + The channel address in use for the x-axis of image. + + Parameters + ---------- + value : str + Channel address + """ + if self._xaxischannel != value: + # Disconnect old channel + if self._xaxischannel: + self._xaxischannel.disconnect() + # Create and connect new channel + self._xaxischannel = PyDMChannel( + address=value, + connection_slot=self.connectionStateChanged, + value_slot=self.xaxis_value_changed, + severity_slot=self.alarmSeverityChanged) + self._channels[1] = self._xaxischannel + self._xaxischannel.connect() + + @Property(str) + def yAxisChannel(self): + """ + The channel address in use for the time axis. + + Returns + ------- + str + Channel address + """ + if self._yaxischannel: + return str(self._yaxischannel.address) + else: + return '' + + @yAxisChannel.setter + def yAxisChannel(self, value): + """ + The channel address in use for the time axis. + + Parameters + ---------- + value : str + Channel address + """ + if self._yaxischannel != value: + # Disconnect old channel + if self._yaxischannel: + self._yaxischannel.disconnect() + # Create and connect new channel + self._yaxischannel = PyDMChannel( + address=value, + connection_slot=self.yaxis_connection_state_changed, + value_slot=self.yaxis_value_changed, + severity_slot=self.alarmSeverityChanged) + self._channels[2] = self._yaxischannel + self._yaxischannel.connect() + + @Property(str) + def ROIOffsetXChannel(self): + """ + Return the channel address in use for the image ROI horizontal offset. + + Returns + ------- + str + Channel address + + """ + if self._roioffsetxchannel: + return str(self._roioffsetxchannel.address) + else: + return '' + + @ROIOffsetXChannel.setter + def ROIOffsetXChannel(self, value): + """ + Return the channel address in use for the image ROI horizontal offset. + + Parameters + ---------- + value : str + Channel address + + """ + if self._roioffsetxchannel != value: + # Disconnect old channel + if self._roioffsetxchannel: + self._roioffsetxchannel.disconnect() + # Create and connect new channel + self._roioffsetxchannel = PyDMChannel( + address=value, + connection_slot=self.roioffsetx_connection_state_changed, + value_slot=self.roioffsetx_value_changed, + severity_slot=self.alarmSeverityChanged) + self._channels[3] = self._roioffsetxchannel + self._roioffsetxchannel.connect() + + @Property(str) + def ROIOffsetYChannel(self): + """ + Return the channel address in use for the image ROI vertical offset. + + Returns + ------- + str + Channel address + + """ + if self._roioffsetychannel: + return str(self._roioffsetychannel.address) + else: + return '' + + @ROIOffsetYChannel.setter + def ROIOffsetYChannel(self, value): + """ + Return the channel address in use for the image ROI vertical offset. + + Parameters + ---------- + value : str + Channel address + + """ + if self._roioffsetychannel != value: + # Disconnect old channel + if self._roioffsetychannel: + self._roioffsetychannel.disconnect() + # Create and connect new channel + self._roioffsetychannel = PyDMChannel( + address=value, + connection_slot=self.roioffsety_connection_state_changed, + value_slot=self.roioffsety_value_changed, + severity_slot=self.alarmSeverityChanged) + self._channels[4] = self._roioffsetychannel + self._roioffsetychannel.connect() + + @Property(str) + def ROIWidthChannel(self): + """ + Return the channel address in use for the image ROI width. + + Returns + ------- + str + Channel address + + """ + if self._roiwidthchannel: + return str(self._roiwidthchannel.address) + else: + return '' + + @ROIWidthChannel.setter + def ROIWidthChannel(self, value): + """ + Return the channel address in use for the image ROI width. + + Parameters + ---------- + value : str + Channel address + + """ + if self._roiwidthchannel != value: + # Disconnect old channel + if self._roiwidthchannel: + self._roiwidthchannel.disconnect() + # Create and connect new channel + self._roiwidthchannel = PyDMChannel( + address=value, + connection_slot=self.roiwidth_connection_state_changed, + value_slot=self.roiwidth_value_changed, + severity_slot=self.alarmSeverityChanged) + self._channels[5] = self._roiwidthchannel + self._roiwidthchannel.connect() + + @Property(str) + def ROIHeightChannel(self): + """ + Return the channel address in use for the image ROI height. + + Returns + ------- + str + Channel address + + """ + if self._roiheightchannel: + return str(self._roiheightchannel.address) + else: + return '' + + @ROIHeightChannel.setter + def ROIHeightChannel(self, value): + """ + Return the channel address in use for the image ROI height. + + Parameters + ---------- + value : str + Channel address + + """ + if self._roiheightchannel != value: + # Disconnect old channel + if self._roiheightchannel: + self._roiheightchannel.disconnect() + # Create and connect new channel + self._roiheightchannel = PyDMChannel( + address=value, + connection_slot=self.roiheight_connection_state_changed, + value_slot=self.roiheight_value_changed, + severity_slot=self.alarmSeverityChanged) + self._channels[6] = self._roiheightchannel + self._roiheightchannel.connect() + +
+[docs] + def channels(self): + """ + Return the channels being used for this Widget. + + Returns + ------- + channels : list + List of PyDMChannel objects + """ + return [ch for ch in self._channels if ch is not None]
+ + +
+[docs] + def channels_for_tools(self): + """Return channels for tools.""" + return [self._imagechannel]
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/spinbox.html b/_modules/siriushla/widgets/spinbox.html new file mode 100644 index 000000000..1b0bdc508 --- /dev/null +++ b/_modules/siriushla/widgets/spinbox.html @@ -0,0 +1,422 @@ + + + + + + siriushla.widgets.spinbox — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.widgets.spinbox

+"""Sirius Spinbox."""
+
+from qtpy.QtCore import Property, Qt, QRegExp
+from qtpy.QtGui import QRegExpValidator
+from pydm.widgets import PyDMSpinbox
+from pydm.widgets.base import PyDMWritableWidget, TextFormatter
+
+
+
+[docs] +class SiriusSpinbox(PyDMSpinbox): + """ + A QDoubleSpinBox with support for Channels and more from PyDM. + + Parameters + ---------- + parent : QWidget + The parent widget for the Label + init_channel : str, optional + The channel to be used by the widget. + """ + def __init__(self, parent=None, init_channel=None): + super(SiriusSpinbox, self).__init__(parent, init_channel) + self._limits_from_channel = True + self._user_lower_limit = self.minimum() + self._user_upper_limit = self.maximum() + self.showStepExponent = False + self.setFocusPolicy(Qt.StrongFocus) + +
+[docs] + def ctrl_limit_changed(self, which, new_limit): + """ + Callback invoked when the Channel receives new control limit + values. + + Parameters + ---------- + which : str + Which control limit was changed. "UPPER" or "LOWER" + new_limit : float + New value for the control limit + """ + PyDMWritableWidget.ctrl_limit_changed(self, which, new_limit) + self.update_limits()
+ + +
+[docs] + def update_limits(self): + """ + Callback invoked to update the control limits of the spinbox. + + Parameters + ---------- + which : str + Which control limit was changed. "UPPER" or "LOWER" + new_limit : float + New value for the control limit + """ + if self._limits_from_channel: + if self._lower_ctrl_limit is not None: + super(SiriusSpinbox, self).setMinimum(self._lower_ctrl_limit) + if self._upper_ctrl_limit is not None: + super(SiriusSpinbox, self).setMaximum(self._upper_ctrl_limit) + else: + super(SiriusSpinbox, self).setMinimum(self._user_lower_limit) + super(SiriusSpinbox, self).setMaximum(self._user_upper_limit)
+ + +
+[docs] + def precision_changed(self, new_precision): + """ + Callback invoked when the Channel has new precision value. + This callback also triggers an update_format_string call so the + new precision value is considered. + + Parameters + ---------- + new_precison : int or float + The new precision value + """ + TextFormatter.precision_changed(self, new_precision) + self.setDecimals(self.precision) + self.update_limits()
+ + + @Property(bool) + def limitsFromChannel(self): + """ + A choice whether or not to use the limits given by channel. + + Returns + ------- + limits_from_channel : bool + True means that the widget will use the limits information + from the Channel if available. + """ + return self._limits_from_channel + + @limitsFromChannel.setter + def limitsFromChannel(self, value): + """ + A choice whether or not to use the limits given by channel. + + Parameters + ---------- + value : bool + True means that the widget will use the limits information + from the PV if available. + """ + if self._limits_from_channel != bool(value): + self._limits_from_channel = bool(value) + self.update_limits() + +
+[docs] + def setMinimum(self, value): + """ + Set the user defined lower limit for the spinbox. + + Parameters + ---------- + value : float + The new lower limit value. + """ + self._user_lower_limit = float(value) + self._user_upper_limit = max( + self._user_upper_limit, self._user_lower_limit) + self.update_limits()
+ + +
+[docs] + def setMaximum(self, value): + """ + Set the user defined upper limit for the spinbox. + + Parameters + ---------- + value : float + The new upper limit value. + """ + self._user_upper_limit = float(value) + self._user_lower_limit = min( + self._user_lower_limit, self._user_upper_limit) + self.update_limits()
+ + +
+[docs] + def setRange(self, mini, maxi): + """ + Set the user defined limits for the spinbox. + + Parameters + ---------- + mini : float + The new lower limit value. + maxi: float + The new upper limit value. + """ + self.setMinimum(mini) + self.setMaximum(maxi)
+ + +
+[docs] + def get_user_limits(self): + """ + Get the user defined limits for the spinbox. + + Returns + ---------- + limits: tuple + 2-tuple with the user defined minimum and maximum. + """ + return (self._user_lower_limit, self._user_upper_limit)
+ + +
+[docs] + def wheelEvent(self, event): + """Reimplement wheel event to ignore event when out of focus.""" + if not self.hasFocus(): + event.ignore() + else: + super().wheelEvent(event)
+ + +
+[docs] + def focusOutEvent(self, event): + """ + Overwrites the function called when a user leaves the widget + without pressing return. Resets the value of the text field + to the current channel value. + """ + self.value_changed(self.value) + super().focusOutEvent(event)
+
+ + + +
+[docs] +class SiriusHexaSpinbox(SiriusSpinbox): + """Custom Hexa Spinbox.""" + +
+[docs] + def valueFromText(self, text): + """Convert value from text in hexa base.""" + return int(str(text), 16)
+ + +
+[docs] + def textFromValue(self, value): + """Convert text from value in hexa base.""" + return hex(int(value))
+ + +
+[docs] + def validate(self, text, pos): + """Validate input in hexa base.""" + regex = QRegExp("0x[0-9A-Fa-f]{1,8}") + regex.setCaseSensitivity(Qt.CaseInsensitive) + return QRegExpValidator(regex, self).validate(text, pos)
+ + +
+[docs] + def update_step_size(self): + """Reimplement to use hexa base.""" + self.setSingleStep(16 ** self.step_exponent) + self.update_format_string()
+ + +
+[docs] + def update_format_string(self): + """Reimplement to use hexa base.""" + if self._show_units: + units = " {}".format(self._unit) + else: + units = "" + + if self._show_step_exponent: + self.setSuffix( + '{0} Step: 16**{1}'.format(units, self.step_exponent)) + self.lineEdit().setToolTip("") + else: + self.setSuffix(units) + self.lineEdit().setToolTip( + 'Step: 16**{0:+d}'.format(self.step_exponent))
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/spinbox_scrollbar.html b/_modules/siriushla/widgets/spinbox_scrollbar.html new file mode 100644 index 000000000..597115a78 --- /dev/null +++ b/_modules/siriushla/widgets/spinbox_scrollbar.html @@ -0,0 +1,199 @@ + + + + + + siriushla.widgets.spinbox_scrollbar — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.spinbox_scrollbar

+"""Defines PyDM widget with a spinbox and a scrollbar."""
+
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QWidget, QGridLayout, QSizePolicy as QSzPol
+from .spinbox import SiriusSpinbox
+from .scrollbar import PyDMScrollBar
+
+
+
+[docs] +class PyDMSpinboxScrollbar(QWidget): + """Composition of a Spinbox and a Scrollbar to set a float PV.""" + + def __init__(self, parent=None, init_channel=None): + """Init.""" + super().__init__(parent) + self._init_channel = init_channel + + layout = QGridLayout(self) + layout.setContentsMargins(0, 0, 0, 0) + layout.setSpacing(2) + + self.spinbox = SiriusSpinbox( + parent=self, init_channel=init_channel) + self.spinbox.setAlignment(Qt.AlignCenter) + self.spinbox.setStyleSheet("SiriusSpinbox{min-height:1.29em;}") + self.spinbox.setSizePolicy(QSzPol.Expanding, QSzPol.Preferred) + + self.scrollbar = PyDMScrollBar( + parent=self, init_channel=init_channel) + self.scrollbar.wheelEvent = lambda event: event.ignore() + self.scrollbar.setTracking(False) + self.scrollbar.setStyleSheet("PyDMScrollBar{max-height:0.7em;}") + + layout.addWidget(self.spinbox, 0, 0, 2, 1) + layout.addWidget(self.scrollbar, 2, 0, 1, 1)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/state_button.html b/_modules/siriushla/widgets/state_button.html new file mode 100644 index 000000000..bc0269331 --- /dev/null +++ b/_modules/siriushla/widgets/state_button.html @@ -0,0 +1,647 @@ + + + + + + siriushla.widgets.state_button — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.state_button

+"""PyDM State Button Class."""
+
+import os as _os
+import hashlib as _hashlib
+import logging as _log
+
+import numpy as _np
+
+from qtpy.QtWidgets import QStyleOption, QFrame, QMessageBox, QInputDialog, \
+    QLineEdit
+from qtpy.QtGui import QPainter
+from qtpy.QtCore import Property, Q_ENUMS, QByteArray, QRectF, \
+    QSize, Signal, Qt, QFile
+from qtpy.QtSvg import QSvgRenderer
+
+from pydm.widgets.base import PyDMWritableWidget
+
+
+BUTTONSHAPE = {'Squared': 0, 'Rounded': 1}
+
+
+
+[docs] +class PyDMStateButton(QFrame, PyDMWritableWidget): + """ + A StateButton with support for Channels and much more from PyDM. + + It consists on QPushButton with internal state. + + Parameters + ---------- + parent : QWidget + The parent widget for the Label + init_channel : str, optional + The channel to be used by the widget. + bit : int + Bit of the PV value to be handled. + """ + +
+[docs] + class buttonShapeMap: + """Enum class of shapes of button.""" + + locals().update(**BUTTONSHAPE)
+ + + Q_ENUMS(buttonShapeMap) + + # enumMap for buttonShapeMap + locals().update(**BUTTONSHAPE) + + squaredbuttonstatesdict = dict() + path = _os.path.abspath(_os.path.dirname(__file__)) + f = QFile(_os.path.join(path, 'resources/but_shapes/squared_on.svg')) + if f.open(QFile.ReadOnly): + squaredbuttonstatesdict['On'] = str(f.readAll(), 'utf-8') + f.close() + f = QFile(_os.path.join(path, 'resources/but_shapes/squared_off.svg')) + if f.open(QFile.ReadOnly): + squaredbuttonstatesdict['Off'] = str(f.readAll(), 'utf-8') + f.close() + f = QFile(_os.path.join(path, 'resources/but_shapes/squared_disconn.svg')) + if f.open(QFile.ReadOnly): + squaredbuttonstatesdict['Disconnected'] = str(f.readAll(), 'utf-8') + f.close() + + roundedbuttonstatesdict = dict() + f = QFile(_os.path.join(path, 'resources/but_shapes/rounded_on.svg')) + if f.open(QFile.ReadOnly): + roundedbuttonstatesdict['On'] = str(f.readAll(), 'utf-8') + f.close() + f = QFile(_os.path.join(path, 'resources/but_shapes/rounded_off.svg')) + if f.open(QFile.ReadOnly): + roundedbuttonstatesdict['Off'] = str(f.readAll(), 'utf-8') + f.close() + f = QFile(_os.path.join(path, 'resources/but_shapes/rounded_disconn.svg')) + if f.open(QFile.ReadOnly): + roundedbuttonstatesdict['Disconnected'] = str(f.readAll(), 'utf-8') + f.close() + + clicked = Signal() + DEFAULT_CONFIRM_MESSAGE = "Are you sure you want to proceed?" + + def __init__(self, parent=None, init_channel=None, invert=False, bit=-1): + """Initialize all internal states and properties.""" + QFrame.__init__(self, parent) + PyDMWritableWidget.__init__(self, init_channel=init_channel) + + self._off = 0 + self._on = 1 + self.invert = invert + + self._bit = -1 + self._bit_val = 0 + self.pvbit = bit + self.value = 0 + self.clicked.connect(self.send_value) + self.shape = 0 + self.renderer = QSvgRenderer() + + self._show_confirm_dialog = False + self._confirm_message = PyDMStateButton.DEFAULT_CONFIRM_MESSAGE + self._password_protected = False + self._password = "" + self._protected_password = "" + + @Property(bool) + def passwordProtected(self): + """ + Whether or not this button is password protected. + + Returns + ------- + bool + """ + return self._password_protected + + @passwordProtected.setter + def passwordProtected(self, value): + """ + Whether or not this button is password protected. + + Parameters + ---------- + value : bool + """ + if self._password_protected != value: + self._password_protected = value + + @Property(str) + def password(self): + """ + Password to be encrypted using SHA256. + + .. warning:: + To avoid issues exposing the password this method + always returns an empty string. + + Returns + ------- + str + """ + return "" + + @password.setter + def password(self, value): + """ + Password to be encrypted using SHA256. + + Parameters + ---------- + value : str + The password to be encrypted + """ + if value is not None and value != "": + sha = _hashlib.sha256() + sha.update(value.encode()) + # Use the setter as it also checks whether the existing password + # is the same with the new one, and only updates if the new + # password is different + self.protectedPassword = sha.hexdigest() + + @Property(str) + def protectedPassword(self): + """ + The encrypted password. + + Returns + ------- + str + """ + return self._protected_password + + @protectedPassword.setter + def protectedPassword(self, value): + if self._protected_password != value: + self._protected_password = value + + @Property(bool) + def showConfirmDialog(self): + """ + Wether or not to display a confirmation dialog. + + Returns + ------- + bool + """ + return self._show_confirm_dialog + + @showConfirmDialog.setter + def showConfirmDialog(self, value): + """ + Wether or not to display a confirmation dialog. + + Parameters + ---------- + value : bool + """ + if self._show_confirm_dialog != value: + self._show_confirm_dialog = value + + @Property(str) + def confirmMessage(self): + """ + Message to be displayed at the Confirmation dialog. + + Returns + ------- + str + """ + return self._confirm_message + + @confirmMessage.setter + def confirmMessage(self, value): + """ + Message to be displayed at the Confirmation dialog. + + Parameters + ---------- + value : str + """ + if self._confirm_message != value: + self._confirm_message = value + +
+[docs] + def mouseReleaseEvent(self, ev): + """Deal with mouse clicks. Only accept clicks within the figure.""" + cond = ev.button() == Qt.LeftButton + cond &= ev.x() < self.width()/2+self.height() + cond &= ev.x() > self.width()/2-self.height() + if cond: + self.clicked.emit()
+ + +
+[docs] + def value_changed(self, new_val): + """ + Callback invoked when the Channel value is changed. + + Display the value of new_val accordingly. If :attr:'pvBit' is n>=0 or + positive the button display the state of the n-th digit of the channel. + + Parameters + ---------- + new_value : str, int, float, bool or np.ndarray + The new value from the channel. The type depends on the channel. + """ + if isinstance(new_val, _np.ndarray): + _log.warning('PyDMStateButton received a numpy array to ' + + self.channel+' ('+str(new_val)+')!') + return + super(PyDMStateButton, self).value_changed(new_val) + value = int(new_val) + self.value = value + if self._bit >= 0: + value = (value >> self._bit) & 1 + self._bit_val = value + self.update()
+ + +
+[docs] + def confirm_dialog(self): + """ + Show the confirmation dialog with the proper message in case + ```showConfirmMessage``` is True. + + Returns + ------- + bool + True if the message was confirmed or if ```showCofirmMessage``` + is False. + """ + + if not self._show_confirm_dialog: + return True + + if self._confirm_message == "": + self._confirm_message = PyDMStateButton.DEFAULT_CONFIRM_MESSAGE + msg = QMessageBox() + msg.setIcon(QMessageBox.Question) + msg.setText(self._confirm_message) + msg.setStandardButtons(QMessageBox.Yes | QMessageBox.No) + msg.setDefaultButton(QMessageBox.No) + ret = msg.exec_() + return not ret == QMessageBox.No
+ + +
+[docs] + def validate_password(self): + """ + If the widget is ```passwordProtected```, this method will propmt + the user for the correct password. + + Returns + ------- + bool + True in case the password was correct of if the widget is not + password protected. + """ + if not self._password_protected: + return True + + pwd, ok = QInputDialog().getText( + None, "Authentication", "Please enter your password:", + QLineEdit.Password, "") + pwd = str(pwd) + if not ok or pwd == "": + return False + + sha = _hashlib.sha256() + sha.update(pwd.encode()) + pwd_encrypted = sha.hexdigest() + if pwd_encrypted != self._protected_password: + msg = QMessageBox() + msg.setIcon(QMessageBox.Critical) + msg.setText("Invalid password.") + msg.setWindowTitle("Error") + msg.setStandardButtons(QMessageBox.Ok) + msg.setDefaultButton(QMessageBox.Ok) + msg.setEscapeButton(QMessageBox.Ok) + msg.exec_() + return False + return True
+ + +
+[docs] + def send_value(self): + """ + Emit a :attr:`send_value_signal` to update channel value. + + If :attr:'pvBit' is n>=0 or positive the button toggles the state of + the n-th digit of the channel. Otherwise it toggles the whole value. + """ + if not self._connected: + return None + if not self.confirm_dialog(): + return None + if not self.validate_password(): + return None + + checked = not self._bit_val + val = checked + if self._bit >= 0: + val = int(self.value) + val ^= (-checked ^ val) & (1 << self._bit) + # For explanation look: + # https://stackoverflow.com/questions/47981/how-do-you-set-clear-and-toggle-a-single-bit + self.send_value_signal[self.channeltype].emit(self.channeltype(val))
+ + +
+[docs] + def sizeHint(self): + """Return size hint to define size on initialization.""" + return QSize(72, 36)
+ + +
+[docs] + def paintEvent(self, event): + """Treat appearence changes based on connection state and value.""" + self.style().unpolish(self) + self.style().polish(self) + + if not self.isEnabled(): + state = 'Disconnected' + elif self._bit_val == self._on: + state = 'On' + elif self._bit_val == self._off: + state = 'Off' + else: + state = 'Disconnected' + + if self.shape == 0: + shape_dict = PyDMStateButton.squaredbuttonstatesdict + elif self.shape == 1: + shape_dict = PyDMStateButton.roundedbuttonstatesdict + + option = QStyleOption() + option.initFrom(self) + h = option.rect.height() + w = option.rect.width() + aspect = 2.0 + ah = w/aspect + aw = w + if ah > h: + ah = h + aw = h*aspect + x = abs(aw-w)/2.0 + y = abs(ah-h)/2.0 + bounds = QRectF(x, y, aw, ah) + + painter = QPainter(self) + painter.setRenderHint(QPainter.Antialiasing, True) + + shape_str = shape_dict[state] + buttonstate_bytearray = bytes(shape_str, 'utf-8') + self.renderer.load(QByteArray(buttonstate_bytearray)) + self.renderer.render(painter, bounds)
+ + + @Property(buttonShapeMap) + def shape(self): + """ + Property to define the shape of the button. + + Returns + ------- + int + """ + return self._shape + + @shape.setter + def shape(self, new_shape): + """ + Property to define the shape of the button. + + Parameters + ---------- + value : int + """ + if new_shape in [PyDMStateButton.Rounded, PyDMStateButton.Squared]: + self._shape = new_shape + self.update() + else: + raise ValueError('Button shape not defined!') + + @Property(int) + def pvbit(self): + """ + Property to define which PV bit to control. + + Returns + ------- + int + """ + return int(self._bit) + + @pvbit.setter + def pvbit(self, bit): + """ + Property to define which PV bit to control. + + Parameters + ---------- + value : int + """ + if bit >= 0: + self._bit = int(bit) + + @Property(bool) + def invert(self): + """ + Property that indicates whether to invert button on/off representation. + + Return + ------ + bool + """ + return self._invert + + @invert.setter + def invert(self, value): + """ + Property that indicates whether to invert button on/off representation. + + Parameters + ---------- + value: bool + """ + self._invert = value + if self._invert: + self._on = 0 + self._off = 1 + else: + self._on = 1 + self._off = 0
+ + # Trigger paintEvent somehow +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/string_combo_box.html b/_modules/siriushla/widgets/string_combo_box.html new file mode 100644 index 000000000..5f35a9088 --- /dev/null +++ b/_modules/siriushla/widgets/string_combo_box.html @@ -0,0 +1,261 @@ + + + + + + siriushla.widgets.string_combo_box — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.string_combo_box

+"""Sirius String ComboBox."""
+
+import logging
+from qtpy.QtWidgets import QComboBox
+from qtpy.QtCore import Qt
+from pydm.widgets.base import PyDMWritableWidget
+
+
+logger = logging.getLogger(__name__)
+
+
+
+[docs] +class SiriusStringComboBox(QComboBox, PyDMWritableWidget): + """A ComboBox with a channel to handle PVs of string type.""" + + def __init__(self, parent=None, init_channel=None, items=None): + """Init.""" + QComboBox.__init__(self, parent) + PyDMWritableWidget.__init__(self, init_channel=init_channel) + self._has_items = False + self.set_items(items) + self.activated.connect(self._send_value) + self.setContextMenuPolicy(Qt.DefaultContextMenu) + self.contextMenuEvent = self.open_context_menu + +
+[docs] + def value_changed(self, new_val): + """Handle PV value changed in widget.""" + if new_val is not None: + if isinstance(self._items, dict): + new_val = self._values2items.get(new_val, 'UNDEF') + idx = self.findText(new_val) + if idx == -1: + logger.error("Can not change value to %r. " + "Not an option in SiriusStringComboBox", + new_val) + return + self.setCurrentIndex(idx)
+ + +
+[docs] + def set_items(self, items): + """Add comboBox items.""" + if items is None: + return + elif isinstance(items, list): + items.append('UNDEF') + for item in items: + try: + self.addItem(item) + except TypeError as error: + logger.error( + "Invalid type '{0}'. The expected type is 'string'. " + "Exception: {1}".format(type(item), error)) + elif isinstance(items, dict): + items['UNDEF'] = -1 + for item_text, data in items.items(): + try: + self.addItem(item_text, data) + except TypeError as error: + logger.error( + "Invalid type '{0}'. The expected type is 'string'. " + "Exception: {1}".format(type(item), error)) + self._values2items = {v: t for t, v in items.items()} + self._items = items + self._has_items = True + self.check_enable_state()
+ + +
+[docs] + def check_enable_state(self): + """Checks whether or not the widget should be disable.""" + status = self._write_access and self._connected and self._has_items + tooltip = "" + if not self._connected: + tooltip += "PV is disconnected." + elif not self._write_access: + tooltip += "Access denied by Channel Access Security." + elif not self._has_items: + tooltip += "Items not available." + + self.setToolTip(tooltip) + self.setEnabled(status)
+ + + def _send_value(self, index): + text = self.itemText(index) + if text == 'UNDEF': + return + if isinstance(self._items, list): + self.send_value_signal[str].emit(text) + elif isinstance(self._items, dict): + value = self._items[text] + self.send_value_signal[type(value)].emit(value)
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/timeplot.html b/_modules/siriushla/widgets/timeplot.html new file mode 100644 index 000000000..4cca1303c --- /dev/null +++ b/_modules/siriushla/widgets/timeplot.html @@ -0,0 +1,558 @@ + + + + + + siriushla.widgets.timeplot — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.widgets.timeplot

+import numpy as _np
+import time
+
+from qtpy.QtCore import Qt, Signal, Slot, QTimer, Property
+from qtpy.QtGui import QPalette
+from qtpy.QtWidgets import QInputDialog, QLabel, QApplication, QAction
+
+from pyqtgraph import ViewBox, mkBrush
+
+from pydm import utilities
+from pydm.widgets.timeplot import TimePlotCurveItem, PyDMTimePlot, \
+    DEFAULT_X_MIN
+
+from siriuspy.clientarch import ClientArchiver, Time
+
+
+
+[docs] +class SiriusTimePlotItem(TimePlotCurveItem): + """Reimplement to do not receive inf values.""" + + def __init__(self, parent, *args, **kwargs): + """Init and create parent attribute.""" + super().__init__(*args, **kwargs) + self.parent = parent + +
+[docs] + def setBufferSize(self, value, initialize_buffer=False): + """ + Reimplement setBufferSize to fill buffer with points accumulated. + """ + if self._bufferSize == int(value): + return + self._bufferSize = max(int(value), 2) + + if initialize_buffer: + self.initialize_buffer() + else: + old_data_buffer = _np.copy(self.data_buffer) + self.points_accumulated = old_data_buffer.shape[1] + self._min_y_value = min(old_data_buffer[1]) + self._max_y_value = max(old_data_buffer[1]) + + self.data_buffer = _np.zeros( + (2, self._bufferSize), order='f', dtype=float) + for i in range(self.points_accumulated): + self.data_buffer = _np.roll(self.data_buffer, -1) + self.data_buffer[0, self._bufferSize-1] = old_data_buffer[0, i] + self.data_buffer[1, self._bufferSize-1] = old_data_buffer[1, i]
+ + +
+[docs] + @Slot(float) + @Slot(int) + def receiveNewValue(self, new_value): + """ + Rederive receiveNewValue to avoid infinit values. + """ + if not _np.isinf(new_value): + super().receiveNewValue(new_value)
+ + +
+[docs] + @Slot() + def redrawCurve(self): + """ + Rederive redrawCurve to use data only refered to timespan. + """ + try: + now = Time.now().timestamp() + xmin = now - self.parent.timeSpan + idcs = _np.where(self.data_buffer[0] >= xmin)[0] + if idcs.size and idcs[0] != 0 and \ + self.data_buffer[0, idcs[0]-1] != 0: + idcs = _np.r_[idcs[0]-1, idcs] + x = self.data_buffer[0, idcs].astype(_np.float_) + y = self.data_buffer[1, idcs].astype(_np.float_) + + if not self._plot_by_timestamps: + x -= now + + self.setData(y=y, x=x) + except (ZeroDivisionError, OverflowError): + # Solve an issue with pyqtgraph and initial downsampling + pass
+ + +
+[docs] + def initialize_buffer(self): + """ + Rederive initialize_buffer to avoid filling the entire buffer + with plot-eligible data. + """ + self.points_accumulated = 0 + + # If you don't specify dtype=float, you don't have enough + # resolution for the timestamp data. + self.data_buffer = _np.zeros((2, self._bufferSize), + order='f', dtype=float)
+
+ + + +
+[docs] +class SiriusTimePlot(PyDMTimePlot): + """PyDMTimePlot with some extra features.""" + + bufferReset = Signal() + timeSpanChanged = Signal() + + def __init__(self, *args, show_tooltip=False, **kws): + super().__init__(*args, **kws) + self._filled_with_arch_data = dict() + self._show_tooltip = show_tooltip + + self.vb2 = ViewBox() + self.plotItem.scene().addItem(self.vb2) + self.vb2.setXLink(self.plotItem) + self.plotItem.getAxis('right').linkToView(self.vb2) + self._updateViews() + self.plotItem.vb.sigResized.connect(self._updateViews) + + self.carch = None + + # show auto adjust button + self.plotItem.showButtons() + + # use pan mouse mode (3-button) + self.plotItem.getViewBox().setMouseMode(ViewBox.PanMode) + + # connect sigMouseMoved + self.plotItem.scene().sigMouseMoved.connect(self._handle_mouse_moved) + + # add new actions to menu + rst_act = QAction("Clear buffers") + rst_act.triggered.connect(self._resetBuffers) + tsp_act = QAction("Change time span") + tsp_act.triggered.connect(self._changeTimeSpan) + self.plotItem.scene().contextMenu.extend([rst_act, tsp_act]) + + @property + def legend(self): + """Legend object.""" + return self._legend + + @Property(bool) + def showToolTip(self): + """ + Whether to show or not tooltip with curve values. + + Returns + ------- + use : bool + Tooltip enable status in use + """ + return self._show_tooltip + + @showToolTip.setter + def showToolTip(self, new_show): + """ + Whether to show or not tooltip with curve values. + + Parameters + ---------- + new_show : bool + The new tooltip enable status to use + """ + self._show_tooltip = new_show + +
+[docs] + def addCurve(self, plot_item, axis='left', curve_color=None): + """Reimplement to use right axis.""" + if curve_color is None: + curve_color = utilities.colors.default_colors[ + len(self._curves) % len(utilities.colors.default_colors)] + plot_item.color_string = curve_color + self._curves.append(plot_item) + if axis == 'left': + self.plotItem.addItem(plot_item) + elif axis == 'right': + if not self.plotItem.getAxis('right').isVisible(): + self.plotItem.showAxis('right') + self.vb2.addItem(plot_item) + else: + raise ValueError('Choose a valid axis!') + + # Connect channels + for chan in plot_item.channels(): + if chan: + chan.connect()
+ + +
+[docs] + def addYChannel( + self, y_channel=None, name=None, color=None, lineStyle=None, + lineWidth=None, symbol=None, symbolSize=None, axis='left'): + """Reimplement to use SiriusTimePlotItem and right axis.""" + plot_opts = dict() + plot_opts['symbol'] = symbol + if symbolSize is not None: + plot_opts['symbolSize'] = symbolSize + if lineStyle is not None: + plot_opts['lineStyle'] = lineStyle + if lineWidth is not None: + plot_opts['lineWidth'] = lineWidth + + # Add curve + new_curve = SiriusTimePlotItem( + self, y_channel, + plot_by_timestamps=self._plot_by_timestamps, + name=name, color=color, **plot_opts) + new_curve.setUpdatesAsynchronously(self.updatesAsynchronously) + new_curve.setBufferSize(self._bufferSize, initialize_buffer=True) + + self.update_timer.timeout.connect(new_curve.asyncUpdate) + self.addCurve(new_curve, axis, curve_color=color) + + new_curve.data_changed.connect(self.set_needs_redraw) + self.redraw_timer.start() + + return new_curve
+ + +
+[docs] + def updateXAxis(self, update_immediately=False): + """Reimplement to show only existing range.""" + if len(self._curves) == 0: + return + + if self._plot_by_timestamps: + if self._update_mode == PyDMTimePlot.SynchronousMode: + maxrange = max([curve.max_x() for curve in self._curves]) + else: + maxrange = time.time() + + mini = Time.now().timestamp() + for curve in self._curves: + firstvalid = (curve.data_buffer[0] != 0).argmax() + if curve.data_buffer[0, firstvalid] == 0: + continue + mini = min(mini, curve.data_buffer[0, firstvalid]) + minrange = max(maxrange - self._time_span, mini) + + self.plotItem.setXRange( + minrange, maxrange, padding=0.0, update=update_immediately) + else: + diff_time = self.starting_epoch_time - \ + max([curve.max_x() for curve in self._curves]) + if diff_time > DEFAULT_X_MIN: + diff_time = DEFAULT_X_MIN + self.getViewBox().setLimits(minXRange=diff_time)
+ + + def _updateViews(self): + self.vb2.setGeometry(self.plotItem.vb.sceneBoundingRect()) + self.vb2.linkedViewChanged(self.plotItem.vb, self.vb2.XAxis) + + def _get_value_from_arch( + self, pvname, t_init, t_end, process_type, process_bin_intvl): + """Get values from archiver.""" + if self.carch is None: + self.carch = ClientArchiver() + self.carch.timeout = 120 + data = self.carch.getData( + pvname, t_init, t_end, process_type, process_bin_intvl) + if not data: + return + return data['timestamp'], data['value'] + +
+[docs] + def fill_curve_with_archdata( + self, curve, pvname, t_init, t_end, factor=None, process_type='', + process_bin_intvl=None): + """Fill curve with archiver data.""" + data = self._get_value_from_arch( + pvname, t_init, t_end, process_type, process_bin_intvl) + if not data: + return + datax, datay = data + self.fill_curve_buffer(curve, datax, datay, factor) + + self._filled_with_arch_data[pvname] = dict( + curve=curve, factor=factor, process_type=process_type, + process_bin_intvl=process_bin_intvl)
+ + +
+[docs] + def fill_curve_buffer(self, curve, datax, datay, factor=None): + """Fill curve buffer.""" + nrpts = len(datax) + if not nrpts: + return + buff = _np.zeros((2, self.bufferSize), order='f', dtype=float) + if nrpts > self.bufferSize: + smpls2discard = nrpts - self.bufferSize + datax = datax[smpls2discard:] + datay = datay[smpls2discard:] + nrpts = len(datax) + firstsmpl2fill = self.bufferSize - nrpts + buff[0, firstsmpl2fill:] = datax + buff[1, firstsmpl2fill:] = datay + if factor: + buff[1, :] /= factor + curve.data_buffer = buff + curve.points_accumulated = nrpts + curve._min_y_value = min(datay) + curve._max_y_value = max(datay) + curve.latest_value = datay[-1]
+ + + def _resetBuffers(self): + for curve in self._curves: + curve.initialize_buffer() + self.bufferReset.emit() + + def _changeTimeSpan(self): + new_time_span, ok = QInputDialog.getInt( + self, 'Input', 'Set new time span value [s]: ') + if not ok: + return + + if new_time_span > self.timeSpan: + t_end = Time.now() + t_init = t_end - new_time_span + for pvname, info in self._filled_with_arch_data.items(): + self.fill_curve_with_archdata( + info['curve'], pvname, + t_init.get_iso8601(), t_end.get_iso8601(), + info['factor'], info['process_type'], + info['process_bin_intvl']) + + self.timeSpan = new_time_span + self.timeSpanChanged.emit() + + def _handle_mouse_moved(self, pos): + """Show tooltip at mouse move.""" + if not self._show_tooltip: + return + + # create label tooltip, if needed + if not hasattr(self, 'label_tooltip'): + self.label_tooltip = QLabel(self, Qt.ToolTip) + self.timer_tooltip = QTimer(self) + self.timer_tooltip.timeout.connect(self.label_tooltip.hide) + self.timer_tooltip.setInterval(1000) + + # find nearest curve point + nearest = (self._curves[0], _np.inf, None, None) + for idx, curve in enumerate(self._curves): + if not curve.isVisible(): + continue + mappos = curve.mapFromScene(pos) + posx, posy = mappos.x(), mappos.y() + xData, yData = curve.curve.xData, curve.curve.yData + if not xData.size: + continue + diffx = xData - posx + idx = _np.argmin(_np.abs(diffx)) + if diffx[idx] < 0.5: + valx, valy = xData[idx], yData[idx] + diffy = abs(valy - posy) + if diffy < nearest[1]: + nearest = (curve, diffy, valx, valy) + + # show tooltip + curve, diffy, valx, valy = nearest + ylimts = self.getViewBox().state['viewRange'][1] + ydelta = ylimts[1] - ylimts[0] + if diffy < 1e-2*ydelta: + txt = Time(timestamp=valx).get_iso8601()+'\n' + txt += f'{curve.name()}: {valy:.3f}' + font = QApplication.instance().font() + font.setPointSize(font.pointSize() - 10) + palette = QPalette() + palette.setColor(QPalette.WindowText, curve.color) + self.label_tooltip.setText(txt) + self.label_tooltip.setFont(font) + self.label_tooltip.setPalette(palette) + self.label_tooltip.move(self.mapToGlobal(pos.toPoint())) + self.label_tooltip.show() + self.timer_tooltip.start() + curve.scatter.setData( + pos=[(valx, valy), ], symbol='o', size=15, + brush=mkBrush(curve.color)) + curve.scatter.show()
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/waveformplot.html b/_modules/siriushla/widgets/waveformplot.html new file mode 100644 index 000000000..b287d36a9 --- /dev/null +++ b/_modules/siriushla/widgets/waveformplot.html @@ -0,0 +1,189 @@ + + + + + + siriushla.widgets.waveformplot — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.waveformplot

+"""Waveform plot widget."""
+
+from pyqtgraph import ViewBox
+
+from pydm.widgets import PyDMWaveformPlot
+
+
+
+[docs] +class SiriusWaveformPlot(PyDMWaveformPlot): + """Sirius Waveform Plot widget.""" + + def __init__(self, *args, **kwargs): + """Init and change some configurations.""" + super().__init__(*args, **kwargs) + + # show auto adjust button + self.plotItem.showButtons() + + # use pan mouse mode (3-button) + self.plotItem.getViewBox().setMouseMode(ViewBox.PanMode) + + @property + def legend(self): + """Legend object.""" + return self._legend
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/waveformtable.html b/_modules/siriushla/widgets/waveformtable.html new file mode 100644 index 000000000..087c9813e --- /dev/null +++ b/_modules/siriushla/widgets/waveformtable.html @@ -0,0 +1,199 @@ + + + + + + siriushla.widgets.waveformtable — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.waveformtable

+"""Sirius Waveform Table Widget."""
+
+import numpy as _np
+
+from pydm.widgets import PyDMWaveformTable
+
+
+
+[docs] +class SiriusWaveformTable(PyDMWaveformTable): + """Handle bugs for None, float and int values.""" + + def __init__(self, parent=None, init_channel=None, transform=None): + """.""" + super().__init__(parent, init_channel) + self.transform = transform + +
+[docs] + def value_changed(self, new_waveform): + """ + Callback invoked when the Channel value is changed. + + Parameters + ---------- + new_waveform : np.ndarray + The new waveform value from the channel. + """ + if new_waveform is None: + return + elif isinstance(new_waveform, (float, int)): + new_waveform = _np.array([new_waveform]) + if self.transform is not None: + new_waveform = self.transform(new_waveform) + super().value_changed(new_waveform)
+
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/widget_factory.html b/_modules/siriushla/widgets/widget_factory.html new file mode 100644 index 000000000..3c00de4de --- /dev/null +++ b/_modules/siriushla/widgets/widget_factory.html @@ -0,0 +1,191 @@ + + + + + + siriushla.widgets.widget_factory — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + + +
  • +
  • +
+
+
+
+
+ +

Source code for siriushla.widgets.widget_factory

+from pydm.widgets.base import (
+    PyDMPrimitiveWidget, PyDMWidget, PyDMWritableWidget)
+
+
+
+[docs] +def pydmwidget_factory(widgetclass, pydm_class='read'): + if pydm_class.lower().startswith('primi'): + pydmclass = PyDMPrimitiveWidget + elif pydm_class.lower().startswith('read'): + pydmclass = PyDMWidget + else: + pydmclass = PyDMWritableWidget + + class PyDMCustomWidget(widgetclass, pydmclass): + + def __init__(self, *args, **kwargs): + try: + init_channel = kwargs.pop('init_channel') + except KeyError: + init_channel = None + + widgetclass.__init__(self, *args, **kwargs) + if pydm_class.lower().startswith('primi'): + pydmclass.__init__(self) + else: + pydmclass.__init__(self, init_channel=init_channel) + return PyDMCustomWidget
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/siriushla/widgets/windows.html b/_modules/siriushla/widgets/windows.html new file mode 100644 index 000000000..5e4b0976c --- /dev/null +++ b/_modules/siriushla/widgets/windows.html @@ -0,0 +1,347 @@ + + + + + + siriushla.widgets.windows — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for siriushla.widgets.windows

+"""Sirius Windows module."""
+from qtpy.QtGui import QKeySequence
+from qtpy.QtCore import Qt
+from qtpy.QtWidgets import QMainWindow, QDialog, QHBoxLayout, QApplication, \
+    QWidget, QLabel, QMenu, QPushButton, QGraphicsView, QScrollArea
+import pyqtgraph as pg
+from pydm.connection_inspector import ConnectionInspector
+
+from ..util import get_package_version
+
+from .matplotlib import MatplotlibCanvas
+
+
+def _create_siriuswindow(qt_type):
+    """Create a _SiriusWindow that inherits from qt_type."""
+    class _SiriusWindow(qt_type):
+        """Auxiliar _SiriusWindow class.
+
+        Parameters
+        ----------
+        parent : QWidget
+            The parent widget for the SiriusMainWindow
+
+        """
+
+        Stylesheet = ""
+        FontSizeSS = "* {{font-size: {}pt;}}"
+
+        def __init__(self, *args, **kwargs):
+            """Init."""
+            super().__init__(*args, **kwargs)
+            self.setFocus(True)
+            self.app = QApplication.instance()
+            if isinstance(self, SiriusMainWindow):
+                self.label_version = QLabel(
+                    'siriushla version: ' + get_package_version(),
+                    self, alignment=Qt.AlignRight)
+                self.label_version.setStyleSheet('font-size: 6pt;')
+                self.conn_but = QPushButton('Show Connections...', self)
+                self.conn_but.clicked.connect(self.show_connections)
+                self.conn_but.setStyleSheet('min-width:9em;font-size:6pt;')
+                self.statusBar().addPermanentWidget(self.label_version)
+                self.statusBar().addWidget(self.conn_but)
+
+        def keyPressEvent(self, event):
+            """Override keyPressEvent."""
+            font = self.app.font()
+            if event.matches(QKeySequence.ZoomIn):
+                font.setPointSize(font.pointSize() + 1)
+                self.app.setFont(font)
+                self.changeFontSize()
+            elif event.matches(QKeySequence.ZoomOut) and font.pointSize() > 6:
+                font.setPointSize(font.pointSize() - 1)
+                self.app.setFont(font)
+                self.changeFontSize()
+            super().keyPressEvent(event)
+
+        def contextMenuEvent(self, event):
+            """."""
+            pos = self.mapToGlobal(event.pos())
+            if self._is_graph(pos):
+                return
+            context_menu = QMenu(self)
+            action = context_menu.addAction('Show Connections...')
+            action.triggered.connect(self.show_connections)
+            context_menu.exec_(pos)
+
+        def _is_graph(self, pos):
+            wid = self.app.widgetAt(pos)
+            is_graph = False
+            widgets = []
+            while wid and not is_graph:
+                is_graph |= isinstance(wid, (QGraphicsView, MatplotlibCanvas))
+                wid.setAttribute(Qt.WA_TransparentForMouseEvents, True)
+                widgets.append(wid)
+                wid = self.app.widgetAt(pos)
+
+            for wid in widgets:
+                wid.setAttribute(Qt.WA_TransparentForMouseEvents, False)
+            return is_graph
+
+        def show_connections(self, checked):
+            """."""
+            _ = checked
+            c = ConnectionInspector(self)
+            c.show()
+
+        def changeFontSize(self):
+            """."""
+            fontsize = self.app.font().pointSize()
+            self.ensurePolished()
+            for w in self.findChildren(QWidget):
+                font = w.font()
+                font.setPointSize(fontsize)
+                w.setFont(font)
+            self.adjustSize()
+
+            # handle resizing of pyqtgraph plots labels
+            fontsize_str = str(fontsize)+'pt'
+            for w in self.findChildren(pg.PlotWidget):
+                # axes labels
+                for ax in w.getPlotItem().axes.values():
+                    sty = ax['item'].labelStyle
+                    sty['font-size'] = fontsize_str
+                    ax['item'].setLabel(text=None, **sty)
+                # legend
+                if w.plotItem.legend:
+                    legw = 0
+                    for item in w.plotItem.legend.items:
+                        item[1].opts['size'] = fontsize_str
+                        item[1].setText(text=item[1].text, **item[1].opts)
+                        legw = max(legw, 20+item[1].width())
+                    w.plotItem.legend.updateSize()
+                    w.plotItem.legend.setFixedWidth(legw)
+                # title
+                wtitle = w.plotItem.titleLabel
+                wtitle.opts['size'] = fontsize_str
+                wtitle.setText(text=wtitle.text, **wtitle.opts)
+            for w in self.findChildren(pg.GraphicsLayoutWidget):
+                sty = w.xaxis.labelStyle
+                sty['font-size'] = fontsize_str
+                w.xaxis.setLabel(text=None, **sty)
+                sty = w.yaxis.labelStyle
+                sty['font-size'] = fontsize_str
+                w.yaxis.setLabel(text=None, **sty)
+
+    return _SiriusWindow
+
+
+SiriusMainWindow = _create_siriuswindow(QMainWindow)
+SiriusDialog = _create_siriuswindow(QDialog)
+
+
+
+[docs] +def create_window_from_widget( + WidgetClass, title='', icon=None, is_main=False, withscroll=False, + min_width=None, min_height=None): + """.""" + + if is_main: + class MyWindow(SiriusMainWindow): + + def __init__(self, parent, *args, **kwargs): + super().__init__(parent) + self.widget = WidgetClass(self, *args, **kwargs) + if withscroll: + scroll = QScrollArea(self) + scroll.setObjectName('scroll') + scroll.setWidget(self.widget) + scroll.setWidgetResizable(True) + scroll.setSizeAdjustPolicy( + QScrollArea.AdjustToContentsOnFirstShow) + self.setCentralWidget(scroll) + + scroll_style = '#scroll{' + if min_width: + scroll_style += 'min-width: '+str(min_width)+'em;' + + if min_height: + scroll_style += 'min-height: '+str(min_height)+'em;' + scroll_style += '}' + scroll.setStyleSheet(scroll_style) + else: + self.setCentralWidget(self.widget) + self.setWindowTitle(title) + if icon: + self.setWindowIcon(icon) + self.setObjectName(self.widget.objectName()) + else: + class MyWindow(SiriusDialog): + + def __init__(self, parent, *args, **kwargs): + super().__init__(parent) + hbl = QHBoxLayout(self) + self.widget = WidgetClass(self, *args, **kwargs) + hbl.addWidget(self.widget) + self.setWindowTitle(title) + if icon: + self.setWindowIcon(icon) + self.setObjectName(self.widget.objectName()) + + MyWindow.__name__ = WidgetClass.__name__.replace('Widget', 'Window') + return MyWindow
+ +
+ +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt new file mode 100644 index 000000000..d8f12a824 --- /dev/null +++ b/_sources/index.rst.txt @@ -0,0 +1,77 @@ +.. Sirius HLA documentation master file, created by + sphinx-quickstart on Tue Jan 16 13:12:44 2024. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to Sirius HLA's documentation! +====================================== + +.. automodule:: siriushla + :members: + :undoc-members: + :show-inheritance: + +.. toctree:: + :maxdepth: 2 + :caption: GUIs: + + siriushla.as_ap_configdb + siriushla.as_ap_currinfo + siriushla.as_ap_energybutton + siriushla.as_ap_injcontrol + siriushla.as_ap_injection + siriushla.as_ap_launcher + siriushla.as_ap_machshift + siriushla.as_ap_macreport + siriushla.as_ap_magoffconv + siriushla.as_ap_measure + siriushla.as_ap_monitor + siriushla.as_ap_opticscorr + siriushla.as_ap_posang + siriushla.as_ap_rabpmmon + siriushla.as_ap_radmon + siriushla.as_ap_sofb + siriushla.as_di_bpms + siriushla.as_di_dccts + siriushla.as_di_icts + siriushla.as_di_scrns + siriushla.as_di_tune + siriushla.as_di_vlight + siriushla.as_ps_commands + siriushla.as_ps_control + siriushla.as_ps_cycle + siriushla.as_ps_diag + siriushla.as_pu_control + siriushla.as_rf_control + siriushla.as_ti_control + siriushla.bl_ap_imgproc + siriushla.bo_ap_ramp + siriushla.common + siriushla.li_ap_mps + siriushla.li_di_bpms + siriushla.li_di_scrns + siriushla.li_eg_control + siriushla.li_pu_modltr + siriushla.li_rf_llrf + siriushla.li_va_control + siriushla.si_ap_fofb + siriushla.si_ap_genstatus + siriushla.si_ap_idff + siriushla.si_ap_orbintlk + siriushla.si_di_bbb + siriushla.si_di_equalize_bpms + siriushla.si_di_scraps + siriushla.si_id_control + siriushla.tb_di_slits + +.. toctree:: + :maxdepth: 1 + :caption: Widgets: + + siriushla + siriushla.widgets + +.. toctree:: + :caption: Source Code: + + HLA Github diff --git a/_sources/siriushla.as_ap_configdb.models.rst.txt b/_sources/siriushla.as_ap_configdb.models.rst.txt new file mode 100644 index 000000000..ee339b970 --- /dev/null +++ b/_sources/siriushla.as_ap_configdb.models.rst.txt @@ -0,0 +1,43 @@ +siriushla.as\_ap\_configdb.models +================================= + +.. automodule:: siriushla.as_ap_configdb.models + :members: + :undoc-members: + :show-inheritance: + +Code Documentation +------------------ + + +siriushla.as\_ap\_configdb.models.config\_db\_table\_model module +----------------------------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.models.config_db_table_model + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_configdb.models.config\_names\_model module +------------------------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.models.config_names_model + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_configdb.models.config\_types\_model module +------------------------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.models.config_types_model + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_configdb.models.pv\_configuration\_model module +----------------------------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.models.pv_configuration_model + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_configdb.normconfigs.rst.txt b/_sources/siriushla.as_ap_configdb.normconfigs.rst.txt new file mode 100644 index 000000000..1feca00d6 --- /dev/null +++ b/_sources/siriushla.as_ap_configdb.normconfigs.rst.txt @@ -0,0 +1,45 @@ +siriushla.as\_ap\_configdb.normconfigs +====================================== + +Code Documentation +------------------ + +siriushla.as\_ap\_configdb.normconfigs.ConfigManagerWindow module +----------------------------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_configdb.normconfigs.ConfigModel module +--------------------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.normconfigs.ConfigModel + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_configdb.normconfigs.LoadingThread module +----------------------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.normconfigs.LoadingThread + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_configdb.normconfigs.TuneDlg module +----------------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.normconfigs.TuneDlg + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_configdb.normconfigs + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_configdb.pvsconfigs.delegate.rst.txt b/_sources/siriushla.as_ap_configdb.pvsconfigs.delegate.rst.txt new file mode 100644 index 000000000..819a117bf --- /dev/null +++ b/_sources/siriushla.as_ap_configdb.pvsconfigs.delegate.rst.txt @@ -0,0 +1,21 @@ +siriushla.as\_ap\_configdb.pvsconfigs.delegate +============================================== + +Code Documentation +------------------ + +siriushla.as\_ap\_configdb.pvsconfigs.delegate.pv\_configuration\_delegate module +--------------------------------------------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_configdb.pvsconfigs.delegate + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_configdb.pvsconfigs.rst.txt b/_sources/siriushla.as_ap_configdb.pvsconfigs.rst.txt new file mode 100644 index 000000000..8d992f1e8 --- /dev/null +++ b/_sources/siriushla.as_ap_configdb.pvsconfigs.rst.txt @@ -0,0 +1,45 @@ +siriushla.as\_ap\_configdb.pvsconfigs +===================================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + siriushla.as_ap_configdb.pvsconfigs.delegate + +Code Documentation +------------------ + +siriushla.as\_ap\_configdb.pvsconfigs.load\_and\_apply module +------------------------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.pvsconfigs.load_and_apply + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_configdb.pvsconfigs.main module +------------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.pvsconfigs.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_configdb.pvsconfigs.read\_and\_save module +------------------------------------------------------------ + +.. automodule:: siriushla.as_ap_configdb.pvsconfigs.read_and_save + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_configdb.pvsconfigs + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_configdb.rst.txt b/_sources/siriushla.as_ap_configdb.rst.txt new file mode 100644 index 000000000..58e714a3f --- /dev/null +++ b/_sources/siriushla.as_ap_configdb.rst.txt @@ -0,0 +1,47 @@ +siriushla.as\_ap\_configdb +========================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + siriushla.as_ap_configdb.models + siriushla.as_ap_configdb.normconfigs + siriushla.as_ap_configdb.pvsconfigs + +Code Documentation +------------------ + +siriushla.as\_ap\_configdb.client\_configdb module +-------------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.client_configdb + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_configdb.configdialogs module +----------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.configdialogs + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_configdb.configwidgets module +----------------------------------------------- + +.. automodule:: siriushla.as_ap_configdb.configwidgets + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_configdb + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_currinfo.rst.txt b/_sources/siriushla.as_ap_currinfo.rst.txt new file mode 100644 index 000000000..b6e030686 --- /dev/null +++ b/_sources/siriushla.as_ap_currinfo.rst.txt @@ -0,0 +1,37 @@ +siriushla.as\_ap\_currinfo +========================== + +Code Documentation +------------------ + +siriushla.as\_ap\_currinfo.charge\_monitor module +------------------------------------------------- + +.. automodule:: siriushla.as_ap_currinfo.charge_monitor + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_currinfo.current\_and\_lifetime module +-------------------------------------------------------- + +.. automodule:: siriushla.as_ap_currinfo.current_and_lifetime + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_currinfo.efficiency\_monitor module +----------------------------------------------------- + +.. automodule:: siriushla.as_ap_currinfo.efficiency_monitor + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_currinfo + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_energybutton.rst.txt b/_sources/siriushla.as_ap_energybutton.rst.txt new file mode 100644 index 000000000..4e9bf9963 --- /dev/null +++ b/_sources/siriushla.as_ap_energybutton.rst.txt @@ -0,0 +1,37 @@ +siriushla.as\_ap\_energybutton +============================== + +Code Documentation +------------------ + +siriushla.as\_ap\_energybutton.energy\_button module +---------------------------------------------------- + +.. automodule:: siriushla.as_ap_energybutton.energy_button + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_energybutton.energy\_setter\_window module +------------------------------------------------------------ + +.. automodule:: siriushla.as_ap_energybutton.energy_setter_window + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_energybutton.set\_energy module +------------------------------------------------- + +.. automodule:: siriushla.as_ap_energybutton.set_energy + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_energybutton + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_injcontrol.rst.txt b/_sources/siriushla.as_ap_injcontrol.rst.txt new file mode 100644 index 000000000..3f653f804 --- /dev/null +++ b/_sources/siriushla.as_ap_injcontrol.rst.txt @@ -0,0 +1,37 @@ +siriushla.as\_ap\_injcontrol +============================ + +Code Documentation +------------------ + +siriushla.as\_ap\_injcontrol.base module +---------------------------------------- + +.. automodule:: siriushla.as_ap_injcontrol.base + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_injcontrol.injbo module +----------------------------------------- + +.. automodule:: siriushla.as_ap_injcontrol.injbo + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_injcontrol.tbts module +---------------------------------------- + +.. automodule:: siriushla.as_ap_injcontrol.tbts + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_injcontrol + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_injection.rst.txt b/_sources/siriushla.as_ap_injection.rst.txt new file mode 100644 index 000000000..34a60f501 --- /dev/null +++ b/_sources/siriushla.as_ap_injection.rst.txt @@ -0,0 +1,45 @@ +siriushla.as\_ap\_injection +=========================== + +Code Documentation +------------------ + +siriushla.as\_ap\_injection.auxiliary\_dialogs module +----------------------------------------------------- + +.. automodule:: siriushla.as_ap_injection.auxiliary_dialogs + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_injection.killbeam\_widgets module +---------------------------------------------------- + +.. automodule:: siriushla.as_ap_injection.killbeam_widgets + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_injection.main module +--------------------------------------- + +.. automodule:: siriushla.as_ap_injection.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_injection.widgets module +------------------------------------------ + +.. automodule:: siriushla.as_ap_injection.widgets + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_injection + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_launcher.rst.txt b/_sources/siriushla.as_ap_launcher.rst.txt new file mode 100644 index 000000000..c522a733b --- /dev/null +++ b/_sources/siriushla.as_ap_launcher.rst.txt @@ -0,0 +1,29 @@ +siriushla.as\_ap\_launcher +========================== + +Code Documentation +------------------ + +siriushla.as\_ap\_launcher.main module +-------------------------------------- + +.. automodule:: siriushla.as_ap_launcher.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_launcher.menu module +-------------------------------------- + +.. automodule:: siriushla.as_ap_launcher.menu + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_launcher + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_machshift.rst.txt b/_sources/siriushla.as_ap_machshift.rst.txt new file mode 100644 index 000000000..00a4a36f4 --- /dev/null +++ b/_sources/siriushla.as_ap_machshift.rst.txt @@ -0,0 +1,21 @@ +siriushla.as\_ap\_machshift +=========================== + +Code Documentation +------------------ + +siriushla.as\_ap\_machshift.widgets module +------------------------------------------ + +.. automodule:: siriushla.as_ap_machshift.widgets + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_machshift + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_macreport.rst.txt b/_sources/siriushla.as_ap_macreport.rst.txt new file mode 100644 index 000000000..3a47a7546 --- /dev/null +++ b/_sources/siriushla.as_ap_macreport.rst.txt @@ -0,0 +1,21 @@ +siriushla.as\_ap\_macreport +=========================== + +Code Documentation +------------------ + +siriushla.as\_ap\_macreport.main module +--------------------------------------- + +.. automodule:: siriushla.as_ap_macreport.main + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_macreport + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_magoffconv.rst.txt b/_sources/siriushla.as_ap_magoffconv.rst.txt new file mode 100644 index 000000000..b6addefb4 --- /dev/null +++ b/_sources/siriushla.as_ap_magoffconv.rst.txt @@ -0,0 +1,21 @@ +siriushla.as\_ap\_magoffconv +============================ + +Code Documentation +------------------ + +siriushla.as\_ap\_magoffconv.main module +---------------------------------------- + +.. automodule:: siriushla.as_ap_magoffconv.main + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_magoffconv + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_measure.rst.txt b/_sources/siriushla.as_ap_measure.rst.txt new file mode 100644 index 000000000..023feea4f --- /dev/null +++ b/_sources/siriushla.as_ap_measure.rst.txt @@ -0,0 +1,29 @@ +siriushla.as\_ap\_measure +========================= + +Code Documentation +------------------ + +siriushla.as\_ap\_measure.emittance\_meas module +------------------------------------------------ + +.. automodule:: siriushla.as_ap_measure.emittance_meas + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_measure.energy\_meas module +--------------------------------------------- + +.. automodule:: siriushla.as_ap_measure.energy_meas + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_measure + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_monitor.rst.txt b/_sources/siriushla.as_ap_monitor.rst.txt new file mode 100644 index 000000000..41d708082 --- /dev/null +++ b/_sources/siriushla.as_ap_monitor.rst.txt @@ -0,0 +1,29 @@ +siriushla.as\_ap\_monitor +========================= + +Code Documentation +------------------ + +siriushla.as\_ap\_monitor.main module +------------------------------------- + +.. automodule:: siriushla.as_ap_monitor.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_monitor.util module +------------------------------------- + +.. automodule:: siriushla.as_ap_monitor.util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_monitor + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_opticscorr.rst.txt b/_sources/siriushla.as_ap_opticscorr.rst.txt new file mode 100644 index 000000000..813228c6e --- /dev/null +++ b/_sources/siriushla.as_ap_opticscorr.rst.txt @@ -0,0 +1,37 @@ +siriushla.as\_ap\_opticscorr +============================ + +Code Documentation +------------------ + +siriushla.as\_ap\_opticscorr.custom\_widgets module +--------------------------------------------------- + +.. automodule:: siriushla.as_ap_opticscorr.custom_widgets + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_opticscorr.details module +------------------------------------------- + +.. automodule:: siriushla.as_ap_opticscorr.details + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_opticscorr.main module +---------------------------------------- + +.. automodule:: siriushla.as_ap_opticscorr.main + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_opticscorr + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_posang.rst.txt b/_sources/siriushla.as_ap_posang.rst.txt new file mode 100644 index 000000000..11b819abf --- /dev/null +++ b/_sources/siriushla.as_ap_posang.rst.txt @@ -0,0 +1,21 @@ +siriushla.as\_ap\_posang +======================== + +Code Documentation +------------------ + +siriushla.as\_ap\_posang.HLPosAng module +---------------------------------------- + +.. automodule:: siriushla.as_ap_posang.HLPosAng + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_posang + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_rabpmmon.rst.txt b/_sources/siriushla.as_ap_rabpmmon.rst.txt new file mode 100644 index 000000000..a50e08d13 --- /dev/null +++ b/_sources/siriushla.as_ap_rabpmmon.rst.txt @@ -0,0 +1,37 @@ +siriushla.as\_ap\_rabpmmon +========================== + +Code Documentation +------------------ + +siriushla.as\_ap\_rabpmmon.custom\_widgets module +------------------------------------------------- + +.. automodule:: siriushla.as_ap_rabpmmon.custom_widgets + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_rabpmmon.main module +-------------------------------------- + +.. automodule:: siriushla.as_ap_rabpmmon.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_rabpmmon.util module +-------------------------------------- + +.. automodule:: siriushla.as_ap_rabpmmon.util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_rabpmmon + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_radmon.rst.txt b/_sources/siriushla.as_ap_radmon.rst.txt new file mode 100644 index 000000000..99f63fe5c --- /dev/null +++ b/_sources/siriushla.as_ap_radmon.rst.txt @@ -0,0 +1,21 @@ +siriushla.as\_ap\_radmon +======================== + +Code Documentation +------------------ + +siriushla.as\_ap\_radmon.main module +------------------------------------ + +.. automodule:: siriushla.as_ap_radmon.main + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_radmon + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_sofb.graphics.rst.txt b/_sources/siriushla.as_ap_sofb.graphics.rst.txt new file mode 100644 index 000000000..315f0b10d --- /dev/null +++ b/_sources/siriushla.as_ap_sofb.graphics.rst.txt @@ -0,0 +1,45 @@ +siriushla.as\_ap\_sofb.graphics +=============================== + +Code Documentation +------------------ + +siriushla.as\_ap\_sofb.graphics.base module +------------------------------------------- + +.. automodule:: siriushla.as_ap_sofb.graphics.base + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_sofb.graphics.correctors module +------------------------------------------------- + +.. automodule:: siriushla.as_ap_sofb.graphics.correctors + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_sofb.graphics.orbit module +-------------------------------------------- + +.. automodule:: siriushla.as_ap_sofb.graphics.orbit + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_sofb.graphics.respmat module +---------------------------------------------- + +.. automodule:: siriushla.as_ap_sofb.graphics.respmat + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_sofb.graphics + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_sofb.ioc_control.rst.txt b/_sources/siriushla.as_ap_sofb.ioc_control.rst.txt new file mode 100644 index 000000000..ac1f2c255 --- /dev/null +++ b/_sources/siriushla.as_ap_sofb.ioc_control.rst.txt @@ -0,0 +1,77 @@ +siriushla.as\_ap\_sofb.ioc\_control +=================================== + +Code Documentation +------------------ + +siriushla.as\_ap\_sofb.ioc\_control.base module +----------------------------------------------- + +.. automodule:: siriushla.as_ap_sofb.ioc_control.base + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_sofb.ioc\_control.drive\_window module +-------------------------------------------------------- + +.. automodule:: siriushla.as_ap_sofb.ioc_control.drive_window + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_sofb.ioc\_control.kicks\_config module +-------------------------------------------------------- + +.. automodule:: siriushla.as_ap_sofb.ioc_control.kicks_config + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_sofb.ioc\_control.main module +----------------------------------------------- + +.. automodule:: siriushla.as_ap_sofb.ioc_control.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_sofb.ioc\_control.orbit\_acquisition module +------------------------------------------------------------- + +.. automodule:: siriushla.as_ap_sofb.ioc_control.orbit_acquisition + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_sofb.ioc\_control.respmat module +-------------------------------------------------- + +.. automodule:: siriushla.as_ap_sofb.ioc_control.respmat + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_sofb.ioc\_control.respmat\_enbllist module +------------------------------------------------------------ + +.. automodule:: siriushla.as_ap_sofb.ioc_control.respmat_enbllist + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_sofb.ioc\_control.status module +------------------------------------------------- + +.. automodule:: siriushla.as_ap_sofb.ioc_control.status + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_sofb.ioc_control + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ap_sofb.rst.txt b/_sources/siriushla.as_ap_sofb.rst.txt new file mode 100644 index 000000000..c97fef73f --- /dev/null +++ b/_sources/siriushla.as_ap_sofb.rst.txt @@ -0,0 +1,38 @@ +siriushla.as\_ap\_sofb +====================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + siriushla.as_ap_sofb.graphics + siriushla.as_ap_sofb.ioc_control + +Code Documentation +------------------ + +siriushla.as\_ap\_sofb.main module +---------------------------------- + +.. automodule:: siriushla.as_ap_sofb.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ap\_sofb.orbit\_register module +--------------------------------------------- + +.. automodule:: siriushla.as_ap_sofb.orbit_register + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ap_sofb + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_di_bpms.rst.txt b/_sources/siriushla.as_di_bpms.rst.txt new file mode 100644 index 000000000..ea50cf655 --- /dev/null +++ b/_sources/siriushla.as_di_bpms.rst.txt @@ -0,0 +1,63 @@ +siriushla.as\_di\_bpms +====================== + +Code Documentation +------------------ + +siriushla.as\_di\_bpms.base module +---------------------------------- + +.. automodule:: siriushla.as_di_bpms.base + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_di\_bpms.list\_bpms module +---------------------------------------- + +.. automodule:: siriushla.as_di_bpms.list_bpms + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_di\_bpms.main module +---------------------------------- + +.. automodule:: siriushla.as_di_bpms.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_di\_bpms.monit module +----------------------------------- + +.. automodule:: siriushla.as_di_bpms.monit + :members: + :undoc-members: + :show-inheritance: + + +siriushla.as\_di\_bpms.settings module +-------------------------------------- + +.. automodule:: siriushla.as_di_bpms.settings + :members: + :undoc-members: + :show-inheritance: + + +siriushla.as\_di\_bpms.trig\_acq\_config module +----------------------------------------------- + +.. automodule:: siriushla.as_di_bpms.trig_acq_config + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_di_bpms + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_di_dccts.rst.txt b/_sources/siriushla.as_di_dccts.rst.txt new file mode 100644 index 000000000..a9956b731 --- /dev/null +++ b/_sources/siriushla.as_di_dccts.rst.txt @@ -0,0 +1,37 @@ +siriushla.as\_di\_dccts +======================= + +Code Documentation +------------------ + +siriushla.as\_di\_dccts.graphics module +--------------------------------------- + +.. automodule:: siriushla.as_di_dccts.graphics + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_di\_dccts.main module +----------------------------------- + +.. automodule:: siriushla.as_di_dccts.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_di\_dccts.settings module +--------------------------------------- + +.. automodule:: siriushla.as_di_dccts.settings + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_di_dccts + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_di_icts.rst.txt b/_sources/siriushla.as_di_icts.rst.txt new file mode 100644 index 000000000..66c58968f --- /dev/null +++ b/_sources/siriushla.as_di_icts.rst.txt @@ -0,0 +1,21 @@ +siriushla.as\_di\_icts +====================== + +Code Documentation +------------------ + +siriushla.as\_di\_icts.ICT\_monitor module +------------------------------------------ + +.. automodule:: siriushla.as_di_icts.ICT_monitor + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_di_icts + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_di_scrns.rst.txt b/_sources/siriushla.as_di_scrns.rst.txt new file mode 100644 index 000000000..a5ff995d0 --- /dev/null +++ b/_sources/siriushla.as_di_scrns.rst.txt @@ -0,0 +1,45 @@ +siriushla.as\_di\_scrns +======================= + +Code Documentation +------------------ + +siriushla.as\_di\_scrns.list\_scrns module +------------------------------------------ + +.. automodule:: siriushla.as_di_scrns.list_scrns + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_di\_scrns.main module +----------------------------------- + +.. automodule:: siriushla.as_di_scrns.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_di\_scrns.scrn\_calib module +------------------------------------------ + +.. automodule:: siriushla.as_di_scrns.scrn_calib + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_di\_scrns.scrn\_details module +-------------------------------------------- + +.. automodule:: siriushla.as_di_scrns.scrn_details + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_di_scrns + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_di_tune.rst.txt b/_sources/siriushla.as_di_tune.rst.txt new file mode 100644 index 000000000..77dd2afea --- /dev/null +++ b/_sources/siriushla.as_di_tune.rst.txt @@ -0,0 +1,61 @@ +siriushla.as\_di\_tune +====================== + +Code Documentation +------------------ + +siriushla.as\_di\_tune.controls module +-------------------------------------- + +.. automodule:: siriushla.as_di_tune.controls + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_di\_tune.details module +------------------------------------- + +.. automodule:: siriushla.as_di_tune.details + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_di\_tune.main module +---------------------------------- + +.. automodule:: siriushla.as_di_tune.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_di\_tune.spectra module +------------------------------------- + +.. automodule:: siriushla.as_di_tune.spectra + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_di\_tune.spectrogram module +----------------------------------------- + +.. automodule:: siriushla.as_di_tune.spectrogram + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_di\_tune.util module +---------------------------------- + +.. automodule:: siriushla.as_di_tune.util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_di_tune + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_di_vlight.rst.txt b/_sources/siriushla.as_di_vlight.rst.txt new file mode 100644 index 000000000..e57be2626 --- /dev/null +++ b/_sources/siriushla.as_di_vlight.rst.txt @@ -0,0 +1,21 @@ +siriushla.as\_di\_vlight +======================== + +Code Documentation +------------------ + +siriushla.as\_di\_vlight.main module +------------------------------------ + +.. automodule:: siriushla.as_di_vlight.main + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_di_vlight + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ps_commands.rst.txt b/_sources/siriushla.as_ps_commands.rst.txt new file mode 100644 index 000000000..3d9a1111a --- /dev/null +++ b/_sources/siriushla.as_ps_commands.rst.txt @@ -0,0 +1,29 @@ +siriushla.as\_ps\_commands +========================== + +Code Documentation +------------------ + +siriushla.as\_ps\_commands.main module +-------------------------------------- + +.. automodule:: siriushla.as_ps_commands.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_commands.tasks module +--------------------------------------- + +.. automodule:: siriushla.as_ps_commands.tasks + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ps_commands + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ps_control.control_widget.rst.txt b/_sources/siriushla.as_ps_control.control_widget.rst.txt new file mode 100644 index 000000000..956d58de3 --- /dev/null +++ b/_sources/siriushla.as_ps_control.control_widget.rst.txt @@ -0,0 +1,125 @@ +siriushla.as\_ps\_control.control\_widget +========================================= + +Code Documentation +------------------ + +siriushla.as\_ps\_control.control\_widget.BasePSControlWidget module +-------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.control_widget.BasePSControlWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.control\_widget.ControlWidgetFactory module +--------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.control_widget.ControlWidgetFactory + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.control\_widget.DipoleControlWidget module +-------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.control_widget.DipoleControlWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.control\_widget.FamQuadrupoleControlWidget module +--------------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.control\_widget.FamSextupoleControlWidget module +-------------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.control_widget.FamSextupoleControlWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.control\_widget.FastCorrectorControlWidget module +--------------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.control_widget.FastCorrectorControlWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.control\_widget.IDFFCorrectorControlWidget module +--------------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.control_widget.IDFFCorrectorControlWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.control\_widget.LensControlWidget module +------------------------------------------------------------------ + +.. automodule:: siriushla.as_ps_control.control_widget.LensControlWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.control\_widget.SeptFFCorrectorControlWidget module +----------------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.control_widget.SeptFFCorrectorControlWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.control\_widget.SkewQuadControlWidget module +---------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.control_widget.SkewQuadControlWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.control\_widget.SlowCorrectorControlWidget module +--------------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.control\_widget.SolenoidControlWidget module +---------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.control_widget.SolenoidControlWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.control\_widget.TrimAllControlWidget module +--------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.control_widget.TrimAllControlWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.control\_widget.TrimFamControlWidget module +--------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.control_widget.TrimFamControlWidget + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ps_control.control_widget + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ps_control.detail_widget.rst.txt b/_sources/siriushla.as_ps_control.detail_widget.rst.txt new file mode 100644 index 000000000..f197d2687 --- /dev/null +++ b/_sources/siriushla.as_ps_control.detail_widget.rst.txt @@ -0,0 +1,45 @@ +siriushla.as\_ps\_control.detail\_widget +======================================== + +Code Documentation +------------------ + +siriushla.as\_ps\_control.detail\_widget.DetailWidgetFactory module +------------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.detail_widget.DetailWidgetFactory + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.detail\_widget.InterlockWindow module +--------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.detail_widget.InterlockWindow + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.detail\_widget.PSDetailWidget module +-------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.detail_widget.PSDetailWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.detail\_widget.custom\_widgets module +--------------------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.detail_widget.custom_widgets + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ps_control.detail_widget + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ps_control.rst.txt b/_sources/siriushla.as_ps_control.rst.txt new file mode 100644 index 000000000..5d46f9552 --- /dev/null +++ b/_sources/siriushla.as_ps_control.rst.txt @@ -0,0 +1,70 @@ +siriushla.as\_ps\_control +========================= + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + siriushla.as_ps_control.control_widget + siriushla.as_ps_control.detail_widget + +Code Documentation +------------------ + +siriushla.as\_ps\_control.PSControlWindow module +------------------------------------------------ + +.. automodule:: siriushla.as_ps_control.PSControlWindow + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.PSDetailWindow module +----------------------------------------------- + +.. automodule:: siriushla.as_ps_control.PSDetailWindow + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.PSTabControlWindow module +--------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.PSTabControlWindow + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.PSTrimWindow module +--------------------------------------------- + +.. automodule:: siriushla.as_ps_control.PSTrimWindow + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.SummaryWidgets module +----------------------------------------------- + +.. automodule:: siriushla.as_ps_control.SummaryWidgets + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_control.ps\_wfmerror\_mon module +-------------------------------------------------- + +.. automodule:: siriushla.as_ps_control.ps_wfmerror_mon + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ps_control + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ps_cycle.rst.txt b/_sources/siriushla.as_ps_cycle.rst.txt new file mode 100644 index 000000000..a62ab4347 --- /dev/null +++ b/_sources/siriushla.as_ps_cycle.rst.txt @@ -0,0 +1,29 @@ +siriushla.as\_ps\_cycle +======================= + +Code Documentation +------------------ + +siriushla.as\_ps\_cycle.cycle\_window module +-------------------------------------------- + +.. automodule:: siriushla.as_ps_cycle.cycle_window + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_cycle.tasks module +------------------------------------ + +.. automodule:: siriushla.as_ps_cycle.tasks + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ps_cycle + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ps_diag.rst.txt b/_sources/siriushla.as_ps_diag.rst.txt new file mode 100644 index 000000000..f12101cde --- /dev/null +++ b/_sources/siriushla.as_ps_diag.rst.txt @@ -0,0 +1,45 @@ +siriushla.as\_ps\_diag +====================== + +Code Documentation +------------------ + +siriushla.as\_ps\_diag.main module +---------------------------------- + +.. automodule:: siriushla.as_ps_diag.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_diag.monitor module +------------------------------------- + +.. automodule:: siriushla.as_ps_diag.monitor + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_diag.ps\_graph\_mon module +-------------------------------------------- + +.. automodule:: siriushla.as_ps_diag.ps_graph_mon + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ps\_diag.util module +---------------------------------- + +.. automodule:: siriushla.as_ps_diag.util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ps_diag + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_pu_control.rst.txt b/_sources/siriushla.as_pu_control.rst.txt new file mode 100644 index 000000000..cd4c76704 --- /dev/null +++ b/_sources/siriushla.as_pu_control.rst.txt @@ -0,0 +1,37 @@ +siriushla.as\_pu\_control +========================= + +Code Documentation +------------------ + +siriushla.as\_pu\_control.ControlWindow module +---------------------------------------------- + +.. automodule:: siriushla.as_pu_control.ControlWindow + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_pu\_control.DetailWidget module +--------------------------------------------- + +.. automodule:: siriushla.as_pu_control.DetailWidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_pu\_control.DetailWindow module +--------------------------------------------- + +.. automodule:: siriushla.as_pu_control.DetailWindow + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_pu_control + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_rf_control.rst.txt b/_sources/siriushla.as_rf_control.rst.txt new file mode 100644 index 000000000..6ae41367a --- /dev/null +++ b/_sources/siriushla.as_rf_control.rst.txt @@ -0,0 +1,45 @@ +siriushla.as\_rf\_control +========================= + +Code Documentation +------------------ + +siriushla.as\_rf\_control.control module +---------------------------------------- + +.. automodule:: siriushla.as_rf_control.control + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_rf\_control.custom\_widgets module +------------------------------------------------ + +.. automodule:: siriushla.as_rf_control.custom_widgets + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_rf\_control.details module +---------------------------------------- + +.. automodule:: siriushla.as_rf_control.details + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_rf\_control.util module +------------------------------------- + +.. automodule:: siriushla.as_rf_control.util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_rf_control + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.as_ti_control.rst.txt b/_sources/siriushla.as_ti_control.rst.txt new file mode 100644 index 000000000..13689c9cb --- /dev/null +++ b/_sources/siriushla.as_ti_control.rst.txt @@ -0,0 +1,61 @@ +siriushla.as\_ti\_control +========================= + +Code Documentation +------------------ + +siriushla.as\_ti\_control.base module +------------------------------------- + +.. automodule:: siriushla.as_ti_control.base + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ti\_control.hl\_trigger module +-------------------------------------------- + +.. automodule:: siriushla.as_ti_control.hl_trigger + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ti\_control.hltiming module +----------------------------------------- + +.. automodule:: siriushla.as_ti_control.hltiming + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ti\_control.low\_level\_devices module +---------------------------------------------------- + +.. automodule:: siriushla.as_ti_control.low_level_devices + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ti\_control.monitor module +---------------------------------------- + +.. automodule:: siriushla.as_ti_control.monitor + :members: + :undoc-members: + :show-inheritance: + +siriushla.as\_ti\_control.widgets module +---------------------------------------- + +.. automodule:: siriushla.as_ti_control.widgets + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.as_ti_control + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.bl_ap_imgproc.rst.txt b/_sources/siriushla.bl_ap_imgproc.rst.txt new file mode 100644 index 000000000..95bcab027 --- /dev/null +++ b/_sources/siriushla.bl_ap_imgproc.rst.txt @@ -0,0 +1,45 @@ +siriushla.bl\_ap\_imgproc +========================= + +Code Documentation +------------------ + +siriushla.bl\_ap\_imgproc.blintlkctl module +------------------------------------------- + +.. automodule:: siriushla.bl_ap_imgproc.blintlkctl + :members: + :undoc-members: + :show-inheritance: + +siriushla.bl\_ap\_imgproc.image module +-------------------------------------- + +.. automodule:: siriushla.bl_ap_imgproc.image + :members: + :undoc-members: + :show-inheritance: + +siriushla.bl\_ap\_imgproc.main module +------------------------------------- + +.. automodule:: siriushla.bl_ap_imgproc.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.bl\_ap\_imgproc.util module +------------------------------------- + +.. automodule:: siriushla.bl_ap_imgproc.util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.bl_ap_imgproc + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.bo_ap_ramp.rst.txt b/_sources/siriushla.bo_ap_ramp.rst.txt new file mode 100644 index 000000000..06ad20715 --- /dev/null +++ b/_sources/siriushla.bo_ap_ramp.rst.txt @@ -0,0 +1,69 @@ +siriushla.bo\_ap\_ramp +====================== + +Code Documentation +------------------ + +siriushla.bo\_ap\_ramp.auxiliary\_dialogs module +------------------------------------------------ + +.. automodule:: siriushla.bo_ap_ramp.auxiliary_dialogs + :members: + :undoc-members: + :show-inheritance: + +siriushla.bo\_ap\_ramp.bonormalized\_edit module +------------------------------------------------ + +.. automodule:: siriushla.bo_ap_ramp.bonormalized_edit + :members: + :undoc-members: + :show-inheritance: + +siriushla.bo\_ap\_ramp.boramp\_edit module +------------------------------------------ + +.. automodule:: siriushla.bo_ap_ramp.boramp_edit + :members: + :undoc-members: + :show-inheritance: + +siriushla.bo\_ap\_ramp.custom\_widgets module +--------------------------------------------- + +.. automodule:: siriushla.bo_ap_ramp.custom_widgets + :members: + :undoc-members: + :show-inheritance: + +siriushla.bo\_ap\_ramp.main\_window module +------------------------------------------ + +.. automodule:: siriushla.bo_ap_ramp.main_window + :members: + :undoc-members: + :show-inheritance: + +siriushla.bo\_ap\_ramp.menu module +---------------------------------- + +.. automodule:: siriushla.bo_ap_ramp.menu + :members: + :undoc-members: + :show-inheritance: + +siriushla.bo\_ap\_ramp.status\_and\_commands module +--------------------------------------------------- + +.. automodule:: siriushla.bo_ap_ramp.status_and_commands + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.bo_ap_ramp + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.common.afc_acq_core.rst.txt b/_sources/siriushla.common.afc_acq_core.rst.txt new file mode 100644 index 000000000..f86301750 --- /dev/null +++ b/_sources/siriushla.common.afc_acq_core.rst.txt @@ -0,0 +1,29 @@ +siriushla.common.afc\_acq\_core +=============================== + +Code Documentation +------------------ + +siriushla.common.afc\_acq\_core.base module +------------------------------------------- + +.. automodule:: siriushla.common.afc_acq_core.base + :members: + :undoc-members: + :show-inheritance: + +siriushla.common.afc\_acq\_core.triggers module +----------------------------------------------- + +.. automodule:: siriushla.common.afc_acq_core.triggers + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.common.afc_acq_core + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.common.cam_basler.rst.txt b/_sources/siriushla.common.cam_basler.rst.txt new file mode 100644 index 000000000..539e53d9e --- /dev/null +++ b/_sources/siriushla.common.cam_basler.rst.txt @@ -0,0 +1,29 @@ +siriushla.common.cam\_basler +============================ + +Code Documentation +------------------ + +siriushla.common.cam\_basler.base module +---------------------------------------- + +.. automodule:: siriushla.common.cam_basler.base + :members: + :undoc-members: + :show-inheritance: + +siriushla.common.cam\_basler.settings module +-------------------------------------------- + +.. automodule:: siriushla.common.cam_basler.settings + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.common.cam_basler + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.common.diff_ctrl.rst.txt b/_sources/siriushla.common.diff_ctrl.rst.txt new file mode 100644 index 000000000..25763e1d1 --- /dev/null +++ b/_sources/siriushla.common.diff_ctrl.rst.txt @@ -0,0 +1,29 @@ +siriushla.common.diff\_ctrl +=========================== + +Code Documentation +------------------ + +siriushla.common.diff\_ctrl.base module +--------------------------------------- + +.. automodule:: siriushla.common.diff_ctrl.base + :members: + :undoc-members: + :show-inheritance: + +siriushla.common.diff\_ctrl.details module +------------------------------------------ + +.. automodule:: siriushla.common.diff_ctrl.details + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.common.diff_ctrl + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.common.epics.rst.txt b/_sources/siriushla.common.epics.rst.txt new file mode 100644 index 000000000..e279ab8db --- /dev/null +++ b/_sources/siriushla.common.epics.rst.txt @@ -0,0 +1,19 @@ +siriushla.common.epics +====================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + siriushla.common.epics.task + siriushla.common.epics.wrapper + +Module contents +--------------- + +.. automodule:: siriushla.common.epics + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.common.epics.task.rst.txt b/_sources/siriushla.common.epics.task.rst.txt new file mode 100644 index 000000000..3f910bf95 --- /dev/null +++ b/_sources/siriushla.common.epics.task.rst.txt @@ -0,0 +1,61 @@ +siriushla.common.epics.task +=========================== + +Code Documentation +------------------ + +siriushla.common.epics.task.checker module +------------------------------------------ + +.. automodule:: siriushla.common.epics.task.checker + :members: + :undoc-members: + :show-inheritance: + +siriushla.common.epics.task.connector module +-------------------------------------------- + +.. automodule:: siriushla.common.epics.task.connector + :members: + :undoc-members: + :show-inheritance: + +siriushla.common.epics.task.getter module +----------------------------------------- + +.. automodule:: siriushla.common.epics.task.getter + :members: + :undoc-members: + :show-inheritance: + +siriushla.common.epics.task.setter module +----------------------------------------- + +.. automodule:: siriushla.common.epics.task.setter + :members: + :undoc-members: + :show-inheritance: + +siriushla.common.epics.task.task module +--------------------------------------- + +.. automodule:: siriushla.common.epics.task.task + :members: + :undoc-members: + :show-inheritance: + +siriushla.common.epics.task.wait module +--------------------------------------- + +.. automodule:: siriushla.common.epics.task.wait + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.common.epics.task + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.common.epics.wrapper.rst.txt b/_sources/siriushla.common.epics.wrapper.rst.txt new file mode 100644 index 000000000..c258cac43 --- /dev/null +++ b/_sources/siriushla.common.epics.wrapper.rst.txt @@ -0,0 +1,21 @@ +siriushla.common.epics.wrapper +============================== + +Code Documentation +------------------ + +siriushla.common.epics.wrapper.pyepics module +--------------------------------------------- + +.. automodule:: siriushla.common.epics.wrapper.pyepics + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.common.epics.wrapper + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.common.rst.txt b/_sources/siriushla.common.rst.txt new file mode 100644 index 000000000..01e3e4a81 --- /dev/null +++ b/_sources/siriushla.common.rst.txt @@ -0,0 +1,21 @@ +siriushla.common +================ + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + siriushla.common.afc_acq_core + siriushla.common.cam_basler + siriushla.common.diff_ctrl + siriushla.common.epics + +Module contents +--------------- + +.. automodule:: siriushla.common + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.li_ap_mps.rst.txt b/_sources/siriushla.li_ap_mps.rst.txt new file mode 100644 index 000000000..bda9164bc --- /dev/null +++ b/_sources/siriushla.li_ap_mps.rst.txt @@ -0,0 +1,45 @@ +siriushla.li\_ap\_mps +===================== + +Code Documentation +------------------ + +siriushla.li\_ap\_mps.bypass\_btn module +---------------------------------------- + +.. automodule:: siriushla.li_ap_mps.bypass_btn + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_ap\_mps.main module +--------------------------------- + +.. automodule:: siriushla.li_ap_mps.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_ap\_mps.monitor module +------------------------------------ + +.. automodule:: siriushla.li_ap_mps.monitor + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_ap\_mps.util module +--------------------------------- + +.. automodule:: siriushla.li_ap_mps.util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.li_ap_mps + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.li_di_bpms.rst.txt b/_sources/siriushla.li_di_bpms.rst.txt new file mode 100644 index 000000000..d57cc1288 --- /dev/null +++ b/_sources/siriushla.li_di_bpms.rst.txt @@ -0,0 +1,21 @@ +siriushla.li\_di\_bpms +====================== + +Code Documentation +------------------ + +siriushla.li\_di\_bpms.bpm\_main module +--------------------------------------- + +.. automodule:: siriushla.li_di_bpms.bpm_main + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.li_di_bpms + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.li_di_scrns.rst.txt b/_sources/siriushla.li_di_scrns.rst.txt new file mode 100644 index 000000000..c136541bb --- /dev/null +++ b/_sources/siriushla.li_di_scrns.rst.txt @@ -0,0 +1,37 @@ +siriushla.li\_di\_scrns +======================= + +Code Documentation +------------------ + +siriushla.li\_di\_scrns.main module +----------------------------------- + +.. automodule:: siriushla.li_di_scrns.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_di\_scrns.motorBtn module +--------------------------------------- + +.. automodule:: siriushla.li_di_scrns.motorBtn + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_di\_scrns.util module +----------------------------------- + +.. automodule:: siriushla.li_di_scrns.util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.li_di_scrns + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.li_eg_control.rst.txt b/_sources/siriushla.li_eg_control.rst.txt new file mode 100644 index 000000000..6d7ed5796 --- /dev/null +++ b/_sources/siriushla.li_eg_control.rst.txt @@ -0,0 +1,21 @@ +siriushla.li\_eg\_control +========================= + +Code Documentation +------------------ + +siriushla.li\_eg\_control.main module +------------------------------------- + +.. automodule:: siriushla.li_eg_control.main + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.li_eg_control + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.li_pu_modltr.rst.txt b/_sources/siriushla.li_pu_modltr.rst.txt new file mode 100644 index 000000000..1a7777ab1 --- /dev/null +++ b/_sources/siriushla.li_pu_modltr.rst.txt @@ -0,0 +1,29 @@ +siriushla.li\_pu\_modltr +======================== + +Code Documentation +------------------ + +siriushla.li\_pu\_modltr.auxiliary\_dialogs module +-------------------------------------------------- + +.. automodule:: siriushla.li_pu_modltr.auxiliary_dialogs + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_pu\_modltr.main module +------------------------------------ + +.. automodule:: siriushla.li_pu_modltr.main + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.li_pu_modltr + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.li_rf_llrf.rst.txt b/_sources/siriushla.li_rf_llrf.rst.txt new file mode 100644 index 000000000..e739bc376 --- /dev/null +++ b/_sources/siriushla.li_rf_llrf.rst.txt @@ -0,0 +1,69 @@ +siriushla.li\_rf\_llrf +====================== + +Code Documentation +------------------ + +siriushla.li\_rf\_llrf.chart module +----------------------------------- + +.. automodule:: siriushla.li_rf_llrf.chart + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_rf\_llrf.controls module +-------------------------------------- + +.. automodule:: siriushla.li_rf_llrf.controls + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_rf\_llrf.details module +------------------------------------- + +.. automodule:: siriushla.li_rf_llrf.details + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_rf\_llrf.main module +---------------------------------- + +.. automodule:: siriushla.li_rf_llrf.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_rf\_llrf.motor\_control module +-------------------------------------------- + +.. automodule:: siriushla.li_rf_llrf.motor_control + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_rf\_llrf.util module +---------------------------------- + +.. automodule:: siriushla.li_rf_llrf.util + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_rf\_llrf.widgets module +------------------------------------- + +.. automodule:: siriushla.li_rf_llrf.widgets + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.li_rf_llrf + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.li_va_control.rst.txt b/_sources/siriushla.li_va_control.rst.txt new file mode 100644 index 000000000..27127983c --- /dev/null +++ b/_sources/siriushla.li_va_control.rst.txt @@ -0,0 +1,61 @@ +siriushla.li\_va\_control +========================= + +Code Documentation +------------------ + +siriushla.li\_va\_control.chart module +-------------------------------------- + +.. automodule:: siriushla.li_va_control.chart + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_va\_control.details module +---------------------------------------- + +.. automodule:: siriushla.li_va_control.details + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_va\_control.functions module +------------------------------------------ + +.. automodule:: siriushla.li_va_control.functions + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_va\_control.main module +------------------------------------- + +.. automodule:: siriushla.li_va_control.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_va\_control.util module +------------------------------------- + +.. automodule:: siriushla.li_va_control.util + :members: + :undoc-members: + :show-inheritance: + +siriushla.li\_va\_control.widgets module +---------------------------------------- + +.. automodule:: siriushla.li_va_control.widgets + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.li_va_control + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.rst.txt b/_sources/siriushla.rst.txt new file mode 100644 index 000000000..9b2b55eb7 --- /dev/null +++ b/_sources/siriushla.rst.txt @@ -0,0 +1,18 @@ +Sirius HLA +========== + +siriushla.sirius\_application module +------------------------------------ + +.. automodule:: siriushla.sirius_application + :members: + :undoc-members: + :show-inheritance: + +siriushla.util module +--------------------- + +.. automodule:: siriushla.util + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.si_ap_fofb.rst.txt b/_sources/siriushla.si_ap_fofb.rst.txt new file mode 100644 index 000000000..728316cba --- /dev/null +++ b/_sources/siriushla.si_ap_fofb.rst.txt @@ -0,0 +1,61 @@ +siriushla.si\_ap\_fofb +====================== + +Code Documentation +------------------ + +siriushla.si\_ap\_fofb.base module +---------------------------------- + +.. automodule:: siriushla.si_ap_fofb.base + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_ap\_fofb.custom\_widgets module +--------------------------------------------- + +.. automodule:: siriushla.si_ap_fofb.custom_widgets + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_ap\_fofb.graphics module +-------------------------------------- + +.. automodule:: siriushla.si_ap_fofb.graphics + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_ap\_fofb.main module +---------------------------------- + +.. automodule:: siriushla.si_ap_fofb.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_ap\_fofb.respmat module +------------------------------------- + +.. automodule:: siriushla.si_ap_fofb.respmat + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_ap\_fofb.trig\_acq\_config module +----------------------------------------------- + +.. automodule:: siriushla.si_ap_fofb.trig_acq_config + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.si_ap_fofb + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.si_ap_genstatus.rst.txt b/_sources/siriushla.si_ap_genstatus.rst.txt new file mode 100644 index 000000000..f7f670f76 --- /dev/null +++ b/_sources/siriushla.si_ap_genstatus.rst.txt @@ -0,0 +1,21 @@ +siriushla.si\_ap\_genstatus +=========================== + +Code Documentation +------------------ + +siriushla.si\_ap\_genstatus.main module +--------------------------------------- + +.. automodule:: siriushla.si_ap_genstatus.main + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.si_ap_genstatus + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.si_ap_idff.rst.txt b/_sources/siriushla.si_ap_idff.rst.txt new file mode 100644 index 000000000..ad829dc39 --- /dev/null +++ b/_sources/siriushla.si_ap_idff.rst.txt @@ -0,0 +1,37 @@ +siriushla.si\_ap\_idff +====================== + +Code Documentation +------------------ + +siriushla.si\_ap\_idff.custom\_widgets module +--------------------------------------------- + +.. automodule:: siriushla.si_ap_idff.custom_widgets + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_ap\_idff.main module +---------------------------------- + +.. automodule:: siriushla.si_ap_idff.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_ap\_idff.util module +---------------------------------- + +.. automodule:: siriushla.si_ap_idff.util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.si_ap_idff + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.si_ap_orbintlk.rst.txt b/_sources/siriushla.si_ap_orbintlk.rst.txt new file mode 100644 index 000000000..1d0520631 --- /dev/null +++ b/_sources/siriushla.si_ap_orbintlk.rst.txt @@ -0,0 +1,53 @@ +siriushla.si\_ap\_orbintlk +========================== + +Code Documentation +------------------ + +siriushla.si\_ap\_orbintlk.base module +-------------------------------------- + +.. automodule:: siriushla.si_ap_orbintlk.base + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_ap\_orbintlk.bpmdetail module +------------------------------------------- + +.. automodule:: siriushla.si_ap_orbintlk.bpmdetail + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_ap\_orbintlk.custom\_widgets module +------------------------------------------------- + +.. automodule:: siriushla.si_ap_orbintlk.custom_widgets + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_ap\_orbintlk.graphics module +------------------------------------------ + +.. automodule:: siriushla.si_ap_orbintlk.graphics + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_ap\_orbintlk.main module +-------------------------------------- + +.. automodule:: siriushla.si_ap_orbintlk.main + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.si_ap_orbintlk + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.si_di_bbb.rst.txt b/_sources/siriushla.si_di_bbb.rst.txt new file mode 100644 index 000000000..c7e636109 --- /dev/null +++ b/_sources/siriushla.si_di_bbb.rst.txt @@ -0,0 +1,117 @@ +siriushla.si\_di\_bbb +===================== + +Code Documentation +------------------ + +siriushla.si\_di\_bbb.acquisition module +---------------------------------------- + +.. automodule:: siriushla.si_di_bbb.acquisition + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_di\_bbb.advanced\_settings module +----------------------------------------------- + +.. automodule:: siriushla.si_di_bbb.advanced_settings + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_di\_bbb.bbb module +-------------------------------- + +.. automodule:: siriushla.si_di_bbb.bbb + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_di\_bbb.coefficients module +----------------------------------------- + +.. automodule:: siriushla.si_di_bbb.coefficients + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_di\_bbb.custom\_widgets module +-------------------------------------------- + +.. automodule:: siriushla.si_di_bbb.custom_widgets + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_di\_bbb.drive module +---------------------------------- + +.. automodule:: siriushla.si_di_bbb.drive + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_di\_bbb.environment module +---------------------------------------- + +.. automodule:: siriushla.si_di_bbb.environment + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_di\_bbb.gpio module +--------------------------------- + +.. automodule:: siriushla.si_di_bbb.gpio + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_di\_bbb.main module +--------------------------------- + +.. automodule:: siriushla.si_di_bbb.main + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_di\_bbb.masks module +---------------------------------- + +.. automodule:: siriushla.si_di_bbb.masks + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_di\_bbb.pwr\_amps module +-------------------------------------- + +.. automodule:: siriushla.si_di_bbb.pwr_amps + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_di\_bbb.timing module +----------------------------------- + +.. automodule:: siriushla.si_di_bbb.timing + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_di\_bbb.util module +--------------------------------- + +.. automodule:: siriushla.si_di_bbb.util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.si_di_bbb + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.si_di_equalize_bpms.rst.txt b/_sources/siriushla.si_di_equalize_bpms.rst.txt new file mode 100644 index 000000000..e6fda1f8b --- /dev/null +++ b/_sources/siriushla.si_di_equalize_bpms.rst.txt @@ -0,0 +1,21 @@ +siriushla.si\_di\_equalize\_bpms +================================ + +Code Documentation +------------------ + +siriushla.si\_di\_equalize\_bpms.main module +-------------------------------------------- + +.. automodule:: siriushla.si_di_equalize_bpms.main + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.si_di_equalize_bpms + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.si_di_scraps.rst.txt b/_sources/siriushla.si_di_scraps.rst.txt new file mode 100644 index 000000000..402065287 --- /dev/null +++ b/_sources/siriushla.si_di_scraps.rst.txt @@ -0,0 +1,21 @@ +siriushla.si\_di\_scraps +======================== + +Code Documentation +------------------ + +siriushla.si\_di\_scraps.Scrap\_monitor module +---------------------------------------------- + +.. automodule:: siriushla.si_di_scraps.Scrap_monitor + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.si_di_scraps + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.si_id_control.rst.txt b/_sources/siriushla.si_id_control.rst.txt new file mode 100644 index 000000000..66ae26e9b --- /dev/null +++ b/_sources/siriushla.si_id_control.rst.txt @@ -0,0 +1,69 @@ +siriushla.si\_id\_control +========================= + +Code Documentation +------------------ + +siriushla.si\_id\_control.apu module +------------------------------------ + +.. automodule:: siriushla.si_id_control.apu + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_id\_control.base module +------------------------------------- + +.. automodule:: siriushla.si_id_control.base + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_id\_control.delta module +-------------------------------------- + +.. automodule:: siriushla.si_id_control.delta + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_id\_control.epu module +------------------------------------ + +.. automodule:: siriushla.si_id_control.epu + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_id\_control.id\_control module +-------------------------------------------- + +.. automodule:: siriushla.si_id_control.id_control + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_id\_control.papu module +------------------------------------- + +.. automodule:: siriushla.si_id_control.papu + :members: + :undoc-members: + :show-inheritance: + +siriushla.si\_id\_control.util module +------------------------------------- + +.. automodule:: siriushla.si_id_control.util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.si_id_control + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.tb_di_slits.rst.txt b/_sources/siriushla.tb_di_slits.rst.txt new file mode 100644 index 000000000..a13db1d12 --- /dev/null +++ b/_sources/siriushla.tb_di_slits.rst.txt @@ -0,0 +1,21 @@ +siriushla.tb\_di\_slits +======================= + +Code Documentation +------------------ + +siriushla.tb\_di\_slits.Slit\_monitor module +-------------------------------------------- + +.. automodule:: siriushla.tb_di_slits.Slit_monitor + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.tb_di_slits + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.widgets.dialog.rst.txt b/_sources/siriushla.widgets.dialog.rst.txt new file mode 100644 index 000000000..6800fa65b --- /dev/null +++ b/_sources/siriushla.widgets.dialog.rst.txt @@ -0,0 +1,45 @@ +siriushla.widgets.dialog +======================== + +Code Documentation +------------------ + +siriushla.widgets.dialog.progress\_dialog module +------------------------------------------------ + +.. automodule:: siriushla.widgets.dialog.progress_dialog + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.dialog.ps\_status\_dialog module +-------------------------------------------------- + +.. automodule:: siriushla.widgets.dialog.ps_status_dialog + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.dialog.pv\_status\_dialog module +-------------------------------------------------- + +.. automodule:: siriushla.widgets.dialog.pv_status_dialog + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.dialog.report\_dialog module +---------------------------------------------- + +.. automodule:: siriushla.widgets.dialog.report_dialog + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.widgets.dialog + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/siriushla.widgets.rst.txt b/_sources/siriushla.widgets.rst.txt new file mode 100644 index 000000000..13ca55ce0 --- /dev/null +++ b/_sources/siriushla.widgets.rst.txt @@ -0,0 +1,293 @@ +Widgets +======= + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + siriushla.widgets.dialog + +Code Documentation +------------------ + +siriushla.widgets.QDoubleScrollBar module +----------------------------------------- + +.. automodule:: siriushla.widgets.QDoubleScrollBar + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.QLed module +----------------------------- + +.. automodule:: siriushla.widgets.QLed + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.QSpinBoxPlus module +------------------------------------- + +.. automodule:: siriushla.widgets.QSpinBoxPlus + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.bar\_graph module +----------------------------------- + +.. automodule:: siriushla.widgets.bar_graph + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.detachable\_tabwidget module +---------------------------------------------- + +.. automodule:: siriushla.widgets.detachable_tabwidget + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.enum\_combo\_box module +----------------------------------------- + +.. automodule:: siriushla.widgets.enum_combo_box + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.frame module +------------------------------ + +.. automodule:: siriushla.widgets.frame + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.horizontal\_ruler module +------------------------------------------ + +.. automodule:: siriushla.widgets.horizontal_ruler + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.label module +------------------------------ + +.. automodule:: siriushla.widgets.label + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.led module +---------------------------- + +.. automodule:: siriushla.widgets.led + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.ledit\_scrollbar module +----------------------------------------- + +.. automodule:: siriushla.widgets.ledit_scrollbar + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.line\_edit module +----------------------------------- + +.. automodule:: siriushla.widgets.line_edit + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.loading\_dialog module +---------------------------------------- + +.. automodule:: siriushla.widgets.loading_dialog + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.log\_display module +------------------------------------- + +.. automodule:: siriushla.widgets.log_display + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.log\_label module +----------------------------------- + +.. automodule:: siriushla.widgets.log_label + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.matplotlib module +----------------------------------- + +.. automodule:: siriushla.widgets.matplotlib + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.process\_image module +--------------------------------------- + +.. automodule:: siriushla.widgets.process_image + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.pushbutton module +----------------------------------- + +.. automodule:: siriushla.widgets.pushbutton + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.pvnames\_tree module +-------------------------------------- + +.. automodule:: siriushla.widgets.pvnames_tree + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.qtplugins module +---------------------------------- + +.. automodule:: siriushla.widgets.qtplugins + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.relative\_widget module +----------------------------------------- + +.. automodule:: siriushla.widgets.relative_widget + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.scrollbar module +---------------------------------- + +.. automodule:: siriushla.widgets.scrollbar + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.selection\_matrix module +------------------------------------------ + +.. automodule:: siriushla.widgets.selection_matrix + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.signal\_channel module +---------------------------------------- + +.. automodule:: siriushla.widgets.signal_channel + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.spectrogram\_view module +------------------------------------------ + +.. automodule:: siriushla.widgets.spectrogram_view + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.spinbox module +-------------------------------- + +.. automodule:: siriushla.widgets.spinbox + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.spinbox\_scrollbar module +------------------------------------------- + +.. automodule:: siriushla.widgets.spinbox_scrollbar + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.state\_button module +-------------------------------------- + +.. automodule:: siriushla.widgets.state_button + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.string\_combo\_box module +------------------------------------------- + +.. automodule:: siriushla.widgets.string_combo_box + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.timeplot module +--------------------------------- + +.. automodule:: siriushla.widgets.timeplot + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.waveformplot module +------------------------------------- + +.. automodule:: siriushla.widgets.waveformplot + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.waveformtable module +-------------------------------------- + +.. automodule:: siriushla.widgets.waveformtable + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.widget\_factory module +---------------------------------------- + +.. automodule:: siriushla.widgets.widget_factory + :members: + :undoc-members: + :show-inheritance: + +siriushla.widgets.windows module +-------------------------------- + +.. automodule:: siriushla.widgets.windows + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: siriushla.widgets + :members: + :undoc-members: + :show-inheritance: diff --git a/_static/_sphinx_javascript_frameworks_compat.js b/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 000000000..81415803e --- /dev/null +++ b/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,123 @@ +/* Compatability shim for jQuery and underscores.js. + * + * Copyright Sphinx contributors + * Released under the two clause BSD licence + */ + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} diff --git a/_static/basic.css b/_static/basic.css new file mode 100644 index 000000000..30fee9d0f --- /dev/null +++ b/_static/basic.css @@ -0,0 +1,925 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/_static/css/badge_only.css b/_static/css/badge_only.css new file mode 100644 index 000000000..c718cee44 --- /dev/null +++ b/_static/css/badge_only.css @@ -0,0 +1 @@ +.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} \ No newline at end of file diff --git a/_static/css/fonts/Roboto-Slab-Bold.woff b/_static/css/fonts/Roboto-Slab-Bold.woff new file mode 100644 index 000000000..6cb600001 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Bold.woff differ diff --git a/_static/css/fonts/Roboto-Slab-Bold.woff2 b/_static/css/fonts/Roboto-Slab-Bold.woff2 new file mode 100644 index 000000000..7059e2314 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Bold.woff2 differ diff --git a/_static/css/fonts/Roboto-Slab-Regular.woff b/_static/css/fonts/Roboto-Slab-Regular.woff new file mode 100644 index 000000000..f815f63f9 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Regular.woff differ diff --git a/_static/css/fonts/Roboto-Slab-Regular.woff2 b/_static/css/fonts/Roboto-Slab-Regular.woff2 new file mode 100644 index 000000000..f2c76e5bd Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Regular.woff2 differ diff --git a/_static/css/fonts/fontawesome-webfont.eot b/_static/css/fonts/fontawesome-webfont.eot new file mode 100644 index 000000000..e9f60ca95 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.eot differ diff --git a/_static/css/fonts/fontawesome-webfont.svg b/_static/css/fonts/fontawesome-webfont.svg new file mode 100644 index 000000000..855c845e5 --- /dev/null +++ b/_static/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_static/css/fonts/fontawesome-webfont.ttf b/_static/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 000000000..35acda2fa Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.ttf differ diff --git a/_static/css/fonts/fontawesome-webfont.woff b/_static/css/fonts/fontawesome-webfont.woff new file mode 100644 index 000000000..400014a4b Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.woff differ diff --git a/_static/css/fonts/fontawesome-webfont.woff2 b/_static/css/fonts/fontawesome-webfont.woff2 new file mode 100644 index 000000000..4d13fc604 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.woff2 differ diff --git a/_static/css/fonts/lato-bold-italic.woff b/_static/css/fonts/lato-bold-italic.woff new file mode 100644 index 000000000..88ad05b9f Binary files /dev/null and b/_static/css/fonts/lato-bold-italic.woff differ diff --git a/_static/css/fonts/lato-bold-italic.woff2 b/_static/css/fonts/lato-bold-italic.woff2 new file mode 100644 index 000000000..c4e3d804b Binary files /dev/null and b/_static/css/fonts/lato-bold-italic.woff2 differ diff --git a/_static/css/fonts/lato-bold.woff b/_static/css/fonts/lato-bold.woff new file mode 100644 index 000000000..c6dff51f0 Binary files /dev/null and b/_static/css/fonts/lato-bold.woff differ diff --git a/_static/css/fonts/lato-bold.woff2 b/_static/css/fonts/lato-bold.woff2 new file mode 100644 index 000000000..bb195043c Binary files /dev/null and b/_static/css/fonts/lato-bold.woff2 differ diff --git a/_static/css/fonts/lato-normal-italic.woff b/_static/css/fonts/lato-normal-italic.woff new file mode 100644 index 000000000..76114bc03 Binary files /dev/null and b/_static/css/fonts/lato-normal-italic.woff differ diff --git a/_static/css/fonts/lato-normal-italic.woff2 b/_static/css/fonts/lato-normal-italic.woff2 new file mode 100644 index 000000000..3404f37e2 Binary files /dev/null and b/_static/css/fonts/lato-normal-italic.woff2 differ diff --git a/_static/css/fonts/lato-normal.woff b/_static/css/fonts/lato-normal.woff new file mode 100644 index 000000000..ae1307ff5 Binary files /dev/null and b/_static/css/fonts/lato-normal.woff differ diff --git a/_static/css/fonts/lato-normal.woff2 b/_static/css/fonts/lato-normal.woff2 new file mode 100644 index 000000000..3bf984332 Binary files /dev/null and b/_static/css/fonts/lato-normal.woff2 differ diff --git a/_static/css/theme.css b/_static/css/theme.css new file mode 100644 index 000000000..19a446a0e --- /dev/null +++ b/_static/css/theme.css @@ -0,0 +1,4 @@ +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs>li{display:inline-block;padding-top:5px}.wy-breadcrumbs>li.wy-breadcrumbs-aside{float:right}.rst-content .wy-breadcrumbs>li code,.rst-content .wy-breadcrumbs>li tt,.wy-breadcrumbs>li .rst-content tt,.wy-breadcrumbs>li code{all:inherit;color:inherit}.breadcrumb-item:before{content:"/";color:#bbb;font-size:13px;padding:0 6px 0 3px}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search>a:hover{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.version{margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content p a{overflow-wrap:anywhere}.rst-content .wy-table td p,.rst-content .wy-table td ul,.rst-content .wy-table th p,.rst-content .wy-table th ul,.rst-content table.docutils td p,.rst-content table.docutils td ul,.rst-content table.docutils th p,.rst-content table.docutils th ul,.rst-content table.field-list td p,.rst-content table.field-list td ul,.rst-content table.field-list th p,.rst-content table.field-list th ul{font-size:inherit}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .citation-reference>span.fn-bracket,.rst-content .footnote-reference>span.fn-bracket{display:none}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:" : "}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:auto minmax(80%,95%)}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{display:inline-grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{display:grid;grid-template-columns:auto auto minmax(.65rem,auto) minmax(40%,95%)}html.writer-html5 .rst-content aside.citation>span.label,html.writer-html5 .rst-content aside.footnote>span.label,html.writer-html5 .rst-content div.citation>span.label{grid-column-start:1;grid-column-end:2}html.writer-html5 .rst-content aside.citation>span.backrefs,html.writer-html5 .rst-content aside.footnote>span.backrefs,html.writer-html5 .rst-content div.citation>span.backrefs{grid-column-start:2;grid-column-end:3;grid-row-start:1;grid-row-end:3}html.writer-html5 .rst-content aside.citation>p,html.writer-html5 .rst-content aside.footnote>p,html.writer-html5 .rst-content div.citation>p{grid-column-start:4;grid-column-end:5}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{margin-bottom:24px}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.citation>dt>span.brackets:before,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.citation>dt>span.brackets:after,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a{word-break:keep-all}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a:not(:first-child):before,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.citation>dd p,html.writer-html5 .rst-content dl.footnote>dd p{font-size:.9rem}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{padding-left:1rem;padding-right:1rem;font-size:.9rem;line-height:1.2rem}html.writer-html5 .rst-content aside.citation p,html.writer-html5 .rst-content aside.footnote p,html.writer-html5 .rst-content div.citation p{font-size:.9rem;line-height:1.2rem;margin-bottom:12px}html.writer-html5 .rst-content aside.citation span.backrefs,html.writer-html5 .rst-content aside.footnote span.backrefs,html.writer-html5 .rst-content div.citation span.backrefs{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content aside.citation span.backrefs>a,html.writer-html5 .rst-content aside.footnote span.backrefs>a,html.writer-html5 .rst-content div.citation span.backrefs>a{word-break:keep-all}html.writer-html5 .rst-content aside.citation span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content aside.footnote span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content div.citation span.backrefs>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content aside.citation span.label,html.writer-html5 .rst-content aside.footnote span.label,html.writer-html5 .rst-content div.citation span.label{line-height:1.2rem}html.writer-html5 .rst-content aside.citation-list,html.writer-html5 .rst-content aside.footnote-list,html.writer-html5 .rst-content div.citation-list{margin-bottom:24px}html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content aside.footnote-list aside.footnote,html.writer-html5 .rst-content div.citation-list>div.citation,html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content aside.footnote-list aside.footnote code,html.writer-html5 .rst-content aside.footnote-list aside.footnote tt,html.writer-html5 .rst-content aside.footnote code,html.writer-html5 .rst-content aside.footnote tt,html.writer-html5 .rst-content div.citation-list>div.citation code,html.writer-html5 .rst-content div.citation-list>div.citation tt,html.writer-html5 .rst-content dl.citation code,html.writer-html5 .rst-content dl.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040;overflow-wrap:normal}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}.rst-content dl dd>ol:last-child,.rst-content dl dd>p:last-child,.rst-content dl dd>table:last-child,.rst-content dl dd>ul:last-child{margin-bottom:0}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel,.rst-content .menuselection{font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content .guilabel,.rst-content .menuselection{border:1px solid #7fbbe3;background:#e7f2fa}.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>.kbd,.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>kbd{color:inherit;font-size:80%;background-color:#fff;border:1px solid #a6a6a6;border-radius:4px;box-shadow:0 2px grey;padding:2.4px 6px;margin:auto 0}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block} \ No newline at end of file diff --git a/_static/doctools.js b/_static/doctools.js new file mode 100644 index 000000000..d06a71d75 --- /dev/null +++ b/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/_static/documentation_options.js b/_static/documentation_options.js new file mode 100644 index 000000000..b50c75eea --- /dev/null +++ b/_static/documentation_options.js @@ -0,0 +1,13 @@ +const DOCUMENTATION_OPTIONS = { + VERSION: '1.6.0', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/_static/file.png b/_static/file.png new file mode 100644 index 000000000..a858a410e Binary files /dev/null and b/_static/file.png differ diff --git a/_static/jquery.js b/_static/jquery.js new file mode 100644 index 000000000..c4c6022f2 --- /dev/null +++ b/_static/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/_static/js/html5shiv.min.js b/_static/js/html5shiv.min.js new file mode 100644 index 000000000..cd1c674f5 --- /dev/null +++ b/_static/js/html5shiv.min.js @@ -0,0 +1,4 @@ +/** +* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/_static/js/theme.js b/_static/js/theme.js new file mode 100644 index 000000000..1fddb6ee4 --- /dev/null +++ b/_static/js/theme.js @@ -0,0 +1 @@ +!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/_static/minus.png b/_static/minus.png new file mode 100644 index 000000000..d96755fda Binary files /dev/null and b/_static/minus.png differ diff --git a/_static/plus.png b/_static/plus.png new file mode 100644 index 000000000..7107cec93 Binary files /dev/null and b/_static/plus.png differ diff --git a/_static/pygments.css b/_static/pygments.css new file mode 100644 index 000000000..6f8b210a1 --- /dev/null +++ b/_static/pygments.css @@ -0,0 +1,75 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #F00 } /* Error */ +.highlight .k { color: #008000; font-weight: bold } /* Keyword */ +.highlight .o { color: #666 } /* Operator */ +.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #9C6500 } /* Comment.Preproc */ +.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.highlight .gr { color: #E40000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #008400 } /* Generic.Inserted */ +.highlight .go { color: #717171 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #04D } /* Generic.Traceback */ +.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #008000 } /* Keyword.Pseudo */ +.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #B00040 } /* Keyword.Type */ +.highlight .m { color: #666 } /* Literal.Number */ +.highlight .s { color: #BA2121 } /* Literal.String */ +.highlight .na { color: #687822 } /* Name.Attribute */ +.highlight .nb { color: #008000 } /* Name.Builtin */ +.highlight .nc { color: #00F; font-weight: bold } /* Name.Class */ +.highlight .no { color: #800 } /* Name.Constant */ +.highlight .nd { color: #A2F } /* Name.Decorator */ +.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #00F } /* Name.Function */ +.highlight .nl { color: #767600 } /* Name.Label */ +.highlight .nn { color: #00F; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #19177C } /* Name.Variable */ +.highlight .ow { color: #A2F; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #BBB } /* Text.Whitespace */ +.highlight .mb { color: #666 } /* Literal.Number.Bin */ +.highlight .mf { color: #666 } /* Literal.Number.Float */ +.highlight .mh { color: #666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666 } /* Literal.Number.Oct */ +.highlight .sa { color: #BA2121 } /* Literal.String.Affix */ +.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ +.highlight .sc { color: #BA2121 } /* Literal.String.Char */ +.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ +.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ +.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #A45A77 } /* Literal.String.Regex */ +.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ +.highlight .ss { color: #19177C } /* Literal.String.Symbol */ +.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #00F } /* Name.Function.Magic */ +.highlight .vc { color: #19177C } /* Name.Variable.Class */ +.highlight .vg { color: #19177C } /* Name.Variable.Global */ +.highlight .vi { color: #19177C } /* Name.Variable.Instance */ +.highlight .vm { color: #19177C } /* Name.Variable.Magic */ +.highlight .il { color: #666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/_static/searchtools.js b/_static/searchtools.js new file mode 100644 index 000000000..7918c3fab --- /dev/null +++ b/_static/searchtools.js @@ -0,0 +1,574 @@ +/* + * searchtools.js + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for the full-text search. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _displayItem = (item, searchTerms, highlightTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; + + const [docName, title, anchor, descr, score, _filename] = item; + + let listItem = document.createElement("li"); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = contentRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = contentRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = title; + if (descr) { + listItem.appendChild(document.createElement("span")).innerHTML = + " (" + descr + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms) + ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." + ); + else + Search.status.innerText = _( + `Search finished, found ${resultCount} page(s) matching the search query.` + ); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms, + highlightTerms, +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms, highlightTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), + 5 + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter(term => term) // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent !== undefined) return docContent.textContent; + console.warn( + "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + /** + * execute search (requires search index to be loaded) + */ + query: (query) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords array is from language_data.js + if ( + stopwords.indexOf(queryTermLower) !== -1 || + queryTerm.match(/^\d+$/) + ) + return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + // array of [docname, title, anchor, descr, score, filename] + let results = []; + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + let score = Math.round(100 * queryLower.length / title.length) + results.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id] of foundEntries) { + let score = Math.round(100 * queryLower.length / entry.length) + results.push([ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // lookup as object + objectTerms.forEach((term) => + results.push(...Search.performObjectSearch(term, objectTerms)) + ); + + // lookup as search terms in fulltext + results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); + + // now sort the results by score (in opposite order of appearance, since the + // display function below uses pop() to retrieve items) and then + // alphabetically + results.sort((a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; + }); + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + results = results.reverse(); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms, highlightTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4] + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => + objectSearchCallback(prefix, array) + ) + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + const arr = [ + { files: terms[word], score: Scorer.term }, + { files: titleTerms[word], score: Scorer.title }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord) && !terms[word]) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord) && !titleTerms[word]) + arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); + }); + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, {}); + scoreMap.get(file)[word] = record.score; + }); + }); + + // create the mapping + files.forEach((file) => { + if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) + fileMap.get(file).push(word); + else fileMap.set(file, [word]); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2 + ).length; + if ( + wordList.length !== searchTerms.size && + wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file || + titleTerms[term] === file || + (terms[term] || []).includes(file) || + (titleTerms[term] || []).includes(file) + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords) => { + const text = Search.htmlToText(htmlText); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/_static/sphinx_highlight.js b/_static/sphinx_highlight.js new file mode 100644 index 000000000..8a96c69a1 --- /dev/null +++ b/_static/sphinx_highlight.js @@ -0,0 +1,154 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); + parent.insertBefore( + span, + parent.insertBefore( + rest, + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/genindex.html b/genindex.html new file mode 100644 index 000000000..13240b3ab --- /dev/null +++ b/genindex.html @@ -0,0 +1,7091 @@ + + + + + + Index — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + +

Index

+ +
+ A + | B + | C + | D + | E + | F + | G + | H + | I + | J + | K + | L + | M + | N + | O + | P + | Q + | R + | S + | T + | U + | V + | W + | X + | Y + +
+

A

+ + + +
+ +

B

+ + + +
+ +

C

+ + + +
+ +

D

+ + + +
+ +

E

+ + + +
+ +

F

+ + +
+ +

G

+ + + +
+ +

H

+ + + +
+ +

I

+ + + +
+ +

J

+ + +
+ +

K

+ + + +
+ +

L

+ + + +
+ +

M

+ + + +
+ +

N

+ + + +
+ +

O

+ + + +
+ +

P

+ + + +
+ +

Q

+ + + +
+ +

R

+ + + +
+ +

S

+ + + +
+ +

T

+ + + +
+ +

U

+ + + +
+ +

V

+ + + +
+ +

W

+ + + +
+ +

X

+ + + +
+ +

Y

+ + + +
+ + + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 000000000..b4b2cd20a --- /dev/null +++ b/index.html @@ -0,0 +1,586 @@ + + + + + + + Welcome to Sirius HLA’s documentation! — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Welcome to Sirius HLA’s documentation!

+

SiriusHLA.

+
+

GUIs:

+ +
+
+

Widgets:

+ +
+
+

Source Code:

+ +
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/objects.inv b/objects.inv new file mode 100644 index 000000000..d09f03675 Binary files /dev/null and b/objects.inv differ diff --git a/py-modindex.html b/py-modindex.html new file mode 100644 index 000000000..44dc50b39 --- /dev/null +++ b/py-modindex.html @@ -0,0 +1,1696 @@ + + + + + + Python Module Index — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Python Module Index

+ +
+ s +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ s
+ siriushla +
    + siriushla.as_ap_configdb +
    + siriushla.as_ap_configdb.client_configdb +
    + siriushla.as_ap_configdb.configdialogs +
    + siriushla.as_ap_configdb.configwidgets +
    + siriushla.as_ap_configdb.models +
    + siriushla.as_ap_configdb.models.config_db_table_model +
    + siriushla.as_ap_configdb.models.config_names_model +
    + siriushla.as_ap_configdb.models.config_types_model +
    + siriushla.as_ap_configdb.models.pv_configuration_model +
    + siriushla.as_ap_configdb.normconfigs +
    + siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow +
    + siriushla.as_ap_configdb.normconfigs.ConfigModel +
    + siriushla.as_ap_configdb.normconfigs.LoadingThread +
    + siriushla.as_ap_configdb.normconfigs.TuneDlg +
    + siriushla.as_ap_configdb.pvsconfigs +
    + siriushla.as_ap_configdb.pvsconfigs.delegate +
    + siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate +
    + siriushla.as_ap_configdb.pvsconfigs.load_and_apply +
    + siriushla.as_ap_configdb.pvsconfigs.main +
    + siriushla.as_ap_configdb.pvsconfigs.read_and_save +
    + siriushla.as_ap_currinfo +
    + siriushla.as_ap_currinfo.charge_monitor +
    + siriushla.as_ap_currinfo.current_and_lifetime +
    + siriushla.as_ap_currinfo.efficiency_monitor +
    + siriushla.as_ap_energybutton +
    + siriushla.as_ap_energybutton.energy_button +
    + siriushla.as_ap_energybutton.energy_setter_window +
    + siriushla.as_ap_energybutton.set_energy +
    + siriushla.as_ap_injcontrol +
    + siriushla.as_ap_injcontrol.base +
    + siriushla.as_ap_injcontrol.injbo +
    + siriushla.as_ap_injcontrol.tbts +
    + siriushla.as_ap_injection +
    + siriushla.as_ap_injection.auxiliary_dialogs +
    + siriushla.as_ap_injection.killbeam_widgets +
    + siriushla.as_ap_injection.main +
    + siriushla.as_ap_injection.widgets +
    + siriushla.as_ap_launcher +
    + siriushla.as_ap_launcher.main +
    + siriushla.as_ap_launcher.menu +
    + siriushla.as_ap_machshift +
    + siriushla.as_ap_machshift.widgets +
    + siriushla.as_ap_macreport +
    + siriushla.as_ap_macreport.main +
    + siriushla.as_ap_magoffconv +
    + siriushla.as_ap_magoffconv.main +
    + siriushla.as_ap_measure.energy_meas +
    + siriushla.as_ap_monitor +
    + siriushla.as_ap_monitor.main +
    + siriushla.as_ap_monitor.util +
    + siriushla.as_ap_opticscorr +
    + siriushla.as_ap_opticscorr.custom_widgets +
    + siriushla.as_ap_opticscorr.details +
    + siriushla.as_ap_opticscorr.main +
    + siriushla.as_ap_posang +
    + siriushla.as_ap_posang.HLPosAng +
    + siriushla.as_ap_rabpmmon.util +
    + siriushla.as_ap_radmon +
    + siriushla.as_ap_radmon.main +
    + siriushla.as_ap_sofb +
    + siriushla.as_ap_sofb.graphics +
    + siriushla.as_ap_sofb.graphics.base +
    + siriushla.as_ap_sofb.graphics.correctors +
    + siriushla.as_ap_sofb.graphics.orbit +
    + siriushla.as_ap_sofb.graphics.respmat +
    + siriushla.as_ap_sofb.ioc_control +
    + siriushla.as_ap_sofb.ioc_control.base +
    + siriushla.as_ap_sofb.ioc_control.drive_window +
    + siriushla.as_ap_sofb.ioc_control.kicks_config +
    + siriushla.as_ap_sofb.ioc_control.main +
    + siriushla.as_ap_sofb.ioc_control.orbit_acquisition +
    + siriushla.as_ap_sofb.ioc_control.respmat +
    + siriushla.as_ap_sofb.ioc_control.respmat_enbllist +
    + siriushla.as_ap_sofb.ioc_control.status +
    + siriushla.as_ap_sofb.main +
    + siriushla.as_ap_sofb.orbit_register +
    + siriushla.as_di_bpms +
    + siriushla.as_di_bpms.base +
    + siriushla.as_di_bpms.list_bpms +
    + siriushla.as_di_bpms.main +
    + siriushla.as_di_bpms.monit +
    + siriushla.as_di_bpms.settings +
    + siriushla.as_di_bpms.trig_acq_config +
    + siriushla.as_di_dccts +
    + siriushla.as_di_dccts.graphics +
    + siriushla.as_di_dccts.main +
    + siriushla.as_di_dccts.settings +
    + siriushla.as_di_icts +
    + siriushla.as_di_icts.ICT_monitor +
    + siriushla.as_di_scrns +
    + siriushla.as_di_scrns.list_scrns +
    + siriushla.as_di_scrns.main +
    + siriushla.as_di_scrns.scrn_calib +
    + siriushla.as_di_scrns.scrn_details +
    + siriushla.as_di_tune +
    + siriushla.as_di_tune.controls +
    + siriushla.as_di_tune.details +
    + siriushla.as_di_tune.main +
    + siriushla.as_di_tune.spectra +
    + siriushla.as_di_tune.spectrogram +
    + siriushla.as_di_tune.util +
    + siriushla.as_di_vlight +
    + siriushla.as_di_vlight.main +
    + siriushla.as_ps_commands +
    + siriushla.as_ps_commands.main +
    + siriushla.as_ps_commands.tasks +
    + siriushla.as_ps_control +
    + siriushla.as_ps_control.control_widget +
    + siriushla.as_ps_control.control_widget.BasePSControlWidget +
    + siriushla.as_ps_control.control_widget.ControlWidgetFactory +
    + siriushla.as_ps_control.control_widget.DipoleControlWidget +
    + siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget +
    + siriushla.as_ps_control.control_widget.FamSextupoleControlWidget +
    + siriushla.as_ps_control.control_widget.FastCorrectorControlWidget +
    + siriushla.as_ps_control.control_widget.IDFFCorrectorControlWidget +
    + siriushla.as_ps_control.control_widget.LensControlWidget +
    + siriushla.as_ps_control.control_widget.SeptFFCorrectorControlWidget +
    + siriushla.as_ps_control.control_widget.SkewQuadControlWidget +
    + siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget +
    + siriushla.as_ps_control.control_widget.SolenoidControlWidget +
    + siriushla.as_ps_control.control_widget.TrimAllControlWidget +
    + siriushla.as_ps_control.control_widget.TrimFamControlWidget +
    + siriushla.as_ps_control.detail_widget +
    + siriushla.as_ps_control.detail_widget.custom_widgets +
    + siriushla.as_ps_control.detail_widget.DetailWidgetFactory +
    + siriushla.as_ps_control.detail_widget.InterlockWindow +
    + siriushla.as_ps_control.detail_widget.PSDetailWidget +
    + siriushla.as_ps_control.ps_wfmerror_mon +
    + siriushla.as_ps_control.PSControlWindow +
    + siriushla.as_ps_control.PSDetailWindow +
    + siriushla.as_ps_control.PSTabControlWindow +
    + siriushla.as_ps_control.PSTrimWindow +
    + siriushla.as_ps_control.SummaryWidgets +
    + siriushla.as_ps_cycle +
    + siriushla.as_ps_cycle.cycle_window +
    + siriushla.as_ps_cycle.tasks +
    + siriushla.as_ps_diag +
    + siriushla.as_ps_diag.main +
    + siriushla.as_ps_diag.monitor +
    + siriushla.as_ps_diag.ps_graph_mon +
    + siriushla.as_ps_diag.util +
    + siriushla.as_pu_control +
    + siriushla.as_pu_control.ControlWindow +
    + siriushla.as_pu_control.DetailWidget +
    + siriushla.as_pu_control.DetailWindow +
    + siriushla.as_rf_control +
    + siriushla.as_rf_control.control +
    + siriushla.as_rf_control.custom_widgets +
    + siriushla.as_rf_control.details +
    + siriushla.as_rf_control.util +
    + siriushla.as_ti_control +
    + siriushla.as_ti_control.base +
    + siriushla.as_ti_control.hl_trigger +
    + siriushla.as_ti_control.hltiming +
    + siriushla.as_ti_control.low_level_devices +
    + siriushla.as_ti_control.monitor +
    + siriushla.as_ti_control.widgets +
    + siriushla.bl_ap_imgproc +
    + siriushla.bl_ap_imgproc.blintlkctl +
    + siriushla.bl_ap_imgproc.image +
    + siriushla.bl_ap_imgproc.main +
    + siriushla.bl_ap_imgproc.util +
    + siriushla.bo_ap_ramp.custom_widgets +
    + siriushla.common +
    + siriushla.common.afc_acq_core +
    + siriushla.common.afc_acq_core.base +
    + siriushla.common.afc_acq_core.triggers +
    + siriushla.common.cam_basler +
    + siriushla.common.cam_basler.base +
    + siriushla.common.cam_basler.settings +
    + siriushla.common.diff_ctrl +
    + siriushla.common.diff_ctrl.base +
    + siriushla.common.diff_ctrl.details +
    + siriushla.common.epics +
    + siriushla.common.epics.task +
    + siriushla.common.epics.task.checker +
    + siriushla.common.epics.task.connector +
    + siriushla.common.epics.task.getter +
    + siriushla.common.epics.task.setter +
    + siriushla.common.epics.task.task +
    + siriushla.common.epics.task.wait +
    + siriushla.common.epics.wrapper +
    + siriushla.common.epics.wrapper.pyepics +
    + siriushla.li_ap_mps +
    + siriushla.li_ap_mps.bypass_btn +
    + siriushla.li_ap_mps.main +
    + siriushla.li_ap_mps.monitor +
    + siriushla.li_ap_mps.util +
    + siriushla.li_di_bpms +
    + siriushla.li_di_bpms.bpm_main +
    + siriushla.li_di_scrns +
    + siriushla.li_di_scrns.main +
    + siriushla.li_di_scrns.motorBtn +
    + siriushla.li_di_scrns.util +
    + siriushla.li_eg_control +
    + siriushla.li_eg_control.main +
    + siriushla.li_pu_modltr +
    + siriushla.li_pu_modltr.auxiliary_dialogs +
    + siriushla.li_pu_modltr.main +
    + siriushla.li_rf_llrf +
    + siriushla.li_rf_llrf.chart +
    + siriushla.li_rf_llrf.controls +
    + siriushla.li_rf_llrf.details +
    + siriushla.li_rf_llrf.main +
    + siriushla.li_rf_llrf.motor_control +
    + siriushla.li_rf_llrf.util +
    + siriushla.li_rf_llrf.widgets +
    + siriushla.li_va_control +
    + siriushla.li_va_control.chart +
    + siriushla.li_va_control.details +
    + siriushla.li_va_control.functions +
    + siriushla.li_va_control.main +
    + siriushla.li_va_control.util +
    + siriushla.li_va_control.widgets +
    + siriushla.si_ap_fofb +
    + siriushla.si_ap_fofb.base +
    + siriushla.si_ap_fofb.custom_widgets +
    + siriushla.si_ap_fofb.graphics +
    + siriushla.si_ap_fofb.main +
    + siriushla.si_ap_fofb.respmat +
    + siriushla.si_ap_fofb.trig_acq_config +
    + siriushla.si_ap_genstatus +
    + siriushla.si_ap_genstatus.main +
    + siriushla.si_ap_idff +
    + siriushla.si_ap_idff.custom_widgets +
    + siriushla.si_ap_idff.main +
    + siriushla.si_ap_idff.util +
    + siriushla.si_ap_orbintlk +
    + siriushla.si_ap_orbintlk.base +
    + siriushla.si_ap_orbintlk.bpmdetail +
    + siriushla.si_ap_orbintlk.custom_widgets +
    + siriushla.si_ap_orbintlk.graphics +
    + siriushla.si_ap_orbintlk.main +
    + siriushla.si_di_bbb +
    + siriushla.si_di_bbb.acquisition +
    + siriushla.si_di_bbb.advanced_settings +
    + siriushla.si_di_bbb.bbb +
    + siriushla.si_di_bbb.coefficients +
    + siriushla.si_di_bbb.custom_widgets +
    + siriushla.si_di_bbb.drive +
    + siriushla.si_di_bbb.environment +
    + siriushla.si_di_bbb.gpio +
    + siriushla.si_di_bbb.main +
    + siriushla.si_di_bbb.masks +
    + siriushla.si_di_bbb.pwr_amps +
    + siriushla.si_di_bbb.timing +
    + siriushla.si_di_bbb.util +
    + siriushla.si_di_equalize_bpms +
    + siriushla.si_di_equalize_bpms.main +
    + siriushla.si_di_scraps +
    + siriushla.si_di_scraps.Scrap_monitor +
    + siriushla.si_id_control +
    + siriushla.si_id_control.apu +
    + siriushla.si_id_control.base +
    + siriushla.si_id_control.delta +
    + siriushla.si_id_control.epu +
    + siriushla.si_id_control.id_control +
    + siriushla.si_id_control.papu +
    + siriushla.si_id_control.util +
    + siriushla.sirius_application +
    + siriushla.tb_di_slits +
    + siriushla.tb_di_slits.Slit_monitor +
    + siriushla.util +
    + siriushla.widgets +
    + siriushla.widgets.bar_graph +
    + siriushla.widgets.detachable_tabwidget +
    + siriushla.widgets.dialog +
    + siriushla.widgets.dialog.progress_dialog +
    + siriushla.widgets.dialog.ps_status_dialog +
    + siriushla.widgets.dialog.pv_status_dialog +
    + siriushla.widgets.dialog.report_dialog +
    + siriushla.widgets.enum_combo_box +
    + siriushla.widgets.frame +
    + siriushla.widgets.horizontal_ruler +
    + siriushla.widgets.label +
    + siriushla.widgets.led +
    + siriushla.widgets.ledit_scrollbar +
    + siriushla.widgets.line_edit +
    + siriushla.widgets.loading_dialog +
    + siriushla.widgets.log_display +
    + siriushla.widgets.log_label +
    + siriushla.widgets.matplotlib +
    + siriushla.widgets.process_image +
    + siriushla.widgets.pushbutton +
    + siriushla.widgets.pvnames_tree +
    + siriushla.widgets.QDoubleScrollBar +
    + siriushla.widgets.QLed +
    + siriushla.widgets.QSpinBoxPlus +
    + siriushla.widgets.qtplugins +
    + siriushla.widgets.relative_widget +
    + siriushla.widgets.scrollbar +
    + siriushla.widgets.selection_matrix +
    + siriushla.widgets.signal_channel +
    + siriushla.widgets.spectrogram_view +
    + siriushla.widgets.spinbox +
    + siriushla.widgets.spinbox_scrollbar +
    + siriushla.widgets.state_button +
    + siriushla.widgets.string_combo_box +
    + siriushla.widgets.timeplot +
    + siriushla.widgets.waveformplot +
    + siriushla.widgets.waveformtable +
    + siriushla.widgets.widget_factory +
    + siriushla.widgets.windows +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/search.html b/search.html new file mode 100644 index 000000000..93758ac92 --- /dev/null +++ b/search.html @@ -0,0 +1,181 @@ + + + + + + Search — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + + + +
+ +
+ +
+
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/searchindex.js b/searchindex.js new file mode 100644 index 000000000..0da89a023 --- /dev/null +++ b/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"docnames": ["index", "siriushla", "siriushla.as_ap_configdb", "siriushla.as_ap_configdb.models", "siriushla.as_ap_configdb.normconfigs", "siriushla.as_ap_configdb.pvsconfigs", "siriushla.as_ap_configdb.pvsconfigs.delegate", "siriushla.as_ap_currinfo", "siriushla.as_ap_energybutton", "siriushla.as_ap_injcontrol", "siriushla.as_ap_injection", "siriushla.as_ap_launcher", "siriushla.as_ap_machshift", "siriushla.as_ap_macreport", "siriushla.as_ap_magoffconv", "siriushla.as_ap_measure", "siriushla.as_ap_monitor", "siriushla.as_ap_opticscorr", "siriushla.as_ap_posang", "siriushla.as_ap_rabpmmon", "siriushla.as_ap_radmon", "siriushla.as_ap_sofb", "siriushla.as_ap_sofb.graphics", "siriushla.as_ap_sofb.ioc_control", "siriushla.as_di_bpms", "siriushla.as_di_dccts", "siriushla.as_di_icts", "siriushla.as_di_scrns", "siriushla.as_di_tune", "siriushla.as_di_vlight", "siriushla.as_ps_commands", "siriushla.as_ps_control", "siriushla.as_ps_control.control_widget", "siriushla.as_ps_control.detail_widget", "siriushla.as_ps_cycle", "siriushla.as_ps_diag", "siriushla.as_pu_control", "siriushla.as_rf_control", "siriushla.as_ti_control", "siriushla.bl_ap_imgproc", "siriushla.bo_ap_ramp", "siriushla.common", "siriushla.common.afc_acq_core", "siriushla.common.cam_basler", "siriushla.common.diff_ctrl", "siriushla.common.epics", "siriushla.common.epics.task", "siriushla.common.epics.wrapper", "siriushla.li_ap_mps", "siriushla.li_di_bpms", "siriushla.li_di_scrns", "siriushla.li_eg_control", "siriushla.li_pu_modltr", "siriushla.li_rf_llrf", "siriushla.li_va_control", "siriushla.si_ap_fofb", "siriushla.si_ap_genstatus", "siriushla.si_ap_idff", "siriushla.si_ap_orbintlk", "siriushla.si_di_bbb", "siriushla.si_di_equalize_bpms", "siriushla.si_di_scraps", "siriushla.si_id_control", "siriushla.tb_di_slits", "siriushla.widgets", "siriushla.widgets.dialog"], "filenames": ["index.rst", "siriushla.rst", "siriushla.as_ap_configdb.rst", "siriushla.as_ap_configdb.models.rst", "siriushla.as_ap_configdb.normconfigs.rst", "siriushla.as_ap_configdb.pvsconfigs.rst", "siriushla.as_ap_configdb.pvsconfigs.delegate.rst", "siriushla.as_ap_currinfo.rst", "siriushla.as_ap_energybutton.rst", "siriushla.as_ap_injcontrol.rst", "siriushla.as_ap_injection.rst", "siriushla.as_ap_launcher.rst", "siriushla.as_ap_machshift.rst", "siriushla.as_ap_macreport.rst", "siriushla.as_ap_magoffconv.rst", "siriushla.as_ap_measure.rst", "siriushla.as_ap_monitor.rst", "siriushla.as_ap_opticscorr.rst", "siriushla.as_ap_posang.rst", "siriushla.as_ap_rabpmmon.rst", "siriushla.as_ap_radmon.rst", "siriushla.as_ap_sofb.rst", "siriushla.as_ap_sofb.graphics.rst", "siriushla.as_ap_sofb.ioc_control.rst", "siriushla.as_di_bpms.rst", "siriushla.as_di_dccts.rst", "siriushla.as_di_icts.rst", "siriushla.as_di_scrns.rst", "siriushla.as_di_tune.rst", "siriushla.as_di_vlight.rst", "siriushla.as_ps_commands.rst", "siriushla.as_ps_control.rst", "siriushla.as_ps_control.control_widget.rst", "siriushla.as_ps_control.detail_widget.rst", "siriushla.as_ps_cycle.rst", "siriushla.as_ps_diag.rst", "siriushla.as_pu_control.rst", "siriushla.as_rf_control.rst", "siriushla.as_ti_control.rst", "siriushla.bl_ap_imgproc.rst", "siriushla.bo_ap_ramp.rst", "siriushla.common.rst", "siriushla.common.afc_acq_core.rst", "siriushla.common.cam_basler.rst", "siriushla.common.diff_ctrl.rst", "siriushla.common.epics.rst", "siriushla.common.epics.task.rst", "siriushla.common.epics.wrapper.rst", "siriushla.li_ap_mps.rst", "siriushla.li_di_bpms.rst", "siriushla.li_di_scrns.rst", "siriushla.li_eg_control.rst", "siriushla.li_pu_modltr.rst", "siriushla.li_rf_llrf.rst", "siriushla.li_va_control.rst", "siriushla.si_ap_fofb.rst", "siriushla.si_ap_genstatus.rst", "siriushla.si_ap_idff.rst", "siriushla.si_ap_orbintlk.rst", "siriushla.si_di_bbb.rst", "siriushla.si_di_equalize_bpms.rst", "siriushla.si_di_scraps.rst", "siriushla.si_id_control.rst", "siriushla.tb_di_slits.rst", "siriushla.widgets.rst", "siriushla.widgets.dialog.rst"], "titles": ["Welcome to Sirius HLA\u2019s documentation!", "Sirius HLA", "siriushla.as_ap_configdb", "siriushla.as_ap_configdb.models", "siriushla.as_ap_configdb.normconfigs", "siriushla.as_ap_configdb.pvsconfigs", "siriushla.as_ap_configdb.pvsconfigs.delegate", "siriushla.as_ap_currinfo", "siriushla.as_ap_energybutton", "siriushla.as_ap_injcontrol", "siriushla.as_ap_injection", "siriushla.as_ap_launcher", "siriushla.as_ap_machshift", "siriushla.as_ap_macreport", "siriushla.as_ap_magoffconv", "siriushla.as_ap_measure", "siriushla.as_ap_monitor", "siriushla.as_ap_opticscorr", "siriushla.as_ap_posang", "siriushla.as_ap_rabpmmon", "siriushla.as_ap_radmon", "siriushla.as_ap_sofb", "siriushla.as_ap_sofb.graphics", "siriushla.as_ap_sofb.ioc_control", "siriushla.as_di_bpms", "siriushla.as_di_dccts", "siriushla.as_di_icts", "siriushla.as_di_scrns", "siriushla.as_di_tune", "siriushla.as_di_vlight", "siriushla.as_ps_commands", "siriushla.as_ps_control", "siriushla.as_ps_control.control_widget", "siriushla.as_ps_control.detail_widget", "siriushla.as_ps_cycle", "siriushla.as_ps_diag", "siriushla.as_pu_control", "siriushla.as_rf_control", "siriushla.as_ti_control", "siriushla.bl_ap_imgproc", "siriushla.bo_ap_ramp", "siriushla.common", "siriushla.common.afc_acq_core", "siriushla.common.cam_basler", "siriushla.common.diff_ctrl", "siriushla.common.epics", "siriushla.common.epics.task", "siriushla.common.epics.wrapper", "siriushla.li_ap_mps", "siriushla.li_di_bpms", "siriushla.li_di_scrns", "siriushla.li_eg_control", "siriushla.li_pu_modltr", "siriushla.li_rf_llrf", "siriushla.li_va_control", "siriushla.si_ap_fofb", "siriushla.si_ap_genstatus", "siriushla.si_ap_idff", "siriushla.si_ap_orbintlk", "siriushla.si_di_bbb", "siriushla.si_di_equalize_bpms", "siriushla.si_di_scraps", "siriushla.si_id_control", "siriushla.tb_di_slits", "Widgets", "siriushla.widgets.dialog"], "terms": {"siriushla": 0, "as_ap_configdb": 0, "subpackag": 0, "client_configdb": 0, "modul": 0, "configdialog": 0, "configwidget": 0, "content": 0, "as_ap_currinfo": 0, "charge_monitor": 0, "current_and_lifetim": 0, "efficiency_monitor": 0, "as_ap_energybutton": 0, "energy_button": 0, "energy_setter_window": 0, "set_energi": 0, "as_ap_injcontrol": 0, "base": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 59, 60, 61, 63, 64, 65], "injbo": 0, "tbt": 0, "as_ap_inject": 0, "auxiliary_dialog": 0, "killbeam_widget": 0, "main": [0, 2, 8, 9, 18, 37, 49, 64], "as_ap_launch": 0, "menu": [0, 10, 20, 21, 32, 35, 36, 50, 54, 62, 64], "as_ap_machshift": 0, "as_ap_macreport": 0, "as_ap_magoffconv": 0, "as_ap_measur": 0, "emittance_mea": 0, "energy_mea": 0, "as_ap_monitor": 0, "util": 0, "as_ap_opticscorr": 0, "custom_widget": [0, 31], "detail": [0, 10, 18, 25, 27, 31, 33, 35, 36, 41, 52, 55, 58, 62, 65], "as_ap_posang": 0, "hlposang": 0, "as_ap_rabpmmon": 0, "as_ap_radmon": 0, "as_ap_sofb": 0, "orbit_regist": 0, "as_di_bpm": 0, "list_bpm": 0, "monit": [0, 58], "set": [0, 2, 3, 4, 5, 6, 8, 10, 13, 21, 27, 28, 30, 31, 33, 34, 35, 37, 38, 40, 41, 46, 48, 53, 54, 55, 59, 64, 65], "trig_acq_config": 0, "as_di_dcct": 0, "graphic": [0, 21, 23], "as_di_ict": 0, "ict_monitor": 0, "as_di_scrn": 0, "list_scrn": 0, "scrn_calib": 0, "scrn_detail": 0, "as_di_tun": 0, "control": [0, 9, 10, 22, 23, 25, 27, 31, 32, 33, 36, 38, 48, 50, 51, 52, 54, 55, 58, 59, 62, 64], "spectra": 0, "spectrogram": [0, 21, 22], "as_di_vlight": 0, "as_ps_command": 0, "task": [0, 10, 13, 41, 45, 64, 65], "as_ps_control": 0, "pscontrolwindow": 0, "psdetailwindow": 0, "pstabcontrolwindow": 0, "pstrimwindow": 0, "summarywidget": 0, "ps_wfmerror_mon": 0, "as_ps_cycl": 0, "cycle_window": 0, "as_ps_diag": 0, "monitor": [0, 7, 10, 16, 19, 20, 25, 26, 44, 53, 58, 59, 61, 63], "ps_graph_mon": 0, "as_pu_control": 0, "controlwindow": 0, "detailwidget": [0, 33], "detailwindow": [0, 54], "as_rf_control": 0, "as_ti_control": 0, "hl_trigger": 0, "hltime": 0, "low_level_devic": 0, "bl_ap_imgproc": 0, "blintlkctl": 0, "imag": [0, 27, 28, 43, 50, 53, 54, 64], "bo_ap_ramp": 0, "bonormalized_edit": 0, "boramp_edit": 0, "main_window": 0, "status_and_command": 0, "common": [0, 5, 62], "li_ap_mp": 0, "bypass_btn": 0, "li_di_bpm": 0, "bpm_main": 0, "li_di_scrn": 0, "motorbtn": 0, "li_eg_control": 0, "li_pu_modltr": 0, "li_rf_llrf": 0, "chart": [0, 50], "motor_control": 0, "li_va_control": 0, "function": [0, 1, 4, 30, 31, 34, 43, 48, 50, 64], "si_ap_fofb": 0, "respmat": [0, 21], "si_ap_genstatu": 0, "si_ap_idff": 0, "si_ap_orbintlk": 0, "bpmdetail": 0, "si_di_bbb": 0, "acquisit": [0, 24, 55], "advanced_set": 0, "bbb": [0, 31], "coeffici": 0, "drive": [0, 62], "environ": 0, "gpio": 0, "mask": [0, 35, 64], "pwr_amp": 0, "time": [0, 34, 38, 47, 48, 51, 53, 64], "si_di_equalize_bpm": 0, "si_di_scrap": 0, "scrap_monitor": 0, "si_id_control": 0, "apu": 0, "delta": [0, 4, 31, 53], "epu": 0, "id_control": 0, "papu": 0, "tb_di_slit": 0, "slit_monitor": 0, "github": [0, 64], "definit": [1, 4], "applic": [1, 11, 21, 32, 53, 60, 64], "class": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "siriusappl": 1, "ui_fil": 1, "none": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "command_line_arg": 1, "use_main_window": 1, "fals": [1, 3, 4, 10, 23, 28, 30, 31, 33, 34, 35, 38, 43, 50, 51, 54, 59, 64], "kwarg": [1, 13, 22, 24, 31, 32, 34, 38, 40, 57, 58, 59, 64], "sourc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "pydmappl": [1, 64], "deriv": [1, 23, 55, 64], "us": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 25, 27, 28, 30, 31, 33, 34, 35, 38, 43, 46, 50, 54, 58, 64, 65], "open_window": 1, "w_class": 1, "parent": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "open": [1, 4, 31, 35, 48, 54], "new": [1, 4, 23, 33, 35, 38, 43, 57, 58, 64], "window": [1, 2, 4, 5, 7, 8, 9, 10, 13, 17, 18, 24, 25, 26, 27, 28, 30, 31, 33, 34, 35, 36, 37, 39, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63], "A": [1, 23, 33, 43, 54, 55, 57, 64], "creat": [1, 3, 4, 6, 9, 21, 23, 26, 30, 32, 34, 40, 48, 54, 55, 63], "i": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 38, 43, 46, 48, 53, 55, 57, 58, 62, 64, 65], "alreadi": 1, "otherwis": [1, 23, 35, 43, 58, 64], "exist": [1, 4, 43, 64], "brought": 1, "focu": [1, 4, 64], "excepthook": 1, "exctyp": 1, "excvalu": 1, "tracebackobj": 1, "global": 1, "catch": 1, "unhandl": 1, "except": 1, "param": [1, 33, 39], "type": [1, 2, 3, 4, 5, 6, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 38, 43, 46, 50, 53, 54, 55, 58, 59, 64, 65], "valu": [1, 2, 3, 4, 22, 23, 28, 30, 33, 35, 38, 39, 40, 43, 46, 47, 50, 53, 54, 56, 57, 58, 64, 65], "traceback": 1, "object": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 32, 33, 34, 35, 39, 43, 46, 47, 50, 54, 55, 58, 59, 62, 64, 65], "loadingdialog": [1, 64], "titl": [1, 28, 38, 39, 48, 49, 50, 53, 54, 55, 62, 64, 65], "messag": [1, 13, 34, 64], "qdialog": [1, 4, 58, 64, 65], "loadingthread": [1, 2], "cmd": [1, 33, 39, 43, 55, 62], "is_pydm": 1, "qthread": [1, 4, 13, 30, 34, 46, 64, 65], "closemessag": 1, "int": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 38, 43, 46, 58, 64, 65], "argument": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "sequenc": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 62, 64, 65], "pyqt_sign": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "normal": [1, 2, 3, 4, 5, 8, 10, 11, 13, 14, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "individu": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 54, 58, 64, 65], "each": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 55, 58, 64, 65], "either": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "string": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 55, 58, 64, 65], "name": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 38, 42, 43, 46, 47, 48, 50, 53, 54, 57, 58, 59, 64, 65], "c": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "altern": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 54, 58, 64, 65], "could": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "itself": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "describ": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "differ": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 54, 58, 64, 65], "overload": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 32, 33, 34, 35, 43, 46, 58, 64, 65], "signal": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 53, 54, 58, 64, 65], "option": [1, 2, 3, 4, 5, 6, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 40, 43, 46, 58, 64, 65], "If": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "specifi": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "attribut": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 37, 43, 46, 58, 64, 65], "bound": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "revis": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "export": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 54, 58, 64, 65], "qml": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "0": [1, 2, 3, 4, 5, 10, 11, 13, 20, 21, 22, 23, 24, 27, 28, 30, 31, 32, 33, 34, 35, 40, 43, 46, 47, 48, 50, 53, 55, 57, 58, 59, 64, 65], "": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 48, 49, 50, 58, 64, 65], "pyqtsign": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 43, 46, 58, 64, 65], "str": [1, 2, 3, 4, 5, 10, 11, 13, 21, 22, 23, 27, 28, 30, 31, 33, 34, 35, 38, 40, 43, 46, 58, 64, 65], "openmessag": 1, "run": [1, 2, 4, 10, 13, 30, 32, 34, 43, 45, 46, 64], "self": [1, 4, 10, 17, 28, 31, 33, 34, 38, 40, 54, 64], "check_process": 1, "is_window": 1, "true": [1, 4, 11, 24, 28, 36, 38, 39, 43, 53, 54, 55, 57, 59, 64, 65], "check_window_by_pid": 1, "pid": [1, 53], "comm": 1, "connect_newprocess": 1, "widget": [1, 2, 4, 5, 23, 25, 27, 29, 31, 32, 33, 35, 36, 43, 44, 46, 48, 49, 50, 51, 55, 57, 58, 59, 61, 62, 63], "execut": [1, 46], "child": [1, 2, 64], "program": 1, "process": [1, 28, 39, 64], "connect_window": 1, "connect": [1, 2, 3, 23, 43, 47, 58, 62, 64], "get_appropriate_color": 1, "section": [1, 2, 3, 4, 8, 25, 28, 29, 31, 32, 36, 37, 57, 65], "si": [1, 4, 20, 21, 22, 23, 28, 31, 36, 57, 58, 61], "get_appropriate_sign": 1, "get_monitor_icon": 1, "icon_nam": 1, "color": [1, 35, 37, 40, 54, 55, 57, 59, 64], "get_package_vers": 1, "get_window_id": 1, "serial": 1, "paramet": [1, 4, 17, 18, 23, 31, 33, 38, 43, 48, 53, 57, 58, 64, 65], "run_newprocess": 1, "set_styl": 1, "app": [1, 64], "implement": [1, 10, 11, 20, 23, 30, 34, 46, 47, 55, 64, 65], "style": [1, 4, 49, 64], "css": [1, 64], "default": [1, 43, 55, 64], "qt": [1, 43, 64], "resourc": [1, 64], "file": [1, 17, 60], "model": [2, 4, 40, 64], "config_db_table_model": 2, "configdbtablemodel": [2, 3], "columncount": [2, 3, 4], "config_typ": [2, 3, 4, 5, 40], "connectionerror": [2, 3], "data": [2, 3, 4, 5, 6, 13, 22, 25, 27, 28, 35, 40, 48, 49, 53, 54, 57, 58, 64], "flag": [2, 3, 4, 13, 24, 30, 34, 43, 46, 64, 65], "headerdata": [2, 3, 4], "horizontalhead": [2, 3], "removerow": [2, 3], "rowcount": [2, 3, 4], "setupmodeldata": [2, 3], "sort": [2, 3], "config_names_model": 2, "confignamesmodel": [2, 3], "config_types_model": 2, "configpvstypemodel": [2, 3], "configtypemodel": [2, 3], "pv_configuration_model": 2, "pvconfigurationtablemodel": [2, 3], "model_data": [2, 3], "setdata": [2, 3, 4, 64], "normconfig": 2, "configmanagerwindow": 2, "new_configur": [2, 4], "closeev": [2, 4, 34, 64], "keypressev": [2, 4, 9, 30, 34, 64], "configmodel": 2, "configdeleg": [2, 4], "createeditor": [2, 4, 5, 6, 40], "paint": [2, 4, 35, 54, 64], "seteditordata": [2, 4, 5, 6, 40], "chromat": [2, 4], "tune": [2, 4, 28, 59], "undo_memori": [2, 4], "cleanundo": [2, 4], "closeconfigur": [2, 4], "configur": [2, 3, 4, 5, 6, 40, 48, 54, 55, 57, 58, 64], "deleteconfigur": [2, 4], "deriveconfigur": [2, 4], "getconfigurationcolumn": [2, 4], "getconfigur": [2, 4], "gettunematrix": [2, 4], "insertcolumn": [2, 4], "interpolateconfigur": [2, 4], "loadconfigur": [2, 4], "removecolumn": [2, 4], "renameconfigur": [2, 4], "saveconfigur": [2, 4], "setdataalt": [2, 4], "delet": [2, 4], "delete_config": [2, 4], "dirti": [2, 4], "newconfigur": [2, 4], "old_nam": [2, 4], "save": [2, 4, 27, 34, 38, 43, 50, 54], "setvalu": [2, 4, 21, 22, 64], "vaca_prefix": [2, 4, 7, 9, 10, 11, 15, 16, 17, 20, 25, 26, 27, 28, 29, 35, 38, 39, 51, 52, 53, 54, 56, 58, 59, 62], "taskfinish": [2, 4], "taskupd": [2, 4], "tunedlg": 2, "pvsconfig": 2, "deleg": [2, 5, 35], "pv_configuration_deleg": [2, 5], "load_and_appli": 2, "loadandapplyconfig2machinewindow": [2, 5], "selectandapplypvswidget": [2, 5], "current_config": [2, 5], "current_config_typ": [2, 5], "fill_config": [2, 5], "settingfinish": [2, 5], "setupui": [2, 5, 21, 22, 23, 24, 31, 38, 41, 42, 60], "selectconfigwidget": [2, 5], "configchang": [2, 5], "pvsconfigmanag": [2, 5], "read_and_sav": 2, "readandsaveconfig2serverwindow": [2, 5], "manag": [2, 3, 4, 5], "configurationmanag": 2, "_siriuswindow": [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 17, 18, 21, 25, 26, 27, 28, 30, 31, 33, 34, 35, 36, 37, 38, 44, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 64, 65], "config_type_col": 2, "name_col": 2, "jsontreemodel": 2, "qabstractitemmodel": 2, "tree": [2, 64], "repres": [2, 4, 35, 64], "json": 2, "return": [2, 3, 4, 21, 23, 28, 31, 32, 33, 34, 35, 43, 44, 47, 55, 57, 58, 61, 63, 64, 65], "index": [2, 3, 4, 6, 23, 28, 35, 40, 48, 55, 64], "column": [2, 3, 4, 40, 43, 54, 64], "count": [2, 3, 4, 48], "role": [2, 3, 4, 64], "read": [2, 5, 25, 27, 64], "onli": [2, 64], "orient": [2, 3, 4, 28, 32, 49, 50, 54, 64], "store": [2, 43, 64], "root": 2, "item": [2, 35, 40, 48, 50, 54, 64, 65], "row": [2, 3, 4, 43, 50, 64], "provid": 2, "given": [2, 3, 4, 31, 33, 53, 64], "config_list": 2, "treeitem": 2, "parentitem": 2, "an": [2, 35, 43, 53, 64], "appendchild": 2, "append": 2, "childcount": 2, "number": [2, 3, 4, 25, 28, 43, 54], "children": 2, "report": [2, 13, 65], "locat": 2, "within": [2, 64], "its": [2, 43, 64], "list": [2, 3, 4, 23, 27, 38, 54, 55, 64, 65], "defin": [2, 4, 23, 31, 32, 33, 36, 43, 64], "loadconfigdialog": 2, "_baseconfigmanipul": 2, "load": [2, 4], "renameconfigdialog": 2, "saveconfigdialog": 2, "renam": [2, 4], "confignam": [2, 21, 23, 58], "properti": [2, 3, 4, 5, 8, 21, 22, 23, 25, 27, 31, 33, 35, 39, 43, 47, 55, 58, 64, 65], "config_nam": [2, 4, 5], "configdbinfohead": 2, "client": [2, 3, 5], "qframe": [2, 37, 64], "configdbsearchengin": 2, "tabl": [2, 3, 4, 35, 40, 54, 64], "qlineedit": [2, 40], "1": [2, 3, 4, 20, 22, 23, 28, 32, 33, 43, 46, 48, 50, 53, 54, 55, 58, 59, 64], "filteredidc": 2, "configtablewidget": 2, "qtableview": 2, "select": [2, 5, 23, 25, 27, 35, 49, 50, 53, 54, 55, 58, 64], "selected_configconfigur": 2, "resizeev": [2, 64], "event": [2, 4, 9, 10, 11, 17, 20, 28, 31, 32, 35, 36, 38, 44, 48, 53, 54, 56, 58, 62, 64], "reimplement": [2, 10, 17, 28, 30, 34, 35, 40, 43, 44, 57, 58, 64], "resiz": [2, 53, 54, 64], "pv": [3, 4, 5, 10, 37, 45, 46, 47, 48, 50, 53, 54, 64, 65], "databas": [3, 4, 33], "discard": 3, "qabstracttablemodel": [3, 4], "overrid": [3, 4, 6, 9, 64, 65], "make": [3, 4, 40], "cell": [3, 4, 6], "edit": [3, 4, 40, 57, 64], "header": [3, 4, 13, 23, 38, 48, 49, 50, 54, 55, 62, 64], "modifi": [3, 43, 64], "pyqt5": [3, 4, 33, 35, 54, 59, 64], "qtcore": [3, 4, 64], "qmodelindex": [3, 4], "updat": [3, 4, 13, 22, 25, 27, 28, 31, 34, 35, 38, 40, 44, 48, 57, 61, 63, 64], "order": [3, 64], "get": [3, 4, 20, 32, 33, 45, 46, 47, 48, 49, 50, 53, 54, 55, 58, 59, 64], "regist": [3, 21], "qabstractlistmodel": 3, "setup": [3, 5], "all": [3, 32, 35, 36, 48, 49, 50, 53, 54, 64], "config": [3, 5, 48, 54, 58], "up": [3, 10, 21, 64], "field": [3, 38, 64], "from": [3, 4, 23, 31, 32, 33, 38, 55, 58, 64], "2": [3, 4, 20, 33, 37, 53, 55, 64], "offlin": [4, 14], "bo": [4, 7, 28, 31, 33, 36], "devic": [4, 10, 21, 22, 23, 25, 27, 30, 31, 32, 38, 39, 42, 43, 44, 48, 50, 52, 53, 54, 55, 58, 59, 61, 62, 63, 64], "thi": [4, 23, 33, 38, 57, 58, 64], "allow": [4, 27, 31, 46, 64], "user": [4, 43, 64], "well": [4, 38], "interpol": 4, "appli": [4, 5, 64], "close": [4, 31, 48], "The": [4, 23, 33, 35, 38, 43, 58, 64], "warn": [4, 31, 33, 34, 54, 64], "ar": [4, 10, 43, 64], "ani": [4, 40, 58, 64], "unsav": 4, "chang": [4, 20, 23, 33, 35, 38, 43, 50, 56, 58, 62, 64], "ctrl": [4, 22, 23, 44], "w": [4, 28, 64], "f2": 4, "z": [4, 64], "undo": [4, 64], "r": [4, 64], "redo": 4, "qitemdeleg": [4, 6, 35], "editor": [4, 6, 40], "painter": [4, 35, 54], "respons": [4, 64], "dirt": 4, "float": [4, 6, 23, 24, 33, 35, 38, 43, 58, 64], "75": [4, 64], "clean": 4, "action": [4, 20, 50], "current": [4, 5, 7, 30, 33, 35, 43, 64], "config_info": 4, "base_column": 4, "func": 4, "one": [4, 48, 50, 54], "matrix": [4, 23, 55, 64], "db": 4, "tell": 4, "wa": [4, 64], "insert": 4, "column1": 4, "column2": 4, "linear": 4, "remov": [4, 43], "new_nam": 4, "old_valu": 4, "call": [4, 54, 57, 64], "method": [4, 25, 27, 43, 46, 57, 64, 65], "static": [4, 22, 24, 32, 33, 54, 64], "wether": 4, "thre": 4, "pv_name": [4, 39, 48, 50, 53, 54], "pv_list": [4, 39, 50, 54], "pvconfigurationdeleg": [5, 6], "wrapper": [5, 41, 45, 46], "epic": [5, 41, 64], "pyepic": [5, 41, 45, 46], "pyepicswrapp": [5, 45, 46, 47], "configr": 5, "via": 5, "qwidget": [5, 8, 10, 12, 15, 16, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 35, 36, 37, 38, 39, 42, 43, 44, 48, 51, 53, 54, 55, 58, 59, 62, 64], "fill": [5, 64], "url": [5, 64], "packag": [5, 31, 36, 41, 47, 65], "init": [5, 46, 47], "charg": 7, "bomonitor": 7, "prefix": [7, 9, 10, 11, 12, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 35, 37, 38, 39, 42, 43, 44, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63], "siriuspi": [7, 9, 10, 11, 15, 16, 17, 20, 25, 26, 27, 28, 29, 35, 38, 39, 51, 52, 53, 54, 56, 58, 59, 62], "envar": [7, 9, 10, 11, 15, 16, 17, 20, 25, 26, 27, 28, 29, 35, 38, 39, 51, 52, 53, 54, 56, 58, 59, 62], "lifetim": 7, "currltwindow": 7, "effici": [7, 25], "efficiencymonitor": 7, "interfac": [8, 11, 14, 21, 33, 35, 46, 48, 49, 50, 53, 60, 65], "dipol": [8, 31, 32], "energi": 8, "constant": [8, 43, 64], "energybutton": 8, "lower_limit": 8, "upper_limit": 8, "energysetterwindow": 8, "init_sect": 8, "basewindow": 9, "booster": [9, 28, 32], "inject": [9, 10, 38, 57], "hla": [9, 17, 18, 26, 27, 30, 34, 61, 63, 64], "injbocontrolwindow": 9, "tb": [9, 26, 31, 32, 36, 63], "t": [9, 26, 31, 36], "ap": [9, 39], "tlcontrolwindow": 9, "tl": [9, 18, 26], "auxiliari": [10, 20, 52, 55, 62], "dialog": [10, 27, 52, 55, 58, 62, 64], "biasfbdetaildialog": 10, "bia": 10, "fb": 10, "pumodesettingsdialog": 10, "pu": [10, 30], "mode": [10, 24, 25, 64], "topupsettingsdialog": 10, "top": [10, 23, 55, 64], "rf": [10, 37], "kill": [10, 62], "beam": [10, 49], "rfkillbeambutton": 10, "pydmpushbutton": [10, 38, 48, 64], "button": [10, 31, 37, 38, 50, 53, 54, 58, 64], "injctrl": 10, "mainwindow": [10, 21, 55], "injctrlwindow": 10, "changeev": [10, 11, 20, 28, 41, 44, 56, 64], "mousedoubleclickev": [10, 11, 17, 21, 22, 28, 31, 33, 35, 40, 58, 64], "showegun": [10, 11], "showmonitor": [10, 11], "showstatu": [10, 11], "clocklabel": 10, "qlabel": [10, 13, 22, 64], "clock": [10, 38], "label": [10, 12, 13, 16, 17, 21, 22, 31, 33, 35, 38, 39, 48, 50, 54, 55, 59, 65], "injdiagl": 10, "kw": [10, 33, 35, 38, 59, 64], "siriusledalert": [10, 17, 38, 64], "injdiag": 10, "statu": [10, 21, 30, 33, 35, 48, 54, 55, 56, 62, 64, 65], "led": [10, 33, 35, 38, 53, 54], "injsysstbycontrolwidget": 10, "is_summari": 10, "handler": [10, 56, 57], "system": [10, 37, 48, 55], "contextmenuev": [10, 20, 31, 32, 35, 36, 62, 64], "show": [10, 28, 31, 32, 35, 36, 40, 43, 50, 53, 54, 62, 64, 65], "custom": [10, 32, 33, 35, 36, 53, 55, 57, 59, 62, 64], "context": [10, 20, 21, 32, 35, 36, 62, 64], "expand": [10, 64], "injsysstbyl": 10, "pydmledmultichannel": [10, 54, 64], "check": [10, 30, 32, 33, 35, 36, 45, 46, 47, 62, 64], "whether": [10, 23, 28, 55, 64], "sever": [10, 23, 58, 64], "stanbi": 10, "state": [10, 23, 30, 34, 38, 43, 58, 62, 64], "a0": [10, 17, 28, 33, 34, 38, 40, 64], "qmouseev": [10, 17, 28, 31, 33, 40, 64], "monitorsummarywidget": 10, "summari": [10, 26, 27, 32, 62], "taskstatuslabel": 10, "init_channel": [10, 17, 33, 35, 38, 48, 50, 57, 59, 64], "qpushbutton": [10, 53, 64], "handl": [11, 25, 30, 34, 35, 43, 64, 65], "oper": [11, 50, 62, 64], "command": [11, 30], "mainlaunch": 11, "launcher": 11, "mock": 11, "get_object": 11, "ismenubar": 11, "get_pushbutton": 11, "machshift": 12, "machshiftlabel": 12, "machin": [12, 13, 62], "shift": 12, "lbdata": 13, "arg": [13, 22, 24, 31, 40, 58, 59, 64], "lbhheader": 13, "horizont": [13, 21, 31, 32, 43, 53, 64], "lbvheader": 13, "vertic": [13, 21, 31, 32, 43, 64], "macreportwindow": 13, "updatetask": 13, "macreport": 13, "exit_task": [13, 30, 34, 45, 46, 64, 65], "quit": [13, 30, 34, 64], "thread": [13, 34, 46, 64, 65], "send": [13, 28, 50, 58, 64], "log": [13, 35, 62, 64], "magoffconvapp": 14, "convert": [14, 64], "energymeasur": 15, "nrpoints_edit": 15, "pb_reset_data_click": 15, "reset": [15, 25, 28, 30, 31, 33, 38, 43, 64], "buffer": [15, 25, 28, 64], "siriu": [16, 21, 22, 27, 32, 56, 64], "siriusmonitor": 16, "get_label2devic": [16, 35], "sec": [16, 25, 27, 29, 35], "get_sec2dev_laypo": [16, 35], "configlineedit": [17, 40, 57], "pydmlineedit": [17, 38, 57, 64], "mousereleaseev": [17, 40, 57, 64], "_": [17, 22, 35, 57, 64], "mous": [17, 64], "releas": [17, 64], "statusl": 17, "opticscorr": 17, "corrparamsdetailwindow": [17, 18], "acc": [17, 21, 22, 23, 55, 62], "opticsparam": 17, "fam": [17, 32, 33], "correct": [17, 18, 54, 64], "opticscorrwindow": 17, "includ": [17, 64], "some": [17, 46, 64], "intellig": 17, "ui": [17, 21], "optic": 17, "posangcorr": 18, "rabpm": 19, "rad": 20, "radtotdosemonitor": 20, "total": 20, "dose": 20, "rate": [20, 24], "ref_tot_dos": 20, "5": [20, 33, 46, 47, 54, 55, 64], "sensor2loc": 20, "berthold": 20, "corredor": 20, "de": 20, "servi\u00e7o": 20, "eixo": 20, "19": [20, 64], "els": 20, "01": [20, 63, 64], "hall": 20, "17": [20, 64], "thermo1": 20, "thermo": 20, "10": [20, 21, 59, 64], "43": [20, 64], "thermo10": 20, "chican": 20, "thermo11": 20, "11": [20, 64], "20": [20, 64], "14": [20, 64], "thermo12": 20, "12": [20, 64], "16": [20, 64], "thermo13": 20, "13": [20, 64], "06": [20, 22, 55], "31": [20, 64], "thermo14": 20, "55": [20, 64], "thermo15": 20, "15": [20, 54, 64], "50": [20, 64], "thermo16": 20, "08": [20, 64], "38": [20, 64], "thermo2": 20, "09": [20, 58], "ia": 20, "40": [20, 64], "thermo3": 20, "3": [20, 33, 54, 55, 64], "04": 20, "thermo4": 20, "4": [20, 33, 53, 55, 62, 64], "57": [20, 64], "thermo5": 20, "thermo6": 20, "6": [20, 33, 55, 62, 64], "59": [20, 64], "thermo7": 20, "7": [20, 33, 43, 55, 64], "37": [20, 64], "thermo8": 20, "8": [20, 33, 54, 59, 64], "18": [20, 64], "thermo9": 20, "9": [20, 21, 64], "02": [20, 64], "font": 20, "size": [20, 22, 23, 28, 30, 34, 45, 46, 54, 64, 65], "add": [20, 43, 54, 64], "basewidget": [21, 22, 23, 24, 38, 41, 42, 53, 55], "default_dir": [21, 22, 23, 60], "acc_idx": [21, 22, 23, 55], "channel": [21, 22, 23, 24, 28, 33, 35, 37, 38, 41, 43, 44, 49, 50, 53, 54, 58, 59, 61, 63, 64], "connect_sign": [21, 22, 23], "isr": [21, 22, 23, 55], "uicreate_combobox": [21, 22], "uicreate_groupbox": [21, 22], "uicreate_label": [21, 22], "uigetgraph": [21, 22], "graph": [21, 22, 24, 25, 31, 35, 38, 40, 49, 50, 53, 54, 58, 64], "doubleclick": [21, 22, 31], "inflin": [21, 22], "fmt": [21, 22], "setfloat": [21, 22], "updategraph": [21, 22], "unit": [21, 22, 39, 64], "ave_mstdx": [21, 22], "ave_mstdi": [21, 22], "ave_pstdx": [21, 22], "ave_pstdi": [21, 22], "avex": [21, 22], "avei": [21, 22], "data_sigx": [21, 22], "data_sigi": [21, 22], "p2px": [21, 22], "p2py": [21, 22], "ref_sigx": [21, 22], "ref_sigi": [21, 22], "set_enbl_list": [21, 22], "set_vis": [21, 22], "some_chang": [21, 22], "stdx": [21, 22], "stdy": [21, 22], "update_graph": [21, 22], "corrector": [21, 23, 31, 32, 55], "correctorswidget": [21, 22], "add_rf_kick": [21, 22], "add_kicklimits_curv": [21, 22], "get_default_ctrl": [21, 22], "orbit": [21, 23, 55, 58], "multiturnsumwidget": [21, 22], "ratio_sum_avg": [21, 22], "ratio_sum_std": [21, 22], "multiturnwidget": [21, 22], "hideev": [21, 22], "setreforbit": [21, 22], "showev": [21, 22], "orbitwidget": [21, 22], "add_buttons_for_imag": [21, 22], "singlepasssumwidget": [21, 22], "new_data_sig": [21, 22], "process_imag": [21, 22, 28, 41, 43], "showmatrixwidget": [21, 22], "singularvalu": [21, 22], "ioc_control": 21, "basecombo": [21, 23], "ioc_orbit_chang": [21, 23], "setup_ui": [21, 23], "baseobject": [21, 23, 55, 58], "create_pair": [21, 23], "create_pair_butl": [21, 23], "create_pair_sel": [21, 23], "drive_window": 21, "drivecontrol": [21, 23], "kicks_config": 21, "kicksconfigwidget": [21, 23], "get_details_widget": [21, 23], "get_status_widget": [21, 23, 60], "performancewidget": [21, 23], "refcontrol": [21, 23], "sofbcontrol": [21, 23], "get_auto_correction_widget": [21, 23], "get_correction_widget": [21, 23], "get_fofb_widget": [21, 23], "get_main_widget": [21, 23, 55], "get_manual_correction_widget": [21, 23], "get_orbit_widget": [21, 23], "orbit_acquisit": 21, "acqcontrolwidget": [21, 23], "respmatwidget": [21, 23, 55], "get_measurement_widget": [21, 23], "get_saveload_widget": [21, 23, 60], "get_selection_lists_widget": [21, 23, 55], "get_singular_values_widget": [21, 23], "respmat_enbllist": 21, "selectionmatrix": [21, 23, 55], "singleselmatrix": [21, 23, 55], "connection_chang": [21, 23, 35, 58, 64], "get_head": [21, 23, 55, 64], "get_posit": [21, 23, 55, 64], "get_widget": [21, 23, 55, 64], "send_valu": [21, 23, 50, 58, 64], "sizehint": [21, 23, 64], "value_chang": [21, 23, 31, 33, 35, 38, 48, 50, 58, 59, 64], "statuswidget": [21, 23], "creategroupbox": [21, 23], "orbitregist": 21, "idx": [21, 22, 42, 64], "home": [21, 22, 23, 60, 64], "share": [21, 22, 60], "screen": [21, 22, 25, 27, 43, 50, 60], "ioc": [21, 22, 60, 62], "max_bump_curr": 21, "getorbx": 21, "getorbi": 21, "new_orbx_sign": 21, "new_orby_sign": 21, "new_string_sign": 21, "orbx": 21, "orbi": 21, "nr_regist": 21, "get_registers_control": 21, "displnai": 22, "is_orb": [22, 23], "orb_tp": 22, "lab": 22, "pln": [22, 23], "siriuswaveformplot": [22, 28, 31, 35, 40, 58, 59, 64], "ev": [22, 35, 38, 64], "conv": 22, "po": [22, 24, 53, 54, 64], "infinitelin": 22, "2f": 22, "val": [22, 24, 48], "qobject": [22, 64, 65], "worker": 22, "1e": [22, 55, 58], "enbl": [22, 37], "boo": 22, "text": [22, 35, 38, 54, 64, 65], "orbtyp": 22, "sum": [22, 58], "csorb": 22, "sig": 22, "orb": [22, 23], "siriusspectrogramview": [22, 28, 64], "img": 22, "displai": [22, 23, 38, 48, 49, 50, 54, 64], "line": [22, 32, 35, 38, 40, 53, 57, 64], "setpoint": [23, 54, 58, 64], "readback": [23, 54], "qcombobox": [23, 58, 64], "pydmprimitivewidget": [23, 38, 64], "add_item": 23, "acceler": [23, 55, 62], "ring": [23, 32, 55], "pvname": [23, 39, 45, 47, 55, 62, 64, 65], "is_vert": 23, "rule": [23, 55, 64], "runner": [23, 60, 64], "matric": [23, 55], "bpm": [23, 24, 49, 55, 58], "dev": [23, 44, 53, 55], "selectionmatrixwidget": [23, 64], "pydmwidget": [23, 33, 35, 58, 64], "new_conn": [23, 58], "callback": [23, 33, 38, 58, 64], "invok": [23, 33, 38, 58, 64], "when": [23, 33, 35, 38, 43, 57, 58, 64], "act": [23, 58], "enabl": [23, 31, 54, 58, 62, 64], "disabl": [23, 31, 54, 58, 62, 64], "also": [23, 38, 58, 64], "trigger": [23, 24, 30, 35, 38, 41, 58, 64], "alarm": [23, 54, 58, 62, 64], "alarm_disconnect": [23, 58], "disconnect": [23, 58, 64], "should": [23, 55, 64], "top_head": [23, 55, 64], "tupl": [23, 55, 64], "side_head": [23, 55, 64], "side": [23, 55, 64], "posit": [23, 27, 48, 49, 50, 54, 55, 58, 64], "layout": [23, 43, 48, 50, 54, 55, 64], "put": [23, 45, 47, 64], "other": [23, 43, 64], "new_val": [23, 33, 35, 50, 58, 64], "bool": [23, 33, 38, 43, 58, 64], "np": [23, 33, 38, 58, 64], "ndarrai": [23, 24, 33, 38, 57, 58, 64], "depend": [23, 33, 37, 38, 54, 58, 64], "basegraph": 24, "data_prefix": 24, "alia": [24, 35, 61, 63, 64], "mywidget": 24, "data_class": 24, "curveatindex": 24, "setlabel": 24, "setupgraph": [24, 54], "basic_rul": 24, "get_pvnam": [24, 38, 41, 42], "propti": [24, 38, 42, 43, 55], "is_data": 24, "graphtim": [24, 53], "addychannel": [24, 64], "opt": 24, "graphwav": [24, 53], "addchannel": [24, 54], "get_custom_widget_class": 24, "acqdatasummari": 24, "bpm_list": 24, "create_graph": 24, "wid": 24, "typ": 24, "bpmsummari": 24, "selectbpm": 24, "bpmmain": 24, "monitdata": 24, "bpmadvancedset": 24, "get_acqrate_prop": 24, "bpmhardwareset": 24, "pbpmhardwareset": 24, "paramsset": 24, "polyset": 24, "rffeadvancedset": 24, "triggerslauncherwidget": 24, "acqcor": [24, 55], "acq": 24, "pm": 24, "bpmbasetriggeredacquisit": 24, "acqbasewindow": [24, 55], "bpmgenacquisit": 24, "gener": [24, 31, 35, 48, 53, 54, 56, 58, 59], "gen": [24, 54], "bpmpmacquisit": 24, "post": 24, "mortem": 24, "pbpmbasetriggeredacquisit": 24, "photon": 24, "pbpmgenacquisit": 24, "pbpm": 24, "pbpmpmacquisit": 24, "dcct": 25, "dcctmonitor": 25, "resetrawbuff": 25, "smooth": 25, "setrawdownsampl": 25, "new_valu": [25, 31, 32, 33, 35, 38, 48, 59, 64], "sampl": 25, "downsampl": 25, "setrawsmoothmethod": 25, "new_method": 25, "perform": [25, 64], "raw": [25, 53], "setrawsmoothnracq": 25, "smoothbuffers": 25, "length": 25, "updateparam": 25, "visual": 25, "accord": [25, 38, 43, 64], "updaterawxaxi": 25, "x": [25, 28, 50, 64], "axi": [25, 39, 48, 50, 57, 64], "waveform": [25, 57, 64], "effmonitor": 25, "dcctmain": 25, "siselectdcct": 25, "get_dcct_list": 25, "dcctset": 25, "dcctsettingsdetail": 25, "ict": 26, "ictmonitor": 26, "histori": 26, "ictsummari": 26, "scrnsummari": 27, "scrn": 27, "selectscrn": 27, "get_scrn_list": 27, "siriusscrnview": [27, 43], "individualscrn": 27, "camera": 27, "To": [27, 32, 64], "grid": [27, 43], "correctli": 27, "calibrationgrid_flag": 27, "which": [27, 54, 64], "indic": 27, "calibr": [27, 43], "you": [27, 57, 64], "can": [27, 43, 57, 64], "slot": [27, 28, 64], "updatecalibrationgridflag": 27, "save_fil": 27, "new_stat": 27, "scrncalibrationset": 27, "scrnsettingsdetail": 27, "situnemonitor": 28, "descript": 28, "long": 28, "use_color_label": 28, "qevent": 28, "tunecontrol": 28, "h": [28, 64], "background": [28, 37, 64], "situnemarkerdetail": 28, "isdelta": 28, "marker": [28, 64], "tunedetail": 28, "tunespectracontrol": 28, "tunespectraview": 28, "view": [28, 44, 50, 55, 61, 63, 64], "receivedatah": 28, "curv": [28, 54, 57, 58, 64], "receivedatav": 28, "v": [28, 50, 54, 64], "showtuneh": 28, "showtunev": 28, "togglexchannel": 28, "toggl": [28, 64], "between": [28, 58], "freqarrai": 28, "tunefracarrai": 28, "botunespectrogram": 28, "buffer_curr_s": 28, "buffer_data_s": 28, "buffer_size_chang": 28, "getdataindex": 28, "new_data": 28, "idx2send_chang": 28, "image_value_chang": [28, 64], "new_imag": [28, 64], "resetbuff": 28, "setbuffers": [28, 64], "new_siz": 28, "averag": 28, "setindex2send": 28, "new_idx": 28, "botunespectrogramcontrol": 28, "update_buffs": 28, "update_idx2plot": 28, "vlightcam": 29, "vlightcamview": 29, "vlight": 29, "cam": 29, "viewer": 29, "conv_sec_2_devic": 29, "test": [30, 32], "power": [30, 31, 32, 34, 35, 53, 59, 65], "suppli": [30, 31, 32, 34, 35, 65], "pscmdwindow": 30, "p": [30, 31, 33, 34, 35, 65], "evt": [30, 34], "basetask": [30, 34], "is_test": 30, "complet": [30, 34, 45, 46, 54, 64], "currentitem": [30, 34, 45, 46, 64], "must": [30, 34, 64], "itemdon": [30, 34, 45, 46, 64, 65], "checkcapbankvolt": 30, "capacitor": 30, "bank": 30, "voltag": [30, 33], "dclink": [30, 31], "checkcomm": 30, "commun": 30, "checkctrlloop": 30, "ctrlloop": [30, 33, 35], "checkcurr": 30, "checkidffmod": 30, "idffmod": [30, 31, 33], "checkinitok": 30, "initi": [30, 34, 64], "checkintlk": 30, "interlock": [30, 33, 52, 58, 59, 62], "checkopmod": 30, "opmod": [30, 31, 33, 35], "checkpuls": 30, "puls": [30, 36, 53], "checkpwrstat": 30, "pwrstate": [30, 33, 35], "checksofbmod": 30, "sofbmod": [30, 31, 33], "checkstatu": 30, "checktriggerst": 30, "restore_initial_valu": 30, "di": [30, 61, 63], "triggertask": 30, "magnet": [30, 31, 32, 33, 36, 64], "checkvoltag": 30, "createtest": 30, "tester": 30, "resetintlk": 30, "setcapbankvolt": 30, "setctrlloop": 30, "setcurr": 30, "setidffmod": 30, "setopmod": 30, "setpuls": 30, "setpwrstat": 30, "setsofbmod": 30, "settriggerst": 30, "setvoltag": 30, "initial_triggers_st": 30, "control_widget": 31, "basepscontrolwidget": 31, "get_summary_widget": [31, 32], "show_connect": [31, 32, 35, 36, 62], "pscontain": [31, 32], "update_visible_prop": [31, 32], "controlwidgetfactori": 31, "factori": [31, 32, 33], "dipolecontrolwidget": 31, "bodipolecontrolwidget": [31, 32], "lispectcontrolwidget": [31, 32], "sidipolecontrolwidget": [31, 32], "tbdipolecontrolwidget": [31, 32], "tsdipolecontrolwidget": [31, 32], "famquadrupolecontrolwidget": 31, "bofamquadrupolecontrolwidget": [31, 32], "liquadrupolecontrolwidget": [31, 32], "sifamquadrupolecontrolwidget": [31, 32], "tbquadrupolecontrolwidget": [31, 32], "tsquadrupolecontrolwidget": [31, 32], "run_test": [31, 32], "famsextupolecontrolwidget": 31, "bofamsextupolecontrolwidget": [31, 32], "sifamsextupolecontrolwidget": [31, 32], "fastcorrectorcontrolwidget": 31, "sifastcorrectorcontrolwidget": [31, 32], "idffcorrectorcontrolwidget": 31, "lenscontrolwidget": 31, "itlenscontrolwidget": [31, 32], "lilenscontrolwidget": [31, 32], "septffcorrectorcontrolwidget": 31, "siseptffcorrectorcontrolwidget": [31, 32], "skewquadcontrolwidget": 31, "boskewquadcontrolwidget": [31, 32], "siskewquadcontrolwidget": [31, 32], "slowcorrectorcontrolwidget": 31, "boslowcorrectorcontrolwidget": [31, 32], "lislowcorrectorcontrolwidget": [31, 32], "sislowcorrectorcontrolwidget": [31, 32], "tbslowcorrectorcontrolwidget": [31, 32], "tsslowcorrectorcontrolwidget": [31, 32], "solenoidcontrolwidget": 31, "lisolenoidcontrolwidget": [31, 32], "trimallcontrolwidget": 31, "sitrimallcontrolwidget": [31, 32], "trimfamcontrolwidget": 31, "sitrimfamcontrolwidget": [31, 32], "detail_widget": 31, "detailwidgetfactori": 31, "interlockwindow": 31, "interlocklistwidget": [31, 33], "interlockwidget": [31, 33], "liinterlockwindow": [31, 33], "bit_map": [31, 33], "color_map": [31, 33, 64], "psdetailwidget": 31, "customlabel": [31, 33], "dclinkdetailwidget": [31, 33], "facdclinkdetailwidget": [31, 33], "fbpdclinkdetailwidget": [31, 33], "fastcorrpsdetailwidget": [31, 33], "lipsdetailwidget": [31, 33], "psauxmeaswidget": [31, 33], "auxdev2moddict": [31, 33], "basicparam": [31, 33], "psparamswidget": [31, 33], "lispectintlkl": [31, 33], "filterlog": [31, 33], "subsect": [31, 32], "tab": [31, 48, 49, 53, 64], "psname": [31, 33, 34, 35], "psmodel": [31, 33], "pstype": [31, 33, 35], "element": [31, 53, 54, 64], "quadrupol": [31, 32], "sextupol": [31, 32], "slow": [31, 32, 59], "skew": [31, 32], "IT": [31, 51], "len": [31, 32], "li": [31, 32, 33, 51, 52, 53], "solenoid": 31, "spectromet": 31, "tabnam": 31, "fast": [31, 32], "septff": 31, "septa": 31, "ff": [31, 57], "trim": [31, 32], "tabfil": 31, "summaryhead": 31, "visible_prop": 31, "acc_clear": 31, "bbbname": 31, "ctrlloop_clos": 31, "loop": [31, 53], "ctrlloop_open": 31, "devnam": [31, 33, 36], "fillwidget": 31, "get_detail_button": 31, "get_trim_button": 31, "idffmode_off": 31, "turn": 31, "off": [31, 33, 54, 64], "idffmode_on": 31, "pulse_off": 31, "pulse_on": 31, "set_accfreeze_frozen": 31, "accfreez": 31, "frozen": 31, "set_accfreeze_unfrozen": 31, "unfrozen": 31, "set_opmode_slowref": 31, "slowref": 31, "sofbmode_off": 31, "sofbmode_on": 31, "turn_off": 31, "turn_on": 31, "udcnam": 31, "udc": 31, "update_param": 31, "wfmupdate_off": 31, "wfmupdateauto": [31, 33], "wfmupdate_on": 31, "get_analog_nam": 31, "get_prop2label": 31, "get_prop2width": 31, "get_strength_nam": 31, "sort_propti": 31, "graphwidget": 31, "pslist": [31, 64, 65], "idxini": 31, "idxfin": 31, "4000": 31, "legend": [31, 54, 58, 64], "plotwfmerrorwindow": 31, "contain": [31, 36, 43, 54, 64], "quad": 32, "transport": 32, "psname_list": 32, "famili": 32, "storag": 32, "idff": [32, 57], "injector": 32, "linac": [32, 49, 50], "sked": 32, "corretor": 32, "inform": [33, 50, 53, 54], "bit": [33, 35, 50, 64], "auxdev": 33, "auxdev2mod": 33, "intlksignalin": 33, "mon": [33, 35, 58, 62], "intlksignalout": 33, "intlkwarn": 33, "intlkrdsignalinmask": 33, "qtgui": [33, 35, 54, 59, 64], "qcolor": [33, 35, 54, 59, 64], "intlkrdsignaloutmask": 33, "keep_unit": [33, 38, 54, 59, 64], "siriuslabel": [33, 38, 54, 59, 64], "accordingli": [33, 35, 38, 64], "_basedetailwidget": 33, "auxmea": 33, "mod2dbas": 33, "b": [33, 64], "1a": 33, "1b": 33, "1c": 33, "2a": 33, "2b": 33, "2c": 33, "version": [33, 64], "cte": [33, 62], "abort": [33, 62], "wfmupdat": 33, "timestampboot": 33, "timestampupd": 33, "sel": [33, 35, 62, 64], "st": [33, 35, 62], "ctrlmode": [33, 35], "sp": [33, 35, 54, 62], "rb": [33, 35, 58, 62], "currentref": [33, 35], "cycleenbl": [33, 35], "cycleindex": 33, "cycletyp": 33, "cyclenrcycl": 33, "cyclefreq": 33, "cycleampl": 33, "cycleoffset": 33, "cycleauxparam": 33, "wfmindex": 33, "wfmsyncpulsecount": [33, 35], "sofbupd": 33, "pructrlqueues": [33, 35], "syncpuls": 33, "wfm": 33, "wfmref": 33, "voltageref": 33, "capacitorbankvoltag": 33, "capacitorbankvoltageref": 33, "scopesrcaddr": 33, "scopefreq": 33, "scopedur": 33, "wfmsyncmod": 33, "wfmfreq": 33, "wfmgain": 33, "wfmoffset": 33, "filter": [33, 35, 38, 43, 64], "qled": 33, "spect": 33, "cycl": [34, 65], "cyclewindow": 34, "checked_acc": 34, "adv_mod": 34, "qcloseev": [34, 64], "myprogressbar": 34, "qprogressbar": 34, "increment": [34, 64], "updateprogressbar": 34, "durat": [34, 38], "need_control": 34, "isadv": 34, "maximum": [34, 43, 64], "done": [34, 64], "error": 34, "createcycl": 34, "cycler": 34, "cycletrim": 34, "preparepscurrentzero": 34, "prepar": 34, "supli": 34, "preparepsidffmod": 34, "preparepsopmodecycl": 34, "preparepsopmodeslowref": 34, "preparepsparam": 34, "preparepssofbmod": 34, "preparetim": 34, "restoretim": 34, "restor": 34, "savetim": 34, "verifyp": 34, "verifi": 34, "readi": 34, "diagnost": [35, 49, 50], "logitemdeleg": 35, "logtabl": 35, "label2width": 35, "is_statu": 35, "qtreeview": 35, "add_log": 35, "add_log_slot": 35, "alarm_severity_chang": [35, 64], "new_alarm_sever": [35, 64], "conn": [35, 43, 64], "remove_log": 35, "remove_log_slot": 35, "myledmultichannel": 35, "myle": 35, "myledmulticonnect": 35, "psdiag": 35, "create_led_class": 35, "multichannel": 35, "init_tooltip": 35, "pydml": [35, 38, 64], "default_colorlist": [35, 64], "mousepressev": [35, 40, 54, 64], "receiv": [35, 38, 64], "For": [35, 64], "standard": [35, 43, 64], "behaviour": [35, 64], "red": [35, 54, 64], "green": [35, 64], "treat": [35, 64], "extract": [35, 64], "chosen": [35, 64], "psmonitor": 35, "get_label2devices_method": 35, "get_dev2sublabels_method": 35, "get_col2devcount_method": 35, "get_sec2devlaypos_method": 35, "psgraph": 35, "y_data": [35, 58], "symbol": [35, 58, 59, 64], "blue": [35, 40, 64], "mousemoveev": [35, 64], "sector": 35, "tooltip": [35, 58], "x_data": [35, 58], "psgraphdevicesselwidget": 35, "matype_chang": 35, "psnames_chang": 35, "psgraphmonwidget": 35, "return_menu": 35, "proplinechang": 35, "propsymbchang": 35, "psnameschang": 35, "update_property_lin": 35, "update_property_symb": 35, "update_psnam": 35, "psgraphmonwindow": 35, "psgraphproptyselwidget": 35, "prop_line_default": 35, "diagcurrentdiff": 35, "prop_line_fastcorr": 35, "prop_symb_default": 35, "diagstatu": 35, "intlksoft": 35, "intlkhard": 35, "prop_symb_fastcorr": 35, "alarmsamp": 35, "alarmsampltc": 35, "change_matyp": 35, "magfunc": 35, "ma": 35, "propty_line_chang": 35, "propty_symb_chang": 35, "get_col2dev_count": 35, "get_dev2sub_label": 35, "modulet": 36, "manget": 36, "pucontrolwindow": 36, "is_main": [36, 51, 64], "main_sec": 36, "mangnet": 36, "pudetailwidget": 36, "pudetailwindow": 36, "rfmaincontrol": 37, "overview": 37, "rfenbldsblbutton": 37, "dsbl": 37, "rftitlefram": 37, "specif": [37, 39, 48, 64], "baselist": 38, "prop": [38, 53], "obj_nam": 38, "has_search": 38, "props2search": 38, "customgroupbox": 38, "templat": [38, 54], "high": [38, 55], "level": [38, 55, 64], "filter_column": 38, "filter_lin": 38, "regexp": 38, "getcolumn": 38, "getlin": 38, "qgroupbox": [38, 54, 59], "hltriggerdetail": 38, "hltriggerlist": 38, "hltriggersimpl": 38, "delai": [38, 46], "delayraw": 38, "widthraw": 38, "nrpuls": 38, "src": 38, "deltadelai": 38, "deltadelayraw": 38, "lltrigger": 38, "hltrigger": 38, "evg": [38, 48], "timingmain": 38, "setev": 38, "setglobalparamet": 38, "settrigg": 38, "setupmenu": 38, "afc": 38, "afcoutlist": 38, "lltriggerlist": 38, "intern": [38, 64], "bucketlist": 38, "min_siz": 38, "25": [38, 64], "show_graph": 38, "bucketlistgraph": 38, "bucket": 38, "bucketlistlabel": 38, "bucketlistlineedit": 38, "actual": 38, "input": [38, 64], "set_displai": 38, "clocklist": 38, "low": 38, "_evr_ev": 38, "evgfoutoutlist": 38, "evr": 38, "evrevedilist": 38, "evreveotplist": 38, "evreveoutlist": 38, "output": [38, 64], "eventlist": 38, "fout": 38, "hlbutton": 38, "llbutton": 38, "link": 38, "monitorhl": 38, "monitorl": 38, "drawarrow": 38, "p1": 38, "p2": 38, "drawlin": 38, "angl": 38, "tip": 38, "paintev": [38, 54, 64], "qpaintev": 38, "setupdown": 38, "down": 38, "monitorwindow": 38, "evgcontinuousbutton": 38, "pydmstatebutton": [38, 50, 64], "continu": 38, "evgcontinuousl": 38, "evginjectionbutton": 38, "evginjectionl": 38, "evgupdateevtbutton": 38, "evgupdateevtl": 38, "beamlin": [39, 62], "blintckctrl": 39, "beamline_open": 39, "gamma_en": 39, "bl": 39, "imgproc": 39, "dvfimageview": 39, "pydmimageview": [39, 43], "add_fit_ellips": 39, "add_fit_ellipse_connect": 39, "add_fit_mean": 39, "add_fit_mean_connect": 39, "add_prefix": 39, "sufix": [39, 54], "add_roi": 39, "add_roi_connect": 39, "plot_fit_ellips": 39, "plot_fit_mean": 39, "plot_roi": 39, "blimgproc": 39, "dvf": 39, "create_box_group": 39, "pv_info": 39, "create_time_widget": 39, "create_widget": 39, "end_processing_cmd": 39, "format_datetime_lbl": 39, "generate_pv_nam": 39, "intlk_cmd": 39, "select_widget": 39, "widget_typ": 39, "setpoint_readback_widget": 39, "sprb_type": 39, "start_processing_cmd": 39, "toggle_beamline_btn": 39, "update_bl_open_statu": 39, "choos": 40, "customtablewidgetitem": 40, "qtablewidgetitem": 40, "auxiliar": 40, "sortabl": 40, "numer": [40, 64], "graphkick": 40, "xdata": 40, "ydata": 40, "tooltip_nam": 40, "c0": 40, "kick": [40, 55], "mytablewidget": 40, "show_menu_fun": 40, "open_window_fun": 40, "qtablewidget": 40, "contextmenu": 40, "e": [40, 64], "spinboxdeleg": 40, "mini": [40, 64], "maxi": [40, 64], "prec": 40, "qstyleditemdeleg": 40, "draw": [40, 54, 64], "spinbox": 40, "displaytext": 40, "local": 40, "qlocal": 40, "setmodeldata": 40, "updateeditorgeometri": 40, "geometri": 40, "afc_acq_cor": 41, "code": [41, 45], "document": [41, 45], "logicaltrigg": [41, 42], "get_trigger_groupbox": [41, 42], "physicaltrigg": [41, 42], "cam_basl": 41, "siriusimageview": [41, 43], "roioffsetxchannel": [41, 43, 64], "roioffsetychannel": [41, 43, 64], "calibrationgrid": [41, 43], "calibration_grid_filterfactor": [41, 43], "calibration_grid_removebord": [41, 43], "failtosavegrid": [41, 43], "image_maxheight": [41, 43], "image_maxheight_chang": [41, 43], "image_maxwidth": [41, 43], "image_maxwidth_chang": [41, 43], "image_roioffsetx_chang": [41, 43], "image_roioffsety_chang": [41, 43], "maxheightchannel": [41, 43], "maxwidthchannel": [41, 43], "receiveddata": [41, 43], "roioffsetx_connection_state_chang": [41, 43, 64], "roioffsety_connection_state_chang": [41, 43, 64], "savecalibrationgrid": [41, 43], "set_calibration_grid_border2remov": [41, 43], "set_calibration_grid_filterfactor": [41, 43], "showcalibrationgrid": [41, 43], "create_propty_layout": [41, 43], "baslercamacqadvset": [41, 43], "baslercamset": [41, 43], "diff_ctrl": 41, "diffctrldevmonitor": [41, 44, 61, 63], "updatedevwidget": [41, 44, 61, 63], "diffctrlview": [41, 44, 61, 63], "device_class": [41, 44, 61, 63], "device_prefix": [41, 44, 61, 63], "diffctrldetail": [41, 44], "checker": [41, 45], "connector": [41, 45, 64], "getter": [41, 45, 64], "setter": [41, 45, 64], "wait": [41, 45, 47], "trig_tp": 42, "logic": 42, "physic": 42, "image_channel": [43, 64], "width_channel": 43, "offsetx_channel": 43, "offsety_channel": 43, "maxwidth_channel": 43, "maxheight_channel": 43, "pyqtproperti": [43, 64], "fget": [43, 64], "fset": [43, 64], "freset": [43, 64], "fdel": [43, 64], "doc": [43, 64], "design": [43, 64], "scriptabl": [43, 64], "final": [43, 64], "notifi": [43, 64], "It": [43, 64], "writabl": [43, 64], "same": [43, 54, 64], "those": [43, 64], "requir": [43, 64], "python": [43, 64], "behav": [43, 64], "both": [43, 50, 64], "decor": [43, 64], "ones": [43, 64], "numpi": [43, 57, 64], "arrai": [43, 57, 64], "origin": [43, 64], "factor": [43, 58, 64], "pixel": 43, "smaller": 43, "than": 43, "filterfactor": 43, "img_maxdata": 43, "zero": [43, 50, 64], "border": 43, "height": [43, 64], "new_max": 43, "maxheight": 43, "max": [43, 58, 62], "width": [43, 54, 64], "maxwidth": 43, "new_offset": [43, 64], "roioffsetx": [43, 64], "new_offsetx": [43, 64], "roi": [43, 50, 64], "offset": [43, 59, 64], "roioffseti": [43, 64], "new_offseti": [43, 64], "calibration_grid_imag": 43, "over": 43, "image_waveform": 43, "propty_typ": 43, "hbox": 43, "29": [43, 64], "use_linedit": 43, "qtabwidget": [43, 64], "scraper": [44, 61], "slit": [44, 63], "diff": [44, 53], "illustr": [44, 61, 63], "diffctrl": 44, "pos_label": 44, "neg_label": 44, "epicscheck": [45, 46], "itemcheck": [45, 46, 64], "epicsconnector": [45, 46], "epicsgett": [45, 46], "itemnotread": [45, 46], "itemread": [45, 46], "epicssett": [45, 46], "epicstask": [45, 46], "get_pv": [45, 46], "epicswait": [45, 46], "timeout": [45, 46, 47, 64], "cls_epic": 46, "ha": [46, 48, 64], "proper": [46, 64], "work": [46, 64], "progressdialog": [46, 64, 65], "defval": 46, "exit": 46, "pvn": 46, "wait_tim": 46, "wrap": 47, "do": [47, 64], "bypassbtn": 48, "redefin": 48, "protect": [48, 64], "mpscontrol": 48, "changewid": 48, "clearlayout": 48, "lai": [48, 53, 54], "eras": 48, "controlbox": [48, 53], "has_titl": 48, "wid_typ": [48, 50, 53, 54], "featur": [48, 64], "box": 48, "controlhiddenbox": 48, "cb_glai": 48, "hidden": [48, 64], "controlwidget": 48, "countgen": 48, "counter": 48, "water": 48, "counttemp": 48, "temperatur": 48, "countva": 48, "vaccum": [48, 54], "countwat": 48, "dispayallcontrol": 48, "dispayhiddencontrol": 48, "displaycontrolmp": 48, "tab_typ": 48, "desir": [48, 64], "displaygroup": 48, "pv_data": 48, "group_typ": 48, "mp": 48, "group": [48, 50, 54, 64], "displayhead": 48, "displaympsgroup": 48, "displaytab": 48, "displaytempgroup": 48, "eventfilt": [48, 53, 54], "obj_wid": 48, "hover": 48, "listen": 48, "gatevalv": 48, "gate": 48, "valv": 48, "genstringtemppv": 48, "prefix_num": 48, "name_num": 48, "getctrlwidget": 48, "ctrl_type": 48, "getdevicenam": 48, "getpvconfig": 48, "getpvcontrol": 48, "is_control": 48, "getparamal": 48, "getsingletitl": 48, "singl": [48, 50, 53, 54, 64], "gettempwidget": 48, "temp_typ": 48, "setparamlabel": 48, "setpvlbl": 48, "settemphead": 48, "item_list": 48, "settitlelabel": 48, "statusbox": 48, "tempmonbox": 48, "updatecount": 48, "mpsmonitor": 48, "digbeamposproc": 49, "device_nam": 49, "digit": [49, 64], "processor": 49, "creategraph": 49, "graph_data": [49, 50], "build": [49, 50, 53, 54, 64], "dataitem": 49, "info": [49, 53, 54, 58, 59], "display_data": 49, "pos_x": [49, 54], "pos_i": 49, "display_graph": 49, "display_head": 49, "display_maindata": 49, "display_secdata": 49, "secondari": 49, "display_selector": 49, "selector": 49, "selectionitem": [49, 50], "generalfunct": 50, "getpvnam": 50, "setbasicinfo": 50, "basic": [50, 53, 54, 55, 64], "compon": [50, 64], "setrbvobj": 50, "pv_prefix": 50, "format": [50, 54, 64], "rbv": [50, 53], "setsinglescrn": 50, "setwidgettyp": 50, "libeamprofil": 50, "profil": 50, "buildstack": 50, "stack_typ": 50, "stack": [50, 64], "getscrnselbtn": 50, "getstackitem": 50, "imageview": [50, 53, 54, 64], "radiobtnclick": 50, "radio": 50, "savestack": 50, "futur": 50, "setlight": 50, "light": [50, 64], "setmotorsconfig": 50, "motor": [50, 53, 62], "setpanelinfo": 50, "panel": 50, "setscrnhead": 50, "setscrninfo": 50, "setscrnpanel": 50, "setscrnselect": 50, "selection_info": 50, "setsinglescrninfo": 50, "setzeroopt": 50, "roiviewwindow": 50, "rotate_chart": 50, "x_arrai": 50, "rotat": 50, "y": [50, 57, 64], "scrnandproj": 50, "project": 50, "setgraph": 50, "setgraphinfo": 50, "graph_info": 50, "setroiinfo": 50, "roi_data": 50, "invert": [50, 64], "rederiv": [50, 59], "egun": 51, "ittiwidget": 51, "liegunwindow": 51, "is_it": 51, "modemerstopdialog": 52, "emerg": 52, "stop": [52, 62, 64], "modintlkdetaildialog": 52, "limodltrwindow": 52, "llrf": 53, "chartmon": 53, "chartsmon": [53, 54], "chartwindow": [53, 54], "chart_typ": 53, "forward": 53, "chartsiqamppha": 53, "chartspulseamppha": 53, "amplitud": 53, "phase": [53, 62], "lillrf": 53, "main_dev": 53, "qualnam": 53, "start": [53, 62, 64], "boundari": 53, "intenum": 53, "kly1": 53, "kly2": 53, "shb": 53, "deviceparamsettingwindow": 53, "llrfmain": 53, "basicinfobox": 53, "buildchartmonitor": 53, "builddeviceswidget": 53, "arrang": 53, "buildlin": 53, "buildpvnam": 53, "pvprefix": 53, "pvsufix": 53, "buildtab": 53, "obj": [53, 54, 59, 64], "rel": [53, 54, 64], "formatlabel": 53, "pv_type": 53, "motorcontrolbtn": 53, "showchartbtn": 53, "motorcontrolwindow": 53, "motor_typ": 53, "hpp": 53, "basicdata": 53, "buildl": [53, 54], "getwidget": [53, 54], "infobox": 53, "besid": 53, "ledbox": 53, "main_titl": 53, "basenam": 53, "dict": [53, 54, 64], "pidbox": 53, "rbvbox": 53, "deltaiqphasecorrbutton": 53, "show_label": 53, "graphivsq": 53, "ch1": 53, "q": 53, "ixq": 53, "amp": 53, "ccg": 54, "basefunctionsinterfac": 54, "id_num": 54, "three": 54, "buildlist": 54, "cat": 54, "selwindow": 54, "click": [54, 64], "setupalldevic": 54, "vgc": 54, "setupipscontrol": 54, "simpl": [54, 64], "ip": 54, "setupipslistdet": 54, "setupvgclistdet": 54, "widgetlist": 54, "ipsdetailwindow": 54, "buildgroup": 54, "buildipsdetail": 54, "measur": [54, 64], "vgcdetailwindow": 54, "buildvgctabl": 54, "setupdevic": 54, "col": 54, "infom": 54, "vacuum": 54, "sprbwidget": 54, "kp_unit": 54, "precis": [54, 64], "sec_wid": 54, "buildalllegend": 54, "listleg": 54, "ok": [54, 65], "gaug": 54, "ON": 54, "inconsist": 54, "prg": 54, "relai": 54, "pressur": 54, "n": [54, 64], "forc": [54, 64], "activ": 54, "clear": [54, 64], "buildbasicgroup": 54, "anc": 54, "buildipsinfo": 54, "buildidnam": 54, "is_valv": 54, "buildidsvac": 54, "ident": 54, "id": [54, 57, 62, 64], "sufix_list": 54, "comp": [54, 64], "buildvacpv": 54, "getgrouptitl": 54, "getlayout": 54, "g": [54, 64], "getlayoutwidget": 54, "insid": [54, 64], "getprogressbar": 54, "limit": [54, 58, 62, 64], "progress": [54, 65], "bar": [54, 64, 65], "getsptabl": 54, "num": 54, "show_titl": 54, "getsimplepvwidget": 54, "suf": 54, "getsufix": 54, "getvacposit": 54, "id_vgc": 54, "divid": 54, "getvgcl": 54, "suf_list": 54, "getvgcsprb": 54, "setwindowbtn": 54, "setuplegend": 54, "present": 54, "variabl": 54, "setupunitview": 54, "00000000": 54, "min_width": [54, 64], "getshap": [54, 64], "shape": [54, 64], "headerwidget": 54, "vacuummain": 54, "buildalllegendsrel": 54, "buildvacinfo": 54, "getgroupwidget": 54, "saverelwid": 54, "coord": 54, "savewidtolist": 54, "setupbutton": 54, "setupipslist": 54, "setuplist": 54, "setupmainwidget": 54, "setupvgclist": 54, "about": [54, 64], "special": [54, 64], "ledlegend": 54, "ffffff": [54, 64], "drawsinglel": 54, "pydmledmultiincosistencydetector": 54, "channels2valu": [54, 64], "color_list": [54, 64], "lightgreen": [54, 64], "yellow": [54, 64], "qgroupboxbutton": 54, "clickabl": 54, "groupbox": 54, "emit": [54, 64], "um2m": 55, "um2nm": 55, "1000": [55, 58, 64], "urad2rad": 55, "get_fofb_icon": 55, "icon": [55, 57, 59, 62, 64], "bpmswmodewidget": 55, "switch": 55, "controllersdetaildialog": 55, "tab_select": 55, "psconfigwidget": 55, "servconf": 55, "reforbwidget": 55, "refer": [55, 58, 64], "statusdialog": 55, "detail_button": 55, "corrgainwidget": 55, "gain": 55, "kickwidget": 55, "matrixwidget": 55, "reforbviewwidget": 55, "reforb": 55, "fofb": 55, "identif": 55, "fofbacqbasewindow": 55, "conv_idx2bpm": 55, "m1": 55, "m2": 55, "c1": 55, "c2": 55, "c3": 55, "c4": 55, "fofbacqlampwindow": 55, "lamp": 55, "fofbacqsysidwindow": 55, "sysid": 55, "sigenstatuswindow": 56, "formatlifetimelabel": 56, "sectionedwaveformcurveitem": 57, "waveformcurveitem": 57, "gap_max": 57, "24": [57, 64], "gap_min": 57, "receiveywaveform": 57, "new_waveform": [57, 64], "usual": [57, 64], "pydmchannel": [57, 64], "yourself": 57, "idffwindow": 57, "idnam": 57, "addnewtablecurv": 57, "plt": 57, "get_idff_icon": 57, "feedforward": 57, "baseorbitintlk": 58, "conv_nm2m": 58, "conv_um2nm": 58, "get_ref_orb": 58, "um": 58, "configdb": 58, "si_orbit": 58, "monitsum2intlksum_factor": 58, "bpmorbintlkdetailwindow": 58, "bpmintlkenblwidget": 58, "_bpmselectionwidget": 58, "bpmintlklimspwidget": 58, "monitoreddevicesdialog": 58, "reforbcombobox": 58, "combobox": [58, 64], "reforbchang": 58, "angxgraphwidget": 58, "_basegraphwidget": 58, "angul": 58, "intlktyp": 58, "angx": 58, "propty_max_data": 58, "intlklmtangmaxx": 58, "propty_max_symb": 58, "instantan": 58, "intlkangupperx": 58, "latch": 58, "intlkangupperltcx": 58, "propty_meas_data": 58, "intlkangx": 58, "propty_meas_symb": 58, "intlk": [58, 62], "intlkltc": 58, "propty_min_data": 58, "intlklmtangminx": 58, "propty_min_symb": 58, "intlkanglowerx": 58, "intlkanglowerltcx": 58, "angygraphwidget": 58, "angi": 58, "intlklmtangmaxi": 58, "intlkangupperi": 58, "intlkangupperltci": 58, "intlkangi": 58, "intlklmtangmini": 58, "intlkangloweri": 58, "intlkanglowerltci": 58, "symbols_max": 58, "symbols_mea": 58, "mea": 58, "symbols_min": 58, "min": 58, "y_data_max": 58, "y_data_mea": 58, "y_data_min": 58, "graphlegendwidget": 58, "metric": 58, "plan": 58, "graphmonitorwidget": 58, "graphproptyselwidget": 58, "comparis": [58, 64], "selelct": 58, "propty_comp_chang": 58, "propty_intlk_chang": 58, "propty_reforb_chang": 58, "minsumgraphwidget": 58, "minsum": 58, "slowsumraw": 58, "intlklmtminsum": 58, "posxgraphwidget": 58, "posx": 58, "intlklmtposmaxx": 58, "intlkposupperx": 58, "intlkposupperltcx": 58, "intlkposx": 58, "intlklmtposminx": 58, "intlkposlowerx": 58, "intlkposlowerltcx": 58, "posygraphwidget": 58, "posi": 58, "intlklmtposmaxi": 58, "intlkposupperi": 58, "intlkposupperltci": 58, "intlkposi": 58, "intlklmtposmini": 58, "intlkposloweri": 58, "intlkposlowerltci": 58, "bpmorbintlkmainwindow": 58, "bbbacqbram": 59, "_bbbacqbas": 59, "bram": 59, "bbbacqsb": 59, "track": 59, "bbbacqsram": 59, "sram": 59, "bbbadcwidget": 59, "adc": 59, "bbbadvancedsettingswidget": 59, "advanc": 59, "bbbgeneralsettingswidget": 59, "bbbinterlock": 59, "bbbslowdacswidget": 59, "dac": 59, "bbbcontrolwindow": 59, "bbbinfowidget": 59, "bbbmainsettingswidget": 59, "resum": 59, "sent": [59, 64], "bbbstatuswidget": 59, "bbbcoefficientswidget": 59, "timegraph": 59, "siriustimeplot": [59, 64], "wfmgraph": 59, "add_mark": 59, "xchannel": 59, "ychannel": 59, "o": 59, "symbols": [59, 64], "add_scatter_curv": 59, "linestyl": [59, 64], "linewidth": [59, 64], "nchannel": 59, "bbbdrivesettingswidget": 59, "bbbsingledrivesettingswidget": 59, "dr_num": 59, "bbbenvironmmonwidget": 59, "bbbgpiowidget": 59, "bbbmainwindow": 59, "bbbmaskswidget": 59, "bbbpwrampswidget": 59, "amplifi": 59, "bbbtimingwidget": 59, "get_bbb_icon": 59, "set_bbb_color": 59, "bpmsequalizeswitch": 60, "data_by_dai": 60, "ext": 60, "pickl": 60, "pkl": 60, "h5": 60, "hdf5": 60, "hdf": 60, "hd5": 60, "ext_flt": 60, "create_central_widget": 60, "get_acq_control_widget": 60, "get_analysis_control_widget": 60, "get_application_widget": 60, "get_check_data_widget": 60, "get_plots_widget": 60, "get_update_reforb_widget": 60, "scrapermonitor": 61, "scrapersview": 61, "01sa": 61, "scrap": 61, "apualarmdetail": 62, "idcommondialog": 62, "apucontrolwindow": 62, "idcommoncontrolwindow": 62, "apuhardlldetail": 62, "hardwar": 62, "lowlevel": 62, "apuinterlockdetail": 62, "apusummarybas": 62, "idcommonsummarybas": 62, "model_width": 62, "speed": 62, "apusummaryhead": 62, "idcommonsummaryhead": 62, "apusummarywidget": 62, "idcommonsummarywidget": 62, "disable_beamline_control": 62, "enable_beamline_control": 62, "deltacontrolwindow": 62, "deltacontrolwindowutil": 62, "aux_control_pv": 62, "kparamacc": 62, "pparamacc": 62, "kparam": 62, "pparam": 62, "maxacc": 62, "maxvelo": 62, "park": 62, "fa5": 62, "startpark": 62, "toler": 62, "postol": 62, "poltol": 62, "main_control_pv": 62, "plai": 62, "kparamchang": 62, "pparamchang": 62, "polar": 62, "polchang": 62, "kparamvelo": 62, "motorsenbld": 62, "move": [62, 64], "pparamvelo": 62, "pol": 62, "status_pv": 62, "alarmbit": 62, "alarmlabel": 62, "intlkbit": 62, "intlklabel": 62, "isoper": 62, "statemachinelog": 62, "plc": 62, "plcstate": 62, "sw": 62, "killsw": 62, "limsw": 62, "deltasummarybas": 62, "deltasummaryhead": 62, "deltasummarywidget": 62, "epucontrolwindow": 62, "epudrivedetail": 62, "epusummarybas": 62, "gap": 62, "epusummaryhead": 62, "epusummarywidget": 62, "idcontrol": 62, "papucontrolwindow": 62, "papudetail": 62, "papusummarybas": 62, "papusummaryhead": 62, "papusummarywidget": 62, "get_id_icon": 62, "slitmonitor": 63, "slitsview": 63, "progress_dialog": 64, "cancel": [64, 65], "exec_": [64, 65], "inc_valu": [64, 65], "set_valu": [64, 65], "ps_status_dialog": 64, "pwrsuppli": [64, 65], "psstatusdialog": [64, 65], "pv_status_dialog": 64, "statusdetaildialog": [64, 65], "report_dialog": 64, "reportdialog": [64, 65], "qscrollbar": 64, "decim": 64, "dialogpagestep": 64, "pagestep": 64, "dialogsinglestep": 64, "singlestep": 64, "getdecim": 64, "getmaximum": 64, "getminimum": 64, "minimum": 64, "getpagestep": 64, "page": 64, "step": 64, "getsinglestep": 64, "getsliderposit": 64, "slider": 64, "getvalu": 64, "rangechang": 64, "setdecim": 64, "setmaximum": 64, "setminimum": 64, "setpagestep": 64, "setrang": 64, "rang": 64, "setsinglestep": 64, "setsliderposit": 64, "slidermov": 64, "sliderposit": 64, "valuechang": 64, "robert": 64, "kent": 64, "pyqt": 64, "framework": 64, "avail": 64, "http": 64, "pypi": 64, "org": 64, "com": 64, "jazzycamel": 64, "shapemap": 64, "darkgreen": 64, "darkr": 64, "grai": 64, "notselcolor1": 64, "notselcolor2": 64, "selcolor": 64, "enum": 64, "map": 64, "circl": 64, "rectangl": 64, "round": 64, "squar": 64, "triangl": 64, "abspath": 64, "adjust": 64, "svg": 64, "dsblcolor": 64, "f": 64, "qfile": 64, "getdsblcolor": 64, "getoffcolor": 64, "getoncolor": 64, "On": 64, "getrgbfromqcolor": 64, "tuppl": 64, "rgb": 64, "getstat": 64, "isselect": 64, "press": 64, "offcolor": 64, "oncolor": 64, "appear": 64, "setdsblcolor": 64, "newcolor": 64, "setoffcolor": 64, "setoncolor": 64, "setselect": 64, "setshap": 64, "newshap": 64, "setstat": 64, "shapesdict": 64, "xml": 64, "encod": 64, "utf": 64, "standalon": 64, "xmln": 64, "dc": 64, "purl": 64, "cc": 64, "creativecommon": 64, "rdf": 64, "www": 64, "w3": 64, "1999": 64, "22": 64, "syntax": 64, "2000": 64, "xlink": 64, "sodipodi": 64, "sourceforg": 64, "net": 64, "dtd": 64, "inkscap": 64, "namespac": 64, "000000px": 64, "svg9493": 64, "91": 64, "r13725": 64, "docnam": 64, "round_led4": 64, "metadata": 64, "metadata4250": 64, "dcmityp": 64, "stillimag": 64, "namedview": 64, "pagecolor": 64, "bordercolor": 64, "666666": 64, "borderopac": 64, "objecttoler": 64, "gridtoler": 64, "guidetoler": 64, "pageopac": 64, "pageshadow": 64, "3840": 64, "2140": 64, "namedview4248": 64, "showgrid": 64, "zoom": 64, "014856": 64, "cx": 64, "8105841": 64, "cy": 64, "583514": 64, "maxim": 64, "layer": 64, "def": 64, "defs9495": 64, "lineargradi": 64, "lineargradient4276": 64, "stop4278": 64, "0000000": 64, "opac": 64, "stop4280": 64, "gradientunit": 64, "userspaceonus": 64, "lineargradient6650": 64, "x1": 64, "23": 64, "402565": 64, "x2": 64, "389874": 64, "href": 64, "lineargradient6506": 64, "y1": 64, "44": 64, "066776": 64, "y2": 64, "42": 64, "883698": 64, "gradienttransform": 64, "162375": 64, "685562": 64, "538": 64, "24645": 64, "790": 64, "03875": 64, "lineargradient6494": 64, "stop6496": 64, "stop6498": 64, "lineargradient6648": 64, "213980": 64, "201290": 64, "754631": 64, "892632": 64, "30": 64, "2835": 64, "680": 64, "9062": 64, "1286": 64, "1606": 64, "lineargradient6646": 64, "349695": 64, "440580": 64, "lineargradient5756": 64, "767944": 64, "710873": 64, "33": 64, "827312": 64, "763": 64, "51223": 64, "1439": 64, "5942": 64, "lineargradient6644": 64, "193102": 64, "200001": 64, "429230": 64, "000000": 64, "700": 64, "00001": 64, "1325": 64, "stop6508": 64, "stop6510": 64, "87450981": 64, "lineargradient7498": 64, "lineargradient7464": 64, "stop7466": 64, "00039a": 64, "stop7468": 64, "afa5ff": 64, "lineargradient7496": 64, "stop5758": 64, "828282": 64, "stop5760": 64, "929292": 64, "35294119": 64, "lineargradient9321": 64, "935030": 64, "662106": 64, "699776": 64, "lineargradient5742": 64, "stop5744": 64, "adadad": 64, "stop5746": 64, "f0f0f0": 64, "lineargradient7492": 64, "lineargradient9527": 64, "lineargradient9529": 64, "lineargradient9531": 64, "lineargradient9533": 64, "path": 64, "d": 64, "m": 64, "000021": 64, "000031": 64, "99999975": 64, "19999975": 64, "path6596": 64, "overflow": 64, "visibl": 64, "stroke": 64, "80000001": 64, "linecap": 64, "linejoin": 64, "miterlimit": 64, "curvatur": 64, "45": 64, "175601": 64, "000001": 64, "136932": 64, "038658": 64, "17559": 64, "1755899": 64, "0386579": 64, "1756236": 64, "0386916": 64, "path6598": 64, "061992": 64, "999994": 64, "970206": 64, "091751": 64, "061957": 64, "970207": 64, "0619578": 64, "0917508": 64, "0619881": 64, "0917811": 64, "path6600": 64, "39": 64, "387937": 64, "975154": 64, "151829": 64, "456187": 64, "144611": 64, "411141": 64, "954955": 64, "992782": 64, "456186": 64, "1446295": 64, "954954": 64, "9928005": 64, "path6602": 64, "100": 64, "00000px": 64, "metadata4280": 64, "lineargradient4360": 64, "stop4362": 64, "stop4364": 64, "46": 64, "774261": 64, "47": 64, "917328": 64, "21": 64, "593750": 64, "lineargradient13424": 64, "003969": 64, "969156": 64, "576": 64, "36428": 64, "922": 64, "62906": 64, "781250": 64, "617390": 64, "591305": 64, "lineargradient13427": 64, "624": 64, "9999": 64, "1450": 64, "0001": 64, "843750": 64, "556522": 64, "834784": 64, "408695": 64, "lineargradient13430": 64, "48": 64, "376728": 64, "600000": 64, "594427": 64, "lineargradient13433": 64, "lineargradient13472": 64, "928127": 64, "639013": 64, "55634": 64, "27587": 64, "lineargradient9163": 64, "lineargradient13475": 64, "translat": 64, "00000": 64, "600002": 64, "lineargradient13478": 64, "lineargradient13481": 64, "lineargradient9199": 64, "stop9165": 64, "8c8c8c": 64, "stop9167": 64, "lineargradient9197": 64, "lineargradient9195": 64, "lineargradient9193": 64, "lineargradient1336": 64, "16238": 64, "68556": 64, "2464": 64, "0391": 64, "lineargradient1339": 64, "28350": 64, "161": 64, "lineargradient1342": 64, "82731": 64, "5122": 64, "594": 64, "lineargradient1345": 64, "25000": 64, "0000": 64, "000": 64, "path13335": 64, "000037": 64, "85": 64, "000002": 64, "150002": 64, "l": 64, "150038": 64, "75e": 64, "path13337": 64, "390662": 64, "0780625": 64, "409718": 64, "507812": 64, "3471245": 64, "5312495": 64, "184125": 64, "323719": 64, "507875": 64, "507813": 64, "49": 64, "804688": 64, "184156": 64, "53125": 64, "098031": 64, "121563": 64, "path13339": 64, "0311875": 64, "206593": 64, "554687": 64, "7083435": 64, "5781245": 64, "869813": 64, "684969": 64, "554719": 64, "554688": 64, "578125": 64, "348031": 64, "371563": 64, "path13341": 64, "27": 64, "280819": 64, "4327813": 64, "473": 64, "221094": 64, "9257497": 64, "2326567": 64, "306937": 64, "06075": 64, "856718": 64, "856687": 64, "225062": 64, "160469": 64, "31475": 64, "3345": 64, "522157": 64, "84175": 64, "metadata4299": 64, "lineargradient4310": 64, "stop4312": 64, "stop4314": 64, "lineargradient31681": 64, "138594": 64, "315531": 64, "237": 64, "28437": 64, "892": 64, "92719": 64, "549": 64, "70703": 64, "1350": 64, "400002": 64, "390625": 64, "lineargradient31704": 64, "656250": 64, "337502": 64, "031250": 64, "728125": 64, "lineargradient31624": 64, "41": 64, "599998": 64, "991302": 64, "lineargradient31686": 64, "625": 64, "437": 64, "1250": 64, "lineargradient31649": 64, "388435": 64, "618097": 64, "606900": 64, "026330": 64, "lineargradient31710": 64, "lineargradient31570": 64, "lineargradient31654": 64, "500000": 64, "200000": 64, "400000": 64, "path31614": 64, "path31616": 64, "98047": 64, "4921875": 64, "0156245": 64, "039062": 64, "path31618": 64, "933595": 64, "4453125": 64, "1093745": 64, "36": 64, "132812": 64, "path31620": 64, "349844": 64, "66": 64, "198625": 64, "6864688": 64, "1425938": 64, "0403125": 64, "525": 64, "1005": 64, "3735622": 64, "468625": 64, "2072502": 64, "468594": 64, "345875": 64, "833812": 64, "827937": 64, "159906": 64, "5878125": 64, "807188": 64, "9699687": 64, "865": 64, "metadata4372": 64, "lineargradient4383": 64, "stop4385": 64, "stop4387": 64, "26": 64, "670279": 64, "28": 64, "449617": 64, "187498": 64, "lineargradient28861": 64, "187313": 64, "623188": 64, "257": 64, "59344": 64, "317": 64, "63062": 64, "793751": 64, "187500": 64, "181250": 64, "lineargradient28864": 64, "699": 64, "60937": 64, "825": 64, "906250": 64, "687500": 64, "812500": 64, "762501": 64, "lineargradient28867": 64, "lineargradient28870": 64, "lineargradient28801": 64, "389994": 64, "403942": 64, "357010": 64, "32": 64, "23582": 64, "lineargradient28804": 64, "787500": 64, "lineargradient28807": 64, "lineargradient28810": 64, "800000": 64, "064": 64, "path28664": 64, "path28666": 64, "0078125": 64, "46875": 64, "070312": 64, "0625": 64, "path28668": 64, "914063": 64, "6015625": 64, "203124": 64, "2031245": 64, "path28670": 64, "238156": 64, "278313": 64, "61875": 64, "212499": 64, "154062": 64, "627187": 64, "523437": 64, "183437": 64, "1375": 64, "11875": 64, "265625": 64, "380938": 64, "394375": 64, "474406": 64, "412219": 64, "259375": 64, "48125": 64, "392187": 64, "02625": 64, "577812": 64, "04687": 64, "417188": 64, "178125": 64, "819688": 64, "183438": 64, "09062": 64, "28125": 64, "21875": 64, "54625": 64, "380937": 64, "789062": 64, "115625": 64, "14375": 64, "24375": 64, "275": 64, "234375": 64, "16875": 64, "490938": 64, "761562": 64, "350938": 64, "209375": 64, "739688": 64, "344688": 64, "1425": 64, "949": 64, "894375": 64, "01994": 64, "733125": 64, "454375": 64, "285": 64, "203125": 64, "363438": 64, "332812": 64, "76625": 64, "01125": 64, "551875": 64, "096562": 64, "0081": 64, "13125": 64, "2625": 64, "4745": 64, "412125": 64, "700625": 64, "983438": 64, "894687": 64, "447188": 64, "046875": 64, "statecolor": 64, "toggleselect": 64, "togglest": 64, "qdoublespinboxplu": 64, "myspinboxplu": 64, "bargraphmodel": 64, "brush": 64, "scale": 64, "bargraphwidget": 64, "alwai": 64, "basebargraphwidget": 64, "set_waveform": 64, "plot": 64, "see": 64, "plotitem": 64, "karg": 64, "plotwidget": 64, "pyqtgraph": 64, "bargraphitem": 64, "wave": 64, "set_scal": 64, "set_width": 64, "widtg": 64, "set_brush": 64, "prefer": 64, "epicsbargraphmodel": 64, "update_interv": 64, "retriev": 64, "retrun": 64, "pydmbargraph": 64, "synchron": 64, "set_update_interv": 64, "interv": 64, "queri": 64, "timer": 64, "pydmbargraphmodel": 64, "connectionchang": 64, "detachabletabwidget": 64, "addit": 64, "detach": 64, "re": 64, "attach": 64, "doubl": 64, "adapt": 64, "stackoverflow": 64, "question": 64, "47267195": 64, "possibl": 64, "blackwood": 64, "2017": 64, "attachtab": 64, "contentwidget": 64, "attachtabslot": 64, "closedetachedtab": 64, "clsing": 64, "detachtab": 64, "point": 64, "tabwidget": 64, "detachedtab": 64, "siriusmainwindow": 64, "accomod": 64, "do_clos": 64, "onattachsign": 64, "tabbar": 64, "qtabbar": 64, "doubleclickev": 64, "ondetachtabsign": 64, "siriusenumcombobox": 64, "pydmenumcombobox": 64, "subclass": 64, "whellev": 64, "wheelev": 64, "wheel": 64, "ignor": 64, "out": 64, "siriusalarmfram": 64, "_basefram": 64, "associ": 64, "composit": 64, "stylesheet": 64, "redraw": 64, "need": 64, "where": 64, "no_alarm": 64, "minor": 64, "major": 64, "invalid": 64, "siriusfram": 64, "is_float": 64, "ruler": 64, "horizontalrul": 64, "setheight": 64, "calabel": 64, "textformatt": 64, "displayformat": 64, "support": 64, "more": 64, "pydm": 64, "bsmpudcvers": 64, "binari": 64, "notat": 64, "exponenti": 64, "scientif": 64, "hex": 64, "hexadecim": 64, "update_format_str": 64, "reconstruct": 64, "format_str": 64, "multichannelstatusdialog": 64, "fun_show_diff": 64, "assum": 64, "pvbit": 64, "kei": 64, "scalar": 64, "have": 64, "eq": 64, "ne": 64, "gt": 64, "lt": 64, "ge": 64, "le": 64, "compar": 64, "channels2statu": 64, "set_channels2valu": 64, "new_channels2valu": 64, "pydmledmulticonnect": 64, "channels2conn": 64, "set_channel": 64, "new_channel": 64, "non": 64, "siriusledst": 64, "dark": 64, "bug": 64, "pydmlineditscrollbar": 64, "lineedit": 64, "pydmlin": 64, "valid": 64, "siriuslineedit": 64, "accept": 64, "mai": 64, "showunit": 64, "caus": 64, "siriuswaveformlineedit": 64, "bugfix": 64, "qrect": 64, "qregion": 64, "ax": 64, "ai": 64, "aw": 64, "ah": 64, "siriuslogdisplai": 64, "siriusguihandl": 64, "guihandl": 64, "record": 64, "lognam": 64, "pydmlogdisplai": 64, "instant": 64, "qplaintextedit": 64, "black": 64, "writehtml": 64, "levelno": 64, "write": 64, "pydmloglabel": 64, "replac": 64, "qlistwidget": [64, 65], "buffers": 64, "datetimefmt": 64, "errorcolor": 64, "prependdatetim": 64, "warncolor": 64, "figurecanva": 64, "zoomin": 64, "zoomout": 64, "matplotlibcanva": 64, "figur": 64, "figurecanvasqtagg": 64, "matplotlibwidget": 64, "toolbar_posit": 64, "bottom": 64, "siriusprocessimag": 64, "convertion_set": 64, "capushbutton": 64, "siriuspushbutton": 64, "pressvalu": 64, "releasevalu": 64, "fix": 64, "meant": 64, "hold": 64, "much": 64, "like": 64, "messagebutton": 64, "doe": 64, "edm": 64, "two": 64, "first": 64, "whenev": 64, "behavior": 64, "howev": 64, "relativechang": 64, "ad": 64, "mean": 64, "amount": 64, "everi": 64, "consist": 64, "manipul": 64, "place": 64, "qicon": 64, "choic": 64, "instead": 64, "absolut": 64, "sendreleasevalu": 64, "interpret": 64, "appropri": 64, "through": 64, "send_value_sign": 64, "follow": 64, "condit": 64, "There": 64, "buildtre": 64, "pvnametre": 64, "tree_level": 64, "checked_level": 64, "siriuspvnam": 64, "check_al": 64, "check_requested_level": 64, "request": 64, "checked_item": 64, "collapse_al": 64, "expand_al": 64, "mag_group": 64, "uncheck_al": 64, "uncheck": 64, "updateitemcheckedcount": 64, "qtreeitem": 64, "string_list": 64, "qtreewidgetitem": 64, "childcheck": 64, "childhidden": 64, "isleaf": 64, "leaf": 64, "myhash": 64, "sethidden": 64, "overhid": 64, "qtreewidget": 64, "qresizeev": 64, "relativewidget": 64, "relative_po": 64, "stai": 64, "relativeres": 64, "pydmscrollbar": 64, "pydmwritablewidget": 64, "scroll": 64, "calcul": 64, "connected_sign": 64, "ctrl_limit_chang": 64, "new_limit": 64, "upper": 64, "lower": 64, "disconnected_sign": 64, "precision_chang": 64, "new_precis": 64, "value_changed_sign": 64, "widget_ctx_menu": 64, "has_bothplan": 64, "toggle_all_false_text": 64, "show_toggle_all_fals": 64, "toggle_all_true_text": 64, "show_toggle_all_tru": 64, "use_scrol": 64, "applybothplanesclick": 64, "toggleallitem": 64, "qscrollarea": 64, "applychangesclick": 64, "plane": 64, "header_widget": 64, "respect": 64, "selectitem": 64, "selectwidgetsat": 64, "isrow": 64, "undoitemsselect": 64, "siriusconnectionsign": 64, "address": 64, "connection_state_sign": 64, "enum_strings_sign": 64, "lower_ctrl_limit_sign": 64, "new_severity_sign": 64, "new_value_sign": 64, "prec_sign": 64, "unit_sign": 64, "upper_ctrl_limit_sign": 64, "write_access_sign": 64, "gradientlegend": 64, "xaxis_channel": 64, "yaxis_channel": 64, "roioffsetx_channel": 64, "roioffsety_channel": 64, "roiwidth_channel": 64, "roiheight_channel": 64, "image_width": 64, "image_height": 64, "graphicslayoutwidget": 64, "pydmcolormap": 64, "readingord": 64, "spectrogramview": 64, "channelwidth": 64, "normalizedata": 64, "colormapmin": 64, "colormapmax": 64, "newimagesign": 64, "hook": 64, "render": 64, "clike": 64, "xaxi": 64, "fortranlik": 64, "yaxi": 64, "graphicsview": 64, "roiheight": 64, "roiheightchannel": 64, "roiwidth": 64, "roiwidthchannel": 64, "autodownsampl": 64, "autosetcolorbarlim": 64, "being": 64, "channels_for_tool": 64, "tool": 64, "colormap": 64, "72810000e": 64, "18830000e": 64, "53583000e": 64, "00": 64, "75790000e": 64, "30225000e": 64, "67440500e": 64, "36145000e": 64, "87775000e": 64, "04554000e": 64, "15056000e": 64, "89950000e": 64, "64107500e": 64, "51725000e": 64, "23496500e": 64, "46815000e": 64, "93494000e": 64, "62078000e": 64, "14681150e": 64, "40363000e": 64, "04561000e": 64, "34752200e": 64, "92357500e": 64, "50614000e": 64, "54912500e": 64, "49554000e": 64, "00160500e": 64, "75100850e": 64, "11978000e": 64, "52920000e": 64, "95337650e": 64, "79782500e": 64, "08663000e": 64, "15689200e": 64, "53146000e": 64, "67160000e": 64, "36155500e": 64, "32196000e": 64, "28232500e": 64, "56723800e": 64, "17136500e": 64, "91625500e": 64, "77406850e": 64, "08248000e": 64, "57007500e": 64, "98260750e": 64, "05760000e": 64, "24123500e": 64, "19282950e": 64, "01000400e": 64, "92795000e": 64, "40463250e": 64, "11766500e": 64, "62665000e": 64, "61809300e": 64, "22558100e": 64, "33478500e": 64, "83333850e": 64, "33416000e": 64, "00487850e": 64, "05044550e": 64, "44368250e": 64, "07508000e": 64, "26987300e": 64, "55419950e": 64, "14224700e": 64, "49128950e": 64, "66591500e": 64, "20660900e": 64, "71474600e": 64, "77898200e": 64, "26801300e": 64, "94024250e": 64, "89355350e": 64, "32643350e": 64, "16783000e": 64, "00978250e": 64, "38169200e": 64, "39750850e": 64, "12787300e": 64, "43373750e": 64, "62925250e": 64, "24795250e": 64, "48239150e": 64, "86301100e": 64, "37019950e": 64, "52755200e": 64, "09868200e": 64, "49474150e": 64, "56904050e": 64, "33616350e": 64, "62178250e": 64, "60675500e": 64, "57527700e": 64, "75142450e": 64, "64054250e": 64, "81586950e": 64, "88389700e": 64, "67004600e": 64, "05799200e": 64, "01932750e": 64, "69521450e": 64, "30118550e": 64, "15774150e": 64, "71602250e": 64, "54491450e": 64, "29919000e": 64, "73234250e": 64, "78879650e": 64, "44385150e": 64, "74397050e": 64, "03250000e": 64, "59187900e": 64, "75067700e": 64, "27571900e": 64, "74301750e": 64, "75281900e": 64, "51728050e": 64, "89739450e": 64, "75024350e": 64, "75680200e": 64, "05495900e": 64, "74302700e": 64, "99354400e": 64, "21535400e": 64, "73173050e": 64, "22630800e": 64, "37868150e": 64, "71627750e": 64, "45466050e": 64, "54440600e": 64, "69768800e": 64, "67717350e": 64, "71242550e": 64, "67616600e": 64, "89331150e": 64, "88223000e": 64, "65285900e": 64, "01018760e": 64, "05351350e": 64, "62848100e": 64, "03022295e": 64, "22584250e": 64, "60412850e": 64, "04936070e": 64, "39880900e": 64, "58079600e": 64, "06754985e": 64, "57205600e": 64, "55952900e": 64, "08474960e": 64, "74520100e": 64, "54134750e": 64, "10094210e": 64, "91796350e": 64, "52716950e": 64, "11612225e": 64, "09006300e": 64, "51768350e": 64, "13030280e": 64, "26134650e": 64, "51347600e": 64, "14351180e": 64, "43161000e": 64, "51508250e": 64, "15578240e": 64, "60085350e": 64, "52250300e": 64, "16716050e": 64, "76889850e": 64, "53604350e": 64, "17769200e": 64, "93584700e": 64, "55534700e": 64, "18743300e": 64, "10157150e": 64, "58043900e": 64, "19643450e": 64, "26625050e": 64, "61078400e": 64, "20475005e": 64, "42983300e": 64, "64610150e": 64, "21242810e": 64, "59237000e": 64, "68598350e": 64, "21951965e": 64, "75406550e": 64, "72979250e": 64, "22607060e": 64, "91474100e": 64, "77740100e": 64, "23212430e": 64, "07467700e": 64, "82809500e": 64, "23771900e": 64, "23392450e": 64, "88144100e": 64, "24289040e": 64, "39240700e": 64, "93728600e": 64, "24768185e": 64, "55035400e": 64, "99501800e": 64, "25211120e": 64, "70779100e": 64, "05438200e": 64, "25620905e": 64, "86471800e": 64, "11512300e": 64, "26000855e": 64, "02121150e": 64, "17701150e": 64, "26352755e": 64, "17739900e": 64, "23969050e": 64, "26678390e": 64, "33330600e": 64, "30300700e": 64, "26979800e": 64, "48895800e": 64, "36680800e": 64, "27258515e": 64, "64438050e": 64, "43096600e": 64, "27517085e": 64, "79962450e": 64, "49530250e": 64, "27755510e": 64, "95479200e": 64, "55966450e": 64, "27975320e": 64, "01099085e": 64, "62400100e": 64, "28177790e": 64, "02649740e": 64, "68821000e": 64, "28363430e": 64, "04200395e": 64, "75221500e": 64, "28533260e": 64, "05750795e": 64, "81599050e": 64, "28688810e": 64, "07301705e": 64, "87946000e": 64, "28829825e": 64, "08853635e": 64, "94257250e": 64, "28957070e": 64, "10406585e": 64, "00530250e": 64, "29070800e": 64, "11960810e": 64, "06759900e": 64, "29171525e": 64, "13516565e": 64, "12946200e": 64, "29259755e": 64, "15074105e": 64, "19086600e": 64, "29335490e": 64, "16633430e": 64, "25181100e": 64, "29399240e": 64, "18194540e": 64, "31227150e": 64, "29451260e": 64, "19758200e": 64, "37224750e": 64, "29491295e": 64, "21323900e": 64, "43171350e": 64, "29519855e": 64, "22891895e": 64, "49072050e": 64, "29537195e": 64, "24462440e": 64, "54924300e": 64, "29542805e": 64, "26035790e": 64, "60728100e": 64, "29536940e": 64, "27611690e": 64, "66483450e": 64, "29519600e": 64, "29190395e": 64, "72192900e": 64, "29490530e": 64, "30771905e": 64, "77856450e": 64, "29450240e": 64, "32356475e": 64, "83476650e": 64, "29397965e": 64, "33943850e": 64, "89050950e": 64, "29333960e": 64, "35534285e": 64, "94584450e": 64, "29258225e": 64, "37127525e": 64, "00079700e": 64, "29170505e": 64, "38723825e": 64, "05534150e": 64, "29070545e": 64, "40323185e": 64, "10952900e": 64, "28958345e": 64, "41925605e": 64, "16335950e": 64, "28833650e": 64, "43530830e": 64, "21688400e": 64, "28696460e": 64, "45138860e": 64, "27007700e": 64, "28546775e": 64, "46749950e": 64, "32301500e": 64, "28383830e": 64, "48363845e": 64, "37569800e": 64, "28208135e": 64, "49980290e": 64, "42812600e": 64, "28018925e": 64, "51599540e": 64, "48037550e": 64, "27816455e": 64, "53221340e": 64, "53244650e": 64, "27600470e": 64, "54845690e": 64, "58436450e": 64, "27370460e": 64, "56472335e": 64, "63618050e": 64, "27126680e": 64, "58101275e": 64, "68792000e": 64, "26868620e": 64, "59732255e": 64, "73960850e": 64, "26596280e": 64, "61365275e": 64, "79127150e": 64, "26309660e": 64, "63000080e": 64, "84298550e": 64, "26008250e": 64, "64636415e": 64, "89477600e": 64, "25692050e": 64, "66274280e": 64, "94664300e": 64, "25360805e": 64, "67913165e": 64, "99868850e": 64, "25014515e": 64, "69553325e": 64, "05091250e": 64, "24653180e": 64, "71193995e": 64, "10339150e": 64, "24276290e": 64, "72835430e": 64, "15617650e": 64, "23883845e": 64, "74477120e": 64, "20929300e": 64, "23475845e": 64, "76118555e": 64, "26279200e": 64, "23052290e": 64, "77759990e": 64, "31677550e": 64, "22612925e": 64, "79400660e": 64, "37126900e": 64, "22157495e": 64, "81040310e": 64, "42632350e": 64, "21686255e": 64, "82678685e": 64, "48204100e": 64, "21198950e": 64, "84315275e": 64, "53844700e": 64, "20695580e": 64, "85950080e": 64, "59564350e": 64, "20176145e": 64, "87582080e": 64, "65368150e": 64, "19640900e": 64, "89211020e": 64, "71263750e": 64, "19089590e": 64, "90836390e": 64, "77261350e": 64, "18522470e": 64, "92457935e": 64, "83368600e": 64, "17939795e": 64, "94074635e": 64, "89595700e": 64, "17341310e": 64, "95686490e": 64, "95947750e": 64, "16727525e": 64, "97292225e": 64, "02434950e": 64, "16098695e": 64, "98891840e": 64, "09070050e": 64, "15455075e": 64, "00484060e": 64, "15860700e": 64, "14796920e": 64, "02068885e": 64, "22817100e": 64, "14123465e": 64, "03645040e": 64, "29952000e": 64, "13436240e": 64, "05211760e": 64, "37273050e": 64, "12736010e": 64, "06768025e": 64, "44795550e": 64, "12022775e": 64, "08313070e": 64, "52532250e": 64, "11297555e": 64, "09846130e": 64, "60490800e": 64, "10561115e": 64, "11365930e": 64, "68683950e": 64, "09814220e": 64, "12871705e": 64, "77127000e": 64, "09056105e": 64, "14362180e": 64, "85830150e": 64, "08289830e": 64, "15836080e": 64, "94806150e": 64, "07515905e": 64, "17292130e": 64, "04070300e": 64, "06736115e": 64, "18729565e": 64, "13635350e": 64, "05951480e": 64, "20146600e": 64, "23508950e": 64, "05162765e": 64, "21542215e": 64, "33706400e": 64, "04372265e": 64, "22914880e": 64, "44240450e": 64, "03582275e": 64, "24263320e": 64, "55118750e": 64, "02795090e": 64, "25586005e": 64, "66351500e": 64, "02011985e": 64, "26881405e": 64, "77951450e": 64, "01235510e": 64, "28148500e": 64, "89921150e": 64, "00468725e": 64, "29385760e": 64, "02270800e": 64, "97144350e": 64, "30591655e": 64, "15005500e": 64, "89749350e": 64, "31765420e": 64, "28125250e": 64, "82535400e": 64, "32905270e": 64, "41632600e": 64, "75535650e": 64, "34010695e": 64, "55525000e": 64, "68783250e": 64, "35080420e": 64, "69799900e": 64, "62308800e": 64, "36113935e": 64, "84452200e": 64, "56145450e": 64, "37110475e": 64, "99471700e": 64, "50326350e": 64, "38069530e": 64, "14848200e": 64, "44879550e": 64, "38991355e": 64, "30568950e": 64, "39845850e": 64, "39875185e": 64, "46621200e": 64, "35243100e": 64, "40721530e": 64, "62989650e": 64, "31096800e": 64, "41530900e": 64, "79653900e": 64, "27437550e": 64, "42303550e": 64, "96591000e": 64, "24293400e": 64, "43040245e": 64, "01378565e": 64, "21666900e": 64, "43741495e": 64, "03122000e": 64, "19578450e": 64, "44408320e": 64, "04887620e": 64, "18035700e": 64, "45041995e": 64, "06672365e": 64, "17056500e": 64, "45644050e": 64, "08474450e": 64, "16645950e": 64, "46214995e": 64, "10292345e": 64, "16798950e": 64, "46756105e": 64, "12124265e": 64, "17515500e": 64, "47268400e": 64, "13968680e": 64, "18793050e": 64, "47753410e": 64, "15823550e": 64, "20626500e": 64, "48212155e": 64, "17687600e": 64, "23010750e": 64, "48645910e": 64, "19559555e": 64, "25933050e": 64, "49055950e": 64, "21437630e": 64, "29388300e": 64, "49443550e": 64, "23321060e": 64, "33363750e": 64, "49809475e": 64, "25208570e": 64, "37846650e": 64, "50155000e": 64, "27099140e": 64, "42821700e": 64, "50481145e": 64, "28992005e": 64, "48278700e": 64, "50788675e": 64, "30886400e": 64, "54204900e": 64, "51078610e": 64, "32781815e": 64, "60579900e": 64, "51351715e": 64, "34677740e": 64, "67396050e": 64, "51608500e": 64, "36573410e": 64, "74635500e": 64, "51849730e": 64, "38468825e": 64, "82285500e": 64, "52075915e": 64, "40363730e": 64, "90330750e": 64, "52287565e": 64, "42257615e": 64, "98761050e": 64, "52485190e": 64, "44150480e": 64, "00756110e": 64, "52672105e": 64, "46040030e": 64, "01672070e": 64, "52847290e": 64, "47927285e": 64, "02622455e": 64, "53009980e": 64, "49813010e": 64, "03606245e": 64, "53160175e": 64, "51697205e": 64, "04622165e": 64, "53298130e": 64, "53580125e": 64, "05669450e": 64, "53427670e": 64, "55459220e": 64, "06746315e": 64, "53548795e": 64, "57334745e": 64, "07852250e": 64, "53658190e": 64, "59209250e": 64, "08986235e": 64, "53756110e": 64, "61082480e": 64, "10147505e": 64, "53847400e": 64, "62951885e": 64, "11334785e": 64, "53931550e": 64, "64817720e": 64, "12547055e": 64, "54004480e": 64, "66683045e": 64, "13784315e": 64, "54066955e": 64, "68547095e": 64, "15045800e": 64, "54127900e": 64, "70405280e": 64, "16328960e": 64, "54177625e": 64, "72262955e": 64, "17635070e": 64, "54215875e": 64, "74121140e": 64, "18964130e": 64, "54254635e": 64, "75972440e": 64, "20311805e": 64, "54282430e": 64, "77823995e": 64, "21681410e": 64, "54299770e": 64, "79675805e": 64, "23071925e": 64, "54317875e": 64, "81521240e": 64, "24479270e": 64, "54324505e": 64, "83367695e": 64, "25907525e": 64, "85212620e": 64, "27354140e": 64, "54321955e": 64, "87053975e": 64, "28817585e": 64, "54307675e": 64, "88896860e": 64, "30300665e": 64, "54293140e": 64, "90735155e": 64, "31799045e": 64, "54270190e": 64, "92573450e": 64, "33315530e": 64, "54239845e": 64, "94411490e": 64, "34849355e": 64, "54208990e": 64, "96245705e": 64, "36397460e": 64, "54165385e": 64, "98082725e": 64, "37964945e": 64, "54125605e": 64, "99914135e": 64, "39544415e": 64, "54074095e": 64, "01747585e": 64, "41142245e": 64, "54021310e": 64, "03578740e": 64, "42754100e": 64, "53962660e": 64, "05409385e": 64, "44381510e": 64, "53898400e": 64, "07240030e": 64, "46024475e": 64, "53833120e": 64, "09068125e": 64, "47680700e": 64, "53758405e": 64, "10898260e": 64, "49353755e": 64, "53687005e": 64, "12724315e": 64, "51038285e": 64, "53603620e": 64, "14553685e": 64, "52740665e": 64, "53526610e": 64, "16377700e": 64, "54452480e": 64, "53435830e": 64, "18206305e": 64, "56182910e": 64, "53353975e": 64, "20029045e": 64, "57921245e": 64, "53258350e": 64, "21856120e": 64, "59678195e": 64, "53171905e": 64, "23677840e": 64, "61442795e": 64, "53072200e": 64, "25504150e": 64, "63225245e": 64, "52982695e": 64, "27324850e": 64, "65014580e": 64, "52880440e": 64, "29149885e": 64, "66821510e": 64, "52789660e": 64, "30969565e": 64, "68633795e": 64, "52687150e": 64, "32793325e": 64, "70462655e": 64, "52595350e": 64, "34612495e": 64, "72297125e": 64, "52494625e": 64, "36434980e": 64, "74146130e": 64, "52402825e": 64, "38253895e": 64, "76000490e": 64, "52305670e": 64, "40074850e": 64, "77867345e": 64, "52214635e": 64, "41894020e": 64, "79740065e": 64, "52122835e": 64, "43714210e": 64, "81621710e": 64, "52033585e": 64, "45533890e": 64, "83510495e": 64, "51948415e": 64, "47353060e": 64, "85404635e": 64, "51861205e": 64, "49174270e": 64, "87306680e": 64, "51783685e": 64, "50993440e": 64, "89210510e": 64, "51698515e": 64, "52816690e": 64, "91123520e": 64, "78085000e": 64, "23850000e": 64, "73535000e": 64, "41245000e": 64, "73495000e": 64, "18094500e": 64, "15948500e": 64, "64960000e": 64, "88179500e": 64, "53153000e": 64, "19646000e": 64, "83229000e": 64, "95738000e": 64, "56468000e": 64, "19431800e": 64, "43805500e": 64, "96681500e": 64, "40614650e": 64, "97406500e": 64, "40133500e": 64, "61823000e": 64, "56872500e": 64, "86237500e": 64, "83248100e": 64, "22305500e": 64, "34968000e": 64, "04719100e": 64, "94011500e": 64, "85891500e": 64, "26355850e": 64, "72398500e": 64, "38574500e": 64, "48183850e": 64, "57721500e": 64, "92940500e": 64, "70121500e": 64, "50516000e": 64, "48326500e": 64, "92283550e": 64, "51317500e": 64, "04401000e": 64, "14662350e": 64, "60534000e": 64, "60985500e": 64, "37191600e": 64, "07745150e": 64, "17544500e": 64, "59909550e": 64, "19633250e": 64, "73262000e": 64, "82918200e": 64, "31692200e": 64, "28087000e": 64, "06097700e": 64, "43944950e": 64, "81509500e": 64, "29455700e": 64, "56417000e": 64, "33045000e": 64, "52987100e": 64, "69144050e": 64, "81852000e": 64, "76753100e": 64, "82143950e": 64, "02749700e": 64, "00702700e": 64, "95424350e": 64, "06857750e": 64, "24787450e": 64, "09003100e": 64, "10486400e": 64, "48986950e": 64, "22898050e": 64, "13617800e": 64, "73273150e": 64, "37124500e": 64, "16236650e": 64, "97612900e": 64, "51690100e": 64, "18325100e": 64, "21955200e": 64, "66605050e": 64, "19870400e": 64, "46246500e": 64, "81866800e": 64, "20867450e": 64, "70425600e": 64, "97472800e": 64, "21313700e": 64, "94418550e": 64, "13415400e": 64, "21216800e": 64, "18141200e": 64, "29676750e": 64, "20597150e": 64, "41509400e": 64, "46233900e": 64, "19482800e": 64, "64428800e": 64, "63063900e": 64, "17917100e": 64, "86810150e": 64, "80136150e": 64, "15943400e": 64, "08566750e": 64, "97417500e": 64, "13625450e": 64, "29611900e": 64, "14856950e": 64, "11062700e": 64, "49856350e": 64, "32416250e": 64, "08346950e": 64, "69228700e": 64, "50057150e": 64, "05575100e": 64, "87683050e": 64, "67743950e": 64, "02838950e": 64, "05176050e": 64, "85435850e": 64, "00237950e": 64, "21689850e": 64, "03107350e": 64, "79200000e": 64, "37214250e": 64, "20732950e": 64, "59616000e": 64, "51756900e": 64, "38292250e": 64, "44265000e": 64, "65335650e": 64, "55769950e": 64, "33682500e": 64, "77981100e": 64, "73145650e": 64, "28327500e": 64, "89728950e": 64, "90421900e": 64, "00062000e": 64, "07596150e": 64, "33835500e": 64, "01070015e": 64, "24665850e": 64, "44902500e": 64, "02001785e": 64, "41631000e": 64, "61477500e": 64, "02861390e": 64, "58496700e": 64, "83560500e": 64, "03653675e": 64, "75265500e": 64, "01099850e": 64, "04382975e": 64, "91934850e": 64, "04351100e": 64, "05053880e": 64, "08517500e": 64, "08000150e": 64, "05669960e": 64, "25018550e": 64, "12029150e": 64, "06235040e": 64, "41445650e": 64, "16392200e": 64, "06752435e": 64, "57803900e": 64, "21048500e": 64, "07225205e": 64, "74098400e": 64, "25959800e": 64, "07656410e": 64, "90334250e": 64, "31087850e": 64, "08048855e": 64, "06519100e": 64, "36399500e": 64, "08404580e": 64, "22655500e": 64, "41866700e": 64, "08726135e": 64, "38748550e": 64, "47458850e": 64, "09015305e": 64, "54803350e": 64, "09273620e": 64, "70825000e": 64, "58928750e": 64, "09503375e": 64, "86816050e": 64, "64770800e": 64, "09705335e": 64, "02781600e": 64, "70658750e": 64, "09881030e": 64, "18724200e": 64, "76579850e": 64, "10031735e": 64, "34648950e": 64, "82526450e": 64, "10158470e": 64, "50558400e": 64, "88483250e": 64, "10262000e": 64, "66452550e": 64, "94445150e": 64, "10343345e": 64, "82331400e": 64, "00407050e": 64, "10403525e": 64, "98205150e": 64, "06363850e": 64, "10442795e": 64, "01406870e": 64, "12305350e": 64, "10461665e": 64, "02992970e": 64, "18229000e": 64, "10460645e": 64, "04578815e": 64, "24134800e": 64, "10439990e": 64, "06164405e": 64, "30017650e": 64, "10400465e": 64, "07749995e": 64, "35877550e": 64, "10342070e": 64, "09335840e": 64, "41714500e": 64, "10265060e": 64, "10921685e": 64, "47525950e": 64, "10169945e": 64, "12507785e": 64, "53311900e": 64, "10056470e": 64, "14094140e": 64, "59072350e": 64, "09925400e": 64, "15681005e": 64, "64812400e": 64, "09776990e": 64, "17268125e": 64, "70526950e": 64, "09610730e": 64, "18855500e": 64, "76221100e": 64, "09426875e": 64, "20443640e": 64, "81894850e": 64, "09225170e": 64, "22032290e": 64, "87548200e": 64, "09006125e": 64, "23621195e": 64, "93183700e": 64, "08769740e": 64, "25210610e": 64, "98806450e": 64, "08515760e": 64, "26800535e": 64, "04416450e": 64, "08244440e": 64, "28390715e": 64, "10016250e": 64, "07955780e": 64, "29981150e": 64, "15610950e": 64, "07649780e": 64, "31571585e": 64, "21198000e": 64, "07326185e": 64, "33162530e": 64, "26782500e": 64, "06984995e": 64, "34753220e": 64, "32369550e": 64, "06626210e": 64, "36344165e": 64, "37961700e": 64, "06250085e": 64, "37934600e": 64, "43558950e": 64, "05856365e": 64, "39525035e": 64, "49168950e": 64, "05445305e": 64, "41114960e": 64, "54791700e": 64, "05016395e": 64, "42704120e": 64, "60432300e": 64, "04569890e": 64, "44292770e": 64, "66095850e": 64, "04105790e": 64, "45880655e": 64, "71782350e": 64, "03624095e": 64, "47467520e": 64, "77499450e": 64, "03124805e": 64, "49052855e": 64, "83249700e": 64, "02608175e": 64, "50637170e": 64, "89035650e": 64, "02073950e": 64, "52219700e": 64, "94862400e": 64, "01521875e": 64, "53800445e": 64, "00735050e": 64, "00952205e": 64, "55379150e": 64, "06658700e": 64, "00365195e": 64, "56955815e": 64, "12633350e": 64, "97608450e": 64, "58529675e": 64, "18669200e": 64, "91391550e": 64, "60100985e": 64, "24766250e": 64, "85003800e": 64, "61669490e": 64, "30929600e": 64, "78445200e": 64, "63234425e": 64, "37166900e": 64, "71715750e": 64, "64796300e": 64, "43480700e": 64, "64815450e": 64, "66354095e": 64, "49873550e": 64, "57744300e": 64, "67908065e": 64, "56353100e": 64, "50507400e": 64, "69457700e": 64, "62924450e": 64, "43107300e": 64, "71002745e": 64, "69590150e": 64, "35541450e": 64, "72542690e": 64, "76357850e": 64, "27814950e": 64, "74077280e": 64, "83227550e": 64, "19930350e": 64, "75606515e": 64, "90209450e": 64, "11887650e": 64, "77129885e": 64, "97303550e": 64, "03689400e": 64, "78646880e": 64, "04520050e": 64, "95338150e": 64, "80157500e": 64, "11856400e": 64, "86831350e": 64, "81660980e": 64, "19322800e": 64, "78176650e": 64, "83157320e": 64, "26921800e": 64, "69374050e": 64, "84646265e": 64, "34658500e": 64, "60431200e": 64, "86126795e": 64, "42535450e": 64, "51345550e": 64, "87599165e": 64, "50560300e": 64, "42124750e": 64, "89062865e": 64, "58735600e": 64, "32768800e": 64, "90517385e": 64, "67063900e": 64, "23282800e": 64, "91962470e": 64, "75550300e": 64, "13666750e": 64, "93397610e": 64, "84197350e": 64, "03928300e": 64, "94822550e": 64, "93012700e": 64, "94067450e": 64, "96236780e": 64, "01996350e": 64, "84086750e": 64, "97640045e": 64, "11150850e": 64, "73991300e": 64, "99031835e": 64, "20483850e": 64, "63783650e": 64, "00411895e": 64, "29992800e": 64, "53466350e": 64, "01779715e": 64, "39682800e": 64, "43044500e": 64, "03134785e": 64, "49556400e": 64, "32523200e": 64, "04477105e": 64, "59618700e": 64, "21902450e": 64, "05805910e": 64, "69864600e": 64, "11189900e": 64, "07120945e": 64, "80304300e": 64, "00385550e": 64, "08421955e": 64, "90932700e": 64, "89494500e": 64, "09708430e": 64, "01752350e": 64, "78516750e": 64, "10979860e": 64, "12768350e": 64, "67462500e": 64, "12236245e": 64, "23978150e": 64, "56326650e": 64, "13477075e": 64, "35381750e": 64, "45119400e": 64, "14702095e": 64, "46979150e": 64, "33838200e": 64, "15910795e": 64, "58775450e": 64, "22488150e": 64, "17102920e": 64, "70763000e": 64, "11071800e": 64, "18277960e": 64, "82946900e": 64, "99589150e": 64, "19435915e": 64, "95324600e": 64, "88045300e": 64, "20576530e": 64, "07896100e": 64, "76440250e": 64, "21699295e": 64, "20658850e": 64, "64779100e": 64, "22803955e": 64, "33610300e": 64, "53059300e": 64, "23890255e": 64, "46753000e": 64, "41283400e": 64, "24957940e": 64, "60081850e": 64, "29451400e": 64, "26007010e": 64, "73594300e": 64, "17568400e": 64, "27036955e": 64, "87290350e": 64, "05629300e": 64, "28047775e": 64, "01167450e": 64, "93639200e": 64, "29038960e": 64, "15223050e": 64, "81593000e": 64, "30010765e": 64, "29454600e": 64, "69495800e": 64, "30962425e": 64, "43857000e": 64, "57342500e": 64, "31894450e": 64, "58432800e": 64, "45135650e": 64, "32806330e": 64, "73171800e": 64, "32875250e": 64, "33697810e": 64, "88076550e": 64, "20556200e": 64, "34569145e": 64, "00314195e": 64, "08178500e": 64, "35419825e": 64, "01836545e": 64, "95742150e": 64, "36249850e": 64, "03374195e": 64, "83244600e": 64, "37059220e": 64, "04927145e": 64, "70685850e": 64, "37847935e": 64, "06494885e": 64, "58063350e": 64, "38615485e": 64, "08076905e": 64, "45372000e": 64, "39362125e": 64, "09673205e": 64, "32616900e": 64, "40087855e": 64, "11283275e": 64, "19792950e": 64, "40792675e": 64, "12906860e": 64, "06902700e": 64, "41476075e": 64, "14543705e": 64, "93943600e": 64, "42138310e": 64, "16193300e": 64, "80918200e": 64, "42779125e": 64, "17855390e": 64, "67829050e": 64, "43399030e": 64, "19529720e": 64, "54678700e": 64, "43997260e": 64, "21215780e": 64, "41472250e": 64, "44574070e": 64, "22913570e": 64, "28222450e": 64, "45129715e": 64, "24622580e": 64, "14936950e": 64, "45663685e": 64, "26342810e": 64, "01636150e": 64, "46176235e": 64, "28073495e": 64, "88340450e": 64, "46667110e": 64, "29814890e": 64, "75080450e": 64, "47136565e": 64, "31566230e": 64, "61894400e": 64, "47584345e": 64, "33327515e": 64, "48835850e": 64, "48010450e": 64, "35098490e": 64, "35976200e": 64, "48414880e": 64, "36878900e": 64, "23399600e": 64, "48797635e": 64, "38668490e": 64, "11225900e": 64, "49158460e": 64, "40466750e": 64, "95775000e": 64, "49497610e": 64, "42273935e": 64, "90740500e": 64, "49814830e": 64, "44089535e": 64, "00929500e": 64, "50110120e": 64, "45913295e": 64, "26954000e": 64, "50383225e": 64, "47744960e": 64, "69375000e": 64, "50634655e": 64, "49584530e": 64, "28855500e": 64, "50863645e": 64, "51431495e": 64, "06135000e": 64, "51070705e": 64, "53286110e": 64, "01953000e": 64, "51255325e": 64, "55147610e": 64, "17151000e": 64, "51417760e": 64, "57016250e": 64, "52596000e": 64, "51558010e": 64, "58891775e": 64, "09257000e": 64, "51675820e": 64, "60773675e": 64, "88154000e": 64, "51770935e": 64, "62661950e": 64, "90358000e": 64, "51843610e": 64, "64556600e": 64, "01709300e": 64, "51893845e": 64, "66457115e": 64, "16231550e": 64, "51921130e": 64, "68363750e": 64, "31962500e": 64, "51925975e": 64, "70275740e": 64, "48738950e": 64, "51907870e": 64, "72193085e": 64, "66405350e": 64, "51867070e": 64, "74115785e": 64, "84846950e": 64, "51803320e": 64, "76043330e": 64, "03974500e": 64, "51716620e": 64, "77975720e": 64, "23714050e": 64, "51606970e": 64, "79912700e": 64, "44019700e": 64, "51474625e": 64, "81854015e": 64, "64850650e": 64, "51319330e": 64, "83799410e": 64, "86183950e": 64, "51140575e": 64, "85748885e": 64, "08001750e": 64, "50939125e": 64, "87702185e": 64, "30293850e": 64, "50714980e": 64, "89658290e": 64, "53055150e": 64, "50468140e": 64, "91617710e": 64, "76290750e": 64, "50199115e": 64, "93579425e": 64, "00000650e": 64, "49908160e": 64, "95543435e": 64, "24200150e": 64, "49595530e": 64, "97508975e": 64, "48894350e": 64, "49261735e": 64, "99475790e": 64, "74103650e": 64, "48907540e": 64, "01443370e": 64, "99845900e": 64, "48532690e": 64, "03411460e": 64, "26146600e": 64, "48137440e": 64, "05379295e": 64, "53036350e": 64, "47724340e": 64, "07346110e": 64, "80527900e": 64, "47294665e": 64, "09310375e": 64, "08649300e": 64, "46850455e": 64, "11271325e": 64, "37428600e": 64, "46391965e": 64, "13228705e": 64, "66911700e": 64, "45920470e": 64, "15181240e": 64, "97147050e": 64, "45441835e": 64, "17126380e": 64, "28142300e": 64, "44959630e": 64, "19062595e": 64, "59925500e": 64, "44473600e": 64, "20989120e": 64, "92591000e": 64, "43992670e": 64, "22902895e": 64, "26133700e": 64, "43524235e": 64, "24800095e": 64, "60561250e": 64, "43069825e": 64, "26680210e": 64, "95990950e": 64, "42644230e": 64, "28537630e": 64, "32348850e": 64, "42254590e": 64, "30369295e": 64, "69691050e": 64, "41914165e": 64, "32170615e": 64, "00798695e": 64, "41636470e": 64, "33936745e": 64, "04719575e": 64, "41436295e": 64, "35662840e": 64, "08725115e": 64, "41329960e": 64, "37344055e": 64, "12803585e": 64, "41332765e": 64, "38975545e": 64, "16940960e": 64, "41460265e": 64, "40553740e": 64, "21117350e": 64, "41723935e": 64, "42076090e": 64, "25313630e": 64, "42133975e": 64, "43541065e": 64, "29504300e": 64, "42693700e": 64, "44949685e": 64, "33671765e": 64, "43404895e": 64, "46303480e": 64, "37792055e": 64, "44263480e": 64, "47605765e": 64, "41850125e": 64, "45262060e": 64, "48860620e": 64, "45840875e": 64, "46393495e": 64, "50072890e": 64, "49737530e": 64, "47646310e": 64, "51246910e": 64, "53549270e": 64, "49010305e": 64, "52387015e": 64, "57273800e": 64, "50475535e": 64, "53497795e": 64, "60909335e": 64, "52032310e": 64, "54582820e": 64, "64455620e": 64, "28476650e": 64, "59976500e": 64, "34633625e": 64, "62016800e": 64, "24863000e": 64, "35946620e": 64, "92150150e": 64, "93753000e": 64, "37191785e": 64, "19866100e": 64, "66187500e": 64, "38377790e": 64, "45766450e": 64, "41707500e": 64, "39511265e": 64, "70249000e": 64, "19879500e": 64, "40598840e": 64, "93566200e": 64, "00678000e": 64, "41644340e": 64, "15952650e": 64, "83389000e": 64, "42652865e": 64, "37571550e": 64, "67579000e": 64, "43628750e": 64, "58537650e": 64, "53018500e": 64, "44574545e": 64, "78947850e": 64, "39427000e": 64, "45493310e": 64, "98873550e": 64, "26600500e": 64, "46386575e": 64, "18378500e": 64, "14360500e": 64, "47256890e": 64, "37513700e": 64, "02503000e": 64, "48105530e": 64, "56322500e": 64, "90926000e": 64, "48933770e": 64, "74843150e": 64, "79476500e": 64, "49743140e": 64, "93103700e": 64, "68027000e": 64, "50534150e": 64, "11134750e": 64, "56501000e": 64, "51307820e": 64, "28959250e": 64, "44771000e": 64, "52064915e": 64, "46592500e": 64, "32811500e": 64, "52805945e": 64, "64052350e": 64, "20673500e": 64, "53531165e": 64, "81356650e": 64, "54241085e": 64, "98523250e": 64, "95301000e": 64, "54935960e": 64, "15559800e": 64, "81964500e": 64, "55616045e": 64, "32481600e": 64, "68194500e": 64, "56281340e": 64, "49298850e": 64, "53991000e": 64, "56931845e": 64, "66016650e": 64, "39354000e": 64, "57567305e": 64, "82642650e": 64, "24258000e": 64, "58188230e": 64, "99187050e": 64, "08779500e": 64, "58794110e": 64, "15652400e": 64, "92944000e": 64, "59384690e": 64, "32043800e": 64, "76802500e": 64, "59960225e": 64, "48368900e": 64, "60431500e": 64, "60519950e": 64, "64630250e": 64, "61064120e": 64, "80835500e": 64, "27001000e": 64, "61591970e": 64, "96984650e": 64, "10094500e": 64, "62103500e": 64, "13082800e": 64, "93188000e": 64, "62598200e": 64, "29132500e": 64, "76332500e": 64, "63075560e": 64, "45136300e": 64, "59655500e": 64, "63535580e": 64, "61091650e": 64, "43259000e": 64, "63977495e": 64, "77008750e": 64, "27270500e": 64, "64401050e": 64, "92882500e": 64, "11741000e": 64, "64805990e": 64, "08715450e": 64, "68490000e": 64, "65191550e": 64, "24510150e": 64, "26965000e": 64, "65557475e": 64, "40269150e": 64, "94620000e": 64, "65903255e": 64, "55987350e": 64, "72475000e": 64, "66228380e": 64, "71669850e": 64, "62570000e": 64, "66532340e": 64, "87316650e": 64, "65670000e": 64, "66815135e": 64, "00292520e": 64, "84070000e": 64, "67075745e": 64, "01849805e": 64, "19045000e": 64, "67313915e": 64, "03403265e": 64, "72890000e": 64, "67529135e": 64, "04952900e": 64, "47135000e": 64, "67721150e": 64, "06498710e": 64, "43820000e": 64, "67889450e": 64, "08040695e": 64, "64730000e": 64, "68033780e": 64, "09578345e": 64, "11905000e": 64, "68153375e": 64, "11112170e": 64, "87385000e": 64, "68248235e": 64, "12641660e": 64, "92700000e": 64, "68317595e": 64, "14167070e": 64, "30400000e": 64, "68361200e": 64, "15687635e": 64, "02525000e": 64, "68379050e": 64, "17203865e": 64, "11370000e": 64, "68370635e": 64, "18715250e": 64, "15897500e": 64, "68335445e": 64, "20221535e": 64, "44789000e": 64, "68273735e": 64, "21722720e": 64, "77990000e": 64, "68184995e": 64, "23218550e": 64, "15730000e": 64, "68069225e": 64, "24709025e": 64, "58238500e": 64, "67926170e": 64, "26193635e": 64, "05745000e": 64, "67755575e": 64, "27672890e": 64, "58402500e": 64, "67557440e": 64, "29145770e": 64, "16491500e": 64, "67331510e": 64, "30612530e": 64, "80241500e": 64, "67078295e": 64, "32072915e": 64, "49856500e": 64, "66797795e": 64, "33526415e": 64, "25566000e": 64, "66489755e": 64, "34973030e": 64, "07548500e": 64, "66154430e": 64, "36412760e": 64, "96033500e": 64, "65792075e": 64, "37845350e": 64, "91225000e": 64, "65403200e": 64, "39270035e": 64, "93327000e": 64, "64987550e": 64, "40687325e": 64, "09996800e": 64, "64545635e": 64, "42096965e": 64, "20694050e": 64, "64077965e": 64, "43498190e": 64, "31439750e": 64, "63584795e": 64, "44891255e": 64, "42233900e": 64, "63066635e": 64, "46276160e": 64, "53071400e": 64, "62523995e": 64, "47652395e": 64, "63954800e": 64, "61957130e": 64, "49019705e": 64, "74876450e": 64, "61367060e": 64, "50378345e": 64, "85838900e": 64, "60754040e": 64, "51727805e": 64, "96834500e": 64, "60118835e": 64, "53067830e": 64, "07865800e": 64, "59462210e": 64, "54398675e": 64, "18927700e": 64, "58784930e": 64, "55720085e": 64, "30020200e": 64, "58087505e": 64, "57032060e": 64, "41138200e": 64, "57370700e": 64, "58334345e": 64, "52281700e": 64, "56635535e": 64, "59626685e": 64, "63445600e": 64, "55882775e": 64, "74632450e": 64, "55113185e": 64, "62182040e": 64, "85834600e": 64, "54327275e": 64, "63444545e": 64, "97054600e": 64, "53526575e": 64, "64697360e": 64, "08289900e": 64, "52711085e": 64, "65940230e": 64, "19537950e": 64, "51882335e": 64, "67172900e": 64, "30798750e": 64, "51040835e": 64, "68395370e": 64, "42067200e": 64, "50187605e": 64, "69607895e": 64, "53343300e": 64, "49323410e": 64, "70810475e": 64, "64629600e": 64, "48449270e": 64, "72003110e": 64, "75918450e": 64, "47565440e": 64, "73185800e": 64, "87212400e": 64, "46673195e": 64, "74358290e": 64, "98508900e": 64, "45773300e": 64, "75521090e": 64, "09807950e": 64, "44866265e": 64, "76674200e": 64, "21109550e": 64, "43953110e": 64, "77817620e": 64, "32411150e": 64, "43034345e": 64, "78951095e": 64, "43712750e": 64, "42110480e": 64, "80075390e": 64, "55014350e": 64, "41182535e": 64, "81189995e": 64, "66313400e": 64, "40251020e": 64, "82295165e": 64, "77612450e": 64, "39316190e": 64, "83391155e": 64, "88908950e": 64, "38379065e": 64, "84478220e": 64, "00202900e": 64, "37440155e": 64, "85555850e": 64, "11494300e": 64, "36499715e": 64, "86624810e": 64, "22783150e": 64, "35558255e": 64, "87684845e": 64, "34069450e": 64, "34616540e": 64, "88736465e": 64, "45353200e": 64, "33675080e": 64, "89779160e": 64, "56634400e": 64, "32733620e": 64, "90813695e": 64, "67913050e": 64, "31792670e": 64, "91839560e": 64, "79189150e": 64, "30852995e": 64, "92857520e": 64, "90465250e": 64, "29914340e": 64, "93867320e": 64, "01738800e": 64, "28977470e": 64, "94869215e": 64, "13009800e": 64, "28042130e": 64, "95862950e": 64, "24283350e": 64, "27108575e": 64, "96849290e": 64, "35554350e": 64, "26177315e": 64, "97827980e": 64, "46827900e": 64, "25248605e": 64, "98799020e": 64, "58098900e": 64, "24322445e": 64, "99762665e": 64, "23399090e": 64, "00718915e": 64, "80651100e": 64, "22478285e": 64, "01668025e": 64, "91929750e": 64, "21560030e": 64, "02609995e": 64, "03213500e": 64, "20644835e": 64, "03545080e": 64, "14502350e": 64, "19732190e": 64, "04473025e": 64, "25796300e": 64, "18822605e": 64, "05394085e": 64, "37095350e": 64, "17915825e": 64, "06308260e": 64, "48402050e": 64, "17011850e": 64, "07216060e": 64, "59716400e": 64, "16111190e": 64, "08116720e": 64, "71038400e": 64, "15213080e": 64, "09011005e": 64, "82370600e": 64, "14318030e": 64, "09898660e": 64, "93715550e": 64, "13425530e": 64, "10779940e": 64, "05070700e": 64, "12535580e": 64, "11654590e": 64, "16438600e": 64, "11648180e": 64, "12522610e": 64, "27819250e": 64, "10763330e": 64, "13384255e": 64, "39217750e": 64, "09880775e": 64, "14239525e": 64, "50629000e": 64, "09001025e": 64, "15088420e": 64, "62058100e": 64, "08123315e": 64, "15930940e": 64, "73505050e": 64, "07247645e": 64, "16766830e": 64, "84972400e": 64, "06374015e": 64, "17596345e": 64, "96460150e": 64, "05502170e": 64, "18419485e": 64, "07968300e": 64, "04632110e": 64, "19236250e": 64, "19499400e": 64, "03763835e": 64, "20046385e": 64, "31053450e": 64, "02897345e": 64, "20849890e": 64, "42633000e": 64, "02032130e": 64, "21646765e": 64, "54240600e": 64, "01168190e": 64, "22437265e": 64, "65873700e": 64, "00305525e": 64, "23220880e": 64, "77534850e": 64, "94438800e": 64, "23997865e": 64, "89226600e": 64, "85830000e": 64, "24767965e": 64, "00094895e": 64, "77233950e": 64, "25531180e": 64, "01270445e": 64, "68643000e": 64, "26287510e": 64, "02449310e": 64, "60059700e": 64, "27036700e": 64, "03631490e": 64, "51481500e": 64, "27778750e": 64, "04817240e": 64, "42908400e": 64, "28513405e": 64, "06006560e": 64, "34337850e": 64, "29240920e": 64, "07199960e": 64, "25769850e": 64, "29960785e": 64, "08397185e": 64, "17204400e": 64, "30673255e": 64, "09598235e": 64, "08638950e": 64, "31378075e": 64, "10803620e": 64, "00073500e": 64, "32074990e": 64, "12013340e": 64, "91505500e": 64, "32764000e": 64, "13227395e": 64, "82940050e": 64, "33445105e": 64, "14445785e": 64, "74369500e": 64, "34117795e": 64, "15668765e": 64, "65798950e": 64, "34782070e": 64, "16896335e": 64, "57223300e": 64, "35438185e": 64, "18129005e": 64, "48642550e": 64, "36085375e": 64, "19366265e": 64, "40059250e": 64, "36723895e": 64, "20608625e": 64, "31470850e": 64, "37353490e": 64, "21856085e": 64, "22877350e": 64, "37974160e": 64, "23108900e": 64, "14278750e": 64, "38585650e": 64, "24366560e": 64, "05677600e": 64, "39187450e": 64, "25630085e": 64, "97066250e": 64, "39779815e": 64, "26898710e": 64, "88452350e": 64, "40362490e": 64, "28172945e": 64, "79830800e": 64, "40935220e": 64, "29452790e": 64, "71204150e": 64, "41498005e": 64, "30738245e": 64, "62574950e": 64, "42050335e": 64, "32029565e": 64, "53938100e": 64, "42592720e": 64, "33326750e": 64, "45301250e": 64, "43124140e": 64, "34629800e": 64, "36651650e": 64, "43644850e": 64, "35938715e": 64, "27999500e": 64, "44154595e": 64, "37253750e": 64, "19344800e": 64, "44653120e": 64, "38574905e": 64, "10687550e": 64, "45140680e": 64, "39902180e": 64, "02027750e": 64, "45616765e": 64, "41235575e": 64, "93367950e": 64, "46081120e": 64, "42575090e": 64, "84708150e": 64, "46533490e": 64, "43920980e": 64, "76050900e": 64, "46974130e": 64, "45273500e": 64, "67388550e": 64, "47402275e": 64, "46632140e": 64, "58728750e": 64, "47817925e": 64, "47997410e": 64, "50074050e": 64, "48221080e": 64, "49369055e": 64, "41427000e": 64, "48611485e": 64, "50747075e": 64, "32785050e": 64, "48989140e": 64, "52131725e": 64, "24155850e": 64, "49353280e": 64, "53523005e": 64, "15536850e": 64, "49704415e": 64, "54920660e": 64, "06933150e": 64, "50041780e": 64, "56324945e": 64, "98347300e": 64, "50365630e": 64, "57735860e": 64, "89781850e": 64, "50675455e": 64, "59153405e": 64, "81239350e": 64, "50970745e": 64, "60578090e": 64, "72717250e": 64, "51251755e": 64, "62009150e": 64, "64225750e": 64, "51517975e": 64, "63447095e": 64, "55767400e": 64, "51769660e": 64, "64891415e": 64, "47352400e": 64, "52006300e": 64, "66342875e": 64, "38978200e": 64, "52227640e": 64, "67800965e": 64, "30655000e": 64, "52433425e": 64, "69265685e": 64, "22390450e": 64, "52623655e": 64, "70737290e": 64, "14187100e": 64, "52798075e": 64, "72215525e": 64, "06055150e": 64, "52956175e": 64, "73700645e": 64, "98002250e": 64, "53097955e": 64, "75192650e": 64, "90033500e": 64, "53223160e": 64, "76691285e": 64, "82164200e": 64, "53331280e": 64, "78196550e": 64, "74404550e": 64, "53422570e": 64, "79708955e": 64, "66759650e": 64, "53496265e": 64, "81227990e": 64, "59247350e": 64, "53552620e": 64, "82753655e": 64, "51880400e": 64, "53590870e": 64, "84286205e": 64, "44671550e": 64, "53611015e": 64, "85825640e": 64, "37636100e": 64, "53613055e": 64, "87371705e": 64, "30791900e": 64, "53596225e": 64, "88924400e": 64, "24154250e": 64, "53560525e": 64, "90483725e": 64, "17743550e": 64, "53505955e": 64, "92049935e": 64, "11580200e": 64, "53432005e": 64, "93622520e": 64, "05684600e": 64, "53337910e": 64, "95202245e": 64, "00072050e": 64, "53223415e": 64, "96788600e": 64, "94760400e": 64, "53088775e": 64, "98381585e": 64, "89780250e": 64, "52933735e": 64, "99980945e": 64, "85157100e": 64, "52758295e": 64, "01586935e": 64, "80911350e": 64, "52561945e": 64, "03199045e": 64, "77068500e": 64, "52344685e": 64, "04817275e": 64, "73648950e": 64, "52105240e": 64, "06442645e": 64, "70660350e": 64, "51843355e": 64, "08074390e": 64, "68125650e": 64, "51559795e": 64, "09712255e": 64, "66070350e": 64, "51255070e": 64, "11355730e": 64, "64509750e": 64, "50927905e": 64, "13005325e": 64, "63446400e": 64, "50576515e": 64, "14662060e": 64, "62872650e": 64, "50203450e": 64, "16323895e": 64, "62811450e": 64, "49809220e": 64, "17990830e": 64, "63255150e": 64, "49388725e": 64, "19665160e": 64, "64160400e": 64, "48947575e": 64, "21344080e": 64, "65545050e": 64, "48482965e": 64, "23028610e": 64, "67355550e": 64, "47995150e": 64, "24718750e": 64, "69553650e": 64, "47485915e": 64, "26413480e": 64, "72093450e": 64, "46952965e": 64, "28113820e": 64, "74885700e": 64, "46399105e": 64, "29818495e": 64, "77859000e": 64, "45825355e": 64, "31527250e": 64, "80893500e": 64, "45228655e": 64, "33241360e": 64, "83826000e": 64, "44615380e": 64, "34958785e": 64, "86493300e": 64, "43986040e": 64, "36678760e": 64, "88642950e": 64, "43343185e": 64, "38401540e": 64, "89948550e": 64, "42690130e": 64, "40126105e": 64, "89958750e": 64, "42033505e": 64, "41850925e": 64, "88053900e": 64, "41383510e": 64, "43573450e": 64, "83336400e": 64, "40758760e": 64, "45288580e": 64, "74495550e": 64, "40183480e": 64, "46990450e": 64, "59437800e": 64, "39703825e": 64, "48665290e": 64, "34881300e": 64, "68": 64, "08602": 64, "24287": 64, "84": 64, "000825": 64, "47005": 64, "449275": 64, "533885": 64, "83572": 64, "729375": 64, "87": 64, "051645": 64, "69": 64, "182775": 64, "08521": 64, "88": 64, "553595": 64, "51147": 64, "518565": 64, "90": 64, "038715": 64, "821295": 64, "031735": 64, "507515": 64, "70": 64, "11276": 64, "62676": 64, "92": 64, "958465": 64, "38561": 64, "262585": 64, "94": 64, "39182": 64, "63959": 64, "83772": 64, "95": 64, "807325": 64, "874955": 64, "36262": 64, "97": 64, "203705": 64, "71": 64, "091705": 64, "846975": 64, "98": 64, "58096": 64, "28933": 64, "29818": 64, "99": 64, "938835": 64, "468085": 64, "721335": 64, "101": 64, "276565": 64, "62797": 64, "121285": 64, "102": 64, "593895": 64, "76873": 64, "5016": 64, "103": 64, "89057": 64, "89062": 64, "86483": 64, "105": 64, "165825": 64, "993385": 64, "213525": 64, "106": 64, "419405": 64, "72": 64, "07728": 64, "54998": 64, "107": 64, "6508": 64, "14205": 64, "875215": 64, "108": 64, "86001": 64, "188205": 64, "191015": 64, "110": 64, "04627": 64, "215235": 64, "4984": 64, "111": 64, "209325": 64, "223395": 64, "798135": 64, "112": 64, "34892": 64, "212685": 64, "09124": 64, "113": 64, "4648": 64, "18336": 64, "378225": 64, "114": 64, "556455": 64, "13542": 64, "34": 64, "6596": 64, "115": 64, "623885": 64, "068865": 64, "35": 64, "93613": 64, "116": 64, "666835": 64, "98395": 64, "20756": 64, "117": 64, "68505": 64, "881185": 64, "474655": 64, "118": 64, "678275": 64, "76006": 64, "73767": 64, "119": 64, "646255": 64, "62134": 64, "996605": 64, "120": 64, "589245": 64, "465025": 64, "251715": 64, "121": 64, "50699": 64, "29137": 64, "502745": 64, "122": 64, "399235": 64, "10063": 64, "74995": 64, "123": 64, "266235": 64, "89306": 64, "993585": 64, "124": 64, "107735": 64, "66917": 64, "23314": 64, "92399": 64, "42947": 64, "46887": 64, "125": 64, "715255": 64, "173705": 64, "700775": 64, "126": 64, "481275": 64, "90264": 64, "928855": 64, "127": 64, "222305": 64, "61653": 64, "52": 64, "1526": 64, "938855": 64, "31614": 64, "53": 64, "372265": 64, "128": 64, "63067": 64, "001725": 64, "54": 64, "587595": 64, "129": 64, "29826": 64, "67354": 64, "79859": 64, "942135": 64, "33184": 64, "004995": 64, "130": 64, "56204": 64, "67": 64, "9779": 64, "58": 64, "20681": 64, "131": 64, "158995": 64, "611975": 64, "40378": 64, "732745": 64, "234065": 64, "60": 64, "595905": 64, "132": 64, "28431": 64, "84519": 64, "61": 64, "78293": 64, "813435": 64, "445605": 64, "62": 64, "96511": 64, "133": 64, "32114": 64, "036075": 64, "64": 64, "141935": 64, "80768": 64, "65": 64, "61711": 64, "31315": 64, "134": 64, "273565": 64, "189475": 64, "479265": 64, "71956": 64, "753425": 64, "63977": 64, "135": 64, "145665": 64, "30947": 64, "794665": 64, "552645": 64, "63": 64, "858375": 64, "94395": 64, "941265": 64, "400395": 64, "087625": 64, "136": 64, "31178": 64, "936805": 64, "225435": 64, "664955": 64, "46786": 64, "73": 64, "357125": 64, "137": 64, "0013": 64, "993815": 64, "74": 64, "48346": 64, "32158": 64, "515435": 64, "603675": 64, "625795": 64, "03323": 64, "76": 64, "718025": 64, "91522": 64, "547455": 64, "77": 64, "82651": 64, "138": 64, "189855": 64, "05913": 64, "78": 64, "929385": 64, "45072": 64, "568765": 64, "80": 64, "02614": 64, "69807": 64, "07687": 64, "81": 64, "11703": 64, "93267": 64, "583445": 64, "82": 64, "202055": 64, "139": 64, "15503": 64, "08951": 64, "83": 64, "28147": 64, "36566": 64, "595065": 64, "355275": 64, "56507": 64, "100875": 64, "42347": 64, "753515": 64, "56": 64, "607195": 64, "86": 64, "486055": 64, "93176": 64, "114535": 64, "543285": 64, "140": 64, "100315": 64, "62315": 64, "59516": 64, "25969": 64, "13355": 64, "89": 64, "641425": 64, "409885": 64, "64599": 64, "682845": 64, "55192": 64, "160725": 64, "719165": 64, "68605": 64, "678265": 64, "750385": 64, "81253": 64, "198865": 64, "93": 64, "77676": 64, "932125": 64, "72278": 64, "79829": 64, "141": 64, "044835": 64, "250265": 64, "81523": 64, "150915": 64, "51": 64, "781065": 64, "96": 64, "82758": 64, "250875": 64, "315945": 64, "83585": 64, "34497": 64, "85465": 64, "839785": 64, "43371": 64, "39718": 64, "83964": 64, "517095": 64, "9443": 64, "835415": 64, "59538": 64, "4955": 64, "827365": 64, "669075": 64, "051035": 64, "815745": 64, "73818": 64, "610905": 64, "800555": 64, "802695": 64, "175365": 64, "104": 64, "78205": 64, "86313": 64, "743905": 64, "76023": 64, "919485": 64, "31678": 64, "73535": 64, "972015": 64, "89399": 64, "707665": 64, "142": 64, "02072": 64, "47528": 64, "67692": 64, "0656": 64, "060395": 64, "109": 64, "643625": 64, "10691": 64, "649845": 64, "60778": 64, "14465": 64, "242865": 64, "569385": 64, "179075": 64, "839455": 64, "52895": 64, "209675": 64, "43987": 64, "48622": 64, "23696": 64, "043345": 64, "441705": 64, "260675": 64, "64988": 64, "39515": 64, "281075": 64, "25973": 64, "34681": 64, "29765": 64, "87213": 64, "29694": 64, "31091": 64, "487335": 64, "24554": 64, "320345": 64, "104835": 64, "192865": 64, "325955": 64, "724375": 64, "138915": 64, "32774": 64, "34621": 64, "08369": 64, "3257": 64, "969575": 64, "0277": 64, "319325": 64, "59447": 64, "970435": 64, "308615": 64, "220895": 64, "91266": 64, "293315": 64, "84885": 64, "85412": 64, "27368": 64, "477825": 64, "794815": 64, "2492": 64, "10782": 64, "735": 64, "21962": 64, "73909": 64, "674675": 64, "184685": 64, "37138": 64, "614095": 64, "004945": 64, "553005": 64, "09875": 64, "639785": 64, "491915": 64, "047495": 64, "2759": 64, "430315": 64, "989865": 64, "913545": 64, "368715": 64, "92586": 64, "552465": 64, "307115": 64, "855225": 64, "193425": 64, "245515": 64, "777705": 64, "83668": 64, "18366": 64, "693045": 64, "482485": 64, "12206": 64, "60099": 64, "13135": 64, "06046": 64, "50103": 64, "78404": 64, "999115": 64, "393165": 64, "44183": 64, "937515": 64, "277395": 64, "104465": 64, "876425": 64, "152955": 64, "77322": 64, "81508": 64, "01959": 64, "44886": 64, "754245": 64, "877045": 64, "132915": 64, "69341": 64, "72532": 64, "825895": 64, "143": 64, "632575": 64, "563395": 64, "52984": 64, "144": 64, "571995": 64, "39178": 64, "145": 64, "511415": 64, "209455": 64, "97547": 64, "146": 64, "45109": 64, "01693": 64, "720725": 64, "147": 64, "39051": 64, "813185": 64, "483065": 64, "148": 64, "330185": 64, "598475": 64, "26453": 64, "149": 64, "269605": 64, "372035": 64, "066905": 64, "150": 64, "209025": 64, "133865": 64, "89274": 64, "151": 64, "148445": 64, "883455": 64, "744075": 64, "152": 64, "08761": 64, "620805": 64, "62346": 64, "153": 64, "02652": 64, "34515": 64, "53319": 64, "965175": 64, "057": 64, "47556": 64, "154": 64, "90332": 64, "75559": 64, "452865": 64, "155": 64, "840955": 64, "44041": 64, "468165": 64, "156": 64, "778335": 64, "11146": 64, "523245": 64, "157": 64, "71495": 64, "768485": 64, "620655": 64, "158": 64, "651055": 64, "41123": 64, "76269": 64, "159": 64, "58614": 64, "03944": 64, "9519": 64, "160": 64, "52046": 64, "653115": 64, "18956": 64, "454015": 64, "25149": 64, "47822": 64, "162": 64, "386295": 64, "834565": 64, "8189": 64, "163": 64, "317555": 64, "40234": 64, "21313": 64, "164": 64, "247285": 64, "954305": 64, "662185": 64, "165": 64, "175995": 64, "490205": 64, "167085": 64, "166": 64, "10292": 64, "01004": 64, "72834": 64, "167": 64, "02857": 64, "513555": 64, "34646": 64, "95218": 64, "000495": 64, "021445": 64, "168": 64, "87426": 64, "470605": 64, "75355": 64, "169": 64, "794045": 64, "923885": 64, "542265": 64, "170": 64, "712045": 64, "359825": 64, "38708": 64, "171": 64, "62775": 64, "77868": 64, "28774": 64, "172": 64, "540905": 64, "180195": 64, "24297": 64, "173": 64, "451765": 64, "56386": 64, "252005": 64, "174": 64, "360075": 64, "92993": 64, "31408": 64, "175": 64, "26558": 64, "277895": 64, "427665": 64, "176": 64, "16828": 64, "60801": 64, "59174": 64, "177": 64, "06792": 64, "919765": 64, "805285": 64, "9645": 64, "213415": 64, "066515": 64, "178": 64, "85751": 64, "488195": 64, "374665": 64, "179": 64, "747205": 64, "744615": 64, "72795": 64, "180": 64, "63333": 64, "98242": 64, "125605": 64, "181": 64, "515885": 64, "201355": 64, "565845": 64, "182": 64, "39436": 64, "40142": 64, "04765": 64, "183": 64, "268755": 64, "582615": 64, "184": 64, "13907": 64, "74494": 64, "13162": 64, "185": 64, "004795": 64, "88763": 64, "731235": 64, "86644": 64, "011195": 64, "367825": 64, "186": 64, "722985": 64, "115635": 64, "04037": 64, "187": 64, "57494": 64, "20044": 64, "74785": 64, "188": 64, "42205": 64, "26612": 64, "489245": 64, "189": 64, "263805": 64, "31242": 64, "263535": 64, "190": 64, "10046": 64, "339085": 64, "069955": 64, "931505": 64, "346115": 64, "907995": 64, "191": 64, "75694": 64, "333255": 64, "776635": 64, "192": 64, "576765": 64, "30076": 64, "674855": 64, "193": 64, "39047": 64, "24863": 64, "602145": 64, "194": 64, "198055": 64, "176865": 64, "55774": 64, "99952": 64, "085465": 64, "79": 64, "540875": 64, "195": 64, "79461": 64, "97443": 64, "551295": 64, "196": 64, "58307": 64, "84376": 64, "58798": 64, "197": 64, "3649": 64, "6932": 64, "650675": 64, "198": 64, "13959": 64, "522495": 64, "73887": 64, "907395": 64, "332155": 64, "8518": 64, "199": 64, "667805": 64, "12218": 64, "988955": 64, "200": 64, "42082": 64, "89257": 64, "14957": 64, "201": 64, "16644": 64, "64307": 64, "333645": 64, "904155": 64, "374445": 64, "540415": 64, "202": 64, "63422": 64, "08593": 64, "76937": 64, "203": 64, "356125": 64, "778035": 64, "020255": 64, "204": 64, "070125": 64, "45076": 64, "292815": 64, "775455": 64, "103595": 64, "58654": 64, "205": 64, "47237": 64, "73705": 64, "900665": 64, "206": 64, "160615": 64, "35138": 64, "234935": 64, "84019": 64, "946585": 64, "58884": 64, "207": 64, "51084": 64, "52292": 64, "96187": 64, "208": 64, "172565": 64, "080385": 64, "353515": 64, "824855": 64, "61949": 64, "76352": 64, "209": 64, "46822": 64, "139725": 64, "19163": 64, "210": 64, "101895": 64, "641855": 64, "636825": 64, "72588": 64, "126135": 64, "099105": 64, "211": 64, "34043": 64, "59231": 64, "57796": 64, "94529": 64, "041145": 64, "07288": 64, "212": 64, "540205": 64, "472385": 64, "583355": 64, "213": 64, "125175": 64, "88654": 64, "10862": 64, "699945": 64, "28463": 64, "64842": 64, "214": 64, "26477": 64, "666655": 64, "20199": 64, "81965": 64, "033635": 64, "768565": 64, "215": 64, "36433": 64, "385825": 64, "34789": 64, "898555": 64, "723735": 64, "938945": 64, "216": 64, "422835": 64, "048895": 64, "541475": 64, "936915": 64, "36156": 64, "154715": 64, "217": 64, "440795": 64, "66326": 64, "777645": 64, "934475": 64, "955015": 64, "41001": 64, "218": 64, "41821": 64, "2381": 64, "050535": 64, "514555": 64, "69871": 64, "219": 64, "355845": 64, "78591": 64, "35377": 64, "809745": 64, "054715": 64, "014695": 64, "220": 64, "25421": 64, "323265": 64, "68072": 64, "68924": 64, "594875": 64, "350825": 64, "221": 64, "114835": 64, "872605": 64, "02399": 64, "531505": 64, "160535": 64, "699705": 64, "93925": 64, "463765": 64, "376695": 64, "222": 64, "33858": 64, "787395": 64, "05394": 64, "729495": 64, "138055": 64, "73042": 64, "223": 64, "112505": 64, "52314": 64, "405115": 64, "48812": 64, "95132": 64, "07726": 64, "85634": 64, "432795": 64, "745325": 64, "224": 64, "217675": 64, "978275": 64, "4088": 64, "57289": 64, "601275": 64, "06641": 64, "92173": 64, "316075": 64, "71688": 64, "225": 64, "265215": 64, "138485": 64, "3597": 64, "6036": 64, "085335": 64, "99385": 64, "937395": 64, "17473": 64, "618055": 64, "226": 64, "26711": 64, "42401": 64, "23155": 64, "593255": 64, "85026": 64, "833315": 64, "91634": 64, "468015": 64, "42284": 64, "227": 64, "236875": 64, "28875": 64, "999105": 64, "55537": 64, "32037": 64, "228": 64, "5616": 64, "87208": 64, "565425": 64, "231": 64, "109305": 64, "188025": 64, "021875": 64, "233": 64, "64171": 64, "503205": 64, "682835": 64, "236": 64, "15703": 64, "81915": 64, "538105": 64, "238": 64, "65552": 64, "229": 64, "13535": 64, "573405": 64, "241": 64, "13718": 64, "452825": 64, "77369": 64, "243": 64, "6015": 64, "771575": 64, "12264": 64, "246": 64, "04797": 64, "230": 64, "092365": 64, "604955": 64, "248": 64, "476335": 64, "41545": 64, "204825": 64, "250": 64, "88634": 64, "741085": 64, "908735": 64, "253": 64, "27824": 64, "070035": 64, "70368": 64, "255": 64, "imagechannel": 64, "imageheight": 64, "imagewidth": 64, "image_connection_state_chang": 64, "we": 64, "try": 64, "littl": 64, "becaus": 64, "might": 64, "extrem": 64, "often": 64, "just": 64, "redrawn": 64, "flat": 64, "1d": 64, "2d": 64, "keypress": 64, "maxredrawr": 64, "boilerpl": 64, "befor": 64, "separ": 64, "so": 64, "after": 64, "redrawimag": 64, "imageitem": 64, "necessari": 64, "reshap": 64, "redrawroi": 64, "roiheight_connection_state_chang": 64, "roiheight_value_chang": 64, "new_height": 64, "roioffsetx_value_chang": 64, "roioffsety_value_chang": 64, "roiwidth_connection_state_chang": 64, "roiwidth_value_chang": 64, "new_width": 64, "setcolormap": 64, "cmap": 64, "setcolormaplimit": 64, "mn": 64, "mx": 64, "showroi": 64, "xaxischannel": 64, "xaxis_value_chang": 64, "new_arrai": 64, "yaxischannel": 64, "yaxis_connection_state_chang": 64, "timeaxi": 64, "yaxis_value_chang": 64, "spectrogramupdatethread": 64, "updatesign": 64, "siriushexaspinbox": 64, "siriusspinbox": 64, "hexa": 64, "textfromvalu": 64, "update_step_s": 64, "valuefromtext": 64, "pydmspinbox": 64, "qdoublespinbox": 64, "focusoutev": 64, "overwrit": 64, "leav": 64, "without": 64, "get_user_limit": 64, "limitsfromchannel": 64, "consid": 64, "new_precison": 64, "update_limit": 64, "pydmspinboxscrollbar": 64, "statebutton": 64, "default_confirm_messag": 64, "sure": 64, "want": 64, "proce": 64, "buttonshapemap": 64, "confirmmessag": 64, "confirm_dialog": 64, "confirm": 64, "case": 64, "showconfirmmessag": 64, "showcofirmmessag": 64, "deal": 64, "password": 64, "passwordprotect": 64, "protectedpassword": 64, "roundedbuttonstatesdict": 64, "256": 64, "viewbox": 64, "733331": 64, "131251": 64, "svg159": 64, "unknown": 64, "roundeddisconnectbutton": 64, "defs153": 64, "collect": 64, "lineargradient47117": 64, "lineargradient47119": 64, "2561": 64, "90253": 64, "214836": 64, "65088": 64, "88273561": 64, "0057873e": 64, "4941557e": 64, "99999332": 64, "5335438": 64, "204087": 64, "cccccc": 64, "stop47113": 64, "stop47115": 64, "lineargradient1689": 64, "88276109": 64, "99999997": 64, "212307": 64, "541": 64, "17351": 64, "067112": 64, "32812": 64, "radialgradi": 64, "radialgradient44460": 64, "781246": 64, "262": 64, "60416": 64, "fx": 64, "fy": 64, "337498": 64, "1815126": 64, "01290238": 64, "00424111": 64, "38837207": 64, "07175464": 64, "9078": 64, "radialgradient8020": 64, "865868": 64, "279": 64, "53745": 64, "53748": 64, "072918": 64, "1909647": 64, "01300556": 64, "00427502": 64, "39147863": 64, "6622104": 64, "54499": 64, "7167969": 64, "7611": 64, "019748": 64, "px": 64, "layer1": 64, "1916": 64, "1057": 64, "1080": 64, "end": 64, "metadata156": 64, "groupmod": 64, "transform": 64, "86873": 64, "rect": 64, "26458332": 64, "rect42330": 64, "73333": 64, "866665": 64, "263": 64, "1333": 64, "rx": 64, "229167": 64, "ry": 64, "b3b3b3": 64, "2906689": 64, "808334": 64, "92706": 64, "79370117": 64, "220833": 64, "145836": 64, "rect42373": 64, "333333": 64, "28020677": 64, "80286": 64, "9333176": 64, "469278": 64, "865112": 64, "2807219": 64, "93956042": 64, "18414214": 64, "808319": 64, "933332": 64, "13333": 64, "441442": 64, "20132458": 64, "493694": 64, "619816": 64, "ececec": 64, "1921802": 64, "114475": 64, "186249": 64, "87042": 64, "292": 64, "63028": 64, "48159": 64, "550447": 64, "362278": 64, "12299201": 64, "12298982": 64, "361429": 64, "550358": 64, "196539": 64, "266": 64, "74576": 64, "441554": 64, "229061": 64, "99996098": 64, "00883377": 64, "00688345": 64, "99997631": 64, "osb": 64, "openswatchbook": 64, "uri": 64, "2009": 64, "73248": 64, "13082": 64, "svg8": 64, "roundedoffbutton": 64, "defs2": 64, "7812": 64, "005000": 64, "stop7933": 64, "stop7935": 64, "lineargradient46973": 64, "gradient": 64, "stop46969": 64, "stop46971": 64, "lineargradient46862": 64, "solid": 64, "stop46860": 64, "89734881": 64, "4897511e": 64, "4871239e": 64, "99998121": 64, "246377": 64, "159312": 64, "8973758": 64, "99998712": 64, "763421": 64, "86262": 64, "7744": 64, "stop44454": 64, "0caa00": 64, "stop44456": 64, "radialgradient7910": 64, "780457": 64, "53751": 64, "0605954": 64, "43150718": 64, "401612": 64, "91485": 64, "radialgradient7939": 64, "932556": 64, "9999871": 64, "47777758": 64, "0853402": 64, "98054": 64, "38798": 64, "8966862": 64, "5760": 64, "metadata5": 64, "86875": 64, "26458001": 64, "732475": 64, "866241": 64, "5439134e": 64, "07": 64, "228996": 64, "29066515": 64, "807911": 64, "92709": 64, "79375291": 64, "220432": 64, "144981": 64, "112b0b": 64, "28020319": 64, "93330657": 64, "468872": 64, "864265": 64, "dasharrai": 64, "2d0000": 64, "18413982": 64, "807896": 64, "295": 64, "94122": 64, "683769": 64, "20298296": 64, "031651": 64, "031662": 64, "94125": 64, "19376327": 64, "629597": 64, "455887": 64, "20413": 64, "293": 64, "32248": 64, "656364": 64, "550274": 64, "848396": 64, "12400515": 64, "1240029": 64, "847494": 64, "550194": 64, "13999988": 64, "265": 64, "69797": 64, "99996224": 64, "0086898": 64, "0069975": 64, "99997552": 64, "228905": 64, "683867": 64, "roundedonbutton": 64, "lineargradient4625": 64, "radialgradient4627": 64, "017721": 64, "353": 64, "20093": 64, "071648": 64, "9999664": 64, "00819926": 64, "00407819": 64, "49736889": 64, "288994": 64, "71222": 64, "99ff55": 64, "stop4621": 64, "stop4623": 64, "lineargradient4617": 64, "7352948": 64, "01419348": 64, "00404564": 64, "49340262": 64, "280736": 64, "60821": 64, "66ff00": 64, "stop4613": 64, "stop4615": 64, "8973486": 64, "99798919": 64, "922592": 64, "782479": 64, "89737575": 64, "99799499": 64, "935714": 64, "14419": 64, "49497475": 64, "771": 64, "7445": 64, "192956": 64, "26458": 64, "26431346": 64, "731026": 64, "798767": 64, "20081": 64, "29037237": 64, "74255": 64, "99298": 64, "79373169": 64, "158237": 64, "143578": 64, "00aa00": 64, "27992097": 64, "86902": 64, "93408203": 64, "406181": 64, "862862": 64, "28043568": 64, "0c5a00": 64, "18395628": 64, "742535": 64, "621399": 64, "13336": 64, "20278068": 64, "031647": 64, "455994": 64, "19357017": 64, "629591": 64, "031769": 64, "09921": 64, "828644": 64, "52328": 64, "848389": 64, "12388157": 64, "12387931": 64, "847486": 64, "523202": 64, "028969": 64, "82593": 64, "99996239": 64, "00867248": 64, "00701146": 64, "99997542": 64, "attr": 64, "th": 64, "whole": 64, "showconfirmdialog": 64, "hint": 64, "squaredbuttonstatesdict": 64, "squareddisconnectbutton": 64, "8213812e": 64, "4296e": 64, "5262653": 64, "145788": 64, "212313": 64, "70269": 64, "176961": 64, "4123198e": 64, "8978764e": 64, "41608433": 64, "1684521": 64, "27202": 64, "radialgradient8012": 64, "865871": 64, "1863765": 64, "4113101e": 64, "1988375e": 64, "41941276": 64, "3117695": 64, "29589": 64, "29494": 64, "021553": 64, "110223e": 64, "9999998": 64, "29066887": 64, "9333332": 64, "9682536": 64, "79370123": 64, "96875": 64, "532774": 64, "8749981": 64, "49369": 64, "619818": 64, "3895538": 64, "9999995": 64, "186256": 64, "87045": 64, "245682": 64, "8064513": 64, "6520737": 64, "0629039": 64, "15945": 64, "481586": 64, "361433": 64, "203831": 64, "68738": 64, "0628154": 64, "6520625": 64, "squaredoffbutton": 64, "lineargradient7812": 64, "stop7808": 64, "stop7810": 64, "lineargradient7744": 64, "stop7740": 64, "stop7742": 64, "12948": 64, "3385": 64, "2611815": 64, "8607088e": 64, "7345295e": 64, "42019145": 64, "84900691": 64, "17349": 64, "0160577": 64, "99998734": 64, "006121": 64, "86296": 64, "0160187": 64, "8494609e": 64, "7616317e": 64, "99998834": 64, "320612": 64, "159684": 64, "radialgradient7746": 64, "309671": 64, "13199": 64, "309669": 64, "525963": 64, "2926485": 64, "0634671e": 64, "7773177e": 64, "43067548": 64, "70463684": 64, "08141": 64, "98994949": 64, "865723": 64, "47843": 64, "732483": 64, "0228883e": 64, "9999495": 64, "29066521": 64, "807919": 64, "9332836": 64, "9682035": 64, "79374027": 64, "22044": 64, "144997": 64, "28020325": 64, "9686997": 64, "98401": 64, "93555796": 64, "220446": 64, "003174": 64, "g5809": 64, "88319365": 64, "874949": 64, "9415": 64, "345203": 64, "807903": 64, "1959385": 64, "9999492": 64, "9013755": 64, "94153": 64, "400234": 64, "21598901": 64, "8064034": 64, "7357788": 64, "20444": 64, "74831": 64, "812752": 64, "20617858": 64, "path47770": 64, "653293": 64, "81587": 64, "202283": 64, "40774": 64, "117931": 64, "32505": 64, "568609": 64, "57327": 64, "218932": 64, "60637": 64, "02726": 64, "56756": 64, "01741": 64, "03127": 64, "0071": 64, "85035": 64, "06793": 64, "35106": 64, "132866": 64, "0937": 64, "497502": 64, "82283": 64, "275617": 64, "55072": 64, "385387": 64, "36052": 64, "793099": 64, "64034": 64, "110913": 64, "76244": 64, "409461": 64, "15731": 64, "453593": 64, "19381": 64, "239241": 64, "19782": 64, "401868": 64, "008": 64, "330211": 64, "33664": 64, "912157": 64, "70891": 64, "59553": 64, "38095": 64, "079958": 64, "98807": 64, "390754": 64, "74298": 64, "213966": 64, "51971": 64, "32349": 64, "6785": 64, "0084": 64, "34756": 64, "173324": 64, "82069": 64, "459914": 64, "3193": 64, "798816": 64, "35087": 64, "275664": 64, "52378": 64, "303577": 64, "0355": 64, "357641": 64, "0269": 64, "188987": 64, "0303": 64, "17280b": 64, "evenodd": 64, "1006349": 64, "miter": 64, "13195072": 64, "795975": 64, "550277": 64, "843052": 64, "32275": 64, "5254014": 64, "6520529": 64, "99997055": 64, "00767484": 64, "00792289": 64, "99996861": 64, "6520544": 64, "5252662": 64, "7001": 64, "15851437": 64, "55029": 64, "794678": 64, "13194825": 64, "squaredonbutton": 64, "89734862": 64, "5002197e": 64, "251636e": 64, "99798917": 64, "92258": 64, "782472": 64, "89737573": 64, "935698": 64, "14417": 64, "49340261": 64, "280746": 64, "6082": 64, "071649": 64, "99996639": 64, "288978": 64, "71221": 64, "712392": 64, "77284": 64, "9998636": 64, "9919798": 64, "925447": 64, "9681182": 64, "79372311": 64, "9607925": 64, "9686146": 64, "93407822": 64, "621384": 64, "5327301": 64, "8672287": 64, "455971": 64, "4456699": 64, "9919796": 64, "629593": 64, "03175": 64, "2994161": 64, "7988195": 64, "6487614": 64, "1136119": 64, "12388156": 64, "028965": 64, "8259": 64, "113518": 64, "6487517": 64, "validate_password": 64, "propmt": 64, "siriusstringcombobox": 64, "check_enable_st": 64, "set_item": 64, "show_tooltip": 64, "pydmtimeplot": 64, "extra": 64, "addcurv": 64, "plot_item": 64, "left": 64, "curve_color": 64, "right": 64, "y_channel": 64, "siriustimeplotitem": 64, "bufferreset": 64, "fill_curve_buff": 64, "datax": 64, "datai": 64, "fill_curve_with_archdata": 64, "t_init": 64, "t_end": 64, "process_typ": 64, "process_bin_intvl": 64, "archiv": 64, "showtooltip": 64, "timespanchang": 64, "updatexaxi": 64, "update_immedi": 64, "timeplotcurveitem": 64, "inf": 64, "initialize_buff": 64, "reder": 64, "avoid": 64, "entir": 64, "elig": 64, "receivenewvalu": 64, "infinit": 64, "redrawcurv": 64, "timespan": 64, "accumul": 64, "pydmwaveformplot": 64, "siriuswaveformt": 64, "pydmwaveformt": 64, "pydmwidget_factori": 64, "widgetclass": 64, "pydm_class": 64, "siriusdialog": 64, "create_window_from_widget": 64, "withscrol": 64, "min_height": 64, "quit_thread": 65, "increas": 65, "pvname_label": 65}, "objects": {"": [[0, 0, 0, "-", "siriushla"]], "siriushla": [[2, 0, 0, "-", "as_ap_configdb"], [7, 0, 0, "-", "as_ap_currinfo"], [8, 0, 0, "-", "as_ap_energybutton"], [9, 0, 0, "-", "as_ap_injcontrol"], [10, 0, 0, "-", "as_ap_injection"], [11, 0, 0, "-", "as_ap_launcher"], [12, 0, 0, "-", "as_ap_machshift"], [13, 0, 0, "-", "as_ap_macreport"], [14, 0, 0, "-", "as_ap_magoffconv"], [16, 0, 0, "-", "as_ap_monitor"], [17, 0, 0, "-", "as_ap_opticscorr"], [18, 0, 0, "-", "as_ap_posang"], [20, 0, 0, "-", "as_ap_radmon"], [21, 0, 0, "-", "as_ap_sofb"], [24, 0, 0, "-", "as_di_bpms"], [25, 0, 0, "-", "as_di_dccts"], [26, 0, 0, "-", "as_di_icts"], [27, 0, 0, "-", "as_di_scrns"], [28, 0, 0, "-", "as_di_tune"], [29, 0, 0, "-", "as_di_vlight"], [30, 0, 0, "-", "as_ps_commands"], [31, 0, 0, "-", "as_ps_control"], [34, 0, 0, "-", "as_ps_cycle"], [35, 0, 0, "-", "as_ps_diag"], [36, 0, 0, "-", "as_pu_control"], [37, 0, 0, "-", "as_rf_control"], [38, 0, 0, "-", "as_ti_control"], [39, 0, 0, "-", "bl_ap_imgproc"], [41, 0, 0, "-", "common"], [48, 0, 0, "-", "li_ap_mps"], [49, 0, 0, "-", "li_di_bpms"], [50, 0, 0, "-", "li_di_scrns"], [51, 0, 0, "-", "li_eg_control"], [52, 0, 0, "-", "li_pu_modltr"], [53, 0, 0, "-", "li_rf_llrf"], [54, 0, 0, "-", "li_va_control"], [55, 0, 0, "-", "si_ap_fofb"], [56, 0, 0, "-", "si_ap_genstatus"], [57, 0, 0, "-", "si_ap_idff"], [58, 0, 0, "-", "si_ap_orbintlk"], [59, 0, 0, "-", "si_di_bbb"], [60, 0, 0, "-", "si_di_equalize_bpms"], [61, 0, 0, "-", "si_di_scraps"], [62, 0, 0, "-", "si_id_control"], [1, 0, 0, "-", "sirius_application"], [63, 0, 0, "-", "tb_di_slits"], [1, 0, 0, "-", "util"], [64, 0, 0, "-", "widgets"]], "siriushla.as_ap_configdb": [[2, 0, 0, "-", "client_configdb"], [2, 0, 0, "-", "configdialogs"], [2, 0, 0, "-", "configwidgets"], [3, 0, 0, "-", "models"], [4, 0, 0, "-", "normconfigs"], [5, 0, 0, "-", "pvsconfigs"]], "siriushla.as_ap_configdb.client_configdb": [[2, 1, 1, "", "ConfigurationManager"], [2, 1, 1, "", "JsonTreeModel"], [2, 1, 1, "", "TreeItem"]], "siriushla.as_ap_configdb.client_configdb.ConfigurationManager": [[2, 2, 1, "", "CONFIG_TYPE_COL"], [2, 2, 1, "", "NAME_COL"]], "siriushla.as_ap_configdb.client_configdb.JsonTreeModel": [[2, 3, 1, "", "columnCount"], [2, 3, 1, "", "data"], [2, 3, 1, "", "flags"], [2, 3, 1, "", "headerData"], [2, 3, 1, "", "index"], [2, 3, 1, "", "parent"], [2, 3, 1, "", "rowCount"], [2, 3, 1, "", "setupModelData"]], "siriushla.as_ap_configdb.client_configdb.TreeItem": [[2, 3, 1, "", "appendChild"], [2, 3, 1, "", "child"], [2, 3, 1, "", "childCount"], [2, 3, 1, "", "columnCount"], [2, 3, 1, "", "data"], [2, 3, 1, "", "parentItem"], [2, 3, 1, "", "row"]], "siriushla.as_ap_configdb.configdialogs": [[2, 1, 1, "", "LoadConfigDialog"], [2, 1, 1, "", "RenameConfigDialog"], [2, 1, 1, "", "SaveConfigDialog"]], "siriushla.as_ap_configdb.configdialogs.RenameConfigDialog": [[2, 2, 1, "", "configname"]], "siriushla.as_ap_configdb.configdialogs.SaveConfigDialog": [[2, 4, 1, "", "config_name"], [2, 2, 1, "", "configname"]], "siriushla.as_ap_configdb.configwidgets": [[2, 1, 1, "", "ConfigDBInfoHeader"], [2, 1, 1, "", "ConfigDBSearchEngine"], [2, 1, 1, "", "ConfigTableWidget"]], "siriushla.as_ap_configdb.configwidgets.ConfigDBInfoHeader": [[2, 3, 1, "", "setupui"]], "siriushla.as_ap_configdb.configwidgets.ConfigDBSearchEngine": [[2, 2, 1, "", "CONFIG_TYPE_COL"], [2, 2, 1, "", "NAME_COL"], [2, 2, 1, "", "filteredidcs"]], "siriushla.as_ap_configdb.configwidgets.ConfigTableWidget": [[2, 2, 1, "", "CONFIG_TYPE_COL"], [2, 2, 1, "", "NAME_COL"], [2, 2, 1, "", "configChanged"], [2, 4, 1, "", "config_name"], [2, 4, 1, "", "config_type"], [2, 2, 1, "", "connectionError"], [2, 3, 1, "", "resizeEvent"]], "siriushla.as_ap_configdb.models": [[3, 0, 0, "-", "config_db_table_model"], [3, 0, 0, "-", "config_names_model"], [3, 0, 0, "-", "config_types_model"], [3, 0, 0, "-", "pv_configuration_model"]], "siriushla.as_ap_configdb.models.config_db_table_model": [[3, 1, 1, "", "ConfigDbTableModel"]], "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel": [[3, 3, 1, "", "columnCount"], [3, 4, 1, "", "config_type"], [3, 2, 1, "", "connectionError"], [3, 3, 1, "", "data"], [3, 3, 1, "", "flags"], [3, 3, 1, "", "headerData"], [3, 2, 1, "", "horizontalHeader"], [3, 2, 1, "", "removeRow"], [3, 3, 1, "", "removeRows"], [3, 3, 1, "", "rowCount"], [3, 3, 1, "", "setupModelData"], [3, 3, 1, "", "sort"]], "siriushla.as_ap_configdb.models.config_names_model": [[3, 1, 1, "", "ConfigNamesModel"]], "siriushla.as_ap_configdb.models.config_names_model.ConfigNamesModel": [[3, 3, 1, "", "columnCount"], [3, 4, 1, "", "config_type"], [3, 3, 1, "", "data"], [3, 3, 1, "", "rowCount"], [3, 3, 1, "", "setupModelData"]], "siriushla.as_ap_configdb.models.config_types_model": [[3, 1, 1, "", "ConfigPVsTypeModel"], [3, 1, 1, "", "ConfigTypeModel"]], "siriushla.as_ap_configdb.models.config_types_model.ConfigPVsTypeModel": [[3, 3, 1, "", "setupModelData"]], "siriushla.as_ap_configdb.models.config_types_model.ConfigTypeModel": [[3, 3, 1, "", "columnCount"], [3, 3, 1, "", "data"], [3, 3, 1, "", "rowCount"], [3, 3, 1, "", "setupModelData"]], "siriushla.as_ap_configdb.models.pv_configuration_model": [[3, 1, 1, "", "PVConfigurationTableModel"]], "siriushla.as_ap_configdb.models.pv_configuration_model.PVConfigurationTableModel": [[3, 3, 1, "", "columnCount"], [3, 4, 1, "", "config_type"], [3, 3, 1, "", "data"], [3, 3, 1, "", "flags"], [3, 3, 1, "", "headerData"], [3, 4, 1, "", "model_data"], [3, 3, 1, "", "rowCount"], [3, 3, 1, "", "setData"], [3, 3, 1, "", "setupModelData"]], "siriushla.as_ap_configdb.normconfigs": [[4, 0, 0, "-", "ConfigManagerWindow"], [4, 0, 0, "-", "ConfigModel"], [4, 0, 0, "-", "LoadingThread"], [4, 0, 0, "-", "TuneDlg"]], "siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow": [[4, 1, 1, "", "ConfigManagerWindow"]], "siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow.ConfigManagerWindow": [[4, 2, 1, "", "NEW_CONFIGURATION"], [4, 3, 1, "", "closeEvent"], [4, 3, 1, "", "keyPressEvent"]], "siriushla.as_ap_configdb.normconfigs.ConfigModel": [[4, 1, 1, "", "ConfigDelegate"], [4, 1, 1, "", "ConfigModel"], [4, 1, 1, "", "Configuration"]], "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigDelegate": [[4, 3, 1, "", "createEditor"], [4, 3, 1, "", "paint"], [4, 3, 1, "", "setEditorData"]], "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel": [[4, 2, 1, "", "CHROMATICITY"], [4, 2, 1, "", "TUNE"], [4, 2, 1, "", "UNDO_MEMORY"], [4, 3, 1, "", "cleanUndo"], [4, 3, 1, "", "closeConfiguration"], [4, 3, 1, "", "columnCount"], [4, 4, 1, "", "configurations"], [4, 3, 1, "", "data"], [4, 3, 1, "", "deleteConfiguration"], [4, 3, 1, "", "deriveConfiguration"], [4, 3, 1, "", "flags"], [4, 3, 1, "", "getConfigurationColumn"], [4, 3, 1, "", "getConfigurations"], [4, 3, 1, "", "getTuneMatrix"], [4, 3, 1, "", "headerData"], [4, 3, 1, "", "insertColumn"], [4, 3, 1, "", "interpolateConfiguration"], [4, 3, 1, "", "loadConfiguration"], [4, 3, 1, "", "removeColumns"], [4, 3, 1, "", "renameConfiguration"], [4, 3, 1, "", "rowCount"], [4, 3, 1, "", "saveConfiguration"], [4, 3, 1, "", "setData"], [4, 3, 1, "", "setDataAlt"]], "siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration": [[4, 3, 1, "", "delete"], [4, 3, 1, "", "delete_config"], [4, 4, 1, "", "dirty"], [4, 3, 1, "", "loadConfiguration"], [4, 4, 1, "", "name"], [4, 3, 1, "", "newConfiguration"], [4, 4, 1, "", "old_name"], [4, 3, 1, "", "save"], [4, 3, 1, "", "setValue"], [4, 4, 1, "", "values"]], "siriushla.as_ap_configdb.normconfigs.LoadingThread": [[4, 1, 1, "", "LoadingThread"]], "siriushla.as_ap_configdb.normconfigs.LoadingThread.LoadingThread": [[4, 2, 1, "", "VACA_PREFIX"], [4, 3, 1, "", "run"], [4, 2, 1, "", "taskFinished"], [4, 2, 1, "", "taskUpdated"]], "siriushla.as_ap_configdb.normconfigs.TuneDlg": [[4, 1, 1, "", "TuneDlg"]], "siriushla.as_ap_configdb.pvsconfigs": [[6, 0, 0, "-", "delegate"], [5, 0, 0, "-", "load_and_apply"], [5, 0, 0, "-", "main"], [5, 0, 0, "-", "read_and_save"]], "siriushla.as_ap_configdb.pvsconfigs.delegate": [[6, 0, 0, "-", "pv_configuration_delegate"]], "siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate": [[6, 1, 1, "", "PVConfigurationDelegate"]], "siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate.PVConfigurationDelegate": [[6, 3, 1, "", "createEditor"], [6, 3, 1, "", "setEditorData"]], "siriushla.as_ap_configdb.pvsconfigs.load_and_apply": [[5, 1, 1, "", "LoadAndApplyConfig2MachineWindow"], [5, 1, 1, "", "SelectAndApplyPVsWidget"], [5, 1, 1, "", "SelectConfigWidget"]], "siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectAndApplyPVsWidget": [[5, 4, 1, "", "current_config"], [5, 4, 1, "", "current_config_type"], [5, 3, 1, "", "fill_config"], [5, 2, 1, "", "settingFinished"], [5, 3, 1, "", "setupui"]], "siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectConfigWidget": [[5, 2, 1, "", "configChanged"], [5, 4, 1, "", "current_config_type"], [5, 3, 1, "", "setupui"]], "siriushla.as_ap_configdb.pvsconfigs.main": [[5, 1, 1, "", "PVsConfigManager"]], "siriushla.as_ap_configdb.pvsconfigs.read_and_save": [[5, 1, 1, "", "ReadAndSaveConfig2ServerWindow"]], "siriushla.as_ap_currinfo": [[7, 0, 0, "-", "charge_monitor"], [7, 0, 0, "-", "current_and_lifetime"], [7, 0, 0, "-", "efficiency_monitor"]], "siriushla.as_ap_currinfo.charge_monitor": [[7, 1, 1, "", "BOMonitor"]], "siriushla.as_ap_currinfo.current_and_lifetime": [[7, 1, 1, "", "CurrLTWindow"]], "siriushla.as_ap_currinfo.efficiency_monitor": [[7, 1, 1, "", "EfficiencyMonitor"]], "siriushla.as_ap_energybutton": [[8, 0, 0, "-", "energy_button"], [8, 0, 0, "-", "energy_setter_window"], [8, 0, 0, "-", "set_energy"]], "siriushla.as_ap_energybutton.energy_button": [[8, 1, 1, "", "EnergyButton"]], "siriushla.as_ap_energybutton.energy_button.EnergyButton": [[8, 4, 1, "", "lower_limit"], [8, 4, 1, "", "section"], [8, 4, 1, "", "upper_limit"]], "siriushla.as_ap_energybutton.energy_setter_window": [[8, 1, 1, "", "EnergySetterWindow"]], "siriushla.as_ap_energybutton.set_energy": [[8, 5, 1, "", "init_section"]], "siriushla.as_ap_injcontrol": [[9, 0, 0, "-", "base"], [9, 0, 0, "-", "injbo"], [9, 0, 0, "-", "tbts"]], "siriushla.as_ap_injcontrol.base": [[9, 1, 1, "", "BaseWindow"]], "siriushla.as_ap_injcontrol.injbo": [[9, 1, 1, "", "InjBOControlWindow"]], "siriushla.as_ap_injcontrol.tbts": [[9, 1, 1, "", "TLControlWindow"]], "siriushla.as_ap_injcontrol.tbts.TLControlWindow": [[9, 3, 1, "", "keyPressEvent"]], "siriushla.as_ap_injection": [[10, 0, 0, "-", "auxiliary_dialogs"], [10, 0, 0, "-", "killbeam_widgets"], [10, 0, 0, "-", "main"], [10, 0, 0, "-", "widgets"]], "siriushla.as_ap_injection.auxiliary_dialogs": [[10, 1, 1, "", "BiasFBDetailDialog"], [10, 1, 1, "", "PUModeSettingsDialog"], [10, 1, 1, "", "TopUpSettingsDialog"]], "siriushla.as_ap_injection.killbeam_widgets": [[10, 1, 1, "", "RFKillBeamButton"]], "siriushla.as_ap_injection.main": [[10, 1, 1, "", "InjCtrlWindow"]], "siriushla.as_ap_injection.main.InjCtrlWindow": [[10, 3, 1, "", "changeEvent"], [10, 3, 1, "", "mouseDoubleClickEvent"], [10, 2, 1, "", "showEgun"], [10, 2, 1, "", "showMonitor"], [10, 2, 1, "", "showStatus"]], "siriushla.as_ap_injection.widgets": [[10, 1, 1, "", "ClockLabel"], [10, 1, 1, "", "InjDiagLed"], [10, 1, 1, "", "InjSysStbyControlWidget"], [10, 1, 1, "", "InjSysStbyLed"], [10, 1, 1, "", "MonitorSummaryWidget"], [10, 1, 1, "", "TaskStatusLabel"]], "siriushla.as_ap_injection.widgets.InjDiagLed": [[10, 3, 1, "", "mouseDoubleClickEvent"]], "siriushla.as_ap_injection.widgets.InjSysStbyControlWidget": [[10, 3, 1, "", "contextMenuEvent"], [10, 2, 1, "", "expand"]], "siriushla.as_ap_injection.widgets.InjSysStbyLed": [[10, 3, 1, "", "mouseDoubleClickEvent"]], "siriushla.as_ap_launcher": [[11, 0, 0, "-", "main"], [11, 0, 0, "-", "menu"]], "siriushla.as_ap_launcher.main": [[11, 1, 1, "", "MainLauncher"]], "siriushla.as_ap_launcher.main.MainLauncher": [[11, 3, 1, "", "changeEvent"], [11, 3, 1, "", "mouseDoubleClickEvent"], [11, 2, 1, "", "showEgun"], [11, 2, 1, "", "showMonitor"], [11, 2, 1, "", "showStatus"]], "siriushla.as_ap_launcher.menu": [[11, 5, 1, "", "get_object"], [11, 5, 1, "", "get_pushbutton"]], "siriushla.as_ap_machshift": [[12, 0, 0, "-", "widgets"]], "siriushla.as_ap_machshift.widgets": [[12, 1, 1, "", "MachShiftLabel"]], "siriushla.as_ap_macreport": [[13, 0, 0, "-", "main"]], "siriushla.as_ap_macreport.main": [[13, 1, 1, "", "LbData"], [13, 1, 1, "", "LbHHeader"], [13, 1, 1, "", "LbVHeader"], [13, 1, 1, "", "MacReportWindow"], [13, 1, 1, "", "UpdateTask"]], "siriushla.as_ap_macreport.main.UpdateTask": [[13, 3, 1, "", "exit_task"], [13, 3, 1, "", "run"], [13, 3, 1, "", "update"], [13, 2, 1, "", "updated"]], "siriushla.as_ap_magoffconv": [[14, 0, 0, "-", "main"]], "siriushla.as_ap_magoffconv.main": [[14, 1, 1, "", "MagOffConvApp"]], "siriushla.as_ap_measure": [[15, 0, 0, "-", "energy_meas"]], "siriushla.as_ap_measure.energy_meas": [[15, 1, 1, "", "EnergyMeasure"]], "siriushla.as_ap_measure.energy_meas.EnergyMeasure": [[15, 3, 1, "", "nrpoints_edited"], [15, 3, 1, "", "pb_reset_data_clicked"]], "siriushla.as_ap_monitor": [[16, 0, 0, "-", "main"], [16, 0, 0, "-", "util"]], "siriushla.as_ap_monitor.main": [[16, 1, 1, "", "SiriusMonitor"]], "siriushla.as_ap_monitor.util": [[16, 5, 1, "", "get_label2devices"], [16, 5, 1, "", "get_sec2dev_laypos"]], "siriushla.as_ap_opticscorr": [[17, 0, 0, "-", "custom_widgets"], [17, 0, 0, "-", "details"], [17, 0, 0, "-", "main"]], "siriushla.as_ap_opticscorr.custom_widgets": [[17, 1, 1, "", "ConfigLineEdit"], [17, 1, 1, "", "StatusLed"]], "siriushla.as_ap_opticscorr.custom_widgets.ConfigLineEdit": [[17, 3, 1, "", "mouseReleaseEvent"]], "siriushla.as_ap_opticscorr.custom_widgets.StatusLed": [[17, 3, 1, "", "mouseDoubleClickEvent"]], "siriushla.as_ap_opticscorr.details": [[17, 1, 1, "", "CorrParamsDetailWindow"]], "siriushla.as_ap_opticscorr.main": [[17, 1, 1, "", "OpticsCorrWindow"]], "siriushla.as_ap_posang": [[18, 0, 0, "-", "HLPosAng"]], "siriushla.as_ap_posang.HLPosAng": [[18, 1, 1, "", "CorrParamsDetailWindow"], [18, 1, 1, "", "PosAngCorr"]], "siriushla.as_ap_rabpmmon": [[19, 0, 0, "-", "util"]], "siriushla.as_ap_radmon": [[20, 0, 0, "-", "main"]], "siriushla.as_ap_radmon.main": [[20, 1, 1, "", "RadTotDoseMonitor"]], "siriushla.as_ap_radmon.main.RadTotDoseMonitor": [[20, 2, 1, "", "REF_TOT_DOSE"], [20, 2, 1, "", "SENSOR2LOC"], [20, 3, 1, "", "changeEvent"], [20, 3, 1, "", "contextMenuEvent"]], "siriushla.as_ap_sofb": [[22, 0, 0, "-", "graphics"], [23, 0, 0, "-", "ioc_control"], [21, 0, 0, "-", "main"], [21, 0, 0, "-", "orbit_register"]], "siriushla.as_ap_sofb.graphics": [[22, 0, 0, "-", "base"], [22, 0, 0, "-", "correctors"], [22, 0, 0, "-", "orbit"], [22, 0, 0, "-", "respmat"]], "siriushla.as_ap_sofb.graphics.base": [[22, 1, 1, "", "BaseWidget"], [22, 1, 1, "", "Graph"], [22, 1, 1, "", "InfLine"], [22, 1, 1, "", "Label"], [22, 1, 1, "", "UpdateGraph"]], "siriushla.as_ap_sofb.graphics.base.BaseWidget": [[22, 2, 1, "", "DEFAULT_DIR"], [22, 4, 1, "", "acc"], [22, 4, 1, "", "acc_idx"], [22, 3, 1, "", "channels"], [22, 3, 1, "", "connect_signals"], [22, 4, 1, "", "isring"], [22, 3, 1, "", "setupui"], [22, 3, 1, "", "uicreate_combobox"], [22, 3, 1, "", "uicreate_groupbox"], [22, 3, 1, "", "uicreate_label"], [22, 3, 1, "", "uigetgraph"]], "siriushla.as_ap_sofb.graphics.base.Graph": [[22, 2, 1, "", "doubleclick"], [22, 3, 1, "", "mouseDoubleClickEvent"]], "siriushla.as_ap_sofb.graphics.base.InfLine": [[22, 3, 1, "", "setValue"]], "siriushla.as_ap_sofb.graphics.base.Label": [[22, 2, 1, "", "FMT"], [22, 3, 1, "", "setFloat"]], "siriushla.as_ap_sofb.graphics.base.UpdateGraph": [[22, 2, 1, "", "UNIT"], [22, 2, 1, "", "ave_mstdx"], [22, 2, 1, "", "ave_mstdy"], [22, 2, 1, "", "ave_pstdx"], [22, 2, 1, "", "ave_pstdy"], [22, 2, 1, "", "avex"], [22, 2, 1, "", "avey"], [22, 2, 1, "", "data_sigx"], [22, 2, 1, "", "data_sigy"], [22, 2, 1, "", "p2px"], [22, 2, 1, "", "p2py"], [22, 2, 1, "", "ref_sigx"], [22, 2, 1, "", "ref_sigy"], [22, 3, 1, "", "set_enbl_list"], [22, 3, 1, "", "set_visible"], [22, 3, 1, "", "some_changed"], [22, 2, 1, "", "stdx"], [22, 2, 1, "", "stdy"], [22, 3, 1, "", "update_graphic"]], "siriushla.as_ap_sofb.graphics.correctors": [[22, 1, 1, "", "CorrectorsWidget"]], "siriushla.as_ap_sofb.graphics.correctors.CorrectorsWidget": [[22, 3, 1, "", "add_RF_kicks"], [22, 3, 1, "", "add_kicklimits_curves"], [22, 3, 1, "", "channels"], [22, 3, 1, "", "get_default_ctrls"]], "siriushla.as_ap_sofb.graphics.orbit": [[22, 1, 1, "", "MultiTurnSumWidget"], [22, 1, 1, "", "MultiTurnWidget"], [22, 1, 1, "", "OrbitWidget"], [22, 1, 1, "", "SinglePassSumWidget"], [22, 1, 1, "", "Spectrogram"]], "siriushla.as_ap_sofb.graphics.orbit.MultiTurnSumWidget": [[22, 3, 1, "", "mouseDoubleClickEvent"], [22, 2, 1, "", "ratio_sum_avg"], [22, 2, 1, "", "ratio_sum_std"], [22, 3, 1, "", "setupui"], [22, 3, 1, "", "update_graph"]], "siriushla.as_ap_sofb.graphics.orbit.MultiTurnWidget": [[22, 3, 1, "", "hideEvent"], [22, 3, 1, "", "setreforbits"], [22, 3, 1, "", "setupui"], [22, 3, 1, "", "showEvent"]], "siriushla.as_ap_sofb.graphics.orbit.OrbitWidget": [[22, 3, 1, "", "add_buttons_for_images"], [22, 3, 1, "", "channels"], [22, 3, 1, "", "get_default_ctrls"]], "siriushla.as_ap_sofb.graphics.orbit.SinglePassSumWidget": [[22, 3, 1, "", "setupui"]], "siriushla.as_ap_sofb.graphics.orbit.Spectrogram": [[22, 3, 1, "", "channels"], [22, 3, 1, "", "mouseDoubleClickEvent"], [22, 2, 1, "", "new_data_sig"], [22, 3, 1, "", "process_image"], [22, 3, 1, "", "setreforbit"]], "siriushla.as_ap_sofb.graphics.respmat": [[22, 1, 1, "", "ShowMatrixWidget"], [22, 1, 1, "", "SingularValues"]], "siriushla.as_ap_sofb.graphics.respmat.ShowMatrixWidget": [[22, 3, 1, "", "setupui"]], "siriushla.as_ap_sofb.graphics.respmat.SingularValues": [[22, 3, 1, "", "setValue"], [22, 3, 1, "", "setupui"]], "siriushla.as_ap_sofb.ioc_control": [[23, 0, 0, "-", "base"], [23, 0, 0, "-", "drive_window"], [23, 0, 0, "-", "kicks_config"], [23, 0, 0, "-", "main"], [23, 0, 0, "-", "orbit_acquisition"], [23, 0, 0, "-", "respmat"], [23, 0, 0, "-", "respmat_enbllist"], [23, 0, 0, "-", "status"]], "siriushla.as_ap_sofb.ioc_control.base": [[23, 1, 1, "", "BaseCombo"], [23, 1, 1, "", "BaseObject"], [23, 1, 1, "", "BaseWidget"]], "siriushla.as_ap_sofb.ioc_control.base.BaseCombo": [[23, 4, 1, "", "acc"], [23, 4, 1, "", "acc_idx"], [23, 3, 1, "", "channels"], [23, 2, 1, "", "configname"], [23, 3, 1, "", "connect_signals"], [23, 3, 1, "", "ioc_orbit_changed"], [23, 4, 1, "", "isring"], [23, 3, 1, "", "setup_ui"]], "siriushla.as_ap_sofb.ioc_control.base.BaseObject": [[23, 4, 1, "", "acc"], [23, 4, 1, "", "acc_idx"], [23, 4, 1, "", "isring"]], "siriushla.as_ap_sofb.ioc_control.base.BaseWidget": [[23, 3, 1, "", "create_pair"], [23, 3, 1, "", "create_pair_butled"], [23, 3, 1, "", "create_pair_sel"]], "siriushla.as_ap_sofb.ioc_control.drive_window": [[23, 1, 1, "", "DriveControl"]], "siriushla.as_ap_sofb.ioc_control.drive_window.DriveControl": [[23, 3, 1, "", "setupui"]], "siriushla.as_ap_sofb.ioc_control.kicks_config": [[23, 1, 1, "", "KicksConfigWidget"]], "siriushla.as_ap_sofb.ioc_control.kicks_config.KicksConfigWidget": [[23, 3, 1, "", "get_details_widget"], [23, 3, 1, "", "get_status_widget"], [23, 3, 1, "", "setupui"]], "siriushla.as_ap_sofb.ioc_control.main": [[23, 1, 1, "", "PerformanceWidget"], [23, 1, 1, "", "RefControl"], [23, 1, 1, "", "SOFBControl"]], "siriushla.as_ap_sofb.ioc_control.main.RefControl": [[23, 3, 1, "", "setup_ui"]], "siriushla.as_ap_sofb.ioc_control.main.SOFBControl": [[23, 3, 1, "", "get_auto_correction_widget"], [23, 3, 1, "", "get_correction_widget"], [23, 3, 1, "", "get_fofb_widget"], [23, 3, 1, "", "get_main_widget"], [23, 3, 1, "", "get_manual_correction_widget"], [23, 3, 1, "", "get_orbit_widget"], [23, 3, 1, "", "setupui"]], "siriushla.as_ap_sofb.ioc_control.orbit_acquisition": [[23, 1, 1, "", "AcqControlWidget"]], "siriushla.as_ap_sofb.ioc_control.orbit_acquisition.AcqControlWidget": [[23, 3, 1, "", "setupui"]], "siriushla.as_ap_sofb.ioc_control.respmat": [[23, 1, 1, "", "RespMatWidget"]], "siriushla.as_ap_sofb.ioc_control.respmat.RespMatWidget": [[23, 2, 1, "", "DEFAULT_DIR"], [23, 3, 1, "", "get_main_widget"], [23, 3, 1, "", "get_measurement_widget"], [23, 3, 1, "", "get_saveload_widget"], [23, 3, 1, "", "get_selection_lists_widget"], [23, 3, 1, "", "get_singular_values_widget"], [23, 3, 1, "", "setupui"]], "siriushla.as_ap_sofb.ioc_control.respmat_enbllist": [[23, 1, 1, "", "SelectionMatrix"], [23, 1, 1, "", "SingleSelMatrix"]], "siriushla.as_ap_sofb.ioc_control.respmat_enbllist.SingleSelMatrix": [[23, 3, 1, "", "connection_changed"], [23, 3, 1, "", "get_headers"], [23, 3, 1, "", "get_positions"], [23, 3, 1, "", "get_widgets"], [23, 3, 1, "", "send_value"], [23, 3, 1, "", "sizeHint"], [23, 3, 1, "", "value_changed"]], "siriushla.as_ap_sofb.ioc_control.status": [[23, 1, 1, "", "StatusWidget"]], "siriushla.as_ap_sofb.ioc_control.status.StatusWidget": [[23, 3, 1, "", "creategroupbox"], [23, 3, 1, "", "setupui"]], "siriushla.as_ap_sofb.main": [[21, 1, 1, "", "MainWindow"]], "siriushla.as_ap_sofb.main.MainWindow": [[21, 4, 1, "", "acc"], [21, 4, 1, "", "acc_idx"], [21, 4, 1, "", "isring"], [21, 3, 1, "", "setupui"]], "siriushla.as_ap_sofb.orbit_register": [[21, 1, 1, "", "OrbitRegister"], [21, 1, 1, "", "OrbitRegisters"]], "siriushla.as_ap_sofb.orbit_register.OrbitRegister": [[21, 2, 1, "", "DEFAULT_DIR"], [21, 2, 1, "", "MAX_BUMP_CURR"], [21, 3, 1, "", "getorbx"], [21, 3, 1, "", "getorby"], [21, 2, 1, "", "new_orbx_signal"], [21, 2, 1, "", "new_orby_signal"], [21, 2, 1, "", "new_string_signal"], [21, 4, 1, "", "orbx"], [21, 4, 1, "", "orby"], [21, 3, 1, "", "setup_ui"]], "siriushla.as_ap_sofb.orbit_register.OrbitRegisters": [[21, 3, 1, "", "channels"], [21, 3, 1, "", "get_registers_control"], [21, 3, 1, "", "setupui"]], "siriushla.as_di_bpms": [[24, 0, 0, "-", "base"], [24, 0, 0, "-", "list_bpms"], [24, 0, 0, "-", "main"], [24, 0, 0, "-", "monit"], [24, 0, 0, "-", "settings"], [24, 0, 0, "-", "trig_acq_config"]], "siriushla.as_di_bpms.base": [[24, 1, 1, "", "BaseGraph"], [24, 1, 1, "", "BaseWidget"], [24, 1, 1, "", "GraphTime"], [24, 1, 1, "", "GraphWave"], [24, 5, 1, "", "get_custom_widget_class"]], "siriushla.as_di_bpms.base.BaseGraph": [[24, 2, 1, "", "CLASS"], [24, 2, 1, "", "DATA_CLASS"], [24, 3, 1, "", "curveAtIndex"], [24, 3, 1, "", "setLabel"], [24, 3, 1, "", "setupgraph"], [24, 3, 1, "", "setupui"]], "siriushla.as_di_bpms.base.BaseWidget": [[24, 3, 1, "", "basic_rule"], [24, 3, 1, "", "channels"], [24, 3, 1, "", "get_pvname"]], "siriushla.as_di_bpms.base.GraphTime": [[24, 2, 1, "", "CLASS"], [24, 2, 1, "", "DATA_CLASS"], [24, 3, 1, "", "addYChannel"]], "siriushla.as_di_bpms.base.GraphWave": [[24, 3, 1, "", "addChannel"]], "siriushla.as_di_bpms.list_bpms": [[24, 1, 1, "", "AcqDataSummary"], [24, 1, 1, "", "BPMSummary"], [24, 1, 1, "", "SelectBPMs"]], "siriushla.as_di_bpms.list_bpms.AcqDataSummary": [[24, 3, 1, "", "create_graph"], [24, 3, 1, "", "setupui"]], "siriushla.as_di_bpms.list_bpms.BPMSummary": [[24, 3, 1, "", "setupui"]], "siriushla.as_di_bpms.list_bpms.SelectBPMs": [[24, 3, 1, "", "setupui"]], "siriushla.as_di_bpms.main": [[24, 1, 1, "", "BPMMain"]], "siriushla.as_di_bpms.main.BPMMain": [[24, 3, 1, "", "setupui"]], "siriushla.as_di_bpms.monit": [[24, 1, 1, "", "MonitData"]], "siriushla.as_di_bpms.monit.MonitData": [[24, 3, 1, "", "setupui"]], "siriushla.as_di_bpms.settings": [[24, 1, 1, "", "BPMAdvancedSettings"], [24, 1, 1, "", "BPMHardwareSettings"], [24, 1, 1, "", "PBPMHardwareSettings"], [24, 1, 1, "", "ParamsSettings"], [24, 1, 1, "", "PolySettings"], [24, 1, 1, "", "RFFEAdvancedSettings"], [24, 1, 1, "", "TriggersLauncherWidget"]], "siriushla.as_di_bpms.settings.BPMAdvancedSettings": [[24, 3, 1, "", "get_acqrate_props"], [24, 3, 1, "", "setupui"]], "siriushla.as_di_bpms.settings.BPMHardwareSettings": [[24, 3, 1, "", "setupui"]], "siriushla.as_di_bpms.settings.PBPMHardwareSettings": [[24, 3, 1, "", "setupui"]], "siriushla.as_di_bpms.settings.ParamsSettings": [[24, 3, 1, "", "setupui"]], "siriushla.as_di_bpms.settings.PolySettings": [[24, 3, 1, "", "setupui"]], "siriushla.as_di_bpms.settings.RFFEAdvancedSettings": [[24, 3, 1, "", "setupui"]], "siriushla.as_di_bpms.settings.TriggersLauncherWidget": [[24, 3, 1, "", "setupui"]], "siriushla.as_di_bpms.trig_acq_config": [[24, 1, 1, "", "BPMBaseTriggeredAcquisition"], [24, 1, 1, "", "BPMGENAcquisition"], [24, 1, 1, "", "BPMPMAcquisition"], [24, 1, 1, "", "PBPMBaseTriggeredAcquisition"], [24, 1, 1, "", "PBPMGENAcquisition"], [24, 1, 1, "", "PBPMPMAcquisition"]], "siriushla.as_di_bpms.trig_acq_config.BPMGENAcquisition": [[24, 2, 1, "", "ACQCORE"]], "siriushla.as_di_bpms.trig_acq_config.BPMPMAcquisition": [[24, 2, 1, "", "ACQCORE"]], "siriushla.as_di_bpms.trig_acq_config.PBPMGENAcquisition": [[24, 2, 1, "", "ACQCORE"]], "siriushla.as_di_bpms.trig_acq_config.PBPMPMAcquisition": [[24, 2, 1, "", "ACQCORE"]], "siriushla.as_di_dccts": [[25, 0, 0, "-", "graphics"], [25, 0, 0, "-", "main"], [25, 0, 0, "-", "settings"]], "siriushla.as_di_dccts.graphics": [[25, 1, 1, "", "DCCTMonitor"], [25, 1, 1, "", "EffMonitor"]], "siriushla.as_di_dccts.graphics.DCCTMonitor": [[25, 3, 1, "", "resetRawBuffer"], [25, 3, 1, "", "setRawDownsampling"], [25, 3, 1, "", "setRawSmoothMethod"], [25, 3, 1, "", "setRawSmoothNrAcq"], [25, 4, 1, "", "smoothBufferSize"], [25, 3, 1, "", "updateParams"], [25, 3, 1, "", "updateRawXAxis"]], "siriushla.as_di_dccts.main": [[25, 1, 1, "", "DCCTMain"], [25, 1, 1, "", "SISelectDCCT"], [25, 5, 1, "", "get_dcct_list"]], "siriushla.as_di_dccts.settings": [[25, 1, 1, "", "DCCTSettings"], [25, 1, 1, "", "DCCTSettingsDetails"]], "siriushla.as_di_icts": [[26, 0, 0, "-", "ICT_monitor"]], "siriushla.as_di_icts.ICT_monitor": [[26, 1, 1, "", "ICTMonitoring"], [26, 1, 1, "", "ICTSummary"]], "siriushla.as_di_scrns": [[27, 0, 0, "-", "list_scrns"], [27, 0, 0, "-", "main"], [27, 0, 0, "-", "scrn_calib"], [27, 0, 0, "-", "scrn_details"]], "siriushla.as_di_scrns.list_scrns": [[27, 1, 1, "", "ScrnSummary"], [27, 1, 1, "", "SelectScrns"], [27, 5, 1, "", "get_scrn_list"]], "siriushla.as_di_scrns.main": [[27, 1, 1, "", "IndividualScrn"], [27, 1, 1, "", "SiriusScrnView"]], "siriushla.as_di_scrns.main.SiriusScrnView": [[27, 4, 1, "", "calibrationgrid_flag"], [27, 2, 1, "", "save_files"], [27, 3, 1, "", "updateCalibrationGridFlag"]], "siriushla.as_di_scrns.scrn_calib": [[27, 1, 1, "", "ScrnCalibrationSettings"]], "siriushla.as_di_scrns.scrn_details": [[27, 1, 1, "", "ScrnSettingsDetails"]], "siriushla.as_di_tune": [[28, 0, 0, "-", "controls"], [28, 0, 0, "-", "details"], [28, 0, 0, "-", "main"], [28, 0, 0, "-", "spectra"], [28, 0, 0, "-", "spectrogram"], [28, 0, 0, "-", "util"]], "siriushla.as_di_tune.controls": [[28, 1, 1, "", "SITuneMonitor"], [28, 1, 1, "", "TuneControls"]], "siriushla.as_di_tune.controls.SITuneMonitor": [[28, 3, 1, "", "changeEvent"]], "siriushla.as_di_tune.details": [[28, 1, 1, "", "SITuneMarkerDetails"], [28, 1, 1, "", "TuneDetails"]], "siriushla.as_di_tune.main": [[28, 1, 1, "", "Tune"]], "siriushla.as_di_tune.spectra": [[28, 1, 1, "", "TuneSpectraControls"], [28, 1, 1, "", "TuneSpectraView"]], "siriushla.as_di_tune.spectra.TuneSpectraView": [[28, 3, 1, "", "receiveDataH"], [28, 3, 1, "", "receiveDataV"], [28, 3, 1, "", "showTuneH"], [28, 3, 1, "", "showTuneV"], [28, 3, 1, "", "toggleXChannel"]], "siriushla.as_di_tune.spectrogram": [[28, 1, 1, "", "BOTuneSpectrogram"], [28, 1, 1, "", "BOTuneSpectrogramControls"]], "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram": [[28, 2, 1, "", "buffer_curr_size"], [28, 2, 1, "", "buffer_data_size"], [28, 2, 1, "", "buffer_size_changed"], [28, 3, 1, "", "getDataIndex"], [28, 2, 1, "", "idx2send_changed"], [28, 3, 1, "", "image_value_changed"], [28, 3, 1, "", "mouseDoubleClickEvent"], [28, 2, 1, "", "new_data"], [28, 3, 1, "", "process_image"], [28, 3, 1, "", "resetBuffer"], [28, 3, 1, "", "setBufferSize"], [28, 3, 1, "", "setIndex2Send"], [28, 3, 1, "", "toggleXChannel"]], "siriushla.as_di_tune.spectrogram.BOTuneSpectrogramControls": [[28, 3, 1, "", "update_buffsize"], [28, 3, 1, "", "update_idx2plot"]], "siriushla.as_di_vlight": [[29, 0, 0, "-", "main"]], "siriushla.as_di_vlight.main": [[29, 1, 1, "", "VLightCamView"], [29, 5, 1, "", "conv_sec_2_device"]], "siriushla.as_ps_commands": [[30, 0, 0, "-", "main"], [30, 0, 0, "-", "tasks"]], "siriushla.as_ps_commands.main": [[30, 1, 1, "", "PSCmdWindow"]], "siriushla.as_ps_commands.main.PSCmdWindow": [[30, 3, 1, "", "keyPressEvent"]], "siriushla.as_ps_commands.tasks": [[30, 1, 1, "", "BaseTask"], [30, 1, 1, "", "CheckCapBankVolt"], [30, 1, 1, "", "CheckComm"], [30, 1, 1, "", "CheckCtrlLoop"], [30, 1, 1, "", "CheckCurrent"], [30, 1, 1, "", "CheckIDFFMode"], [30, 1, 1, "", "CheckInitOk"], [30, 1, 1, "", "CheckIntlk"], [30, 1, 1, "", "CheckOpMode"], [30, 1, 1, "", "CheckPulse"], [30, 1, 1, "", "CheckPwrState"], [30, 1, 1, "", "CheckSOFBMode"], [30, 1, 1, "", "CheckStatus"], [30, 1, 1, "", "CheckTriggerState"], [30, 1, 1, "", "CheckVoltage"], [30, 1, 1, "", "CreateTesters"], [30, 1, 1, "", "ResetIntlk"], [30, 1, 1, "", "SetCapBankVolt"], [30, 1, 1, "", "SetCtrlLoop"], [30, 1, 1, "", "SetCurrent"], [30, 1, 1, "", "SetIDFFMode"], [30, 1, 1, "", "SetOpMode"], [30, 1, 1, "", "SetPulse"], [30, 1, 1, "", "SetPwrState"], [30, 1, 1, "", "SetSOFBMode"], [30, 1, 1, "", "SetTriggerState"], [30, 1, 1, "", "SetVoltage"], [30, 1, 1, "", "TriggerTask"]], "siriushla.as_ps_commands.tasks.BaseTask": [[30, 2, 1, "", "completed"], [30, 2, 1, "", "currentItem"], [30, 3, 1, "", "exit_task"], [30, 3, 1, "", "function"], [30, 2, 1, "", "itemDone"], [30, 3, 1, "", "run"], [30, 3, 1, "", "size"]], "siriushla.as_ps_commands.tasks.CheckCapBankVolt": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CheckComm": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CheckCtrlLoop": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CheckCurrent": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CheckIDFFMode": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CheckInitOk": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CheckIntlk": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CheckOpMode": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CheckPulse": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CheckPwrState": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CheckSOFBMode": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CheckStatus": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CheckTriggerState": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CheckVoltage": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.CreateTesters": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.ResetIntlk": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.SetCapBankVolt": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.SetCtrlLoop": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.SetCurrent": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.SetIDFFMode": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.SetOpMode": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.SetPulse": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.SetPwrState": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.SetSOFBMode": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.SetTriggerState": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.SetVoltage": [[30, 3, 1, "", "function"]], "siriushla.as_ps_commands.tasks.TriggerTask": [[30, 2, 1, "", "completed"], [30, 2, 1, "", "currentItem"], [30, 3, 1, "", "exit_task"], [30, 3, 1, "", "function"], [30, 2, 1, "", "initial_triggers_state"], [30, 2, 1, "", "itemDone"], [30, 3, 1, "", "run"], [30, 3, 1, "", "size"]], "siriushla.as_ps_control": [[31, 0, 0, "-", "PSControlWindow"], [31, 0, 0, "-", "PSDetailWindow"], [31, 0, 0, "-", "PSTabControlWindow"], [31, 0, 0, "-", "PSTrimWindow"], [31, 0, 0, "-", "SummaryWidgets"], [32, 0, 0, "-", "control_widget"], [33, 0, 0, "-", "detail_widget"], [31, 0, 0, "-", "ps_wfmerror_mon"]], "siriushla.as_ps_control.PSControlWindow": [[31, 1, 1, "", "PSControlWindow"]], "siriushla.as_ps_control.PSDetailWindow": [[31, 1, 1, "", "PSDetailWindow"]], "siriushla.as_ps_control.PSTabControlWindow": [[31, 1, 1, "", "PSTabControlWindow"]], "siriushla.as_ps_control.PSTabControlWindow.PSTabControlWindow": [[31, 2, 1, "", "Devices"], [31, 2, 1, "", "TabName"], [31, 2, 1, "", "tabFilled"]], "siriushla.as_ps_control.PSTrimWindow": [[31, 1, 1, "", "PSTrimWindow"]], "siriushla.as_ps_control.SummaryWidgets": [[31, 1, 1, "", "SummaryHeader"], [31, 1, 1, "", "SummaryWidget"], [31, 5, 1, "", "get_analog_name"], [31, 5, 1, "", "get_prop2label"], [31, 5, 1, "", "get_prop2width"], [31, 5, 1, "", "get_strength_name"], [31, 5, 1, "", "sort_propties"]], "siriushla.as_ps_control.SummaryWidgets.SummaryHeader": [[31, 3, 1, "", "update_visible_props"]], "siriushla.as_ps_control.SummaryWidgets.SummaryWidget": [[31, 3, 1, "", "acc_clear"], [31, 4, 1, "", "bbbname"], [31, 3, 1, "", "ctrlloop_close"], [31, 3, 1, "", "ctrlloop_open"], [31, 4, 1, "", "devname"], [31, 3, 1, "", "fillWidget"], [31, 3, 1, "", "get_detail_button"], [31, 3, 1, "", "get_trim_button"], [31, 3, 1, "", "idffmode_off"], [31, 3, 1, "", "idffmode_on"], [31, 3, 1, "", "pulse_off"], [31, 3, 1, "", "pulse_on"], [31, 3, 1, "", "reset"], [31, 3, 1, "", "set_accfreeze_frozen"], [31, 3, 1, "", "set_accfreeze_unfrozen"], [31, 3, 1, "", "set_opmode_slowref"], [31, 3, 1, "", "sofbmode_off"], [31, 3, 1, "", "sofbmode_on"], [31, 3, 1, "", "turn_off"], [31, 3, 1, "", "turn_on"], [31, 4, 1, "", "udcname"], [31, 3, 1, "", "update_params"], [31, 3, 1, "", "wfmupdate_off"], [31, 3, 1, "", "wfmupdate_on"]], "siriushla.as_ps_control.control_widget": [[32, 0, 0, "-", "BasePSControlWidget"], [32, 0, 0, "-", "ControlWidgetFactory"], [32, 0, 0, "-", "DipoleControlWidget"], [32, 0, 0, "-", "FamQuadrupoleControlWidget"], [32, 0, 0, "-", "FamSextupoleControlWidget"], [32, 0, 0, "-", "FastCorrectorControlWidget"], [32, 0, 0, "-", "IDFFCorrectorControlWidget"], [32, 0, 0, "-", "LensControlWidget"], [32, 0, 0, "-", "SeptFFCorrectorControlWidget"], [32, 0, 0, "-", "SkewQuadControlWidget"], [32, 0, 0, "-", "SlowCorrectorControlWidget"], [32, 0, 0, "-", "SolenoidControlWidget"], [32, 0, 0, "-", "TrimAllControlWidget"], [32, 0, 0, "-", "TrimFamControlWidget"]], "siriushla.as_ps_control.control_widget.BasePSControlWidget": [[32, 1, 1, "", "BasePSControlWidget"], [32, 1, 1, "", "PSContainer"]], "siriushla.as_ps_control.control_widget.BasePSControlWidget.BasePSControlWidget": [[32, 2, 1, "", "HORIZONTAL"], [32, 2, 1, "", "VERTICAL"], [32, 3, 1, "", "contextMenuEvent"], [32, 3, 1, "", "get_summary_widgets"], [32, 3, 1, "", "show_connections"]], "siriushla.as_ps_control.control_widget.BasePSControlWidget.PSContainer": [[32, 3, 1, "", "contextMenuEvent"], [32, 3, 1, "", "show_connections"], [32, 3, 1, "", "update_visible_props"]], "siriushla.as_ps_control.control_widget.ControlWidgetFactory": [[32, 1, 1, "", "ControlWidgetFactory"]], "siriushla.as_ps_control.control_widget.ControlWidgetFactory.ControlWidgetFactory": [[32, 3, 1, "", "factory"]], "siriushla.as_ps_control.control_widget.DipoleControlWidget": [[32, 1, 1, "", "BODipoleControlWidget"], [32, 1, 1, "", "LISpectControlWidget"], [32, 1, 1, "", "SIDipoleControlWidget"], [32, 1, 1, "", "TBDipoleControlWidget"], [32, 1, 1, "", "TSDipoleControlWidget"]], "siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget": [[32, 1, 1, "", "BOFamQuadrupoleControlWidget"], [32, 1, 1, "", "LIQuadrupoleControlWidget"], [32, 1, 1, "", "SIFamQuadrupoleControlWidget"], [32, 1, 1, "", "TBQuadrupoleControlWidget"], [32, 1, 1, "", "TSQuadrupoleControlWidget"], [32, 5, 1, "", "run_test"]], "siriushla.as_ps_control.control_widget.FamSextupoleControlWidget": [[32, 1, 1, "", "BOFamSextupoleControlWidget"], [32, 1, 1, "", "SIFamSextupoleControlWidget"], [32, 5, 1, "", "run_test"]], "siriushla.as_ps_control.control_widget.FastCorrectorControlWidget": [[32, 1, 1, "", "SIFastCorrectorControlWidget"]], "siriushla.as_ps_control.control_widget.IDFFCorrectorControlWidget": [[32, 1, 1, "", "IDFFCorrectorControlWidget"]], "siriushla.as_ps_control.control_widget.LensControlWidget": [[32, 1, 1, "", "ITLensControlWidget"], [32, 1, 1, "", "LILensControlWidget"]], "siriushla.as_ps_control.control_widget.SeptFFCorrectorControlWidget": [[32, 1, 1, "", "SISeptFFCorrectorControlWidget"]], "siriushla.as_ps_control.control_widget.SkewQuadControlWidget": [[32, 1, 1, "", "BOSkewQuadControlWidget"], [32, 1, 1, "", "SISkewQuadControlWidget"], [32, 5, 1, "", "run_test"]], "siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget": [[32, 1, 1, "", "BoSlowCorrectorControlWidget"], [32, 1, 1, "", "LISlowCorrectorControlWidget"], [32, 1, 1, "", "SISlowCorrectorControlWidget"], [32, 1, 1, "", "TBSlowCorrectorControlWidget"], [32, 1, 1, "", "TSSlowCorrectorControlWidget"]], "siriushla.as_ps_control.control_widget.SolenoidControlWidget": [[32, 1, 1, "", "LISolenoidControlWidget"]], "siriushla.as_ps_control.control_widget.TrimAllControlWidget": [[32, 1, 1, "", "SITrimAllControlWidget"]], "siriushla.as_ps_control.control_widget.TrimFamControlWidget": [[32, 1, 1, "", "SITrimFamControlWidget"]], "siriushla.as_ps_control.detail_widget": [[33, 0, 0, "-", "DetailWidgetFactory"], [33, 0, 0, "-", "InterlockWindow"], [33, 0, 0, "-", "PSDetailWidget"], [33, 0, 0, "-", "custom_widgets"]], "siriushla.as_ps_control.detail_widget.DetailWidgetFactory": [[33, 1, 1, "", "DetailWidgetFactory"]], "siriushla.as_ps_control.detail_widget.DetailWidgetFactory.DetailWidgetFactory": [[33, 3, 1, "", "factory"]], "siriushla.as_ps_control.detail_widget.InterlockWindow": [[33, 1, 1, "", "InterlockListWidget"], [33, 1, 1, "", "InterlockWidget"], [33, 1, 1, "", "InterlockWindow"], [33, 1, 1, "", "LIInterlockWindow"]], "siriushla.as_ps_control.detail_widget.InterlockWindow.LIInterlockWindow": [[33, 2, 1, "", "BIT_MAPS"], [33, 2, 1, "", "COLOR_MAPS"]], "siriushla.as_ps_control.detail_widget.PSDetailWidget": [[33, 1, 1, "", "CustomLabel"], [33, 1, 1, "", "DCLinkDetailWidget"], [33, 1, 1, "", "FACDCLinkDetailWidget"], [33, 1, 1, "", "FBPDCLinkDetailWidget"], [33, 1, 1, "", "FastCorrPSDetailWidget"], [33, 1, 1, "", "LIPSDetailWidget"], [33, 1, 1, "", "PSAuxMeasWidget"], [33, 1, 1, "", "PSDetailWidget"], [33, 1, 1, "", "PSParamsWidget"]], "siriushla.as_ps_control.detail_widget.PSDetailWidget.CustomLabel": [[33, 3, 1, "", "value_changed"]], "siriushla.as_ps_control.detail_widget.PSDetailWidget.PSDetailWidget": [[33, 2, 1, "", "AuxDev2ModDict"], [33, 2, 1, "", "BasicParams"]], "siriushla.as_ps_control.detail_widget.custom_widgets": [[33, 1, 1, "", "LISpectIntlkLed"]], "siriushla.as_ps_control.detail_widget.custom_widgets.LISpectIntlkLed": [[33, 2, 1, "", "filterlog"], [33, 3, 1, "", "mouseDoubleClickEvent"], [33, 2, 1, "", "normal"], [33, 3, 1, "", "value_changed"], [33, 2, 1, "", "warning"]], "siriushla.as_ps_control.ps_wfmerror_mon": [[31, 1, 1, "", "Graph"], [31, 1, 1, "", "GraphWidget"], [31, 1, 1, "", "PlotWfmErrorWindow"]], "siriushla.as_ps_control.ps_wfmerror_mon.Graph": [[31, 2, 1, "", "doubleclick"], [31, 3, 1, "", "mouseDoubleClickEvent"]], "siriushla.as_ps_control.ps_wfmerror_mon.GraphWidget": [[31, 3, 1, "", "setupui"]], "siriushla.as_ps_control.ps_wfmerror_mon.PlotWfmErrorWindow": [[31, 3, 1, "", "setupui"]], "siriushla.as_ps_cycle": [[34, 0, 0, "-", "cycle_window"], [34, 0, 0, "-", "tasks"]], "siriushla.as_ps_cycle.cycle_window": [[34, 1, 1, "", "CycleWindow"], [34, 1, 1, "", "MyProgressBar"], [34, 1, 1, "", "UpdateProgressBar"]], "siriushla.as_ps_cycle.cycle_window.CycleWindow": [[34, 3, 1, "", "closeEvent"], [34, 3, 1, "", "keyPressEvent"]], "siriushla.as_ps_cycle.cycle_window.MyProgressBar": [[34, 3, 1, "", "increment"]], "siriushla.as_ps_cycle.cycle_window.UpdateProgressBar": [[34, 3, 1, "", "exit_task"], [34, 2, 1, "", "increment"], [34, 3, 1, "", "run"]], "siriushla.as_ps_cycle.tasks": [[34, 1, 1, "", "BaseTask"], [34, 1, 1, "", "CreateCyclers"], [34, 1, 1, "", "Cycle"], [34, 1, 1, "", "CycleTrims"], [34, 1, 1, "", "PreparePSCurrentZero"], [34, 1, 1, "", "PreparePSIDFFMode"], [34, 1, 1, "", "PreparePSOpModeCycle"], [34, 1, 1, "", "PreparePSOpModeSlowRef"], [34, 1, 1, "", "PreparePSParams"], [34, 1, 1, "", "PreparePSSOFBMode"], [34, 1, 1, "", "PrepareTiming"], [34, 1, 1, "", "RestoreTiming"], [34, 1, 1, "", "SaveTiming"], [34, 1, 1, "", "VerifyPS"]], "siriushla.as_ps_cycle.tasks.BaseTask": [[34, 2, 1, "", "completed"], [34, 2, 1, "", "currentItem"], [34, 3, 1, "", "duration"], [34, 3, 1, "", "exit_task"], [34, 3, 1, "", "function"], [34, 2, 1, "", "itemDone"], [34, 3, 1, "", "run"], [34, 3, 1, "", "size"], [34, 3, 1, "", "update"], [34, 2, 1, "", "updated"]], "siriushla.as_ps_cycle.tasks.CreateCyclers": [[34, 3, 1, "", "function"]], "siriushla.as_ps_cycle.tasks.Cycle": [[34, 3, 1, "", "duration"], [34, 3, 1, "", "function"], [34, 3, 1, "", "size"]], "siriushla.as_ps_cycle.tasks.CycleTrims": [[34, 3, 1, "", "duration"], [34, 3, 1, "", "function"], [34, 3, 1, "", "size"]], "siriushla.as_ps_cycle.tasks.PreparePSCurrentZero": [[34, 3, 1, "", "duration"], [34, 3, 1, "", "function"], [34, 3, 1, "", "size"]], "siriushla.as_ps_cycle.tasks.PreparePSIDFFMode": [[34, 3, 1, "", "duration"], [34, 3, 1, "", "function"], [34, 3, 1, "", "size"]], "siriushla.as_ps_cycle.tasks.PreparePSOpModeCycle": [[34, 3, 1, "", "duration"], [34, 3, 1, "", "function"], [34, 3, 1, "", "size"]], "siriushla.as_ps_cycle.tasks.PreparePSOpModeSlowRef": [[34, 3, 1, "", "duration"], [34, 3, 1, "", "function"], [34, 3, 1, "", "size"]], "siriushla.as_ps_cycle.tasks.PreparePSParams": [[34, 3, 1, "", "duration"], [34, 3, 1, "", "function"], [34, 3, 1, "", "size"]], "siriushla.as_ps_cycle.tasks.PreparePSSOFBMode": [[34, 3, 1, "", "duration"], [34, 3, 1, "", "function"], [34, 3, 1, "", "size"]], "siriushla.as_ps_cycle.tasks.PrepareTiming": [[34, 3, 1, "", "duration"], [34, 3, 1, "", "function"], [34, 3, 1, "", "size"]], "siriushla.as_ps_cycle.tasks.RestoreTiming": [[34, 3, 1, "", "duration"], [34, 3, 1, "", "function"], [34, 3, 1, "", "size"]], "siriushla.as_ps_cycle.tasks.SaveTiming": [[34, 3, 1, "", "duration"], [34, 3, 1, "", "function"], [34, 3, 1, "", "size"]], "siriushla.as_ps_cycle.tasks.VerifyPS": [[34, 3, 1, "", "function"], [34, 3, 1, "", "size"]], "siriushla.as_ps_diag": [[35, 0, 0, "-", "main"], [35, 0, 0, "-", "monitor"], [35, 0, 0, "-", "ps_graph_mon"], [35, 0, 0, "-", "util"]], "siriushla.as_ps_diag.main": [[35, 1, 1, "", "LogItemDelegate"], [35, 1, 1, "", "LogTable"], [35, 2, 1, "", "MyLedMultiChannel"], [35, 2, 1, "", "MyLedMultiConnection"], [35, 1, 1, "", "PSDiag"], [35, 5, 1, "", "create_led_class"]], "siriushla.as_ps_diag.main.LogItemDelegate": [[35, 3, 1, "", "paint"]], "siriushla.as_ps_diag.main.LogTable": [[35, 3, 1, "", "add_log"], [35, 3, 1, "", "add_log_slot"], [35, 3, 1, "", "alarm_severity_changed"], [35, 3, 1, "", "connection_changed"], [35, 3, 1, "", "mouseDoubleClickEvent"], [35, 3, 1, "", "remove_log"], [35, 3, 1, "", "remove_log_slot"], [35, 2, 1, "", "updated"]], "siriushla.as_ps_diag.monitor": [[35, 1, 1, "", "MyLed"], [35, 1, 1, "", "PSMonitor"]], "siriushla.as_ps_diag.monitor.MyLed": [[35, 2, 1, "", "default_colorlist"], [35, 3, 1, "", "mouseDoubleClickEvent"], [35, 3, 1, "", "mousePressEvent"], [35, 3, 1, "", "value_changed"]], "siriushla.as_ps_diag.ps_graph_mon": [[35, 1, 1, "", "PSGraph"], [35, 1, 1, "", "PSGraphDevicesSelWidget"], [35, 1, 1, "", "PSGraphMonWidget"], [35, 1, 1, "", "PSGraphMonWindow"], [35, 1, 1, "", "PSGraphProptySelWidget"]], "siriushla.as_ps_diag.ps_graph_mon.PSGraph": [[35, 3, 1, "", "mouseDoubleClickEvent"], [35, 3, 1, "", "mouseMoveEvent"], [35, 4, 1, "", "psnames"], [35, 4, 1, "", "sector"], [35, 4, 1, "", "symbols"], [35, 4, 1, "", "tooltips"], [35, 4, 1, "", "x_data"], [35, 4, 1, "", "y_data"]], "siriushla.as_ps_diag.ps_graph_mon.PSGraphDevicesSelWidget": [[35, 2, 1, "", "matype_changed"], [35, 2, 1, "", "psnames_changed"]], "siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWidget": [[35, 3, 1, "", "contextMenuEvent"], [35, 2, 1, "", "propLineChanged"], [35, 2, 1, "", "propSymbChanged"], [35, 2, 1, "", "psnamesChanged"], [35, 3, 1, "", "update_property_line"], [35, 3, 1, "", "update_property_symb"], [35, 3, 1, "", "update_psnames"]], "siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWindow": [[35, 3, 1, "", "contextMenuEvent"], [35, 3, 1, "", "show_connections"]], "siriushla.as_ps_diag.ps_graph_mon.PSGraphProptySelWidget": [[35, 2, 1, "", "PROP_LINE_DEFAULT"], [35, 2, 1, "", "PROP_LINE_FASTCORR"], [35, 2, 1, "", "PROP_SYMB_DEFAULT"], [35, 2, 1, "", "PROP_SYMB_FASTCORR"], [35, 3, 1, "", "change_matype"], [35, 2, 1, "", "propty_line_changed"], [35, 2, 1, "", "propty_symb_changed"]], "siriushla.as_ps_diag.util": [[35, 5, 1, "", "get_col2dev_count"], [35, 5, 1, "", "get_dev2sub_labels"], [35, 5, 1, "", "get_label2devices"], [35, 5, 1, "", "get_sec2dev_laypos"]], "siriushla.as_pu_control": [[36, 0, 0, "-", "ControlWindow"], [36, 0, 0, "-", "DetailWidget"], [36, 0, 0, "-", "DetailWindow"]], "siriushla.as_pu_control.ControlWindow": [[36, 1, 1, "", "PUControlWindow"]], "siriushla.as_pu_control.ControlWindow.PUControlWindow": [[36, 3, 1, "", "contextMenuEvent"], [36, 3, 1, "", "show_connections"]], "siriushla.as_pu_control.DetailWidget": [[36, 1, 1, "", "PUDetailWidget"]], "siriushla.as_pu_control.DetailWindow": [[36, 1, 1, "", "PUDetailWindow"]], "siriushla.as_rf_control": [[37, 0, 0, "-", "control"], [37, 0, 0, "-", "custom_widgets"], [37, 0, 0, "-", "details"], [37, 0, 0, "-", "util"]], "siriushla.as_rf_control.control": [[37, 1, 1, "", "RFMainControl"]], "siriushla.as_rf_control.custom_widgets": [[37, 1, 1, "", "RFEnblDsblButton"], [37, 1, 1, "", "RFTitleFrame"]], "siriushla.as_ti_control": [[38, 0, 0, "-", "base"], [38, 0, 0, "-", "hl_trigger"], [38, 0, 0, "-", "hltiming"], [38, 0, 0, "-", "low_level_devices"], [38, 0, 0, "-", "monitor"], [38, 0, 0, "-", "widgets"]], "siriushla.as_ti_control.base": [[38, 1, 1, "", "BaseList"], [38, 1, 1, "", "BaseWidget"], [38, 1, 1, "", "CustomGroupBox"]], "siriushla.as_ti_control.base.BaseList": [[38, 3, 1, "", "filter_columns"], [38, 3, 1, "", "filter_lines"], [38, 3, 1, "", "getColumn"], [38, 3, 1, "", "getLine"], [38, 3, 1, "", "setupUi"]], "siriushla.as_ti_control.base.BaseWidget": [[38, 3, 1, "", "channels"], [38, 3, 1, "", "get_pvname"]], "siriushla.as_ti_control.hl_trigger": [[38, 1, 1, "", "HLTriggerDetailed"], [38, 1, 1, "", "HLTriggerList"], [38, 1, 1, "", "HLTriggerSimple"], [38, 1, 1, "", "LLTriggers"]], "siriushla.as_ti_control.hltiming": [[38, 1, 1, "", "TimingMain"]], "siriushla.as_ti_control.hltiming.TimingMain": [[38, 3, 1, "", "setevents"], [38, 3, 1, "", "setglobalparameters"], [38, 3, 1, "", "settriggers"], [38, 3, 1, "", "setupmenus"], [38, 3, 1, "", "setupui"]], "siriushla.as_ti_control.low_level_devices": [[38, 1, 1, "", "AFC"], [38, 1, 1, "", "AFCOUTList"], [38, 1, 1, "", "BucketList"], [38, 1, 1, "", "BucketListGraph"], [38, 1, 1, "", "BucketListLabel"], [38, 1, 1, "", "BucketListLineEdit"], [38, 1, 1, "", "ClockList"], [38, 1, 1, "", "EVE"], [38, 1, 1, "", "EVG"], [38, 1, 1, "", "EVGFOUTOUTList"], [38, 1, 1, "", "EVR"], [38, 1, 1, "", "EVREVEDIList"], [38, 1, 1, "", "EVREVEOTPList"], [38, 1, 1, "", "EVREVEOUTList"], [38, 1, 1, "", "EventList"], [38, 1, 1, "", "FOUT"], [38, 1, 1, "", "LLTriggerList"]], "siriushla.as_ti_control.low_level_devices.BucketList": [[38, 3, 1, "", "setupui"]], "siriushla.as_ti_control.low_level_devices.BucketListLabel": [[38, 3, 1, "", "value_changed"]], "siriushla.as_ti_control.low_level_devices.BucketListLineEdit": [[38, 3, 1, "", "value_changed"]], "siriushla.as_ti_control.low_level_devices.EVG": [[38, 3, 1, "", "setupui"]], "siriushla.as_ti_control.monitor": [[38, 1, 1, "", "HLButton"], [38, 1, 1, "", "LLButton"], [38, 1, 1, "", "MonitorHL"], [38, 1, 1, "", "MonitorLL"], [38, 1, 1, "", "MonitorWindow"]], "siriushla.as_ti_control.monitor.LLButton": [[38, 3, 1, "", "setupui"]], "siriushla.as_ti_control.monitor.MonitorLL": [[38, 3, 1, "", "drawarrow"], [38, 3, 1, "", "drawline"], [38, 3, 1, "", "paintEvent"], [38, 3, 1, "", "setupdown"]], "siriushla.as_ti_control.widgets": [[38, 1, 1, "", "EVGContinuousButton"], [38, 1, 1, "", "EVGContinuousLed"], [38, 1, 1, "", "EVGInjectionButton"], [38, 1, 1, "", "EVGInjectionLed"], [38, 1, 1, "", "EVGUpdateEvtButton"], [38, 1, 1, "", "EVGUpdateEvtLed"]], "siriushla.bl_ap_imgproc": [[39, 0, 0, "-", "blintlkctl"], [39, 0, 0, "-", "image"], [39, 0, 0, "-", "main"], [39, 0, 0, "-", "util"]], "siriushla.bl_ap_imgproc.blintlkctl": [[39, 1, 1, "", "BLIntckCtrl"]], "siriushla.bl_ap_imgproc.blintlkctl.BLIntckCtrl": [[39, 3, 1, "", "beamline_open"], [39, 4, 1, "", "beamline_opened"], [39, 3, 1, "", "gamma_enable"]], "siriushla.bl_ap_imgproc.image": [[39, 1, 1, "", "DVFImageView"]], "siriushla.bl_ap_imgproc.image.DVFImageView": [[39, 3, 1, "", "add_fit_ellipse"], [39, 3, 1, "", "add_fit_ellipse_connection"], [39, 3, 1, "", "add_fit_mean"], [39, 3, 1, "", "add_fit_mean_connection"], [39, 3, 1, "", "add_prefixes"], [39, 3, 1, "", "add_roi"], [39, 3, 1, "", "add_roi_connection"], [39, 3, 1, "", "plot_fit_ellipse"], [39, 3, 1, "", "plot_fit_mean"], [39, 3, 1, "", "plot_roi"]], "siriushla.bl_ap_imgproc.main": [[39, 1, 1, "", "BLImgProc"]], "siriushla.bl_ap_imgproc.main.BLImgProc": [[39, 3, 1, "", "add_prefixes"], [39, 3, 1, "", "create_box_group"], [39, 3, 1, "", "create_time_widget"], [39, 3, 1, "", "create_widget"], [39, 3, 1, "", "end_processing_cmd"], [39, 3, 1, "", "format_datetime_lbl"], [39, 3, 1, "", "generate_pv_name"], [39, 3, 1, "", "intlk_cmd"], [39, 3, 1, "", "select_widget"], [39, 3, 1, "", "setpoint_readback_widget"], [39, 3, 1, "", "start_processing_cmd"], [39, 3, 1, "", "toggle_beamline_btns"], [39, 3, 1, "", "update_bl_open_status"]], "siriushla.bo_ap_ramp": [[40, 0, 0, "-", "custom_widgets"]], "siriushla.bo_ap_ramp.custom_widgets": [[40, 1, 1, "", "ConfigLineEdit"], [40, 1, 1, "", "CustomTableWidgetItem"], [40, 1, 1, "", "GraphKicks"], [40, 1, 1, "", "MyTableWidget"], [40, 1, 1, "", "SpinBoxDelegate"]], "siriushla.bo_ap_ramp.custom_widgets.ConfigLineEdit": [[40, 3, 1, "", "mouseReleaseEvent"]], "siriushla.bo_ap_ramp.custom_widgets.MyTableWidget": [[40, 3, 1, "", "mouseDoubleClickEvent"], [40, 3, 1, "", "mousePressEvent"]], "siriushla.bo_ap_ramp.custom_widgets.SpinBoxDelegate": [[40, 3, 1, "", "createEditor"], [40, 3, 1, "", "displayText"], [40, 3, 1, "", "setEditorData"], [40, 3, 1, "", "setModelData"], [40, 3, 1, "", "updateEditorGeometry"]], "siriushla.common": [[42, 0, 0, "-", "afc_acq_core"], [43, 0, 0, "-", "cam_basler"], [44, 0, 0, "-", "diff_ctrl"], [45, 0, 0, "-", "epics"]], "siriushla.common.afc_acq_core": [[42, 0, 0, "-", "base"], [42, 0, 0, "-", "triggers"]], "siriushla.common.afc_acq_core.base": [[42, 1, 1, "", "BaseWidget"]], "siriushla.common.afc_acq_core.base.BaseWidget": [[42, 3, 1, "", "get_pvname"]], "siriushla.common.afc_acq_core.triggers": [[42, 1, 1, "", "LogicalTriggers"], [42, 1, 1, "", "PhysicalTriggers"]], "siriushla.common.afc_acq_core.triggers.LogicalTriggers": [[42, 3, 1, "", "get_trigger_groupbox"], [42, 3, 1, "", "setupui"]], "siriushla.common.afc_acq_core.triggers.PhysicalTriggers": [[42, 3, 1, "", "get_trigger_groupbox"], [42, 3, 1, "", "setupui"]], "siriushla.common.cam_basler": [[43, 0, 0, "-", "base"], [43, 0, 0, "-", "settings"]], "siriushla.common.cam_basler.base": [[43, 1, 1, "", "SiriusImageView"], [43, 5, 1, "", "create_propty_layout"]], "siriushla.common.cam_basler.base.SiriusImageView": [[43, 2, 1, "", "ROIOffsetXChannel"], [43, 2, 1, "", "ROIOffsetYChannel"], [43, 4, 1, "", "calibrationGrid"], [43, 4, 1, "", "calibration_grid_filterfactor"], [43, 4, 1, "", "calibration_grid_removeborder"], [43, 2, 1, "", "failToSaveGrid"], [43, 4, 1, "", "image_maxheight"], [43, 3, 1, "", "image_maxheight_changed"], [43, 4, 1, "", "image_maxwidth"], [43, 3, 1, "", "image_maxwidth_changed"], [43, 3, 1, "", "image_roioffsetx_changed"], [43, 3, 1, "", "image_roioffsety_changed"], [43, 2, 1, "", "maxHeightChannel"], [43, 2, 1, "", "maxWidthChannel"], [43, 3, 1, "", "process_image"], [43, 2, 1, "", "receivedData"], [43, 3, 1, "", "roioffsetx_connection_state_changed"], [43, 3, 1, "", "roioffsety_connection_state_changed"], [43, 3, 1, "", "saveCalibrationGrid"], [43, 3, 1, "", "set_calibration_grid_border2remove"], [43, 3, 1, "", "set_calibration_grid_filterfactor"], [43, 3, 1, "", "showCalibrationGrid"]], "siriushla.common.cam_basler.settings": [[43, 1, 1, "", "BaslerCamAcqAdvSettings"], [43, 1, 1, "", "BaslerCamSettings"]], "siriushla.common.diff_ctrl": [[44, 0, 0, "-", "base"], [44, 0, 0, "-", "details"]], "siriushla.common.diff_ctrl.base": [[44, 1, 1, "", "DiffCtrlDevMonitor"], [44, 1, 1, "", "DiffCtrlView"]], "siriushla.common.diff_ctrl.base.DiffCtrlDevMonitor": [[44, 3, 1, "", "channels"], [44, 3, 1, "", "updateDevWidget"]], "siriushla.common.diff_ctrl.base.DiffCtrlView": [[44, 2, 1, "", "DEVICE_CLASS"], [44, 2, 1, "", "DEVICE_PREFIX"], [44, 3, 1, "", "changeEvent"]], "siriushla.common.diff_ctrl.details": [[44, 1, 1, "", "DiffCtrlDetails"]], "siriushla.common.epics": [[46, 0, 0, "-", "task"], [47, 0, 0, "-", "wrapper"]], "siriushla.common.epics.task": [[46, 0, 0, "-", "checker"], [46, 0, 0, "-", "connector"], [46, 0, 0, "-", "getter"], [46, 0, 0, "-", "setter"], [46, 0, 0, "-", "task"], [46, 0, 0, "-", "wait"]], "siriushla.common.epics.task.checker": [[46, 1, 1, "", "EpicsChecker"]], "siriushla.common.epics.task.checker.EpicsChecker": [[46, 2, 1, "", "itemChecked"], [46, 3, 1, "", "run"]], "siriushla.common.epics.task.connector": [[46, 1, 1, "", "EpicsConnector"]], "siriushla.common.epics.task.connector.EpicsConnector": [[46, 3, 1, "", "run"]], "siriushla.common.epics.task.getter": [[46, 1, 1, "", "EpicsGetter"]], "siriushla.common.epics.task.getter.EpicsGetter": [[46, 2, 1, "", "itemNotRead"], [46, 2, 1, "", "itemRead"], [46, 3, 1, "", "run"]], "siriushla.common.epics.task.setter": [[46, 1, 1, "", "EpicsSetter"]], "siriushla.common.epics.task.setter.EpicsSetter": [[46, 3, 1, "", "run"]], "siriushla.common.epics.task.task": [[46, 1, 1, "", "EpicsTask"]], "siriushla.common.epics.task.task.EpicsTask": [[46, 2, 1, "", "PVs"], [46, 2, 1, "", "completed"], [46, 2, 1, "", "currentItem"], [46, 3, 1, "", "exit_task"], [46, 3, 1, "", "get_pv"], [46, 2, 1, "", "itemDone"], [46, 3, 1, "", "size"]], "siriushla.common.epics.task.wait": [[46, 1, 1, "", "EpicsWait"]], "siriushla.common.epics.task.wait.EpicsWait": [[46, 3, 1, "", "run"]], "siriushla.common.epics.wrapper": [[47, 0, 0, "-", "pyepics"]], "siriushla.common.epics.wrapper.pyepics": [[47, 1, 1, "", "PyEpicsWrapper"]], "siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper": [[47, 2, 1, "", "TIMEOUT"], [47, 3, 1, "", "check"], [47, 3, 1, "", "get"], [47, 3, 1, "", "put"], [47, 4, 1, "", "pvname"]], "siriushla.li_ap_mps": [[48, 0, 0, "-", "bypass_btn"], [48, 0, 0, "-", "main"], [48, 0, 0, "-", "monitor"], [48, 0, 0, "-", "util"]], "siriushla.li_ap_mps.bypass_btn": [[48, 1, 1, "", "BypassBtn"]], "siriushla.li_ap_mps.bypass_btn.BypassBtn": [[48, 3, 1, "", "value_changed"]], "siriushla.li_ap_mps.main": [[48, 1, 1, "", "MPSControl"]], "siriushla.li_ap_mps.main.MPSControl": [[48, 3, 1, "", "changeWid"], [48, 3, 1, "", "clearLayout"], [48, 3, 1, "", "controlBox"], [48, 3, 1, "", "controlHiddenBox"], [48, 3, 1, "", "controlWidget"], [48, 3, 1, "", "countGen"], [48, 3, 1, "", "countTemp"], [48, 3, 1, "", "countVA"], [48, 3, 1, "", "countWater"], [48, 3, 1, "", "dispayAllControls"], [48, 3, 1, "", "dispayHiddenControls"], [48, 3, 1, "", "displayControlMPS"], [48, 3, 1, "", "displayGroup"], [48, 3, 1, "", "displayHeader"], [48, 3, 1, "", "displayMpsGroups"], [48, 3, 1, "", "displayTabs"], [48, 3, 1, "", "displayTempGroup"], [48, 3, 1, "", "displayTempGroups"], [48, 3, 1, "", "eventFilter"], [48, 3, 1, "", "gateValve"], [48, 3, 1, "", "genStringTempPV"], [48, 3, 1, "", "getCtrlWidget"], [48, 3, 1, "", "getDeviceName"], [48, 3, 1, "", "getPVConfig"], [48, 3, 1, "", "getPVControl"], [48, 3, 1, "", "getParamAll"], [48, 3, 1, "", "getSingleTitle"], [48, 3, 1, "", "getTempWidget"], [48, 3, 1, "", "setParamLabel"], [48, 3, 1, "", "setPvLbl"], [48, 3, 1, "", "setTempHeader"], [48, 3, 1, "", "setTitleLabel"], [48, 3, 1, "", "statusBox"], [48, 3, 1, "", "tempMonBox"], [48, 3, 1, "", "updateCount"]], "siriushla.li_ap_mps.monitor": [[48, 1, 1, "", "MPSMonitor"]], "siriushla.li_di_bpms": [[49, 0, 0, "-", "bpm_main"]], "siriushla.li_di_bpms.bpm_main": [[49, 1, 1, "", "DigBeamPosProc"]], "siriushla.li_di_bpms.bpm_main.DigBeamPosProc": [[49, 3, 1, "", "createGraph"], [49, 3, 1, "", "dataItem"], [49, 3, 1, "", "display_data"], [49, 3, 1, "", "display_graph"], [49, 3, 1, "", "display_header"], [49, 3, 1, "", "display_mainData"], [49, 3, 1, "", "display_secData"], [49, 3, 1, "", "display_selectors"], [49, 3, 1, "", "selectionItem"]], "siriushla.li_di_scrns": [[50, 0, 0, "-", "main"], [50, 0, 0, "-", "motorBtn"], [50, 0, 0, "-", "util"]], "siriushla.li_di_scrns.main": [[50, 1, 1, "", "GeneralFunctions"], [50, 1, 1, "", "LiBeamProfile"], [50, 1, 1, "", "ROIViewWindow"]], "siriushla.li_di_scrns.main.GeneralFunctions": [[50, 3, 1, "", "getPvName"], [50, 3, 1, "", "setBasicInfo"], [50, 3, 1, "", "setRBVObj"], [50, 3, 1, "", "setSingleScrn"], [50, 3, 1, "", "setWidgetType"]], "siriushla.li_di_scrns.main.LiBeamProfile": [[50, 3, 1, "", "buildStacks"], [50, 3, 1, "", "getScrnSelBtns"], [50, 3, 1, "", "getStackItem"], [50, 3, 1, "", "header"], [50, 3, 1, "", "imageViewer"], [50, 3, 1, "", "radioBtnClick"], [50, 3, 1, "", "saveStack"], [50, 3, 1, "", "selectionItem"], [50, 3, 1, "", "setLight"], [50, 3, 1, "", "setMotorsConfig"], [50, 3, 1, "", "setPanelInfo"], [50, 3, 1, "", "setScrnHeader"], [50, 3, 1, "", "setScrnInfo"], [50, 3, 1, "", "setScrnPanel"], [50, 3, 1, "", "setScrnSelection"], [50, 3, 1, "", "setSingleScrnInfo"], [50, 3, 1, "", "setZeroOpt"]], "siriushla.li_di_scrns.main.ROIViewWindow": [[50, 3, 1, "", "buildStacks"], [50, 3, 1, "", "getStackItem"], [50, 3, 1, "", "radioBtnClick"], [50, 3, 1, "", "rotate_chart"], [50, 3, 1, "", "saveStack"], [50, 3, 1, "", "scrnAndProj"], [50, 3, 1, "", "setGraph"], [50, 3, 1, "", "setGraphInfo"], [50, 3, 1, "", "setRoiInfo"]], "siriushla.li_di_scrns.motorBtn": [[50, 1, 1, "", "MotorBtn"]], "siriushla.li_di_scrns.motorBtn.MotorBtn": [[50, 3, 1, "", "send_value"], [50, 3, 1, "", "value_changed"]], "siriushla.li_eg_control": [[51, 0, 0, "-", "main"]], "siriushla.li_eg_control.main": [[51, 1, 1, "", "ITTIWidget"], [51, 1, 1, "", "LIEgunWindow"]], "siriushla.li_pu_modltr": [[52, 0, 0, "-", "auxiliary_dialogs"], [52, 0, 0, "-", "main"]], "siriushla.li_pu_modltr.auxiliary_dialogs": [[52, 1, 1, "", "ModEmerStopDialog"], [52, 1, 1, "", "ModIntlkDetailDialog"]], "siriushla.li_pu_modltr.main": [[52, 1, 1, "", "LIModltrWindow"]], "siriushla.li_rf_llrf": [[53, 0, 0, "-", "chart"], [53, 0, 0, "-", "controls"], [53, 0, 0, "-", "details"], [53, 0, 0, "-", "main"], [53, 0, 0, "-", "motor_control"], [53, 0, 0, "-", "util"], [53, 0, 0, "-", "widgets"]], "siriushla.li_rf_llrf.chart": [[53, 1, 1, "", "ChartMon"], [53, 1, 1, "", "ChartWindow"]], "siriushla.li_rf_llrf.chart.ChartMon": [[53, 3, 1, "", "chartsMon"]], "siriushla.li_rf_llrf.chart.ChartWindow": [[53, 3, 1, "", "chartsIQAmpPha"], [53, 3, 1, "", "chartsPulseAmpPha"]], "siriushla.li_rf_llrf.controls": [[53, 1, 1, "", "ControlBox"], [53, 1, 1, "", "DEVICES"]], "siriushla.li_rf_llrf.controls.DEVICES": [[53, 2, 1, "", "Kly1"], [53, 2, 1, "", "Kly2"], [53, 2, 1, "", "SHB"]], "siriushla.li_rf_llrf.details": [[53, 1, 1, "", "DeviceParamSettingWindow"]], "siriushla.li_rf_llrf.main": [[53, 1, 1, "", "LLRFMain"]], "siriushla.li_rf_llrf.main.LLRFMain": [[53, 3, 1, "", "baseWidget"], [53, 3, 1, "", "basicInfoBox"], [53, 3, 1, "", "buildChartMonitor"], [53, 3, 1, "", "buildDevicesWidgets"], [53, 3, 1, "", "buildLine"], [53, 3, 1, "", "buildPvName"], [53, 3, 1, "", "buildTabs"], [53, 3, 1, "", "eventFilter"], [53, 3, 1, "", "formatLabel"], [53, 3, 1, "", "imageViewer"], [53, 3, 1, "", "motorControlBtn"], [53, 3, 1, "", "showChartBtn"]], "siriushla.li_rf_llrf.motor_control": [[53, 1, 1, "", "MotorControlWindow"]], "siriushla.li_rf_llrf.motor_control.MotorControlWindow": [[53, 3, 1, "", "basicData"], [53, 3, 1, "", "buildLed"], [53, 3, 1, "", "getWidget"], [53, 3, 1, "", "infoBox"], [53, 3, 1, "", "ledBox"], [53, 3, 1, "", "pidBox"], [53, 3, 1, "", "rbvBox"]], "siriushla.li_rf_llrf.widgets": [[53, 1, 1, "", "DeltaIQPhaseCorrButton"], [53, 1, 1, "", "GraphIvsQ"], [53, 1, 1, "", "GraphTime"], [53, 1, 1, "", "GraphWave"]], "siriushla.li_va_control": [[54, 0, 0, "-", "chart"], [54, 0, 0, "-", "details"], [54, 0, 0, "-", "functions"], [54, 0, 0, "-", "main"], [54, 0, 0, "-", "util"], [54, 0, 0, "-", "widgets"]], "siriushla.li_va_control.chart": [[54, 1, 1, "", "ChartWindow"]], "siriushla.li_va_control.chart.ChartWindow": [[54, 3, 1, "", "addChannels"], [54, 3, 1, "", "chartsMon"], [54, 3, 1, "", "setupGraph"]], "siriushla.li_va_control.details": [[54, 1, 1, "", "DetailWindow"], [54, 1, 1, "", "IpsDetailWindow"], [54, 1, 1, "", "VgcDetailWindow"]], "siriushla.li_va_control.details.DetailWindow": [[54, 3, 1, "", "buildList"], [54, 3, 1, "", "selWindow"], [54, 3, 1, "", "setupAllDevices"], [54, 3, 1, "", "setupIPSControl"], [54, 3, 1, "", "setupIPSListDet"], [54, 3, 1, "", "setupVgcListDet"], [54, 3, 1, "", "widgetLists"]], "siriushla.li_va_control.details.IpsDetailWindow": [[54, 3, 1, "", "buildGroup"], [54, 3, 1, "", "buildIPSDetail"]], "siriushla.li_va_control.details.VgcDetailWindow": [[54, 3, 1, "", "buildVgcTable"], [54, 3, 1, "", "setupDevices"]], "siriushla.li_va_control.functions": [[54, 1, 1, "", "BaseFunctionsInterface"], [54, 5, 1, "", "getShape"], [54, 5, 1, "", "headerWidget"]], "siriushla.li_va_control.functions.BaseFunctionsInterface": [[54, 3, 1, "", "SPRBWidget"], [54, 3, 1, "", "buildAllLegends"], [54, 3, 1, "", "buildBasicGroup"], [54, 3, 1, "", "buildIPSInfo"], [54, 3, 1, "", "buildIdName"], [54, 3, 1, "", "buildIdsVac"], [54, 3, 1, "", "buildLed"], [54, 3, 1, "", "buildVacPv"], [54, 3, 1, "", "getGroupTitle"], [54, 3, 1, "", "getLayout"], [54, 3, 1, "", "getLayoutWidget"], [54, 3, 1, "", "getProgressBar"], [54, 3, 1, "", "getSPTable"], [54, 3, 1, "", "getSimplePvWidget"], [54, 3, 1, "", "getSufixes"], [54, 3, 1, "", "getVacPosition"], [54, 3, 1, "", "getVgcLed"], [54, 3, 1, "", "getVgcSPRB"], [54, 3, 1, "", "getWidget"], [54, 3, 1, "", "setWindowBtn"], [54, 3, 1, "", "setupLegend"], [54, 3, 1, "", "setupUnitView"]], "siriushla.li_va_control.main": [[54, 1, 1, "", "VacuumMain"]], "siriushla.li_va_control.main.VacuumMain": [[54, 3, 1, "", "buildAllLegendsRel"], [54, 3, 1, "", "buildVacInfo"], [54, 3, 1, "", "eventFilter"], [54, 3, 1, "", "getGroupWidgets"], [54, 3, 1, "", "imageViewer"], [54, 3, 1, "", "saveRelWid"], [54, 3, 1, "", "saveWidToList"], [54, 3, 1, "", "selWindow"], [54, 3, 1, "", "setupButtons"], [54, 3, 1, "", "setupIPSList"], [54, 3, 1, "", "setupLists"], [54, 3, 1, "", "setupMainWidgets"], [54, 3, 1, "", "setupVgcList"]], "siriushla.li_va_control.widgets": [[54, 1, 1, "", "LedLegend"], [54, 1, 1, "", "PyDMLedMultiIncosistencyDetector"], [54, 1, 1, "", "QGroupBoxButton"]], "siriushla.li_va_control.widgets.LedLegend": [[54, 3, 1, "", "drawSingleLed"], [54, 3, 1, "", "getShape"], [54, 3, 1, "", "paintEvent"]], "siriushla.li_va_control.widgets.PyDMLedMultiIncosistencyDetector": [[54, 2, 1, "", "LightGreen"], [54, 2, 1, "", "Red"], [54, 2, 1, "", "Yellow"]], "siriushla.li_va_control.widgets.QGroupBoxButton": [[54, 3, 1, "", "mousePressEvent"]], "siriushla.si_ap_fofb": [[55, 0, 0, "-", "base"], [55, 0, 0, "-", "custom_widgets"], [55, 0, 0, "-", "graphics"], [55, 0, 0, "-", "main"], [55, 0, 0, "-", "respmat"], [55, 0, 0, "-", "trig_acq_config"]], "siriushla.si_ap_fofb.base": [[55, 1, 1, "", "BaseObject"], [55, 1, 1, "", "BaseWidget"], [55, 5, 1, "", "get_fofb_icon"]], "siriushla.si_ap_fofb.base.BaseObject": [[55, 2, 1, "", "UM2M"], [55, 2, 1, "", "UM2NM"], [55, 2, 1, "", "URAD2RAD"], [55, 4, 1, "", "acc"], [55, 4, 1, "", "acc_idx"], [55, 4, 1, "", "isring"]], "siriushla.si_ap_fofb.custom_widgets": [[55, 1, 1, "", "BPMSwModeWidget"], [55, 1, 1, "", "ControllersDetailDialog"], [55, 1, 1, "", "PSConfigWidget"], [55, 1, 1, "", "RefOrbWidget"], [55, 1, 1, "", "StatusDialog"]], "siriushla.si_ap_fofb.graphics": [[55, 1, 1, "", "CorrGainWidget"], [55, 1, 1, "", "KickWidget"], [55, 1, 1, "", "MatrixWidget"], [55, 1, 1, "", "RefOrbViewWidget"]], "siriushla.si_ap_fofb.main": [[55, 1, 1, "", "MainWindow"]], "siriushla.si_ap_fofb.respmat": [[55, 1, 1, "", "RespMatWidget"], [55, 1, 1, "", "SelectionMatrix"], [55, 1, 1, "", "SingleSelMatrix"]], "siriushla.si_ap_fofb.respmat.RespMatWidget": [[55, 3, 1, "", "get_main_widget"], [55, 3, 1, "", "get_selection_lists_widget"]], "siriushla.si_ap_fofb.respmat.SingleSelMatrix": [[55, 3, 1, "", "get_headers"], [55, 3, 1, "", "get_positions"]], "siriushla.si_ap_fofb.trig_acq_config": [[55, 1, 1, "", "FOFBAcqBaseWindow"], [55, 1, 1, "", "FOFBAcqLAMPWindow"], [55, 1, 1, "", "FOFBAcqSYSIDWindow"]], "siriushla.si_ap_fofb.trig_acq_config.FOFBAcqBaseWindow": [[55, 2, 1, "", "CONV_IDX2BPM"]], "siriushla.si_ap_fofb.trig_acq_config.FOFBAcqLAMPWindow": [[55, 2, 1, "", "ACQCORE"]], "siriushla.si_ap_fofb.trig_acq_config.FOFBAcqSYSIDWindow": [[55, 2, 1, "", "ACQCORE"]], "siriushla.si_ap_genstatus": [[56, 0, 0, "-", "main"]], "siriushla.si_ap_genstatus.main": [[56, 1, 1, "", "SIGenStatusWindow"]], "siriushla.si_ap_genstatus.main.SIGenStatusWindow": [[56, 3, 1, "", "changeEvent"], [56, 3, 1, "", "formatLifetimeLabel"]], "siriushla.si_ap_idff": [[57, 0, 0, "-", "custom_widgets"], [57, 0, 0, "-", "main"], [57, 0, 0, "-", "util"]], "siriushla.si_ap_idff.custom_widgets": [[57, 1, 1, "", "ConfigLineEdit"], [57, 1, 1, "", "SectionedWaveformCurveItem"]], "siriushla.si_ap_idff.custom_widgets.ConfigLineEdit": [[57, 3, 1, "", "mouseReleaseEvent"]], "siriushla.si_ap_idff.custom_widgets.SectionedWaveformCurveItem": [[57, 2, 1, "", "GAP_MAX"], [57, 2, 1, "", "GAP_MIN"], [57, 3, 1, "", "receiveYWaveform"]], "siriushla.si_ap_idff.main": [[57, 1, 1, "", "IDFFWindow"]], "siriushla.si_ap_idff.main.IDFFWindow": [[57, 3, 1, "", "addNewTableCurve"]], "siriushla.si_ap_idff.util": [[57, 5, 1, "", "get_idff_icon"]], "siriushla.si_ap_orbintlk": [[58, 0, 0, "-", "base"], [58, 0, 0, "-", "bpmdetail"], [58, 0, 0, "-", "custom_widgets"], [58, 0, 0, "-", "graphics"], [58, 0, 0, "-", "main"]], "siriushla.si_ap_orbintlk.base": [[58, 1, 1, "", "BaseObject"]], "siriushla.si_ap_orbintlk.base.BaseObject": [[58, 2, 1, "", "CONV_NM2M"], [58, 2, 1, "", "CONV_UM2NM"], [58, 3, 1, "", "get_ref_orb"], [58, 4, 1, "", "monitsum2intlksum_factor"]], "siriushla.si_ap_orbintlk.bpmdetail": [[58, 1, 1, "", "BPMOrbIntlkDetailWindow"]], "siriushla.si_ap_orbintlk.custom_widgets": [[58, 1, 1, "", "BPMIntlkEnblWidget"], [58, 1, 1, "", "BPMIntlkLimSPWidget"], [58, 1, 1, "", "MonitoredDevicesDialog"], [58, 1, 1, "", "RefOrbComboBox"]], "siriushla.si_ap_orbintlk.custom_widgets.BPMIntlkEnblWidget": [[58, 3, 1, "", "connection_changed"], [58, 3, 1, "", "send_value"], [58, 3, 1, "", "value_changed"]], "siriushla.si_ap_orbintlk.custom_widgets.BPMIntlkLimSPWidget": [[58, 3, 1, "", "send_value"]], "siriushla.si_ap_orbintlk.custom_widgets.RefOrbComboBox": [[58, 2, 1, "", "refOrbChanged"]], "siriushla.si_ap_orbintlk.graphics": [[58, 1, 1, "", "AngXGraphWidget"], [58, 1, 1, "", "AngYGraphWidget"], [58, 1, 1, "", "Graph"], [58, 1, 1, "", "GraphLegendWidget"], [58, 1, 1, "", "GraphMonitorWidget"], [58, 1, 1, "", "GraphProptySelWidget"], [58, 1, 1, "", "MinSumGraphWidget"], [58, 1, 1, "", "PosXGraphWidget"], [58, 1, 1, "", "PosYGraphWidget"]], "siriushla.si_ap_orbintlk.graphics.AngXGraphWidget": [[58, 2, 1, "", "INTLKTYPE"], [58, 2, 1, "", "PROPTY_MAX_DATA"], [58, 2, 1, "", "PROPTY_MAX_SYMB"], [58, 2, 1, "", "PROPTY_MEAS_DATA"], [58, 2, 1, "", "PROPTY_MEAS_SYMB"], [58, 2, 1, "", "PROPTY_MIN_DATA"], [58, 2, 1, "", "PROPTY_MIN_SYMB"]], "siriushla.si_ap_orbintlk.graphics.AngYGraphWidget": [[58, 2, 1, "", "INTLKTYPE"], [58, 2, 1, "", "PROPTY_MAX_DATA"], [58, 2, 1, "", "PROPTY_MAX_SYMB"], [58, 2, 1, "", "PROPTY_MEAS_DATA"], [58, 2, 1, "", "PROPTY_MEAS_SYMB"], [58, 2, 1, "", "PROPTY_MIN_DATA"], [58, 2, 1, "", "PROPTY_MIN_SYMB"]], "siriushla.si_ap_orbintlk.graphics.Graph": [[58, 3, 1, "", "mouseDoubleClickEvent"], [58, 4, 1, "", "symbols_max"], [58, 4, 1, "", "symbols_meas"], [58, 4, 1, "", "symbols_min"], [58, 4, 1, "", "tooltips"], [58, 4, 1, "", "x_data"], [58, 4, 1, "", "y_data_max"], [58, 4, 1, "", "y_data_meas"], [58, 4, 1, "", "y_data_min"]], "siriushla.si_ap_orbintlk.graphics.GraphProptySelWidget": [[58, 2, 1, "", "propty_comp_changed"], [58, 2, 1, "", "propty_intlk_changed"], [58, 2, 1, "", "propty_reforb_changed"]], "siriushla.si_ap_orbintlk.graphics.MinSumGraphWidget": [[58, 2, 1, "", "INTLKTYPE"], [58, 2, 1, "", "PROPTY_MAX_DATA"], [58, 2, 1, "", "PROPTY_MAX_SYMB"], [58, 2, 1, "", "PROPTY_MEAS_DATA"], [58, 2, 1, "", "PROPTY_MEAS_SYMB"], [58, 2, 1, "", "PROPTY_MIN_DATA"], [58, 2, 1, "", "PROPTY_MIN_SYMB"]], "siriushla.si_ap_orbintlk.graphics.PosXGraphWidget": [[58, 2, 1, "", "INTLKTYPE"], [58, 2, 1, "", "PROPTY_MAX_DATA"], [58, 2, 1, "", "PROPTY_MAX_SYMB"], [58, 2, 1, "", "PROPTY_MEAS_DATA"], [58, 2, 1, "", "PROPTY_MEAS_SYMB"], [58, 2, 1, "", "PROPTY_MIN_DATA"], [58, 2, 1, "", "PROPTY_MIN_SYMB"]], "siriushla.si_ap_orbintlk.graphics.PosYGraphWidget": [[58, 2, 1, "", "INTLKTYPE"], [58, 2, 1, "", "PROPTY_MAX_DATA"], [58, 2, 1, "", "PROPTY_MAX_SYMB"], [58, 2, 1, "", "PROPTY_MEAS_DATA"], [58, 2, 1, "", "PROPTY_MEAS_SYMB"], [58, 2, 1, "", "PROPTY_MIN_DATA"], [58, 2, 1, "", "PROPTY_MIN_SYMB"]], "siriushla.si_ap_orbintlk.main": [[58, 1, 1, "", "BPMOrbIntlkMainWindow"]], "siriushla.si_di_bbb": [[59, 0, 0, "-", "acquisition"], [59, 0, 0, "-", "advanced_settings"], [59, 0, 0, "-", "bbb"], [59, 0, 0, "-", "coefficients"], [59, 0, 0, "-", "custom_widgets"], [59, 0, 0, "-", "drive"], [59, 0, 0, "-", "environment"], [59, 0, 0, "-", "gpio"], [59, 0, 0, "-", "main"], [59, 0, 0, "-", "masks"], [59, 0, 0, "-", "pwr_amps"], [59, 0, 0, "-", "timing"], [59, 0, 0, "-", "util"]], "siriushla.si_di_bbb.acquisition": [[59, 1, 1, "", "BbBAcqBRAM"], [59, 1, 1, "", "BbBAcqSB"], [59, 1, 1, "", "BbBAcqSRAM"]], "siriushla.si_di_bbb.acquisition.BbBAcqBRAM": [[59, 2, 1, "", "TYPE"]], "siriushla.si_di_bbb.acquisition.BbBAcqSRAM": [[59, 2, 1, "", "TYPE"]], "siriushla.si_di_bbb.advanced_settings": [[59, 1, 1, "", "BbBADCWidget"], [59, 1, 1, "", "BbBAdvancedSettingsWidget"], [59, 1, 1, "", "BbBGeneralSettingsWidget"], [59, 1, 1, "", "BbBInterlock"], [59, 1, 1, "", "BbBSlowDACsWidget"]], "siriushla.si_di_bbb.bbb": [[59, 1, 1, "", "BbBControlWindow"], [59, 1, 1, "", "BbBInfoWidget"], [59, 1, 1, "", "BbBMainSettingsWidget"], [59, 1, 1, "", "BbBStatusWidget"]], "siriushla.si_di_bbb.coefficients": [[59, 1, 1, "", "BbBCoefficientsWidget"], [59, 1, 1, "", "Label"]], "siriushla.si_di_bbb.coefficients.Label": [[59, 3, 1, "", "value_changed"]], "siriushla.si_di_bbb.custom_widgets": [[59, 1, 1, "", "TimeGraph"], [59, 1, 1, "", "WfmGraph"]], "siriushla.si_di_bbb.custom_widgets.WfmGraph": [[59, 3, 1, "", "add_marker"], [59, 3, 1, "", "add_scatter_curve"]], "siriushla.si_di_bbb.drive": [[59, 1, 1, "", "BbBDriveSettingsWidget"], [59, 1, 1, "", "BbBSingleDriveSettingsWidget"]], "siriushla.si_di_bbb.environment": [[59, 1, 1, "", "BbBEnvironmMonWidget"]], "siriushla.si_di_bbb.gpio": [[59, 1, 1, "", "BbBGPIOWidget"]], "siriushla.si_di_bbb.main": [[59, 1, 1, "", "BbBMainWindow"]], "siriushla.si_di_bbb.masks": [[59, 1, 1, "", "BbBMasksWidget"]], "siriushla.si_di_bbb.pwr_amps": [[59, 1, 1, "", "BbBPwrAmpsWidget"]], "siriushla.si_di_bbb.timing": [[59, 1, 1, "", "BbBTimingWidget"]], "siriushla.si_di_bbb.util": [[59, 5, 1, "", "get_bbb_icon"], [59, 5, 1, "", "set_bbb_color"]], "siriushla.si_di_equalize_bpms": [[60, 0, 0, "-", "main"]], "siriushla.si_di_equalize_bpms.main": [[60, 1, 1, "", "BPMsEqualizeSwitching"]], "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching": [[60, 2, 1, "", "DEFAULT_DIR"], [60, 2, 1, "", "EXTS"], [60, 2, 1, "", "EXT_FLT"], [60, 3, 1, "", "create_central_widget"], [60, 3, 1, "", "get_acq_control_widget"], [60, 3, 1, "", "get_analysis_control_widget"], [60, 3, 1, "", "get_application_widget"], [60, 3, 1, "", "get_check_data_widget"], [60, 3, 1, "", "get_plots_widget"], [60, 3, 1, "", "get_saveload_widget"], [60, 3, 1, "", "get_status_widget"], [60, 3, 1, "", "get_update_reforb_widget"], [60, 3, 1, "", "setupui"]], "siriushla.si_di_scraps": [[61, 0, 0, "-", "Scrap_monitor"]], "siriushla.si_di_scraps.Scrap_monitor": [[61, 1, 1, "", "ScraperMonitoring"], [61, 1, 1, "", "ScrapersView"]], "siriushla.si_di_scraps.Scrap_monitor.ScraperMonitoring": [[61, 3, 1, "", "channels"], [61, 3, 1, "", "updateDevWidget"]], "siriushla.si_di_scraps.Scrap_monitor.ScrapersView": [[61, 2, 1, "", "DEVICE_CLASS"], [61, 2, 1, "", "DEVICE_PREFIX"]], "siriushla.si_id_control": [[62, 0, 0, "-", "apu"], [62, 0, 0, "-", "base"], [62, 0, 0, "-", "delta"], [62, 0, 0, "-", "epu"], [62, 0, 0, "-", "id_control"], [62, 0, 0, "-", "papu"], [62, 0, 0, "-", "util"]], "siriushla.si_id_control.apu": [[62, 1, 1, "", "APUAlarmDetails"], [62, 1, 1, "", "APUControlWindow"], [62, 1, 1, "", "APUHardLLDetails"], [62, 1, 1, "", "APUInterlockDetails"], [62, 1, 1, "", "APUSummaryBase"], [62, 1, 1, "", "APUSummaryHeader"], [62, 1, 1, "", "APUSummaryWidget"]], "siriushla.si_id_control.apu.APUSummaryBase": [[62, 2, 1, "", "MODEL_WIDTHS"]], "siriushla.si_id_control.base": [[62, 1, 1, "", "IDCommonControlWindow"], [62, 1, 1, "", "IDCommonDialog"], [62, 1, 1, "", "IDCommonSummaryBase"], [62, 1, 1, "", "IDCommonSummaryHeader"], [62, 1, 1, "", "IDCommonSummaryWidget"]], "siriushla.si_id_control.base.IDCommonSummaryBase": [[62, 2, 1, "", "MODEL_WIDTHS"]], "siriushla.si_id_control.base.IDCommonSummaryWidget": [[62, 3, 1, "", "disable_beamline_control"], [62, 3, 1, "", "enable_beamline_control"]], "siriushla.si_id_control.delta": [[62, 1, 1, "", "DELTAControlWindow"], [62, 1, 1, "", "DELTAControlWindowUtils"], [62, 1, 1, "", "DELTASummaryBase"], [62, 1, 1, "", "DELTASummaryHeader"], [62, 1, 1, "", "DELTASummaryWidget"]], "siriushla.si_id_control.delta.DELTAControlWindowUtils": [[62, 2, 1, "", "AUX_CONTROL_PVS"], [62, 2, 1, "", "MAIN_CONTROL_PVS"], [62, 2, 1, "", "STATUS_PVS"]], "siriushla.si_id_control.delta.DELTASummaryBase": [[62, 2, 1, "", "MODEL_WIDTHS"]], "siriushla.si_id_control.epu": [[62, 1, 1, "", "EPUControlWindow"], [62, 1, 1, "", "EPUDriveDetails"], [62, 1, 1, "", "EPUSummaryBase"], [62, 1, 1, "", "EPUSummaryHeader"], [62, 1, 1, "", "EPUSummaryWidget"]], "siriushla.si_id_control.epu.EPUSummaryBase": [[62, 2, 1, "", "MODEL_WIDTHS"]], "siriushla.si_id_control.id_control": [[62, 1, 1, "", "IDControl"]], "siriushla.si_id_control.id_control.IDControl": [[62, 3, 1, "", "contextMenuEvent"], [62, 3, 1, "", "show_connections"]], "siriushla.si_id_control.papu": [[62, 1, 1, "", "PAPUControlWindow"], [62, 1, 1, "", "PAPUDetails"], [62, 1, 1, "", "PAPUSummaryBase"], [62, 1, 1, "", "PAPUSummaryHeader"], [62, 1, 1, "", "PAPUSummaryWidget"]], "siriushla.si_id_control.papu.PAPUSummaryBase": [[62, 2, 1, "", "MODEL_WIDTHS"]], "siriushla.si_id_control.util": [[62, 5, 1, "", "get_id_icon"]], "siriushla.sirius_application": [[1, 1, 1, "", "SiriusApplication"], [1, 5, 1, "", "excepthook"]], "siriushla.sirius_application.SiriusApplication": [[1, 3, 1, "", "open_window"]], "siriushla.tb_di_slits": [[63, 0, 0, "-", "Slit_monitor"]], "siriushla.tb_di_slits.Slit_monitor": [[63, 1, 1, "", "SlitMonitoring"], [63, 1, 1, "", "SlitsView"]], "siriushla.tb_di_slits.Slit_monitor.SlitMonitoring": [[63, 3, 1, "", "channels"], [63, 3, 1, "", "updateDevWidget"]], "siriushla.tb_di_slits.Slit_monitor.SlitsView": [[63, 2, 1, "", "DEVICE_CLASS"], [63, 2, 1, "", "DEVICE_PREFIX"]], "siriushla.util": [[1, 1, 1, "", "LoadingDialog"], [1, 1, 1, "", "LoadingThread"], [1, 5, 1, "", "check_process"], [1, 5, 1, "", "check_window_by_pid"], [1, 5, 1, "", "connect_newprocess"], [1, 5, 1, "", "connect_window"], [1, 5, 1, "", "get_appropriate_color"], [1, 5, 1, "", "get_appropriate_signal"], [1, 5, 1, "", "get_monitor_icon"], [1, 5, 1, "", "get_package_version"], [1, 5, 1, "", "get_window_id"], [1, 5, 1, "", "run_newprocess"], [1, 5, 1, "", "set_style"]], "siriushla.util.LoadingThread": [[1, 2, 1, "", "closemessage"], [1, 2, 1, "", "openmessage"], [1, 3, 1, "", "run"]], "siriushla.widgets": [[64, 0, 0, "-", "QDoubleScrollBar"], [64, 0, 0, "-", "QLed"], [64, 0, 0, "-", "QSpinBoxPlus"], [64, 0, 0, "-", "bar_graph"], [64, 0, 0, "-", "detachable_tabwidget"], [65, 0, 0, "-", "dialog"], [64, 0, 0, "-", "enum_combo_box"], [64, 0, 0, "-", "frame"], [64, 0, 0, "-", "horizontal_ruler"], [64, 0, 0, "-", "label"], [64, 0, 0, "-", "led"], [64, 0, 0, "-", "ledit_scrollbar"], [64, 0, 0, "-", "line_edit"], [64, 0, 0, "-", "loading_dialog"], [64, 0, 0, "-", "log_display"], [64, 0, 0, "-", "log_label"], [64, 0, 0, "-", "matplotlib"], [64, 0, 0, "-", "process_image"], [64, 0, 0, "-", "pushbutton"], [64, 0, 0, "-", "pvnames_tree"], [64, 0, 0, "-", "qtplugins"], [64, 0, 0, "-", "relative_widget"], [64, 0, 0, "-", "scrollbar"], [64, 0, 0, "-", "selection_matrix"], [64, 0, 0, "-", "signal_channel"], [64, 0, 0, "-", "spectrogram_view"], [64, 0, 0, "-", "spinbox"], [64, 0, 0, "-", "spinbox_scrollbar"], [64, 0, 0, "-", "state_button"], [64, 0, 0, "-", "string_combo_box"], [64, 0, 0, "-", "timeplot"], [64, 0, 0, "-", "waveformplot"], [64, 0, 0, "-", "waveformtable"], [64, 0, 0, "-", "widget_factory"], [64, 0, 0, "-", "windows"]], "siriushla.widgets.QDoubleScrollBar": [[64, 1, 1, "", "QDoubleScrollBar"]], "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar": [[64, 3, 1, "", "contextMenuEvent"], [64, 2, 1, "", "decimals"], [64, 3, 1, "", "dialogPageStep"], [64, 3, 1, "", "dialogSingleStep"], [64, 3, 1, "", "getDecimals"], [64, 3, 1, "", "getMaximum"], [64, 3, 1, "", "getMinimum"], [64, 3, 1, "", "getPageStep"], [64, 3, 1, "", "getSingleStep"], [64, 3, 1, "", "getSliderPosition"], [64, 3, 1, "", "getValue"], [64, 3, 1, "", "keyPressEvent"], [64, 2, 1, "", "maximum"], [64, 2, 1, "", "minimum"], [64, 2, 1, "", "pageStep"], [64, 2, 1, "", "rangeChanged"], [64, 3, 1, "", "setDecimals"], [64, 3, 1, "", "setMaximum"], [64, 3, 1, "", "setMinimum"], [64, 3, 1, "", "setPageStep"], [64, 3, 1, "", "setRange"], [64, 3, 1, "", "setSingleStep"], [64, 3, 1, "", "setSliderPosition"], [64, 3, 1, "", "setValue"], [64, 2, 1, "", "singleStep"], [64, 2, 1, "", "sliderMoved"], [64, 2, 1, "", "sliderPosition"], [64, 2, 1, "", "value"], [64, 2, 1, "", "valueChanged"]], "siriushla.widgets.QLed": [[64, 1, 1, "", "QLed"], [64, 1, 1, "", "ShapeMap"]], "siriushla.widgets.QLed.QLed": [[64, 2, 1, "", "Blue"], [64, 2, 1, "", "DarkGreen"], [64, 2, 1, "", "DarkRed"], [64, 2, 1, "", "Gray"], [64, 2, 1, "", "Green"], [64, 2, 1, "", "LightGreen"], [64, 2, 1, "", "NotSelColor1"], [64, 2, 1, "", "NotSelColor2"], [64, 2, 1, "", "Red"], [64, 2, 1, "", "SelColor"], [64, 1, 1, "", "ShapeMap"], [64, 2, 1, "", "Yellow"], [64, 2, 1, "", "abspath"], [64, 3, 1, "", "adjust"], [64, 2, 1, "", "clicked"], [64, 2, 1, "", "dsblColor"], [64, 2, 1, "", "f"], [64, 3, 1, "", "getDsblColor"], [64, 3, 1, "", "getOffColor"], [64, 3, 1, "", "getOnColor"], [64, 3, 1, "", "getRGBfromQColor"], [64, 3, 1, "", "getShape"], [64, 3, 1, "", "getState"], [64, 3, 1, "", "isSelected"], [64, 3, 1, "", "mousePressEvent"], [64, 3, 1, "", "mouseReleaseEvent"], [64, 2, 1, "", "offColor"], [64, 2, 1, "", "onColor"], [64, 3, 1, "", "paintEvent"], [64, 2, 1, "", "selected"], [64, 3, 1, "", "setDsblColor"], [64, 3, 1, "", "setOffColor"], [64, 3, 1, "", "setOnColor"], [64, 3, 1, "", "setSelected"], [64, 3, 1, "", "setShape"], [64, 3, 1, "", "setState"], [64, 2, 1, "", "shape"], [64, 2, 1, "", "shapesdict"], [64, 3, 1, "", "sizeHint"], [64, 2, 1, "", "state"], [64, 4, 1, "", "stateColors"], [64, 3, 1, "", "toggleSelected"], [64, 3, 1, "", "toggleState"]], "siriushla.widgets.QLed.QLed.ShapeMap": [[64, 2, 1, "", "Circle"], [64, 2, 1, "", "Rectangle"], [64, 2, 1, "", "Round"], [64, 2, 1, "", "Square"], [64, 2, 1, "", "Triangle"]], "siriushla.widgets.QLed.ShapeMap": [[64, 2, 1, "", "Circle"], [64, 2, 1, "", "Rectangle"], [64, 2, 1, "", "Round"], [64, 2, 1, "", "Square"], [64, 2, 1, "", "Triangle"]], "siriushla.widgets.QSpinBoxPlus": [[64, 2, 1, "", "QDoubleSpinBoxPlus"], [64, 2, 1, "", "QSpinBoxPlus"]], "siriushla.widgets.bar_graph": [[64, 1, 1, "", "BarGraphModel"], [64, 1, 1, "", "BarGraphWidget"], [64, 1, 1, "", "BaseBarGraphWidget"], [64, 1, 1, "", "EpicsBarGraphModel"], [64, 1, 1, "", "PyDMBarGraph"], [64, 1, 1, "", "PyDMBarGraphModel"]], "siriushla.widgets.bar_graph.BarGraphModel": [[64, 3, 1, "", "connected"], [64, 4, 1, "", "size"], [64, 4, 1, "", "waveform"]], "siriushla.widgets.bar_graph.BarGraphWidget": [[64, 3, 1, "", "set_waveform"]], "siriushla.widgets.bar_graph.BaseBarGraphWidget": [[64, 3, 1, "", "set_brush"], [64, 3, 1, "", "set_scale"], [64, 3, 1, "", "set_width"], [64, 3, 1, "", "sizeHint"]], "siriushla.widgets.bar_graph.EpicsBarGraphModel": [[64, 2, 1, "", "TIMEOUT"], [64, 4, 1, "", "connected"], [64, 4, 1, "", "pvname"], [64, 4, 1, "", "size"], [64, 4, 1, "", "waveform"]], "siriushla.widgets.bar_graph.PyDMBarGraph": [[64, 3, 1, "", "channels"], [64, 3, 1, "", "set_update_interval"], [64, 3, 1, "", "start"], [64, 3, 1, "", "stop"]], "siriushla.widgets.bar_graph.PyDMBarGraphModel": [[64, 3, 1, "", "channels"], [64, 4, 1, "", "connected"], [64, 3, 1, "", "connectionChanged"], [64, 4, 1, "", "size"], [64, 3, 1, "", "valueChanged"], [64, 4, 1, "", "waveform"]], "siriushla.widgets.detachable_tabwidget": [[64, 1, 1, "", "DetachableTabWidget"], [64, 1, 1, "", "DetachedTab"], [64, 1, 1, "", "TabBar"]], "siriushla.widgets.detachable_tabwidget.DetachableTabWidget": [[64, 3, 1, "", "attachTab"], [64, 3, 1, "", "attachTabSlot"], [64, 3, 1, "", "closeDetachedTabs"], [64, 3, 1, "", "detachTab"]], "siriushla.widgets.detachable_tabwidget.DetachedTab": [[64, 3, 1, "", "closeEvent"], [64, 3, 1, "", "do_close"], [64, 2, 1, "", "onAttachSignal"]], "siriushla.widgets.detachable_tabwidget.TabBar": [[64, 3, 1, "", "mouseDoubleClickEvent"], [64, 2, 1, "", "onDetachTabSignal"]], "siriushla.widgets.dialog": [[65, 0, 0, "-", "progress_dialog"], [65, 0, 0, "-", "ps_status_dialog"], [65, 0, 0, "-", "pv_status_dialog"], [65, 0, 0, "-", "report_dialog"]], "siriushla.widgets.dialog.progress_dialog": [[65, 1, 1, "", "ProgressDialog"]], "siriushla.widgets.dialog.progress_dialog.ProgressDialog": [[65, 2, 1, "", "canceled"], [65, 3, 1, "", "exec_"], [65, 3, 1, "", "inc_value"], [65, 3, 1, "", "set_value"]], "siriushla.widgets.dialog.ps_status_dialog": [[65, 1, 1, "", "PSList"], [65, 1, 1, "", "PSStatusDialog"]], "siriushla.widgets.dialog.ps_status_dialog.PSList": [[65, 4, 1, "", "pwrsupplies"]], "siriushla.widgets.dialog.pv_status_dialog": [[65, 1, 1, "", "StatusDetailDialog"]], "siriushla.widgets.dialog.report_dialog": [[65, 1, 1, "", "ReportDialog"]], "siriushla.widgets.enum_combo_box": [[64, 1, 1, "", "SiriusEnumComboBox"]], "siriushla.widgets.enum_combo_box.SiriusEnumComboBox": [[64, 3, 1, "", "wheelEvent"]], "siriushla.widgets.frame": [[64, 1, 1, "", "SiriusAlarmFrame"], [64, 1, 1, "", "SiriusFrame"]], "siriushla.widgets.frame.SiriusAlarmFrame": [[64, 3, 1, "", "alarm_severity_changed"], [64, 2, 1, "", "default_colorlist"]], "siriushla.widgets.frame.SiriusFrame": [[64, 2, 1, "", "default_colorlist"], [64, 3, 1, "", "value_changed"]], "siriushla.widgets.horizontal_ruler": [[64, 1, 1, "", "HorizontalRuler"]], "siriushla.widgets.horizontal_ruler.HorizontalRuler": [[64, 3, 1, "", "setHeight"]], "siriushla.widgets.label": [[64, 1, 1, "", "CALabel"], [64, 1, 1, "", "SiriusLabel"]], "siriushla.widgets.label.SiriusLabel": [[64, 1, 1, "", "DisplayFormat"], [64, 2, 1, "", "displayFormat"], [64, 3, 1, "", "update_format_string"], [64, 3, 1, "", "value_changed"]], "siriushla.widgets.label.SiriusLabel.DisplayFormat": [[64, 2, 1, "", "BSMPUDCVersion"], [64, 2, 1, "", "Binary"], [64, 2, 1, "", "Decimal"], [64, 2, 1, "", "Default"], [64, 2, 1, "", "Exponential"], [64, 2, 1, "", "Hex"], [64, 2, 1, "", "String"], [64, 2, 1, "", "Time"]], "siriushla.widgets.led": [[64, 1, 1, "", "MultiChannelStatusDialog"], [64, 1, 1, "", "PyDMLed"], [64, 1, 1, "", "PyDMLedMultiChannel"], [64, 1, 1, "", "PyDMLedMultiConnection"], [64, 1, 1, "", "SiriusLedAlert"], [64, 1, 1, "", "SiriusLedState"]], "siriushla.widgets.led.PyDMLed": [[64, 2, 1, "", "default_colorlist"], [64, 2, 1, "", "pvbit"], [64, 3, 1, "", "value_changed"]], "siriushla.widgets.led.PyDMLedMultiChannel": [[64, 4, 1, "", "channels2status"], [64, 4, 1, "", "channels2values"], [64, 3, 1, "", "connection_changed"], [64, 2, 1, "", "default_colorlist"], [64, 3, 1, "", "mouseDoubleClickEvent"], [64, 2, 1, "", "normal"], [64, 3, 1, "", "set_channels2values"], [64, 3, 1, "", "value_changed"], [64, 2, 1, "", "warning"]], "siriushla.widgets.led.PyDMLedMultiConnection": [[64, 4, 1, "", "channels2conn"], [64, 3, 1, "", "connection_changed"], [64, 2, 1, "", "default_colorlist"], [64, 3, 1, "", "mouseDoubleClickEvent"], [64, 2, 1, "", "normal"], [64, 3, 1, "", "set_channels"], [64, 2, 1, "", "warning"]], "siriushla.widgets.led.SiriusLedAlert": [[64, 3, 1, "", "value_changed"]], "siriushla.widgets.led.SiriusLedState": [[64, 3, 1, "", "value_changed"]], "siriushla.widgets.ledit_scrollbar": [[64, 1, 1, "", "PyDMLinEditScrollbar"]], "siriushla.widgets.ledit_scrollbar.PyDMLinEditScrollbar": [[64, 3, 1, "", "paintEvent"]], "siriushla.widgets.line_edit": [[64, 1, 1, "", "SiriusLineEdit"], [64, 1, 1, "", "SiriusWaveformLineEdit"]], "siriushla.widgets.line_edit.SiriusLineEdit": [[64, 3, 1, "", "update_format_string"]], "siriushla.widgets.line_edit.SiriusWaveformLineEdit": [[64, 3, 1, "", "value_changed"]], "siriushla.widgets.loading_dialog": [[64, 1, 1, "", "LoadingDialog"]], "siriushla.widgets.loading_dialog.LoadingDialog": [[64, 3, 1, "", "closeEvent"], [64, 3, 1, "", "done"], [64, 3, 1, "", "update"]], "siriushla.widgets.log_display": [[64, 1, 1, "", "SiriusGuiHandler"], [64, 1, 1, "", "SiriusLogDisplay"]], "siriushla.widgets.log_display.SiriusGuiHandler": [[64, 3, 1, "", "emit"], [64, 2, 1, "", "message"]], "siriushla.widgets.log_display.SiriusLogDisplay": [[64, 2, 1, "", "Colors"], [64, 3, 1, "", "writehtml"]], "siriushla.widgets.log_label": [[64, 1, 1, "", "PyDMLogLabel"]], "siriushla.widgets.log_label.PyDMLogLabel": [[64, 1, 1, "", "DisplayFormat"], [64, 2, 1, "", "bufferSize"], [64, 2, 1, "", "dateTimeFmt"], [64, 2, 1, "", "displayFormat"], [64, 2, 1, "", "errorcolor"], [64, 2, 1, "", "prependDateTime"], [64, 3, 1, "", "value_changed"], [64, 2, 1, "", "warncolor"]], "siriushla.widgets.log_label.PyDMLogLabel.DisplayFormat": [[64, 2, 1, "", "BSMPUDCVersion"], [64, 2, 1, "", "Binary"], [64, 2, 1, "", "Decimal"], [64, 2, 1, "", "Default"], [64, 2, 1, "", "Exponential"], [64, 2, 1, "", "Hex"], [64, 2, 1, "", "String"], [64, 2, 1, "", "Time"]], "siriushla.widgets.matplotlib": [[64, 1, 1, "", "MatplotlibCanvas"], [64, 1, 1, "", "MatplotlibWidget"]], "siriushla.widgets.matplotlib.MatplotlibCanvas": [[64, 3, 1, "", "changeEvent"]], "siriushla.widgets.process_image": [[64, 1, 1, "", "SiriusProcessImage"]], "siriushla.widgets.pushbutton": [[64, 1, 1, "", "CAPushButton"], [64, 1, 1, "", "SiriusPushButton"]], "siriushla.widgets.pushbutton.SiriusPushButton": [[64, 2, 1, "", "releaseValue"], [64, 3, 1, "", "sendReleaseValue"]], "siriushla.widgets.pvnames_tree": [[64, 1, 1, "", "BuildTree"], [64, 1, 1, "", "PVNameTree"], [64, 1, 1, "", "QTreeItem"], [64, 1, 1, "", "Tree"]], "siriushla.widgets.pvnames_tree.BuildTree": [[64, 2, 1, "", "completed"], [64, 2, 1, "", "currentItem"], [64, 3, 1, "", "exit_task"], [64, 2, 1, "", "itemDone"], [64, 3, 1, "", "run"], [64, 3, 1, "", "size"]], "siriushla.widgets.pvnames_tree.PVNameTree": [[64, 3, 1, "", "check_all"], [64, 3, 1, "", "check_requested_levels"], [64, 3, 1, "", "checked_items"], [64, 3, 1, "", "clear"], [64, 3, 1, "", "collapse_all"], [64, 3, 1, "", "contextMenuEvent"], [64, 3, 1, "", "expand_all"], [64, 2, 1, "", "itemChecked"], [64, 4, 1, "", "items"], [64, 3, 1, "", "mag_group"], [64, 4, 1, "", "message"], [64, 3, 1, "", "sizeHint"], [64, 3, 1, "", "uncheck_all"], [64, 2, 1, "", "updateItemCheckedCount"]], "siriushla.widgets.pvnames_tree.QTreeItem": [[64, 3, 1, "", "childChecked"], [64, 3, 1, "", "childHidden"], [64, 3, 1, "", "isLeaf"], [64, 4, 1, "", "myhash"], [64, 3, 1, "", "setData"], [64, 3, 1, "", "setHidden"]], "siriushla.widgets.pvnames_tree.Tree": [[64, 3, 1, "", "resizeEvent"]], "siriushla.widgets.relative_widget": [[64, 1, 1, "", "RelativeWidget"]], "siriushla.widgets.relative_widget.RelativeWidget": [[64, 3, 1, "", "relativeResize"]], "siriushla.widgets.scrollbar": [[64, 1, 1, "", "PyDMScrollBar"]], "siriushla.widgets.scrollbar.PyDMScrollBar": [[64, 2, 1, "", "connected_signal"], [64, 3, 1, "", "ctrl_limit_changed"], [64, 2, 1, "", "disconnected_signal"], [64, 3, 1, "", "precision_changed"], [64, 3, 1, "", "send_value"], [64, 2, 1, "", "value_changed_signal"], [64, 3, 1, "", "widget_ctx_menu"]], "siriushla.widgets.selection_matrix": [[64, 1, 1, "", "SelectionMatrixWidget"]], "siriushla.widgets.selection_matrix.SelectionMatrixWidget": [[64, 2, 1, "", "applyBothPlanesClicked"], [64, 2, 1, "", "applyChangesClicked"], [64, 3, 1, "", "get_headers"], [64, 3, 1, "", "get_positions"], [64, 3, 1, "", "get_widgets"], [64, 4, 1, "", "header_widgets"], [64, 4, 1, "", "headers"], [64, 3, 1, "", "mouseMoveEvent"], [64, 3, 1, "", "mousePressEvent"], [64, 3, 1, "", "mouseReleaseEvent"], [64, 3, 1, "", "paintEvent"], [64, 4, 1, "", "positions"], [64, 3, 1, "", "selectItems"], [64, 3, 1, "", "selectWidgetsAt"], [64, 3, 1, "", "toggleAllItems"], [64, 3, 1, "", "undoItemsSelection"], [64, 4, 1, "", "widgets"]], "siriushla.widgets.signal_channel": [[64, 1, 1, "", "SiriusConnectionSignal"]], "siriushla.widgets.signal_channel.SiriusConnectionSignal": [[64, 2, 1, "", "connection_state_signal"], [64, 2, 1, "", "enum_strings_signal"], [64, 3, 1, "", "getvalue"], [64, 2, 1, "", "lower_ctrl_limit_signal"], [64, 2, 1, "", "new_severity_signal"], [64, 2, 1, "", "new_value_signal"], [64, 2, 1, "", "prec_signal"], [64, 2, 1, "", "send_value_signal"], [64, 2, 1, "", "unit_signal"], [64, 2, 1, "", "upper_ctrl_limit_signal"], [64, 4, 1, "", "value"], [64, 2, 1, "", "write_access_signal"]], "siriushla.widgets.spectrogram_view": [[64, 1, 1, "", "SiriusSpectrogramView"], [64, 1, 1, "", "SpectrogramUpdateThread"]], "siriushla.widgets.spectrogram_view.SiriusSpectrogramView": [[64, 2, 1, "", "ROIHeight"], [64, 2, 1, "", "ROIHeightChannel"], [64, 2, 1, "", "ROIOffsetX"], [64, 2, 1, "", "ROIOffsetXChannel"], [64, 2, 1, "", "ROIOffsetY"], [64, 2, 1, "", "ROIOffsetYChannel"], [64, 2, 1, "", "ROIWidth"], [64, 2, 1, "", "ROIWidthChannel"], [64, 2, 1, "", "autoDownsample"], [64, 2, 1, "", "autoSetColorbarLims"], [64, 3, 1, "", "channels"], [64, 3, 1, "", "channels_for_tools"], [64, 2, 1, "", "colorMap"], [64, 2, 1, "", "colorMapMax"], [64, 2, 1, "", "colorMapMin"], [64, 2, 1, "", "color_maps"], [64, 2, 1, "", "imageChannel"], [64, 2, 1, "", "imageHeight"], [64, 2, 1, "", "imageWidth"], [64, 3, 1, "", "image_connection_state_changed"], [64, 3, 1, "", "image_value_changed"], [64, 3, 1, "", "keyPressEvent"], [64, 2, 1, "", "maxRedrawRate"], [64, 3, 1, "", "mouseMoveEvent"], [64, 2, 1, "", "normalizeData"], [64, 3, 1, "", "process_image"], [64, 2, 1, "", "readingOrder"], [64, 3, 1, "", "redrawImage"], [64, 3, 1, "", "redrawROI"], [64, 3, 1, "", "roiheight_connection_state_changed"], [64, 3, 1, "", "roiheight_value_changed"], [64, 3, 1, "", "roioffsetx_connection_state_changed"], [64, 3, 1, "", "roioffsetx_value_changed"], [64, 3, 1, "", "roioffsety_connection_state_changed"], [64, 3, 1, "", "roioffsety_value_changed"], [64, 3, 1, "", "roiwidth_connection_state_changed"], [64, 3, 1, "", "roiwidth_value_changed"], [64, 3, 1, "", "setColorMap"], [64, 3, 1, "", "setColorMapLimits"], [64, 3, 1, "", "showROI"], [64, 2, 1, "", "xAxisChannel"], [64, 3, 1, "", "xaxis_value_changed"], [64, 2, 1, "", "yAxisChannel"], [64, 3, 1, "", "yaxis_connection_state_changed"], [64, 3, 1, "", "yaxis_value_changed"]], "siriushla.widgets.spectrogram_view.SpectrogramUpdateThread": [[64, 3, 1, "", "run"], [64, 2, 1, "", "updateSignal"]], "siriushla.widgets.spinbox": [[64, 1, 1, "", "SiriusHexaSpinbox"], [64, 1, 1, "", "SiriusSpinbox"]], "siriushla.widgets.spinbox.SiriusHexaSpinbox": [[64, 3, 1, "", "textFromValue"], [64, 3, 1, "", "update_format_string"], [64, 3, 1, "", "update_step_size"], [64, 3, 1, "", "validate"], [64, 3, 1, "", "valueFromText"]], "siriushla.widgets.spinbox.SiriusSpinbox": [[64, 3, 1, "", "ctrl_limit_changed"], [64, 3, 1, "", "focusOutEvent"], [64, 3, 1, "", "get_user_limits"], [64, 2, 1, "", "limitsFromChannel"], [64, 3, 1, "", "precision_changed"], [64, 3, 1, "", "setMaximum"], [64, 3, 1, "", "setMinimum"], [64, 3, 1, "", "setRange"], [64, 3, 1, "", "update_limits"], [64, 3, 1, "", "wheelEvent"]], "siriushla.widgets.spinbox_scrollbar": [[64, 1, 1, "", "PyDMSpinboxScrollbar"]], "siriushla.widgets.state_button": [[64, 1, 1, "", "PyDMStateButton"]], "siriushla.widgets.state_button.PyDMStateButton": [[64, 2, 1, "", "DEFAULT_CONFIRM_MESSAGE"], [64, 2, 1, "", "Rounded"], [64, 2, 1, "", "Squared"], [64, 1, 1, "", "buttonShapeMap"], [64, 2, 1, "", "clicked"], [64, 2, 1, "", "confirmMessage"], [64, 3, 1, "", "confirm_dialog"], [64, 2, 1, "", "f"], [64, 2, 1, "", "invert"], [64, 3, 1, "", "mouseReleaseEvent"], [64, 3, 1, "", "paintEvent"], [64, 2, 1, "", "password"], [64, 2, 1, "", "passwordProtected"], [64, 2, 1, "", "path"], [64, 2, 1, "", "protectedPassword"], [64, 2, 1, "", "pvbit"], [64, 2, 1, "", "roundedbuttonstatesdict"], [64, 3, 1, "", "send_value"], [64, 2, 1, "", "shape"], [64, 2, 1, "", "showConfirmDialog"], [64, 3, 1, "", "sizeHint"], [64, 2, 1, "", "squaredbuttonstatesdict"], [64, 3, 1, "", "validate_password"], [64, 3, 1, "", "value_changed"]], "siriushla.widgets.state_button.PyDMStateButton.buttonShapeMap": [[64, 2, 1, "", "Rounded"], [64, 2, 1, "", "Squared"]], "siriushla.widgets.string_combo_box": [[64, 1, 1, "", "SiriusStringComboBox"]], "siriushla.widgets.string_combo_box.SiriusStringComboBox": [[64, 3, 1, "", "check_enable_state"], [64, 3, 1, "", "set_items"], [64, 3, 1, "", "value_changed"]], "siriushla.widgets.timeplot": [[64, 1, 1, "", "SiriusTimePlot"], [64, 1, 1, "", "SiriusTimePlotItem"]], "siriushla.widgets.timeplot.SiriusTimePlot": [[64, 3, 1, "", "addCurve"], [64, 3, 1, "", "addYChannel"], [64, 2, 1, "", "bufferReset"], [64, 3, 1, "", "fill_curve_buffer"], [64, 3, 1, "", "fill_curve_with_archdata"], [64, 4, 1, "", "legend"], [64, 2, 1, "", "showToolTip"], [64, 2, 1, "", "timeSpanChanged"], [64, 3, 1, "", "updateXAxis"]], "siriushla.widgets.timeplot.SiriusTimePlotItem": [[64, 3, 1, "", "initialize_buffer"], [64, 3, 1, "", "receiveNewValue"], [64, 3, 1, "", "redrawCurve"], [64, 3, 1, "", "setBufferSize"]], "siriushla.widgets.waveformplot": [[64, 1, 1, "", "SiriusWaveformPlot"]], "siriushla.widgets.waveformplot.SiriusWaveformPlot": [[64, 4, 1, "", "legend"]], "siriushla.widgets.waveformtable": [[64, 1, 1, "", "SiriusWaveformTable"]], "siriushla.widgets.waveformtable.SiriusWaveformTable": [[64, 3, 1, "", "value_changed"]], "siriushla.widgets.widget_factory": [[64, 5, 1, "", "pydmwidget_factory"]], "siriushla.widgets.windows": [[64, 2, 1, "", "SiriusDialog"], [64, 2, 1, "", "SiriusMainWindow"], [64, 5, 1, "", "create_window_from_widget"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:attribute", "3": "py:method", "4": "py:property", "5": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "method", "Python method"], "4": ["py", "property", "Python property"], "5": ["py", "function", "Python function"]}, "titleterms": {"welcom": 0, "siriu": [0, 1], "hla": [0, 1], "": 0, "document": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "gui": 0, "widget": [0, 10, 12, 38, 53, 54, 64, 65], "sourc": 0, "code": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "siriushla": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "sirius_appl": 1, "modul": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "util": [1, 16, 19, 28, 35, 37, 39, 48, 50, 53, 54, 57, 59, 62], "as_ap_configdb": [2, 3, 4, 5, 6], "subpackag": [2, 5, 21, 31, 41, 45, 64], "client_configdb": 2, "configdialog": 2, "configwidget": 2, "content": [2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "model": 3, "config_db_table_model": 3, "config_names_model": 3, "config_types_model": 3, "pv_configuration_model": 3, "normconfig": 4, "configmanagerwindow": 4, "configmodel": 4, "loadingthread": 4, "tunedlg": 4, "pvsconfig": [5, 6], "load_and_appli": 5, "main": [5, 10, 11, 13, 14, 16, 17, 19, 20, 21, 23, 24, 25, 27, 28, 29, 30, 35, 39, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60], "read_and_sav": 5, "deleg": 6, "pv_configuration_deleg": 6, "as_ap_currinfo": 7, "charge_monitor": 7, "current_and_lifetim": 7, "efficiency_monitor": 7, "as_ap_energybutton": 8, "energy_button": 8, "energy_setter_window": 8, "set_energi": 8, "as_ap_injcontrol": 9, "base": [9, 22, 23, 24, 38, 42, 43, 44, 55, 58, 62], "injbo": 9, "tbt": 9, "as_ap_inject": 10, "auxiliary_dialog": [10, 40, 52], "killbeam_widget": 10, "as_ap_launch": 11, "menu": [11, 40], "as_ap_machshift": 12, "as_ap_macreport": 13, "as_ap_magoffconv": 14, "as_ap_measur": 15, "emittance_mea": 15, "energy_mea": 15, "as_ap_monitor": 16, "as_ap_opticscorr": 17, "custom_widget": [17, 19, 33, 37, 40, 55, 57, 58, 59], "detail": [17, 28, 37, 44, 53, 54], "as_ap_posang": 18, "hlposang": 18, "as_ap_rabpmmon": 19, "as_ap_radmon": 20, "as_ap_sofb": [21, 22, 23], "orbit_regist": 21, "graphic": [22, 25, 55, 58], "corrector": 22, "orbit": 22, "respmat": [22, 23, 55], "ioc_control": 23, "drive_window": 23, "kicks_config": 23, "orbit_acquisit": 23, "respmat_enbllist": 23, "statu": 23, "as_di_bpm": 24, "list_bpm": 24, "monit": 24, "set": [24, 25, 43], "trig_acq_config": [24, 55], "as_di_dcct": 25, "as_di_ict": 26, "ict_monitor": 26, "as_di_scrn": 27, "list_scrn": 27, "scrn_calib": 27, "scrn_detail": 27, "as_di_tun": 28, "control": [28, 37, 53], "spectra": 28, "spectrogram": 28, "as_di_vlight": 29, "as_ps_command": 30, "task": [30, 34, 46], "as_ps_control": [31, 32, 33], "pscontrolwindow": 31, "psdetailwindow": 31, "pstabcontrolwindow": 31, "pstrimwindow": 31, "summarywidget": 31, "ps_wfmerror_mon": 31, "control_widget": 32, "basepscontrolwidget": 32, "controlwidgetfactori": 32, "dipolecontrolwidget": 32, "famquadrupolecontrolwidget": 32, "famsextupolecontrolwidget": 32, "fastcorrectorcontrolwidget": 32, "idffcorrectorcontrolwidget": 32, "lenscontrolwidget": 32, "septffcorrectorcontrolwidget": 32, "skewquadcontrolwidget": 32, "slowcorrectorcontrolwidget": 32, "solenoidcontrolwidget": 32, "trimallcontrolwidget": 32, "trimfamcontrolwidget": 32, "detail_widget": 33, "detailwidgetfactori": 33, "interlockwindow": 33, "psdetailwidget": 33, "as_ps_cycl": 34, "cycle_window": 34, "as_ps_diag": 35, "monitor": [35, 38, 48], "ps_graph_mon": 35, "as_pu_control": 36, "controlwindow": 36, "detailwidget": 36, "detailwindow": 36, "as_rf_control": 37, "as_ti_control": 38, "hl_trigger": 38, "hltime": 38, "low_level_devic": 38, "bl_ap_imgproc": 39, "blintlkctl": 39, "imag": 39, "bo_ap_ramp": 40, "bonormalized_edit": 40, "boramp_edit": 40, "main_window": 40, "status_and_command": 40, "common": [41, 42, 43, 44, 45, 46, 47], "afc_acq_cor": 42, "trigger": 42, "cam_basl": 43, "diff_ctrl": 44, "epic": [45, 46, 47], "checker": 46, "connector": 46, "getter": 46, "setter": 46, "wait": 46, "wrapper": 47, "pyepic": 47, "li_ap_mp": 48, "bypass_btn": 48, "li_di_bpm": 49, "bpm_main": 49, "li_di_scrn": 50, "motorbtn": 50, "li_eg_control": 51, "li_pu_modltr": 52, "li_rf_llrf": 53, "chart": [53, 54], "motor_control": 53, "li_va_control": 54, "function": 54, "si_ap_fofb": 55, "si_ap_genstatu": 56, "si_ap_idff": 57, "si_ap_orbintlk": 58, "bpmdetail": 58, "si_di_bbb": 59, "acquisit": 59, "advanced_set": 59, "bbb": 59, "coeffici": 59, "drive": 59, "environ": 59, "gpio": 59, "mask": 59, "pwr_amp": 59, "time": 59, "si_di_equalize_bpm": 60, "si_di_scrap": 61, "scrap_monitor": 61, "si_id_control": 62, "apu": 62, "delta": 62, "epu": 62, "id_control": 62, "papu": 62, "tb_di_slit": 63, "slit_monitor": 63, "qdoublescrollbar": 64, "qled": 64, "qspinboxplu": 64, "bar_graph": 64, "detachable_tabwidget": 64, "enum_combo_box": 64, "frame": 64, "horizontal_rul": 64, "label": 64, "led": 64, "ledit_scrollbar": 64, "line_edit": 64, "loading_dialog": 64, "log_displai": 64, "log_label": 64, "matplotlib": 64, "process_imag": 64, "pushbutton": 64, "pvnames_tre": 64, "qtplugin": 64, "relative_widget": 64, "scrollbar": 64, "selection_matrix": 64, "signal_channel": 64, "spectrogram_view": 64, "spinbox": 64, "spinbox_scrollbar": 64, "state_button": 64, "string_combo_box": 64, "timeplot": 64, "waveformplot": 64, "waveformt": 64, "widget_factori": 64, "window": 64, "dialog": 65, "progress_dialog": 65, "ps_status_dialog": 65, "pv_status_dialog": 65, "report_dialog": 65}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 60}, "alltitles": {"Welcome to Sirius HLA\u2019s documentation!": [[0, "module-siriushla"]], "GUIs:": [[0, null]], "Widgets:": [[0, null]], "Source Code:": [[0, null]], "Sirius HLA": [[1, "sirius-hla"]], "siriushla.sirius_application module": [[1, "module-siriushla.sirius_application"]], "siriushla.util module": [[1, "module-siriushla.util"]], "siriushla.as_ap_configdb": [[2, "siriushla-as-ap-configdb"]], "Subpackages": [[2, "subpackages"], [5, "subpackages"], [21, "subpackages"], [31, "subpackages"], [41, "subpackages"], [45, "subpackages"], [64, "subpackages"]], "Code Documentation": [[2, "code-documentation"], [3, "code-documentation"], [4, "code-documentation"], [5, "code-documentation"], [6, "code-documentation"], [7, "code-documentation"], [8, "code-documentation"], [9, "code-documentation"], [10, "code-documentation"], [11, "code-documentation"], [12, "code-documentation"], [13, "code-documentation"], [14, "code-documentation"], [15, "code-documentation"], [16, "code-documentation"], [17, "code-documentation"], [18, "code-documentation"], [19, "code-documentation"], [20, "code-documentation"], [21, "code-documentation"], [22, "code-documentation"], [23, "code-documentation"], [24, "code-documentation"], [25, "code-documentation"], [26, "code-documentation"], [27, "code-documentation"], [28, "code-documentation"], [29, "code-documentation"], [30, "code-documentation"], [31, "code-documentation"], [32, "code-documentation"], [33, "code-documentation"], [34, "code-documentation"], [35, "code-documentation"], [36, "code-documentation"], [37, "code-documentation"], [38, "code-documentation"], [39, "code-documentation"], [40, "code-documentation"], [42, "code-documentation"], [43, "code-documentation"], [44, "code-documentation"], [46, "code-documentation"], [47, "code-documentation"], [48, "code-documentation"], [49, "code-documentation"], [50, "code-documentation"], [51, "code-documentation"], [52, "code-documentation"], [53, "code-documentation"], [54, "code-documentation"], [55, "code-documentation"], [56, "code-documentation"], [57, "code-documentation"], [58, "code-documentation"], [59, "code-documentation"], [60, "code-documentation"], [61, "code-documentation"], [62, "code-documentation"], [63, "code-documentation"], [64, "code-documentation"], [65, "code-documentation"]], "siriushla.as_ap_configdb.client_configdb module": [[2, "module-siriushla.as_ap_configdb.client_configdb"]], "siriushla.as_ap_configdb.configdialogs module": [[2, "module-siriushla.as_ap_configdb.configdialogs"]], "siriushla.as_ap_configdb.configwidgets module": [[2, "module-siriushla.as_ap_configdb.configwidgets"]], "Module contents": [[2, "module-siriushla.as_ap_configdb"], [4, "module-siriushla.as_ap_configdb.normconfigs"], [5, "module-siriushla.as_ap_configdb.pvsconfigs"], [6, "module-siriushla.as_ap_configdb.pvsconfigs.delegate"], [7, "module-siriushla.as_ap_currinfo"], [8, "module-siriushla.as_ap_energybutton"], [9, "module-siriushla.as_ap_injcontrol"], [10, "module-siriushla.as_ap_injection"], [11, "module-siriushla.as_ap_launcher"], [12, "module-siriushla.as_ap_machshift"], [13, "module-siriushla.as_ap_macreport"], [14, "module-siriushla.as_ap_magoffconv"], [15, "module-contents"], [16, "module-siriushla.as_ap_monitor"], [17, "module-siriushla.as_ap_opticscorr"], [18, "module-siriushla.as_ap_posang"], [19, "module-contents"], [20, "module-siriushla.as_ap_radmon"], [21, "module-siriushla.as_ap_sofb"], [22, "module-siriushla.as_ap_sofb.graphics"], [23, "module-siriushla.as_ap_sofb.ioc_control"], [24, "module-siriushla.as_di_bpms"], [25, "module-siriushla.as_di_dccts"], [26, "module-siriushla.as_di_icts"], [27, "module-siriushla.as_di_scrns"], [28, "module-siriushla.as_di_tune"], [29, "module-siriushla.as_di_vlight"], [30, "module-siriushla.as_ps_commands"], [31, "module-siriushla.as_ps_control"], [32, "module-siriushla.as_ps_control.control_widget"], [33, "module-siriushla.as_ps_control.detail_widget"], [34, "module-siriushla.as_ps_cycle"], [35, "module-siriushla.as_ps_diag"], [36, "module-siriushla.as_pu_control"], [37, "module-siriushla.as_rf_control"], [38, "module-siriushla.as_ti_control"], [39, "module-siriushla.bl_ap_imgproc"], [40, "module-contents"], [41, "module-siriushla.common"], [42, "module-siriushla.common.afc_acq_core"], [43, "module-siriushla.common.cam_basler"], [44, "module-siriushla.common.diff_ctrl"], [45, "module-siriushla.common.epics"], [46, "module-siriushla.common.epics.task"], [47, "module-siriushla.common.epics.wrapper"], [48, "module-siriushla.li_ap_mps"], [49, "module-siriushla.li_di_bpms"], [50, "module-siriushla.li_di_scrns"], [51, "module-siriushla.li_eg_control"], [52, "module-siriushla.li_pu_modltr"], [53, "module-siriushla.li_rf_llrf"], [54, "module-siriushla.li_va_control"], [55, "module-siriushla.si_ap_fofb"], [56, "module-siriushla.si_ap_genstatus"], [57, "module-siriushla.si_ap_idff"], [58, "module-siriushla.si_ap_orbintlk"], [59, "module-siriushla.si_di_bbb"], [60, "module-siriushla.si_di_equalize_bpms"], [61, "module-siriushla.si_di_scraps"], [62, "module-siriushla.si_id_control"], [63, "module-siriushla.tb_di_slits"], [64, "module-siriushla.widgets"], [65, "module-siriushla.widgets.dialog"]], "siriushla.as_ap_configdb.models": [[3, "module-siriushla.as_ap_configdb.models"]], "siriushla.as_ap_configdb.models.config_db_table_model module": [[3, "module-siriushla.as_ap_configdb.models.config_db_table_model"]], "siriushla.as_ap_configdb.models.config_names_model module": [[3, "module-siriushla.as_ap_configdb.models.config_names_model"]], "siriushla.as_ap_configdb.models.config_types_model module": [[3, "module-siriushla.as_ap_configdb.models.config_types_model"]], "siriushla.as_ap_configdb.models.pv_configuration_model module": [[3, "module-siriushla.as_ap_configdb.models.pv_configuration_model"]], "siriushla.as_ap_configdb.normconfigs": [[4, "siriushla-as-ap-configdb-normconfigs"]], "siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow module": [[4, "module-siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow"]], "siriushla.as_ap_configdb.normconfigs.ConfigModel module": [[4, "module-siriushla.as_ap_configdb.normconfigs.ConfigModel"]], "siriushla.as_ap_configdb.normconfigs.LoadingThread module": [[4, "module-siriushla.as_ap_configdb.normconfigs.LoadingThread"]], "siriushla.as_ap_configdb.normconfigs.TuneDlg module": [[4, "module-siriushla.as_ap_configdb.normconfigs.TuneDlg"]], "siriushla.as_ap_configdb.pvsconfigs": [[5, "siriushla-as-ap-configdb-pvsconfigs"]], "siriushla.as_ap_configdb.pvsconfigs.load_and_apply module": [[5, "module-siriushla.as_ap_configdb.pvsconfigs.load_and_apply"]], "siriushla.as_ap_configdb.pvsconfigs.main module": [[5, "module-siriushla.as_ap_configdb.pvsconfigs.main"]], "siriushla.as_ap_configdb.pvsconfigs.read_and_save module": [[5, "module-siriushla.as_ap_configdb.pvsconfigs.read_and_save"]], "siriushla.as_ap_configdb.pvsconfigs.delegate": [[6, "siriushla-as-ap-configdb-pvsconfigs-delegate"]], "siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate module": [[6, "module-siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate"]], "siriushla.as_ap_currinfo": [[7, "siriushla-as-ap-currinfo"]], "siriushla.as_ap_currinfo.charge_monitor module": [[7, "module-siriushla.as_ap_currinfo.charge_monitor"]], "siriushla.as_ap_currinfo.current_and_lifetime module": [[7, "module-siriushla.as_ap_currinfo.current_and_lifetime"]], "siriushla.as_ap_currinfo.efficiency_monitor module": [[7, "module-siriushla.as_ap_currinfo.efficiency_monitor"]], "siriushla.as_ap_energybutton": [[8, "siriushla-as-ap-energybutton"]], "siriushla.as_ap_energybutton.energy_button module": [[8, "module-siriushla.as_ap_energybutton.energy_button"]], "siriushla.as_ap_energybutton.energy_setter_window module": [[8, "module-siriushla.as_ap_energybutton.energy_setter_window"]], "siriushla.as_ap_energybutton.set_energy module": [[8, "module-siriushla.as_ap_energybutton.set_energy"]], "siriushla.as_ap_injcontrol": [[9, "siriushla-as-ap-injcontrol"]], "siriushla.as_ap_injcontrol.base module": [[9, "module-siriushla.as_ap_injcontrol.base"]], "siriushla.as_ap_injcontrol.injbo module": [[9, "module-siriushla.as_ap_injcontrol.injbo"]], "siriushla.as_ap_injcontrol.tbts module": [[9, "module-siriushla.as_ap_injcontrol.tbts"]], "siriushla.as_ap_injection": [[10, "siriushla-as-ap-injection"]], "siriushla.as_ap_injection.auxiliary_dialogs module": [[10, "module-siriushla.as_ap_injection.auxiliary_dialogs"]], "siriushla.as_ap_injection.killbeam_widgets module": [[10, "module-siriushla.as_ap_injection.killbeam_widgets"]], "siriushla.as_ap_injection.main module": [[10, "module-siriushla.as_ap_injection.main"]], "siriushla.as_ap_injection.widgets module": [[10, "module-siriushla.as_ap_injection.widgets"]], "siriushla.as_ap_launcher": [[11, "siriushla-as-ap-launcher"]], "siriushla.as_ap_launcher.main module": [[11, "module-siriushla.as_ap_launcher.main"]], "siriushla.as_ap_launcher.menu module": [[11, "module-siriushla.as_ap_launcher.menu"]], "siriushla.as_ap_machshift": [[12, "siriushla-as-ap-machshift"]], "siriushla.as_ap_machshift.widgets module": [[12, "module-siriushla.as_ap_machshift.widgets"]], "siriushla.as_ap_macreport": [[13, "siriushla-as-ap-macreport"]], "siriushla.as_ap_macreport.main module": [[13, "module-siriushla.as_ap_macreport.main"]], "siriushla.as_ap_magoffconv": [[14, "siriushla-as-ap-magoffconv"]], "siriushla.as_ap_magoffconv.main module": [[14, "module-siriushla.as_ap_magoffconv.main"]], "siriushla.as_ap_measure": [[15, "siriushla-as-ap-measure"]], "siriushla.as_ap_measure.emittance_meas module": [[15, "siriushla-as-ap-measure-emittance-meas-module"]], "siriushla.as_ap_measure.energy_meas module": [[15, "module-siriushla.as_ap_measure.energy_meas"]], "siriushla.as_ap_monitor": [[16, "siriushla-as-ap-monitor"]], "siriushla.as_ap_monitor.main module": [[16, "module-siriushla.as_ap_monitor.main"]], "siriushla.as_ap_monitor.util module": [[16, "module-siriushla.as_ap_monitor.util"]], "siriushla.as_ap_opticscorr": [[17, "siriushla-as-ap-opticscorr"]], "siriushla.as_ap_opticscorr.custom_widgets module": [[17, "module-siriushla.as_ap_opticscorr.custom_widgets"]], "siriushla.as_ap_opticscorr.details module": [[17, "module-siriushla.as_ap_opticscorr.details"]], "siriushla.as_ap_opticscorr.main module": [[17, "module-siriushla.as_ap_opticscorr.main"]], "siriushla.as_ap_posang": [[18, "siriushla-as-ap-posang"]], "siriushla.as_ap_posang.HLPosAng module": [[18, "module-siriushla.as_ap_posang.HLPosAng"]], "siriushla.as_ap_rabpmmon": [[19, "siriushla-as-ap-rabpmmon"]], "siriushla.as_ap_rabpmmon.custom_widgets module": [[19, "siriushla-as-ap-rabpmmon-custom-widgets-module"]], "siriushla.as_ap_rabpmmon.main module": [[19, "siriushla-as-ap-rabpmmon-main-module"]], "siriushla.as_ap_rabpmmon.util module": [[19, "module-siriushla.as_ap_rabpmmon.util"]], "siriushla.as_ap_radmon": [[20, "siriushla-as-ap-radmon"]], "siriushla.as_ap_radmon.main module": [[20, "module-siriushla.as_ap_radmon.main"]], "siriushla.as_ap_sofb": [[21, "siriushla-as-ap-sofb"]], "siriushla.as_ap_sofb.main module": [[21, "module-siriushla.as_ap_sofb.main"]], "siriushla.as_ap_sofb.orbit_register module": [[21, "module-siriushla.as_ap_sofb.orbit_register"]], "siriushla.as_ap_sofb.graphics": [[22, "siriushla-as-ap-sofb-graphics"]], "siriushla.as_ap_sofb.graphics.base module": [[22, "module-siriushla.as_ap_sofb.graphics.base"]], "siriushla.as_ap_sofb.graphics.correctors module": [[22, "module-siriushla.as_ap_sofb.graphics.correctors"]], "siriushla.as_ap_sofb.graphics.orbit module": [[22, "module-siriushla.as_ap_sofb.graphics.orbit"]], "siriushla.as_ap_sofb.graphics.respmat module": [[22, "module-siriushla.as_ap_sofb.graphics.respmat"]], "siriushla.as_ap_sofb.ioc_control": [[23, "siriushla-as-ap-sofb-ioc-control"]], "siriushla.as_ap_sofb.ioc_control.base module": [[23, "module-siriushla.as_ap_sofb.ioc_control.base"]], "siriushla.as_ap_sofb.ioc_control.drive_window module": [[23, "module-siriushla.as_ap_sofb.ioc_control.drive_window"]], "siriushla.as_ap_sofb.ioc_control.kicks_config module": [[23, "module-siriushla.as_ap_sofb.ioc_control.kicks_config"]], "siriushla.as_ap_sofb.ioc_control.main module": [[23, "module-siriushla.as_ap_sofb.ioc_control.main"]], "siriushla.as_ap_sofb.ioc_control.orbit_acquisition module": [[23, "module-siriushla.as_ap_sofb.ioc_control.orbit_acquisition"]], "siriushla.as_ap_sofb.ioc_control.respmat module": [[23, "module-siriushla.as_ap_sofb.ioc_control.respmat"]], "siriushla.as_ap_sofb.ioc_control.respmat_enbllist module": [[23, "module-siriushla.as_ap_sofb.ioc_control.respmat_enbllist"]], "siriushla.as_ap_sofb.ioc_control.status module": [[23, "module-siriushla.as_ap_sofb.ioc_control.status"]], "siriushla.as_di_bpms": [[24, "siriushla-as-di-bpms"]], "siriushla.as_di_bpms.base module": [[24, "module-siriushla.as_di_bpms.base"]], "siriushla.as_di_bpms.list_bpms module": [[24, "module-siriushla.as_di_bpms.list_bpms"]], "siriushla.as_di_bpms.main module": [[24, "module-siriushla.as_di_bpms.main"]], "siriushla.as_di_bpms.monit module": [[24, "module-siriushla.as_di_bpms.monit"]], "siriushla.as_di_bpms.settings module": [[24, "module-siriushla.as_di_bpms.settings"]], "siriushla.as_di_bpms.trig_acq_config module": [[24, "module-siriushla.as_di_bpms.trig_acq_config"]], "siriushla.as_di_dccts": [[25, "siriushla-as-di-dccts"]], "siriushla.as_di_dccts.graphics module": [[25, "module-siriushla.as_di_dccts.graphics"]], "siriushla.as_di_dccts.main module": [[25, "module-siriushla.as_di_dccts.main"]], "siriushla.as_di_dccts.settings module": [[25, "module-siriushla.as_di_dccts.settings"]], "siriushla.as_di_icts": [[26, "siriushla-as-di-icts"]], "siriushla.as_di_icts.ICT_monitor module": [[26, "module-siriushla.as_di_icts.ICT_monitor"]], "siriushla.as_di_scrns": [[27, "siriushla-as-di-scrns"]], "siriushla.as_di_scrns.list_scrns module": [[27, "module-siriushla.as_di_scrns.list_scrns"]], "siriushla.as_di_scrns.main module": [[27, "module-siriushla.as_di_scrns.main"]], "siriushla.as_di_scrns.scrn_calib module": [[27, "module-siriushla.as_di_scrns.scrn_calib"]], "siriushla.as_di_scrns.scrn_details module": [[27, "module-siriushla.as_di_scrns.scrn_details"]], "siriushla.as_di_tune": [[28, "siriushla-as-di-tune"]], "siriushla.as_di_tune.controls module": [[28, "module-siriushla.as_di_tune.controls"]], "siriushla.as_di_tune.details module": [[28, "module-siriushla.as_di_tune.details"]], "siriushla.as_di_tune.main module": [[28, "module-siriushla.as_di_tune.main"]], "siriushla.as_di_tune.spectra module": [[28, "module-siriushla.as_di_tune.spectra"]], "siriushla.as_di_tune.spectrogram module": [[28, "module-siriushla.as_di_tune.spectrogram"]], "siriushla.as_di_tune.util module": [[28, "module-siriushla.as_di_tune.util"]], "siriushla.as_di_vlight": [[29, "siriushla-as-di-vlight"]], "siriushla.as_di_vlight.main module": [[29, "module-siriushla.as_di_vlight.main"]], "siriushla.as_ps_commands": [[30, "siriushla-as-ps-commands"]], "siriushla.as_ps_commands.main module": [[30, "module-siriushla.as_ps_commands.main"]], "siriushla.as_ps_commands.tasks module": [[30, "module-siriushla.as_ps_commands.tasks"]], "siriushla.as_ps_control": [[31, "siriushla-as-ps-control"]], "siriushla.as_ps_control.PSControlWindow module": [[31, "module-siriushla.as_ps_control.PSControlWindow"]], "siriushla.as_ps_control.PSDetailWindow module": [[31, "module-siriushla.as_ps_control.PSDetailWindow"]], "siriushla.as_ps_control.PSTabControlWindow module": [[31, "module-siriushla.as_ps_control.PSTabControlWindow"]], "siriushla.as_ps_control.PSTrimWindow module": [[31, "module-siriushla.as_ps_control.PSTrimWindow"]], "siriushla.as_ps_control.SummaryWidgets module": [[31, "module-siriushla.as_ps_control.SummaryWidgets"]], "siriushla.as_ps_control.ps_wfmerror_mon module": [[31, "module-siriushla.as_ps_control.ps_wfmerror_mon"]], "siriushla.as_ps_control.control_widget": [[32, "siriushla-as-ps-control-control-widget"]], "siriushla.as_ps_control.control_widget.BasePSControlWidget module": [[32, "module-siriushla.as_ps_control.control_widget.BasePSControlWidget"]], "siriushla.as_ps_control.control_widget.ControlWidgetFactory module": [[32, "module-siriushla.as_ps_control.control_widget.ControlWidgetFactory"]], "siriushla.as_ps_control.control_widget.DipoleControlWidget module": [[32, "module-siriushla.as_ps_control.control_widget.DipoleControlWidget"]], "siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget module": [[32, "module-siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget"]], "siriushla.as_ps_control.control_widget.FamSextupoleControlWidget module": [[32, "module-siriushla.as_ps_control.control_widget.FamSextupoleControlWidget"]], "siriushla.as_ps_control.control_widget.FastCorrectorControlWidget module": [[32, "module-siriushla.as_ps_control.control_widget.FastCorrectorControlWidget"]], "siriushla.as_ps_control.control_widget.IDFFCorrectorControlWidget module": [[32, "module-siriushla.as_ps_control.control_widget.IDFFCorrectorControlWidget"]], "siriushla.as_ps_control.control_widget.LensControlWidget module": [[32, "module-siriushla.as_ps_control.control_widget.LensControlWidget"]], "siriushla.as_ps_control.control_widget.SeptFFCorrectorControlWidget module": [[32, "module-siriushla.as_ps_control.control_widget.SeptFFCorrectorControlWidget"]], "siriushla.as_ps_control.control_widget.SkewQuadControlWidget module": [[32, "module-siriushla.as_ps_control.control_widget.SkewQuadControlWidget"]], "siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget module": [[32, "module-siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget"]], "siriushla.as_ps_control.control_widget.SolenoidControlWidget module": [[32, "module-siriushla.as_ps_control.control_widget.SolenoidControlWidget"]], "siriushla.as_ps_control.control_widget.TrimAllControlWidget module": [[32, "module-siriushla.as_ps_control.control_widget.TrimAllControlWidget"]], "siriushla.as_ps_control.control_widget.TrimFamControlWidget module": [[32, "module-siriushla.as_ps_control.control_widget.TrimFamControlWidget"]], "siriushla.as_ps_control.detail_widget": [[33, "siriushla-as-ps-control-detail-widget"]], "siriushla.as_ps_control.detail_widget.DetailWidgetFactory module": [[33, "module-siriushla.as_ps_control.detail_widget.DetailWidgetFactory"]], "siriushla.as_ps_control.detail_widget.InterlockWindow module": [[33, "module-siriushla.as_ps_control.detail_widget.InterlockWindow"]], "siriushla.as_ps_control.detail_widget.PSDetailWidget module": [[33, "module-siriushla.as_ps_control.detail_widget.PSDetailWidget"]], "siriushla.as_ps_control.detail_widget.custom_widgets module": [[33, "module-siriushla.as_ps_control.detail_widget.custom_widgets"]], "siriushla.as_ps_cycle": [[34, "siriushla-as-ps-cycle"]], "siriushla.as_ps_cycle.cycle_window module": [[34, "module-siriushla.as_ps_cycle.cycle_window"]], "siriushla.as_ps_cycle.tasks module": [[34, "module-siriushla.as_ps_cycle.tasks"]], "siriushla.as_ps_diag": [[35, "siriushla-as-ps-diag"]], "siriushla.as_ps_diag.main module": [[35, "module-siriushla.as_ps_diag.main"]], "siriushla.as_ps_diag.monitor module": [[35, "module-siriushla.as_ps_diag.monitor"]], "siriushla.as_ps_diag.ps_graph_mon module": [[35, "module-siriushla.as_ps_diag.ps_graph_mon"]], "siriushla.as_ps_diag.util module": [[35, "module-siriushla.as_ps_diag.util"]], "siriushla.as_pu_control": [[36, "siriushla-as-pu-control"]], "siriushla.as_pu_control.ControlWindow module": [[36, "module-siriushla.as_pu_control.ControlWindow"]], "siriushla.as_pu_control.DetailWidget module": [[36, "module-siriushla.as_pu_control.DetailWidget"]], "siriushla.as_pu_control.DetailWindow module": [[36, "module-siriushla.as_pu_control.DetailWindow"]], "siriushla.as_rf_control": [[37, "siriushla-as-rf-control"]], "siriushla.as_rf_control.control module": [[37, "module-siriushla.as_rf_control.control"]], "siriushla.as_rf_control.custom_widgets module": [[37, "module-siriushla.as_rf_control.custom_widgets"]], "siriushla.as_rf_control.details module": [[37, "module-siriushla.as_rf_control.details"]], "siriushla.as_rf_control.util module": [[37, "module-siriushla.as_rf_control.util"]], "siriushla.as_ti_control": [[38, "siriushla-as-ti-control"]], "siriushla.as_ti_control.base module": [[38, "module-siriushla.as_ti_control.base"]], "siriushla.as_ti_control.hl_trigger module": [[38, "module-siriushla.as_ti_control.hl_trigger"]], "siriushla.as_ti_control.hltiming module": [[38, "module-siriushla.as_ti_control.hltiming"]], "siriushla.as_ti_control.low_level_devices module": [[38, "module-siriushla.as_ti_control.low_level_devices"]], "siriushla.as_ti_control.monitor module": [[38, "module-siriushla.as_ti_control.monitor"]], "siriushla.as_ti_control.widgets module": [[38, "module-siriushla.as_ti_control.widgets"]], "siriushla.bl_ap_imgproc": [[39, "siriushla-bl-ap-imgproc"]], "siriushla.bl_ap_imgproc.blintlkctl module": [[39, "module-siriushla.bl_ap_imgproc.blintlkctl"]], "siriushla.bl_ap_imgproc.image module": [[39, "module-siriushla.bl_ap_imgproc.image"]], "siriushla.bl_ap_imgproc.main module": [[39, "module-siriushla.bl_ap_imgproc.main"]], "siriushla.bl_ap_imgproc.util module": [[39, "module-siriushla.bl_ap_imgproc.util"]], "siriushla.bo_ap_ramp": [[40, "siriushla-bo-ap-ramp"]], "siriushla.bo_ap_ramp.auxiliary_dialogs module": [[40, "siriushla-bo-ap-ramp-auxiliary-dialogs-module"]], "siriushla.bo_ap_ramp.bonormalized_edit module": [[40, "siriushla-bo-ap-ramp-bonormalized-edit-module"]], "siriushla.bo_ap_ramp.boramp_edit module": [[40, "siriushla-bo-ap-ramp-boramp-edit-module"]], "siriushla.bo_ap_ramp.custom_widgets module": [[40, "module-siriushla.bo_ap_ramp.custom_widgets"]], "siriushla.bo_ap_ramp.main_window module": [[40, "siriushla-bo-ap-ramp-main-window-module"]], "siriushla.bo_ap_ramp.menu module": [[40, "siriushla-bo-ap-ramp-menu-module"]], "siriushla.bo_ap_ramp.status_and_commands module": [[40, "siriushla-bo-ap-ramp-status-and-commands-module"]], "siriushla.common": [[41, "siriushla-common"]], "siriushla.common.afc_acq_core": [[42, "siriushla-common-afc-acq-core"]], "siriushla.common.afc_acq_core.base module": [[42, "module-siriushla.common.afc_acq_core.base"]], "siriushla.common.afc_acq_core.triggers module": [[42, "module-siriushla.common.afc_acq_core.triggers"]], "siriushla.common.cam_basler": [[43, "siriushla-common-cam-basler"]], "siriushla.common.cam_basler.base module": [[43, "module-siriushla.common.cam_basler.base"]], "siriushla.common.cam_basler.settings module": [[43, "module-siriushla.common.cam_basler.settings"]], "siriushla.common.diff_ctrl": [[44, "siriushla-common-diff-ctrl"]], "siriushla.common.diff_ctrl.base module": [[44, "module-siriushla.common.diff_ctrl.base"]], "siriushla.common.diff_ctrl.details module": [[44, "module-siriushla.common.diff_ctrl.details"]], "siriushla.common.epics": [[45, "siriushla-common-epics"]], "siriushla.common.epics.task": [[46, "siriushla-common-epics-task"]], "siriushla.common.epics.task.checker module": [[46, "module-siriushla.common.epics.task.checker"]], "siriushla.common.epics.task.connector module": [[46, "module-siriushla.common.epics.task.connector"]], "siriushla.common.epics.task.getter module": [[46, "module-siriushla.common.epics.task.getter"]], "siriushla.common.epics.task.setter module": [[46, "module-siriushla.common.epics.task.setter"]], "siriushla.common.epics.task.task module": [[46, "module-siriushla.common.epics.task.task"]], "siriushla.common.epics.task.wait module": [[46, "module-siriushla.common.epics.task.wait"]], "siriushla.common.epics.wrapper": [[47, "siriushla-common-epics-wrapper"]], "siriushla.common.epics.wrapper.pyepics module": [[47, "module-siriushla.common.epics.wrapper.pyepics"]], "siriushla.li_ap_mps": [[48, "siriushla-li-ap-mps"]], "siriushla.li_ap_mps.bypass_btn module": [[48, "module-siriushla.li_ap_mps.bypass_btn"]], "siriushla.li_ap_mps.main module": [[48, "module-siriushla.li_ap_mps.main"]], "siriushla.li_ap_mps.monitor module": [[48, "module-siriushla.li_ap_mps.monitor"]], "siriushla.li_ap_mps.util module": [[48, "module-siriushla.li_ap_mps.util"]], "siriushla.li_di_bpms": [[49, "siriushla-li-di-bpms"]], "siriushla.li_di_bpms.bpm_main module": [[49, "module-siriushla.li_di_bpms.bpm_main"]], "siriushla.li_di_scrns": [[50, "siriushla-li-di-scrns"]], "siriushla.li_di_scrns.main module": [[50, "module-siriushla.li_di_scrns.main"]], "siriushla.li_di_scrns.motorBtn module": [[50, "module-siriushla.li_di_scrns.motorBtn"]], "siriushla.li_di_scrns.util module": [[50, "module-siriushla.li_di_scrns.util"]], "siriushla.li_eg_control": [[51, "siriushla-li-eg-control"]], "siriushla.li_eg_control.main module": [[51, "module-siriushla.li_eg_control.main"]], "siriushla.li_pu_modltr": [[52, "siriushla-li-pu-modltr"]], "siriushla.li_pu_modltr.auxiliary_dialogs module": [[52, "module-siriushla.li_pu_modltr.auxiliary_dialogs"]], "siriushla.li_pu_modltr.main module": [[52, "module-siriushla.li_pu_modltr.main"]], "siriushla.li_rf_llrf": [[53, "siriushla-li-rf-llrf"]], "siriushla.li_rf_llrf.chart module": [[53, "module-siriushla.li_rf_llrf.chart"]], "siriushla.li_rf_llrf.controls module": [[53, "module-siriushla.li_rf_llrf.controls"]], "siriushla.li_rf_llrf.details module": [[53, "module-siriushla.li_rf_llrf.details"]], "siriushla.li_rf_llrf.main module": [[53, "module-siriushla.li_rf_llrf.main"]], "siriushla.li_rf_llrf.motor_control module": [[53, "module-siriushla.li_rf_llrf.motor_control"]], "siriushla.li_rf_llrf.util module": [[53, "module-siriushla.li_rf_llrf.util"]], "siriushla.li_rf_llrf.widgets module": [[53, "module-siriushla.li_rf_llrf.widgets"]], "siriushla.li_va_control": [[54, "siriushla-li-va-control"]], "siriushla.li_va_control.chart module": [[54, "module-siriushla.li_va_control.chart"]], "siriushla.li_va_control.details module": [[54, "module-siriushla.li_va_control.details"]], "siriushla.li_va_control.functions module": [[54, "module-siriushla.li_va_control.functions"]], "siriushla.li_va_control.main module": [[54, "module-siriushla.li_va_control.main"]], "siriushla.li_va_control.util module": [[54, "module-siriushla.li_va_control.util"]], "siriushla.li_va_control.widgets module": [[54, "module-siriushla.li_va_control.widgets"]], "siriushla.si_ap_fofb": [[55, "siriushla-si-ap-fofb"]], "siriushla.si_ap_fofb.base module": [[55, "module-siriushla.si_ap_fofb.base"]], "siriushla.si_ap_fofb.custom_widgets module": [[55, "module-siriushla.si_ap_fofb.custom_widgets"]], "siriushla.si_ap_fofb.graphics module": [[55, "module-siriushla.si_ap_fofb.graphics"]], "siriushla.si_ap_fofb.main module": [[55, "module-siriushla.si_ap_fofb.main"]], "siriushla.si_ap_fofb.respmat module": [[55, "module-siriushla.si_ap_fofb.respmat"]], "siriushla.si_ap_fofb.trig_acq_config module": [[55, "module-siriushla.si_ap_fofb.trig_acq_config"]], "siriushla.si_ap_genstatus": [[56, "siriushla-si-ap-genstatus"]], "siriushla.si_ap_genstatus.main module": [[56, "module-siriushla.si_ap_genstatus.main"]], "siriushla.si_ap_idff": [[57, "siriushla-si-ap-idff"]], "siriushla.si_ap_idff.custom_widgets module": [[57, "module-siriushla.si_ap_idff.custom_widgets"]], "siriushla.si_ap_idff.main module": [[57, "module-siriushla.si_ap_idff.main"]], "siriushla.si_ap_idff.util module": [[57, "module-siriushla.si_ap_idff.util"]], "siriushla.si_ap_orbintlk": [[58, "siriushla-si-ap-orbintlk"]], "siriushla.si_ap_orbintlk.base module": [[58, "module-siriushla.si_ap_orbintlk.base"]], "siriushla.si_ap_orbintlk.bpmdetail module": [[58, "module-siriushla.si_ap_orbintlk.bpmdetail"]], "siriushla.si_ap_orbintlk.custom_widgets module": [[58, "module-siriushla.si_ap_orbintlk.custom_widgets"]], "siriushla.si_ap_orbintlk.graphics module": [[58, "module-siriushla.si_ap_orbintlk.graphics"]], "siriushla.si_ap_orbintlk.main module": [[58, "module-siriushla.si_ap_orbintlk.main"]], "siriushla.si_di_bbb": [[59, "siriushla-si-di-bbb"]], "siriushla.si_di_bbb.acquisition module": [[59, "module-siriushla.si_di_bbb.acquisition"]], "siriushla.si_di_bbb.advanced_settings module": [[59, "module-siriushla.si_di_bbb.advanced_settings"]], "siriushla.si_di_bbb.bbb module": [[59, "module-siriushla.si_di_bbb.bbb"]], "siriushla.si_di_bbb.coefficients module": [[59, "module-siriushla.si_di_bbb.coefficients"]], "siriushla.si_di_bbb.custom_widgets module": [[59, "module-siriushla.si_di_bbb.custom_widgets"]], "siriushla.si_di_bbb.drive module": [[59, "module-siriushla.si_di_bbb.drive"]], "siriushla.si_di_bbb.environment module": [[59, "module-siriushla.si_di_bbb.environment"]], "siriushla.si_di_bbb.gpio module": [[59, "module-siriushla.si_di_bbb.gpio"]], "siriushla.si_di_bbb.main module": [[59, "module-siriushla.si_di_bbb.main"]], "siriushla.si_di_bbb.masks module": [[59, "module-siriushla.si_di_bbb.masks"]], "siriushla.si_di_bbb.pwr_amps module": [[59, "module-siriushla.si_di_bbb.pwr_amps"]], "siriushla.si_di_bbb.timing module": [[59, "module-siriushla.si_di_bbb.timing"]], "siriushla.si_di_bbb.util module": [[59, "module-siriushla.si_di_bbb.util"]], "siriushla.si_di_equalize_bpms": [[60, "siriushla-si-di-equalize-bpms"]], "siriushla.si_di_equalize_bpms.main module": [[60, "module-siriushla.si_di_equalize_bpms.main"]], "siriushla.si_di_scraps": [[61, "siriushla-si-di-scraps"]], "siriushla.si_di_scraps.Scrap_monitor module": [[61, "module-siriushla.si_di_scraps.Scrap_monitor"]], "siriushla.si_id_control": [[62, "siriushla-si-id-control"]], "siriushla.si_id_control.apu module": [[62, "module-siriushla.si_id_control.apu"]], "siriushla.si_id_control.base module": [[62, "module-siriushla.si_id_control.base"]], "siriushla.si_id_control.delta module": [[62, "module-siriushla.si_id_control.delta"]], "siriushla.si_id_control.epu module": [[62, "module-siriushla.si_id_control.epu"]], "siriushla.si_id_control.id_control module": [[62, "module-siriushla.si_id_control.id_control"]], "siriushla.si_id_control.papu module": [[62, "module-siriushla.si_id_control.papu"]], "siriushla.si_id_control.util module": [[62, "module-siriushla.si_id_control.util"]], "siriushla.tb_di_slits": [[63, "siriushla-tb-di-slits"]], "siriushla.tb_di_slits.Slit_monitor module": [[63, "module-siriushla.tb_di_slits.Slit_monitor"]], "Widgets": [[64, "widgets"]], "siriushla.widgets.QDoubleScrollBar module": [[64, "module-siriushla.widgets.QDoubleScrollBar"]], "siriushla.widgets.QLed module": [[64, "module-siriushla.widgets.QLed"]], "siriushla.widgets.QSpinBoxPlus module": [[64, "module-siriushla.widgets.QSpinBoxPlus"]], "siriushla.widgets.bar_graph module": [[64, "module-siriushla.widgets.bar_graph"]], "siriushla.widgets.detachable_tabwidget module": [[64, "module-siriushla.widgets.detachable_tabwidget"]], "siriushla.widgets.enum_combo_box module": [[64, "module-siriushla.widgets.enum_combo_box"]], "siriushla.widgets.frame module": [[64, "module-siriushla.widgets.frame"]], "siriushla.widgets.horizontal_ruler module": [[64, "module-siriushla.widgets.horizontal_ruler"]], "siriushla.widgets.label module": [[64, "module-siriushla.widgets.label"]], "siriushla.widgets.led module": [[64, "module-siriushla.widgets.led"]], "siriushla.widgets.ledit_scrollbar module": [[64, "module-siriushla.widgets.ledit_scrollbar"]], "siriushla.widgets.line_edit module": [[64, "module-siriushla.widgets.line_edit"]], "siriushla.widgets.loading_dialog module": [[64, "module-siriushla.widgets.loading_dialog"]], "siriushla.widgets.log_display module": [[64, "module-siriushla.widgets.log_display"]], "siriushla.widgets.log_label module": [[64, "module-siriushla.widgets.log_label"]], "siriushla.widgets.matplotlib module": [[64, "module-siriushla.widgets.matplotlib"]], "siriushla.widgets.process_image module": [[64, "module-siriushla.widgets.process_image"]], "siriushla.widgets.pushbutton module": [[64, "module-siriushla.widgets.pushbutton"]], "siriushla.widgets.pvnames_tree module": [[64, "module-siriushla.widgets.pvnames_tree"]], "siriushla.widgets.qtplugins module": [[64, "module-siriushla.widgets.qtplugins"]], "siriushla.widgets.relative_widget module": [[64, "module-siriushla.widgets.relative_widget"]], "siriushla.widgets.scrollbar module": [[64, "module-siriushla.widgets.scrollbar"]], "siriushla.widgets.selection_matrix module": [[64, "module-siriushla.widgets.selection_matrix"]], "siriushla.widgets.signal_channel module": [[64, "module-siriushla.widgets.signal_channel"]], "siriushla.widgets.spectrogram_view module": [[64, "module-siriushla.widgets.spectrogram_view"]], "siriushla.widgets.spinbox module": [[64, "module-siriushla.widgets.spinbox"]], "siriushla.widgets.spinbox_scrollbar module": [[64, "module-siriushla.widgets.spinbox_scrollbar"]], "siriushla.widgets.state_button module": [[64, "module-siriushla.widgets.state_button"]], "siriushla.widgets.string_combo_box module": [[64, "module-siriushla.widgets.string_combo_box"]], "siriushla.widgets.timeplot module": [[64, "module-siriushla.widgets.timeplot"]], "siriushla.widgets.waveformplot module": [[64, "module-siriushla.widgets.waveformplot"]], "siriushla.widgets.waveformtable module": [[64, "module-siriushla.widgets.waveformtable"]], "siriushla.widgets.widget_factory module": [[64, "module-siriushla.widgets.widget_factory"]], "siriushla.widgets.windows module": [[64, "module-siriushla.widgets.windows"]], "siriushla.widgets.dialog": [[65, "siriushla-widgets-dialog"]], "siriushla.widgets.dialog.progress_dialog module": [[65, "module-siriushla.widgets.dialog.progress_dialog"]], "siriushla.widgets.dialog.ps_status_dialog module": [[65, "module-siriushla.widgets.dialog.ps_status_dialog"]], "siriushla.widgets.dialog.pv_status_dialog module": [[65, "module-siriushla.widgets.dialog.pv_status_dialog"]], "siriushla.widgets.dialog.report_dialog module": [[65, "module-siriushla.widgets.dialog.report_dialog"]]}, "indexentries": {"module": [[0, "module-siriushla"], [1, "module-siriushla.sirius_application"], [1, "module-siriushla.util"], [2, "module-siriushla.as_ap_configdb"], [2, "module-siriushla.as_ap_configdb.client_configdb"], [2, "module-siriushla.as_ap_configdb.configdialogs"], [2, "module-siriushla.as_ap_configdb.configwidgets"], [3, "module-siriushla.as_ap_configdb.models"], [3, "module-siriushla.as_ap_configdb.models.config_db_table_model"], [3, "module-siriushla.as_ap_configdb.models.config_names_model"], [3, "module-siriushla.as_ap_configdb.models.config_types_model"], [3, "module-siriushla.as_ap_configdb.models.pv_configuration_model"], [4, "module-siriushla.as_ap_configdb.normconfigs"], [4, "module-siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow"], [4, "module-siriushla.as_ap_configdb.normconfigs.ConfigModel"], [4, "module-siriushla.as_ap_configdb.normconfigs.LoadingThread"], [4, "module-siriushla.as_ap_configdb.normconfigs.TuneDlg"], [5, "module-siriushla.as_ap_configdb.pvsconfigs"], [5, "module-siriushla.as_ap_configdb.pvsconfigs.load_and_apply"], [5, "module-siriushla.as_ap_configdb.pvsconfigs.main"], [5, "module-siriushla.as_ap_configdb.pvsconfigs.read_and_save"], [6, "module-siriushla.as_ap_configdb.pvsconfigs.delegate"], [6, "module-siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate"], [7, "module-siriushla.as_ap_currinfo"], [7, "module-siriushla.as_ap_currinfo.charge_monitor"], [7, "module-siriushla.as_ap_currinfo.current_and_lifetime"], [7, "module-siriushla.as_ap_currinfo.efficiency_monitor"], [8, "module-siriushla.as_ap_energybutton"], [8, "module-siriushla.as_ap_energybutton.energy_button"], [8, "module-siriushla.as_ap_energybutton.energy_setter_window"], [8, "module-siriushla.as_ap_energybutton.set_energy"], [9, "module-siriushla.as_ap_injcontrol"], [9, "module-siriushla.as_ap_injcontrol.base"], [9, "module-siriushla.as_ap_injcontrol.injbo"], [9, "module-siriushla.as_ap_injcontrol.tbts"], [10, "module-siriushla.as_ap_injection"], [10, "module-siriushla.as_ap_injection.auxiliary_dialogs"], [10, "module-siriushla.as_ap_injection.killbeam_widgets"], [10, "module-siriushla.as_ap_injection.main"], [10, "module-siriushla.as_ap_injection.widgets"], [11, "module-siriushla.as_ap_launcher"], [11, "module-siriushla.as_ap_launcher.main"], [11, "module-siriushla.as_ap_launcher.menu"], [12, "module-siriushla.as_ap_machshift"], [12, "module-siriushla.as_ap_machshift.widgets"], [13, "module-siriushla.as_ap_macreport"], [13, "module-siriushla.as_ap_macreport.main"], [14, "module-siriushla.as_ap_magoffconv"], [14, "module-siriushla.as_ap_magoffconv.main"], [15, "module-siriushla.as_ap_measure.energy_meas"], [16, "module-siriushla.as_ap_monitor"], [16, "module-siriushla.as_ap_monitor.main"], [16, "module-siriushla.as_ap_monitor.util"], [17, "module-siriushla.as_ap_opticscorr"], [17, "module-siriushla.as_ap_opticscorr.custom_widgets"], [17, "module-siriushla.as_ap_opticscorr.details"], [17, "module-siriushla.as_ap_opticscorr.main"], [18, "module-siriushla.as_ap_posang"], [18, "module-siriushla.as_ap_posang.HLPosAng"], [19, "module-siriushla.as_ap_rabpmmon.util"], [20, "module-siriushla.as_ap_radmon"], [20, "module-siriushla.as_ap_radmon.main"], [21, "module-siriushla.as_ap_sofb"], [21, "module-siriushla.as_ap_sofb.main"], [21, "module-siriushla.as_ap_sofb.orbit_register"], [22, "module-siriushla.as_ap_sofb.graphics"], [22, "module-siriushla.as_ap_sofb.graphics.base"], [22, "module-siriushla.as_ap_sofb.graphics.correctors"], [22, "module-siriushla.as_ap_sofb.graphics.orbit"], [22, "module-siriushla.as_ap_sofb.graphics.respmat"], [23, "module-siriushla.as_ap_sofb.ioc_control"], [23, "module-siriushla.as_ap_sofb.ioc_control.base"], [23, "module-siriushla.as_ap_sofb.ioc_control.drive_window"], [23, "module-siriushla.as_ap_sofb.ioc_control.kicks_config"], [23, "module-siriushla.as_ap_sofb.ioc_control.main"], [23, "module-siriushla.as_ap_sofb.ioc_control.orbit_acquisition"], [23, "module-siriushla.as_ap_sofb.ioc_control.respmat"], [23, "module-siriushla.as_ap_sofb.ioc_control.respmat_enbllist"], [23, "module-siriushla.as_ap_sofb.ioc_control.status"], [24, "module-siriushla.as_di_bpms"], [24, "module-siriushla.as_di_bpms.base"], [24, "module-siriushla.as_di_bpms.list_bpms"], [24, "module-siriushla.as_di_bpms.main"], [24, "module-siriushla.as_di_bpms.monit"], [24, "module-siriushla.as_di_bpms.settings"], [24, "module-siriushla.as_di_bpms.trig_acq_config"], [25, "module-siriushla.as_di_dccts"], [25, "module-siriushla.as_di_dccts.graphics"], [25, "module-siriushla.as_di_dccts.main"], [25, "module-siriushla.as_di_dccts.settings"], [26, "module-siriushla.as_di_icts"], [26, "module-siriushla.as_di_icts.ICT_monitor"], [27, "module-siriushla.as_di_scrns"], [27, "module-siriushla.as_di_scrns.list_scrns"], [27, "module-siriushla.as_di_scrns.main"], [27, "module-siriushla.as_di_scrns.scrn_calib"], [27, "module-siriushla.as_di_scrns.scrn_details"], [28, "module-siriushla.as_di_tune"], [28, "module-siriushla.as_di_tune.controls"], [28, "module-siriushla.as_di_tune.details"], [28, "module-siriushla.as_di_tune.main"], [28, "module-siriushla.as_di_tune.spectra"], [28, "module-siriushla.as_di_tune.spectrogram"], [28, "module-siriushla.as_di_tune.util"], [29, "module-siriushla.as_di_vlight"], [29, "module-siriushla.as_di_vlight.main"], [30, "module-siriushla.as_ps_commands"], [30, "module-siriushla.as_ps_commands.main"], [30, "module-siriushla.as_ps_commands.tasks"], [31, "module-siriushla.as_ps_control"], [31, "module-siriushla.as_ps_control.PSControlWindow"], [31, "module-siriushla.as_ps_control.PSDetailWindow"], [31, "module-siriushla.as_ps_control.PSTabControlWindow"], [31, "module-siriushla.as_ps_control.PSTrimWindow"], [31, "module-siriushla.as_ps_control.SummaryWidgets"], [31, "module-siriushla.as_ps_control.ps_wfmerror_mon"], [32, "module-siriushla.as_ps_control.control_widget"], [32, "module-siriushla.as_ps_control.control_widget.BasePSControlWidget"], [32, "module-siriushla.as_ps_control.control_widget.ControlWidgetFactory"], [32, "module-siriushla.as_ps_control.control_widget.DipoleControlWidget"], [32, "module-siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget"], [32, "module-siriushla.as_ps_control.control_widget.FamSextupoleControlWidget"], [32, "module-siriushla.as_ps_control.control_widget.FastCorrectorControlWidget"], [32, "module-siriushla.as_ps_control.control_widget.IDFFCorrectorControlWidget"], [32, "module-siriushla.as_ps_control.control_widget.LensControlWidget"], [32, "module-siriushla.as_ps_control.control_widget.SeptFFCorrectorControlWidget"], [32, "module-siriushla.as_ps_control.control_widget.SkewQuadControlWidget"], [32, "module-siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget"], [32, "module-siriushla.as_ps_control.control_widget.SolenoidControlWidget"], [32, "module-siriushla.as_ps_control.control_widget.TrimAllControlWidget"], [32, "module-siriushla.as_ps_control.control_widget.TrimFamControlWidget"], [33, "module-siriushla.as_ps_control.detail_widget"], [33, "module-siriushla.as_ps_control.detail_widget.DetailWidgetFactory"], [33, "module-siriushla.as_ps_control.detail_widget.InterlockWindow"], [33, "module-siriushla.as_ps_control.detail_widget.PSDetailWidget"], [33, "module-siriushla.as_ps_control.detail_widget.custom_widgets"], [34, "module-siriushla.as_ps_cycle"], [34, "module-siriushla.as_ps_cycle.cycle_window"], [34, "module-siriushla.as_ps_cycle.tasks"], [35, "module-siriushla.as_ps_diag"], [35, "module-siriushla.as_ps_diag.main"], [35, "module-siriushla.as_ps_diag.monitor"], [35, "module-siriushla.as_ps_diag.ps_graph_mon"], [35, "module-siriushla.as_ps_diag.util"], [36, "module-siriushla.as_pu_control"], [36, "module-siriushla.as_pu_control.ControlWindow"], [36, "module-siriushla.as_pu_control.DetailWidget"], [36, "module-siriushla.as_pu_control.DetailWindow"], [37, "module-siriushla.as_rf_control"], [37, "module-siriushla.as_rf_control.control"], [37, "module-siriushla.as_rf_control.custom_widgets"], [37, "module-siriushla.as_rf_control.details"], [37, "module-siriushla.as_rf_control.util"], [38, "module-siriushla.as_ti_control"], [38, "module-siriushla.as_ti_control.base"], [38, "module-siriushla.as_ti_control.hl_trigger"], [38, "module-siriushla.as_ti_control.hltiming"], [38, "module-siriushla.as_ti_control.low_level_devices"], [38, "module-siriushla.as_ti_control.monitor"], [38, "module-siriushla.as_ti_control.widgets"], [39, "module-siriushla.bl_ap_imgproc"], [39, "module-siriushla.bl_ap_imgproc.blintlkctl"], [39, "module-siriushla.bl_ap_imgproc.image"], [39, "module-siriushla.bl_ap_imgproc.main"], [39, "module-siriushla.bl_ap_imgproc.util"], [40, "module-siriushla.bo_ap_ramp.custom_widgets"], [41, "module-siriushla.common"], [42, "module-siriushla.common.afc_acq_core"], [42, "module-siriushla.common.afc_acq_core.base"], [42, "module-siriushla.common.afc_acq_core.triggers"], [43, "module-siriushla.common.cam_basler"], [43, "module-siriushla.common.cam_basler.base"], [43, "module-siriushla.common.cam_basler.settings"], [44, "module-siriushla.common.diff_ctrl"], [44, "module-siriushla.common.diff_ctrl.base"], [44, "module-siriushla.common.diff_ctrl.details"], [45, "module-siriushla.common.epics"], [46, "module-siriushla.common.epics.task"], [46, "module-siriushla.common.epics.task.checker"], [46, "module-siriushla.common.epics.task.connector"], [46, "module-siriushla.common.epics.task.getter"], [46, "module-siriushla.common.epics.task.setter"], [46, "module-siriushla.common.epics.task.task"], [46, "module-siriushla.common.epics.task.wait"], [47, "module-siriushla.common.epics.wrapper"], [47, "module-siriushla.common.epics.wrapper.pyepics"], [48, "module-siriushla.li_ap_mps"], [48, "module-siriushla.li_ap_mps.bypass_btn"], [48, "module-siriushla.li_ap_mps.main"], [48, "module-siriushla.li_ap_mps.monitor"], [48, "module-siriushla.li_ap_mps.util"], [49, "module-siriushla.li_di_bpms"], [49, "module-siriushla.li_di_bpms.bpm_main"], [50, "module-siriushla.li_di_scrns"], [50, "module-siriushla.li_di_scrns.main"], [50, "module-siriushla.li_di_scrns.motorBtn"], [50, "module-siriushla.li_di_scrns.util"], [51, "module-siriushla.li_eg_control"], [51, "module-siriushla.li_eg_control.main"], [52, "module-siriushla.li_pu_modltr"], [52, "module-siriushla.li_pu_modltr.auxiliary_dialogs"], [52, "module-siriushla.li_pu_modltr.main"], [53, "module-siriushla.li_rf_llrf"], [53, "module-siriushla.li_rf_llrf.chart"], [53, "module-siriushla.li_rf_llrf.controls"], [53, "module-siriushla.li_rf_llrf.details"], [53, "module-siriushla.li_rf_llrf.main"], [53, "module-siriushla.li_rf_llrf.motor_control"], [53, "module-siriushla.li_rf_llrf.util"], [53, "module-siriushla.li_rf_llrf.widgets"], [54, "module-siriushla.li_va_control"], [54, "module-siriushla.li_va_control.chart"], [54, "module-siriushla.li_va_control.details"], [54, "module-siriushla.li_va_control.functions"], [54, "module-siriushla.li_va_control.main"], [54, "module-siriushla.li_va_control.util"], [54, "module-siriushla.li_va_control.widgets"], [55, "module-siriushla.si_ap_fofb"], [55, "module-siriushla.si_ap_fofb.base"], [55, "module-siriushla.si_ap_fofb.custom_widgets"], [55, "module-siriushla.si_ap_fofb.graphics"], [55, "module-siriushla.si_ap_fofb.main"], [55, "module-siriushla.si_ap_fofb.respmat"], [55, "module-siriushla.si_ap_fofb.trig_acq_config"], [56, "module-siriushla.si_ap_genstatus"], [56, "module-siriushla.si_ap_genstatus.main"], [57, "module-siriushla.si_ap_idff"], [57, "module-siriushla.si_ap_idff.custom_widgets"], [57, "module-siriushla.si_ap_idff.main"], [57, "module-siriushla.si_ap_idff.util"], [58, "module-siriushla.si_ap_orbintlk"], [58, "module-siriushla.si_ap_orbintlk.base"], [58, "module-siriushla.si_ap_orbintlk.bpmdetail"], [58, "module-siriushla.si_ap_orbintlk.custom_widgets"], [58, "module-siriushla.si_ap_orbintlk.graphics"], [58, "module-siriushla.si_ap_orbintlk.main"], [59, "module-siriushla.si_di_bbb"], [59, "module-siriushla.si_di_bbb.acquisition"], [59, "module-siriushla.si_di_bbb.advanced_settings"], [59, "module-siriushla.si_di_bbb.bbb"], [59, "module-siriushla.si_di_bbb.coefficients"], [59, "module-siriushla.si_di_bbb.custom_widgets"], [59, "module-siriushla.si_di_bbb.drive"], [59, "module-siriushla.si_di_bbb.environment"], [59, "module-siriushla.si_di_bbb.gpio"], [59, "module-siriushla.si_di_bbb.main"], [59, "module-siriushla.si_di_bbb.masks"], [59, "module-siriushla.si_di_bbb.pwr_amps"], [59, "module-siriushla.si_di_bbb.timing"], [59, "module-siriushla.si_di_bbb.util"], [60, "module-siriushla.si_di_equalize_bpms"], [60, "module-siriushla.si_di_equalize_bpms.main"], [61, "module-siriushla.si_di_scraps"], [61, "module-siriushla.si_di_scraps.Scrap_monitor"], [62, "module-siriushla.si_id_control"], [62, "module-siriushla.si_id_control.apu"], [62, "module-siriushla.si_id_control.base"], [62, "module-siriushla.si_id_control.delta"], [62, "module-siriushla.si_id_control.epu"], [62, "module-siriushla.si_id_control.id_control"], [62, "module-siriushla.si_id_control.papu"], [62, "module-siriushla.si_id_control.util"], [63, "module-siriushla.tb_di_slits"], [63, "module-siriushla.tb_di_slits.Slit_monitor"], [64, "module-siriushla.widgets"], [64, "module-siriushla.widgets.QDoubleScrollBar"], [64, "module-siriushla.widgets.QLed"], [64, "module-siriushla.widgets.QSpinBoxPlus"], [64, "module-siriushla.widgets.bar_graph"], [64, "module-siriushla.widgets.detachable_tabwidget"], [64, "module-siriushla.widgets.enum_combo_box"], [64, "module-siriushla.widgets.frame"], [64, "module-siriushla.widgets.horizontal_ruler"], [64, "module-siriushla.widgets.label"], [64, "module-siriushla.widgets.led"], [64, "module-siriushla.widgets.ledit_scrollbar"], [64, "module-siriushla.widgets.line_edit"], [64, "module-siriushla.widgets.loading_dialog"], [64, "module-siriushla.widgets.log_display"], [64, "module-siriushla.widgets.log_label"], [64, "module-siriushla.widgets.matplotlib"], [64, "module-siriushla.widgets.process_image"], [64, "module-siriushla.widgets.pushbutton"], [64, "module-siriushla.widgets.pvnames_tree"], [64, "module-siriushla.widgets.qtplugins"], [64, "module-siriushla.widgets.relative_widget"], [64, "module-siriushla.widgets.scrollbar"], [64, "module-siriushla.widgets.selection_matrix"], [64, "module-siriushla.widgets.signal_channel"], [64, "module-siriushla.widgets.spectrogram_view"], [64, "module-siriushla.widgets.spinbox"], [64, "module-siriushla.widgets.spinbox_scrollbar"], [64, "module-siriushla.widgets.state_button"], [64, "module-siriushla.widgets.string_combo_box"], [64, "module-siriushla.widgets.timeplot"], [64, "module-siriushla.widgets.waveformplot"], [64, "module-siriushla.widgets.waveformtable"], [64, "module-siriushla.widgets.widget_factory"], [64, "module-siriushla.widgets.windows"], [65, "module-siriushla.widgets.dialog"], [65, "module-siriushla.widgets.dialog.progress_dialog"], [65, "module-siriushla.widgets.dialog.ps_status_dialog"], [65, "module-siriushla.widgets.dialog.pv_status_dialog"], [65, "module-siriushla.widgets.dialog.report_dialog"]], "siriushla": [[0, "module-siriushla"]], "loadingdialog (class in siriushla.util)": [[1, "siriushla.util.LoadingDialog"]], "loadingthread (class in siriushla.util)": [[1, "siriushla.util.LoadingThread"]], "siriusapplication (class in siriushla.sirius_application)": [[1, "siriushla.sirius_application.SiriusApplication"]], "check_process() (in module siriushla.util)": [[1, "siriushla.util.check_process"]], "check_window_by_pid() (in module siriushla.util)": [[1, "siriushla.util.check_window_by_pid"]], "closemessage (siriushla.util.loadingthread attribute)": [[1, "siriushla.util.LoadingThread.closemessage"]], "connect_newprocess() (in module siriushla.util)": [[1, "siriushla.util.connect_newprocess"]], "connect_window() (in module siriushla.util)": [[1, "siriushla.util.connect_window"]], "excepthook() (in module siriushla.sirius_application)": [[1, "siriushla.sirius_application.excepthook"]], "get_appropriate_color() (in module siriushla.util)": [[1, "siriushla.util.get_appropriate_color"]], "get_appropriate_signal() (in module siriushla.util)": [[1, "siriushla.util.get_appropriate_signal"]], "get_monitor_icon() (in module siriushla.util)": [[1, "siriushla.util.get_monitor_icon"]], "get_package_version() (in module siriushla.util)": [[1, "siriushla.util.get_package_version"]], "get_window_id() (in module siriushla.util)": [[1, "siriushla.util.get_window_id"]], "open_window() (siriushla.sirius_application.siriusapplication method)": [[1, "siriushla.sirius_application.SiriusApplication.open_window"]], "openmessage (siriushla.util.loadingthread attribute)": [[1, "siriushla.util.LoadingThread.openmessage"]], "run() (siriushla.util.loadingthread method)": [[1, "siriushla.util.LoadingThread.run"]], "run_newprocess() (in module siriushla.util)": [[1, "siriushla.util.run_newprocess"]], "set_style() (in module siriushla.util)": [[1, "siriushla.util.set_style"]], "siriushla.sirius_application": [[1, "module-siriushla.sirius_application"]], "siriushla.util": [[1, "module-siriushla.util"]], "config_type_col (siriushla.as_ap_configdb.client_configdb.configurationmanager attribute)": [[2, "siriushla.as_ap_configdb.client_configdb.ConfigurationManager.CONFIG_TYPE_COL"]], "config_type_col (siriushla.as_ap_configdb.configwidgets.configdbsearchengine attribute)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigDBSearchEngine.CONFIG_TYPE_COL"]], "config_type_col (siriushla.as_ap_configdb.configwidgets.configtablewidget attribute)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigTableWidget.CONFIG_TYPE_COL"]], "configdbinfoheader (class in siriushla.as_ap_configdb.configwidgets)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigDBInfoHeader"]], "configdbsearchengine (class in siriushla.as_ap_configdb.configwidgets)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigDBSearchEngine"]], "configtablewidget (class in siriushla.as_ap_configdb.configwidgets)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigTableWidget"]], "configurationmanager (class in siriushla.as_ap_configdb.client_configdb)": [[2, "siriushla.as_ap_configdb.client_configdb.ConfigurationManager"]], "jsontreemodel (class in siriushla.as_ap_configdb.client_configdb)": [[2, "siriushla.as_ap_configdb.client_configdb.JsonTreeModel"]], "loadconfigdialog (class in siriushla.as_ap_configdb.configdialogs)": [[2, "siriushla.as_ap_configdb.configdialogs.LoadConfigDialog"]], "name_col (siriushla.as_ap_configdb.client_configdb.configurationmanager attribute)": [[2, "siriushla.as_ap_configdb.client_configdb.ConfigurationManager.NAME_COL"]], "name_col (siriushla.as_ap_configdb.configwidgets.configdbsearchengine attribute)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigDBSearchEngine.NAME_COL"]], "name_col (siriushla.as_ap_configdb.configwidgets.configtablewidget attribute)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigTableWidget.NAME_COL"]], "renameconfigdialog (class in siriushla.as_ap_configdb.configdialogs)": [[2, "siriushla.as_ap_configdb.configdialogs.RenameConfigDialog"]], "saveconfigdialog (class in siriushla.as_ap_configdb.configdialogs)": [[2, "siriushla.as_ap_configdb.configdialogs.SaveConfigDialog"]], "treeitem (class in siriushla.as_ap_configdb.client_configdb)": [[2, "siriushla.as_ap_configdb.client_configdb.TreeItem"]], "appendchild() (siriushla.as_ap_configdb.client_configdb.treeitem method)": [[2, "siriushla.as_ap_configdb.client_configdb.TreeItem.appendChild"]], "child() (siriushla.as_ap_configdb.client_configdb.treeitem method)": [[2, "siriushla.as_ap_configdb.client_configdb.TreeItem.child"]], "childcount() (siriushla.as_ap_configdb.client_configdb.treeitem method)": [[2, "siriushla.as_ap_configdb.client_configdb.TreeItem.childCount"]], "columncount() (siriushla.as_ap_configdb.client_configdb.jsontreemodel method)": [[2, "siriushla.as_ap_configdb.client_configdb.JsonTreeModel.columnCount"]], "columncount() (siriushla.as_ap_configdb.client_configdb.treeitem method)": [[2, "siriushla.as_ap_configdb.client_configdb.TreeItem.columnCount"]], "configchanged (siriushla.as_ap_configdb.configwidgets.configtablewidget attribute)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigTableWidget.configChanged"]], "config_name (siriushla.as_ap_configdb.configdialogs.saveconfigdialog property)": [[2, "siriushla.as_ap_configdb.configdialogs.SaveConfigDialog.config_name"]], "config_name (siriushla.as_ap_configdb.configwidgets.configtablewidget property)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigTableWidget.config_name"]], "config_type (siriushla.as_ap_configdb.configwidgets.configtablewidget property)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigTableWidget.config_type"]], "configname (siriushla.as_ap_configdb.configdialogs.renameconfigdialog attribute)": [[2, "siriushla.as_ap_configdb.configdialogs.RenameConfigDialog.configname"]], "configname (siriushla.as_ap_configdb.configdialogs.saveconfigdialog attribute)": [[2, "siriushla.as_ap_configdb.configdialogs.SaveConfigDialog.configname"]], "connectionerror (siriushla.as_ap_configdb.configwidgets.configtablewidget attribute)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigTableWidget.connectionError"]], "data() (siriushla.as_ap_configdb.client_configdb.jsontreemodel method)": [[2, "siriushla.as_ap_configdb.client_configdb.JsonTreeModel.data"]], "data() (siriushla.as_ap_configdb.client_configdb.treeitem method)": [[2, "siriushla.as_ap_configdb.client_configdb.TreeItem.data"]], "filteredidcs (siriushla.as_ap_configdb.configwidgets.configdbsearchengine attribute)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigDBSearchEngine.filteredidcs"]], "flags() (siriushla.as_ap_configdb.client_configdb.jsontreemodel method)": [[2, "siriushla.as_ap_configdb.client_configdb.JsonTreeModel.flags"]], "headerdata() (siriushla.as_ap_configdb.client_configdb.jsontreemodel method)": [[2, "siriushla.as_ap_configdb.client_configdb.JsonTreeModel.headerData"]], "index() (siriushla.as_ap_configdb.client_configdb.jsontreemodel method)": [[2, "siriushla.as_ap_configdb.client_configdb.JsonTreeModel.index"]], "parent() (siriushla.as_ap_configdb.client_configdb.jsontreemodel method)": [[2, "siriushla.as_ap_configdb.client_configdb.JsonTreeModel.parent"]], "parentitem() (siriushla.as_ap_configdb.client_configdb.treeitem method)": [[2, "siriushla.as_ap_configdb.client_configdb.TreeItem.parentItem"]], "resizeevent() (siriushla.as_ap_configdb.configwidgets.configtablewidget method)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigTableWidget.resizeEvent"]], "row() (siriushla.as_ap_configdb.client_configdb.treeitem method)": [[2, "siriushla.as_ap_configdb.client_configdb.TreeItem.row"]], "rowcount() (siriushla.as_ap_configdb.client_configdb.jsontreemodel method)": [[2, "siriushla.as_ap_configdb.client_configdb.JsonTreeModel.rowCount"]], "setupmodeldata() (siriushla.as_ap_configdb.client_configdb.jsontreemodel method)": [[2, "siriushla.as_ap_configdb.client_configdb.JsonTreeModel.setupModelData"]], "setupui() (siriushla.as_ap_configdb.configwidgets.configdbinfoheader method)": [[2, "siriushla.as_ap_configdb.configwidgets.ConfigDBInfoHeader.setupui"]], "siriushla.as_ap_configdb": [[2, "module-siriushla.as_ap_configdb"]], "siriushla.as_ap_configdb.client_configdb": [[2, "module-siriushla.as_ap_configdb.client_configdb"]], "siriushla.as_ap_configdb.configdialogs": [[2, "module-siriushla.as_ap_configdb.configdialogs"]], "siriushla.as_ap_configdb.configwidgets": [[2, "module-siriushla.as_ap_configdb.configwidgets"]], "configdbtablemodel (class in siriushla.as_ap_configdb.models.config_db_table_model)": [[3, "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel"]], "confignamesmodel (class in siriushla.as_ap_configdb.models.config_names_model)": [[3, "siriushla.as_ap_configdb.models.config_names_model.ConfigNamesModel"]], "configpvstypemodel (class in siriushla.as_ap_configdb.models.config_types_model)": [[3, "siriushla.as_ap_configdb.models.config_types_model.ConfigPVsTypeModel"]], "configtypemodel (class in siriushla.as_ap_configdb.models.config_types_model)": [[3, "siriushla.as_ap_configdb.models.config_types_model.ConfigTypeModel"]], "pvconfigurationtablemodel (class in siriushla.as_ap_configdb.models.pv_configuration_model)": [[3, "siriushla.as_ap_configdb.models.pv_configuration_model.PVConfigurationTableModel"]], "columncount() (siriushla.as_ap_configdb.models.config_db_table_model.configdbtablemodel method)": [[3, "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel.columnCount"]], "columncount() (siriushla.as_ap_configdb.models.config_names_model.confignamesmodel method)": [[3, "siriushla.as_ap_configdb.models.config_names_model.ConfigNamesModel.columnCount"]], "columncount() (siriushla.as_ap_configdb.models.config_types_model.configtypemodel method)": [[3, "siriushla.as_ap_configdb.models.config_types_model.ConfigTypeModel.columnCount"]], "columncount() (siriushla.as_ap_configdb.models.pv_configuration_model.pvconfigurationtablemodel method)": [[3, "siriushla.as_ap_configdb.models.pv_configuration_model.PVConfigurationTableModel.columnCount"]], "config_type (siriushla.as_ap_configdb.models.config_db_table_model.configdbtablemodel property)": [[3, "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel.config_type"]], "config_type (siriushla.as_ap_configdb.models.config_names_model.confignamesmodel property)": [[3, "siriushla.as_ap_configdb.models.config_names_model.ConfigNamesModel.config_type"]], "config_type (siriushla.as_ap_configdb.models.pv_configuration_model.pvconfigurationtablemodel property)": [[3, "siriushla.as_ap_configdb.models.pv_configuration_model.PVConfigurationTableModel.config_type"]], "connectionerror (siriushla.as_ap_configdb.models.config_db_table_model.configdbtablemodel attribute)": [[3, "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel.connectionError"]], "data() (siriushla.as_ap_configdb.models.config_db_table_model.configdbtablemodel method)": [[3, "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel.data"]], "data() (siriushla.as_ap_configdb.models.config_names_model.confignamesmodel method)": [[3, "siriushla.as_ap_configdb.models.config_names_model.ConfigNamesModel.data"]], "data() (siriushla.as_ap_configdb.models.config_types_model.configtypemodel method)": [[3, "siriushla.as_ap_configdb.models.config_types_model.ConfigTypeModel.data"]], "data() (siriushla.as_ap_configdb.models.pv_configuration_model.pvconfigurationtablemodel method)": [[3, "siriushla.as_ap_configdb.models.pv_configuration_model.PVConfigurationTableModel.data"]], "flags() (siriushla.as_ap_configdb.models.config_db_table_model.configdbtablemodel method)": [[3, "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel.flags"]], "flags() (siriushla.as_ap_configdb.models.pv_configuration_model.pvconfigurationtablemodel method)": [[3, "siriushla.as_ap_configdb.models.pv_configuration_model.PVConfigurationTableModel.flags"]], "headerdata() (siriushla.as_ap_configdb.models.config_db_table_model.configdbtablemodel method)": [[3, "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel.headerData"]], "headerdata() (siriushla.as_ap_configdb.models.pv_configuration_model.pvconfigurationtablemodel method)": [[3, "siriushla.as_ap_configdb.models.pv_configuration_model.PVConfigurationTableModel.headerData"]], "horizontalheader (siriushla.as_ap_configdb.models.config_db_table_model.configdbtablemodel attribute)": [[3, "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel.horizontalHeader"]], "model_data (siriushla.as_ap_configdb.models.pv_configuration_model.pvconfigurationtablemodel property)": [[3, "siriushla.as_ap_configdb.models.pv_configuration_model.PVConfigurationTableModel.model_data"]], "removerow (siriushla.as_ap_configdb.models.config_db_table_model.configdbtablemodel attribute)": [[3, "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel.removeRow"]], "removerows() (siriushla.as_ap_configdb.models.config_db_table_model.configdbtablemodel method)": [[3, "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel.removeRows"]], "rowcount() (siriushla.as_ap_configdb.models.config_db_table_model.configdbtablemodel method)": [[3, "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel.rowCount"]], "rowcount() (siriushla.as_ap_configdb.models.config_names_model.confignamesmodel method)": [[3, "siriushla.as_ap_configdb.models.config_names_model.ConfigNamesModel.rowCount"]], "rowcount() (siriushla.as_ap_configdb.models.config_types_model.configtypemodel method)": [[3, "siriushla.as_ap_configdb.models.config_types_model.ConfigTypeModel.rowCount"]], "rowcount() (siriushla.as_ap_configdb.models.pv_configuration_model.pvconfigurationtablemodel method)": [[3, "siriushla.as_ap_configdb.models.pv_configuration_model.PVConfigurationTableModel.rowCount"]], "setdata() (siriushla.as_ap_configdb.models.pv_configuration_model.pvconfigurationtablemodel method)": [[3, "siriushla.as_ap_configdb.models.pv_configuration_model.PVConfigurationTableModel.setData"]], "setupmodeldata() (siriushla.as_ap_configdb.models.config_db_table_model.configdbtablemodel method)": [[3, "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel.setupModelData"]], "setupmodeldata() (siriushla.as_ap_configdb.models.config_names_model.confignamesmodel method)": [[3, "siriushla.as_ap_configdb.models.config_names_model.ConfigNamesModel.setupModelData"]], "setupmodeldata() (siriushla.as_ap_configdb.models.config_types_model.configpvstypemodel method)": [[3, "siriushla.as_ap_configdb.models.config_types_model.ConfigPVsTypeModel.setupModelData"]], "setupmodeldata() (siriushla.as_ap_configdb.models.config_types_model.configtypemodel method)": [[3, "siriushla.as_ap_configdb.models.config_types_model.ConfigTypeModel.setupModelData"]], "setupmodeldata() (siriushla.as_ap_configdb.models.pv_configuration_model.pvconfigurationtablemodel method)": [[3, "siriushla.as_ap_configdb.models.pv_configuration_model.PVConfigurationTableModel.setupModelData"]], "siriushla.as_ap_configdb.models": [[3, "module-siriushla.as_ap_configdb.models"]], "siriushla.as_ap_configdb.models.config_db_table_model": [[3, "module-siriushla.as_ap_configdb.models.config_db_table_model"]], "siriushla.as_ap_configdb.models.config_names_model": [[3, "module-siriushla.as_ap_configdb.models.config_names_model"]], "siriushla.as_ap_configdb.models.config_types_model": [[3, "module-siriushla.as_ap_configdb.models.config_types_model"]], "siriushla.as_ap_configdb.models.pv_configuration_model": [[3, "module-siriushla.as_ap_configdb.models.pv_configuration_model"]], "sort() (siriushla.as_ap_configdb.models.config_db_table_model.configdbtablemodel method)": [[3, "siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel.sort"]], "chromaticity (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel attribute)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.CHROMATICITY"]], "configdelegate (class in siriushla.as_ap_configdb.normconfigs.configmodel)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigDelegate"]], "configmanagerwindow (class in siriushla.as_ap_configdb.normconfigs.configmanagerwindow)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow.ConfigManagerWindow"]], "configmodel (class in siriushla.as_ap_configdb.normconfigs.configmodel)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel"]], "configuration (class in siriushla.as_ap_configdb.normconfigs.configmodel)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration"]], "loadingthread (class in siriushla.as_ap_configdb.normconfigs.loadingthread)": [[4, "siriushla.as_ap_configdb.normconfigs.LoadingThread.LoadingThread"]], "new_configuration (siriushla.as_ap_configdb.normconfigs.configmanagerwindow.configmanagerwindow attribute)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow.ConfigManagerWindow.NEW_CONFIGURATION"]], "tune (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel attribute)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.TUNE"]], "tunedlg (class in siriushla.as_ap_configdb.normconfigs.tunedlg)": [[4, "siriushla.as_ap_configdb.normconfigs.TuneDlg.TuneDlg"]], "undo_memory (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel attribute)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.UNDO_MEMORY"]], "vaca_prefix (siriushla.as_ap_configdb.normconfigs.loadingthread.loadingthread attribute)": [[4, "siriushla.as_ap_configdb.normconfigs.LoadingThread.LoadingThread.VACA_PREFIX"]], "cleanundo() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.cleanUndo"]], "closeconfiguration() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.closeConfiguration"]], "closeevent() (siriushla.as_ap_configdb.normconfigs.configmanagerwindow.configmanagerwindow method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow.ConfigManagerWindow.closeEvent"]], "columncount() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.columnCount"]], "configurations (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel property)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.configurations"]], "createeditor() (siriushla.as_ap_configdb.normconfigs.configmodel.configdelegate method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigDelegate.createEditor"]], "data() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.data"]], "delete() (siriushla.as_ap_configdb.normconfigs.configmodel.configuration method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration.delete"]], "deleteconfiguration() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.deleteConfiguration"]], "delete_config() (siriushla.as_ap_configdb.normconfigs.configmodel.configuration static method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration.delete_config"]], "deriveconfiguration() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.deriveConfiguration"]], "dirty (siriushla.as_ap_configdb.normconfigs.configmodel.configuration property)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration.dirty"]], "flags() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.flags"]], "getconfigurationcolumn() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.getConfigurationColumn"]], "getconfigurations() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.getConfigurations"]], "gettunematrix() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.getTuneMatrix"]], "headerdata() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.headerData"]], "insertcolumn() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.insertColumn"]], "interpolateconfiguration() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.interpolateConfiguration"]], "keypressevent() (siriushla.as_ap_configdb.normconfigs.configmanagerwindow.configmanagerwindow method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow.ConfigManagerWindow.keyPressEvent"]], "loadconfiguration() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.loadConfiguration"]], "loadconfiguration() (siriushla.as_ap_configdb.normconfigs.configmodel.configuration static method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration.loadConfiguration"]], "name (siriushla.as_ap_configdb.normconfigs.configmodel.configuration property)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration.name"]], "newconfiguration() (siriushla.as_ap_configdb.normconfigs.configmodel.configuration static method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration.newConfiguration"]], "old_name (siriushla.as_ap_configdb.normconfigs.configmodel.configuration property)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration.old_name"]], "paint() (siriushla.as_ap_configdb.normconfigs.configmodel.configdelegate method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigDelegate.paint"]], "removecolumns() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.removeColumns"]], "renameconfiguration() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.renameConfiguration"]], "rowcount() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.rowCount"]], "run() (siriushla.as_ap_configdb.normconfigs.loadingthread.loadingthread method)": [[4, "siriushla.as_ap_configdb.normconfigs.LoadingThread.LoadingThread.run"]], "save() (siriushla.as_ap_configdb.normconfigs.configmodel.configuration method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration.save"]], "saveconfiguration() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.saveConfiguration"]], "setdata() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.setData"]], "setdataalt() (siriushla.as_ap_configdb.normconfigs.configmodel.configmodel method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel.setDataAlt"]], "seteditordata() (siriushla.as_ap_configdb.normconfigs.configmodel.configdelegate method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigDelegate.setEditorData"]], "setvalue() (siriushla.as_ap_configdb.normconfigs.configmodel.configuration method)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration.setValue"]], "siriushla.as_ap_configdb.normconfigs": [[4, "module-siriushla.as_ap_configdb.normconfigs"]], "siriushla.as_ap_configdb.normconfigs.configmanagerwindow": [[4, "module-siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow"]], "siriushla.as_ap_configdb.normconfigs.configmodel": [[4, "module-siriushla.as_ap_configdb.normconfigs.ConfigModel"]], "siriushla.as_ap_configdb.normconfigs.loadingthread": [[4, "module-siriushla.as_ap_configdb.normconfigs.LoadingThread"]], "siriushla.as_ap_configdb.normconfigs.tunedlg": [[4, "module-siriushla.as_ap_configdb.normconfigs.TuneDlg"]], "taskfinished (siriushla.as_ap_configdb.normconfigs.loadingthread.loadingthread attribute)": [[4, "siriushla.as_ap_configdb.normconfigs.LoadingThread.LoadingThread.taskFinished"]], "taskupdated (siriushla.as_ap_configdb.normconfigs.loadingthread.loadingthread attribute)": [[4, "siriushla.as_ap_configdb.normconfigs.LoadingThread.LoadingThread.taskUpdated"]], "values (siriushla.as_ap_configdb.normconfigs.configmodel.configuration property)": [[4, "siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration.values"]], "loadandapplyconfig2machinewindow (class in siriushla.as_ap_configdb.pvsconfigs.load_and_apply)": [[5, "siriushla.as_ap_configdb.pvsconfigs.load_and_apply.LoadAndApplyConfig2MachineWindow"]], "pvsconfigmanager (class in siriushla.as_ap_configdb.pvsconfigs.main)": [[5, "siriushla.as_ap_configdb.pvsconfigs.main.PVsConfigManager"]], "readandsaveconfig2serverwindow (class in siriushla.as_ap_configdb.pvsconfigs.read_and_save)": [[5, "siriushla.as_ap_configdb.pvsconfigs.read_and_save.ReadAndSaveConfig2ServerWindow"]], "selectandapplypvswidget (class in siriushla.as_ap_configdb.pvsconfigs.load_and_apply)": [[5, "siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectAndApplyPVsWidget"]], "selectconfigwidget (class in siriushla.as_ap_configdb.pvsconfigs.load_and_apply)": [[5, "siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectConfigWidget"]], "configchanged (siriushla.as_ap_configdb.pvsconfigs.load_and_apply.selectconfigwidget attribute)": [[5, "siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectConfigWidget.configChanged"]], "current_config (siriushla.as_ap_configdb.pvsconfigs.load_and_apply.selectandapplypvswidget property)": [[5, "siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectAndApplyPVsWidget.current_config"]], "current_config_type (siriushla.as_ap_configdb.pvsconfigs.load_and_apply.selectandapplypvswidget property)": [[5, "siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectAndApplyPVsWidget.current_config_type"]], "current_config_type (siriushla.as_ap_configdb.pvsconfigs.load_and_apply.selectconfigwidget property)": [[5, "siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectConfigWidget.current_config_type"]], "fill_config() (siriushla.as_ap_configdb.pvsconfigs.load_and_apply.selectandapplypvswidget method)": [[5, "siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectAndApplyPVsWidget.fill_config"]], "settingfinished (siriushla.as_ap_configdb.pvsconfigs.load_and_apply.selectandapplypvswidget attribute)": [[5, "siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectAndApplyPVsWidget.settingFinished"]], "setupui() (siriushla.as_ap_configdb.pvsconfigs.load_and_apply.selectandapplypvswidget method)": [[5, "siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectAndApplyPVsWidget.setupui"]], "setupui() (siriushla.as_ap_configdb.pvsconfigs.load_and_apply.selectconfigwidget method)": [[5, "siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectConfigWidget.setupui"]], "siriushla.as_ap_configdb.pvsconfigs": [[5, "module-siriushla.as_ap_configdb.pvsconfigs"]], "siriushla.as_ap_configdb.pvsconfigs.load_and_apply": [[5, "module-siriushla.as_ap_configdb.pvsconfigs.load_and_apply"]], "siriushla.as_ap_configdb.pvsconfigs.main": [[5, "module-siriushla.as_ap_configdb.pvsconfigs.main"]], "siriushla.as_ap_configdb.pvsconfigs.read_and_save": [[5, "module-siriushla.as_ap_configdb.pvsconfigs.read_and_save"]], "pvconfigurationdelegate (class in siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate)": [[6, "siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate.PVConfigurationDelegate"]], "createeditor() (siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate.pvconfigurationdelegate method)": [[6, "siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate.PVConfigurationDelegate.createEditor"]], "seteditordata() (siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate.pvconfigurationdelegate method)": [[6, "siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate.PVConfigurationDelegate.setEditorData"]], "siriushla.as_ap_configdb.pvsconfigs.delegate": [[6, "module-siriushla.as_ap_configdb.pvsconfigs.delegate"]], "siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate": [[6, "module-siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate"]], "bomonitor (class in siriushla.as_ap_currinfo.charge_monitor)": [[7, "siriushla.as_ap_currinfo.charge_monitor.BOMonitor"]], "currltwindow (class in siriushla.as_ap_currinfo.current_and_lifetime)": [[7, "siriushla.as_ap_currinfo.current_and_lifetime.CurrLTWindow"]], "efficiencymonitor (class in siriushla.as_ap_currinfo.efficiency_monitor)": [[7, "siriushla.as_ap_currinfo.efficiency_monitor.EfficiencyMonitor"]], "siriushla.as_ap_currinfo": [[7, "module-siriushla.as_ap_currinfo"]], "siriushla.as_ap_currinfo.charge_monitor": [[7, "module-siriushla.as_ap_currinfo.charge_monitor"]], "siriushla.as_ap_currinfo.current_and_lifetime": [[7, "module-siriushla.as_ap_currinfo.current_and_lifetime"]], "siriushla.as_ap_currinfo.efficiency_monitor": [[7, "module-siriushla.as_ap_currinfo.efficiency_monitor"]], "energybutton (class in siriushla.as_ap_energybutton.energy_button)": [[8, "siriushla.as_ap_energybutton.energy_button.EnergyButton"]], "energysetterwindow (class in siriushla.as_ap_energybutton.energy_setter_window)": [[8, "siriushla.as_ap_energybutton.energy_setter_window.EnergySetterWindow"]], "init_section() (in module siriushla.as_ap_energybutton.set_energy)": [[8, "siriushla.as_ap_energybutton.set_energy.init_section"]], "lower_limit (siriushla.as_ap_energybutton.energy_button.energybutton property)": [[8, "siriushla.as_ap_energybutton.energy_button.EnergyButton.lower_limit"]], "section (siriushla.as_ap_energybutton.energy_button.energybutton property)": [[8, "siriushla.as_ap_energybutton.energy_button.EnergyButton.section"]], "siriushla.as_ap_energybutton": [[8, "module-siriushla.as_ap_energybutton"]], "siriushla.as_ap_energybutton.energy_button": [[8, "module-siriushla.as_ap_energybutton.energy_button"]], "siriushla.as_ap_energybutton.energy_setter_window": [[8, "module-siriushla.as_ap_energybutton.energy_setter_window"]], "siriushla.as_ap_energybutton.set_energy": [[8, "module-siriushla.as_ap_energybutton.set_energy"]], "upper_limit (siriushla.as_ap_energybutton.energy_button.energybutton property)": [[8, "siriushla.as_ap_energybutton.energy_button.EnergyButton.upper_limit"]], "basewindow (class in siriushla.as_ap_injcontrol.base)": [[9, "siriushla.as_ap_injcontrol.base.BaseWindow"]], "injbocontrolwindow (class in siriushla.as_ap_injcontrol.injbo)": [[9, "siriushla.as_ap_injcontrol.injbo.InjBOControlWindow"]], "tlcontrolwindow (class in siriushla.as_ap_injcontrol.tbts)": [[9, "siriushla.as_ap_injcontrol.tbts.TLControlWindow"]], "keypressevent() (siriushla.as_ap_injcontrol.tbts.tlcontrolwindow method)": [[9, "siriushla.as_ap_injcontrol.tbts.TLControlWindow.keyPressEvent"]], "siriushla.as_ap_injcontrol": [[9, "module-siriushla.as_ap_injcontrol"]], "siriushla.as_ap_injcontrol.base": [[9, "module-siriushla.as_ap_injcontrol.base"]], "siriushla.as_ap_injcontrol.injbo": [[9, "module-siriushla.as_ap_injcontrol.injbo"]], "siriushla.as_ap_injcontrol.tbts": [[9, "module-siriushla.as_ap_injcontrol.tbts"]], "biasfbdetaildialog (class in siriushla.as_ap_injection.auxiliary_dialogs)": [[10, "siriushla.as_ap_injection.auxiliary_dialogs.BiasFBDetailDialog"]], "clocklabel (class in siriushla.as_ap_injection.widgets)": [[10, "siriushla.as_ap_injection.widgets.ClockLabel"]], "injctrlwindow (class in siriushla.as_ap_injection.main)": [[10, "siriushla.as_ap_injection.main.InjCtrlWindow"]], "injdiagled (class in siriushla.as_ap_injection.widgets)": [[10, "siriushla.as_ap_injection.widgets.InjDiagLed"]], "injsysstbycontrolwidget (class in siriushla.as_ap_injection.widgets)": [[10, "siriushla.as_ap_injection.widgets.InjSysStbyControlWidget"]], "injsysstbyled (class in siriushla.as_ap_injection.widgets)": [[10, "siriushla.as_ap_injection.widgets.InjSysStbyLed"]], "monitorsummarywidget (class in siriushla.as_ap_injection.widgets)": [[10, "siriushla.as_ap_injection.widgets.MonitorSummaryWidget"]], "pumodesettingsdialog (class in siriushla.as_ap_injection.auxiliary_dialogs)": [[10, "siriushla.as_ap_injection.auxiliary_dialogs.PUModeSettingsDialog"]], "rfkillbeambutton (class in siriushla.as_ap_injection.killbeam_widgets)": [[10, "siriushla.as_ap_injection.killbeam_widgets.RFKillBeamButton"]], "taskstatuslabel (class in siriushla.as_ap_injection.widgets)": [[10, "siriushla.as_ap_injection.widgets.TaskStatusLabel"]], "topupsettingsdialog (class in siriushla.as_ap_injection.auxiliary_dialogs)": [[10, "siriushla.as_ap_injection.auxiliary_dialogs.TopUpSettingsDialog"]], "changeevent() (siriushla.as_ap_injection.main.injctrlwindow method)": [[10, "siriushla.as_ap_injection.main.InjCtrlWindow.changeEvent"]], "contextmenuevent() (siriushla.as_ap_injection.widgets.injsysstbycontrolwidget method)": [[10, "siriushla.as_ap_injection.widgets.InjSysStbyControlWidget.contextMenuEvent"]], "expand (siriushla.as_ap_injection.widgets.injsysstbycontrolwidget attribute)": [[10, "siriushla.as_ap_injection.widgets.InjSysStbyControlWidget.expand"]], "mousedoubleclickevent() (siriushla.as_ap_injection.main.injctrlwindow method)": [[10, "siriushla.as_ap_injection.main.InjCtrlWindow.mouseDoubleClickEvent"]], "mousedoubleclickevent() (siriushla.as_ap_injection.widgets.injdiagled method)": [[10, "siriushla.as_ap_injection.widgets.InjDiagLed.mouseDoubleClickEvent"]], "mousedoubleclickevent() (siriushla.as_ap_injection.widgets.injsysstbyled method)": [[10, "siriushla.as_ap_injection.widgets.InjSysStbyLed.mouseDoubleClickEvent"]], "showegun (siriushla.as_ap_injection.main.injctrlwindow attribute)": [[10, "siriushla.as_ap_injection.main.InjCtrlWindow.showEgun"]], "showmonitor (siriushla.as_ap_injection.main.injctrlwindow attribute)": [[10, "siriushla.as_ap_injection.main.InjCtrlWindow.showMonitor"]], "showstatus (siriushla.as_ap_injection.main.injctrlwindow attribute)": [[10, "siriushla.as_ap_injection.main.InjCtrlWindow.showStatus"]], "siriushla.as_ap_injection": [[10, "module-siriushla.as_ap_injection"]], "siriushla.as_ap_injection.auxiliary_dialogs": [[10, "module-siriushla.as_ap_injection.auxiliary_dialogs"]], "siriushla.as_ap_injection.killbeam_widgets": [[10, "module-siriushla.as_ap_injection.killbeam_widgets"]], "siriushla.as_ap_injection.main": [[10, "module-siriushla.as_ap_injection.main"]], "siriushla.as_ap_injection.widgets": [[10, "module-siriushla.as_ap_injection.widgets"]], "mainlauncher (class in siriushla.as_ap_launcher.main)": [[11, "siriushla.as_ap_launcher.main.MainLauncher"]], "changeevent() (siriushla.as_ap_launcher.main.mainlauncher method)": [[11, "siriushla.as_ap_launcher.main.MainLauncher.changeEvent"]], "get_object() (in module siriushla.as_ap_launcher.menu)": [[11, "siriushla.as_ap_launcher.menu.get_object"]], "get_pushbutton() (in module siriushla.as_ap_launcher.menu)": [[11, "siriushla.as_ap_launcher.menu.get_pushbutton"]], "mousedoubleclickevent() (siriushla.as_ap_launcher.main.mainlauncher method)": [[11, "siriushla.as_ap_launcher.main.MainLauncher.mouseDoubleClickEvent"]], "showegun (siriushla.as_ap_launcher.main.mainlauncher attribute)": [[11, "siriushla.as_ap_launcher.main.MainLauncher.showEgun"]], "showmonitor (siriushla.as_ap_launcher.main.mainlauncher attribute)": [[11, "siriushla.as_ap_launcher.main.MainLauncher.showMonitor"]], "showstatus (siriushla.as_ap_launcher.main.mainlauncher attribute)": [[11, "siriushla.as_ap_launcher.main.MainLauncher.showStatus"]], "siriushla.as_ap_launcher": [[11, "module-siriushla.as_ap_launcher"]], "siriushla.as_ap_launcher.main": [[11, "module-siriushla.as_ap_launcher.main"]], "siriushla.as_ap_launcher.menu": [[11, "module-siriushla.as_ap_launcher.menu"]], "machshiftlabel (class in siriushla.as_ap_machshift.widgets)": [[12, "siriushla.as_ap_machshift.widgets.MachShiftLabel"]], "siriushla.as_ap_machshift": [[12, "module-siriushla.as_ap_machshift"]], "siriushla.as_ap_machshift.widgets": [[12, "module-siriushla.as_ap_machshift.widgets"]], "lbdata (class in siriushla.as_ap_macreport.main)": [[13, "siriushla.as_ap_macreport.main.LbData"]], "lbhheader (class in siriushla.as_ap_macreport.main)": [[13, "siriushla.as_ap_macreport.main.LbHHeader"]], "lbvheader (class in siriushla.as_ap_macreport.main)": [[13, "siriushla.as_ap_macreport.main.LbVHeader"]], "macreportwindow (class in siriushla.as_ap_macreport.main)": [[13, "siriushla.as_ap_macreport.main.MacReportWindow"]], "updatetask (class in siriushla.as_ap_macreport.main)": [[13, "siriushla.as_ap_macreport.main.UpdateTask"]], "exit_task() (siriushla.as_ap_macreport.main.updatetask method)": [[13, "siriushla.as_ap_macreport.main.UpdateTask.exit_task"]], "run() (siriushla.as_ap_macreport.main.updatetask method)": [[13, "siriushla.as_ap_macreport.main.UpdateTask.run"]], "siriushla.as_ap_macreport": [[13, "module-siriushla.as_ap_macreport"]], "siriushla.as_ap_macreport.main": [[13, "module-siriushla.as_ap_macreport.main"]], "update() (siriushla.as_ap_macreport.main.updatetask method)": [[13, "siriushla.as_ap_macreport.main.UpdateTask.update"]], "updated (siriushla.as_ap_macreport.main.updatetask attribute)": [[13, "siriushla.as_ap_macreport.main.UpdateTask.updated"]], "magoffconvapp (class in siriushla.as_ap_magoffconv.main)": [[14, "siriushla.as_ap_magoffconv.main.MagOffConvApp"]], "siriushla.as_ap_magoffconv": [[14, "module-siriushla.as_ap_magoffconv"]], "siriushla.as_ap_magoffconv.main": [[14, "module-siriushla.as_ap_magoffconv.main"]], "energymeasure (class in siriushla.as_ap_measure.energy_meas)": [[15, "siriushla.as_ap_measure.energy_meas.EnergyMeasure"]], "nrpoints_edited() (siriushla.as_ap_measure.energy_meas.energymeasure method)": [[15, "siriushla.as_ap_measure.energy_meas.EnergyMeasure.nrpoints_edited"]], "pb_reset_data_clicked() (siriushla.as_ap_measure.energy_meas.energymeasure method)": [[15, "siriushla.as_ap_measure.energy_meas.EnergyMeasure.pb_reset_data_clicked"]], "siriushla.as_ap_measure.energy_meas": [[15, "module-siriushla.as_ap_measure.energy_meas"]], "siriusmonitor (class in siriushla.as_ap_monitor.main)": [[16, "siriushla.as_ap_monitor.main.SiriusMonitor"]], "get_label2devices() (in module siriushla.as_ap_monitor.util)": [[16, "siriushla.as_ap_monitor.util.get_label2devices"]], "get_sec2dev_laypos() (in module siriushla.as_ap_monitor.util)": [[16, "siriushla.as_ap_monitor.util.get_sec2dev_laypos"]], "siriushla.as_ap_monitor": [[16, "module-siriushla.as_ap_monitor"]], "siriushla.as_ap_monitor.main": [[16, "module-siriushla.as_ap_monitor.main"]], "siriushla.as_ap_monitor.util": [[16, "module-siriushla.as_ap_monitor.util"]], "configlineedit (class in siriushla.as_ap_opticscorr.custom_widgets)": [[17, "siriushla.as_ap_opticscorr.custom_widgets.ConfigLineEdit"]], "corrparamsdetailwindow (class in siriushla.as_ap_opticscorr.details)": [[17, "siriushla.as_ap_opticscorr.details.CorrParamsDetailWindow"]], "opticscorrwindow (class in siriushla.as_ap_opticscorr.main)": [[17, "siriushla.as_ap_opticscorr.main.OpticsCorrWindow"]], "statusled (class in siriushla.as_ap_opticscorr.custom_widgets)": [[17, "siriushla.as_ap_opticscorr.custom_widgets.StatusLed"]], "mousedoubleclickevent() (siriushla.as_ap_opticscorr.custom_widgets.statusled method)": [[17, "siriushla.as_ap_opticscorr.custom_widgets.StatusLed.mouseDoubleClickEvent"]], "mousereleaseevent() (siriushla.as_ap_opticscorr.custom_widgets.configlineedit method)": [[17, "siriushla.as_ap_opticscorr.custom_widgets.ConfigLineEdit.mouseReleaseEvent"]], "siriushla.as_ap_opticscorr": [[17, "module-siriushla.as_ap_opticscorr"]], "siriushla.as_ap_opticscorr.custom_widgets": [[17, "module-siriushla.as_ap_opticscorr.custom_widgets"]], "siriushla.as_ap_opticscorr.details": [[17, "module-siriushla.as_ap_opticscorr.details"]], "siriushla.as_ap_opticscorr.main": [[17, "module-siriushla.as_ap_opticscorr.main"]], "corrparamsdetailwindow (class in siriushla.as_ap_posang.hlposang)": [[18, "siriushla.as_ap_posang.HLPosAng.CorrParamsDetailWindow"]], "posangcorr (class in siriushla.as_ap_posang.hlposang)": [[18, "siriushla.as_ap_posang.HLPosAng.PosAngCorr"]], "siriushla.as_ap_posang": [[18, "module-siriushla.as_ap_posang"]], "siriushla.as_ap_posang.hlposang": [[18, "module-siriushla.as_ap_posang.HLPosAng"]], "siriushla.as_ap_rabpmmon.util": [[19, "module-siriushla.as_ap_rabpmmon.util"]], "ref_tot_dose (siriushla.as_ap_radmon.main.radtotdosemonitor attribute)": [[20, "siriushla.as_ap_radmon.main.RadTotDoseMonitor.REF_TOT_DOSE"]], "radtotdosemonitor (class in siriushla.as_ap_radmon.main)": [[20, "siriushla.as_ap_radmon.main.RadTotDoseMonitor"]], "sensor2loc (siriushla.as_ap_radmon.main.radtotdosemonitor attribute)": [[20, "siriushla.as_ap_radmon.main.RadTotDoseMonitor.SENSOR2LOC"]], "changeevent() (siriushla.as_ap_radmon.main.radtotdosemonitor method)": [[20, "siriushla.as_ap_radmon.main.RadTotDoseMonitor.changeEvent"]], "contextmenuevent() (siriushla.as_ap_radmon.main.radtotdosemonitor method)": [[20, "siriushla.as_ap_radmon.main.RadTotDoseMonitor.contextMenuEvent"]], "siriushla.as_ap_radmon": [[20, "module-siriushla.as_ap_radmon"]], "siriushla.as_ap_radmon.main": [[20, "module-siriushla.as_ap_radmon.main"]], "default_dir (siriushla.as_ap_sofb.orbit_register.orbitregister attribute)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegister.DEFAULT_DIR"]], "max_bump_curr (siriushla.as_ap_sofb.orbit_register.orbitregister attribute)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegister.MAX_BUMP_CURR"]], "mainwindow (class in siriushla.as_ap_sofb.main)": [[21, "siriushla.as_ap_sofb.main.MainWindow"]], "orbitregister (class in siriushla.as_ap_sofb.orbit_register)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegister"]], "orbitregisters (class in siriushla.as_ap_sofb.orbit_register)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegisters"]], "acc (siriushla.as_ap_sofb.main.mainwindow property)": [[21, "siriushla.as_ap_sofb.main.MainWindow.acc"]], "acc_idx (siriushla.as_ap_sofb.main.mainwindow property)": [[21, "siriushla.as_ap_sofb.main.MainWindow.acc_idx"]], "channels() (siriushla.as_ap_sofb.orbit_register.orbitregisters method)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegisters.channels"]], "get_registers_control() (siriushla.as_ap_sofb.orbit_register.orbitregisters method)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegisters.get_registers_control"]], "getorbx() (siriushla.as_ap_sofb.orbit_register.orbitregister method)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegister.getorbx"]], "getorby() (siriushla.as_ap_sofb.orbit_register.orbitregister method)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegister.getorby"]], "isring (siriushla.as_ap_sofb.main.mainwindow property)": [[21, "siriushla.as_ap_sofb.main.MainWindow.isring"]], "new_orbx_signal (siriushla.as_ap_sofb.orbit_register.orbitregister attribute)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegister.new_orbx_signal"]], "new_orby_signal (siriushla.as_ap_sofb.orbit_register.orbitregister attribute)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegister.new_orby_signal"]], "new_string_signal (siriushla.as_ap_sofb.orbit_register.orbitregister attribute)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegister.new_string_signal"]], "orbx (siriushla.as_ap_sofb.orbit_register.orbitregister property)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegister.orbx"]], "orby (siriushla.as_ap_sofb.orbit_register.orbitregister property)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegister.orby"]], "setup_ui() (siriushla.as_ap_sofb.orbit_register.orbitregister method)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegister.setup_ui"]], "setupui() (siriushla.as_ap_sofb.main.mainwindow method)": [[21, "siriushla.as_ap_sofb.main.MainWindow.setupui"]], "setupui() (siriushla.as_ap_sofb.orbit_register.orbitregisters method)": [[21, "siriushla.as_ap_sofb.orbit_register.OrbitRegisters.setupui"]], "siriushla.as_ap_sofb": [[21, "module-siriushla.as_ap_sofb"]], "siriushla.as_ap_sofb.main": [[21, "module-siriushla.as_ap_sofb.main"]], "siriushla.as_ap_sofb.orbit_register": [[21, "module-siriushla.as_ap_sofb.orbit_register"]], "basewidget (class in siriushla.as_ap_sofb.graphics.base)": [[22, "siriushla.as_ap_sofb.graphics.base.BaseWidget"]], "correctorswidget (class in siriushla.as_ap_sofb.graphics.correctors)": [[22, "siriushla.as_ap_sofb.graphics.correctors.CorrectorsWidget"]], "default_dir (siriushla.as_ap_sofb.graphics.base.basewidget attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.BaseWidget.DEFAULT_DIR"]], "fmt (siriushla.as_ap_sofb.graphics.base.label attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.Label.FMT"]], "graph (class in siriushla.as_ap_sofb.graphics.base)": [[22, "siriushla.as_ap_sofb.graphics.base.Graph"]], "infline (class in siriushla.as_ap_sofb.graphics.base)": [[22, "siriushla.as_ap_sofb.graphics.base.InfLine"]], "label (class in siriushla.as_ap_sofb.graphics.base)": [[22, "siriushla.as_ap_sofb.graphics.base.Label"]], "multiturnsumwidget (class in siriushla.as_ap_sofb.graphics.orbit)": [[22, "siriushla.as_ap_sofb.graphics.orbit.MultiTurnSumWidget"]], "multiturnwidget (class in siriushla.as_ap_sofb.graphics.orbit)": [[22, "siriushla.as_ap_sofb.graphics.orbit.MultiTurnWidget"]], "orbitwidget (class in siriushla.as_ap_sofb.graphics.orbit)": [[22, "siriushla.as_ap_sofb.graphics.orbit.OrbitWidget"]], "showmatrixwidget (class in siriushla.as_ap_sofb.graphics.respmat)": [[22, "siriushla.as_ap_sofb.graphics.respmat.ShowMatrixWidget"]], "singlepasssumwidget (class in siriushla.as_ap_sofb.graphics.orbit)": [[22, "siriushla.as_ap_sofb.graphics.orbit.SinglePassSumWidget"]], "singularvalues (class in siriushla.as_ap_sofb.graphics.respmat)": [[22, "siriushla.as_ap_sofb.graphics.respmat.SingularValues"]], "spectrogram (class in siriushla.as_ap_sofb.graphics.orbit)": [[22, "siriushla.as_ap_sofb.graphics.orbit.Spectrogram"]], "unit (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.UNIT"]], "updategraph (class in siriushla.as_ap_sofb.graphics.base)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph"]], "acc (siriushla.as_ap_sofb.graphics.base.basewidget property)": [[22, "siriushla.as_ap_sofb.graphics.base.BaseWidget.acc"]], "acc_idx (siriushla.as_ap_sofb.graphics.base.basewidget property)": [[22, "siriushla.as_ap_sofb.graphics.base.BaseWidget.acc_idx"]], "add_rf_kicks() (siriushla.as_ap_sofb.graphics.correctors.correctorswidget method)": [[22, "siriushla.as_ap_sofb.graphics.correctors.CorrectorsWidget.add_RF_kicks"]], "add_buttons_for_images() (siriushla.as_ap_sofb.graphics.orbit.orbitwidget method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.OrbitWidget.add_buttons_for_images"]], "add_kicklimits_curves() (siriushla.as_ap_sofb.graphics.correctors.correctorswidget method)": [[22, "siriushla.as_ap_sofb.graphics.correctors.CorrectorsWidget.add_kicklimits_curves"]], "ave_mstdx (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.ave_mstdx"]], "ave_mstdy (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.ave_mstdy"]], "ave_pstdx (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.ave_pstdx"]], "ave_pstdy (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.ave_pstdy"]], "avex (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.avex"]], "avey (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.avey"]], "channels() (siriushla.as_ap_sofb.graphics.base.basewidget method)": [[22, "siriushla.as_ap_sofb.graphics.base.BaseWidget.channels"]], "channels() (siriushla.as_ap_sofb.graphics.correctors.correctorswidget method)": [[22, "siriushla.as_ap_sofb.graphics.correctors.CorrectorsWidget.channels"]], "channels() (siriushla.as_ap_sofb.graphics.orbit.orbitwidget method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.OrbitWidget.channels"]], "channels() (siriushla.as_ap_sofb.graphics.orbit.spectrogram method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.Spectrogram.channels"]], "connect_signals() (siriushla.as_ap_sofb.graphics.base.basewidget method)": [[22, "siriushla.as_ap_sofb.graphics.base.BaseWidget.connect_signals"]], "data_sigx (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.data_sigx"]], "data_sigy (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.data_sigy"]], "doubleclick (siriushla.as_ap_sofb.graphics.base.graph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.Graph.doubleclick"]], "get_default_ctrls() (siriushla.as_ap_sofb.graphics.correctors.correctorswidget static method)": [[22, "siriushla.as_ap_sofb.graphics.correctors.CorrectorsWidget.get_default_ctrls"]], "get_default_ctrls() (siriushla.as_ap_sofb.graphics.orbit.orbitwidget static method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.OrbitWidget.get_default_ctrls"]], "hideevent() (siriushla.as_ap_sofb.graphics.orbit.multiturnwidget method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.MultiTurnWidget.hideEvent"]], "isring (siriushla.as_ap_sofb.graphics.base.basewidget property)": [[22, "siriushla.as_ap_sofb.graphics.base.BaseWidget.isring"]], "mousedoubleclickevent() (siriushla.as_ap_sofb.graphics.base.graph method)": [[22, "siriushla.as_ap_sofb.graphics.base.Graph.mouseDoubleClickEvent"]], "mousedoubleclickevent() (siriushla.as_ap_sofb.graphics.orbit.multiturnsumwidget method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.MultiTurnSumWidget.mouseDoubleClickEvent"]], "mousedoubleclickevent() (siriushla.as_ap_sofb.graphics.orbit.spectrogram method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.Spectrogram.mouseDoubleClickEvent"]], "new_data_sig (siriushla.as_ap_sofb.graphics.orbit.spectrogram attribute)": [[22, "siriushla.as_ap_sofb.graphics.orbit.Spectrogram.new_data_sig"]], "p2px (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.p2px"]], "p2py (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.p2py"]], "process_image() (siriushla.as_ap_sofb.graphics.orbit.spectrogram method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.Spectrogram.process_image"]], "ratio_sum_avg (siriushla.as_ap_sofb.graphics.orbit.multiturnsumwidget attribute)": [[22, "siriushla.as_ap_sofb.graphics.orbit.MultiTurnSumWidget.ratio_sum_avg"]], "ratio_sum_std (siriushla.as_ap_sofb.graphics.orbit.multiturnsumwidget attribute)": [[22, "siriushla.as_ap_sofb.graphics.orbit.MultiTurnSumWidget.ratio_sum_std"]], "ref_sigx (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.ref_sigx"]], "ref_sigy (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.ref_sigy"]], "setfloat() (siriushla.as_ap_sofb.graphics.base.label method)": [[22, "siriushla.as_ap_sofb.graphics.base.Label.setFloat"]], "setvalue() (siriushla.as_ap_sofb.graphics.base.infline method)": [[22, "siriushla.as_ap_sofb.graphics.base.InfLine.setValue"]], "setvalue() (siriushla.as_ap_sofb.graphics.respmat.singularvalues method)": [[22, "siriushla.as_ap_sofb.graphics.respmat.SingularValues.setValue"]], "set_enbl_list() (siriushla.as_ap_sofb.graphics.base.updategraph method)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.set_enbl_list"]], "set_visible() (siriushla.as_ap_sofb.graphics.base.updategraph method)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.set_visible"]], "setreforbit() (siriushla.as_ap_sofb.graphics.orbit.spectrogram method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.Spectrogram.setreforbit"]], "setreforbits() (siriushla.as_ap_sofb.graphics.orbit.multiturnwidget method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.MultiTurnWidget.setreforbits"]], "setupui() (siriushla.as_ap_sofb.graphics.base.basewidget method)": [[22, "siriushla.as_ap_sofb.graphics.base.BaseWidget.setupui"]], "setupui() (siriushla.as_ap_sofb.graphics.orbit.multiturnsumwidget method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.MultiTurnSumWidget.setupui"]], "setupui() (siriushla.as_ap_sofb.graphics.orbit.multiturnwidget method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.MultiTurnWidget.setupui"]], "setupui() (siriushla.as_ap_sofb.graphics.orbit.singlepasssumwidget method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.SinglePassSumWidget.setupui"]], "setupui() (siriushla.as_ap_sofb.graphics.respmat.showmatrixwidget method)": [[22, "siriushla.as_ap_sofb.graphics.respmat.ShowMatrixWidget.setupui"]], "setupui() (siriushla.as_ap_sofb.graphics.respmat.singularvalues method)": [[22, "siriushla.as_ap_sofb.graphics.respmat.SingularValues.setupui"]], "showevent() (siriushla.as_ap_sofb.graphics.orbit.multiturnwidget method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.MultiTurnWidget.showEvent"]], "siriushla.as_ap_sofb.graphics": [[22, "module-siriushla.as_ap_sofb.graphics"]], "siriushla.as_ap_sofb.graphics.base": [[22, "module-siriushla.as_ap_sofb.graphics.base"]], "siriushla.as_ap_sofb.graphics.correctors": [[22, "module-siriushla.as_ap_sofb.graphics.correctors"]], "siriushla.as_ap_sofb.graphics.orbit": [[22, "module-siriushla.as_ap_sofb.graphics.orbit"]], "siriushla.as_ap_sofb.graphics.respmat": [[22, "module-siriushla.as_ap_sofb.graphics.respmat"]], "some_changed() (siriushla.as_ap_sofb.graphics.base.updategraph method)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.some_changed"]], "stdx (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.stdx"]], "stdy (siriushla.as_ap_sofb.graphics.base.updategraph attribute)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.stdy"]], "uicreate_combobox() (siriushla.as_ap_sofb.graphics.base.basewidget method)": [[22, "siriushla.as_ap_sofb.graphics.base.BaseWidget.uicreate_combobox"]], "uicreate_groupbox() (siriushla.as_ap_sofb.graphics.base.basewidget method)": [[22, "siriushla.as_ap_sofb.graphics.base.BaseWidget.uicreate_groupbox"]], "uicreate_label() (siriushla.as_ap_sofb.graphics.base.basewidget method)": [[22, "siriushla.as_ap_sofb.graphics.base.BaseWidget.uicreate_label"]], "uigetgraph() (siriushla.as_ap_sofb.graphics.base.basewidget method)": [[22, "siriushla.as_ap_sofb.graphics.base.BaseWidget.uigetgraph"]], "update_graph() (siriushla.as_ap_sofb.graphics.orbit.multiturnsumwidget method)": [[22, "siriushla.as_ap_sofb.graphics.orbit.MultiTurnSumWidget.update_graph"]], "update_graphic() (siriushla.as_ap_sofb.graphics.base.updategraph method)": [[22, "siriushla.as_ap_sofb.graphics.base.UpdateGraph.update_graphic"]], "acqcontrolwidget (class in siriushla.as_ap_sofb.ioc_control.orbit_acquisition)": [[23, "siriushla.as_ap_sofb.ioc_control.orbit_acquisition.AcqControlWidget"]], "basecombo (class in siriushla.as_ap_sofb.ioc_control.base)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseCombo"]], "baseobject (class in siriushla.as_ap_sofb.ioc_control.base)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseObject"]], "basewidget (class in siriushla.as_ap_sofb.ioc_control.base)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseWidget"]], "default_dir (siriushla.as_ap_sofb.ioc_control.respmat.respmatwidget attribute)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat.RespMatWidget.DEFAULT_DIR"]], "drivecontrol (class in siriushla.as_ap_sofb.ioc_control.drive_window)": [[23, "siriushla.as_ap_sofb.ioc_control.drive_window.DriveControl"]], "kicksconfigwidget (class in siriushla.as_ap_sofb.ioc_control.kicks_config)": [[23, "siriushla.as_ap_sofb.ioc_control.kicks_config.KicksConfigWidget"]], "performancewidget (class in siriushla.as_ap_sofb.ioc_control.main)": [[23, "siriushla.as_ap_sofb.ioc_control.main.PerformanceWidget"]], "refcontrol (class in siriushla.as_ap_sofb.ioc_control.main)": [[23, "siriushla.as_ap_sofb.ioc_control.main.RefControl"]], "respmatwidget (class in siriushla.as_ap_sofb.ioc_control.respmat)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat.RespMatWidget"]], "sofbcontrol (class in siriushla.as_ap_sofb.ioc_control.main)": [[23, "siriushla.as_ap_sofb.ioc_control.main.SOFBControl"]], "selectionmatrix (class in siriushla.as_ap_sofb.ioc_control.respmat_enbllist)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat_enbllist.SelectionMatrix"]], "singleselmatrix (class in siriushla.as_ap_sofb.ioc_control.respmat_enbllist)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat_enbllist.SingleSelMatrix"]], "statuswidget (class in siriushla.as_ap_sofb.ioc_control.status)": [[23, "siriushla.as_ap_sofb.ioc_control.status.StatusWidget"]], "acc (siriushla.as_ap_sofb.ioc_control.base.basecombo property)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseCombo.acc"]], "acc (siriushla.as_ap_sofb.ioc_control.base.baseobject property)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseObject.acc"]], "acc_idx (siriushla.as_ap_sofb.ioc_control.base.basecombo property)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseCombo.acc_idx"]], "acc_idx (siriushla.as_ap_sofb.ioc_control.base.baseobject property)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseObject.acc_idx"]], "channels() (siriushla.as_ap_sofb.ioc_control.base.basecombo method)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseCombo.channels"]], "configname (siriushla.as_ap_sofb.ioc_control.base.basecombo attribute)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseCombo.configname"]], "connect_signals() (siriushla.as_ap_sofb.ioc_control.base.basecombo method)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseCombo.connect_signals"]], "connection_changed() (siriushla.as_ap_sofb.ioc_control.respmat_enbllist.singleselmatrix method)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat_enbllist.SingleSelMatrix.connection_changed"]], "create_pair() (siriushla.as_ap_sofb.ioc_control.base.basewidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseWidget.create_pair"]], "create_pair_butled() (siriushla.as_ap_sofb.ioc_control.base.basewidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseWidget.create_pair_butled"]], "create_pair_sel() (siriushla.as_ap_sofb.ioc_control.base.basewidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseWidget.create_pair_sel"]], "creategroupbox() (siriushla.as_ap_sofb.ioc_control.status.statuswidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.status.StatusWidget.creategroupbox"]], "get_auto_correction_widget() (siriushla.as_ap_sofb.ioc_control.main.sofbcontrol method)": [[23, "siriushla.as_ap_sofb.ioc_control.main.SOFBControl.get_auto_correction_widget"]], "get_correction_widget() (siriushla.as_ap_sofb.ioc_control.main.sofbcontrol method)": [[23, "siriushla.as_ap_sofb.ioc_control.main.SOFBControl.get_correction_widget"]], "get_details_widget() (siriushla.as_ap_sofb.ioc_control.kicks_config.kicksconfigwidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.kicks_config.KicksConfigWidget.get_details_widget"]], "get_fofb_widget() (siriushla.as_ap_sofb.ioc_control.main.sofbcontrol method)": [[23, "siriushla.as_ap_sofb.ioc_control.main.SOFBControl.get_fofb_widget"]], "get_headers() (siriushla.as_ap_sofb.ioc_control.respmat_enbllist.singleselmatrix method)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat_enbllist.SingleSelMatrix.get_headers"]], "get_main_widget() (siriushla.as_ap_sofb.ioc_control.main.sofbcontrol method)": [[23, "siriushla.as_ap_sofb.ioc_control.main.SOFBControl.get_main_widget"]], "get_main_widget() (siriushla.as_ap_sofb.ioc_control.respmat.respmatwidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat.RespMatWidget.get_main_widget"]], "get_manual_correction_widget() (siriushla.as_ap_sofb.ioc_control.main.sofbcontrol method)": [[23, "siriushla.as_ap_sofb.ioc_control.main.SOFBControl.get_manual_correction_widget"]], "get_measurement_widget() (siriushla.as_ap_sofb.ioc_control.respmat.respmatwidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat.RespMatWidget.get_measurement_widget"]], "get_orbit_widget() (siriushla.as_ap_sofb.ioc_control.main.sofbcontrol method)": [[23, "siriushla.as_ap_sofb.ioc_control.main.SOFBControl.get_orbit_widget"]], "get_positions() (siriushla.as_ap_sofb.ioc_control.respmat_enbllist.singleselmatrix method)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat_enbllist.SingleSelMatrix.get_positions"]], "get_saveload_widget() (siriushla.as_ap_sofb.ioc_control.respmat.respmatwidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat.RespMatWidget.get_saveload_widget"]], "get_selection_lists_widget() (siriushla.as_ap_sofb.ioc_control.respmat.respmatwidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat.RespMatWidget.get_selection_lists_widget"]], "get_singular_values_widget() (siriushla.as_ap_sofb.ioc_control.respmat.respmatwidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat.RespMatWidget.get_singular_values_widget"]], "get_status_widget() (siriushla.as_ap_sofb.ioc_control.kicks_config.kicksconfigwidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.kicks_config.KicksConfigWidget.get_status_widget"]], "get_widgets() (siriushla.as_ap_sofb.ioc_control.respmat_enbllist.singleselmatrix method)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat_enbllist.SingleSelMatrix.get_widgets"]], "ioc_orbit_changed() (siriushla.as_ap_sofb.ioc_control.base.basecombo method)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseCombo.ioc_orbit_changed"]], "isring (siriushla.as_ap_sofb.ioc_control.base.basecombo property)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseCombo.isring"]], "isring (siriushla.as_ap_sofb.ioc_control.base.baseobject property)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseObject.isring"]], "send_value() (siriushla.as_ap_sofb.ioc_control.respmat_enbllist.singleselmatrix method)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat_enbllist.SingleSelMatrix.send_value"]], "setup_ui() (siriushla.as_ap_sofb.ioc_control.base.basecombo method)": [[23, "siriushla.as_ap_sofb.ioc_control.base.BaseCombo.setup_ui"]], "setup_ui() (siriushla.as_ap_sofb.ioc_control.main.refcontrol method)": [[23, "siriushla.as_ap_sofb.ioc_control.main.RefControl.setup_ui"]], "setupui() (siriushla.as_ap_sofb.ioc_control.drive_window.drivecontrol method)": [[23, "siriushla.as_ap_sofb.ioc_control.drive_window.DriveControl.setupui"]], "setupui() (siriushla.as_ap_sofb.ioc_control.kicks_config.kicksconfigwidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.kicks_config.KicksConfigWidget.setupui"]], "setupui() (siriushla.as_ap_sofb.ioc_control.main.sofbcontrol method)": [[23, "siriushla.as_ap_sofb.ioc_control.main.SOFBControl.setupui"]], "setupui() (siriushla.as_ap_sofb.ioc_control.orbit_acquisition.acqcontrolwidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.orbit_acquisition.AcqControlWidget.setupui"]], "setupui() (siriushla.as_ap_sofb.ioc_control.respmat.respmatwidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat.RespMatWidget.setupui"]], "setupui() (siriushla.as_ap_sofb.ioc_control.status.statuswidget method)": [[23, "siriushla.as_ap_sofb.ioc_control.status.StatusWidget.setupui"]], "siriushla.as_ap_sofb.ioc_control": [[23, "module-siriushla.as_ap_sofb.ioc_control"]], "siriushla.as_ap_sofb.ioc_control.base": [[23, "module-siriushla.as_ap_sofb.ioc_control.base"]], "siriushla.as_ap_sofb.ioc_control.drive_window": [[23, "module-siriushla.as_ap_sofb.ioc_control.drive_window"]], "siriushla.as_ap_sofb.ioc_control.kicks_config": [[23, "module-siriushla.as_ap_sofb.ioc_control.kicks_config"]], "siriushla.as_ap_sofb.ioc_control.main": [[23, "module-siriushla.as_ap_sofb.ioc_control.main"]], "siriushla.as_ap_sofb.ioc_control.orbit_acquisition": [[23, "module-siriushla.as_ap_sofb.ioc_control.orbit_acquisition"]], "siriushla.as_ap_sofb.ioc_control.respmat": [[23, "module-siriushla.as_ap_sofb.ioc_control.respmat"]], "siriushla.as_ap_sofb.ioc_control.respmat_enbllist": [[23, "module-siriushla.as_ap_sofb.ioc_control.respmat_enbllist"]], "siriushla.as_ap_sofb.ioc_control.status": [[23, "module-siriushla.as_ap_sofb.ioc_control.status"]], "sizehint() (siriushla.as_ap_sofb.ioc_control.respmat_enbllist.singleselmatrix method)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat_enbllist.SingleSelMatrix.sizeHint"]], "value_changed() (siriushla.as_ap_sofb.ioc_control.respmat_enbllist.singleselmatrix method)": [[23, "siriushla.as_ap_sofb.ioc_control.respmat_enbllist.SingleSelMatrix.value_changed"]], "acqcore (siriushla.as_di_bpms.trig_acq_config.bpmgenacquisition attribute)": [[24, "siriushla.as_di_bpms.trig_acq_config.BPMGENAcquisition.ACQCORE"]], "acqcore (siriushla.as_di_bpms.trig_acq_config.bpmpmacquisition attribute)": [[24, "siriushla.as_di_bpms.trig_acq_config.BPMPMAcquisition.ACQCORE"]], "acqcore (siriushla.as_di_bpms.trig_acq_config.pbpmgenacquisition attribute)": [[24, "siriushla.as_di_bpms.trig_acq_config.PBPMGENAcquisition.ACQCORE"]], "acqcore (siriushla.as_di_bpms.trig_acq_config.pbpmpmacquisition attribute)": [[24, "siriushla.as_di_bpms.trig_acq_config.PBPMPMAcquisition.ACQCORE"]], "acqdatasummary (class in siriushla.as_di_bpms.list_bpms)": [[24, "siriushla.as_di_bpms.list_bpms.AcqDataSummary"]], "bpmadvancedsettings (class in siriushla.as_di_bpms.settings)": [[24, "siriushla.as_di_bpms.settings.BPMAdvancedSettings"]], "bpmbasetriggeredacquisition (class in siriushla.as_di_bpms.trig_acq_config)": [[24, "siriushla.as_di_bpms.trig_acq_config.BPMBaseTriggeredAcquisition"]], "bpmgenacquisition (class in siriushla.as_di_bpms.trig_acq_config)": [[24, "siriushla.as_di_bpms.trig_acq_config.BPMGENAcquisition"]], "bpmhardwaresettings (class in siriushla.as_di_bpms.settings)": [[24, "siriushla.as_di_bpms.settings.BPMHardwareSettings"]], "bpmmain (class in siriushla.as_di_bpms.main)": [[24, "siriushla.as_di_bpms.main.BPMMain"]], "bpmpmacquisition (class in siriushla.as_di_bpms.trig_acq_config)": [[24, "siriushla.as_di_bpms.trig_acq_config.BPMPMAcquisition"]], "bpmsummary (class in siriushla.as_di_bpms.list_bpms)": [[24, "siriushla.as_di_bpms.list_bpms.BPMSummary"]], "basegraph (class in siriushla.as_di_bpms.base)": [[24, "siriushla.as_di_bpms.base.BaseGraph"]], "basewidget (class in siriushla.as_di_bpms.base)": [[24, "siriushla.as_di_bpms.base.BaseWidget"]], "class (siriushla.as_di_bpms.base.basegraph attribute)": [[24, "siriushla.as_di_bpms.base.BaseGraph.CLASS"]], "class (siriushla.as_di_bpms.base.graphtime attribute)": [[24, "siriushla.as_di_bpms.base.GraphTime.CLASS"]], "data_class (siriushla.as_di_bpms.base.basegraph attribute)": [[24, "siriushla.as_di_bpms.base.BaseGraph.DATA_CLASS"]], "data_class (siriushla.as_di_bpms.base.graphtime attribute)": [[24, "siriushla.as_di_bpms.base.GraphTime.DATA_CLASS"]], "graphtime (class in siriushla.as_di_bpms.base)": [[24, "siriushla.as_di_bpms.base.GraphTime"]], "graphwave (class in siriushla.as_di_bpms.base)": [[24, "siriushla.as_di_bpms.base.GraphWave"]], "monitdata (class in siriushla.as_di_bpms.monit)": [[24, "siriushla.as_di_bpms.monit.MonitData"]], "pbpmbasetriggeredacquisition (class in siriushla.as_di_bpms.trig_acq_config)": [[24, "siriushla.as_di_bpms.trig_acq_config.PBPMBaseTriggeredAcquisition"]], "pbpmgenacquisition (class in siriushla.as_di_bpms.trig_acq_config)": [[24, "siriushla.as_di_bpms.trig_acq_config.PBPMGENAcquisition"]], "pbpmhardwaresettings (class in siriushla.as_di_bpms.settings)": [[24, "siriushla.as_di_bpms.settings.PBPMHardwareSettings"]], "pbpmpmacquisition (class in siriushla.as_di_bpms.trig_acq_config)": [[24, "siriushla.as_di_bpms.trig_acq_config.PBPMPMAcquisition"]], "paramssettings (class in siriushla.as_di_bpms.settings)": [[24, "siriushla.as_di_bpms.settings.ParamsSettings"]], "polysettings (class in siriushla.as_di_bpms.settings)": [[24, "siriushla.as_di_bpms.settings.PolySettings"]], "rffeadvancedsettings (class in siriushla.as_di_bpms.settings)": [[24, "siriushla.as_di_bpms.settings.RFFEAdvancedSettings"]], "selectbpms (class in siriushla.as_di_bpms.list_bpms)": [[24, "siriushla.as_di_bpms.list_bpms.SelectBPMs"]], "triggerslauncherwidget (class in siriushla.as_di_bpms.settings)": [[24, "siriushla.as_di_bpms.settings.TriggersLauncherWidget"]], "addchannel() (siriushla.as_di_bpms.base.graphwave method)": [[24, "siriushla.as_di_bpms.base.GraphWave.addChannel"]], "addychannel() (siriushla.as_di_bpms.base.graphtime method)": [[24, "siriushla.as_di_bpms.base.GraphTime.addYChannel"]], "basic_rule() (siriushla.as_di_bpms.base.basewidget method)": [[24, "siriushla.as_di_bpms.base.BaseWidget.basic_rule"]], "channels() (siriushla.as_di_bpms.base.basewidget method)": [[24, "siriushla.as_di_bpms.base.BaseWidget.channels"]], "create_graph() (siriushla.as_di_bpms.list_bpms.acqdatasummary method)": [[24, "siriushla.as_di_bpms.list_bpms.AcqDataSummary.create_graph"]], "curveatindex() (siriushla.as_di_bpms.base.basegraph method)": [[24, "siriushla.as_di_bpms.base.BaseGraph.curveAtIndex"]], "get_acqrate_props() (siriushla.as_di_bpms.settings.bpmadvancedsettings static method)": [[24, "siriushla.as_di_bpms.settings.BPMAdvancedSettings.get_acqrate_props"]], "get_custom_widget_class() (in module siriushla.as_di_bpms.base)": [[24, "siriushla.as_di_bpms.base.get_custom_widget_class"]], "get_pvname() (siriushla.as_di_bpms.base.basewidget method)": [[24, "siriushla.as_di_bpms.base.BaseWidget.get_pvname"]], "setlabel() (siriushla.as_di_bpms.base.basegraph method)": [[24, "siriushla.as_di_bpms.base.BaseGraph.setLabel"]], "setupgraph() (siriushla.as_di_bpms.base.basegraph method)": [[24, "siriushla.as_di_bpms.base.BaseGraph.setupgraph"]], "setupui() (siriushla.as_di_bpms.base.basegraph method)": [[24, "siriushla.as_di_bpms.base.BaseGraph.setupui"]], "setupui() (siriushla.as_di_bpms.list_bpms.acqdatasummary method)": [[24, "siriushla.as_di_bpms.list_bpms.AcqDataSummary.setupui"]], "setupui() (siriushla.as_di_bpms.list_bpms.bpmsummary method)": [[24, "siriushla.as_di_bpms.list_bpms.BPMSummary.setupui"]], "setupui() (siriushla.as_di_bpms.list_bpms.selectbpms method)": [[24, "siriushla.as_di_bpms.list_bpms.SelectBPMs.setupui"]], "setupui() (siriushla.as_di_bpms.main.bpmmain method)": [[24, "siriushla.as_di_bpms.main.BPMMain.setupui"]], "setupui() (siriushla.as_di_bpms.monit.monitdata method)": [[24, "siriushla.as_di_bpms.monit.MonitData.setupui"]], "setupui() (siriushla.as_di_bpms.settings.bpmadvancedsettings method)": [[24, "siriushla.as_di_bpms.settings.BPMAdvancedSettings.setupui"]], "setupui() (siriushla.as_di_bpms.settings.bpmhardwaresettings method)": [[24, "siriushla.as_di_bpms.settings.BPMHardwareSettings.setupui"]], "setupui() (siriushla.as_di_bpms.settings.pbpmhardwaresettings method)": [[24, "siriushla.as_di_bpms.settings.PBPMHardwareSettings.setupui"]], "setupui() (siriushla.as_di_bpms.settings.paramssettings method)": [[24, "siriushla.as_di_bpms.settings.ParamsSettings.setupui"]], "setupui() (siriushla.as_di_bpms.settings.polysettings method)": [[24, "siriushla.as_di_bpms.settings.PolySettings.setupui"]], "setupui() (siriushla.as_di_bpms.settings.rffeadvancedsettings method)": [[24, "siriushla.as_di_bpms.settings.RFFEAdvancedSettings.setupui"]], "setupui() (siriushla.as_di_bpms.settings.triggerslauncherwidget method)": [[24, "siriushla.as_di_bpms.settings.TriggersLauncherWidget.setupui"]], "siriushla.as_di_bpms": [[24, "module-siriushla.as_di_bpms"]], "siriushla.as_di_bpms.base": [[24, "module-siriushla.as_di_bpms.base"]], "siriushla.as_di_bpms.list_bpms": [[24, "module-siriushla.as_di_bpms.list_bpms"]], "siriushla.as_di_bpms.main": [[24, "module-siriushla.as_di_bpms.main"]], "siriushla.as_di_bpms.monit": [[24, "module-siriushla.as_di_bpms.monit"]], "siriushla.as_di_bpms.settings": [[24, "module-siriushla.as_di_bpms.settings"]], "siriushla.as_di_bpms.trig_acq_config": [[24, "module-siriushla.as_di_bpms.trig_acq_config"]], "dcctmain (class in siriushla.as_di_dccts.main)": [[25, "siriushla.as_di_dccts.main.DCCTMain"]], "dcctmonitor (class in siriushla.as_di_dccts.graphics)": [[25, "siriushla.as_di_dccts.graphics.DCCTMonitor"]], "dcctsettings (class in siriushla.as_di_dccts.settings)": [[25, "siriushla.as_di_dccts.settings.DCCTSettings"]], "dcctsettingsdetails (class in siriushla.as_di_dccts.settings)": [[25, "siriushla.as_di_dccts.settings.DCCTSettingsDetails"]], "effmonitor (class in siriushla.as_di_dccts.graphics)": [[25, "siriushla.as_di_dccts.graphics.EffMonitor"]], "siselectdcct (class in siriushla.as_di_dccts.main)": [[25, "siriushla.as_di_dccts.main.SISelectDCCT"]], "get_dcct_list() (in module siriushla.as_di_dccts.main)": [[25, "siriushla.as_di_dccts.main.get_dcct_list"]], "resetrawbuffer() (siriushla.as_di_dccts.graphics.dcctmonitor method)": [[25, "siriushla.as_di_dccts.graphics.DCCTMonitor.resetRawBuffer"]], "setrawdownsampling() (siriushla.as_di_dccts.graphics.dcctmonitor method)": [[25, "siriushla.as_di_dccts.graphics.DCCTMonitor.setRawDownsampling"]], "setrawsmoothmethod() (siriushla.as_di_dccts.graphics.dcctmonitor method)": [[25, "siriushla.as_di_dccts.graphics.DCCTMonitor.setRawSmoothMethod"]], "setrawsmoothnracq() (siriushla.as_di_dccts.graphics.dcctmonitor method)": [[25, "siriushla.as_di_dccts.graphics.DCCTMonitor.setRawSmoothNrAcq"]], "siriushla.as_di_dccts": [[25, "module-siriushla.as_di_dccts"]], "siriushla.as_di_dccts.graphics": [[25, "module-siriushla.as_di_dccts.graphics"]], "siriushla.as_di_dccts.main": [[25, "module-siriushla.as_di_dccts.main"]], "siriushla.as_di_dccts.settings": [[25, "module-siriushla.as_di_dccts.settings"]], "smoothbuffersize (siriushla.as_di_dccts.graphics.dcctmonitor property)": [[25, "siriushla.as_di_dccts.graphics.DCCTMonitor.smoothBufferSize"]], "updateparams() (siriushla.as_di_dccts.graphics.dcctmonitor method)": [[25, "siriushla.as_di_dccts.graphics.DCCTMonitor.updateParams"]], "updaterawxaxis() (siriushla.as_di_dccts.graphics.dcctmonitor method)": [[25, "siriushla.as_di_dccts.graphics.DCCTMonitor.updateRawXAxis"]], "ictmonitoring (class in siriushla.as_di_icts.ict_monitor)": [[26, "siriushla.as_di_icts.ICT_monitor.ICTMonitoring"]], "ictsummary (class in siriushla.as_di_icts.ict_monitor)": [[26, "siriushla.as_di_icts.ICT_monitor.ICTSummary"]], "siriushla.as_di_icts": [[26, "module-siriushla.as_di_icts"]], "siriushla.as_di_icts.ict_monitor": [[26, "module-siriushla.as_di_icts.ICT_monitor"]], "individualscrn (class in siriushla.as_di_scrns.main)": [[27, "siriushla.as_di_scrns.main.IndividualScrn"]], "scrncalibrationsettings (class in siriushla.as_di_scrns.scrn_calib)": [[27, "siriushla.as_di_scrns.scrn_calib.ScrnCalibrationSettings"]], "scrnsettingsdetails (class in siriushla.as_di_scrns.scrn_details)": [[27, "siriushla.as_di_scrns.scrn_details.ScrnSettingsDetails"]], "scrnsummary (class in siriushla.as_di_scrns.list_scrns)": [[27, "siriushla.as_di_scrns.list_scrns.ScrnSummary"]], "selectscrns (class in siriushla.as_di_scrns.list_scrns)": [[27, "siriushla.as_di_scrns.list_scrns.SelectScrns"]], "siriusscrnview (class in siriushla.as_di_scrns.main)": [[27, "siriushla.as_di_scrns.main.SiriusScrnView"]], "calibrationgrid_flag (siriushla.as_di_scrns.main.siriusscrnview property)": [[27, "siriushla.as_di_scrns.main.SiriusScrnView.calibrationgrid_flag"]], "get_scrn_list() (in module siriushla.as_di_scrns.list_scrns)": [[27, "siriushla.as_di_scrns.list_scrns.get_scrn_list"]], "save_files (siriushla.as_di_scrns.main.siriusscrnview attribute)": [[27, "siriushla.as_di_scrns.main.SiriusScrnView.save_files"]], "siriushla.as_di_scrns": [[27, "module-siriushla.as_di_scrns"]], "siriushla.as_di_scrns.list_scrns": [[27, "module-siriushla.as_di_scrns.list_scrns"]], "siriushla.as_di_scrns.main": [[27, "module-siriushla.as_di_scrns.main"]], "siriushla.as_di_scrns.scrn_calib": [[27, "module-siriushla.as_di_scrns.scrn_calib"]], "siriushla.as_di_scrns.scrn_details": [[27, "module-siriushla.as_di_scrns.scrn_details"]], "updatecalibrationgridflag() (siriushla.as_di_scrns.main.siriusscrnview method)": [[27, "siriushla.as_di_scrns.main.SiriusScrnView.updateCalibrationGridFlag"]], "botunespectrogram (class in siriushla.as_di_tune.spectrogram)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram"]], "botunespectrogramcontrols (class in siriushla.as_di_tune.spectrogram)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogramControls"]], "situnemarkerdetails (class in siriushla.as_di_tune.details)": [[28, "siriushla.as_di_tune.details.SITuneMarkerDetails"]], "situnemonitor (class in siriushla.as_di_tune.controls)": [[28, "siriushla.as_di_tune.controls.SITuneMonitor"]], "tune (class in siriushla.as_di_tune.main)": [[28, "siriushla.as_di_tune.main.Tune"]], "tunecontrols (class in siriushla.as_di_tune.controls)": [[28, "siriushla.as_di_tune.controls.TuneControls"]], "tunedetails (class in siriushla.as_di_tune.details)": [[28, "siriushla.as_di_tune.details.TuneDetails"]], "tunespectracontrols (class in siriushla.as_di_tune.spectra)": [[28, "siriushla.as_di_tune.spectra.TuneSpectraControls"]], "tunespectraview (class in siriushla.as_di_tune.spectra)": [[28, "siriushla.as_di_tune.spectra.TuneSpectraView"]], "buffer_curr_size (siriushla.as_di_tune.spectrogram.botunespectrogram attribute)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram.buffer_curr_size"]], "buffer_data_size (siriushla.as_di_tune.spectrogram.botunespectrogram attribute)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram.buffer_data_size"]], "buffer_size_changed (siriushla.as_di_tune.spectrogram.botunespectrogram attribute)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram.buffer_size_changed"]], "changeevent() (siriushla.as_di_tune.controls.situnemonitor method)": [[28, "siriushla.as_di_tune.controls.SITuneMonitor.changeEvent"]], "getdataindex() (siriushla.as_di_tune.spectrogram.botunespectrogram method)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram.getDataIndex"]], "idx2send_changed (siriushla.as_di_tune.spectrogram.botunespectrogram attribute)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram.idx2send_changed"]], "image_value_changed() (siriushla.as_di_tune.spectrogram.botunespectrogram method)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram.image_value_changed"]], "mousedoubleclickevent() (siriushla.as_di_tune.spectrogram.botunespectrogram method)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram.mouseDoubleClickEvent"]], "new_data (siriushla.as_di_tune.spectrogram.botunespectrogram attribute)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram.new_data"]], "process_image() (siriushla.as_di_tune.spectrogram.botunespectrogram method)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram.process_image"]], "receivedatah() (siriushla.as_di_tune.spectra.tunespectraview method)": [[28, "siriushla.as_di_tune.spectra.TuneSpectraView.receiveDataH"]], "receivedatav() (siriushla.as_di_tune.spectra.tunespectraview method)": [[28, "siriushla.as_di_tune.spectra.TuneSpectraView.receiveDataV"]], "resetbuffer() (siriushla.as_di_tune.spectrogram.botunespectrogram method)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram.resetBuffer"]], "setbuffersize() (siriushla.as_di_tune.spectrogram.botunespectrogram method)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram.setBufferSize"]], "setindex2send() (siriushla.as_di_tune.spectrogram.botunespectrogram method)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram.setIndex2Send"]], "showtuneh() (siriushla.as_di_tune.spectra.tunespectraview method)": [[28, "siriushla.as_di_tune.spectra.TuneSpectraView.showTuneH"]], "showtunev() (siriushla.as_di_tune.spectra.tunespectraview method)": [[28, "siriushla.as_di_tune.spectra.TuneSpectraView.showTuneV"]], "siriushla.as_di_tune": [[28, "module-siriushla.as_di_tune"]], "siriushla.as_di_tune.controls": [[28, "module-siriushla.as_di_tune.controls"]], "siriushla.as_di_tune.details": [[28, "module-siriushla.as_di_tune.details"]], "siriushla.as_di_tune.main": [[28, "module-siriushla.as_di_tune.main"]], "siriushla.as_di_tune.spectra": [[28, "module-siriushla.as_di_tune.spectra"]], "siriushla.as_di_tune.spectrogram": [[28, "module-siriushla.as_di_tune.spectrogram"]], "siriushla.as_di_tune.util": [[28, "module-siriushla.as_di_tune.util"]], "togglexchannel() (siriushla.as_di_tune.spectra.tunespectraview method)": [[28, "siriushla.as_di_tune.spectra.TuneSpectraView.toggleXChannel"]], "togglexchannel() (siriushla.as_di_tune.spectrogram.botunespectrogram method)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogram.toggleXChannel"]], "update_buffsize() (siriushla.as_di_tune.spectrogram.botunespectrogramcontrols method)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogramControls.update_buffsize"]], "update_idx2plot() (siriushla.as_di_tune.spectrogram.botunespectrogramcontrols method)": [[28, "siriushla.as_di_tune.spectrogram.BOTuneSpectrogramControls.update_idx2plot"]], "vlightcamview (class in siriushla.as_di_vlight.main)": [[29, "siriushla.as_di_vlight.main.VLightCamView"]], "conv_sec_2_device() (in module siriushla.as_di_vlight.main)": [[29, "siriushla.as_di_vlight.main.conv_sec_2_device"]], "siriushla.as_di_vlight": [[29, "module-siriushla.as_di_vlight"]], "siriushla.as_di_vlight.main": [[29, "module-siriushla.as_di_vlight.main"]], "basetask (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.BaseTask"]], "checkcapbankvolt (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckCapBankVolt"]], "checkcomm (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckComm"]], "checkctrlloop (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckCtrlLoop"]], "checkcurrent (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckCurrent"]], "checkidffmode (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckIDFFMode"]], "checkinitok (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckInitOk"]], "checkintlk (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckIntlk"]], "checkopmode (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckOpMode"]], "checkpulse (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckPulse"]], "checkpwrstate (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckPwrState"]], "checksofbmode (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckSOFBMode"]], "checkstatus (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckStatus"]], "checktriggerstate (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckTriggerState"]], "checkvoltage (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CheckVoltage"]], "createtesters (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.CreateTesters"]], "pscmdwindow (class in siriushla.as_ps_commands.main)": [[30, "siriushla.as_ps_commands.main.PSCmdWindow"]], "resetintlk (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.ResetIntlk"]], "setcapbankvolt (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.SetCapBankVolt"]], "setctrlloop (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.SetCtrlLoop"]], "setcurrent (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.SetCurrent"]], "setidffmode (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.SetIDFFMode"]], "setopmode (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.SetOpMode"]], "setpulse (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.SetPulse"]], "setpwrstate (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.SetPwrState"]], "setsofbmode (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.SetSOFBMode"]], "settriggerstate (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.SetTriggerState"]], "setvoltage (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.SetVoltage"]], "triggertask (class in siriushla.as_ps_commands.tasks)": [[30, "siriushla.as_ps_commands.tasks.TriggerTask"]], "completed (siriushla.as_ps_commands.tasks.basetask attribute)": [[30, "siriushla.as_ps_commands.tasks.BaseTask.completed"]], "completed (siriushla.as_ps_commands.tasks.triggertask attribute)": [[30, "siriushla.as_ps_commands.tasks.TriggerTask.completed"]], "currentitem (siriushla.as_ps_commands.tasks.basetask attribute)": [[30, "siriushla.as_ps_commands.tasks.BaseTask.currentItem"]], "currentitem (siriushla.as_ps_commands.tasks.triggertask attribute)": [[30, "siriushla.as_ps_commands.tasks.TriggerTask.currentItem"]], "exit_task() (siriushla.as_ps_commands.tasks.basetask method)": [[30, "siriushla.as_ps_commands.tasks.BaseTask.exit_task"]], "exit_task() (siriushla.as_ps_commands.tasks.triggertask method)": [[30, "siriushla.as_ps_commands.tasks.TriggerTask.exit_task"]], "function() (siriushla.as_ps_commands.tasks.basetask method)": [[30, "siriushla.as_ps_commands.tasks.BaseTask.function"]], "function() (siriushla.as_ps_commands.tasks.checkcapbankvolt method)": [[30, "siriushla.as_ps_commands.tasks.CheckCapBankVolt.function"]], "function() (siriushla.as_ps_commands.tasks.checkcomm method)": [[30, "siriushla.as_ps_commands.tasks.CheckComm.function"]], "function() (siriushla.as_ps_commands.tasks.checkctrlloop method)": [[30, "siriushla.as_ps_commands.tasks.CheckCtrlLoop.function"]], "function() (siriushla.as_ps_commands.tasks.checkcurrent method)": [[30, "siriushla.as_ps_commands.tasks.CheckCurrent.function"]], "function() (siriushla.as_ps_commands.tasks.checkidffmode method)": [[30, "siriushla.as_ps_commands.tasks.CheckIDFFMode.function"]], "function() (siriushla.as_ps_commands.tasks.checkinitok method)": [[30, "siriushla.as_ps_commands.tasks.CheckInitOk.function"]], "function() (siriushla.as_ps_commands.tasks.checkintlk method)": [[30, "siriushla.as_ps_commands.tasks.CheckIntlk.function"]], "function() (siriushla.as_ps_commands.tasks.checkopmode method)": [[30, "siriushla.as_ps_commands.tasks.CheckOpMode.function"]], "function() (siriushla.as_ps_commands.tasks.checkpulse method)": [[30, "siriushla.as_ps_commands.tasks.CheckPulse.function"]], "function() (siriushla.as_ps_commands.tasks.checkpwrstate method)": [[30, "siriushla.as_ps_commands.tasks.CheckPwrState.function"]], "function() (siriushla.as_ps_commands.tasks.checksofbmode method)": [[30, "siriushla.as_ps_commands.tasks.CheckSOFBMode.function"]], "function() (siriushla.as_ps_commands.tasks.checkstatus method)": [[30, "siriushla.as_ps_commands.tasks.CheckStatus.function"]], "function() (siriushla.as_ps_commands.tasks.checktriggerstate method)": [[30, "siriushla.as_ps_commands.tasks.CheckTriggerState.function"]], "function() (siriushla.as_ps_commands.tasks.checkvoltage method)": [[30, "siriushla.as_ps_commands.tasks.CheckVoltage.function"]], "function() (siriushla.as_ps_commands.tasks.createtesters method)": [[30, "siriushla.as_ps_commands.tasks.CreateTesters.function"]], "function() (siriushla.as_ps_commands.tasks.resetintlk method)": [[30, "siriushla.as_ps_commands.tasks.ResetIntlk.function"]], "function() (siriushla.as_ps_commands.tasks.setcapbankvolt method)": [[30, "siriushla.as_ps_commands.tasks.SetCapBankVolt.function"]], "function() (siriushla.as_ps_commands.tasks.setctrlloop method)": [[30, "siriushla.as_ps_commands.tasks.SetCtrlLoop.function"]], "function() (siriushla.as_ps_commands.tasks.setcurrent method)": [[30, "siriushla.as_ps_commands.tasks.SetCurrent.function"]], "function() (siriushla.as_ps_commands.tasks.setidffmode method)": [[30, "siriushla.as_ps_commands.tasks.SetIDFFMode.function"]], "function() (siriushla.as_ps_commands.tasks.setopmode method)": [[30, "siriushla.as_ps_commands.tasks.SetOpMode.function"]], "function() (siriushla.as_ps_commands.tasks.setpulse method)": [[30, "siriushla.as_ps_commands.tasks.SetPulse.function"]], "function() (siriushla.as_ps_commands.tasks.setpwrstate method)": [[30, "siriushla.as_ps_commands.tasks.SetPwrState.function"]], "function() (siriushla.as_ps_commands.tasks.setsofbmode method)": [[30, "siriushla.as_ps_commands.tasks.SetSOFBMode.function"]], "function() (siriushla.as_ps_commands.tasks.settriggerstate method)": [[30, "siriushla.as_ps_commands.tasks.SetTriggerState.function"]], "function() (siriushla.as_ps_commands.tasks.setvoltage method)": [[30, "siriushla.as_ps_commands.tasks.SetVoltage.function"]], "function() (siriushla.as_ps_commands.tasks.triggertask method)": [[30, "siriushla.as_ps_commands.tasks.TriggerTask.function"]], "initial_triggers_state (siriushla.as_ps_commands.tasks.triggertask attribute)": [[30, "siriushla.as_ps_commands.tasks.TriggerTask.initial_triggers_state"]], "itemdone (siriushla.as_ps_commands.tasks.basetask attribute)": [[30, "siriushla.as_ps_commands.tasks.BaseTask.itemDone"]], "itemdone (siriushla.as_ps_commands.tasks.triggertask attribute)": [[30, "siriushla.as_ps_commands.tasks.TriggerTask.itemDone"]], "keypressevent() (siriushla.as_ps_commands.main.pscmdwindow method)": [[30, "siriushla.as_ps_commands.main.PSCmdWindow.keyPressEvent"]], "run() (siriushla.as_ps_commands.tasks.basetask method)": [[30, "siriushla.as_ps_commands.tasks.BaseTask.run"]], "run() (siriushla.as_ps_commands.tasks.triggertask method)": [[30, "siriushla.as_ps_commands.tasks.TriggerTask.run"]], "siriushla.as_ps_commands": [[30, "module-siriushla.as_ps_commands"]], "siriushla.as_ps_commands.main": [[30, "module-siriushla.as_ps_commands.main"]], "siriushla.as_ps_commands.tasks": [[30, "module-siriushla.as_ps_commands.tasks"]], "size() (siriushla.as_ps_commands.tasks.basetask method)": [[30, "siriushla.as_ps_commands.tasks.BaseTask.size"]], "size() (siriushla.as_ps_commands.tasks.triggertask method)": [[30, "siriushla.as_ps_commands.tasks.TriggerTask.size"]], "devices (siriushla.as_ps_control.pstabcontrolwindow.pstabcontrolwindow attribute)": [[31, "siriushla.as_ps_control.PSTabControlWindow.PSTabControlWindow.Devices"]], "graph (class in siriushla.as_ps_control.ps_wfmerror_mon)": [[31, "siriushla.as_ps_control.ps_wfmerror_mon.Graph"]], "graphwidget (class in siriushla.as_ps_control.ps_wfmerror_mon)": [[31, "siriushla.as_ps_control.ps_wfmerror_mon.GraphWidget"]], "pscontrolwindow (class in siriushla.as_ps_control.pscontrolwindow)": [[31, "siriushla.as_ps_control.PSControlWindow.PSControlWindow"]], "psdetailwindow (class in siriushla.as_ps_control.psdetailwindow)": [[31, "siriushla.as_ps_control.PSDetailWindow.PSDetailWindow"]], "pstabcontrolwindow (class in siriushla.as_ps_control.pstabcontrolwindow)": [[31, "siriushla.as_ps_control.PSTabControlWindow.PSTabControlWindow"]], "pstrimwindow (class in siriushla.as_ps_control.pstrimwindow)": [[31, "siriushla.as_ps_control.PSTrimWindow.PSTrimWindow"]], "plotwfmerrorwindow (class in siriushla.as_ps_control.ps_wfmerror_mon)": [[31, "siriushla.as_ps_control.ps_wfmerror_mon.PlotWfmErrorWindow"]], "summaryheader (class in siriushla.as_ps_control.summarywidgets)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryHeader"]], "summarywidget (class in siriushla.as_ps_control.summarywidgets)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget"]], "tabname (siriushla.as_ps_control.pstabcontrolwindow.pstabcontrolwindow attribute)": [[31, "siriushla.as_ps_control.PSTabControlWindow.PSTabControlWindow.TabName"]], "acc_clear() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.acc_clear"]], "bbbname (siriushla.as_ps_control.summarywidgets.summarywidget property)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.bbbname"]], "ctrlloop_close() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.ctrlloop_close"]], "ctrlloop_open() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.ctrlloop_open"]], "devname (siriushla.as_ps_control.summarywidgets.summarywidget property)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.devname"]], "doubleclick (siriushla.as_ps_control.ps_wfmerror_mon.graph attribute)": [[31, "siriushla.as_ps_control.ps_wfmerror_mon.Graph.doubleclick"]], "fillwidget() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.fillWidget"]], "get_analog_name() (in module siriushla.as_ps_control.summarywidgets)": [[31, "siriushla.as_ps_control.SummaryWidgets.get_analog_name"]], "get_detail_button() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.get_detail_button"]], "get_prop2label() (in module siriushla.as_ps_control.summarywidgets)": [[31, "siriushla.as_ps_control.SummaryWidgets.get_prop2label"]], "get_prop2width() (in module siriushla.as_ps_control.summarywidgets)": [[31, "siriushla.as_ps_control.SummaryWidgets.get_prop2width"]], "get_strength_name() (in module siriushla.as_ps_control.summarywidgets)": [[31, "siriushla.as_ps_control.SummaryWidgets.get_strength_name"]], "get_trim_button() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.get_trim_button"]], "idffmode_off() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.idffmode_off"]], "idffmode_on() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.idffmode_on"]], "mousedoubleclickevent() (siriushla.as_ps_control.ps_wfmerror_mon.graph method)": [[31, "siriushla.as_ps_control.ps_wfmerror_mon.Graph.mouseDoubleClickEvent"]], "pulse_off() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.pulse_off"]], "pulse_on() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.pulse_on"]], "reset() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.reset"]], "set_accfreeze_frozen() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.set_accfreeze_frozen"]], "set_accfreeze_unfrozen() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.set_accfreeze_unfrozen"]], "set_opmode_slowref() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.set_opmode_slowref"]], "setupui() (siriushla.as_ps_control.ps_wfmerror_mon.graphwidget method)": [[31, "siriushla.as_ps_control.ps_wfmerror_mon.GraphWidget.setupui"]], "setupui() (siriushla.as_ps_control.ps_wfmerror_mon.plotwfmerrorwindow method)": [[31, "siriushla.as_ps_control.ps_wfmerror_mon.PlotWfmErrorWindow.setupui"]], "siriushla.as_ps_control": [[31, "module-siriushla.as_ps_control"]], "siriushla.as_ps_control.pscontrolwindow": [[31, "module-siriushla.as_ps_control.PSControlWindow"]], "siriushla.as_ps_control.psdetailwindow": [[31, "module-siriushla.as_ps_control.PSDetailWindow"]], "siriushla.as_ps_control.pstabcontrolwindow": [[31, "module-siriushla.as_ps_control.PSTabControlWindow"]], "siriushla.as_ps_control.pstrimwindow": [[31, "module-siriushla.as_ps_control.PSTrimWindow"]], "siriushla.as_ps_control.summarywidgets": [[31, "module-siriushla.as_ps_control.SummaryWidgets"]], "siriushla.as_ps_control.ps_wfmerror_mon": [[31, "module-siriushla.as_ps_control.ps_wfmerror_mon"]], "sofbmode_off() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.sofbmode_off"]], "sofbmode_on() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.sofbmode_on"]], "sort_propties() (in module siriushla.as_ps_control.summarywidgets)": [[31, "siriushla.as_ps_control.SummaryWidgets.sort_propties"]], "tabfilled (siriushla.as_ps_control.pstabcontrolwindow.pstabcontrolwindow attribute)": [[31, "siriushla.as_ps_control.PSTabControlWindow.PSTabControlWindow.tabFilled"]], "turn_off() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.turn_off"]], "turn_on() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.turn_on"]], "udcname (siriushla.as_ps_control.summarywidgets.summarywidget property)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.udcname"]], "update_params() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.update_params"]], "update_visible_props() (siriushla.as_ps_control.summarywidgets.summaryheader method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryHeader.update_visible_props"]], "wfmupdate_off() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.wfmupdate_off"]], "wfmupdate_on() (siriushla.as_ps_control.summarywidgets.summarywidget method)": [[31, "siriushla.as_ps_control.SummaryWidgets.SummaryWidget.wfmupdate_on"]], "bodipolecontrolwidget (class in siriushla.as_ps_control.control_widget.dipolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.DipoleControlWidget.BODipoleControlWidget"]], "bofamquadrupolecontrolwidget (class in siriushla.as_ps_control.control_widget.famquadrupolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget.BOFamQuadrupoleControlWidget"]], "bofamsextupolecontrolwidget (class in siriushla.as_ps_control.control_widget.famsextupolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.FamSextupoleControlWidget.BOFamSextupoleControlWidget"]], "boskewquadcontrolwidget (class in siriushla.as_ps_control.control_widget.skewquadcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.SkewQuadControlWidget.BOSkewQuadControlWidget"]], "basepscontrolwidget (class in siriushla.as_ps_control.control_widget.basepscontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.BasePSControlWidget.BasePSControlWidget"]], "boslowcorrectorcontrolwidget (class in siriushla.as_ps_control.control_widget.slowcorrectorcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget.BoSlowCorrectorControlWidget"]], "controlwidgetfactory (class in siriushla.as_ps_control.control_widget.controlwidgetfactory)": [[32, "siriushla.as_ps_control.control_widget.ControlWidgetFactory.ControlWidgetFactory"]], "horizontal (siriushla.as_ps_control.control_widget.basepscontrolwidget.basepscontrolwidget attribute)": [[32, "siriushla.as_ps_control.control_widget.BasePSControlWidget.BasePSControlWidget.HORIZONTAL"]], "idffcorrectorcontrolwidget (class in siriushla.as_ps_control.control_widget.idffcorrectorcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.IDFFCorrectorControlWidget.IDFFCorrectorControlWidget"]], "itlenscontrolwidget (class in siriushla.as_ps_control.control_widget.lenscontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.LensControlWidget.ITLensControlWidget"]], "lilenscontrolwidget (class in siriushla.as_ps_control.control_widget.lenscontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.LensControlWidget.LILensControlWidget"]], "liquadrupolecontrolwidget (class in siriushla.as_ps_control.control_widget.famquadrupolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget.LIQuadrupoleControlWidget"]], "lislowcorrectorcontrolwidget (class in siriushla.as_ps_control.control_widget.slowcorrectorcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget.LISlowCorrectorControlWidget"]], "lisolenoidcontrolwidget (class in siriushla.as_ps_control.control_widget.solenoidcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.SolenoidControlWidget.LISolenoidControlWidget"]], "lispectcontrolwidget (class in siriushla.as_ps_control.control_widget.dipolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.DipoleControlWidget.LISpectControlWidget"]], "pscontainer (class in siriushla.as_ps_control.control_widget.basepscontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.BasePSControlWidget.PSContainer"]], "sidipolecontrolwidget (class in siriushla.as_ps_control.control_widget.dipolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.DipoleControlWidget.SIDipoleControlWidget"]], "sifamquadrupolecontrolwidget (class in siriushla.as_ps_control.control_widget.famquadrupolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget.SIFamQuadrupoleControlWidget"]], "sifamsextupolecontrolwidget (class in siriushla.as_ps_control.control_widget.famsextupolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.FamSextupoleControlWidget.SIFamSextupoleControlWidget"]], "sifastcorrectorcontrolwidget (class in siriushla.as_ps_control.control_widget.fastcorrectorcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.FastCorrectorControlWidget.SIFastCorrectorControlWidget"]], "siseptffcorrectorcontrolwidget (class in siriushla.as_ps_control.control_widget.septffcorrectorcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.SeptFFCorrectorControlWidget.SISeptFFCorrectorControlWidget"]], "siskewquadcontrolwidget (class in siriushla.as_ps_control.control_widget.skewquadcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.SkewQuadControlWidget.SISkewQuadControlWidget"]], "sislowcorrectorcontrolwidget (class in siriushla.as_ps_control.control_widget.slowcorrectorcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget.SISlowCorrectorControlWidget"]], "sitrimallcontrolwidget (class in siriushla.as_ps_control.control_widget.trimallcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.TrimAllControlWidget.SITrimAllControlWidget"]], "sitrimfamcontrolwidget (class in siriushla.as_ps_control.control_widget.trimfamcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.TrimFamControlWidget.SITrimFamControlWidget"]], "tbdipolecontrolwidget (class in siriushla.as_ps_control.control_widget.dipolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.DipoleControlWidget.TBDipoleControlWidget"]], "tbquadrupolecontrolwidget (class in siriushla.as_ps_control.control_widget.famquadrupolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget.TBQuadrupoleControlWidget"]], "tbslowcorrectorcontrolwidget (class in siriushla.as_ps_control.control_widget.slowcorrectorcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget.TBSlowCorrectorControlWidget"]], "tsdipolecontrolwidget (class in siriushla.as_ps_control.control_widget.dipolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.DipoleControlWidget.TSDipoleControlWidget"]], "tsquadrupolecontrolwidget (class in siriushla.as_ps_control.control_widget.famquadrupolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget.TSQuadrupoleControlWidget"]], "tsslowcorrectorcontrolwidget (class in siriushla.as_ps_control.control_widget.slowcorrectorcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget.TSSlowCorrectorControlWidget"]], "vertical (siriushla.as_ps_control.control_widget.basepscontrolwidget.basepscontrolwidget attribute)": [[32, "siriushla.as_ps_control.control_widget.BasePSControlWidget.BasePSControlWidget.VERTICAL"]], "contextmenuevent() (siriushla.as_ps_control.control_widget.basepscontrolwidget.basepscontrolwidget method)": [[32, "siriushla.as_ps_control.control_widget.BasePSControlWidget.BasePSControlWidget.contextMenuEvent"]], "contextmenuevent() (siriushla.as_ps_control.control_widget.basepscontrolwidget.pscontainer method)": [[32, "siriushla.as_ps_control.control_widget.BasePSControlWidget.PSContainer.contextMenuEvent"]], "factory() (siriushla.as_ps_control.control_widget.controlwidgetfactory.controlwidgetfactory static method)": [[32, "siriushla.as_ps_control.control_widget.ControlWidgetFactory.ControlWidgetFactory.factory"]], "get_summary_widgets() (siriushla.as_ps_control.control_widget.basepscontrolwidget.basepscontrolwidget method)": [[32, "siriushla.as_ps_control.control_widget.BasePSControlWidget.BasePSControlWidget.get_summary_widgets"]], "run_test() (in module siriushla.as_ps_control.control_widget.famquadrupolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget.run_test"]], "run_test() (in module siriushla.as_ps_control.control_widget.famsextupolecontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.FamSextupoleControlWidget.run_test"]], "run_test() (in module siriushla.as_ps_control.control_widget.skewquadcontrolwidget)": [[32, "siriushla.as_ps_control.control_widget.SkewQuadControlWidget.run_test"]], "show_connections() (siriushla.as_ps_control.control_widget.basepscontrolwidget.basepscontrolwidget method)": [[32, "siriushla.as_ps_control.control_widget.BasePSControlWidget.BasePSControlWidget.show_connections"]], "show_connections() (siriushla.as_ps_control.control_widget.basepscontrolwidget.pscontainer method)": [[32, "siriushla.as_ps_control.control_widget.BasePSControlWidget.PSContainer.show_connections"]], "siriushla.as_ps_control.control_widget": [[32, "module-siriushla.as_ps_control.control_widget"]], "siriushla.as_ps_control.control_widget.basepscontrolwidget": [[32, "module-siriushla.as_ps_control.control_widget.BasePSControlWidget"]], "siriushla.as_ps_control.control_widget.controlwidgetfactory": [[32, "module-siriushla.as_ps_control.control_widget.ControlWidgetFactory"]], "siriushla.as_ps_control.control_widget.dipolecontrolwidget": [[32, "module-siriushla.as_ps_control.control_widget.DipoleControlWidget"]], "siriushla.as_ps_control.control_widget.famquadrupolecontrolwidget": [[32, "module-siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget"]], "siriushla.as_ps_control.control_widget.famsextupolecontrolwidget": [[32, "module-siriushla.as_ps_control.control_widget.FamSextupoleControlWidget"]], "siriushla.as_ps_control.control_widget.fastcorrectorcontrolwidget": [[32, "module-siriushla.as_ps_control.control_widget.FastCorrectorControlWidget"]], "siriushla.as_ps_control.control_widget.idffcorrectorcontrolwidget": [[32, "module-siriushla.as_ps_control.control_widget.IDFFCorrectorControlWidget"]], "siriushla.as_ps_control.control_widget.lenscontrolwidget": [[32, "module-siriushla.as_ps_control.control_widget.LensControlWidget"]], "siriushla.as_ps_control.control_widget.septffcorrectorcontrolwidget": [[32, "module-siriushla.as_ps_control.control_widget.SeptFFCorrectorControlWidget"]], "siriushla.as_ps_control.control_widget.skewquadcontrolwidget": [[32, "module-siriushla.as_ps_control.control_widget.SkewQuadControlWidget"]], "siriushla.as_ps_control.control_widget.slowcorrectorcontrolwidget": [[32, "module-siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget"]], "siriushla.as_ps_control.control_widget.solenoidcontrolwidget": [[32, "module-siriushla.as_ps_control.control_widget.SolenoidControlWidget"]], "siriushla.as_ps_control.control_widget.trimallcontrolwidget": [[32, "module-siriushla.as_ps_control.control_widget.TrimAllControlWidget"]], "siriushla.as_ps_control.control_widget.trimfamcontrolwidget": [[32, "module-siriushla.as_ps_control.control_widget.TrimFamControlWidget"]], "update_visible_props() (siriushla.as_ps_control.control_widget.basepscontrolwidget.pscontainer method)": [[32, "siriushla.as_ps_control.control_widget.BasePSControlWidget.PSContainer.update_visible_props"]], "auxdev2moddict (siriushla.as_ps_control.detail_widget.psdetailwidget.psdetailwidget attribute)": [[33, "siriushla.as_ps_control.detail_widget.PSDetailWidget.PSDetailWidget.AuxDev2ModDict"]], "bit_maps (siriushla.as_ps_control.detail_widget.interlockwindow.liinterlockwindow attribute)": [[33, "siriushla.as_ps_control.detail_widget.InterlockWindow.LIInterlockWindow.BIT_MAPS"]], "basicparams (siriushla.as_ps_control.detail_widget.psdetailwidget.psdetailwidget attribute)": [[33, "siriushla.as_ps_control.detail_widget.PSDetailWidget.PSDetailWidget.BasicParams"]], "color_maps (siriushla.as_ps_control.detail_widget.interlockwindow.liinterlockwindow attribute)": [[33, "siriushla.as_ps_control.detail_widget.InterlockWindow.LIInterlockWindow.COLOR_MAPS"]], "customlabel (class in siriushla.as_ps_control.detail_widget.psdetailwidget)": [[33, "siriushla.as_ps_control.detail_widget.PSDetailWidget.CustomLabel"]], "dclinkdetailwidget (class in siriushla.as_ps_control.detail_widget.psdetailwidget)": [[33, "siriushla.as_ps_control.detail_widget.PSDetailWidget.DCLinkDetailWidget"]], "detailwidgetfactory (class in siriushla.as_ps_control.detail_widget.detailwidgetfactory)": [[33, "siriushla.as_ps_control.detail_widget.DetailWidgetFactory.DetailWidgetFactory"]], "facdclinkdetailwidget (class in siriushla.as_ps_control.detail_widget.psdetailwidget)": [[33, "siriushla.as_ps_control.detail_widget.PSDetailWidget.FACDCLinkDetailWidget"]], "fbpdclinkdetailwidget (class in siriushla.as_ps_control.detail_widget.psdetailwidget)": [[33, "siriushla.as_ps_control.detail_widget.PSDetailWidget.FBPDCLinkDetailWidget"]], "fastcorrpsdetailwidget (class in siriushla.as_ps_control.detail_widget.psdetailwidget)": [[33, "siriushla.as_ps_control.detail_widget.PSDetailWidget.FastCorrPSDetailWidget"]], "interlocklistwidget (class in siriushla.as_ps_control.detail_widget.interlockwindow)": [[33, "siriushla.as_ps_control.detail_widget.InterlockWindow.InterlockListWidget"]], "interlockwidget (class in siriushla.as_ps_control.detail_widget.interlockwindow)": [[33, "siriushla.as_ps_control.detail_widget.InterlockWindow.InterlockWidget"]], "interlockwindow (class in siriushla.as_ps_control.detail_widget.interlockwindow)": [[33, "siriushla.as_ps_control.detail_widget.InterlockWindow.InterlockWindow"]], "liinterlockwindow (class in siriushla.as_ps_control.detail_widget.interlockwindow)": [[33, "siriushla.as_ps_control.detail_widget.InterlockWindow.LIInterlockWindow"]], "lipsdetailwidget (class in siriushla.as_ps_control.detail_widget.psdetailwidget)": [[33, "siriushla.as_ps_control.detail_widget.PSDetailWidget.LIPSDetailWidget"]], "lispectintlkled (class in siriushla.as_ps_control.detail_widget.custom_widgets)": [[33, "siriushla.as_ps_control.detail_widget.custom_widgets.LISpectIntlkLed"]], "psauxmeaswidget (class in siriushla.as_ps_control.detail_widget.psdetailwidget)": [[33, "siriushla.as_ps_control.detail_widget.PSDetailWidget.PSAuxMeasWidget"]], "psdetailwidget (class in siriushla.as_ps_control.detail_widget.psdetailwidget)": [[33, "siriushla.as_ps_control.detail_widget.PSDetailWidget.PSDetailWidget"]], "psparamswidget (class in siriushla.as_ps_control.detail_widget.psdetailwidget)": [[33, "siriushla.as_ps_control.detail_widget.PSDetailWidget.PSParamsWidget"]], "factory() (siriushla.as_ps_control.detail_widget.detailwidgetfactory.detailwidgetfactory static method)": [[33, "siriushla.as_ps_control.detail_widget.DetailWidgetFactory.DetailWidgetFactory.factory"]], "filterlog (siriushla.as_ps_control.detail_widget.custom_widgets.lispectintlkled attribute)": [[33, "siriushla.as_ps_control.detail_widget.custom_widgets.LISpectIntlkLed.filterlog"]], "mousedoubleclickevent() (siriushla.as_ps_control.detail_widget.custom_widgets.lispectintlkled method)": [[33, "siriushla.as_ps_control.detail_widget.custom_widgets.LISpectIntlkLed.mouseDoubleClickEvent"]], "normal (siriushla.as_ps_control.detail_widget.custom_widgets.lispectintlkled attribute)": [[33, "siriushla.as_ps_control.detail_widget.custom_widgets.LISpectIntlkLed.normal"]], "siriushla.as_ps_control.detail_widget": [[33, "module-siriushla.as_ps_control.detail_widget"]], "siriushla.as_ps_control.detail_widget.detailwidgetfactory": [[33, "module-siriushla.as_ps_control.detail_widget.DetailWidgetFactory"]], "siriushla.as_ps_control.detail_widget.interlockwindow": [[33, "module-siriushla.as_ps_control.detail_widget.InterlockWindow"]], "siriushla.as_ps_control.detail_widget.psdetailwidget": [[33, "module-siriushla.as_ps_control.detail_widget.PSDetailWidget"]], "siriushla.as_ps_control.detail_widget.custom_widgets": [[33, "module-siriushla.as_ps_control.detail_widget.custom_widgets"]], "value_changed() (siriushla.as_ps_control.detail_widget.psdetailwidget.customlabel method)": [[33, "siriushla.as_ps_control.detail_widget.PSDetailWidget.CustomLabel.value_changed"]], "value_changed() (siriushla.as_ps_control.detail_widget.custom_widgets.lispectintlkled method)": [[33, "siriushla.as_ps_control.detail_widget.custom_widgets.LISpectIntlkLed.value_changed"]], "warning (siriushla.as_ps_control.detail_widget.custom_widgets.lispectintlkled attribute)": [[33, "siriushla.as_ps_control.detail_widget.custom_widgets.LISpectIntlkLed.warning"]], "basetask (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.BaseTask"]], "createcyclers (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.CreateCyclers"]], "cycle (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.Cycle"]], "cycletrims (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.CycleTrims"]], "cyclewindow (class in siriushla.as_ps_cycle.cycle_window)": [[34, "siriushla.as_ps_cycle.cycle_window.CycleWindow"]], "myprogressbar (class in siriushla.as_ps_cycle.cycle_window)": [[34, "siriushla.as_ps_cycle.cycle_window.MyProgressBar"]], "preparepscurrentzero (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSCurrentZero"]], "preparepsidffmode (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSIDFFMode"]], "preparepsopmodecycle (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSOpModeCycle"]], "preparepsopmodeslowref (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSOpModeSlowRef"]], "preparepsparams (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSParams"]], "preparepssofbmode (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSSOFBMode"]], "preparetiming (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.PrepareTiming"]], "restoretiming (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.RestoreTiming"]], "savetiming (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.SaveTiming"]], "updateprogressbar (class in siriushla.as_ps_cycle.cycle_window)": [[34, "siriushla.as_ps_cycle.cycle_window.UpdateProgressBar"]], "verifyps (class in siriushla.as_ps_cycle.tasks)": [[34, "siriushla.as_ps_cycle.tasks.VerifyPS"]], "closeevent() (siriushla.as_ps_cycle.cycle_window.cyclewindow method)": [[34, "siriushla.as_ps_cycle.cycle_window.CycleWindow.closeEvent"]], "completed (siriushla.as_ps_cycle.tasks.basetask attribute)": [[34, "siriushla.as_ps_cycle.tasks.BaseTask.completed"]], "currentitem (siriushla.as_ps_cycle.tasks.basetask attribute)": [[34, "siriushla.as_ps_cycle.tasks.BaseTask.currentItem"]], "duration() (siriushla.as_ps_cycle.tasks.basetask method)": [[34, "siriushla.as_ps_cycle.tasks.BaseTask.duration"]], "duration() (siriushla.as_ps_cycle.tasks.cycle method)": [[34, "siriushla.as_ps_cycle.tasks.Cycle.duration"]], "duration() (siriushla.as_ps_cycle.tasks.cycletrims method)": [[34, "siriushla.as_ps_cycle.tasks.CycleTrims.duration"]], "duration() (siriushla.as_ps_cycle.tasks.preparepscurrentzero method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSCurrentZero.duration"]], "duration() (siriushla.as_ps_cycle.tasks.preparepsidffmode method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSIDFFMode.duration"]], "duration() (siriushla.as_ps_cycle.tasks.preparepsopmodecycle method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSOpModeCycle.duration"]], "duration() (siriushla.as_ps_cycle.tasks.preparepsopmodeslowref method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSOpModeSlowRef.duration"]], "duration() (siriushla.as_ps_cycle.tasks.preparepsparams method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSParams.duration"]], "duration() (siriushla.as_ps_cycle.tasks.preparepssofbmode method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSSOFBMode.duration"]], "duration() (siriushla.as_ps_cycle.tasks.preparetiming method)": [[34, "siriushla.as_ps_cycle.tasks.PrepareTiming.duration"]], "duration() (siriushla.as_ps_cycle.tasks.restoretiming method)": [[34, "siriushla.as_ps_cycle.tasks.RestoreTiming.duration"]], "duration() (siriushla.as_ps_cycle.tasks.savetiming method)": [[34, "siriushla.as_ps_cycle.tasks.SaveTiming.duration"]], "exit_task() (siriushla.as_ps_cycle.cycle_window.updateprogressbar method)": [[34, "siriushla.as_ps_cycle.cycle_window.UpdateProgressBar.exit_task"]], "exit_task() (siriushla.as_ps_cycle.tasks.basetask method)": [[34, "siriushla.as_ps_cycle.tasks.BaseTask.exit_task"]], "function() (siriushla.as_ps_cycle.tasks.basetask method)": [[34, "siriushla.as_ps_cycle.tasks.BaseTask.function"]], "function() (siriushla.as_ps_cycle.tasks.createcyclers method)": [[34, "siriushla.as_ps_cycle.tasks.CreateCyclers.function"]], "function() (siriushla.as_ps_cycle.tasks.cycle method)": [[34, "siriushla.as_ps_cycle.tasks.Cycle.function"]], "function() (siriushla.as_ps_cycle.tasks.cycletrims method)": [[34, "siriushla.as_ps_cycle.tasks.CycleTrims.function"]], "function() (siriushla.as_ps_cycle.tasks.preparepscurrentzero method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSCurrentZero.function"]], "function() (siriushla.as_ps_cycle.tasks.preparepsidffmode method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSIDFFMode.function"]], "function() (siriushla.as_ps_cycle.tasks.preparepsopmodecycle method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSOpModeCycle.function"]], "function() (siriushla.as_ps_cycle.tasks.preparepsopmodeslowref method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSOpModeSlowRef.function"]], "function() (siriushla.as_ps_cycle.tasks.preparepsparams method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSParams.function"]], "function() (siriushla.as_ps_cycle.tasks.preparepssofbmode method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSSOFBMode.function"]], "function() (siriushla.as_ps_cycle.tasks.preparetiming method)": [[34, "siriushla.as_ps_cycle.tasks.PrepareTiming.function"]], "function() (siriushla.as_ps_cycle.tasks.restoretiming method)": [[34, "siriushla.as_ps_cycle.tasks.RestoreTiming.function"]], "function() (siriushla.as_ps_cycle.tasks.savetiming method)": [[34, "siriushla.as_ps_cycle.tasks.SaveTiming.function"]], "function() (siriushla.as_ps_cycle.tasks.verifyps method)": [[34, "siriushla.as_ps_cycle.tasks.VerifyPS.function"]], "increment (siriushla.as_ps_cycle.cycle_window.updateprogressbar attribute)": [[34, "siriushla.as_ps_cycle.cycle_window.UpdateProgressBar.increment"]], "increment() (siriushla.as_ps_cycle.cycle_window.myprogressbar method)": [[34, "siriushla.as_ps_cycle.cycle_window.MyProgressBar.increment"]], "itemdone (siriushla.as_ps_cycle.tasks.basetask attribute)": [[34, "siriushla.as_ps_cycle.tasks.BaseTask.itemDone"]], "keypressevent() (siriushla.as_ps_cycle.cycle_window.cyclewindow method)": [[34, "siriushla.as_ps_cycle.cycle_window.CycleWindow.keyPressEvent"]], "run() (siriushla.as_ps_cycle.cycle_window.updateprogressbar method)": [[34, "siriushla.as_ps_cycle.cycle_window.UpdateProgressBar.run"]], "run() (siriushla.as_ps_cycle.tasks.basetask method)": [[34, "siriushla.as_ps_cycle.tasks.BaseTask.run"]], "siriushla.as_ps_cycle": [[34, "module-siriushla.as_ps_cycle"]], "siriushla.as_ps_cycle.cycle_window": [[34, "module-siriushla.as_ps_cycle.cycle_window"]], "siriushla.as_ps_cycle.tasks": [[34, "module-siriushla.as_ps_cycle.tasks"]], "size() (siriushla.as_ps_cycle.tasks.basetask method)": [[34, "siriushla.as_ps_cycle.tasks.BaseTask.size"]], "size() (siriushla.as_ps_cycle.tasks.cycle method)": [[34, "siriushla.as_ps_cycle.tasks.Cycle.size"]], "size() (siriushla.as_ps_cycle.tasks.cycletrims method)": [[34, "siriushla.as_ps_cycle.tasks.CycleTrims.size"]], "size() (siriushla.as_ps_cycle.tasks.preparepscurrentzero method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSCurrentZero.size"]], "size() (siriushla.as_ps_cycle.tasks.preparepsidffmode method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSIDFFMode.size"]], "size() (siriushla.as_ps_cycle.tasks.preparepsopmodecycle method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSOpModeCycle.size"]], "size() (siriushla.as_ps_cycle.tasks.preparepsopmodeslowref method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSOpModeSlowRef.size"]], "size() (siriushla.as_ps_cycle.tasks.preparepsparams method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSParams.size"]], "size() (siriushla.as_ps_cycle.tasks.preparepssofbmode method)": [[34, "siriushla.as_ps_cycle.tasks.PreparePSSOFBMode.size"]], "size() (siriushla.as_ps_cycle.tasks.preparetiming method)": [[34, "siriushla.as_ps_cycle.tasks.PrepareTiming.size"]], "size() (siriushla.as_ps_cycle.tasks.restoretiming method)": [[34, "siriushla.as_ps_cycle.tasks.RestoreTiming.size"]], "size() (siriushla.as_ps_cycle.tasks.savetiming method)": [[34, "siriushla.as_ps_cycle.tasks.SaveTiming.size"]], "size() (siriushla.as_ps_cycle.tasks.verifyps method)": [[34, "siriushla.as_ps_cycle.tasks.VerifyPS.size"]], "update() (siriushla.as_ps_cycle.tasks.basetask method)": [[34, "siriushla.as_ps_cycle.tasks.BaseTask.update"]], "updated (siriushla.as_ps_cycle.tasks.basetask attribute)": [[34, "siriushla.as_ps_cycle.tasks.BaseTask.updated"]], "logitemdelegate (class in siriushla.as_ps_diag.main)": [[35, "siriushla.as_ps_diag.main.LogItemDelegate"]], "logtable (class in siriushla.as_ps_diag.main)": [[35, "siriushla.as_ps_diag.main.LogTable"]], "myled (class in siriushla.as_ps_diag.monitor)": [[35, "siriushla.as_ps_diag.monitor.MyLed"]], "myledmultichannel (in module siriushla.as_ps_diag.main)": [[35, "siriushla.as_ps_diag.main.MyLedMultiChannel"]], "myledmulticonnection (in module siriushla.as_ps_diag.main)": [[35, "siriushla.as_ps_diag.main.MyLedMultiConnection"]], "prop_line_default (siriushla.as_ps_diag.ps_graph_mon.psgraphproptyselwidget attribute)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphProptySelWidget.PROP_LINE_DEFAULT"]], "prop_line_fastcorr (siriushla.as_ps_diag.ps_graph_mon.psgraphproptyselwidget attribute)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphProptySelWidget.PROP_LINE_FASTCORR"]], "prop_symb_default (siriushla.as_ps_diag.ps_graph_mon.psgraphproptyselwidget attribute)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphProptySelWidget.PROP_SYMB_DEFAULT"]], "prop_symb_fastcorr (siriushla.as_ps_diag.ps_graph_mon.psgraphproptyselwidget attribute)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphProptySelWidget.PROP_SYMB_FASTCORR"]], "psdiag (class in siriushla.as_ps_diag.main)": [[35, "siriushla.as_ps_diag.main.PSDiag"]], "psgraph (class in siriushla.as_ps_diag.ps_graph_mon)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraph"]], "psgraphdevicesselwidget (class in siriushla.as_ps_diag.ps_graph_mon)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphDevicesSelWidget"]], "psgraphmonwidget (class in siriushla.as_ps_diag.ps_graph_mon)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWidget"]], "psgraphmonwindow (class in siriushla.as_ps_diag.ps_graph_mon)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWindow"]], "psgraphproptyselwidget (class in siriushla.as_ps_diag.ps_graph_mon)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphProptySelWidget"]], "psmonitor (class in siriushla.as_ps_diag.monitor)": [[35, "siriushla.as_ps_diag.monitor.PSMonitor"]], "add_log() (siriushla.as_ps_diag.main.logtable method)": [[35, "siriushla.as_ps_diag.main.LogTable.add_log"]], "add_log_slot() (siriushla.as_ps_diag.main.logtable method)": [[35, "siriushla.as_ps_diag.main.LogTable.add_log_slot"]], "alarm_severity_changed() (siriushla.as_ps_diag.main.logtable method)": [[35, "siriushla.as_ps_diag.main.LogTable.alarm_severity_changed"]], "change_matype() (siriushla.as_ps_diag.ps_graph_mon.psgraphproptyselwidget method)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphProptySelWidget.change_matype"]], "connection_changed() (siriushla.as_ps_diag.main.logtable method)": [[35, "siriushla.as_ps_diag.main.LogTable.connection_changed"]], "contextmenuevent() (siriushla.as_ps_diag.ps_graph_mon.psgraphmonwidget method)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWidget.contextMenuEvent"]], "contextmenuevent() (siriushla.as_ps_diag.ps_graph_mon.psgraphmonwindow method)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWindow.contextMenuEvent"]], "create_led_class() (in module siriushla.as_ps_diag.main)": [[35, "siriushla.as_ps_diag.main.create_led_class"]], "default_colorlist (siriushla.as_ps_diag.monitor.myled attribute)": [[35, "siriushla.as_ps_diag.monitor.MyLed.default_colorlist"]], "get_col2dev_count() (in module siriushla.as_ps_diag.util)": [[35, "siriushla.as_ps_diag.util.get_col2dev_count"]], "get_dev2sub_labels() (in module siriushla.as_ps_diag.util)": [[35, "siriushla.as_ps_diag.util.get_dev2sub_labels"]], "get_label2devices() (in module siriushla.as_ps_diag.util)": [[35, "siriushla.as_ps_diag.util.get_label2devices"]], "get_sec2dev_laypos() (in module siriushla.as_ps_diag.util)": [[35, "siriushla.as_ps_diag.util.get_sec2dev_laypos"]], "matype_changed (siriushla.as_ps_diag.ps_graph_mon.psgraphdevicesselwidget attribute)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphDevicesSelWidget.matype_changed"]], "mousedoubleclickevent() (siriushla.as_ps_diag.main.logtable method)": [[35, "siriushla.as_ps_diag.main.LogTable.mouseDoubleClickEvent"]], "mousedoubleclickevent() (siriushla.as_ps_diag.monitor.myled method)": [[35, "siriushla.as_ps_diag.monitor.MyLed.mouseDoubleClickEvent"]], "mousedoubleclickevent() (siriushla.as_ps_diag.ps_graph_mon.psgraph method)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraph.mouseDoubleClickEvent"]], "mousemoveevent() (siriushla.as_ps_diag.ps_graph_mon.psgraph method)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraph.mouseMoveEvent"]], "mousepressevent() (siriushla.as_ps_diag.monitor.myled method)": [[35, "siriushla.as_ps_diag.monitor.MyLed.mousePressEvent"]], "paint() (siriushla.as_ps_diag.main.logitemdelegate method)": [[35, "siriushla.as_ps_diag.main.LogItemDelegate.paint"]], "proplinechanged (siriushla.as_ps_diag.ps_graph_mon.psgraphmonwidget attribute)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWidget.propLineChanged"]], "propsymbchanged (siriushla.as_ps_diag.ps_graph_mon.psgraphmonwidget attribute)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWidget.propSymbChanged"]], "propty_line_changed (siriushla.as_ps_diag.ps_graph_mon.psgraphproptyselwidget attribute)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphProptySelWidget.propty_line_changed"]], "propty_symb_changed (siriushla.as_ps_diag.ps_graph_mon.psgraphproptyselwidget attribute)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphProptySelWidget.propty_symb_changed"]], "psnames (siriushla.as_ps_diag.ps_graph_mon.psgraph property)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraph.psnames"]], "psnameschanged (siriushla.as_ps_diag.ps_graph_mon.psgraphmonwidget attribute)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWidget.psnamesChanged"]], "psnames_changed (siriushla.as_ps_diag.ps_graph_mon.psgraphdevicesselwidget attribute)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphDevicesSelWidget.psnames_changed"]], "remove_log() (siriushla.as_ps_diag.main.logtable method)": [[35, "siriushla.as_ps_diag.main.LogTable.remove_log"]], "remove_log_slot() (siriushla.as_ps_diag.main.logtable method)": [[35, "siriushla.as_ps_diag.main.LogTable.remove_log_slot"]], "sector (siriushla.as_ps_diag.ps_graph_mon.psgraph property)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraph.sector"]], "show_connections() (siriushla.as_ps_diag.ps_graph_mon.psgraphmonwindow method)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWindow.show_connections"]], "siriushla.as_ps_diag": [[35, "module-siriushla.as_ps_diag"]], "siriushla.as_ps_diag.main": [[35, "module-siriushla.as_ps_diag.main"]], "siriushla.as_ps_diag.monitor": [[35, "module-siriushla.as_ps_diag.monitor"]], "siriushla.as_ps_diag.ps_graph_mon": [[35, "module-siriushla.as_ps_diag.ps_graph_mon"]], "siriushla.as_ps_diag.util": [[35, "module-siriushla.as_ps_diag.util"]], "symbols (siriushla.as_ps_diag.ps_graph_mon.psgraph property)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraph.symbols"]], "tooltips (siriushla.as_ps_diag.ps_graph_mon.psgraph property)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraph.tooltips"]], "update_property_line() (siriushla.as_ps_diag.ps_graph_mon.psgraphmonwidget method)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWidget.update_property_line"]], "update_property_symb() (siriushla.as_ps_diag.ps_graph_mon.psgraphmonwidget method)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWidget.update_property_symb"]], "update_psnames() (siriushla.as_ps_diag.ps_graph_mon.psgraphmonwidget method)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWidget.update_psnames"]], "updated (siriushla.as_ps_diag.main.logtable attribute)": [[35, "siriushla.as_ps_diag.main.LogTable.updated"]], "value_changed() (siriushla.as_ps_diag.monitor.myled method)": [[35, "siriushla.as_ps_diag.monitor.MyLed.value_changed"]], "x_data (siriushla.as_ps_diag.ps_graph_mon.psgraph property)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraph.x_data"]], "y_data (siriushla.as_ps_diag.ps_graph_mon.psgraph property)": [[35, "siriushla.as_ps_diag.ps_graph_mon.PSGraph.y_data"]], "pucontrolwindow (class in siriushla.as_pu_control.controlwindow)": [[36, "siriushla.as_pu_control.ControlWindow.PUControlWindow"]], "pudetailwidget (class in siriushla.as_pu_control.detailwidget)": [[36, "siriushla.as_pu_control.DetailWidget.PUDetailWidget"]], "pudetailwindow (class in siriushla.as_pu_control.detailwindow)": [[36, "siriushla.as_pu_control.DetailWindow.PUDetailWindow"]], "contextmenuevent() (siriushla.as_pu_control.controlwindow.pucontrolwindow method)": [[36, "siriushla.as_pu_control.ControlWindow.PUControlWindow.contextMenuEvent"]], "show_connections() (siriushla.as_pu_control.controlwindow.pucontrolwindow method)": [[36, "siriushla.as_pu_control.ControlWindow.PUControlWindow.show_connections"]], "siriushla.as_pu_control": [[36, "module-siriushla.as_pu_control"]], "siriushla.as_pu_control.controlwindow": [[36, "module-siriushla.as_pu_control.ControlWindow"]], "siriushla.as_pu_control.detailwidget": [[36, "module-siriushla.as_pu_control.DetailWidget"]], "siriushla.as_pu_control.detailwindow": [[36, "module-siriushla.as_pu_control.DetailWindow"]], "rfenbldsblbutton (class in siriushla.as_rf_control.custom_widgets)": [[37, "siriushla.as_rf_control.custom_widgets.RFEnblDsblButton"]], "rfmaincontrol (class in siriushla.as_rf_control.control)": [[37, "siriushla.as_rf_control.control.RFMainControl"]], "rftitleframe (class in siriushla.as_rf_control.custom_widgets)": [[37, "siriushla.as_rf_control.custom_widgets.RFTitleFrame"]], "siriushla.as_rf_control": [[37, "module-siriushla.as_rf_control"]], "siriushla.as_rf_control.control": [[37, "module-siriushla.as_rf_control.control"]], "siriushla.as_rf_control.custom_widgets": [[37, "module-siriushla.as_rf_control.custom_widgets"]], "siriushla.as_rf_control.details": [[37, "module-siriushla.as_rf_control.details"]], "siriushla.as_rf_control.util": [[37, "module-siriushla.as_rf_control.util"]], "afc (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.AFC"]], "afcoutlist (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.AFCOUTList"]], "baselist (class in siriushla.as_ti_control.base)": [[38, "siriushla.as_ti_control.base.BaseList"]], "basewidget (class in siriushla.as_ti_control.base)": [[38, "siriushla.as_ti_control.base.BaseWidget"]], "bucketlist (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.BucketList"]], "bucketlistgraph (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.BucketListGraph"]], "bucketlistlabel (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.BucketListLabel"]], "bucketlistlineedit (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.BucketListLineEdit"]], "clocklist (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.ClockList"]], "customgroupbox (class in siriushla.as_ti_control.base)": [[38, "siriushla.as_ti_control.base.CustomGroupBox"]], "eve (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.EVE"]], "evg (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.EVG"]], "evgcontinuousbutton (class in siriushla.as_ti_control.widgets)": [[38, "siriushla.as_ti_control.widgets.EVGContinuousButton"]], "evgcontinuousled (class in siriushla.as_ti_control.widgets)": [[38, "siriushla.as_ti_control.widgets.EVGContinuousLed"]], "evgfoutoutlist (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.EVGFOUTOUTList"]], "evginjectionbutton (class in siriushla.as_ti_control.widgets)": [[38, "siriushla.as_ti_control.widgets.EVGInjectionButton"]], "evginjectionled (class in siriushla.as_ti_control.widgets)": [[38, "siriushla.as_ti_control.widgets.EVGInjectionLed"]], "evgupdateevtbutton (class in siriushla.as_ti_control.widgets)": [[38, "siriushla.as_ti_control.widgets.EVGUpdateEvtButton"]], "evgupdateevtled (class in siriushla.as_ti_control.widgets)": [[38, "siriushla.as_ti_control.widgets.EVGUpdateEvtLed"]], "evr (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.EVR"]], "evrevedilist (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.EVREVEDIList"]], "evreveotplist (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.EVREVEOTPList"]], "evreveoutlist (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.EVREVEOUTList"]], "eventlist (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.EventList"]], "fout (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.FOUT"]], "hlbutton (class in siriushla.as_ti_control.monitor)": [[38, "siriushla.as_ti_control.monitor.HLButton"]], "hltriggerdetailed (class in siriushla.as_ti_control.hl_trigger)": [[38, "siriushla.as_ti_control.hl_trigger.HLTriggerDetailed"]], "hltriggerlist (class in siriushla.as_ti_control.hl_trigger)": [[38, "siriushla.as_ti_control.hl_trigger.HLTriggerList"]], "hltriggersimple (class in siriushla.as_ti_control.hl_trigger)": [[38, "siriushla.as_ti_control.hl_trigger.HLTriggerSimple"]], "llbutton (class in siriushla.as_ti_control.monitor)": [[38, "siriushla.as_ti_control.monitor.LLButton"]], "lltriggerlist (class in siriushla.as_ti_control.low_level_devices)": [[38, "siriushla.as_ti_control.low_level_devices.LLTriggerList"]], "lltriggers (class in siriushla.as_ti_control.hl_trigger)": [[38, "siriushla.as_ti_control.hl_trigger.LLTriggers"]], "monitorhl (class in siriushla.as_ti_control.monitor)": [[38, "siriushla.as_ti_control.monitor.MonitorHL"]], "monitorll (class in siriushla.as_ti_control.monitor)": [[38, "siriushla.as_ti_control.monitor.MonitorLL"]], "monitorwindow (class in siriushla.as_ti_control.monitor)": [[38, "siriushla.as_ti_control.monitor.MonitorWindow"]], "timingmain (class in siriushla.as_ti_control.hltiming)": [[38, "siriushla.as_ti_control.hltiming.TimingMain"]], "channels() (siriushla.as_ti_control.base.basewidget method)": [[38, "siriushla.as_ti_control.base.BaseWidget.channels"]], "drawarrow() (siriushla.as_ti_control.monitor.monitorll method)": [[38, "siriushla.as_ti_control.monitor.MonitorLL.drawarrow"]], "drawline() (siriushla.as_ti_control.monitor.monitorll method)": [[38, "siriushla.as_ti_control.monitor.MonitorLL.drawline"]], "filter_columns() (siriushla.as_ti_control.base.baselist method)": [[38, "siriushla.as_ti_control.base.BaseList.filter_columns"]], "filter_lines() (siriushla.as_ti_control.base.baselist method)": [[38, "siriushla.as_ti_control.base.BaseList.filter_lines"]], "getcolumn() (siriushla.as_ti_control.base.baselist method)": [[38, "siriushla.as_ti_control.base.BaseList.getColumn"]], "getline() (siriushla.as_ti_control.base.baselist method)": [[38, "siriushla.as_ti_control.base.BaseList.getLine"]], "get_pvname() (siriushla.as_ti_control.base.basewidget method)": [[38, "siriushla.as_ti_control.base.BaseWidget.get_pvname"]], "paintevent() (siriushla.as_ti_control.monitor.monitorll method)": [[38, "siriushla.as_ti_control.monitor.MonitorLL.paintEvent"]], "setevents() (siriushla.as_ti_control.hltiming.timingmain method)": [[38, "siriushla.as_ti_control.hltiming.TimingMain.setevents"]], "setglobalparameters() (siriushla.as_ti_control.hltiming.timingmain method)": [[38, "siriushla.as_ti_control.hltiming.TimingMain.setglobalparameters"]], "settriggers() (siriushla.as_ti_control.hltiming.timingmain method)": [[38, "siriushla.as_ti_control.hltiming.TimingMain.settriggers"]], "setupui() (siriushla.as_ti_control.base.baselist method)": [[38, "siriushla.as_ti_control.base.BaseList.setupUi"]], "setupdown() (siriushla.as_ti_control.monitor.monitorll method)": [[38, "siriushla.as_ti_control.monitor.MonitorLL.setupdown"]], "setupmenus() (siriushla.as_ti_control.hltiming.timingmain method)": [[38, "siriushla.as_ti_control.hltiming.TimingMain.setupmenus"]], "setupui() (siriushla.as_ti_control.hltiming.timingmain method)": [[38, "siriushla.as_ti_control.hltiming.TimingMain.setupui"]], "setupui() (siriushla.as_ti_control.low_level_devices.bucketlist method)": [[38, "siriushla.as_ti_control.low_level_devices.BucketList.setupui"]], "setupui() (siriushla.as_ti_control.low_level_devices.evg method)": [[38, "siriushla.as_ti_control.low_level_devices.EVG.setupui"]], "setupui() (siriushla.as_ti_control.monitor.llbutton method)": [[38, "siriushla.as_ti_control.monitor.LLButton.setupui"]], "siriushla.as_ti_control": [[38, "module-siriushla.as_ti_control"]], "siriushla.as_ti_control.base": [[38, "module-siriushla.as_ti_control.base"]], "siriushla.as_ti_control.hl_trigger": [[38, "module-siriushla.as_ti_control.hl_trigger"]], "siriushla.as_ti_control.hltiming": [[38, "module-siriushla.as_ti_control.hltiming"]], "siriushla.as_ti_control.low_level_devices": [[38, "module-siriushla.as_ti_control.low_level_devices"]], "siriushla.as_ti_control.monitor": [[38, "module-siriushla.as_ti_control.monitor"]], "siriushla.as_ti_control.widgets": [[38, "module-siriushla.as_ti_control.widgets"]], "value_changed() (siriushla.as_ti_control.low_level_devices.bucketlistlabel method)": [[38, "siriushla.as_ti_control.low_level_devices.BucketListLabel.value_changed"]], "value_changed() (siriushla.as_ti_control.low_level_devices.bucketlistlineedit method)": [[38, "siriushla.as_ti_control.low_level_devices.BucketListLineEdit.value_changed"]], "blimgproc (class in siriushla.bl_ap_imgproc.main)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc"]], "blintckctrl (class in siriushla.bl_ap_imgproc.blintlkctl)": [[39, "siriushla.bl_ap_imgproc.blintlkctl.BLIntckCtrl"]], "dvfimageview (class in siriushla.bl_ap_imgproc.image)": [[39, "siriushla.bl_ap_imgproc.image.DVFImageView"]], "add_fit_ellipse() (siriushla.bl_ap_imgproc.image.dvfimageview method)": [[39, "siriushla.bl_ap_imgproc.image.DVFImageView.add_fit_ellipse"]], "add_fit_ellipse_connection() (siriushla.bl_ap_imgproc.image.dvfimageview method)": [[39, "siriushla.bl_ap_imgproc.image.DVFImageView.add_fit_ellipse_connection"]], "add_fit_mean() (siriushla.bl_ap_imgproc.image.dvfimageview method)": [[39, "siriushla.bl_ap_imgproc.image.DVFImageView.add_fit_mean"]], "add_fit_mean_connection() (siriushla.bl_ap_imgproc.image.dvfimageview method)": [[39, "siriushla.bl_ap_imgproc.image.DVFImageView.add_fit_mean_connection"]], "add_prefixes() (siriushla.bl_ap_imgproc.image.dvfimageview method)": [[39, "siriushla.bl_ap_imgproc.image.DVFImageView.add_prefixes"]], "add_prefixes() (siriushla.bl_ap_imgproc.main.blimgproc method)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc.add_prefixes"]], "add_roi() (siriushla.bl_ap_imgproc.image.dvfimageview method)": [[39, "siriushla.bl_ap_imgproc.image.DVFImageView.add_roi"]], "add_roi_connection() (siriushla.bl_ap_imgproc.image.dvfimageview method)": [[39, "siriushla.bl_ap_imgproc.image.DVFImageView.add_roi_connection"]], "beamline_open() (siriushla.bl_ap_imgproc.blintlkctl.blintckctrl method)": [[39, "siriushla.bl_ap_imgproc.blintlkctl.BLIntckCtrl.beamline_open"]], "beamline_opened (siriushla.bl_ap_imgproc.blintlkctl.blintckctrl property)": [[39, "siriushla.bl_ap_imgproc.blintlkctl.BLIntckCtrl.beamline_opened"]], "create_box_group() (siriushla.bl_ap_imgproc.main.blimgproc method)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc.create_box_group"]], "create_time_widget() (siriushla.bl_ap_imgproc.main.blimgproc method)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc.create_time_widget"]], "create_widget() (siriushla.bl_ap_imgproc.main.blimgproc method)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc.create_widget"]], "end_processing_cmd() (siriushla.bl_ap_imgproc.main.blimgproc method)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc.end_processing_cmd"]], "format_datetime_lbl() (siriushla.bl_ap_imgproc.main.blimgproc method)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc.format_datetime_lbl"]], "gamma_enable() (siriushla.bl_ap_imgproc.blintlkctl.blintckctrl method)": [[39, "siriushla.bl_ap_imgproc.blintlkctl.BLIntckCtrl.gamma_enable"]], "generate_pv_name() (siriushla.bl_ap_imgproc.main.blimgproc method)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc.generate_pv_name"]], "intlk_cmd() (siriushla.bl_ap_imgproc.main.blimgproc method)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc.intlk_cmd"]], "plot_fit_ellipse() (siriushla.bl_ap_imgproc.image.dvfimageview method)": [[39, "siriushla.bl_ap_imgproc.image.DVFImageView.plot_fit_ellipse"]], "plot_fit_mean() (siriushla.bl_ap_imgproc.image.dvfimageview method)": [[39, "siriushla.bl_ap_imgproc.image.DVFImageView.plot_fit_mean"]], "plot_roi() (siriushla.bl_ap_imgproc.image.dvfimageview method)": [[39, "siriushla.bl_ap_imgproc.image.DVFImageView.plot_roi"]], "select_widget() (siriushla.bl_ap_imgproc.main.blimgproc method)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc.select_widget"]], "setpoint_readback_widget() (siriushla.bl_ap_imgproc.main.blimgproc method)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc.setpoint_readback_widget"]], "siriushla.bl_ap_imgproc": [[39, "module-siriushla.bl_ap_imgproc"]], "siriushla.bl_ap_imgproc.blintlkctl": [[39, "module-siriushla.bl_ap_imgproc.blintlkctl"]], "siriushla.bl_ap_imgproc.image": [[39, "module-siriushla.bl_ap_imgproc.image"]], "siriushla.bl_ap_imgproc.main": [[39, "module-siriushla.bl_ap_imgproc.main"]], "siriushla.bl_ap_imgproc.util": [[39, "module-siriushla.bl_ap_imgproc.util"]], "start_processing_cmd() (siriushla.bl_ap_imgproc.main.blimgproc method)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc.start_processing_cmd"]], "toggle_beamline_btns() (siriushla.bl_ap_imgproc.main.blimgproc method)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc.toggle_beamline_btns"]], "update_bl_open_status() (siriushla.bl_ap_imgproc.main.blimgproc method)": [[39, "siriushla.bl_ap_imgproc.main.BLImgProc.update_bl_open_status"]], "configlineedit (class in siriushla.bo_ap_ramp.custom_widgets)": [[40, "siriushla.bo_ap_ramp.custom_widgets.ConfigLineEdit"]], "customtablewidgetitem (class in siriushla.bo_ap_ramp.custom_widgets)": [[40, "siriushla.bo_ap_ramp.custom_widgets.CustomTableWidgetItem"]], "graphkicks (class in siriushla.bo_ap_ramp.custom_widgets)": [[40, "siriushla.bo_ap_ramp.custom_widgets.GraphKicks"]], "mytablewidget (class in siriushla.bo_ap_ramp.custom_widgets)": [[40, "siriushla.bo_ap_ramp.custom_widgets.MyTableWidget"]], "spinboxdelegate (class in siriushla.bo_ap_ramp.custom_widgets)": [[40, "siriushla.bo_ap_ramp.custom_widgets.SpinBoxDelegate"]], "createeditor() (siriushla.bo_ap_ramp.custom_widgets.spinboxdelegate method)": [[40, "siriushla.bo_ap_ramp.custom_widgets.SpinBoxDelegate.createEditor"]], "displaytext() (siriushla.bo_ap_ramp.custom_widgets.spinboxdelegate method)": [[40, "siriushla.bo_ap_ramp.custom_widgets.SpinBoxDelegate.displayText"]], "mousedoubleclickevent() (siriushla.bo_ap_ramp.custom_widgets.mytablewidget method)": [[40, "siriushla.bo_ap_ramp.custom_widgets.MyTableWidget.mouseDoubleClickEvent"]], "mousepressevent() (siriushla.bo_ap_ramp.custom_widgets.mytablewidget method)": [[40, "siriushla.bo_ap_ramp.custom_widgets.MyTableWidget.mousePressEvent"]], "mousereleaseevent() (siriushla.bo_ap_ramp.custom_widgets.configlineedit method)": [[40, "siriushla.bo_ap_ramp.custom_widgets.ConfigLineEdit.mouseReleaseEvent"]], "seteditordata() (siriushla.bo_ap_ramp.custom_widgets.spinboxdelegate method)": [[40, "siriushla.bo_ap_ramp.custom_widgets.SpinBoxDelegate.setEditorData"]], "setmodeldata() (siriushla.bo_ap_ramp.custom_widgets.spinboxdelegate method)": [[40, "siriushla.bo_ap_ramp.custom_widgets.SpinBoxDelegate.setModelData"]], "siriushla.bo_ap_ramp.custom_widgets": [[40, "module-siriushla.bo_ap_ramp.custom_widgets"]], "updateeditorgeometry() (siriushla.bo_ap_ramp.custom_widgets.spinboxdelegate method)": [[40, "siriushla.bo_ap_ramp.custom_widgets.SpinBoxDelegate.updateEditorGeometry"]], "siriushla.common": [[41, "module-siriushla.common"]], "basewidget (class in siriushla.common.afc_acq_core.base)": [[42, "siriushla.common.afc_acq_core.base.BaseWidget"]], "logicaltriggers (class in siriushla.common.afc_acq_core.triggers)": [[42, "siriushla.common.afc_acq_core.triggers.LogicalTriggers"]], "physicaltriggers (class in siriushla.common.afc_acq_core.triggers)": [[42, "siriushla.common.afc_acq_core.triggers.PhysicalTriggers"]], "get_pvname() (siriushla.common.afc_acq_core.base.basewidget method)": [[42, "siriushla.common.afc_acq_core.base.BaseWidget.get_pvname"]], "get_trigger_groupbox() (siriushla.common.afc_acq_core.triggers.logicaltriggers method)": [[42, "siriushla.common.afc_acq_core.triggers.LogicalTriggers.get_trigger_groupbox"]], "get_trigger_groupbox() (siriushla.common.afc_acq_core.triggers.physicaltriggers method)": [[42, "siriushla.common.afc_acq_core.triggers.PhysicalTriggers.get_trigger_groupbox"]], "setupui() (siriushla.common.afc_acq_core.triggers.logicaltriggers method)": [[42, "siriushla.common.afc_acq_core.triggers.LogicalTriggers.setupui"]], "setupui() (siriushla.common.afc_acq_core.triggers.physicaltriggers method)": [[42, "siriushla.common.afc_acq_core.triggers.PhysicalTriggers.setupui"]], "siriushla.common.afc_acq_core": [[42, "module-siriushla.common.afc_acq_core"]], "siriushla.common.afc_acq_core.base": [[42, "module-siriushla.common.afc_acq_core.base"]], "siriushla.common.afc_acq_core.triggers": [[42, "module-siriushla.common.afc_acq_core.triggers"]], "baslercamacqadvsettings (class in siriushla.common.cam_basler.settings)": [[43, "siriushla.common.cam_basler.settings.BaslerCamAcqAdvSettings"]], "baslercamsettings (class in siriushla.common.cam_basler.settings)": [[43, "siriushla.common.cam_basler.settings.BaslerCamSettings"]], "roioffsetxchannel (siriushla.common.cam_basler.base.siriusimageview attribute)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.ROIOffsetXChannel"]], "roioffsetychannel (siriushla.common.cam_basler.base.siriusimageview attribute)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.ROIOffsetYChannel"]], "siriusimageview (class in siriushla.common.cam_basler.base)": [[43, "siriushla.common.cam_basler.base.SiriusImageView"]], "calibrationgrid (siriushla.common.cam_basler.base.siriusimageview property)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.calibrationGrid"]], "calibration_grid_filterfactor (siriushla.common.cam_basler.base.siriusimageview property)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.calibration_grid_filterfactor"]], "calibration_grid_removeborder (siriushla.common.cam_basler.base.siriusimageview property)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.calibration_grid_removeborder"]], "create_propty_layout() (in module siriushla.common.cam_basler.base)": [[43, "siriushla.common.cam_basler.base.create_propty_layout"]], "failtosavegrid (siriushla.common.cam_basler.base.siriusimageview attribute)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.failToSaveGrid"]], "image_maxheight (siriushla.common.cam_basler.base.siriusimageview property)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.image_maxheight"]], "image_maxheight_changed() (siriushla.common.cam_basler.base.siriusimageview method)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.image_maxheight_changed"]], "image_maxwidth (siriushla.common.cam_basler.base.siriusimageview property)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.image_maxwidth"]], "image_maxwidth_changed() (siriushla.common.cam_basler.base.siriusimageview method)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.image_maxwidth_changed"]], "image_roioffsetx_changed() (siriushla.common.cam_basler.base.siriusimageview method)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.image_roioffsetx_changed"]], "image_roioffsety_changed() (siriushla.common.cam_basler.base.siriusimageview method)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.image_roioffsety_changed"]], "maxheightchannel (siriushla.common.cam_basler.base.siriusimageview attribute)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.maxHeightChannel"]], "maxwidthchannel (siriushla.common.cam_basler.base.siriusimageview attribute)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.maxWidthChannel"]], "process_image() (siriushla.common.cam_basler.base.siriusimageview method)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.process_image"]], "receiveddata (siriushla.common.cam_basler.base.siriusimageview attribute)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.receivedData"]], "roioffsetx_connection_state_changed() (siriushla.common.cam_basler.base.siriusimageview method)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.roioffsetx_connection_state_changed"]], "roioffsety_connection_state_changed() (siriushla.common.cam_basler.base.siriusimageview method)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.roioffsety_connection_state_changed"]], "savecalibrationgrid() (siriushla.common.cam_basler.base.siriusimageview method)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.saveCalibrationGrid"]], "set_calibration_grid_border2remove() (siriushla.common.cam_basler.base.siriusimageview method)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.set_calibration_grid_border2remove"]], "set_calibration_grid_filterfactor() (siriushla.common.cam_basler.base.siriusimageview method)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.set_calibration_grid_filterfactor"]], "showcalibrationgrid() (siriushla.common.cam_basler.base.siriusimageview method)": [[43, "siriushla.common.cam_basler.base.SiriusImageView.showCalibrationGrid"]], "siriushla.common.cam_basler": [[43, "module-siriushla.common.cam_basler"]], "siriushla.common.cam_basler.base": [[43, "module-siriushla.common.cam_basler.base"]], "siriushla.common.cam_basler.settings": [[43, "module-siriushla.common.cam_basler.settings"]], "device_class (siriushla.common.diff_ctrl.base.diffctrlview attribute)": [[44, "siriushla.common.diff_ctrl.base.DiffCtrlView.DEVICE_CLASS"]], "device_prefix (siriushla.common.diff_ctrl.base.diffctrlview attribute)": [[44, "siriushla.common.diff_ctrl.base.DiffCtrlView.DEVICE_PREFIX"]], "diffctrldetails (class in siriushla.common.diff_ctrl.details)": [[44, "siriushla.common.diff_ctrl.details.DiffCtrlDetails"]], "diffctrldevmonitor (class in siriushla.common.diff_ctrl.base)": [[44, "siriushla.common.diff_ctrl.base.DiffCtrlDevMonitor"]], "diffctrlview (class in siriushla.common.diff_ctrl.base)": [[44, "siriushla.common.diff_ctrl.base.DiffCtrlView"]], "changeevent() (siriushla.common.diff_ctrl.base.diffctrlview method)": [[44, "siriushla.common.diff_ctrl.base.DiffCtrlView.changeEvent"]], "channels() (siriushla.common.diff_ctrl.base.diffctrldevmonitor method)": [[44, "siriushla.common.diff_ctrl.base.DiffCtrlDevMonitor.channels"]], "siriushla.common.diff_ctrl": [[44, "module-siriushla.common.diff_ctrl"]], "siriushla.common.diff_ctrl.base": [[44, "module-siriushla.common.diff_ctrl.base"]], "siriushla.common.diff_ctrl.details": [[44, "module-siriushla.common.diff_ctrl.details"]], "updatedevwidget() (siriushla.common.diff_ctrl.base.diffctrldevmonitor method)": [[44, "siriushla.common.diff_ctrl.base.DiffCtrlDevMonitor.updateDevWidget"]], "siriushla.common.epics": [[45, "module-siriushla.common.epics"]], "epicschecker (class in siriushla.common.epics.task.checker)": [[46, "siriushla.common.epics.task.checker.EpicsChecker"]], "epicsconnector (class in siriushla.common.epics.task.connector)": [[46, "siriushla.common.epics.task.connector.EpicsConnector"]], "epicsgetter (class in siriushla.common.epics.task.getter)": [[46, "siriushla.common.epics.task.getter.EpicsGetter"]], "epicssetter (class in siriushla.common.epics.task.setter)": [[46, "siriushla.common.epics.task.setter.EpicsSetter"]], "epicstask (class in siriushla.common.epics.task.task)": [[46, "siriushla.common.epics.task.task.EpicsTask"]], "epicswait (class in siriushla.common.epics.task.wait)": [[46, "siriushla.common.epics.task.wait.EpicsWait"]], "pvs (siriushla.common.epics.task.task.epicstask attribute)": [[46, "siriushla.common.epics.task.task.EpicsTask.PVs"]], "completed (siriushla.common.epics.task.task.epicstask attribute)": [[46, "siriushla.common.epics.task.task.EpicsTask.completed"]], "currentitem (siriushla.common.epics.task.task.epicstask attribute)": [[46, "siriushla.common.epics.task.task.EpicsTask.currentItem"]], "exit_task() (siriushla.common.epics.task.task.epicstask method)": [[46, "siriushla.common.epics.task.task.EpicsTask.exit_task"]], "get_pv() (siriushla.common.epics.task.task.epicstask method)": [[46, "siriushla.common.epics.task.task.EpicsTask.get_pv"]], "itemchecked (siriushla.common.epics.task.checker.epicschecker attribute)": [[46, "siriushla.common.epics.task.checker.EpicsChecker.itemChecked"]], "itemdone (siriushla.common.epics.task.task.epicstask attribute)": [[46, "siriushla.common.epics.task.task.EpicsTask.itemDone"]], "itemnotread (siriushla.common.epics.task.getter.epicsgetter attribute)": [[46, "siriushla.common.epics.task.getter.EpicsGetter.itemNotRead"]], "itemread (siriushla.common.epics.task.getter.epicsgetter attribute)": [[46, "siriushla.common.epics.task.getter.EpicsGetter.itemRead"]], "run() (siriushla.common.epics.task.checker.epicschecker method)": [[46, "siriushla.common.epics.task.checker.EpicsChecker.run"]], "run() (siriushla.common.epics.task.connector.epicsconnector method)": [[46, "siriushla.common.epics.task.connector.EpicsConnector.run"]], "run() (siriushla.common.epics.task.getter.epicsgetter method)": [[46, "siriushla.common.epics.task.getter.EpicsGetter.run"]], "run() (siriushla.common.epics.task.setter.epicssetter method)": [[46, "siriushla.common.epics.task.setter.EpicsSetter.run"]], "run() (siriushla.common.epics.task.wait.epicswait method)": [[46, "siriushla.common.epics.task.wait.EpicsWait.run"]], "siriushla.common.epics.task": [[46, "module-siriushla.common.epics.task"]], "siriushla.common.epics.task.checker": [[46, "module-siriushla.common.epics.task.checker"]], "siriushla.common.epics.task.connector": [[46, "module-siriushla.common.epics.task.connector"]], "siriushla.common.epics.task.getter": [[46, "module-siriushla.common.epics.task.getter"]], "siriushla.common.epics.task.setter": [[46, "module-siriushla.common.epics.task.setter"]], "siriushla.common.epics.task.task": [[46, "module-siriushla.common.epics.task.task"]], "siriushla.common.epics.task.wait": [[46, "module-siriushla.common.epics.task.wait"]], "size() (siriushla.common.epics.task.task.epicstask method)": [[46, "siriushla.common.epics.task.task.EpicsTask.size"]], "pyepicswrapper (class in siriushla.common.epics.wrapper.pyepics)": [[47, "siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper"]], "timeout (siriushla.common.epics.wrapper.pyepics.pyepicswrapper attribute)": [[47, "siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper.TIMEOUT"]], "check() (siriushla.common.epics.wrapper.pyepics.pyepicswrapper method)": [[47, "siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper.check"]], "get() (siriushla.common.epics.wrapper.pyepics.pyepicswrapper method)": [[47, "siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper.get"]], "put() (siriushla.common.epics.wrapper.pyepics.pyepicswrapper method)": [[47, "siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper.put"]], "pvname (siriushla.common.epics.wrapper.pyepics.pyepicswrapper property)": [[47, "siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper.pvname"]], "siriushla.common.epics.wrapper": [[47, "module-siriushla.common.epics.wrapper"]], "siriushla.common.epics.wrapper.pyepics": [[47, "module-siriushla.common.epics.wrapper.pyepics"]], "bypassbtn (class in siriushla.li_ap_mps.bypass_btn)": [[48, "siriushla.li_ap_mps.bypass_btn.BypassBtn"]], "mpscontrol (class in siriushla.li_ap_mps.main)": [[48, "siriushla.li_ap_mps.main.MPSControl"]], "mpsmonitor (class in siriushla.li_ap_mps.monitor)": [[48, "siriushla.li_ap_mps.monitor.MPSMonitor"]], "changewid() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.changeWid"]], "clearlayout() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.clearLayout"]], "controlbox() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.controlBox"]], "controlhiddenbox() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.controlHiddenBox"]], "controlwidget() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.controlWidget"]], "countgen() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.countGen"]], "counttemp() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.countTemp"]], "countva() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.countVA"]], "countwater() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.countWater"]], "dispayallcontrols() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.dispayAllControls"]], "dispayhiddencontrols() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.dispayHiddenControls"]], "displaycontrolmps() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.displayControlMPS"]], "displaygroup() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.displayGroup"]], "displayheader() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.displayHeader"]], "displaympsgroups() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.displayMpsGroups"]], "displaytabs() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.displayTabs"]], "displaytempgroup() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.displayTempGroup"]], "displaytempgroups() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.displayTempGroups"]], "eventfilter() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.eventFilter"]], "gatevalve() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.gateValve"]], "genstringtemppv() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.genStringTempPV"]], "getctrlwidget() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.getCtrlWidget"]], "getdevicename() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.getDeviceName"]], "getpvconfig() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.getPVConfig"]], "getpvcontrol() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.getPVControl"]], "getparamall() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.getParamAll"]], "getsingletitle() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.getSingleTitle"]], "gettempwidget() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.getTempWidget"]], "setparamlabel() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.setParamLabel"]], "setpvlbl() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.setPvLbl"]], "settempheader() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.setTempHeader"]], "settitlelabel() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.setTitleLabel"]], "siriushla.li_ap_mps": [[48, "module-siriushla.li_ap_mps"]], "siriushla.li_ap_mps.bypass_btn": [[48, "module-siriushla.li_ap_mps.bypass_btn"]], "siriushla.li_ap_mps.main": [[48, "module-siriushla.li_ap_mps.main"]], "siriushla.li_ap_mps.monitor": [[48, "module-siriushla.li_ap_mps.monitor"]], "siriushla.li_ap_mps.util": [[48, "module-siriushla.li_ap_mps.util"]], "statusbox() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.statusBox"]], "tempmonbox() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.tempMonBox"]], "updatecount() (siriushla.li_ap_mps.main.mpscontrol method)": [[48, "siriushla.li_ap_mps.main.MPSControl.updateCount"]], "value_changed() (siriushla.li_ap_mps.bypass_btn.bypassbtn method)": [[48, "siriushla.li_ap_mps.bypass_btn.BypassBtn.value_changed"]], "digbeamposproc (class in siriushla.li_di_bpms.bpm_main)": [[49, "siriushla.li_di_bpms.bpm_main.DigBeamPosProc"]], "creategraph() (siriushla.li_di_bpms.bpm_main.digbeamposproc method)": [[49, "siriushla.li_di_bpms.bpm_main.DigBeamPosProc.createGraph"]], "dataitem() (siriushla.li_di_bpms.bpm_main.digbeamposproc method)": [[49, "siriushla.li_di_bpms.bpm_main.DigBeamPosProc.dataItem"]], "display_data() (siriushla.li_di_bpms.bpm_main.digbeamposproc method)": [[49, "siriushla.li_di_bpms.bpm_main.DigBeamPosProc.display_data"]], "display_graph() (siriushla.li_di_bpms.bpm_main.digbeamposproc method)": [[49, "siriushla.li_di_bpms.bpm_main.DigBeamPosProc.display_graph"]], "display_header() (siriushla.li_di_bpms.bpm_main.digbeamposproc method)": [[49, "siriushla.li_di_bpms.bpm_main.DigBeamPosProc.display_header"]], "display_maindata() (siriushla.li_di_bpms.bpm_main.digbeamposproc method)": [[49, "siriushla.li_di_bpms.bpm_main.DigBeamPosProc.display_mainData"]], "display_secdata() (siriushla.li_di_bpms.bpm_main.digbeamposproc method)": [[49, "siriushla.li_di_bpms.bpm_main.DigBeamPosProc.display_secData"]], "display_selectors() (siriushla.li_di_bpms.bpm_main.digbeamposproc method)": [[49, "siriushla.li_di_bpms.bpm_main.DigBeamPosProc.display_selectors"]], "selectionitem() (siriushla.li_di_bpms.bpm_main.digbeamposproc method)": [[49, "siriushla.li_di_bpms.bpm_main.DigBeamPosProc.selectionItem"]], "siriushla.li_di_bpms": [[49, "module-siriushla.li_di_bpms"]], "siriushla.li_di_bpms.bpm_main": [[49, "module-siriushla.li_di_bpms.bpm_main"]], "generalfunctions (class in siriushla.li_di_scrns.main)": [[50, "siriushla.li_di_scrns.main.GeneralFunctions"]], "libeamprofile (class in siriushla.li_di_scrns.main)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile"]], "motorbtn (class in siriushla.li_di_scrns.motorbtn)": [[50, "siriushla.li_di_scrns.motorBtn.MotorBtn"]], "roiviewwindow (class in siriushla.li_di_scrns.main)": [[50, "siriushla.li_di_scrns.main.ROIViewWindow"]], "buildstacks() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.buildStacks"]], "buildstacks() (siriushla.li_di_scrns.main.roiviewwindow method)": [[50, "siriushla.li_di_scrns.main.ROIViewWindow.buildStacks"]], "getpvname() (siriushla.li_di_scrns.main.generalfunctions method)": [[50, "siriushla.li_di_scrns.main.GeneralFunctions.getPvName"]], "getscrnselbtns() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.getScrnSelBtns"]], "getstackitem() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.getStackItem"]], "getstackitem() (siriushla.li_di_scrns.main.roiviewwindow method)": [[50, "siriushla.li_di_scrns.main.ROIViewWindow.getStackItem"]], "header() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.header"]], "imageviewer() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.imageViewer"]], "radiobtnclick() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.radioBtnClick"]], "radiobtnclick() (siriushla.li_di_scrns.main.roiviewwindow method)": [[50, "siriushla.li_di_scrns.main.ROIViewWindow.radioBtnClick"]], "rotate_chart() (siriushla.li_di_scrns.main.roiviewwindow method)": [[50, "siriushla.li_di_scrns.main.ROIViewWindow.rotate_chart"]], "savestack() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.saveStack"]], "savestack() (siriushla.li_di_scrns.main.roiviewwindow method)": [[50, "siriushla.li_di_scrns.main.ROIViewWindow.saveStack"]], "scrnandproj() (siriushla.li_di_scrns.main.roiviewwindow method)": [[50, "siriushla.li_di_scrns.main.ROIViewWindow.scrnAndProj"]], "selectionitem() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.selectionItem"]], "send_value() (siriushla.li_di_scrns.motorbtn.motorbtn method)": [[50, "siriushla.li_di_scrns.motorBtn.MotorBtn.send_value"]], "setbasicinfo() (siriushla.li_di_scrns.main.generalfunctions method)": [[50, "siriushla.li_di_scrns.main.GeneralFunctions.setBasicInfo"]], "setgraph() (siriushla.li_di_scrns.main.roiviewwindow method)": [[50, "siriushla.li_di_scrns.main.ROIViewWindow.setGraph"]], "setgraphinfo() (siriushla.li_di_scrns.main.roiviewwindow method)": [[50, "siriushla.li_di_scrns.main.ROIViewWindow.setGraphInfo"]], "setlight() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.setLight"]], "setmotorsconfig() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.setMotorsConfig"]], "setpanelinfo() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.setPanelInfo"]], "setrbvobj() (siriushla.li_di_scrns.main.generalfunctions method)": [[50, "siriushla.li_di_scrns.main.GeneralFunctions.setRBVObj"]], "setroiinfo() (siriushla.li_di_scrns.main.roiviewwindow method)": [[50, "siriushla.li_di_scrns.main.ROIViewWindow.setRoiInfo"]], "setscrnheader() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.setScrnHeader"]], "setscrninfo() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.setScrnInfo"]], "setscrnpanel() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.setScrnPanel"]], "setscrnselection() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.setScrnSelection"]], "setsinglescrn() (siriushla.li_di_scrns.main.generalfunctions method)": [[50, "siriushla.li_di_scrns.main.GeneralFunctions.setSingleScrn"]], "setsinglescrninfo() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.setSingleScrnInfo"]], "setwidgettype() (siriushla.li_di_scrns.main.generalfunctions method)": [[50, "siriushla.li_di_scrns.main.GeneralFunctions.setWidgetType"]], "setzeroopt() (siriushla.li_di_scrns.main.libeamprofile method)": [[50, "siriushla.li_di_scrns.main.LiBeamProfile.setZeroOpt"]], "siriushla.li_di_scrns": [[50, "module-siriushla.li_di_scrns"]], "siriushla.li_di_scrns.main": [[50, "module-siriushla.li_di_scrns.main"]], "siriushla.li_di_scrns.motorbtn": [[50, "module-siriushla.li_di_scrns.motorBtn"]], "siriushla.li_di_scrns.util": [[50, "module-siriushla.li_di_scrns.util"]], "value_changed() (siriushla.li_di_scrns.motorbtn.motorbtn method)": [[50, "siriushla.li_di_scrns.motorBtn.MotorBtn.value_changed"]], "ittiwidget (class in siriushla.li_eg_control.main)": [[51, "siriushla.li_eg_control.main.ITTIWidget"]], "liegunwindow (class in siriushla.li_eg_control.main)": [[51, "siriushla.li_eg_control.main.LIEgunWindow"]], "siriushla.li_eg_control": [[51, "module-siriushla.li_eg_control"]], "siriushla.li_eg_control.main": [[51, "module-siriushla.li_eg_control.main"]], "limodltrwindow (class in siriushla.li_pu_modltr.main)": [[52, "siriushla.li_pu_modltr.main.LIModltrWindow"]], "modemerstopdialog (class in siriushla.li_pu_modltr.auxiliary_dialogs)": [[52, "siriushla.li_pu_modltr.auxiliary_dialogs.ModEmerStopDialog"]], "modintlkdetaildialog (class in siriushla.li_pu_modltr.auxiliary_dialogs)": [[52, "siriushla.li_pu_modltr.auxiliary_dialogs.ModIntlkDetailDialog"]], "siriushla.li_pu_modltr": [[52, "module-siriushla.li_pu_modltr"]], "siriushla.li_pu_modltr.auxiliary_dialogs": [[52, "module-siriushla.li_pu_modltr.auxiliary_dialogs"]], "siriushla.li_pu_modltr.main": [[52, "module-siriushla.li_pu_modltr.main"]], "chartmon (class in siriushla.li_rf_llrf.chart)": [[53, "siriushla.li_rf_llrf.chart.ChartMon"]], "chartwindow (class in siriushla.li_rf_llrf.chart)": [[53, "siriushla.li_rf_llrf.chart.ChartWindow"]], "controlbox (class in siriushla.li_rf_llrf.controls)": [[53, "siriushla.li_rf_llrf.controls.ControlBox"]], "devices (class in siriushla.li_rf_llrf.controls)": [[53, "siriushla.li_rf_llrf.controls.DEVICES"]], "deltaiqphasecorrbutton (class in siriushla.li_rf_llrf.widgets)": [[53, "siriushla.li_rf_llrf.widgets.DeltaIQPhaseCorrButton"]], "deviceparamsettingwindow (class in siriushla.li_rf_llrf.details)": [[53, "siriushla.li_rf_llrf.details.DeviceParamSettingWindow"]], "graphivsq (class in siriushla.li_rf_llrf.widgets)": [[53, "siriushla.li_rf_llrf.widgets.GraphIvsQ"]], "graphtime (class in siriushla.li_rf_llrf.widgets)": [[53, "siriushla.li_rf_llrf.widgets.GraphTime"]], "graphwave (class in siriushla.li_rf_llrf.widgets)": [[53, "siriushla.li_rf_llrf.widgets.GraphWave"]], "kly1 (siriushla.li_rf_llrf.controls.devices attribute)": [[53, "siriushla.li_rf_llrf.controls.DEVICES.Kly1"]], "kly2 (siriushla.li_rf_llrf.controls.devices attribute)": [[53, "siriushla.li_rf_llrf.controls.DEVICES.Kly2"]], "llrfmain (class in siriushla.li_rf_llrf.main)": [[53, "siriushla.li_rf_llrf.main.LLRFMain"]], "motorcontrolwindow (class in siriushla.li_rf_llrf.motor_control)": [[53, "siriushla.li_rf_llrf.motor_control.MotorControlWindow"]], "shb (siriushla.li_rf_llrf.controls.devices attribute)": [[53, "siriushla.li_rf_llrf.controls.DEVICES.SHB"]], "basewidget() (siriushla.li_rf_llrf.main.llrfmain method)": [[53, "siriushla.li_rf_llrf.main.LLRFMain.baseWidget"]], "basicdata() (siriushla.li_rf_llrf.motor_control.motorcontrolwindow method)": [[53, "siriushla.li_rf_llrf.motor_control.MotorControlWindow.basicData"]], "basicinfobox() (siriushla.li_rf_llrf.main.llrfmain method)": [[53, "siriushla.li_rf_llrf.main.LLRFMain.basicInfoBox"]], "buildchartmonitor() (siriushla.li_rf_llrf.main.llrfmain method)": [[53, "siriushla.li_rf_llrf.main.LLRFMain.buildChartMonitor"]], "builddeviceswidgets() (siriushla.li_rf_llrf.main.llrfmain method)": [[53, "siriushla.li_rf_llrf.main.LLRFMain.buildDevicesWidgets"]], "buildled() (siriushla.li_rf_llrf.motor_control.motorcontrolwindow method)": [[53, "siriushla.li_rf_llrf.motor_control.MotorControlWindow.buildLed"]], "buildline() (siriushla.li_rf_llrf.main.llrfmain method)": [[53, "siriushla.li_rf_llrf.main.LLRFMain.buildLine"]], "buildpvname() (siriushla.li_rf_llrf.main.llrfmain method)": [[53, "siriushla.li_rf_llrf.main.LLRFMain.buildPvName"]], "buildtabs() (siriushla.li_rf_llrf.main.llrfmain method)": [[53, "siriushla.li_rf_llrf.main.LLRFMain.buildTabs"]], "chartsiqamppha() (siriushla.li_rf_llrf.chart.chartwindow method)": [[53, "siriushla.li_rf_llrf.chart.ChartWindow.chartsIQAmpPha"]], "chartsmon() (siriushla.li_rf_llrf.chart.chartmon method)": [[53, "siriushla.li_rf_llrf.chart.ChartMon.chartsMon"]], "chartspulseamppha() (siriushla.li_rf_llrf.chart.chartwindow method)": [[53, "siriushla.li_rf_llrf.chart.ChartWindow.chartsPulseAmpPha"]], "eventfilter() (siriushla.li_rf_llrf.main.llrfmain method)": [[53, "siriushla.li_rf_llrf.main.LLRFMain.eventFilter"]], "formatlabel() (siriushla.li_rf_llrf.main.llrfmain method)": [[53, "siriushla.li_rf_llrf.main.LLRFMain.formatLabel"]], "getwidget() (siriushla.li_rf_llrf.motor_control.motorcontrolwindow method)": [[53, "siriushla.li_rf_llrf.motor_control.MotorControlWindow.getWidget"]], "imageviewer() (siriushla.li_rf_llrf.main.llrfmain method)": [[53, "siriushla.li_rf_llrf.main.LLRFMain.imageViewer"]], "infobox() (siriushla.li_rf_llrf.motor_control.motorcontrolwindow method)": [[53, "siriushla.li_rf_llrf.motor_control.MotorControlWindow.infoBox"]], "ledbox() (siriushla.li_rf_llrf.motor_control.motorcontrolwindow method)": [[53, "siriushla.li_rf_llrf.motor_control.MotorControlWindow.ledBox"]], "motorcontrolbtn() (siriushla.li_rf_llrf.main.llrfmain method)": [[53, "siriushla.li_rf_llrf.main.LLRFMain.motorControlBtn"]], "pidbox() (siriushla.li_rf_llrf.motor_control.motorcontrolwindow method)": [[53, "siriushla.li_rf_llrf.motor_control.MotorControlWindow.pidBox"]], "rbvbox() (siriushla.li_rf_llrf.motor_control.motorcontrolwindow method)": [[53, "siriushla.li_rf_llrf.motor_control.MotorControlWindow.rbvBox"]], "showchartbtn() (siriushla.li_rf_llrf.main.llrfmain method)": [[53, "siriushla.li_rf_llrf.main.LLRFMain.showChartBtn"]], "siriushla.li_rf_llrf": [[53, "module-siriushla.li_rf_llrf"]], "siriushla.li_rf_llrf.chart": [[53, "module-siriushla.li_rf_llrf.chart"]], "siriushla.li_rf_llrf.controls": [[53, "module-siriushla.li_rf_llrf.controls"]], "siriushla.li_rf_llrf.details": [[53, "module-siriushla.li_rf_llrf.details"]], "siriushla.li_rf_llrf.main": [[53, "module-siriushla.li_rf_llrf.main"]], "siriushla.li_rf_llrf.motor_control": [[53, "module-siriushla.li_rf_llrf.motor_control"]], "siriushla.li_rf_llrf.util": [[53, "module-siriushla.li_rf_llrf.util"]], "siriushla.li_rf_llrf.widgets": [[53, "module-siriushla.li_rf_llrf.widgets"]], "basefunctionsinterface (class in siriushla.li_va_control.functions)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface"]], "chartwindow (class in siriushla.li_va_control.chart)": [[54, "siriushla.li_va_control.chart.ChartWindow"]], "detailwindow (class in siriushla.li_va_control.details)": [[54, "siriushla.li_va_control.details.DetailWindow"]], "ipsdetailwindow (class in siriushla.li_va_control.details)": [[54, "siriushla.li_va_control.details.IpsDetailWindow"]], "ledlegend (class in siriushla.li_va_control.widgets)": [[54, "siriushla.li_va_control.widgets.LedLegend"]], "lightgreen (siriushla.li_va_control.widgets.pydmledmultiincosistencydetector attribute)": [[54, "siriushla.li_va_control.widgets.PyDMLedMultiIncosistencyDetector.LightGreen"]], "pydmledmultiincosistencydetector (class in siriushla.li_va_control.widgets)": [[54, "siriushla.li_va_control.widgets.PyDMLedMultiIncosistencyDetector"]], "qgroupboxbutton (class in siriushla.li_va_control.widgets)": [[54, "siriushla.li_va_control.widgets.QGroupBoxButton"]], "red (siriushla.li_va_control.widgets.pydmledmultiincosistencydetector attribute)": [[54, "siriushla.li_va_control.widgets.PyDMLedMultiIncosistencyDetector.Red"]], "sprbwidget() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.SPRBWidget"]], "vacuummain (class in siriushla.li_va_control.main)": [[54, "siriushla.li_va_control.main.VacuumMain"]], "vgcdetailwindow (class in siriushla.li_va_control.details)": [[54, "siriushla.li_va_control.details.VgcDetailWindow"]], "yellow (siriushla.li_va_control.widgets.pydmledmultiincosistencydetector attribute)": [[54, "siriushla.li_va_control.widgets.PyDMLedMultiIncosistencyDetector.Yellow"]], "addchannels() (siriushla.li_va_control.chart.chartwindow method)": [[54, "siriushla.li_va_control.chart.ChartWindow.addChannels"]], "buildalllegends() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.buildAllLegends"]], "buildalllegendsrel() (siriushla.li_va_control.main.vacuummain method)": [[54, "siriushla.li_va_control.main.VacuumMain.buildAllLegendsRel"]], "buildbasicgroup() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.buildBasicGroup"]], "buildgroup() (siriushla.li_va_control.details.ipsdetailwindow method)": [[54, "siriushla.li_va_control.details.IpsDetailWindow.buildGroup"]], "buildipsdetail() (siriushla.li_va_control.details.ipsdetailwindow method)": [[54, "siriushla.li_va_control.details.IpsDetailWindow.buildIPSDetail"]], "buildipsinfo() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.buildIPSInfo"]], "buildidname() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.buildIdName"]], "buildidsvac() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.buildIdsVac"]], "buildled() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.buildLed"]], "buildlist() (siriushla.li_va_control.details.detailwindow method)": [[54, "siriushla.li_va_control.details.DetailWindow.buildList"]], "buildvacinfo() (siriushla.li_va_control.main.vacuummain method)": [[54, "siriushla.li_va_control.main.VacuumMain.buildVacInfo"]], "buildvacpv() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.buildVacPv"]], "buildvgctable() (siriushla.li_va_control.details.vgcdetailwindow method)": [[54, "siriushla.li_va_control.details.VgcDetailWindow.buildVgcTable"]], "chartsmon() (siriushla.li_va_control.chart.chartwindow method)": [[54, "siriushla.li_va_control.chart.ChartWindow.chartsMon"]], "drawsingleled() (siriushla.li_va_control.widgets.ledlegend method)": [[54, "siriushla.li_va_control.widgets.LedLegend.drawSingleLed"]], "eventfilter() (siriushla.li_va_control.main.vacuummain method)": [[54, "siriushla.li_va_control.main.VacuumMain.eventFilter"]], "getgrouptitle() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.getGroupTitle"]], "getgroupwidgets() (siriushla.li_va_control.main.vacuummain method)": [[54, "siriushla.li_va_control.main.VacuumMain.getGroupWidgets"]], "getlayout() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.getLayout"]], "getlayoutwidget() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.getLayoutWidget"]], "getprogressbar() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.getProgressBar"]], "getsptable() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.getSPTable"]], "getshape() (in module siriushla.li_va_control.functions)": [[54, "siriushla.li_va_control.functions.getShape"]], "getshape() (siriushla.li_va_control.widgets.ledlegend method)": [[54, "siriushla.li_va_control.widgets.LedLegend.getShape"]], "getsimplepvwidget() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.getSimplePvWidget"]], "getsufixes() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.getSufixes"]], "getvacposition() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.getVacPosition"]], "getvgcled() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.getVgcLed"]], "getvgcsprb() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.getVgcSPRB"]], "getwidget() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.getWidget"]], "headerwidget() (in module siriushla.li_va_control.functions)": [[54, "siriushla.li_va_control.functions.headerWidget"]], "imageviewer() (siriushla.li_va_control.main.vacuummain method)": [[54, "siriushla.li_va_control.main.VacuumMain.imageViewer"]], "mousepressevent() (siriushla.li_va_control.widgets.qgroupboxbutton method)": [[54, "siriushla.li_va_control.widgets.QGroupBoxButton.mousePressEvent"]], "paintevent() (siriushla.li_va_control.widgets.ledlegend method)": [[54, "siriushla.li_va_control.widgets.LedLegend.paintEvent"]], "saverelwid() (siriushla.li_va_control.main.vacuummain method)": [[54, "siriushla.li_va_control.main.VacuumMain.saveRelWid"]], "savewidtolist() (siriushla.li_va_control.main.vacuummain method)": [[54, "siriushla.li_va_control.main.VacuumMain.saveWidToList"]], "selwindow() (siriushla.li_va_control.details.detailwindow method)": [[54, "siriushla.li_va_control.details.DetailWindow.selWindow"]], "selwindow() (siriushla.li_va_control.main.vacuummain method)": [[54, "siriushla.li_va_control.main.VacuumMain.selWindow"]], "setwindowbtn() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.setWindowBtn"]], "setupalldevices() (siriushla.li_va_control.details.detailwindow method)": [[54, "siriushla.li_va_control.details.DetailWindow.setupAllDevices"]], "setupbuttons() (siriushla.li_va_control.main.vacuummain method)": [[54, "siriushla.li_va_control.main.VacuumMain.setupButtons"]], "setupdevices() (siriushla.li_va_control.details.vgcdetailwindow method)": [[54, "siriushla.li_va_control.details.VgcDetailWindow.setupDevices"]], "setupgraph() (siriushla.li_va_control.chart.chartwindow method)": [[54, "siriushla.li_va_control.chart.ChartWindow.setupGraph"]], "setupipscontrol() (siriushla.li_va_control.details.detailwindow method)": [[54, "siriushla.li_va_control.details.DetailWindow.setupIPSControl"]], "setupipslist() (siriushla.li_va_control.main.vacuummain method)": [[54, "siriushla.li_va_control.main.VacuumMain.setupIPSList"]], "setupipslistdet() (siriushla.li_va_control.details.detailwindow method)": [[54, "siriushla.li_va_control.details.DetailWindow.setupIPSListDet"]], "setuplegend() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.setupLegend"]], "setuplists() (siriushla.li_va_control.main.vacuummain method)": [[54, "siriushla.li_va_control.main.VacuumMain.setupLists"]], "setupmainwidgets() (siriushla.li_va_control.main.vacuummain method)": [[54, "siriushla.li_va_control.main.VacuumMain.setupMainWidgets"]], "setupunitview() (siriushla.li_va_control.functions.basefunctionsinterface method)": [[54, "siriushla.li_va_control.functions.BaseFunctionsInterface.setupUnitView"]], "setupvgclist() (siriushla.li_va_control.main.vacuummain method)": [[54, "siriushla.li_va_control.main.VacuumMain.setupVgcList"]], "setupvgclistdet() (siriushla.li_va_control.details.detailwindow method)": [[54, "siriushla.li_va_control.details.DetailWindow.setupVgcListDet"]], "siriushla.li_va_control": [[54, "module-siriushla.li_va_control"]], "siriushla.li_va_control.chart": [[54, "module-siriushla.li_va_control.chart"]], "siriushla.li_va_control.details": [[54, "module-siriushla.li_va_control.details"]], "siriushla.li_va_control.functions": [[54, "module-siriushla.li_va_control.functions"]], "siriushla.li_va_control.main": [[54, "module-siriushla.li_va_control.main"]], "siriushla.li_va_control.util": [[54, "module-siriushla.li_va_control.util"]], "siriushla.li_va_control.widgets": [[54, "module-siriushla.li_va_control.widgets"]], "widgetlists() (siriushla.li_va_control.details.detailwindow method)": [[54, "siriushla.li_va_control.details.DetailWindow.widgetLists"]], "acqcore (siriushla.si_ap_fofb.trig_acq_config.fofbacqlampwindow attribute)": [[55, "siriushla.si_ap_fofb.trig_acq_config.FOFBAcqLAMPWindow.ACQCORE"]], "acqcore (siriushla.si_ap_fofb.trig_acq_config.fofbacqsysidwindow attribute)": [[55, "siriushla.si_ap_fofb.trig_acq_config.FOFBAcqSYSIDWindow.ACQCORE"]], "bpmswmodewidget (class in siriushla.si_ap_fofb.custom_widgets)": [[55, "siriushla.si_ap_fofb.custom_widgets.BPMSwModeWidget"]], "baseobject (class in siriushla.si_ap_fofb.base)": [[55, "siriushla.si_ap_fofb.base.BaseObject"]], "basewidget (class in siriushla.si_ap_fofb.base)": [[55, "siriushla.si_ap_fofb.base.BaseWidget"]], "conv_idx2bpm (siriushla.si_ap_fofb.trig_acq_config.fofbacqbasewindow attribute)": [[55, "siriushla.si_ap_fofb.trig_acq_config.FOFBAcqBaseWindow.CONV_IDX2BPM"]], "controllersdetaildialog (class in siriushla.si_ap_fofb.custom_widgets)": [[55, "siriushla.si_ap_fofb.custom_widgets.ControllersDetailDialog"]], "corrgainwidget (class in siriushla.si_ap_fofb.graphics)": [[55, "siriushla.si_ap_fofb.graphics.CorrGainWidget"]], "fofbacqbasewindow (class in siriushla.si_ap_fofb.trig_acq_config)": [[55, "siriushla.si_ap_fofb.trig_acq_config.FOFBAcqBaseWindow"]], "fofbacqlampwindow (class in siriushla.si_ap_fofb.trig_acq_config)": [[55, "siriushla.si_ap_fofb.trig_acq_config.FOFBAcqLAMPWindow"]], "fofbacqsysidwindow (class in siriushla.si_ap_fofb.trig_acq_config)": [[55, "siriushla.si_ap_fofb.trig_acq_config.FOFBAcqSYSIDWindow"]], "kickwidget (class in siriushla.si_ap_fofb.graphics)": [[55, "siriushla.si_ap_fofb.graphics.KickWidget"]], "mainwindow (class in siriushla.si_ap_fofb.main)": [[55, "siriushla.si_ap_fofb.main.MainWindow"]], "matrixwidget (class in siriushla.si_ap_fofb.graphics)": [[55, "siriushla.si_ap_fofb.graphics.MatrixWidget"]], "psconfigwidget (class in siriushla.si_ap_fofb.custom_widgets)": [[55, "siriushla.si_ap_fofb.custom_widgets.PSConfigWidget"]], "reforbviewwidget (class in siriushla.si_ap_fofb.graphics)": [[55, "siriushla.si_ap_fofb.graphics.RefOrbViewWidget"]], "reforbwidget (class in siriushla.si_ap_fofb.custom_widgets)": [[55, "siriushla.si_ap_fofb.custom_widgets.RefOrbWidget"]], "respmatwidget (class in siriushla.si_ap_fofb.respmat)": [[55, "siriushla.si_ap_fofb.respmat.RespMatWidget"]], "selectionmatrix (class in siriushla.si_ap_fofb.respmat)": [[55, "siriushla.si_ap_fofb.respmat.SelectionMatrix"]], "singleselmatrix (class in siriushla.si_ap_fofb.respmat)": [[55, "siriushla.si_ap_fofb.respmat.SingleSelMatrix"]], "statusdialog (class in siriushla.si_ap_fofb.custom_widgets)": [[55, "siriushla.si_ap_fofb.custom_widgets.StatusDialog"]], "um2m (siriushla.si_ap_fofb.base.baseobject attribute)": [[55, "siriushla.si_ap_fofb.base.BaseObject.UM2M"]], "um2nm (siriushla.si_ap_fofb.base.baseobject attribute)": [[55, "siriushla.si_ap_fofb.base.BaseObject.UM2NM"]], "urad2rad (siriushla.si_ap_fofb.base.baseobject attribute)": [[55, "siriushla.si_ap_fofb.base.BaseObject.URAD2RAD"]], "acc (siriushla.si_ap_fofb.base.baseobject property)": [[55, "siriushla.si_ap_fofb.base.BaseObject.acc"]], "acc_idx (siriushla.si_ap_fofb.base.baseobject property)": [[55, "siriushla.si_ap_fofb.base.BaseObject.acc_idx"]], "get_fofb_icon() (in module siriushla.si_ap_fofb.base)": [[55, "siriushla.si_ap_fofb.base.get_fofb_icon"]], "get_headers() (siriushla.si_ap_fofb.respmat.singleselmatrix method)": [[55, "siriushla.si_ap_fofb.respmat.SingleSelMatrix.get_headers"]], "get_main_widget() (siriushla.si_ap_fofb.respmat.respmatwidget method)": [[55, "siriushla.si_ap_fofb.respmat.RespMatWidget.get_main_widget"]], "get_positions() (siriushla.si_ap_fofb.respmat.singleselmatrix method)": [[55, "siriushla.si_ap_fofb.respmat.SingleSelMatrix.get_positions"]], "get_selection_lists_widget() (siriushla.si_ap_fofb.respmat.respmatwidget method)": [[55, "siriushla.si_ap_fofb.respmat.RespMatWidget.get_selection_lists_widget"]], "isring (siriushla.si_ap_fofb.base.baseobject property)": [[55, "siriushla.si_ap_fofb.base.BaseObject.isring"]], "siriushla.si_ap_fofb": [[55, "module-siriushla.si_ap_fofb"]], "siriushla.si_ap_fofb.base": [[55, "module-siriushla.si_ap_fofb.base"]], "siriushla.si_ap_fofb.custom_widgets": [[55, "module-siriushla.si_ap_fofb.custom_widgets"]], "siriushla.si_ap_fofb.graphics": [[55, "module-siriushla.si_ap_fofb.graphics"]], "siriushla.si_ap_fofb.main": [[55, "module-siriushla.si_ap_fofb.main"]], "siriushla.si_ap_fofb.respmat": [[55, "module-siriushla.si_ap_fofb.respmat"]], "siriushla.si_ap_fofb.trig_acq_config": [[55, "module-siriushla.si_ap_fofb.trig_acq_config"]], "sigenstatuswindow (class in siriushla.si_ap_genstatus.main)": [[56, "siriushla.si_ap_genstatus.main.SIGenStatusWindow"]], "changeevent() (siriushla.si_ap_genstatus.main.sigenstatuswindow method)": [[56, "siriushla.si_ap_genstatus.main.SIGenStatusWindow.changeEvent"]], "formatlifetimelabel() (siriushla.si_ap_genstatus.main.sigenstatuswindow method)": [[56, "siriushla.si_ap_genstatus.main.SIGenStatusWindow.formatLifetimeLabel"]], "siriushla.si_ap_genstatus": [[56, "module-siriushla.si_ap_genstatus"]], "siriushla.si_ap_genstatus.main": [[56, "module-siriushla.si_ap_genstatus.main"]], "configlineedit (class in siriushla.si_ap_idff.custom_widgets)": [[57, "siriushla.si_ap_idff.custom_widgets.ConfigLineEdit"]], "gap_max (siriushla.si_ap_idff.custom_widgets.sectionedwaveformcurveitem attribute)": [[57, "siriushla.si_ap_idff.custom_widgets.SectionedWaveformCurveItem.GAP_MAX"]], "gap_min (siriushla.si_ap_idff.custom_widgets.sectionedwaveformcurveitem attribute)": [[57, "siriushla.si_ap_idff.custom_widgets.SectionedWaveformCurveItem.GAP_MIN"]], "idffwindow (class in siriushla.si_ap_idff.main)": [[57, "siriushla.si_ap_idff.main.IDFFWindow"]], "sectionedwaveformcurveitem (class in siriushla.si_ap_idff.custom_widgets)": [[57, "siriushla.si_ap_idff.custom_widgets.SectionedWaveformCurveItem"]], "addnewtablecurve() (siriushla.si_ap_idff.main.idffwindow method)": [[57, "siriushla.si_ap_idff.main.IDFFWindow.addNewTableCurve"]], "get_idff_icon() (in module siriushla.si_ap_idff.util)": [[57, "siriushla.si_ap_idff.util.get_idff_icon"]], "mousereleaseevent() (siriushla.si_ap_idff.custom_widgets.configlineedit method)": [[57, "siriushla.si_ap_idff.custom_widgets.ConfigLineEdit.mouseReleaseEvent"]], "receiveywaveform() (siriushla.si_ap_idff.custom_widgets.sectionedwaveformcurveitem method)": [[57, "siriushla.si_ap_idff.custom_widgets.SectionedWaveformCurveItem.receiveYWaveform"]], "siriushla.si_ap_idff": [[57, "module-siriushla.si_ap_idff"]], "siriushla.si_ap_idff.custom_widgets": [[57, "module-siriushla.si_ap_idff.custom_widgets"]], "siriushla.si_ap_idff.main": [[57, "module-siriushla.si_ap_idff.main"]], "siriushla.si_ap_idff.util": [[57, "module-siriushla.si_ap_idff.util"]], "angxgraphwidget (class in siriushla.si_ap_orbintlk.graphics)": [[58, "siriushla.si_ap_orbintlk.graphics.AngXGraphWidget"]], "angygraphwidget (class in siriushla.si_ap_orbintlk.graphics)": [[58, "siriushla.si_ap_orbintlk.graphics.AngYGraphWidget"]], "bpmintlkenblwidget (class in siriushla.si_ap_orbintlk.custom_widgets)": [[58, "siriushla.si_ap_orbintlk.custom_widgets.BPMIntlkEnblWidget"]], "bpmintlklimspwidget (class in siriushla.si_ap_orbintlk.custom_widgets)": [[58, "siriushla.si_ap_orbintlk.custom_widgets.BPMIntlkLimSPWidget"]], "bpmorbintlkdetailwindow (class in siriushla.si_ap_orbintlk.bpmdetail)": [[58, "siriushla.si_ap_orbintlk.bpmdetail.BPMOrbIntlkDetailWindow"]], "bpmorbintlkmainwindow (class in siriushla.si_ap_orbintlk.main)": [[58, "siriushla.si_ap_orbintlk.main.BPMOrbIntlkMainWindow"]], "baseobject (class in siriushla.si_ap_orbintlk.base)": [[58, "siriushla.si_ap_orbintlk.base.BaseObject"]], "conv_nm2m (siriushla.si_ap_orbintlk.base.baseobject attribute)": [[58, "siriushla.si_ap_orbintlk.base.BaseObject.CONV_NM2M"]], "conv_um2nm (siriushla.si_ap_orbintlk.base.baseobject attribute)": [[58, "siriushla.si_ap_orbintlk.base.BaseObject.CONV_UM2NM"]], "graph (class in siriushla.si_ap_orbintlk.graphics)": [[58, "siriushla.si_ap_orbintlk.graphics.Graph"]], "graphlegendwidget (class in siriushla.si_ap_orbintlk.graphics)": [[58, "siriushla.si_ap_orbintlk.graphics.GraphLegendWidget"]], "graphmonitorwidget (class in siriushla.si_ap_orbintlk.graphics)": [[58, "siriushla.si_ap_orbintlk.graphics.GraphMonitorWidget"]], "graphproptyselwidget (class in siriushla.si_ap_orbintlk.graphics)": [[58, "siriushla.si_ap_orbintlk.graphics.GraphProptySelWidget"]], "intlktype (siriushla.si_ap_orbintlk.graphics.angxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngXGraphWidget.INTLKTYPE"]], "intlktype (siriushla.si_ap_orbintlk.graphics.angygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngYGraphWidget.INTLKTYPE"]], "intlktype (siriushla.si_ap_orbintlk.graphics.minsumgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.MinSumGraphWidget.INTLKTYPE"]], "intlktype (siriushla.si_ap_orbintlk.graphics.posxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosXGraphWidget.INTLKTYPE"]], "intlktype (siriushla.si_ap_orbintlk.graphics.posygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosYGraphWidget.INTLKTYPE"]], "minsumgraphwidget (class in siriushla.si_ap_orbintlk.graphics)": [[58, "siriushla.si_ap_orbintlk.graphics.MinSumGraphWidget"]], "monitoreddevicesdialog (class in siriushla.si_ap_orbintlk.custom_widgets)": [[58, "siriushla.si_ap_orbintlk.custom_widgets.MonitoredDevicesDialog"]], "propty_max_data (siriushla.si_ap_orbintlk.graphics.angxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngXGraphWidget.PROPTY_MAX_DATA"]], "propty_max_data (siriushla.si_ap_orbintlk.graphics.angygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngYGraphWidget.PROPTY_MAX_DATA"]], "propty_max_data (siriushla.si_ap_orbintlk.graphics.minsumgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.MinSumGraphWidget.PROPTY_MAX_DATA"]], "propty_max_data (siriushla.si_ap_orbintlk.graphics.posxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosXGraphWidget.PROPTY_MAX_DATA"]], "propty_max_data (siriushla.si_ap_orbintlk.graphics.posygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosYGraphWidget.PROPTY_MAX_DATA"]], "propty_max_symb (siriushla.si_ap_orbintlk.graphics.angxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngXGraphWidget.PROPTY_MAX_SYMB"]], "propty_max_symb (siriushla.si_ap_orbintlk.graphics.angygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngYGraphWidget.PROPTY_MAX_SYMB"]], "propty_max_symb (siriushla.si_ap_orbintlk.graphics.minsumgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.MinSumGraphWidget.PROPTY_MAX_SYMB"]], "propty_max_symb (siriushla.si_ap_orbintlk.graphics.posxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosXGraphWidget.PROPTY_MAX_SYMB"]], "propty_max_symb (siriushla.si_ap_orbintlk.graphics.posygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosYGraphWidget.PROPTY_MAX_SYMB"]], "propty_meas_data (siriushla.si_ap_orbintlk.graphics.angxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngXGraphWidget.PROPTY_MEAS_DATA"]], "propty_meas_data (siriushla.si_ap_orbintlk.graphics.angygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngYGraphWidget.PROPTY_MEAS_DATA"]], "propty_meas_data (siriushla.si_ap_orbintlk.graphics.minsumgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.MinSumGraphWidget.PROPTY_MEAS_DATA"]], "propty_meas_data (siriushla.si_ap_orbintlk.graphics.posxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosXGraphWidget.PROPTY_MEAS_DATA"]], "propty_meas_data (siriushla.si_ap_orbintlk.graphics.posygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosYGraphWidget.PROPTY_MEAS_DATA"]], "propty_meas_symb (siriushla.si_ap_orbintlk.graphics.angxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngXGraphWidget.PROPTY_MEAS_SYMB"]], "propty_meas_symb (siriushla.si_ap_orbintlk.graphics.angygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngYGraphWidget.PROPTY_MEAS_SYMB"]], "propty_meas_symb (siriushla.si_ap_orbintlk.graphics.minsumgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.MinSumGraphWidget.PROPTY_MEAS_SYMB"]], "propty_meas_symb (siriushla.si_ap_orbintlk.graphics.posxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosXGraphWidget.PROPTY_MEAS_SYMB"]], "propty_meas_symb (siriushla.si_ap_orbintlk.graphics.posygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosYGraphWidget.PROPTY_MEAS_SYMB"]], "propty_min_data (siriushla.si_ap_orbintlk.graphics.angxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngXGraphWidget.PROPTY_MIN_DATA"]], "propty_min_data (siriushla.si_ap_orbintlk.graphics.angygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngYGraphWidget.PROPTY_MIN_DATA"]], "propty_min_data (siriushla.si_ap_orbintlk.graphics.minsumgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.MinSumGraphWidget.PROPTY_MIN_DATA"]], "propty_min_data (siriushla.si_ap_orbintlk.graphics.posxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosXGraphWidget.PROPTY_MIN_DATA"]], "propty_min_data (siriushla.si_ap_orbintlk.graphics.posygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosYGraphWidget.PROPTY_MIN_DATA"]], "propty_min_symb (siriushla.si_ap_orbintlk.graphics.angxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngXGraphWidget.PROPTY_MIN_SYMB"]], "propty_min_symb (siriushla.si_ap_orbintlk.graphics.angygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.AngYGraphWidget.PROPTY_MIN_SYMB"]], "propty_min_symb (siriushla.si_ap_orbintlk.graphics.minsumgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.MinSumGraphWidget.PROPTY_MIN_SYMB"]], "propty_min_symb (siriushla.si_ap_orbintlk.graphics.posxgraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosXGraphWidget.PROPTY_MIN_SYMB"]], "propty_min_symb (siriushla.si_ap_orbintlk.graphics.posygraphwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.PosYGraphWidget.PROPTY_MIN_SYMB"]], "posxgraphwidget (class in siriushla.si_ap_orbintlk.graphics)": [[58, "siriushla.si_ap_orbintlk.graphics.PosXGraphWidget"]], "posygraphwidget (class in siriushla.si_ap_orbintlk.graphics)": [[58, "siriushla.si_ap_orbintlk.graphics.PosYGraphWidget"]], "reforbcombobox (class in siriushla.si_ap_orbintlk.custom_widgets)": [[58, "siriushla.si_ap_orbintlk.custom_widgets.RefOrbComboBox"]], "connection_changed() (siriushla.si_ap_orbintlk.custom_widgets.bpmintlkenblwidget method)": [[58, "siriushla.si_ap_orbintlk.custom_widgets.BPMIntlkEnblWidget.connection_changed"]], "get_ref_orb() (siriushla.si_ap_orbintlk.base.baseobject method)": [[58, "siriushla.si_ap_orbintlk.base.BaseObject.get_ref_orb"]], "monitsum2intlksum_factor (siriushla.si_ap_orbintlk.base.baseobject property)": [[58, "siriushla.si_ap_orbintlk.base.BaseObject.monitsum2intlksum_factor"]], "mousedoubleclickevent() (siriushla.si_ap_orbintlk.graphics.graph method)": [[58, "siriushla.si_ap_orbintlk.graphics.Graph.mouseDoubleClickEvent"]], "propty_comp_changed (siriushla.si_ap_orbintlk.graphics.graphproptyselwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.GraphProptySelWidget.propty_comp_changed"]], "propty_intlk_changed (siriushla.si_ap_orbintlk.graphics.graphproptyselwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.GraphProptySelWidget.propty_intlk_changed"]], "propty_reforb_changed (siriushla.si_ap_orbintlk.graphics.graphproptyselwidget attribute)": [[58, "siriushla.si_ap_orbintlk.graphics.GraphProptySelWidget.propty_reforb_changed"]], "reforbchanged (siriushla.si_ap_orbintlk.custom_widgets.reforbcombobox attribute)": [[58, "siriushla.si_ap_orbintlk.custom_widgets.RefOrbComboBox.refOrbChanged"]], "send_value() (siriushla.si_ap_orbintlk.custom_widgets.bpmintlkenblwidget method)": [[58, "siriushla.si_ap_orbintlk.custom_widgets.BPMIntlkEnblWidget.send_value"]], "send_value() (siriushla.si_ap_orbintlk.custom_widgets.bpmintlklimspwidget method)": [[58, "siriushla.si_ap_orbintlk.custom_widgets.BPMIntlkLimSPWidget.send_value"]], "siriushla.si_ap_orbintlk": [[58, "module-siriushla.si_ap_orbintlk"]], "siriushla.si_ap_orbintlk.base": [[58, "module-siriushla.si_ap_orbintlk.base"]], "siriushla.si_ap_orbintlk.bpmdetail": [[58, "module-siriushla.si_ap_orbintlk.bpmdetail"]], "siriushla.si_ap_orbintlk.custom_widgets": [[58, "module-siriushla.si_ap_orbintlk.custom_widgets"]], "siriushla.si_ap_orbintlk.graphics": [[58, "module-siriushla.si_ap_orbintlk.graphics"]], "siriushla.si_ap_orbintlk.main": [[58, "module-siriushla.si_ap_orbintlk.main"]], "symbols_max (siriushla.si_ap_orbintlk.graphics.graph property)": [[58, "siriushla.si_ap_orbintlk.graphics.Graph.symbols_max"]], "symbols_meas (siriushla.si_ap_orbintlk.graphics.graph property)": [[58, "siriushla.si_ap_orbintlk.graphics.Graph.symbols_meas"]], "symbols_min (siriushla.si_ap_orbintlk.graphics.graph property)": [[58, "siriushla.si_ap_orbintlk.graphics.Graph.symbols_min"]], "tooltips (siriushla.si_ap_orbintlk.graphics.graph property)": [[58, "siriushla.si_ap_orbintlk.graphics.Graph.tooltips"]], "value_changed() (siriushla.si_ap_orbintlk.custom_widgets.bpmintlkenblwidget method)": [[58, "siriushla.si_ap_orbintlk.custom_widgets.BPMIntlkEnblWidget.value_changed"]], "x_data (siriushla.si_ap_orbintlk.graphics.graph property)": [[58, "siriushla.si_ap_orbintlk.graphics.Graph.x_data"]], "y_data_max (siriushla.si_ap_orbintlk.graphics.graph property)": [[58, "siriushla.si_ap_orbintlk.graphics.Graph.y_data_max"]], "y_data_meas (siriushla.si_ap_orbintlk.graphics.graph property)": [[58, "siriushla.si_ap_orbintlk.graphics.Graph.y_data_meas"]], "y_data_min (siriushla.si_ap_orbintlk.graphics.graph property)": [[58, "siriushla.si_ap_orbintlk.graphics.Graph.y_data_min"]], "bbbadcwidget (class in siriushla.si_di_bbb.advanced_settings)": [[59, "siriushla.si_di_bbb.advanced_settings.BbBADCWidget"]], "bbbacqbram (class in siriushla.si_di_bbb.acquisition)": [[59, "siriushla.si_di_bbb.acquisition.BbBAcqBRAM"]], "bbbacqsb (class in siriushla.si_di_bbb.acquisition)": [[59, "siriushla.si_di_bbb.acquisition.BbBAcqSB"]], "bbbacqsram (class in siriushla.si_di_bbb.acquisition)": [[59, "siriushla.si_di_bbb.acquisition.BbBAcqSRAM"]], "bbbadvancedsettingswidget (class in siriushla.si_di_bbb.advanced_settings)": [[59, "siriushla.si_di_bbb.advanced_settings.BbBAdvancedSettingsWidget"]], "bbbcoefficientswidget (class in siriushla.si_di_bbb.coefficients)": [[59, "siriushla.si_di_bbb.coefficients.BbBCoefficientsWidget"]], "bbbcontrolwindow (class in siriushla.si_di_bbb.bbb)": [[59, "siriushla.si_di_bbb.bbb.BbBControlWindow"]], "bbbdrivesettingswidget (class in siriushla.si_di_bbb.drive)": [[59, "siriushla.si_di_bbb.drive.BbBDriveSettingsWidget"]], "bbbenvironmmonwidget (class in siriushla.si_di_bbb.environment)": [[59, "siriushla.si_di_bbb.environment.BbBEnvironmMonWidget"]], "bbbgpiowidget (class in siriushla.si_di_bbb.gpio)": [[59, "siriushla.si_di_bbb.gpio.BbBGPIOWidget"]], "bbbgeneralsettingswidget (class in siriushla.si_di_bbb.advanced_settings)": [[59, "siriushla.si_di_bbb.advanced_settings.BbBGeneralSettingsWidget"]], "bbbinfowidget (class in siriushla.si_di_bbb.bbb)": [[59, "siriushla.si_di_bbb.bbb.BbBInfoWidget"]], "bbbinterlock (class in siriushla.si_di_bbb.advanced_settings)": [[59, "siriushla.si_di_bbb.advanced_settings.BbBInterlock"]], "bbbmainsettingswidget (class in siriushla.si_di_bbb.bbb)": [[59, "siriushla.si_di_bbb.bbb.BbBMainSettingsWidget"]], "bbbmainwindow (class in siriushla.si_di_bbb.main)": [[59, "siriushla.si_di_bbb.main.BbBMainWindow"]], "bbbmaskswidget (class in siriushla.si_di_bbb.masks)": [[59, "siriushla.si_di_bbb.masks.BbBMasksWidget"]], "bbbpwrampswidget (class in siriushla.si_di_bbb.pwr_amps)": [[59, "siriushla.si_di_bbb.pwr_amps.BbBPwrAmpsWidget"]], "bbbsingledrivesettingswidget (class in siriushla.si_di_bbb.drive)": [[59, "siriushla.si_di_bbb.drive.BbBSingleDriveSettingsWidget"]], "bbbslowdacswidget (class in siriushla.si_di_bbb.advanced_settings)": [[59, "siriushla.si_di_bbb.advanced_settings.BbBSlowDACsWidget"]], "bbbstatuswidget (class in siriushla.si_di_bbb.bbb)": [[59, "siriushla.si_di_bbb.bbb.BbBStatusWidget"]], "bbbtimingwidget (class in siriushla.si_di_bbb.timing)": [[59, "siriushla.si_di_bbb.timing.BbBTimingWidget"]], "label (class in siriushla.si_di_bbb.coefficients)": [[59, "siriushla.si_di_bbb.coefficients.Label"]], "type (siriushla.si_di_bbb.acquisition.bbbacqbram attribute)": [[59, "siriushla.si_di_bbb.acquisition.BbBAcqBRAM.TYPE"]], "type (siriushla.si_di_bbb.acquisition.bbbacqsram attribute)": [[59, "siriushla.si_di_bbb.acquisition.BbBAcqSRAM.TYPE"]], "timegraph (class in siriushla.si_di_bbb.custom_widgets)": [[59, "siriushla.si_di_bbb.custom_widgets.TimeGraph"]], "wfmgraph (class in siriushla.si_di_bbb.custom_widgets)": [[59, "siriushla.si_di_bbb.custom_widgets.WfmGraph"]], "add_marker() (siriushla.si_di_bbb.custom_widgets.wfmgraph method)": [[59, "siriushla.si_di_bbb.custom_widgets.WfmGraph.add_marker"]], "add_scatter_curve() (siriushla.si_di_bbb.custom_widgets.wfmgraph method)": [[59, "siriushla.si_di_bbb.custom_widgets.WfmGraph.add_scatter_curve"]], "get_bbb_icon() (in module siriushla.si_di_bbb.util)": [[59, "siriushla.si_di_bbb.util.get_bbb_icon"]], "set_bbb_color() (in module siriushla.si_di_bbb.util)": [[59, "siriushla.si_di_bbb.util.set_bbb_color"]], "siriushla.si_di_bbb": [[59, "module-siriushla.si_di_bbb"]], "siriushla.si_di_bbb.acquisition": [[59, "module-siriushla.si_di_bbb.acquisition"]], "siriushla.si_di_bbb.advanced_settings": [[59, "module-siriushla.si_di_bbb.advanced_settings"]], "siriushla.si_di_bbb.bbb": [[59, "module-siriushla.si_di_bbb.bbb"]], "siriushla.si_di_bbb.coefficients": [[59, "module-siriushla.si_di_bbb.coefficients"]], "siriushla.si_di_bbb.custom_widgets": [[59, "module-siriushla.si_di_bbb.custom_widgets"]], "siriushla.si_di_bbb.drive": [[59, "module-siriushla.si_di_bbb.drive"]], "siriushla.si_di_bbb.environment": [[59, "module-siriushla.si_di_bbb.environment"]], "siriushla.si_di_bbb.gpio": [[59, "module-siriushla.si_di_bbb.gpio"]], "siriushla.si_di_bbb.main": [[59, "module-siriushla.si_di_bbb.main"]], "siriushla.si_di_bbb.masks": [[59, "module-siriushla.si_di_bbb.masks"]], "siriushla.si_di_bbb.pwr_amps": [[59, "module-siriushla.si_di_bbb.pwr_amps"]], "siriushla.si_di_bbb.timing": [[59, "module-siriushla.si_di_bbb.timing"]], "siriushla.si_di_bbb.util": [[59, "module-siriushla.si_di_bbb.util"]], "value_changed() (siriushla.si_di_bbb.coefficients.label method)": [[59, "siriushla.si_di_bbb.coefficients.Label.value_changed"]], "bpmsequalizeswitching (class in siriushla.si_di_equalize_bpms.main)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching"]], "default_dir (siriushla.si_di_equalize_bpms.main.bpmsequalizeswitching attribute)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching.DEFAULT_DIR"]], "exts (siriushla.si_di_equalize_bpms.main.bpmsequalizeswitching attribute)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching.EXTS"]], "ext_flt (siriushla.si_di_equalize_bpms.main.bpmsequalizeswitching attribute)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching.EXT_FLT"]], "create_central_widget() (siriushla.si_di_equalize_bpms.main.bpmsequalizeswitching method)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching.create_central_widget"]], "get_acq_control_widget() (siriushla.si_di_equalize_bpms.main.bpmsequalizeswitching method)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching.get_acq_control_widget"]], "get_analysis_control_widget() (siriushla.si_di_equalize_bpms.main.bpmsequalizeswitching method)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching.get_analysis_control_widget"]], "get_application_widget() (siriushla.si_di_equalize_bpms.main.bpmsequalizeswitching method)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching.get_application_widget"]], "get_check_data_widget() (siriushla.si_di_equalize_bpms.main.bpmsequalizeswitching method)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching.get_check_data_widget"]], "get_plots_widget() (siriushla.si_di_equalize_bpms.main.bpmsequalizeswitching method)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching.get_plots_widget"]], "get_saveload_widget() (siriushla.si_di_equalize_bpms.main.bpmsequalizeswitching method)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching.get_saveload_widget"]], "get_status_widget() (siriushla.si_di_equalize_bpms.main.bpmsequalizeswitching method)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching.get_status_widget"]], "get_update_reforb_widget() (siriushla.si_di_equalize_bpms.main.bpmsequalizeswitching method)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching.get_update_reforb_widget"]], "setupui() (siriushla.si_di_equalize_bpms.main.bpmsequalizeswitching method)": [[60, "siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching.setupui"]], "siriushla.si_di_equalize_bpms": [[60, "module-siriushla.si_di_equalize_bpms"]], "siriushla.si_di_equalize_bpms.main": [[60, "module-siriushla.si_di_equalize_bpms.main"]], "device_class (siriushla.si_di_scraps.scrap_monitor.scrapersview attribute)": [[61, "siriushla.si_di_scraps.Scrap_monitor.ScrapersView.DEVICE_CLASS"]], "device_prefix (siriushla.si_di_scraps.scrap_monitor.scrapersview attribute)": [[61, "siriushla.si_di_scraps.Scrap_monitor.ScrapersView.DEVICE_PREFIX"]], "scrapermonitoring (class in siriushla.si_di_scraps.scrap_monitor)": [[61, "siriushla.si_di_scraps.Scrap_monitor.ScraperMonitoring"]], "scrapersview (class in siriushla.si_di_scraps.scrap_monitor)": [[61, "siriushla.si_di_scraps.Scrap_monitor.ScrapersView"]], "channels() (siriushla.si_di_scraps.scrap_monitor.scrapermonitoring method)": [[61, "siriushla.si_di_scraps.Scrap_monitor.ScraperMonitoring.channels"]], "siriushla.si_di_scraps": [[61, "module-siriushla.si_di_scraps"]], "siriushla.si_di_scraps.scrap_monitor": [[61, "module-siriushla.si_di_scraps.Scrap_monitor"]], "updatedevwidget() (siriushla.si_di_scraps.scrap_monitor.scrapermonitoring method)": [[61, "siriushla.si_di_scraps.Scrap_monitor.ScraperMonitoring.updateDevWidget"]], "apualarmdetails (class in siriushla.si_id_control.apu)": [[62, "siriushla.si_id_control.apu.APUAlarmDetails"]], "apucontrolwindow (class in siriushla.si_id_control.apu)": [[62, "siriushla.si_id_control.apu.APUControlWindow"]], "apuhardlldetails (class in siriushla.si_id_control.apu)": [[62, "siriushla.si_id_control.apu.APUHardLLDetails"]], "apuinterlockdetails (class in siriushla.si_id_control.apu)": [[62, "siriushla.si_id_control.apu.APUInterlockDetails"]], "apusummarybase (class in siriushla.si_id_control.apu)": [[62, "siriushla.si_id_control.apu.APUSummaryBase"]], "apusummaryheader (class in siriushla.si_id_control.apu)": [[62, "siriushla.si_id_control.apu.APUSummaryHeader"]], "apusummarywidget (class in siriushla.si_id_control.apu)": [[62, "siriushla.si_id_control.apu.APUSummaryWidget"]], "aux_control_pvs (siriushla.si_id_control.delta.deltacontrolwindowutils attribute)": [[62, "siriushla.si_id_control.delta.DELTAControlWindowUtils.AUX_CONTROL_PVS"]], "deltacontrolwindow (class in siriushla.si_id_control.delta)": [[62, "siriushla.si_id_control.delta.DELTAControlWindow"]], "deltacontrolwindowutils (class in siriushla.si_id_control.delta)": [[62, "siriushla.si_id_control.delta.DELTAControlWindowUtils"]], "deltasummarybase (class in siriushla.si_id_control.delta)": [[62, "siriushla.si_id_control.delta.DELTASummaryBase"]], "deltasummaryheader (class in siriushla.si_id_control.delta)": [[62, "siriushla.si_id_control.delta.DELTASummaryHeader"]], "deltasummarywidget (class in siriushla.si_id_control.delta)": [[62, "siriushla.si_id_control.delta.DELTASummaryWidget"]], "epucontrolwindow (class in siriushla.si_id_control.epu)": [[62, "siriushla.si_id_control.epu.EPUControlWindow"]], "epudrivedetails (class in siriushla.si_id_control.epu)": [[62, "siriushla.si_id_control.epu.EPUDriveDetails"]], "epusummarybase (class in siriushla.si_id_control.epu)": [[62, "siriushla.si_id_control.epu.EPUSummaryBase"]], "epusummaryheader (class in siriushla.si_id_control.epu)": [[62, "siriushla.si_id_control.epu.EPUSummaryHeader"]], "epusummarywidget (class in siriushla.si_id_control.epu)": [[62, "siriushla.si_id_control.epu.EPUSummaryWidget"]], "idcommoncontrolwindow (class in siriushla.si_id_control.base)": [[62, "siriushla.si_id_control.base.IDCommonControlWindow"]], "idcommondialog (class in siriushla.si_id_control.base)": [[62, "siriushla.si_id_control.base.IDCommonDialog"]], "idcommonsummarybase (class in siriushla.si_id_control.base)": [[62, "siriushla.si_id_control.base.IDCommonSummaryBase"]], "idcommonsummaryheader (class in siriushla.si_id_control.base)": [[62, "siriushla.si_id_control.base.IDCommonSummaryHeader"]], "idcommonsummarywidget (class in siriushla.si_id_control.base)": [[62, "siriushla.si_id_control.base.IDCommonSummaryWidget"]], "idcontrol (class in siriushla.si_id_control.id_control)": [[62, "siriushla.si_id_control.id_control.IDControl"]], "main_control_pvs (siriushla.si_id_control.delta.deltacontrolwindowutils attribute)": [[62, "siriushla.si_id_control.delta.DELTAControlWindowUtils.MAIN_CONTROL_PVS"]], "model_widths (siriushla.si_id_control.apu.apusummarybase attribute)": [[62, "siriushla.si_id_control.apu.APUSummaryBase.MODEL_WIDTHS"]], "model_widths (siriushla.si_id_control.base.idcommonsummarybase attribute)": [[62, "siriushla.si_id_control.base.IDCommonSummaryBase.MODEL_WIDTHS"]], "model_widths (siriushla.si_id_control.delta.deltasummarybase attribute)": [[62, "siriushla.si_id_control.delta.DELTASummaryBase.MODEL_WIDTHS"]], "model_widths (siriushla.si_id_control.epu.epusummarybase attribute)": [[62, "siriushla.si_id_control.epu.EPUSummaryBase.MODEL_WIDTHS"]], "model_widths (siriushla.si_id_control.papu.papusummarybase attribute)": [[62, "siriushla.si_id_control.papu.PAPUSummaryBase.MODEL_WIDTHS"]], "papucontrolwindow (class in siriushla.si_id_control.papu)": [[62, "siriushla.si_id_control.papu.PAPUControlWindow"]], "papudetails (class in siriushla.si_id_control.papu)": [[62, "siriushla.si_id_control.papu.PAPUDetails"]], "papusummarybase (class in siriushla.si_id_control.papu)": [[62, "siriushla.si_id_control.papu.PAPUSummaryBase"]], "papusummaryheader (class in siriushla.si_id_control.papu)": [[62, "siriushla.si_id_control.papu.PAPUSummaryHeader"]], "papusummarywidget (class in siriushla.si_id_control.papu)": [[62, "siriushla.si_id_control.papu.PAPUSummaryWidget"]], "status_pvs (siriushla.si_id_control.delta.deltacontrolwindowutils attribute)": [[62, "siriushla.si_id_control.delta.DELTAControlWindowUtils.STATUS_PVS"]], "contextmenuevent() (siriushla.si_id_control.id_control.idcontrol method)": [[62, "siriushla.si_id_control.id_control.IDControl.contextMenuEvent"]], "disable_beamline_control() (siriushla.si_id_control.base.idcommonsummarywidget method)": [[62, "siriushla.si_id_control.base.IDCommonSummaryWidget.disable_beamline_control"]], "enable_beamline_control() (siriushla.si_id_control.base.idcommonsummarywidget method)": [[62, "siriushla.si_id_control.base.IDCommonSummaryWidget.enable_beamline_control"]], "get_id_icon() (in module siriushla.si_id_control.util)": [[62, "siriushla.si_id_control.util.get_id_icon"]], "show_connections() (siriushla.si_id_control.id_control.idcontrol method)": [[62, "siriushla.si_id_control.id_control.IDControl.show_connections"]], "siriushla.si_id_control": [[62, "module-siriushla.si_id_control"]], "siriushla.si_id_control.apu": [[62, "module-siriushla.si_id_control.apu"]], "siriushla.si_id_control.base": [[62, "module-siriushla.si_id_control.base"]], "siriushla.si_id_control.delta": [[62, "module-siriushla.si_id_control.delta"]], "siriushla.si_id_control.epu": [[62, "module-siriushla.si_id_control.epu"]], "siriushla.si_id_control.id_control": [[62, "module-siriushla.si_id_control.id_control"]], "siriushla.si_id_control.papu": [[62, "module-siriushla.si_id_control.papu"]], "siriushla.si_id_control.util": [[62, "module-siriushla.si_id_control.util"]], "device_class (siriushla.tb_di_slits.slit_monitor.slitsview attribute)": [[63, "siriushla.tb_di_slits.Slit_monitor.SlitsView.DEVICE_CLASS"]], "device_prefix (siriushla.tb_di_slits.slit_monitor.slitsview attribute)": [[63, "siriushla.tb_di_slits.Slit_monitor.SlitsView.DEVICE_PREFIX"]], "slitmonitoring (class in siriushla.tb_di_slits.slit_monitor)": [[63, "siriushla.tb_di_slits.Slit_monitor.SlitMonitoring"]], "slitsview (class in siriushla.tb_di_slits.slit_monitor)": [[63, "siriushla.tb_di_slits.Slit_monitor.SlitsView"]], "channels() (siriushla.tb_di_slits.slit_monitor.slitmonitoring method)": [[63, "siriushla.tb_di_slits.Slit_monitor.SlitMonitoring.channels"]], "siriushla.tb_di_slits": [[63, "module-siriushla.tb_di_slits"]], "siriushla.tb_di_slits.slit_monitor": [[63, "module-siriushla.tb_di_slits.Slit_monitor"]], "updatedevwidget() (siriushla.tb_di_slits.slit_monitor.slitmonitoring method)": [[63, "siriushla.tb_di_slits.Slit_monitor.SlitMonitoring.updateDevWidget"]], "bsmpudcversion (siriushla.widgets.label.siriuslabel.displayformat attribute)": [[64, "siriushla.widgets.label.SiriusLabel.DisplayFormat.BSMPUDCVersion"]], "bsmpudcversion (siriushla.widgets.log_label.pydmloglabel.displayformat attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.DisplayFormat.BSMPUDCVersion"]], "bargraphmodel (class in siriushla.widgets.bar_graph)": [[64, "siriushla.widgets.bar_graph.BarGraphModel"]], "bargraphwidget (class in siriushla.widgets.bar_graph)": [[64, "siriushla.widgets.bar_graph.BarGraphWidget"]], "basebargraphwidget (class in siriushla.widgets.bar_graph)": [[64, "siriushla.widgets.bar_graph.BaseBarGraphWidget"]], "binary (siriushla.widgets.label.siriuslabel.displayformat attribute)": [[64, "siriushla.widgets.label.SiriusLabel.DisplayFormat.Binary"]], "binary (siriushla.widgets.log_label.pydmloglabel.displayformat attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.DisplayFormat.Binary"]], "blue (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.Blue"]], "buildtree (class in siriushla.widgets.pvnames_tree)": [[64, "siriushla.widgets.pvnames_tree.BuildTree"]], "calabel (class in siriushla.widgets.label)": [[64, "siriushla.widgets.label.CALabel"]], "capushbutton (class in siriushla.widgets.pushbutton)": [[64, "siriushla.widgets.pushbutton.CAPushButton"]], "circle (siriushla.widgets.qled.qled.shapemap attribute)": [[64, "siriushla.widgets.QLed.QLed.ShapeMap.Circle"]], "circle (siriushla.widgets.qled.shapemap attribute)": [[64, "siriushla.widgets.QLed.ShapeMap.Circle"]], "colors (siriushla.widgets.log_display.siriuslogdisplay attribute)": [[64, "siriushla.widgets.log_display.SiriusLogDisplay.Colors"]], "default_confirm_message (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.DEFAULT_CONFIRM_MESSAGE"]], "darkgreen (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.DarkGreen"]], "darkred (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.DarkRed"]], "decimal (siriushla.widgets.label.siriuslabel.displayformat attribute)": [[64, "siriushla.widgets.label.SiriusLabel.DisplayFormat.Decimal"]], "decimal (siriushla.widgets.log_label.pydmloglabel.displayformat attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.DisplayFormat.Decimal"]], "default (siriushla.widgets.label.siriuslabel.displayformat attribute)": [[64, "siriushla.widgets.label.SiriusLabel.DisplayFormat.Default"]], "default (siriushla.widgets.log_label.pydmloglabel.displayformat attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.DisplayFormat.Default"]], "detachabletabwidget (class in siriushla.widgets.detachable_tabwidget)": [[64, "siriushla.widgets.detachable_tabwidget.DetachableTabWidget"]], "detachedtab (class in siriushla.widgets.detachable_tabwidget)": [[64, "siriushla.widgets.detachable_tabwidget.DetachedTab"]], "epicsbargraphmodel (class in siriushla.widgets.bar_graph)": [[64, "siriushla.widgets.bar_graph.EpicsBarGraphModel"]], "exponential (siriushla.widgets.label.siriuslabel.displayformat attribute)": [[64, "siriushla.widgets.label.SiriusLabel.DisplayFormat.Exponential"]], "exponential (siriushla.widgets.log_label.pydmloglabel.displayformat attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.DisplayFormat.Exponential"]], "gray (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.Gray"]], "green (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.Green"]], "hex (siriushla.widgets.label.siriuslabel.displayformat attribute)": [[64, "siriushla.widgets.label.SiriusLabel.DisplayFormat.Hex"]], "hex (siriushla.widgets.log_label.pydmloglabel.displayformat attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.DisplayFormat.Hex"]], "horizontalruler (class in siriushla.widgets.horizontal_ruler)": [[64, "siriushla.widgets.horizontal_ruler.HorizontalRuler"]], "lightgreen (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.LightGreen"]], "loadingdialog (class in siriushla.widgets.loading_dialog)": [[64, "siriushla.widgets.loading_dialog.LoadingDialog"]], "matplotlibcanvas (class in siriushla.widgets.matplotlib)": [[64, "siriushla.widgets.matplotlib.MatplotlibCanvas"]], "matplotlibwidget (class in siriushla.widgets.matplotlib)": [[64, "siriushla.widgets.matplotlib.MatplotlibWidget"]], "multichannelstatusdialog (class in siriushla.widgets.led)": [[64, "siriushla.widgets.led.MultiChannelStatusDialog"]], "notselcolor1 (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.NotSelColor1"]], "notselcolor2 (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.NotSelColor2"]], "pvnametree (class in siriushla.widgets.pvnames_tree)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree"]], "pydmbargraph (class in siriushla.widgets.bar_graph)": [[64, "siriushla.widgets.bar_graph.PyDMBarGraph"]], "pydmbargraphmodel (class in siriushla.widgets.bar_graph)": [[64, "siriushla.widgets.bar_graph.PyDMBarGraphModel"]], "pydmled (class in siriushla.widgets.led)": [[64, "siriushla.widgets.led.PyDMLed"]], "pydmledmultichannel (class in siriushla.widgets.led)": [[64, "siriushla.widgets.led.PyDMLedMultiChannel"]], "pydmledmulticonnection (class in siriushla.widgets.led)": [[64, "siriushla.widgets.led.PyDMLedMultiConnection"]], "pydmlineditscrollbar (class in siriushla.widgets.ledit_scrollbar)": [[64, "siriushla.widgets.ledit_scrollbar.PyDMLinEditScrollbar"]], "pydmloglabel (class in siriushla.widgets.log_label)": [[64, "siriushla.widgets.log_label.PyDMLogLabel"]], "pydmloglabel.displayformat (class in siriushla.widgets.log_label)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.DisplayFormat"]], "pydmscrollbar (class in siriushla.widgets.scrollbar)": [[64, "siriushla.widgets.scrollbar.PyDMScrollBar"]], "pydmspinboxscrollbar (class in siriushla.widgets.spinbox_scrollbar)": [[64, "siriushla.widgets.spinbox_scrollbar.PyDMSpinboxScrollbar"]], "pydmstatebutton (class in siriushla.widgets.state_button)": [[64, "siriushla.widgets.state_button.PyDMStateButton"]], "pydmstatebutton.buttonshapemap (class in siriushla.widgets.state_button)": [[64, "siriushla.widgets.state_button.PyDMStateButton.buttonShapeMap"]], "qdoublescrollbar (class in siriushla.widgets.qdoublescrollbar)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar"]], "qdoublespinboxplus (in module siriushla.widgets.qspinboxplus)": [[64, "siriushla.widgets.QSpinBoxPlus.QDoubleSpinBoxPlus"]], "qled (class in siriushla.widgets.qled)": [[64, "siriushla.widgets.QLed.QLed"]], "qled.shapemap (class in siriushla.widgets.qled)": [[64, "siriushla.widgets.QLed.QLed.ShapeMap"]], "qspinboxplus (in module siriushla.widgets.qspinboxplus)": [[64, "siriushla.widgets.QSpinBoxPlus.QSpinBoxPlus"]], "qtreeitem (class in siriushla.widgets.pvnames_tree)": [[64, "siriushla.widgets.pvnames_tree.QTreeItem"]], "roiheight (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.ROIHeight"]], "roiheightchannel (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.ROIHeightChannel"]], "roioffsetx (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.ROIOffsetX"]], "roioffsetxchannel (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.ROIOffsetXChannel"]], "roioffsety (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.ROIOffsetY"]], "roioffsetychannel (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.ROIOffsetYChannel"]], "roiwidth (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.ROIWidth"]], "roiwidthchannel (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.ROIWidthChannel"]], "rectangle (siriushla.widgets.qled.qled.shapemap attribute)": [[64, "siriushla.widgets.QLed.QLed.ShapeMap.Rectangle"]], "rectangle (siriushla.widgets.qled.shapemap attribute)": [[64, "siriushla.widgets.QLed.ShapeMap.Rectangle"]], "red (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.Red"]], "relativewidget (class in siriushla.widgets.relative_widget)": [[64, "siriushla.widgets.relative_widget.RelativeWidget"]], "round (siriushla.widgets.qled.qled.shapemap attribute)": [[64, "siriushla.widgets.QLed.QLed.ShapeMap.Round"]], "round (siriushla.widgets.qled.shapemap attribute)": [[64, "siriushla.widgets.QLed.ShapeMap.Round"]], "rounded (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.Rounded"]], "rounded (siriushla.widgets.state_button.pydmstatebutton.buttonshapemap attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.buttonShapeMap.Rounded"]], "selcolor (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.SelColor"]], "selectionmatrixwidget (class in siriushla.widgets.selection_matrix)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget"]], "shapemap (class in siriushla.widgets.qled)": [[64, "siriushla.widgets.QLed.ShapeMap"]], "siriusalarmframe (class in siriushla.widgets.frame)": [[64, "siriushla.widgets.frame.SiriusAlarmFrame"]], "siriusconnectionsignal (class in siriushla.widgets.signal_channel)": [[64, "siriushla.widgets.signal_channel.SiriusConnectionSignal"]], "siriusdialog (in module siriushla.widgets.windows)": [[64, "siriushla.widgets.windows.SiriusDialog"]], "siriusenumcombobox (class in siriushla.widgets.enum_combo_box)": [[64, "siriushla.widgets.enum_combo_box.SiriusEnumComboBox"]], "siriusframe (class in siriushla.widgets.frame)": [[64, "siriushla.widgets.frame.SiriusFrame"]], "siriusguihandler (class in siriushla.widgets.log_display)": [[64, "siriushla.widgets.log_display.SiriusGuiHandler"]], "siriushexaspinbox (class in siriushla.widgets.spinbox)": [[64, "siriushla.widgets.spinbox.SiriusHexaSpinbox"]], "siriuslabel (class in siriushla.widgets.label)": [[64, "siriushla.widgets.label.SiriusLabel"]], "siriuslabel.displayformat (class in siriushla.widgets.label)": [[64, "siriushla.widgets.label.SiriusLabel.DisplayFormat"]], "siriusledalert (class in siriushla.widgets.led)": [[64, "siriushla.widgets.led.SiriusLedAlert"]], "siriusledstate (class in siriushla.widgets.led)": [[64, "siriushla.widgets.led.SiriusLedState"]], "siriuslineedit (class in siriushla.widgets.line_edit)": [[64, "siriushla.widgets.line_edit.SiriusLineEdit"]], "siriuslogdisplay (class in siriushla.widgets.log_display)": [[64, "siriushla.widgets.log_display.SiriusLogDisplay"]], "siriusmainwindow (in module siriushla.widgets.windows)": [[64, "siriushla.widgets.windows.SiriusMainWindow"]], "siriusprocessimage (class in siriushla.widgets.process_image)": [[64, "siriushla.widgets.process_image.SiriusProcessImage"]], "siriuspushbutton (class in siriushla.widgets.pushbutton)": [[64, "siriushla.widgets.pushbutton.SiriusPushButton"]], "siriusspectrogramview (class in siriushla.widgets.spectrogram_view)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView"]], "siriusspinbox (class in siriushla.widgets.spinbox)": [[64, "siriushla.widgets.spinbox.SiriusSpinbox"]], "siriusstringcombobox (class in siriushla.widgets.string_combo_box)": [[64, "siriushla.widgets.string_combo_box.SiriusStringComboBox"]], "siriustimeplot (class in siriushla.widgets.timeplot)": [[64, "siriushla.widgets.timeplot.SiriusTimePlot"]], "siriustimeplotitem (class in siriushla.widgets.timeplot)": [[64, "siriushla.widgets.timeplot.SiriusTimePlotItem"]], "siriuswaveformlineedit (class in siriushla.widgets.line_edit)": [[64, "siriushla.widgets.line_edit.SiriusWaveformLineEdit"]], "siriuswaveformplot (class in siriushla.widgets.waveformplot)": [[64, "siriushla.widgets.waveformplot.SiriusWaveformPlot"]], "siriuswaveformtable (class in siriushla.widgets.waveformtable)": [[64, "siriushla.widgets.waveformtable.SiriusWaveformTable"]], "spectrogramupdatethread (class in siriushla.widgets.spectrogram_view)": [[64, "siriushla.widgets.spectrogram_view.SpectrogramUpdateThread"]], "square (siriushla.widgets.qled.qled.shapemap attribute)": [[64, "siriushla.widgets.QLed.QLed.ShapeMap.Square"]], "square (siriushla.widgets.qled.shapemap attribute)": [[64, "siriushla.widgets.QLed.ShapeMap.Square"]], "squared (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.Squared"]], "squared (siriushla.widgets.state_button.pydmstatebutton.buttonshapemap attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.buttonShapeMap.Squared"]], "string (siriushla.widgets.label.siriuslabel.displayformat attribute)": [[64, "siriushla.widgets.label.SiriusLabel.DisplayFormat.String"]], "string (siriushla.widgets.log_label.pydmloglabel.displayformat attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.DisplayFormat.String"]], "timeout (siriushla.widgets.bar_graph.epicsbargraphmodel attribute)": [[64, "siriushla.widgets.bar_graph.EpicsBarGraphModel.TIMEOUT"]], "tabbar (class in siriushla.widgets.detachable_tabwidget)": [[64, "siriushla.widgets.detachable_tabwidget.TabBar"]], "time (siriushla.widgets.label.siriuslabel.displayformat attribute)": [[64, "siriushla.widgets.label.SiriusLabel.DisplayFormat.Time"]], "time (siriushla.widgets.log_label.pydmloglabel.displayformat attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.DisplayFormat.Time"]], "tree (class in siriushla.widgets.pvnames_tree)": [[64, "siriushla.widgets.pvnames_tree.Tree"]], "triangle (siriushla.widgets.qled.qled.shapemap attribute)": [[64, "siriushla.widgets.QLed.QLed.ShapeMap.Triangle"]], "triangle (siriushla.widgets.qled.shapemap attribute)": [[64, "siriushla.widgets.QLed.ShapeMap.Triangle"]], "yellow (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.Yellow"]], "abspath (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.abspath"]], "addcurve() (siriushla.widgets.timeplot.siriustimeplot method)": [[64, "siriushla.widgets.timeplot.SiriusTimePlot.addCurve"]], "addychannel() (siriushla.widgets.timeplot.siriustimeplot method)": [[64, "siriushla.widgets.timeplot.SiriusTimePlot.addYChannel"]], "adjust() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.adjust"]], "alarm_severity_changed() (siriushla.widgets.frame.siriusalarmframe method)": [[64, "siriushla.widgets.frame.SiriusAlarmFrame.alarm_severity_changed"]], "applybothplanesclicked (siriushla.widgets.selection_matrix.selectionmatrixwidget attribute)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.applyBothPlanesClicked"]], "applychangesclicked (siriushla.widgets.selection_matrix.selectionmatrixwidget attribute)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.applyChangesClicked"]], "attachtab() (siriushla.widgets.detachable_tabwidget.detachabletabwidget method)": [[64, "siriushla.widgets.detachable_tabwidget.DetachableTabWidget.attachTab"]], "attachtabslot() (siriushla.widgets.detachable_tabwidget.detachabletabwidget method)": [[64, "siriushla.widgets.detachable_tabwidget.DetachableTabWidget.attachTabSlot"]], "autodownsample (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.autoDownsample"]], "autosetcolorbarlims (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.autoSetColorbarLims"]], "bufferreset (siriushla.widgets.timeplot.siriustimeplot attribute)": [[64, "siriushla.widgets.timeplot.SiriusTimePlot.bufferReset"]], "buffersize (siriushla.widgets.log_label.pydmloglabel attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.bufferSize"]], "changeevent() (siriushla.widgets.matplotlib.matplotlibcanvas method)": [[64, "siriushla.widgets.matplotlib.MatplotlibCanvas.changeEvent"]], "channels() (siriushla.widgets.bar_graph.pydmbargraph method)": [[64, "siriushla.widgets.bar_graph.PyDMBarGraph.channels"]], "channels() (siriushla.widgets.bar_graph.pydmbargraphmodel method)": [[64, "siriushla.widgets.bar_graph.PyDMBarGraphModel.channels"]], "channels() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.channels"]], "channels2conn (siriushla.widgets.led.pydmledmulticonnection property)": [[64, "siriushla.widgets.led.PyDMLedMultiConnection.channels2conn"]], "channels2status (siriushla.widgets.led.pydmledmultichannel property)": [[64, "siriushla.widgets.led.PyDMLedMultiChannel.channels2status"]], "channels2values (siriushla.widgets.led.pydmledmultichannel property)": [[64, "siriushla.widgets.led.PyDMLedMultiChannel.channels2values"]], "channels_for_tools() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.channels_for_tools"]], "check_all() (siriushla.widgets.pvnames_tree.pvnametree method)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.check_all"]], "check_enable_state() (siriushla.widgets.string_combo_box.siriusstringcombobox method)": [[64, "siriushla.widgets.string_combo_box.SiriusStringComboBox.check_enable_state"]], "check_requested_levels() (siriushla.widgets.pvnames_tree.pvnametree method)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.check_requested_levels"]], "checked_items() (siriushla.widgets.pvnames_tree.pvnametree method)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.checked_items"]], "childchecked() (siriushla.widgets.pvnames_tree.qtreeitem method)": [[64, "siriushla.widgets.pvnames_tree.QTreeItem.childChecked"]], "childhidden() (siriushla.widgets.pvnames_tree.qtreeitem method)": [[64, "siriushla.widgets.pvnames_tree.QTreeItem.childHidden"]], "clear() (siriushla.widgets.pvnames_tree.pvnametree method)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.clear"]], "clicked (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.clicked"]], "clicked (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.clicked"]], "closedetachedtabs() (siriushla.widgets.detachable_tabwidget.detachabletabwidget method)": [[64, "siriushla.widgets.detachable_tabwidget.DetachableTabWidget.closeDetachedTabs"]], "closeevent() (siriushla.widgets.detachable_tabwidget.detachedtab method)": [[64, "siriushla.widgets.detachable_tabwidget.DetachedTab.closeEvent"]], "closeevent() (siriushla.widgets.loading_dialog.loadingdialog method)": [[64, "siriushla.widgets.loading_dialog.LoadingDialog.closeEvent"]], "collapse_all() (siriushla.widgets.pvnames_tree.pvnametree method)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.collapse_all"]], "colormap (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.colorMap"]], "colormapmax (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.colorMapMax"]], "colormapmin (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.colorMapMin"]], "color_maps (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.color_maps"]], "completed (siriushla.widgets.pvnames_tree.buildtree attribute)": [[64, "siriushla.widgets.pvnames_tree.BuildTree.completed"]], "confirmmessage (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.confirmMessage"]], "confirm_dialog() (siriushla.widgets.state_button.pydmstatebutton method)": [[64, "siriushla.widgets.state_button.PyDMStateButton.confirm_dialog"]], "connected (siriushla.widgets.bar_graph.epicsbargraphmodel property)": [[64, "siriushla.widgets.bar_graph.EpicsBarGraphModel.connected"]], "connected (siriushla.widgets.bar_graph.pydmbargraphmodel property)": [[64, "siriushla.widgets.bar_graph.PyDMBarGraphModel.connected"]], "connected() (siriushla.widgets.bar_graph.bargraphmodel method)": [[64, "siriushla.widgets.bar_graph.BarGraphModel.connected"]], "connected_signal (siriushla.widgets.scrollbar.pydmscrollbar attribute)": [[64, "siriushla.widgets.scrollbar.PyDMScrollBar.connected_signal"]], "connectionchanged() (siriushla.widgets.bar_graph.pydmbargraphmodel method)": [[64, "siriushla.widgets.bar_graph.PyDMBarGraphModel.connectionChanged"]], "connection_changed() (siriushla.widgets.led.pydmledmultichannel method)": [[64, "siriushla.widgets.led.PyDMLedMultiChannel.connection_changed"]], "connection_changed() (siriushla.widgets.led.pydmledmulticonnection method)": [[64, "siriushla.widgets.led.PyDMLedMultiConnection.connection_changed"]], "connection_state_signal (siriushla.widgets.signal_channel.siriusconnectionsignal attribute)": [[64, "siriushla.widgets.signal_channel.SiriusConnectionSignal.connection_state_signal"]], "contextmenuevent() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.contextMenuEvent"]], "contextmenuevent() (siriushla.widgets.pvnames_tree.pvnametree method)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.contextMenuEvent"]], "create_window_from_widget() (in module siriushla.widgets.windows)": [[64, "siriushla.widgets.windows.create_window_from_widget"]], "ctrl_limit_changed() (siriushla.widgets.scrollbar.pydmscrollbar method)": [[64, "siriushla.widgets.scrollbar.PyDMScrollBar.ctrl_limit_changed"]], "ctrl_limit_changed() (siriushla.widgets.spinbox.siriusspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusSpinbox.ctrl_limit_changed"]], "currentitem (siriushla.widgets.pvnames_tree.buildtree attribute)": [[64, "siriushla.widgets.pvnames_tree.BuildTree.currentItem"]], "datetimefmt (siriushla.widgets.log_label.pydmloglabel attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.dateTimeFmt"]], "decimals (siriushla.widgets.qdoublescrollbar.qdoublescrollbar attribute)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.decimals"]], "default_colorlist (siriushla.widgets.frame.siriusalarmframe attribute)": [[64, "siriushla.widgets.frame.SiriusAlarmFrame.default_colorlist"]], "default_colorlist (siriushla.widgets.frame.siriusframe attribute)": [[64, "siriushla.widgets.frame.SiriusFrame.default_colorlist"]], "default_colorlist (siriushla.widgets.led.pydmled attribute)": [[64, "siriushla.widgets.led.PyDMLed.default_colorlist"]], "default_colorlist (siriushla.widgets.led.pydmledmultichannel attribute)": [[64, "siriushla.widgets.led.PyDMLedMultiChannel.default_colorlist"]], "default_colorlist (siriushla.widgets.led.pydmledmulticonnection attribute)": [[64, "siriushla.widgets.led.PyDMLedMultiConnection.default_colorlist"]], "detachtab() (siriushla.widgets.detachable_tabwidget.detachabletabwidget method)": [[64, "siriushla.widgets.detachable_tabwidget.DetachableTabWidget.detachTab"]], "dialogpagestep() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.dialogPageStep"]], "dialogsinglestep() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.dialogSingleStep"]], "disconnected_signal (siriushla.widgets.scrollbar.pydmscrollbar attribute)": [[64, "siriushla.widgets.scrollbar.PyDMScrollBar.disconnected_signal"]], "displayformat (siriushla.widgets.label.siriuslabel attribute)": [[64, "siriushla.widgets.label.SiriusLabel.displayFormat"]], "displayformat (siriushla.widgets.log_label.pydmloglabel attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.displayFormat"]], "do_close() (siriushla.widgets.detachable_tabwidget.detachedtab method)": [[64, "siriushla.widgets.detachable_tabwidget.DetachedTab.do_close"]], "done() (siriushla.widgets.loading_dialog.loadingdialog method)": [[64, "siriushla.widgets.loading_dialog.LoadingDialog.done"]], "dsblcolor (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.dsblColor"]], "emit() (siriushla.widgets.log_display.siriusguihandler method)": [[64, "siriushla.widgets.log_display.SiriusGuiHandler.emit"]], "enum_strings_signal (siriushla.widgets.signal_channel.siriusconnectionsignal attribute)": [[64, "siriushla.widgets.signal_channel.SiriusConnectionSignal.enum_strings_signal"]], "errorcolor (siriushla.widgets.log_label.pydmloglabel attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.errorcolor"]], "exit_task() (siriushla.widgets.pvnames_tree.buildtree method)": [[64, "siriushla.widgets.pvnames_tree.BuildTree.exit_task"]], "expand_all() (siriushla.widgets.pvnames_tree.pvnametree method)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.expand_all"]], "f (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.f"]], "f (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.f"]], "fill_curve_buffer() (siriushla.widgets.timeplot.siriustimeplot method)": [[64, "siriushla.widgets.timeplot.SiriusTimePlot.fill_curve_buffer"]], "fill_curve_with_archdata() (siriushla.widgets.timeplot.siriustimeplot method)": [[64, "siriushla.widgets.timeplot.SiriusTimePlot.fill_curve_with_archdata"]], "focusoutevent() (siriushla.widgets.spinbox.siriusspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusSpinbox.focusOutEvent"]], "getdecimals() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.getDecimals"]], "getdsblcolor() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.getDsblColor"]], "getmaximum() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.getMaximum"]], "getminimum() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.getMinimum"]], "getoffcolor() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.getOffColor"]], "getoncolor() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.getOnColor"]], "getpagestep() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.getPageStep"]], "getrgbfromqcolor() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.getRGBfromQColor"]], "getshape() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.getShape"]], "getsinglestep() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.getSingleStep"]], "getsliderposition() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.getSliderPosition"]], "getstate() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.getState"]], "getvalue() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.getValue"]], "get_headers() (siriushla.widgets.selection_matrix.selectionmatrixwidget method)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.get_headers"]], "get_positions() (siriushla.widgets.selection_matrix.selectionmatrixwidget method)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.get_positions"]], "get_user_limits() (siriushla.widgets.spinbox.siriusspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusSpinbox.get_user_limits"]], "get_widgets() (siriushla.widgets.selection_matrix.selectionmatrixwidget method)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.get_widgets"]], "getvalue() (siriushla.widgets.signal_channel.siriusconnectionsignal method)": [[64, "siriushla.widgets.signal_channel.SiriusConnectionSignal.getvalue"]], "header_widgets (siriushla.widgets.selection_matrix.selectionmatrixwidget property)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.header_widgets"]], "headers (siriushla.widgets.selection_matrix.selectionmatrixwidget property)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.headers"]], "imagechannel (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.imageChannel"]], "imageheight (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.imageHeight"]], "imagewidth (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.imageWidth"]], "image_connection_state_changed() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.image_connection_state_changed"]], "image_value_changed() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.image_value_changed"]], "initialize_buffer() (siriushla.widgets.timeplot.siriustimeplotitem method)": [[64, "siriushla.widgets.timeplot.SiriusTimePlotItem.initialize_buffer"]], "invert (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.invert"]], "isleaf() (siriushla.widgets.pvnames_tree.qtreeitem method)": [[64, "siriushla.widgets.pvnames_tree.QTreeItem.isLeaf"]], "isselected() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.isSelected"]], "itemchecked (siriushla.widgets.pvnames_tree.pvnametree attribute)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.itemChecked"]], "itemdone (siriushla.widgets.pvnames_tree.buildtree attribute)": [[64, "siriushla.widgets.pvnames_tree.BuildTree.itemDone"]], "items (siriushla.widgets.pvnames_tree.pvnametree property)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.items"]], "keypressevent() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.keyPressEvent"]], "keypressevent() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.keyPressEvent"]], "legend (siriushla.widgets.timeplot.siriustimeplot property)": [[64, "siriushla.widgets.timeplot.SiriusTimePlot.legend"]], "legend (siriushla.widgets.waveformplot.siriuswaveformplot property)": [[64, "siriushla.widgets.waveformplot.SiriusWaveformPlot.legend"]], "limitsfromchannel (siriushla.widgets.spinbox.siriusspinbox attribute)": [[64, "siriushla.widgets.spinbox.SiriusSpinbox.limitsFromChannel"]], "lower_ctrl_limit_signal (siriushla.widgets.signal_channel.siriusconnectionsignal attribute)": [[64, "siriushla.widgets.signal_channel.SiriusConnectionSignal.lower_ctrl_limit_signal"]], "mag_group() (siriushla.widgets.pvnames_tree.pvnametree static method)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.mag_group"]], "maxredrawrate (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.maxRedrawRate"]], "maximum (siriushla.widgets.qdoublescrollbar.qdoublescrollbar attribute)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.maximum"]], "message (siriushla.widgets.log_display.siriusguihandler attribute)": [[64, "siriushla.widgets.log_display.SiriusGuiHandler.message"]], "message (siriushla.widgets.pvnames_tree.pvnametree property)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.message"]], "minimum (siriushla.widgets.qdoublescrollbar.qdoublescrollbar attribute)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.minimum"]], "mousedoubleclickevent() (siriushla.widgets.detachable_tabwidget.tabbar method)": [[64, "siriushla.widgets.detachable_tabwidget.TabBar.mouseDoubleClickEvent"]], "mousedoubleclickevent() (siriushla.widgets.led.pydmledmultichannel method)": [[64, "siriushla.widgets.led.PyDMLedMultiChannel.mouseDoubleClickEvent"]], "mousedoubleclickevent() (siriushla.widgets.led.pydmledmulticonnection method)": [[64, "siriushla.widgets.led.PyDMLedMultiConnection.mouseDoubleClickEvent"]], "mousemoveevent() (siriushla.widgets.selection_matrix.selectionmatrixwidget method)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.mouseMoveEvent"]], "mousemoveevent() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.mouseMoveEvent"]], "mousepressevent() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.mousePressEvent"]], "mousepressevent() (siriushla.widgets.selection_matrix.selectionmatrixwidget method)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.mousePressEvent"]], "mousereleaseevent() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.mouseReleaseEvent"]], "mousereleaseevent() (siriushla.widgets.selection_matrix.selectionmatrixwidget method)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.mouseReleaseEvent"]], "mousereleaseevent() (siriushla.widgets.state_button.pydmstatebutton method)": [[64, "siriushla.widgets.state_button.PyDMStateButton.mouseReleaseEvent"]], "myhash (siriushla.widgets.pvnames_tree.qtreeitem property)": [[64, "siriushla.widgets.pvnames_tree.QTreeItem.myhash"]], "new_severity_signal (siriushla.widgets.signal_channel.siriusconnectionsignal attribute)": [[64, "siriushla.widgets.signal_channel.SiriusConnectionSignal.new_severity_signal"]], "new_value_signal (siriushla.widgets.signal_channel.siriusconnectionsignal attribute)": [[64, "siriushla.widgets.signal_channel.SiriusConnectionSignal.new_value_signal"]], "normal (siriushla.widgets.led.pydmledmultichannel attribute)": [[64, "siriushla.widgets.led.PyDMLedMultiChannel.normal"]], "normal (siriushla.widgets.led.pydmledmulticonnection attribute)": [[64, "siriushla.widgets.led.PyDMLedMultiConnection.normal"]], "normalizedata (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.normalizeData"]], "offcolor (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.offColor"]], "onattachsignal (siriushla.widgets.detachable_tabwidget.detachedtab attribute)": [[64, "siriushla.widgets.detachable_tabwidget.DetachedTab.onAttachSignal"]], "oncolor (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.onColor"]], "ondetachtabsignal (siriushla.widgets.detachable_tabwidget.tabbar attribute)": [[64, "siriushla.widgets.detachable_tabwidget.TabBar.onDetachTabSignal"]], "pagestep (siriushla.widgets.qdoublescrollbar.qdoublescrollbar attribute)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.pageStep"]], "paintevent() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.paintEvent"]], "paintevent() (siriushla.widgets.ledit_scrollbar.pydmlineditscrollbar method)": [[64, "siriushla.widgets.ledit_scrollbar.PyDMLinEditScrollbar.paintEvent"]], "paintevent() (siriushla.widgets.selection_matrix.selectionmatrixwidget method)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.paintEvent"]], "paintevent() (siriushla.widgets.state_button.pydmstatebutton method)": [[64, "siriushla.widgets.state_button.PyDMStateButton.paintEvent"]], "password (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.password"]], "passwordprotected (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.passwordProtected"]], "path (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.path"]], "positions (siriushla.widgets.selection_matrix.selectionmatrixwidget property)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.positions"]], "prec_signal (siriushla.widgets.signal_channel.siriusconnectionsignal attribute)": [[64, "siriushla.widgets.signal_channel.SiriusConnectionSignal.prec_signal"]], "precision_changed() (siriushla.widgets.scrollbar.pydmscrollbar method)": [[64, "siriushla.widgets.scrollbar.PyDMScrollBar.precision_changed"]], "precision_changed() (siriushla.widgets.spinbox.siriusspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusSpinbox.precision_changed"]], "prependdatetime (siriushla.widgets.log_label.pydmloglabel attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.prependDateTime"]], "process_image() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.process_image"]], "protectedpassword (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.protectedPassword"]], "pvbit (siriushla.widgets.led.pydmled attribute)": [[64, "siriushla.widgets.led.PyDMLed.pvbit"]], "pvbit (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.pvbit"]], "pvname (siriushla.widgets.bar_graph.epicsbargraphmodel property)": [[64, "siriushla.widgets.bar_graph.EpicsBarGraphModel.pvname"]], "pydmwidget_factory() (in module siriushla.widgets.widget_factory)": [[64, "siriushla.widgets.widget_factory.pydmwidget_factory"]], "rangechanged (siriushla.widgets.qdoublescrollbar.qdoublescrollbar attribute)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.rangeChanged"]], "readingorder (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.readingOrder"]], "receivenewvalue() (siriushla.widgets.timeplot.siriustimeplotitem method)": [[64, "siriushla.widgets.timeplot.SiriusTimePlotItem.receiveNewValue"]], "redrawcurve() (siriushla.widgets.timeplot.siriustimeplotitem method)": [[64, "siriushla.widgets.timeplot.SiriusTimePlotItem.redrawCurve"]], "redrawimage() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.redrawImage"]], "redrawroi() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.redrawROI"]], "relativeresize() (siriushla.widgets.relative_widget.relativewidget method)": [[64, "siriushla.widgets.relative_widget.RelativeWidget.relativeResize"]], "releasevalue (siriushla.widgets.pushbutton.siriuspushbutton attribute)": [[64, "siriushla.widgets.pushbutton.SiriusPushButton.releaseValue"]], "resizeevent() (siriushla.widgets.pvnames_tree.tree method)": [[64, "siriushla.widgets.pvnames_tree.Tree.resizeEvent"]], "roiheight_connection_state_changed() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.roiheight_connection_state_changed"]], "roiheight_value_changed() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.roiheight_value_changed"]], "roioffsetx_connection_state_changed() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.roioffsetx_connection_state_changed"]], "roioffsetx_value_changed() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.roioffsetx_value_changed"]], "roioffsety_connection_state_changed() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.roioffsety_connection_state_changed"]], "roioffsety_value_changed() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.roioffsety_value_changed"]], "roiwidth_connection_state_changed() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.roiwidth_connection_state_changed"]], "roiwidth_value_changed() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.roiwidth_value_changed"]], "roundedbuttonstatesdict (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.roundedbuttonstatesdict"]], "run() (siriushla.widgets.pvnames_tree.buildtree method)": [[64, "siriushla.widgets.pvnames_tree.BuildTree.run"]], "run() (siriushla.widgets.spectrogram_view.spectrogramupdatethread method)": [[64, "siriushla.widgets.spectrogram_view.SpectrogramUpdateThread.run"]], "selectitems() (siriushla.widgets.selection_matrix.selectionmatrixwidget method)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.selectItems"]], "selectwidgetsat() (siriushla.widgets.selection_matrix.selectionmatrixwidget method)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.selectWidgetsAt"]], "selected (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.selected"]], "sendreleasevalue() (siriushla.widgets.pushbutton.siriuspushbutton method)": [[64, "siriushla.widgets.pushbutton.SiriusPushButton.sendReleaseValue"]], "send_value() (siriushla.widgets.scrollbar.pydmscrollbar method)": [[64, "siriushla.widgets.scrollbar.PyDMScrollBar.send_value"]], "send_value() (siriushla.widgets.state_button.pydmstatebutton method)": [[64, "siriushla.widgets.state_button.PyDMStateButton.send_value"]], "send_value_signal (siriushla.widgets.signal_channel.siriusconnectionsignal attribute)": [[64, "siriushla.widgets.signal_channel.SiriusConnectionSignal.send_value_signal"]], "setbuffersize() (siriushla.widgets.timeplot.siriustimeplotitem method)": [[64, "siriushla.widgets.timeplot.SiriusTimePlotItem.setBufferSize"]], "setcolormap() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.setColorMap"]], "setcolormaplimits() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.setColorMapLimits"]], "setdata() (siriushla.widgets.pvnames_tree.qtreeitem method)": [[64, "siriushla.widgets.pvnames_tree.QTreeItem.setData"]], "setdecimals() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.setDecimals"]], "setdsblcolor() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.setDsblColor"]], "setheight() (siriushla.widgets.horizontal_ruler.horizontalruler method)": [[64, "siriushla.widgets.horizontal_ruler.HorizontalRuler.setHeight"]], "sethidden() (siriushla.widgets.pvnames_tree.qtreeitem method)": [[64, "siriushla.widgets.pvnames_tree.QTreeItem.setHidden"]], "setmaximum() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.setMaximum"]], "setmaximum() (siriushla.widgets.spinbox.siriusspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusSpinbox.setMaximum"]], "setminimum() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.setMinimum"]], "setminimum() (siriushla.widgets.spinbox.siriusspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusSpinbox.setMinimum"]], "setoffcolor() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.setOffColor"]], "setoncolor() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.setOnColor"]], "setpagestep() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.setPageStep"]], "setrange() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.setRange"]], "setrange() (siriushla.widgets.spinbox.siriusspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusSpinbox.setRange"]], "setselected() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.setSelected"]], "setshape() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.setShape"]], "setsinglestep() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.setSingleStep"]], "setsliderposition() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.setSliderPosition"]], "setstate() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.setState"]], "setvalue() (siriushla.widgets.qdoublescrollbar.qdoublescrollbar method)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.setValue"]], "set_brush() (siriushla.widgets.bar_graph.basebargraphwidget method)": [[64, "siriushla.widgets.bar_graph.BaseBarGraphWidget.set_brush"]], "set_channels() (siriushla.widgets.led.pydmledmulticonnection method)": [[64, "siriushla.widgets.led.PyDMLedMultiConnection.set_channels"]], "set_channels2values() (siriushla.widgets.led.pydmledmultichannel method)": [[64, "siriushla.widgets.led.PyDMLedMultiChannel.set_channels2values"]], "set_items() (siriushla.widgets.string_combo_box.siriusstringcombobox method)": [[64, "siriushla.widgets.string_combo_box.SiriusStringComboBox.set_items"]], "set_scale() (siriushla.widgets.bar_graph.basebargraphwidget method)": [[64, "siriushla.widgets.bar_graph.BaseBarGraphWidget.set_scale"]], "set_update_interval() (siriushla.widgets.bar_graph.pydmbargraph method)": [[64, "siriushla.widgets.bar_graph.PyDMBarGraph.set_update_interval"]], "set_waveform() (siriushla.widgets.bar_graph.bargraphwidget method)": [[64, "siriushla.widgets.bar_graph.BarGraphWidget.set_waveform"]], "set_width() (siriushla.widgets.bar_graph.basebargraphwidget method)": [[64, "siriushla.widgets.bar_graph.BaseBarGraphWidget.set_width"]], "shape (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.shape"]], "shape (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.shape"]], "shapesdict (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.shapesdict"]], "showconfirmdialog (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.showConfirmDialog"]], "showroi() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.showROI"]], "showtooltip (siriushla.widgets.timeplot.siriustimeplot attribute)": [[64, "siriushla.widgets.timeplot.SiriusTimePlot.showToolTip"]], "singlestep (siriushla.widgets.qdoublescrollbar.qdoublescrollbar attribute)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.singleStep"]], "siriushla.widgets": [[64, "module-siriushla.widgets"]], "siriushla.widgets.qdoublescrollbar": [[64, "module-siriushla.widgets.QDoubleScrollBar"]], "siriushla.widgets.qled": [[64, "module-siriushla.widgets.QLed"]], "siriushla.widgets.qspinboxplus": [[64, "module-siriushla.widgets.QSpinBoxPlus"]], "siriushla.widgets.bar_graph": [[64, "module-siriushla.widgets.bar_graph"]], "siriushla.widgets.detachable_tabwidget": [[64, "module-siriushla.widgets.detachable_tabwidget"]], "siriushla.widgets.enum_combo_box": [[64, "module-siriushla.widgets.enum_combo_box"]], "siriushla.widgets.frame": [[64, "module-siriushla.widgets.frame"]], "siriushla.widgets.horizontal_ruler": [[64, "module-siriushla.widgets.horizontal_ruler"]], "siriushla.widgets.label": [[64, "module-siriushla.widgets.label"]], "siriushla.widgets.led": [[64, "module-siriushla.widgets.led"]], "siriushla.widgets.ledit_scrollbar": [[64, "module-siriushla.widgets.ledit_scrollbar"]], "siriushla.widgets.line_edit": [[64, "module-siriushla.widgets.line_edit"]], "siriushla.widgets.loading_dialog": [[64, "module-siriushla.widgets.loading_dialog"]], "siriushla.widgets.log_display": [[64, "module-siriushla.widgets.log_display"]], "siriushla.widgets.log_label": [[64, "module-siriushla.widgets.log_label"]], "siriushla.widgets.matplotlib": [[64, "module-siriushla.widgets.matplotlib"]], "siriushla.widgets.process_image": [[64, "module-siriushla.widgets.process_image"]], "siriushla.widgets.pushbutton": [[64, "module-siriushla.widgets.pushbutton"]], "siriushla.widgets.pvnames_tree": [[64, "module-siriushla.widgets.pvnames_tree"]], "siriushla.widgets.qtplugins": [[64, "module-siriushla.widgets.qtplugins"]], "siriushla.widgets.relative_widget": [[64, "module-siriushla.widgets.relative_widget"]], "siriushla.widgets.scrollbar": [[64, "module-siriushla.widgets.scrollbar"]], "siriushla.widgets.selection_matrix": [[64, "module-siriushla.widgets.selection_matrix"]], "siriushla.widgets.signal_channel": [[64, "module-siriushla.widgets.signal_channel"]], "siriushla.widgets.spectrogram_view": [[64, "module-siriushla.widgets.spectrogram_view"]], "siriushla.widgets.spinbox": [[64, "module-siriushla.widgets.spinbox"]], "siriushla.widgets.spinbox_scrollbar": [[64, "module-siriushla.widgets.spinbox_scrollbar"]], "siriushla.widgets.state_button": [[64, "module-siriushla.widgets.state_button"]], "siriushla.widgets.string_combo_box": [[64, "module-siriushla.widgets.string_combo_box"]], "siriushla.widgets.timeplot": [[64, "module-siriushla.widgets.timeplot"]], "siriushla.widgets.waveformplot": [[64, "module-siriushla.widgets.waveformplot"]], "siriushla.widgets.waveformtable": [[64, "module-siriushla.widgets.waveformtable"]], "siriushla.widgets.widget_factory": [[64, "module-siriushla.widgets.widget_factory"]], "siriushla.widgets.windows": [[64, "module-siriushla.widgets.windows"]], "size (siriushla.widgets.bar_graph.bargraphmodel property)": [[64, "siriushla.widgets.bar_graph.BarGraphModel.size"]], "size (siriushla.widgets.bar_graph.epicsbargraphmodel property)": [[64, "siriushla.widgets.bar_graph.EpicsBarGraphModel.size"]], "size (siriushla.widgets.bar_graph.pydmbargraphmodel property)": [[64, "siriushla.widgets.bar_graph.PyDMBarGraphModel.size"]], "size() (siriushla.widgets.pvnames_tree.buildtree method)": [[64, "siriushla.widgets.pvnames_tree.BuildTree.size"]], "sizehint() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.sizeHint"]], "sizehint() (siriushla.widgets.bar_graph.basebargraphwidget method)": [[64, "siriushla.widgets.bar_graph.BaseBarGraphWidget.sizeHint"]], "sizehint() (siriushla.widgets.pvnames_tree.pvnametree method)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.sizeHint"]], "sizehint() (siriushla.widgets.state_button.pydmstatebutton method)": [[64, "siriushla.widgets.state_button.PyDMStateButton.sizeHint"]], "slidermoved (siriushla.widgets.qdoublescrollbar.qdoublescrollbar attribute)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.sliderMoved"]], "sliderposition (siriushla.widgets.qdoublescrollbar.qdoublescrollbar attribute)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.sliderPosition"]], "squaredbuttonstatesdict (siriushla.widgets.state_button.pydmstatebutton attribute)": [[64, "siriushla.widgets.state_button.PyDMStateButton.squaredbuttonstatesdict"]], "start() (siriushla.widgets.bar_graph.pydmbargraph method)": [[64, "siriushla.widgets.bar_graph.PyDMBarGraph.start"]], "state (siriushla.widgets.qled.qled attribute)": [[64, "siriushla.widgets.QLed.QLed.state"]], "statecolors (siriushla.widgets.qled.qled property)": [[64, "siriushla.widgets.QLed.QLed.stateColors"]], "stop() (siriushla.widgets.bar_graph.pydmbargraph method)": [[64, "siriushla.widgets.bar_graph.PyDMBarGraph.stop"]], "textfromvalue() (siriushla.widgets.spinbox.siriushexaspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusHexaSpinbox.textFromValue"]], "timespanchanged (siriushla.widgets.timeplot.siriustimeplot attribute)": [[64, "siriushla.widgets.timeplot.SiriusTimePlot.timeSpanChanged"]], "toggleallitems() (siriushla.widgets.selection_matrix.selectionmatrixwidget method)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.toggleAllItems"]], "toggleselected() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.toggleSelected"]], "togglestate() (siriushla.widgets.qled.qled method)": [[64, "siriushla.widgets.QLed.QLed.toggleState"]], "uncheck_all() (siriushla.widgets.pvnames_tree.pvnametree method)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.uncheck_all"]], "undoitemsselection() (siriushla.widgets.selection_matrix.selectionmatrixwidget method)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.undoItemsSelection"]], "unit_signal (siriushla.widgets.signal_channel.siriusconnectionsignal attribute)": [[64, "siriushla.widgets.signal_channel.SiriusConnectionSignal.unit_signal"]], "update() (siriushla.widgets.loading_dialog.loadingdialog method)": [[64, "siriushla.widgets.loading_dialog.LoadingDialog.update"]], "updateitemcheckedcount (siriushla.widgets.pvnames_tree.pvnametree attribute)": [[64, "siriushla.widgets.pvnames_tree.PVNameTree.updateItemCheckedCount"]], "updatesignal (siriushla.widgets.spectrogram_view.spectrogramupdatethread attribute)": [[64, "siriushla.widgets.spectrogram_view.SpectrogramUpdateThread.updateSignal"]], "updatexaxis() (siriushla.widgets.timeplot.siriustimeplot method)": [[64, "siriushla.widgets.timeplot.SiriusTimePlot.updateXAxis"]], "update_format_string() (siriushla.widgets.label.siriuslabel method)": [[64, "siriushla.widgets.label.SiriusLabel.update_format_string"]], "update_format_string() (siriushla.widgets.line_edit.siriuslineedit method)": [[64, "siriushla.widgets.line_edit.SiriusLineEdit.update_format_string"]], "update_format_string() (siriushla.widgets.spinbox.siriushexaspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusHexaSpinbox.update_format_string"]], "update_limits() (siriushla.widgets.spinbox.siriusspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusSpinbox.update_limits"]], "update_step_size() (siriushla.widgets.spinbox.siriushexaspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusHexaSpinbox.update_step_size"]], "upper_ctrl_limit_signal (siriushla.widgets.signal_channel.siriusconnectionsignal attribute)": [[64, "siriushla.widgets.signal_channel.SiriusConnectionSignal.upper_ctrl_limit_signal"]], "validate() (siriushla.widgets.spinbox.siriushexaspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusHexaSpinbox.validate"]], "validate_password() (siriushla.widgets.state_button.pydmstatebutton method)": [[64, "siriushla.widgets.state_button.PyDMStateButton.validate_password"]], "value (siriushla.widgets.qdoublescrollbar.qdoublescrollbar attribute)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.value"]], "value (siriushla.widgets.signal_channel.siriusconnectionsignal property)": [[64, "siriushla.widgets.signal_channel.SiriusConnectionSignal.value"]], "valuechanged (siriushla.widgets.qdoublescrollbar.qdoublescrollbar attribute)": [[64, "siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar.valueChanged"]], "valuechanged() (siriushla.widgets.bar_graph.pydmbargraphmodel method)": [[64, "siriushla.widgets.bar_graph.PyDMBarGraphModel.valueChanged"]], "valuefromtext() (siriushla.widgets.spinbox.siriushexaspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusHexaSpinbox.valueFromText"]], "value_changed() (siriushla.widgets.frame.siriusframe method)": [[64, "siriushla.widgets.frame.SiriusFrame.value_changed"]], "value_changed() (siriushla.widgets.label.siriuslabel method)": [[64, "siriushla.widgets.label.SiriusLabel.value_changed"]], "value_changed() (siriushla.widgets.led.pydmled method)": [[64, "siriushla.widgets.led.PyDMLed.value_changed"]], "value_changed() (siriushla.widgets.led.pydmledmultichannel method)": [[64, "siriushla.widgets.led.PyDMLedMultiChannel.value_changed"]], "value_changed() (siriushla.widgets.led.siriusledalert method)": [[64, "siriushla.widgets.led.SiriusLedAlert.value_changed"]], "value_changed() (siriushla.widgets.led.siriusledstate method)": [[64, "siriushla.widgets.led.SiriusLedState.value_changed"]], "value_changed() (siriushla.widgets.line_edit.siriuswaveformlineedit method)": [[64, "siriushla.widgets.line_edit.SiriusWaveformLineEdit.value_changed"]], "value_changed() (siriushla.widgets.log_label.pydmloglabel method)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.value_changed"]], "value_changed() (siriushla.widgets.state_button.pydmstatebutton method)": [[64, "siriushla.widgets.state_button.PyDMStateButton.value_changed"]], "value_changed() (siriushla.widgets.string_combo_box.siriusstringcombobox method)": [[64, "siriushla.widgets.string_combo_box.SiriusStringComboBox.value_changed"]], "value_changed() (siriushla.widgets.waveformtable.siriuswaveformtable method)": [[64, "siriushla.widgets.waveformtable.SiriusWaveformTable.value_changed"]], "value_changed_signal (siriushla.widgets.scrollbar.pydmscrollbar attribute)": [[64, "siriushla.widgets.scrollbar.PyDMScrollBar.value_changed_signal"]], "warncolor (siriushla.widgets.log_label.pydmloglabel attribute)": [[64, "siriushla.widgets.log_label.PyDMLogLabel.warncolor"]], "warning (siriushla.widgets.led.pydmledmultichannel attribute)": [[64, "siriushla.widgets.led.PyDMLedMultiChannel.warning"]], "warning (siriushla.widgets.led.pydmledmulticonnection attribute)": [[64, "siriushla.widgets.led.PyDMLedMultiConnection.warning"]], "waveform (siriushla.widgets.bar_graph.bargraphmodel property)": [[64, "siriushla.widgets.bar_graph.BarGraphModel.waveform"]], "waveform (siriushla.widgets.bar_graph.epicsbargraphmodel property)": [[64, "siriushla.widgets.bar_graph.EpicsBarGraphModel.waveform"]], "waveform (siriushla.widgets.bar_graph.pydmbargraphmodel property)": [[64, "siriushla.widgets.bar_graph.PyDMBarGraphModel.waveform"]], "wheelevent() (siriushla.widgets.enum_combo_box.siriusenumcombobox method)": [[64, "siriushla.widgets.enum_combo_box.SiriusEnumComboBox.wheelEvent"]], "wheelevent() (siriushla.widgets.spinbox.siriusspinbox method)": [[64, "siriushla.widgets.spinbox.SiriusSpinbox.wheelEvent"]], "widget_ctx_menu() (siriushla.widgets.scrollbar.pydmscrollbar method)": [[64, "siriushla.widgets.scrollbar.PyDMScrollBar.widget_ctx_menu"]], "widgets (siriushla.widgets.selection_matrix.selectionmatrixwidget property)": [[64, "siriushla.widgets.selection_matrix.SelectionMatrixWidget.widgets"]], "write_access_signal (siriushla.widgets.signal_channel.siriusconnectionsignal attribute)": [[64, "siriushla.widgets.signal_channel.SiriusConnectionSignal.write_access_signal"]], "writehtml() (siriushla.widgets.log_display.siriuslogdisplay method)": [[64, "siriushla.widgets.log_display.SiriusLogDisplay.writehtml"]], "xaxischannel (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.xAxisChannel"]], "xaxis_value_changed() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.xaxis_value_changed"]], "yaxischannel (siriushla.widgets.spectrogram_view.siriusspectrogramview attribute)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.yAxisChannel"]], "yaxis_connection_state_changed() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.yaxis_connection_state_changed"]], "yaxis_value_changed() (siriushla.widgets.spectrogram_view.siriusspectrogramview method)": [[64, "siriushla.widgets.spectrogram_view.SiriusSpectrogramView.yaxis_value_changed"]], "pslist (class in siriushla.widgets.dialog.ps_status_dialog)": [[65, "siriushla.widgets.dialog.ps_status_dialog.PSList"]], "psstatusdialog (class in siriushla.widgets.dialog.ps_status_dialog)": [[65, "siriushla.widgets.dialog.ps_status_dialog.PSStatusDialog"]], "progressdialog (class in siriushla.widgets.dialog.progress_dialog)": [[65, "siriushla.widgets.dialog.progress_dialog.ProgressDialog"]], "reportdialog (class in siriushla.widgets.dialog.report_dialog)": [[65, "siriushla.widgets.dialog.report_dialog.ReportDialog"]], "statusdetaildialog (class in siriushla.widgets.dialog.pv_status_dialog)": [[65, "siriushla.widgets.dialog.pv_status_dialog.StatusDetailDialog"]], "canceled (siriushla.widgets.dialog.progress_dialog.progressdialog attribute)": [[65, "siriushla.widgets.dialog.progress_dialog.ProgressDialog.canceled"]], "exec_() (siriushla.widgets.dialog.progress_dialog.progressdialog method)": [[65, "siriushla.widgets.dialog.progress_dialog.ProgressDialog.exec_"]], "inc_value() (siriushla.widgets.dialog.progress_dialog.progressdialog method)": [[65, "siriushla.widgets.dialog.progress_dialog.ProgressDialog.inc_value"]], "pwrsupplies (siriushla.widgets.dialog.ps_status_dialog.pslist property)": [[65, "siriushla.widgets.dialog.ps_status_dialog.PSList.pwrsupplies"]], "set_value() (siriushla.widgets.dialog.progress_dialog.progressdialog method)": [[65, "siriushla.widgets.dialog.progress_dialog.ProgressDialog.set_value"]], "siriushla.widgets.dialog": [[65, "module-siriushla.widgets.dialog"]], "siriushla.widgets.dialog.progress_dialog": [[65, "module-siriushla.widgets.dialog.progress_dialog"]], "siriushla.widgets.dialog.ps_status_dialog": [[65, "module-siriushla.widgets.dialog.ps_status_dialog"]], "siriushla.widgets.dialog.pv_status_dialog": [[65, "module-siriushla.widgets.dialog.pv_status_dialog"]], "siriushla.widgets.dialog.report_dialog": [[65, "module-siriushla.widgets.dialog.report_dialog"]]}}) \ No newline at end of file diff --git a/siriushla.as_ap_configdb.html b/siriushla.as_ap_configdb.html new file mode 100644 index 000000000..2348291e9 --- /dev/null +++ b/siriushla.as_ap_configdb.html @@ -0,0 +1,773 @@ + + + + + + + siriushla.as_ap_configdb — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_configdb

+
+

Subpackages

+
+ +
+
+
+

Code Documentation

+
+
+

siriushla.as_ap_configdb.client_configdb module

+

Window to manage configurations.

+
+
+class siriushla.as_ap_configdb.client_configdb.ConfigurationManager(model, parent=None)[source]
+

Bases: _SiriusWindow

+

.

+
+
+CONFIG_TYPE_COL = None
+
+ +
+
+NAME_COL = None
+
+ +
+ +
+
+class siriushla.as_ap_configdb.client_configdb.JsonTreeModel(config_type, name, connection, parent=None)[source]
+

Bases: QAbstractItemModel

+

Model for a tree that represent a JSON document.

+
+
+columnCount(parent)[source]
+

Return index column count.

+
+ +
+
+data(index, role)[source]
+

Return data at index.

+
+ +
+
+flags(index)[source]
+

Read-only.

+
+ +
+
+headerData(section, orientation, role)[source]
+

Return data stored in root item.

+
+ +
+
+index(row, column, parent)[source]
+

Provide and index.

+
+ +
+
+parent(index)[source]
+

Return parent of given index.

+
+ +
+
+rowCount(parent)[source]
+

Return index row count.

+
+ +
+
+setupModelData(config_list)[source]
+

Set model data.

+
+ +
+ +
+
+class siriushla.as_ap_configdb.client_configdb.TreeItem(data, parentItem)[source]
+

Bases: object

+

An item of a tree.

+
+
+appendChild(item)[source]
+

Append a child item.

+
+ +
+
+child(row)[source]
+

Return child at given row.

+
+ +
+
+childCount()[source]
+

Return number of children.

+
+ +
+
+columnCount()[source]
+

Return number of columns of data.

+
+ +
+
+data(column)[source]
+

Return data at given column.

+
+ +
+
+parentItem()[source]
+

Return parent item.

+
+ +
+
+row()[source]
+

Report the item’s location within its parent’s list of items.

+
+ +
+ +
+
+

siriushla.as_ap_configdb.configdialogs module

+

Define a window to save configurations.

+
+
+class siriushla.as_ap_configdb.configdialogs.LoadConfigDialog(config_type, parent=None)[source]
+

Bases: _BaseConfigManipulation

+

Load configurations.

+
+ +
+
+class siriushla.as_ap_configdb.configdialogs.RenameConfigDialog(config_type, parent=None)[source]
+

Bases: SaveConfigDialog

+

Rename configurations.

+
+
+configname
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+class siriushla.as_ap_configdb.configdialogs.SaveConfigDialog(config_type, parent=None)[source]
+

Bases: _BaseConfigManipulation

+

Save configurations.

+
+
+property config_name
+
+ +
+
+configname
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+

siriushla.as_ap_configdb.configwidgets module

+

Load Configuration Widget.

+
+
+class siriushla.as_ap_configdb.configwidgets.ConfigDBInfoHeader(client, parent=None, config_type=None)[source]
+

Bases: QFrame

+
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_ap_configdb.configwidgets.ConfigDBSearchEngine(table, parent=None)[source]
+

Bases: QLineEdit

+
+
+CONFIG_TYPE_COL = 0
+
+ +
+
+NAME_COL = 1
+
+ +
+
+filteredidcs
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+class siriushla.as_ap_configdb.configwidgets.ConfigTableWidget(client, parent=None, config_type=None)[source]
+

Bases: QTableView

+

Widget that loads a configuration.

+
+
+CONFIG_TYPE_COL = 0
+
+ +
+
+NAME_COL = 1
+
+ +
+
+configChanged
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+property config_name
+

Return selected configuration name.

+
+ +
+
+property config_type
+

selected_configConfiguration type name.

+
+ +
+
+connectionError
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+resizeEvent(event)[source]
+

Reimplement resize event.

+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_configdb.models.html b/siriushla.as_ap_configdb.models.html new file mode 100644 index 000000000..a1527f46a --- /dev/null +++ b/siriushla.as_ap_configdb.models.html @@ -0,0 +1,465 @@ + + + + + + + siriushla.as_ap_configdb.models — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_configdb.models

+

Pvs configuration manager models.

+
+

Code Documentation

+
+
+

siriushla.as_ap_configdb.models.config_db_table_model module

+

Configuration database model.

+
+
+class siriushla.as_ap_configdb.models.config_db_table_model.ConfigDbTableModel(config_type, client, discarded=False, parent=None)[source]
+

Bases: QAbstractTableModel

+

Model for configuration database.

+
+
+columnCount(index)[source]
+

Return number of columns.

+
+ +
+
+property config_type
+

Configuration type name.

+
+ +
+
+connectionError
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+data(index, role=0)[source]
+

Return data at index.

+
+ +
+
+flags(index)[source]
+

Override to make cells editable.

+
+ +
+
+headerData(section, orientation, role)[source]
+

Return header.

+
+ +
+
+horizontalHeader = ('config_type', 'name', 'created', 'modified')
+
+ +
+
+removeRow
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+removeRows(row, count=1, index=<PyQt5.QtCore.QModelIndex object>)[source]
+

Updated table.

+
+ +
+
+rowCount(index)[source]
+

Return number of configurations.

+
+ +
+
+setupModelData(config_type, discarded=False)[source]
+

Set model data.

+
+ +
+
+sort(column, order=0)[source]
+

Sort model by column.

+
+ +
+ +
+
+

siriushla.as_ap_configdb.models.config_names_model module

+

Model to get registered configuration names for a given type.

+
+
+class siriushla.as_ap_configdb.models.config_names_model.ConfigNamesModel(connection, parent=None)[source]
+

Bases: QAbstractListModel

+

Model that gets a list of names given a configuration type.

+
+
+columnCount(index)[source]
+

Return number of columns.

+
+ +
+
+property config_type
+

Configuration type.

+
+ +
+
+data(index, role=0)[source]
+

Return data at index.

+
+ +
+
+rowCount(index)[source]
+

Return number of configurations.

+
+ +
+
+setupModelData()[source]
+

Setup model data.

+
+ +
+ +
+
+

siriushla.as_ap_configdb.models.config_types_model module

+

Model to get all config types registered.

+
+
+class siriushla.as_ap_configdb.models.config_types_model.ConfigPVsTypeModel(connection, parent=None)[source]
+

Bases: ConfigTypeModel

+

.

+
+
+setupModelData()[source]
+

Set model data up.

+
+ +
+ +
+
+class siriushla.as_ap_configdb.models.config_types_model.ConfigTypeModel(connection, parent=None)[source]
+

Bases: QAbstractListModel

+

.

+
+
+columnCount(index)[source]
+

Return number of columns.

+
+ +
+
+data(index, role=0)[source]
+

Return data at index.

+
+ +
+
+rowCount(index)[source]
+

Return number of configurations.

+
+ +
+
+setupModelData()[source]
+

Set model data up.

+
+ +
+ +
+
+

siriushla.as_ap_configdb.models.pv_configuration_model module

+

Model that gets the pvs field of configuration type.

+
+
+class siriushla.as_ap_configdb.models.pv_configuration_model.PVConfigurationTableModel(config_type=None, parent=None)[source]
+

Bases: QAbstractTableModel

+

Table model with PVs from a given type of configuration.

+
+
+columnCount(index)[source]
+

Return number of columns.

+
+ +
+
+property config_type
+

Configuration type.

+
+ +
+
+data(index, role=0)[source]
+

Return data at index.

+
+ +
+
+flags(index)[source]
+

Override to make cells editable.

+
+ +
+
+headerData(section, orientation, role)[source]
+

Return header.

+
+ +
+
+property model_data
+

Data.

+
+ +
+
+rowCount(index)[source]
+

Return number of rows.

+
+ +
+
+setData(index, value, role=2)[source]
+

Set data.

+
+ +
+
+setupModelData()[source]
+

Setup model data.

+
+ +
+ +
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_configdb.normconfigs.html b/siriushla.as_ap_configdb.normconfigs.html new file mode 100644 index 000000000..9fc0940b2 --- /dev/null +++ b/siriushla.as_ap_configdb.normconfigs.html @@ -0,0 +1,555 @@ + + + + + + + siriushla.as_ap_configdb.normconfigs — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_configdb.normconfigs

+
+

Code Documentation

+
+
+

siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow module

+

Define a window to manage offline configurations.

+
+
+class siriushla.as_ap_configdb.normconfigs.ConfigManagerWindow.ConfigManagerWindow(config_type, parent=None)[source]
+

Bases: _SiriusWindow

+

Window to manage offline configuration of BO and SI devices.

+

This window allows the user to create new configurations as well as +interpolate or apply a tune or chromaticity delta to a configuration.

+
+
+NEW_CONFIGURATION = 0
+
+ +
+
+closeEvent(event)[source]
+

Close window.

+

The user is warned if there are any unsaved changes.

+
+ +
+
+keyPressEvent(event)[source]
+

Override keyPressEvent.

+

Ctrl+S - Save changes +Ctrl+W - Close configuration on focus +F2 - Rename configuration on focus +Ctrl+Z - Undo +Ctrl+R - Redo

+
+ +
+ +
+
+

siriushla.as_ap_configdb.normconfigs.ConfigModel module

+

Configuration window model definition.

+
+
+class siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigDelegate[source]
+

Bases: QItemDelegate

+

Styling.

+
+
+createEditor(parent, option, index)[source]
+

Override.

+

Create and editor based on the cell type

+
+ +
+
+paint(painter, option, index)[source]
+

Override paint function.

+

Responsible for painting dirt columns and cells.

+
+ +
+
+setEditorData(editor, index)[source]
+

Override.

+

Set cell data as float.

+
+ +
+ +
+
+class siriushla.as_ap_configdb.normconfigs.ConfigModel.ConfigModel(config_type, parent=None)[source]
+

Bases: QAbstractTableModel

+

Model for the configuration table.

+
+
+CHROMATICITY = 1
+
+ +
+
+TUNE = 0
+
+ +
+
+UNDO_MEMORY = 75
+
+ +
+
+cleanUndo(column)[source]
+

Clean undo/redo actions for given column.

+
+ +
+
+closeConfiguration(column)[source]
+

Close a configuration.

+
+ +
+
+columnCount(index=<PyQt5.QtCore.QModelIndex object>)[source]
+

Return the number of configurations currently open.

+
+ +
+
+property configurations
+

Return list of open configurations.

+
+ +
+
+data(index, role=0)[source]
+

Set data of the table (override).

+
+ +
+
+deleteConfiguration(config_info)[source]
+

Delete configuration from database.

+
+ +
+
+deriveConfiguration(config_name, base_column, func, parameters)[source]
+

Create new configuration from existing one TUNE or CHROMATICITY.

+
+ +
+
+flags(index)[source]
+

Override to make cells editable.

+
+ +
+
+getConfigurationColumn(config_name)[source]
+

Return column number of the given configuration.

+
+ +
+
+getConfigurations(deleted=False)[source]
+

Return name of saved configurations.

+
+ +
+
+getTuneMatrix()[source]
+

Get tune matrix from db.

+
+ +
+
+headerData(section, orientation, role=0)[source]
+

Set headers of the table (override).

+
+ +
+
+insertColumn(column, index=<PyQt5.QtCore.QModelIndex object>)[source]
+

Update table widget telling it a new column was inserted.

+
+ +
+
+interpolateConfiguration(config_name, column1, column2)[source]
+

Linear interpolation of 2 configurations.

+
+ +
+
+loadConfiguration(name=None, values=None)[source]
+

Load configuration from database.

+
+ +
+
+removeColumns(column, count=1, index=<PyQt5.QtCore.QModelIndex object>)[source]
+

Update table widget telling it a column was removed.

+
+ +
+
+renameConfiguration(column, new_name)[source]
+

Change configuration name.

+
+ +
+
+rowCount(index=<PyQt5.QtCore.QModelIndex object>)[source]
+

Return the number of PVs for this configuration type.

+
+ +
+
+saveConfiguration(column)[source]
+

Save configuration if it is dirty.

+
+ +
+
+setData(index, value, role=2)[source]
+

Set cell data.

+
+ +
+
+setDataAlt(row, config_name, value, old_value, redo=True)[source]
+

Called by the undo/redo methods to change data on table.

+
+ +
+ +
+
+class siriushla.as_ap_configdb.normconfigs.ConfigModel.Configuration(name, config_type, values, new=True)[source]
+

Bases: object

+

Represents a configuration.

+
+
+delete()[source]
+

Delete configuration.

+
+ +
+
+static delete_config(config_type, name)[source]
+

Delete configuration.

+
+ +
+
+property dirty
+

Return wether thre is unsaved data.

+
+ +
+
+static loadConfiguration(config_type, name)[source]
+

Load existing configuration.

+
+ +
+
+property name
+

Configuration name.

+
+ +
+
+static newConfiguration(name, config_type, values)[source]
+

Create new configuration.

+
+ +
+
+property old_name
+

Configuration name in database.

+
+ +
+
+save()[source]
+

Save data.

+
+ +
+
+setValue(pv_name, value)[source]
+

Set value of a given pv.

+
+ +
+
+property values
+

PV values.

+
+ +
+ +
+
+

siriushla.as_ap_configdb.normconfigs.LoadingThread module

+
+
+class siriushla.as_ap_configdb.normconfigs.LoadingThread.LoadingThread(name, pv_list, parent=None)[source]
+

Bases: QThread

+
+
+VACA_PREFIX = ''
+
+ +
+
+run(self)[source]
+
+ +
+
+taskFinished
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+taskUpdated
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+

siriushla.as_ap_configdb.normconfigs.TuneDlg module

+
+
+class siriushla.as_ap_configdb.normconfigs.TuneDlg.TuneDlg(parent=None)[source]
+

Bases: QDialog

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_configdb.pvsconfigs.delegate.html b/siriushla.as_ap_configdb.pvsconfigs.delegate.html new file mode 100644 index 000000000..b08fb3ed8 --- /dev/null +++ b/siriushla.as_ap_configdb.pvsconfigs.delegate.html @@ -0,0 +1,224 @@ + + + + + + + siriushla.as_ap_configdb.pvsconfigs.delegate — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_configdb.pvsconfigs.delegate

+
+

Code Documentation

+
+
+

siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate module

+

Configuration Delegate.

+
+
+class siriushla.as_ap_configdb.pvsconfigs.delegate.pv_configuration_delegate.PVConfigurationDelegate[source]
+

Bases: QItemDelegate

+
+
+createEditor(parent, option, index)[source]
+

Override.

+

Create and editor based on the cell type

+
+ +
+
+setEditorData(editor, index)[source]
+

Override.

+

Set cell data as float.

+
+ +
+ +
+
+

Module contents

+

Delegate module.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_configdb.pvsconfigs.html b/siriushla.as_ap_configdb.pvsconfigs.html new file mode 100644 index 000000000..f997b7507 --- /dev/null +++ b/siriushla.as_ap_configdb.pvsconfigs.html @@ -0,0 +1,348 @@ + + + + + + + siriushla.as_ap_configdb.pvsconfigs — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_configdb.pvsconfigs

+
+

Subpackages

+ +
+
+

Code Documentation

+
+
+

siriushla.as_ap_configdb.pvsconfigs.load_and_apply module

+

Set configuration window.

+
+
+class siriushla.as_ap_configdb.pvsconfigs.load_and_apply.LoadAndApplyConfig2MachineWindow(client, wrapper=<class 'siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper'>, parent=None)[source]
+

Bases: _SiriusWindow

+

Configuration Window to set configration via epics.

+
+ +
+
+class siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectAndApplyPVsWidget(parent, client, wrapper=<class 'siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper'>)[source]
+

Bases: QWidget

+

Select and Apply PVs widget.

+
+
+property current_config
+

Current config data.

+
+ +
+
+property current_config_type
+

Current config type.

+
+ +
+
+fill_config(config_type, config_name)[source]
+

Fill config data.

+
+ +
+
+settingFinished
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+setupui()[source]
+

Setup widget.

+
+ +
+ +
+
+class siriushla.as_ap_configdb.pvsconfigs.load_and_apply.SelectConfigWidget(parent, client)[source]
+

Bases: QWidget

+

Select config Widget.

+
+
+configChanged
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+property current_config_type
+

Current config type.

+
+ +
+
+setupui()[source]
+

Setup widget.

+
+ +
+ +
+
+

siriushla.as_ap_configdb.pvsconfigs.main module

+

PVs Config Main Module.

+
+
+class siriushla.as_ap_configdb.pvsconfigs.main.PVsConfigManager(parent=None, url=None)[source]
+

Bases: _SiriusWindow

+

Window to manage configuration.

+
+ +
+
+

siriushla.as_ap_configdb.pvsconfigs.read_and_save module

+

Read configuration window.

+
+
+class siriushla.as_ap_configdb.pvsconfigs.read_and_save.ReadAndSaveConfig2ServerWindow(client, wrapper=<class 'siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper'>, parent=None)[source]
+

Bases: _SiriusWindow

+

Read configuration window.

+
+ +
+
+

Module contents

+

PVS configuration manager package init.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_currinfo.html b/siriushla.as_ap_currinfo.html new file mode 100644 index 000000000..577da2059 --- /dev/null +++ b/siriushla.as_ap_currinfo.html @@ -0,0 +1,225 @@ + + + + + + + siriushla.as_ap_currinfo — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_currinfo

+
+

Code Documentation

+
+
+

siriushla.as_ap_currinfo.charge_monitor module

+

Charge Monitor.

+
+
+class siriushla.as_ap_currinfo.charge_monitor.BOMonitor(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: _SiriusWindow

+

BO charges monitor.

+
+ +
+
+

siriushla.as_ap_currinfo.current_and_lifetime module

+

Current and Lifetime Window.

+
+
+class siriushla.as_ap_currinfo.current_and_lifetime.CurrLTWindow(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: _SiriusWindow

+

Current and Lifetime Window.

+
+ +
+
+

siriushla.as_ap_currinfo.efficiency_monitor module

+

Efficiency Monitor.

+
+
+class siriushla.as_ap_currinfo.efficiency_monitor.EfficiencyMonitor(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: _SiriusWindow

+

Efficiency monitor.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_energybutton.html b/siriushla.as_ap_energybutton.html new file mode 100644 index 000000000..3e8826275 --- /dev/null +++ b/siriushla.as_ap_energybutton.html @@ -0,0 +1,244 @@ + + + + + + + siriushla.as_ap_energybutton — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_energybutton

+
+

Code Documentation

+
+
+

siriushla.as_ap_energybutton.energy_button module

+

Interface to set dipole energies with constant normalization.

+
+
+class siriushla.as_ap_energybutton.energy_button.EnergyButton(section, parent=None)[source]
+

Bases: QWidget

+

Set dipole energy.

+
+
+property lower_limit
+
+ +
+
+property section
+
+ +
+
+property upper_limit
+
+ +
+ +
+
+

siriushla.as_ap_energybutton.energy_setter_window module

+

Main window.

+
+
+class siriushla.as_ap_energybutton.energy_setter_window.EnergySetterWindow(parent=None)[source]
+

Bases: _SiriusWindow

+

.

+
+ +
+
+

siriushla.as_ap_energybutton.set_energy module

+

.

+
+
+siriushla.as_ap_energybutton.set_energy.init_section(section)[source]
+

.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_injcontrol.html b/siriushla.as_ap_injcontrol.html new file mode 100644 index 000000000..f62ec5dfb --- /dev/null +++ b/siriushla.as_ap_injcontrol.html @@ -0,0 +1,233 @@ + + + + + + + siriushla.as_ap_injcontrol — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_injcontrol

+
+

Code Documentation

+
+
+

siriushla.as_ap_injcontrol.base module

+
+
+class siriushla.as_ap_injcontrol.base.BaseWindow(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: _SiriusWindow

+

Base class.

+
+ +
+
+

siriushla.as_ap_injcontrol.injbo module

+

Booster Injection Control HLA module.

+
+
+class siriushla.as_ap_injcontrol.injbo.InjBOControlWindow(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: BaseWindow

+

Booster Injection Control HLA.

+
+ +
+
+

siriushla.as_ap_injcontrol.tbts module

+

HLA TB and TS AP Control Window.

+
+
+class siriushla.as_ap_injcontrol.tbts.TLControlWindow(parent=None, prefix=siriuspy.envars.VACA_PREFIX, tl=None)[source]
+

Bases: BaseWindow

+

Class to create the main window for TB and TS HLA.

+
+
+keyPressEvent(event)[source]
+

Override keyPressEvent.

+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_injection.html b/siriushla.as_ap_injection.html new file mode 100644 index 000000000..bc1cd4037 --- /dev/null +++ b/siriushla.as_ap_injection.html @@ -0,0 +1,434 @@ + + + + + + + siriushla.as_ap_injection — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_injection

+
+

Code Documentation

+
+
+

siriushla.as_ap_injection.auxiliary_dialogs module

+

Auxiliary Dialogs.

+
+
+class siriushla.as_ap_injection.auxiliary_dialogs.BiasFBDetailDialog(parent=None, device='', prefix='')[source]
+

Bases: _SiriusWindow

+

Bias FB detail dialog.

+
+ +
+
+class siriushla.as_ap_injection.auxiliary_dialogs.PUModeSettingsDialog(parent=None, device='', prefix='')[source]
+

Bases: _SiriusWindow

+

PU Mode settings dialog.

+
+ +
+
+class siriushla.as_ap_injection.auxiliary_dialogs.TopUpSettingsDialog(parent=None, device='', prefix='')[source]
+

Bases: _SiriusWindow

+

Top up settings dialog.

+
+ +
+
+

siriushla.as_ap_injection.killbeam_widgets module

+

RF Kill Beam widgets.

+
+
+class siriushla.as_ap_injection.killbeam_widgets.RFKillBeamButton(parent=None, prefix='')[source]
+

Bases: PyDMPushButton

+

Button to kill beam with RF.

+
+ +
+
+

siriushla.as_ap_injection.main module

+

InjCtrl MainWindow.

+
+
+class siriushla.as_ap_injection.main.InjCtrlWindow(parent=None, prefix='')[source]
+

Bases: _SiriusWindow

+

InjCtrl Main Window.

+
+
+changeEvent(event)[source]
+

Implement changeEvent.

+
+ +
+
+mouseDoubleClickEvent(event)[source]
+

Implement mouseDoubleClickEvent.

+
+ +
+
+showEgun
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+showMonitor
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+showStatus
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+

siriushla.as_ap_injection.widgets module

+

Monitoring widgets.

+
+
+class siriushla.as_ap_injection.widgets.ClockLabel(parent=None)[source]
+

Bases: QLabel

+

Clock label.

+
+ +
+
+class siriushla.as_ap_injection.widgets.InjDiagLed(parent, prefix=siriuspy.envars.VACA_PREFIX, **kws)[source]
+

Bases: SiriusLedAlert

+

InjDiag Status Led.

+
+
+mouseDoubleClickEvent(event)[source]
+

Reimplement mouseDoubleClickEvent.

+
+ +
+ +
+
+class siriushla.as_ap_injection.widgets.InjSysStbyControlWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, is_summary=False, handler=None)[source]
+

Bases: QWidget

+

Injection System Control Widget.

+
+
+contextMenuEvent(event)[source]
+

Show a custom context menu.

+
+ +
+
+expand
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+class siriushla.as_ap_injection.widgets.InjSysStbyLed(parent=None, handler=None)[source]
+

Bases: PyDMLedMultiChannel

+

Led to check whether several PVs are in stanby state.

+
+
+mouseDoubleClickEvent(self, a0: QMouseEvent | None)[source]
+
+ +
+ +
+
+class siriushla.as_ap_injection.widgets.MonitorSummaryWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: QWidget

+

Monitor Summary widget.

+
+ +
+
+class siriushla.as_ap_injection.widgets.TaskStatusLabel(parent=None, init_channel=None)[source]
+

Bases: QPushButton

+

Label to show if task is running.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_launcher.html b/siriushla.as_ap_launcher.html new file mode 100644 index 000000000..b8d4ab689 --- /dev/null +++ b/siriushla.as_ap_launcher.html @@ -0,0 +1,304 @@ + + + + + + + siriushla.as_ap_launcher — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_launcher

+
+

Code Documentation

+
+
+

siriushla.as_ap_launcher.main module

+

Interface to handle main operation commands.

+
+
+class siriushla.as_ap_launcher.main.MainLauncher(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: _SiriusWindow

+

Main Launcher.

+
+
+changeEvent(event)[source]
+

Implement changeEvent.

+
+ +
+
+mouseDoubleClickEvent(event)[source]
+

Implement mouseDoubleClickEvent.

+
+ +
+
+showEgun
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+showMonitor
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+showStatus
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+

siriushla.as_ap_launcher.menu module

+

Mock application launcher.

+
+
+siriushla.as_ap_launcher.menu.get_object(ismenubar=True, parent=None)[source]
+

.

+
+ +
+
+siriushla.as_ap_launcher.menu.get_pushbutton(name, parent)[source]
+

.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_machshift.html b/siriushla.as_ap_machshift.html new file mode 100644 index 000000000..02c04412a --- /dev/null +++ b/siriushla.as_ap_machshift.html @@ -0,0 +1,195 @@ + + + + + + + siriushla.as_ap_machshift — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_machshift

+
+

Code Documentation

+
+
+

siriushla.as_ap_machshift.widgets module

+

MachShift widgets.

+
+
+class siriushla.as_ap_machshift.widgets.MachShiftLabel(parent=None, prefix='')[source]
+

Bases: QWidget

+

Machine Shift Label.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_macreport.html b/siriushla.as_ap_macreport.html new file mode 100644 index 000000000..7e7040201 --- /dev/null +++ b/siriushla.as_ap_macreport.html @@ -0,0 +1,274 @@ + + + + + + + siriushla.as_ap_macreport — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_macreport

+
+

Code Documentation

+
+
+

siriushla.as_ap_macreport.main module

+

Machine reports.

+
+
+class siriushla.as_ap_macreport.main.LbData(*args, **kwargs)[source]
+

Bases: QLabel

+

Data label.

+
+ +
+
+class siriushla.as_ap_macreport.main.LbHHeader(*args, **kwargs)[source]
+

Bases: QLabel

+

Horizontal Header label.

+
+ +
+
+class siriushla.as_ap_macreport.main.LbVHeader(*args, **kwargs)[source]
+

Bases: QLabel

+

Vertical Header label.

+
+ +
+
+class siriushla.as_ap_macreport.main.MacReportWindow(parent=None)[source]
+

Bases: _SiriusWindow

+

Machine Report Window.

+
+ +
+
+class siriushla.as_ap_macreport.main.UpdateTask(macreport, parent=None)[source]
+

Bases: QThread

+

Update task.

+
+
+exit_task()[source]
+

Set flag to quit thread.

+
+ +
+
+run()[source]
+

Run task.

+
+ +
+
+update(message)[source]
+

Send log.

+
+ +
+
+updated
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_magoffconv.html b/siriushla.as_ap_magoffconv.html new file mode 100644 index 000000000..1718670b9 --- /dev/null +++ b/siriushla.as_ap_magoffconv.html @@ -0,0 +1,195 @@ + + + + + + + siriushla.as_ap_magoffconv — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_magoffconv

+
+

Code Documentation

+
+
+

siriushla.as_ap_magoffconv.main module

+

Normalizer interface module.

+
+
+class siriushla.as_ap_magoffconv.main.MagOffConvApp(parent=None)[source]
+

Bases: _SiriusWindow

+

Offline converter interface.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_measure.html b/siriushla.as_ap_measure.html new file mode 100644 index 000000000..9255806de --- /dev/null +++ b/siriushla.as_ap_measure.html @@ -0,0 +1,213 @@ + + + + + + + siriushla.as_ap_measure — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_measure

+
+

Code Documentation

+
+
+

siriushla.as_ap_measure.emittance_meas module

+
+
+

siriushla.as_ap_measure.energy_meas module

+
+
+class siriushla.as_ap_measure.energy_meas.EnergyMeasure(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: QWidget

+

.

+
+
+nrpoints_edited()[source]
+
+ +
+
+pb_reset_data_clicked()[source]
+

Reset buffers.

+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_monitor.html b/siriushla.as_ap_monitor.html new file mode 100644 index 000000000..46f1f7e5b --- /dev/null +++ b/siriushla.as_ap_monitor.html @@ -0,0 +1,214 @@ + + + + + + + siriushla.as_ap_monitor — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_monitor

+
+

Code Documentation

+
+
+

siriushla.as_ap_monitor.main module

+

Sirius Monitor.

+
+
+class siriushla.as_ap_monitor.main.SiriusMonitor(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: QWidget

+

Sirius Monitor.

+
+ +
+
+

siriushla.as_ap_monitor.util module

+

Util module.

+
+
+siriushla.as_ap_monitor.util.get_label2devices(sec)[source]
+
+ +
+
+siriushla.as_ap_monitor.util.get_sec2dev_laypos(sec, label)[source]
+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_opticscorr.html b/siriushla.as_ap_opticscorr.html new file mode 100644 index 000000000..9122b8980 --- /dev/null +++ b/siriushla.as_ap_opticscorr.html @@ -0,0 +1,248 @@ + + + + + + + siriushla.as_ap_opticscorr — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_opticscorr

+
+

Code Documentation

+
+
+

siriushla.as_ap_opticscorr.custom_widgets module

+
+
+class siriushla.as_ap_opticscorr.custom_widgets.ConfigLineEdit(parent=None, init_channel=None)[source]
+

Bases: PyDMLineEdit

+
+
+mouseReleaseEvent(_)[source]
+

Reimplement mouse release event.

+
+ +
+ +
+
+class siriushla.as_ap_opticscorr.custom_widgets.StatusLed(parent=None, init_channel='', labels=[])[source]
+

Bases: SiriusLedAlert

+
+
+mouseDoubleClickEvent(self, a0: QMouseEvent | None)[source]
+
+ +
+ +
+
+

siriushla.as_ap_opticscorr.details module

+

OpticsCorr details module.

+
+
+class siriushla.as_ap_opticscorr.details.CorrParamsDetailWindow(acc, opticsparam, fams, parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: _SiriusWindow

+

Correction parameters detail window.

+
+ +
+
+

siriushla.as_ap_opticscorr.main module

+

OpticsCorr main module.

+
+
+class siriushla.as_ap_opticscorr.main.OpticsCorrWindow(acc, opticsparam, parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: _SiriusWindow

+

Class to include some intelligence in the .ui files.

+
+ +
+
+

Module contents

+

Optics Correction HLA Module.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_posang.html b/siriushla.as_ap_posang.html new file mode 100644 index 000000000..8236d8d40 --- /dev/null +++ b/siriushla.as_ap_posang.html @@ -0,0 +1,203 @@ + + + + + + + siriushla.as_ap_posang — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_posang

+
+

Code Documentation

+
+
+

siriushla.as_ap_posang.HLPosAng module

+

HLA as_ap_posang module.

+
+
+class siriushla.as_ap_posang.HLPosAng.CorrParamsDetailWindow(tl, parent=None, prefix=None)[source]
+

Bases: _SiriusWindow

+

Correction parameters detail window.

+
+ +
+
+class siriushla.as_ap_posang.HLPosAng.PosAngCorr(parent=None, prefix='', tl=None)[source]
+

Bases: _SiriusWindow

+

Main Class.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_rabpmmon.html b/siriushla.as_ap_rabpmmon.html new file mode 100644 index 000000000..10f7f8bce --- /dev/null +++ b/siriushla.as_ap_rabpmmon.html @@ -0,0 +1,193 @@ + + + + + + + siriushla.as_ap_rabpmmon — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_rabpmmon

+
+

Code Documentation

+
+
+

siriushla.as_ap_rabpmmon.custom_widgets module

+
+
+

siriushla.as_ap_rabpmmon.main module

+
+
+

siriushla.as_ap_rabpmmon.util module

+

RaBPM monitor utilities.

+
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_radmon.html b/siriushla.as_ap_radmon.html new file mode 100644 index 000000000..f16e6feac --- /dev/null +++ b/siriushla.as_ap_radmon.html @@ -0,0 +1,223 @@ + + + + + + + siriushla.as_ap_radmon — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_radmon

+
+

Code Documentation

+
+
+

siriushla.as_ap_radmon.main module

+

Rad Monitor.

+
+
+class siriushla.as_ap_radmon.main.RadTotDoseMonitor(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: QWidget

+

RAD Total Dose Rate Monitor.

+
+
+REF_TOT_DOSE = 0.5
+
+ +
+
+SENSOR2LOC = {'Berthold': 'Berthold (corredor de serviço, eixo 19)', 'ELSE': 'ELSE (SI-01, hall eixo 17)', 'Thermo1': 'Thermo 1 (SI-10, hall eixo 43)', 'Thermo10': 'Thermo 10 (SI-01, chicane 1)', 'Thermo11': 'Thermo 11 (SI-20, hall eixo 14)', 'Thermo12': 'Thermo 12 (SI-01, hall eixo 16)', 'Thermo13': 'Thermo 13 (SI-06, hall eixo 31)', 'Thermo14': 'Thermo 14 (SI-14, hall eixo 55)', 'Thermo15': 'Thermo 15 (SI-12, hall eixo 50)', 'Thermo16': 'Thermo 16 (SI-08, hall eixo 38)', 'Thermo2': 'Thermo 2 (SI-09-IA-09, eixo 40)', 'Thermo3': 'Thermo 3 (SI-17, hall eixo 04)', 'Thermo4': 'Thermo 4 (SI-14-IA-14, eixo 57)', 'Thermo5': 'Thermo 5 (SI-19, hall eixo 10)', 'Thermo6': 'Thermo 6 (SI-15, hall eixo 59)', 'Thermo7': 'Thermo 7 (SI-08-IA-08, eixo 37)', 'Thermo8': 'Thermo 8 (SI-01, hall eixo 18)', 'Thermo9': 'Thermo 9 (SI-02, hall eixo 20)'}
+
+ +
+
+changeEvent(event)[source]
+

Implement change event to get font size changes.

+
+ +
+
+contextMenuEvent(event)[source]
+

Implement context menu to add auxiliary actions.

+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_sofb.graphics.html b/siriushla.as_ap_sofb.graphics.html new file mode 100644 index 000000000..682010a6a --- /dev/null +++ b/siriushla.as_ap_sofb.graphics.html @@ -0,0 +1,957 @@ + + + + + + + siriushla.as_ap_sofb.graphics — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_sofb.graphics

+
+

Code Documentation

+
+
+

siriushla.as_ap_sofb.graphics.base module

+

Control the Orbit Graphic Displnay.

+
+
+class siriushla.as_ap_sofb.graphics.base.BaseWidget(parent, device, ctrls, names, is_orb, prefix='', acc='SI')[source]
+

Bases: QWidget

+

.

+
+
+DEFAULT_DIR = '/home/sirius/shared/screens-iocs'
+
+ +
+
+property acc
+

.

+
+ +
+
+property acc_idx
+

.

+
+ +
+
+channels()[source]
+

.

+
+ +
+
+connect_signals()[source]
+

.

+
+ +
+
+property isring
+

.

+
+ +
+
+setupui()[source]
+

.

+
+ +
+
+uicreate_combobox(parent, orb_tp, idx)[source]
+

.

+
+ +
+
+uicreate_groupbox(idx)[source]
+

.

+
+ +
+
+uicreate_label(lab, parent)[source]
+

.

+
+ +
+
+uigetgraph(pln, size)[source]
+

.

+
+ +
+ +
+
+class siriushla.as_ap_sofb.graphics.base.Graph(*args, **kwargs)[source]
+

Bases: SiriusWaveformPlot

+

.

+
+
+doubleclick
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+mouseDoubleClickEvent(ev)[source]
+

.

+
+ +
+ +
+
+class siriushla.as_ap_sofb.graphics.base.InfLine(conv=1, pos=None, **kwargs)[source]
+

Bases: InfiniteLine

+

.

+
+
+setValue(value)[source]
+

.

+
+ +
+ +
+
+class siriushla.as_ap_sofb.graphics.base.Label(unit, *args, **kwargs)[source]
+

Bases: QLabel

+

.

+
+
+FMT = '{0:.2f}'
+
+ +
+
+setFloat(val)[source]
+

.

+
+ +
+ +
+
+class siriushla.as_ap_sofb.graphics.base.UpdateGraph(ctrls, is_orb, acc='SI')[source]
+

Bases: QObject

+

Worker to update graphics.

+
+
+UNIT = 1e-06
+
+ +
+
+ave_mstdx
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+ave_mstdy
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+ave_pstdx
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+ave_pstdy
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+avex
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+avey
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+data_sigx
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+data_sigy
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+p2px
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+p2py
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+ref_sigx
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+ref_sigy
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+set_enbl_list(pln, enbls)[source]
+

.

+
+ +
+
+set_visible(boo)[source]
+

.

+
+ +
+
+some_changed(orb_tp, text)[source]
+

.

+
+ +
+
+stdx
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+stdy
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+update_graphic(pln=None)[source]
+

.

+
+ +
+ +
+
+

siriushla.as_ap_sofb.graphics.correctors module

+

Control the Correctors Graphic Displnay.

+
+
+class siriushla.as_ap_sofb.graphics.correctors.CorrectorsWidget(parent, device, prefix='', ctrls={}, acc='SI')[source]
+

Bases: BaseWidget

+
+
+add_RF_kicks()[source]
+
+ +
+
+add_kicklimits_curves()[source]
+
+ +
+
+channels()[source]
+

.

+
+ +
+
+static get_default_ctrls(device, prefix='')[source]
+
+ +
+ +
+
+

siriushla.as_ap_sofb.graphics.orbit module

+

Control the Orbit Graphic Displnay.

+
+
+class siriushla.as_ap_sofb.graphics.orbit.MultiTurnSumWidget(parent, device, prefix='', orbtype='sum', csorb=None)[source]
+

Bases: QWidget

+

.

+
+
+mouseDoubleClickEvent(ev)[source]
+

.

+
+ +
+
+ratio_sum_avg
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+ratio_sum_std
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+setupui()[source]
+

.

+
+ +
+
+update_graph(data)[source]
+

.

+
+ +
+ +
+
+class siriushla.as_ap_sofb.graphics.orbit.MultiTurnWidget(parent, sigs, device, prefix, csorb)[source]
+

Bases: QWidget

+

.

+
+
+hideEvent(_)[source]
+

.

+
+ +
+
+setreforbits(pln, orb)[source]
+

.

+
+ +
+
+setupui()[source]
+

.

+
+ +
+
+showEvent(_)[source]
+

.

+
+ +
+ +
+
+class siriushla.as_ap_sofb.graphics.orbit.OrbitWidget(parent, device, prefix='', ctrls=None, acc='SI')[source]
+

Bases: BaseWidget

+

.

+
+
+add_buttons_for_images()[source]
+

.

+
+ +
+
+channels()[source]
+

.

+
+ +
+
+static get_default_ctrls(device, prefix='', acc='SI')[source]
+

.

+
+ +
+ +
+
+class siriushla.as_ap_sofb.graphics.orbit.SinglePassSumWidget(parent, device, csorb, prefix='')[source]
+

Bases: QWidget

+

.

+
+
+setupui()[source]
+

.

+
+ +
+ +
+
+class siriushla.as_ap_sofb.graphics.orbit.Spectrogram(device, prefix='', **kwargs)[source]
+

Bases: SiriusSpectrogramView

+

.

+
+
+channels()[source]
+

.

+
+ +
+
+mouseDoubleClickEvent(ev)[source]
+

.

+
+ +
+
+new_data_sig
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+process_image(img)[source]
+

.

+
+ +
+
+setreforbit(orb)[source]
+

.

+
+ +
+ +
+
+

siriushla.as_ap_sofb.graphics.respmat module

+

Control the Orbit Graphic Display.

+
+
+class siriushla.as_ap_sofb.graphics.respmat.ShowMatrixWidget(parent, device, acc, prefix='')[source]
+

Bases: QWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_ap_sofb.graphics.respmat.SingularValues(parent, device, prefix='')[source]
+

Bases: QWidget

+
+
+setValue(line, value)[source]
+
+ +
+
+setupui()[source]
+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_sofb.html b/siriushla.as_ap_sofb.html new file mode 100644 index 000000000..c825dc02e --- /dev/null +++ b/siriushla.as_ap_sofb.html @@ -0,0 +1,622 @@ + + + + + + + siriushla.as_ap_sofb — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_sofb

+
+

Subpackages

+
+ +
+
+
+

Code Documentation

+
+
+

siriushla.as_ap_sofb.main module

+

Main module of the Application Interface.

+
+
+class siriushla.as_ap_sofb.main.MainWindow(parent=None, prefix='', acc='SI')[source]
+

Bases: _SiriusWindow

+
+
+property acc
+
+ +
+
+property acc_idx
+
+ +
+
+property isring
+
+ +
+
+setupui()[source]
+
+ +
+ +
+
+

siriushla.as_ap_sofb.orbit_register module

+

Creates the Contextes Menus for the Register.

+
+
+class siriushla.as_ap_sofb.orbit_register.OrbitRegister(parent, device, orbits, idx, prefix='', acc='SI')[source]
+

Bases: QWidget

+

Create the Context Menu for the Registers.

+
+
+DEFAULT_DIR = '/home/sirius/shared/screens-iocs'
+
+ +
+
+MAX_BUMP_CURR = 10
+
+ +
+
+getorbx()[source]
+

Return the horizontal orbit.

+
+ +
+
+getorby()[source]
+

Return the Vertical orbit.

+
+ +
+
+new_orbx_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+new_orby_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+new_string_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+property orbx
+

Return the horizontal orbit.

+
+ +
+
+property orby
+

Return the Vertical orbit.

+
+ +
+
+setup_ui()[source]
+

Set up Ui of Context Menu.

+
+ +
+ +
+
+class siriushla.as_ap_sofb.orbit_register.OrbitRegisters(parent, device, prefix='', acc=None, nr_registers=9)[source]
+

Bases: QWidget

+

.

+
+
+channels()[source]
+

.

+
+ +
+
+get_registers_control()[source]
+

.

+
+ +
+
+setupui()[source]
+

.

+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ap_sofb.ioc_control.html b/siriushla.as_ap_sofb.ioc_control.html new file mode 100644 index 000000000..6e3232feb --- /dev/null +++ b/siriushla.as_ap_sofb.ioc_control.html @@ -0,0 +1,624 @@ + + + + + + + siriushla.as_ap_sofb.ioc_control — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ap_sofb.ioc_control

+
+

Code Documentation

+
+
+

siriushla.as_ap_sofb.ioc_control.base module

+

Define Controllers for the orbits displayed in the graphic.

+
+
+class siriushla.as_ap_sofb.ioc_control.base.BaseCombo(parent, ctrls, setpoint=None, readback=None, acc='SI')[source]
+

Bases: QComboBox, PyDMPrimitiveWidget

+

.

+
+
+property acc
+

.

+
+ +
+
+property acc_idx
+

.

+
+ +
+
+channels()[source]
+

.

+
+ +
+
+configname
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+connect_signals()[source]
+

.

+
+ +
+
+ioc_orbit_changed(pln, orb)[source]
+

.

+
+ +
+
+property isring
+

.

+
+ +
+
+setup_ui(add_items=None)[source]
+

.

+
+ +
+ +
+
+class siriushla.as_ap_sofb.ioc_control.base.BaseObject(device, prefix='', acc='SI')[source]
+

Bases: object

+

Base object.

+
+
+property acc
+

Accelerator.

+
+ +
+
+property acc_idx
+

Accelerator index.

+
+ +
+
+property isring
+

Whether accelerator is a ring.

+
+ +
+ +
+
+class siriushla.as_ap_sofb.ioc_control.base.BaseWidget(parent, device, prefix='', acc='SI')[source]
+

Bases: BaseObject, QWidget

+

Base widget.

+
+
+create_pair(parent, pvname, device=None, is_vert=False, rules=None)[source]
+

.

+
+ +
+
+create_pair_butled(parent, pvname, device=None, is_vert=False, rules=None)[source]
+

.

+
+ +
+
+create_pair_sel(parent, pvname, device=None, is_vert=False, rules=None)[source]
+

.

+
+ +
+ +
+
+

siriushla.as_ap_sofb.ioc_control.drive_window module

+

Define Controllers for the orbits displayed in the graphic.

+
+
+class siriushla.as_ap_sofb.ioc_control.drive_window.DriveControl(parent, device, prefix='', acc='SI')[source]
+

Bases: BaseWidget

+

.

+
+
+setupui()[source]
+

.

+
+ +
+ +
+
+

siriushla.as_ap_sofb.ioc_control.kicks_config module

+

Define Controllers for the orbits displayed in the graphic.

+
+
+class siriushla.as_ap_sofb.ioc_control.kicks_config.KicksConfigWidget(parent, device, prefix='', acc='SI')[source]
+

Bases: BaseWidget

+
+
+get_details_widget(parent)[source]
+

.

+
+ +
+
+get_status_widget(parent)[source]
+

.

+
+ +
+
+setupui()[source]
+
+ +
+ +
+
+

siriushla.as_ap_sofb.ioc_control.main module

+

Define Controllers for the orbits displayed in the graphic.

+
+
+class siriushla.as_ap_sofb.ioc_control.main.PerformanceWidget(parent, device, prefix='')[source]
+

Bases: QWidget

+

.

+
+ +
+
+class siriushla.as_ap_sofb.ioc_control.main.RefControl(parent, device, ctrls, prefix='', acc='SI')[source]
+

Bases: BaseCombo

+

.

+
+
+setup_ui()[source]
+

.

+
+ +
+ +
+
+class siriushla.as_ap_sofb.ioc_control.main.SOFBControl(parent, device, ctrls, prefix='', acc='SI')[source]
+

Bases: BaseWidget

+

.

+
+
+get_auto_correction_widget(parent)[source]
+

.

+
+ +
+
+get_correction_widget(parent)[source]
+

.

+
+ +
+
+get_fofb_widget(parent)[source]
+

.

+
+ +
+
+get_main_widget(parent)[source]
+

.

+
+ +
+
+get_manual_correction_widget(parent)[source]
+

.

+
+ +
+
+get_orbit_widget(parent)[source]
+

.

+
+ +
+
+setupui()[source]
+

.

+
+ +
+ +
+
+

siriushla.as_ap_sofb.ioc_control.orbit_acquisition module

+

Define Controllers for the orbits displayed in the graphic.

+
+
+class siriushla.as_ap_sofb.ioc_control.orbit_acquisition.AcqControlWidget(parent, device, prefix='', acc='SI')[source]
+

Bases: BaseWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+

siriushla.as_ap_sofb.ioc_control.respmat module

+

Define Controllers for the orbits displayed in the graphic.

+
+
+class siriushla.as_ap_sofb.ioc_control.respmat.RespMatWidget(parent, device, prefix='', acc='SI')[source]
+

Bases: BaseWidget

+
+
+DEFAULT_DIR = '/home/runner'
+
+ +
+
+get_main_widget(parent)[source]
+
+ +
+
+get_measurement_widget(parent)[source]
+

.

+
+ +
+
+get_saveload_widget(parent)[source]
+

.

+
+ +
+
+get_selection_lists_widget(parent)[source]
+

.

+
+ +
+
+get_singular_values_widget(parent)[source]
+

.

+
+ +
+
+setupui()[source]
+

.

+
+ +
+ +
+
+

siriushla.as_ap_sofb.ioc_control.respmat_enbllist module

+

Create the Selection Matrices for BPMs and Correctors.

+
+
+class siriushla.as_ap_sofb.ioc_control.respmat_enbllist.SelectionMatrix(parent, device, prefix='', acc='SI', rules=None)[source]
+

Bases: BaseWidget

+
+ +
+
+class siriushla.as_ap_sofb.ioc_control.respmat_enbllist.SingleSelMatrix(parent, dev, device, prefix='', acc='SI', rules=None)[source]
+

Bases: BaseObject, SelectionMatrixWidget, PyDMWidget

+

Create the Selection Matrices for BPMs and Correctors.

+
+
+connection_changed(new_conn)[source]
+

Callback invoked when the connection state of the Channel is changed. +This callback acts on the connection state to enable/disable the widget +and also trigger the change on alarm severity to ALARM_DISCONNECTED.

+
+
Parameters:
+

connected (int) – When this value is 0 the channel is disconnected, 1 otherwise.

+
+
+
+ +
+
+get_headers()[source]
+

Should be implemented in class derivation.

+
+
Returns:
+

    +
  • top_headers (tuple or list) – A list of strings for top headers of the selection matrix widget.

  • +
  • side_headers (tuple or list) – A list of strings for side headers of the selection matrix widget.

  • +
+

+
+
+
+ +
+
+get_positions()[source]
+

Should be implemented in class derivation.

+
+
Returns:
+

positions – A tuple or list of layout positions for each widget +returned by get_widgets.

+
+
Return type:
+

tuple or list

+
+
+
+ +
+
+get_widgets()[source]
+

Should be implemented in class derivation.

+
+
Returns:
+

widgets – A tuple or list of widgets to be put in matrix.

+
+
Return type:
+

tuple or list

+
+
+
+ +
+
+send_value(other=False)[source]
+
+ +
+
+sizeHint()[source]
+

Return the base size of the widget.

+
+ +
+
+value_changed(new_val)[source]
+

Callback invoked when the Channel value is changed.

+
+
Parameters:
+

new_val (str, int, float, bool or np.ndarray) – The new value from the channel. The type depends on the channel.

+
+
+
+ +
+ +
+
+

siriushla.as_ap_sofb.ioc_control.status module

+

Define Controllers for the orbits displayed in the graphic.

+
+
+class siriushla.as_ap_sofb.ioc_control.status.StatusWidget(parent, device, prefix='', acc='SI', is_orb=False)[source]
+

Bases: BaseWidget

+
+
+creategroupbox()[source]
+
+ +
+
+setupui()[source]
+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_di_bpms.html b/siriushla.as_di_bpms.html new file mode 100644 index 000000000..6c61051c2 --- /dev/null +++ b/siriushla.as_di_bpms.html @@ -0,0 +1,614 @@ + + + + + + + siriushla.as_di_bpms — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_di_bpms

+
+

Code Documentation

+
+
+

siriushla.as_di_bpms.base module

+

Base module.

+
+
+class siriushla.as_di_bpms.base.BaseGraph(parent=None, prefix='', bpm='', data_prefix='')[source]
+

Bases: BaseWidget

+
+
+CLASS
+

alias of MyWidget

+
+ +
+
+DATA_CLASS
+

alias of ndarray

+
+ +
+
+curveAtIndex(*args)[source]
+
+ +
+
+setLabel(*args, **kwargs)[source]
+
+ +
+
+setupgraph(graph)[source]
+
+ +
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_di_bpms.base.BaseWidget(parent=None, prefix='', bpm='', data_prefix='')[source]
+

Bases: QWidget

+
+
+basic_rule(channel, flag, val=0)[source]
+
+ +
+
+channels()[source]
+
+ +
+
+get_pvname(propty, is_data=True)[source]
+
+ +
+ +
+
+class siriushla.as_di_bpms.base.GraphTime(*args, **kwargs)[source]
+

Bases: BaseGraph

+
+
+CLASS
+

alias of MyWidget

+
+ +
+
+DATA_CLASS
+

alias of float

+
+ +
+
+addYChannel(**opts)[source]
+
+ +
+ +
+
+class siriushla.as_di_bpms.base.GraphWave(parent=None, prefix='', bpm='', data_prefix='')[source]
+

Bases: BaseGraph

+
+
+addChannel(**opts)[source]
+
+ +
+ +
+
+siriushla.as_di_bpms.base.get_custom_widget_class(CLASS)[source]
+
+ +
+
+

siriushla.as_di_bpms.list_bpms module

+
+
+class siriushla.as_di_bpms.list_bpms.AcqDataSummary(parent=None, prefix='', bpm_list=[], mode='pos')[source]
+

Bases: BaseWidget

+
+
+create_graph(wid, bpm, typ='pos')[source]
+
+ +
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_di_bpms.list_bpms.BPMSummary(parent=None, prefix='', bpm='')[source]
+

Bases: BaseWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_di_bpms.list_bpms.SelectBPMs(parent=None, prefix='', bpm_list=[])[source]
+

Bases: BaseWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+

siriushla.as_di_bpms.main module

+
+
+class siriushla.as_di_bpms.main.BPMMain(parent=None, prefix='', bpm='')[source]
+

Bases: BaseWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+

siriushla.as_di_bpms.monit module

+
+
+class siriushla.as_di_bpms.monit.MonitData(parent=None, prefix='', bpm='')[source]
+

Bases: BaseWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+

siriushla.as_di_bpms.settings module

+

BPM Settings.

+
+
+class siriushla.as_di_bpms.settings.BPMAdvancedSettings(parent=None, prefix='', bpm='')[source]
+

Bases: BaseWidget

+
+
+static get_acqrate_props(rate)[source]
+
+ +
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_di_bpms.settings.BPMHardwareSettings(parent=None, prefix='', bpm='')[source]
+

Bases: BaseWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_di_bpms.settings.PBPMHardwareSettings(parent=None, prefix='', bpm='')[source]
+

Bases: BaseWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_di_bpms.settings.ParamsSettings(parent=None, prefix='', bpm='')[source]
+

Bases: BaseWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_di_bpms.settings.PolySettings(parent=None, prefix='', bpm='')[source]
+

Bases: BaseWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_di_bpms.settings.RFFEAdvancedSettings(parent=None, prefix='', bpm='')[source]
+

Bases: BaseWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_di_bpms.settings.TriggersLauncherWidget(parent=None, prefix='', bpm='', acqcores=['ACQ', 'PM'])[source]
+

Bases: BaseWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+

siriushla.as_di_bpms.trig_acq_config module

+
+
+class siriushla.as_di_bpms.trig_acq_config.BPMBaseTriggeredAcquisition(parent=None, prefix='', bpm='')[source]
+

Bases: AcqBaseWindow, BaseWidget

+

BPM Base Triggered Acquisition window.

+
+ +
+
+class siriushla.as_di_bpms.trig_acq_config.BPMGENAcquisition(parent=None, prefix='', bpm='')[source]
+

Bases: BPMBaseTriggeredAcquisition

+

BPM General Triggered Acquisition window

+
+
+ACQCORE = 'GEN'
+
+ +
+ +
+
+class siriushla.as_di_bpms.trig_acq_config.BPMPMAcquisition(parent=None, prefix='', bpm='')[source]
+

Bases: BPMBaseTriggeredAcquisition

+

BPM Post Mortem Triggered Acquisition window

+
+
+ACQCORE = 'PM'
+
+ +
+ +
+
+class siriushla.as_di_bpms.trig_acq_config.PBPMBaseTriggeredAcquisition(parent=None, prefix='', bpm='')[source]
+

Bases: AcqBaseWindow

+

Photon BPM Base Triggered Acquisition window.

+
+ +
+
+class siriushla.as_di_bpms.trig_acq_config.PBPMGENAcquisition(parent=None, prefix='', bpm='')[source]
+

Bases: PBPMBaseTriggeredAcquisition

+

PBPM General Triggered Acquisition window

+
+
+ACQCORE = 'GEN'
+
+ +
+ +
+
+class siriushla.as_di_bpms.trig_acq_config.PBPMPMAcquisition(parent=None, prefix='', bpm='')[source]
+

Bases: PBPMBaseTriggeredAcquisition

+

PBPM Post Mortem Triggered Acquisition window

+
+
+ACQCORE = 'PM'
+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_di_dccts.html b/siriushla.as_di_dccts.html new file mode 100644 index 000000000..07718055b --- /dev/null +++ b/siriushla.as_di_dccts.html @@ -0,0 +1,306 @@ + + + + + + + siriushla.as_di_dccts — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_di_dccts

+
+

Code Documentation

+
+
+

siriushla.as_di_dccts.graphics module

+

DCCT graphics module.

+
+
+class siriushla.as_di_dccts.graphics.DCCTMonitor(parent=None, prefix='', device='')[source]
+

Bases: QWidget

+

DCCT data monitoring.

+
+
+resetRawBuffer()[source]
+

Reset smoothing buffer.

+
+ +
+
+setRawDownsampling(new_value)[source]
+

Update number of samples to use in downsampling.

+
+ +
+
+setRawSmoothMethod(new_method)[source]
+

Update method to perform raw readings smoothing.

+
+ +
+
+setRawSmoothNrAcq(new_value)[source]
+

Update number of samples to use in smoothing.

+
+ +
+
+property smoothBufferSize
+

Smoothing buffer length.

+
+ +
+
+updateParams(new_value)[source]
+

Handle control visualization according to mode.

+
+ +
+
+updateRawXAxis()[source]
+

Update X axis of waveform graph.

+
+ +
+ +
+
+class siriushla.as_di_dccts.graphics.EffMonitor(parent=None, prefix='', section='')[source]
+

Bases: QWidget

+

Efficiency Graph.

+
+ +
+
+

siriushla.as_di_dccts.main module

+

DCCT Monitor Windows.

+
+
+class siriushla.as_di_dccts.main.DCCTMain(parent=None, prefix='', device='')[source]
+

Bases: _SiriusWindow

+

DCCT Main Window.

+
+ +
+
+class siriushla.as_di_dccts.main.SISelectDCCT(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: QWidget

+

Select Screens.

+
+ +
+
+siriushla.as_di_dccts.main.get_dcct_list(sec)[source]
+
+ +
+
+

siriushla.as_di_dccts.settings module

+

DCCT settings module.

+
+
+class siriushla.as_di_dccts.settings.DCCTSettings(parent=None, prefix='', device='')[source]
+

Bases: QWidget

+

DCCT Settings Main Widget.

+
+ +
+
+class siriushla.as_di_dccts.settings.DCCTSettingsDetails(parent=None, prefix='', device='')[source]
+

Bases: QWidget

+

DCCT Settings Details Widget.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_di_icts.html b/siriushla.as_di_icts.html new file mode 100644 index 000000000..c5f36f1f3 --- /dev/null +++ b/siriushla.as_di_icts.html @@ -0,0 +1,203 @@ + + + + + + + siriushla.as_di_icts — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_di_icts

+
+

Code Documentation

+
+
+

siriushla.as_di_icts.ICT_monitor module

+

HLA TB and TS ICT monitoring Window.

+
+
+class siriushla.as_di_icts.ICT_monitor.ICTMonitoring(tl, parent=None, prefix=None)[source]
+

Bases: _SiriusWindow

+

Class to create ICTs History Monitor Window.

+
+ +
+
+class siriushla.as_di_icts.ICT_monitor.ICTSummary(parent=None, prefix=siriuspy.envars.VACA_PREFIX, tl='')[source]
+

Bases: QWidget

+

ICT Monitor Summary.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_di_scrns.html b/siriushla.as_di_scrns.html new file mode 100644 index 000000000..51ee6b58e --- /dev/null +++ b/siriushla.as_di_scrns.html @@ -0,0 +1,306 @@ + + + + + + + siriushla.as_di_scrns — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_di_scrns

+
+

Code Documentation

+
+
+

siriushla.as_di_scrns.list_scrns module

+

Screens list.

+
+
+class siriushla.as_di_scrns.list_scrns.ScrnSummary(parent=None, prefix=siriuspy.envars.VACA_PREFIX, scrn='')[source]
+

Bases: QWidget

+

Screen Summary.

+
+ +
+
+class siriushla.as_di_scrns.list_scrns.SelectScrns(parent=None, prefix=siriuspy.envars.VACA_PREFIX, sec='')[source]
+

Bases: QWidget

+

Select Screens.

+
+ +
+
+siriushla.as_di_scrns.list_scrns.get_scrn_list(sec)[source]
+
+ +
+
+

siriushla.as_di_scrns.main module

+

SiriusScrnView widget.

+
+
+class siriushla.as_di_scrns.main.IndividualScrn(parent=None, prefix=siriuspy.envars.VACA_PREFIX, scrn='')[source]
+

Bases: QWidget

+

Individual Screen.

+
+ +
+
+class siriushla.as_di_scrns.main.SiriusScrnView(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device=None)[source]
+

Bases: QWidget

+

Class to read Sirius screen cameras image data.

+

To allow saving a grid correctly, control calibrationgrid_flag, which +indicates if the screen is in calibration grid position. +You can control it by using the method/Slot updateCalibrationGridFlag.

+
+
+property calibrationgrid_flag
+

Indicate if the screen device is in calibration grid position.

+
+ +
+
+save_files
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+updateCalibrationGridFlag(new_state)[source]
+

Update calibrationgrid_flag property.

+
+ +
+ +
+
+

siriushla.as_di_scrns.scrn_calib module

+

SiriusScrnView widget.

+
+
+class siriushla.as_di_scrns.scrn_calib.ScrnCalibrationSettings(parent=None, device=None, prefix=None)[source]
+

Bases: _SiriusWindow

+

Scrn Calibration Settings Dialog.

+
+ +
+
+

siriushla.as_di_scrns.scrn_details module

+

SiriusScrnView widget.

+
+
+class siriushla.as_di_scrns.scrn_details.ScrnSettingsDetails(parent=None, device=None, prefix=None)[source]
+

Bases: _SiriusWindow

+

Scrn Settings Details Window.

+
+ +
+
+

Module contents

+

HLA to control Sirius Screens.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_di_tune.html b/siriushla.as_di_tune.html new file mode 100644 index 000000000..756894256 --- /dev/null +++ b/siriushla.as_di_tune.html @@ -0,0 +1,521 @@ + + + + + + + siriushla.as_di_tune — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_di_tune

+
+

Code Documentation

+
+
+

siriushla.as_di_tune.controls module

+
+
+class siriushla.as_di_tune.controls.SITuneMonitor(parent=None, prefix='', description='long', use_color_labels=True)[source]
+

Bases: QWidget

+
+
+changeEvent(self, a0: QEvent | None)[source]
+
+ +
+ +
+
+class siriushla.as_di_tune.controls.TuneControls(parent=None, prefix='', section='', orientation='H', background=None)[source]
+

Bases: QWidget

+

Tune Controls.

+
+ +
+
+

siriushla.as_di_tune.details module

+
+
+class siriushla.as_di_tune.details.SITuneMarkerDetails(parent=None, prefix='', orientation='', index=1, isdelta=False, background=None)[source]
+

Bases: _SiriusWindow

+

SI Tune Marker Details.

+
+ +
+
+class siriushla.as_di_tune.details.TuneDetails(parent=None, prefix='', section='', orientation='H', background=None)[source]
+

Bases: _SiriusWindow

+

Tune Details.

+
+ +
+
+

siriushla.as_di_tune.main module

+
+
+class siriushla.as_di_tune.main.Tune(parent=None, prefix=siriuspy.envars.VACA_PREFIX, section='')[source]
+

Bases: _SiriusWindow

+

Tune Window.

+
+ +
+
+

siriushla.as_di_tune.spectra module

+
+
+class siriushla.as_di_tune.spectra.TuneSpectraControls(parent=None, prefix='', section='')[source]
+

Bases: QWidget

+

Tune Spectra Controls.

+
+ +
+
+class siriushla.as_di_tune.spectra.TuneSpectraView(parent=None, prefix='', section='')[source]
+

Bases: SiriusWaveformPlot

+

Tune Spectra View.

+
+
+receiveDataH(data)[source]
+

Update curve H.

+
+ +
+
+receiveDataV(data)[source]
+

Update curve V.

+
+ +
+
+showTuneH(show)[source]
+

Whether to show or not curve of Tune H.

+
+ +
+
+showTuneV(show)[source]
+

Whether to show or not curve of Tune V.

+
+ +
+
+toggleXChannel()[source]
+

Toggle X channel between FreqArray and TuneFracArray.

+
+ +
+ +
+
+

siriushla.as_di_tune.spectrogram module

+
+
+class siriushla.as_di_tune.spectrogram.BOTuneSpectrogram(parent=None, prefix='', orientation='H', background='w')[source]
+

Bases: SiriusSpectrogramView

+

BO Tune Spectrogram View.

+
+
+buffer_curr_size
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+buffer_data_size
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+buffer_size_changed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+getDataIndex()[source]
+

Return index of the spectrogram to send in new_data signal.

+
+ +
+
+idx2send_changed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+image_value_changed(new_image)[source]
+

Reimplement image_value_changed slot.

+
+ +
+
+mouseDoubleClickEvent(self, event: QMouseEvent | None)[source]
+
+ +
+
+new_data
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+process_image(image)[source]
+

Process data.

+
+ +
+
+resetBuffer()[source]
+

Reset buffer.

+
+ +
+
+setBufferSize(new_size)[source]
+

Set number of averages, or, buffer size.

+
+ +
+
+setIndex2Send(new_idx)[source]
+

Set index of the spectrogram to send in new_data signal.

+
+ +
+
+toggleXChannel()[source]
+

Toggle X channel between FreqArray and TuneFracArray.

+
+ +
+ +
+
+class siriushla.as_di_tune.spectrogram.BOTuneSpectrogramControls(parent=None, prefix='', orientation='H', title='', background='w')[source]
+

Bases: QWidget

+

Booster Tune Spectrogram Controls.

+
+
+update_buffsize()[source]
+
+ +
+
+update_idx2plot(value=None)[source]
+
+ +
+ +
+
+

siriushla.as_di_tune.util module

+
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_di_vlight.html b/siriushla.as_di_vlight.html new file mode 100644 index 000000000..97656d616 --- /dev/null +++ b/siriushla.as_di_vlight.html @@ -0,0 +1,201 @@ + + + + + + + siriushla.as_di_vlight — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_di_vlight

+
+

Code Documentation

+
+
+

siriushla.as_di_vlight.main module

+

VLightCam Widget.

+
+
+class siriushla.as_di_vlight.main.VLightCamView(parent=None, prefix=siriuspy.envars.VACA_PREFIX, section='')[source]
+

Bases: QWidget

+

VLight Cam Viewer.

+
+ +
+
+siriushla.as_di_vlight.main.conv_sec_2_device(sec)[source]
+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ps_commands.html b/siriushla.as_ps_commands.html new file mode 100644 index 000000000..69b2563a6 --- /dev/null +++ b/siriushla.as_ps_commands.html @@ -0,0 +1,880 @@ + + + + + + + siriushla.as_ps_commands — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ps_commands

+
+

Code Documentation

+
+
+

siriushla.as_ps_commands.main module

+

Window to test power supplies.

+
+
+class siriushla.as_ps_commands.main.PSCmdWindow(parent=None)[source]
+

Bases: _SiriusWindow

+

PS commands window.

+
+
+keyPressEvent(evt)[source]
+

Implement keyPressEvent.

+
+ +
+ +
+
+

siriushla.as_ps_commands.tasks module

+

.

+
+
+class siriushla.as_ps_commands.tasks.BaseTask(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: QThread

+

Base Task.

+
+
+completed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+currentItem
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+exit_task()[source]
+

Set quit flag.

+
+ +
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+
+itemDone
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+run()[source]
+

Run task.

+
+ +
+
+size()[source]
+

Task size.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckCapBankVolt(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Check capacitor bank voltage.

+
+
+function()[source]
+

Check DCLink Capacitor Bank Voltage.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckComm(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Check communication status.

+
+
+function()[source]
+

Check communication status.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckCtrlLoop(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Check PS CtrlLoop.

+
+
+function()[source]
+

Check PS CtrlLoop.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckCurrent(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Check current value.

+
+
+function()[source]
+

Check PS Current.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckIDFFMode(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Check PS IDFFMode.

+
+
+function()[source]
+

Check PS IDFFMode.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckInitOk(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Check if PS initialized.

+
+
+function()[source]
+

Check PS initialized.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckIntlk(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Check Interlocks.

+
+
+function()[source]
+

Check interlocks.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckOpMode(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Check PS OpMode.

+
+
+function()[source]
+

Check PS OpMode.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckPulse(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Check PU Pulse.

+
+
+function()[source]
+

Check PU Pulse.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckPwrState(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Check PS PwrState.

+
+
+function()[source]
+

Check PS PwrState.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckSOFBMode(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Check PS SOFBMode.

+
+
+function()[source]
+

Check PS SOFBMode.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckStatus(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Check Status.

+
+
+function()[source]
+

Check status.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckTriggerState(parent=None, restore_initial_value=False, dis='PS', state='on', devices=None)[source]
+

Bases: TriggerTask

+

Check magnet trigger state.

+
+
+function()[source]
+

Function to implement.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CheckVoltage(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Check voltage value.

+
+
+function()[source]
+

Check PU Voltage.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.CreateTesters(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Create Testers.

+
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.ResetIntlk(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Reset Interlocks.

+
+
+function()[source]
+

Reset.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.SetCapBankVolt(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Set capacitor bank voltage.

+
+
+function()[source]
+

Set DCLink Capacitor Bank Voltage.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.SetCtrlLoop(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Set PS CtrlLoop.

+
+
+function()[source]
+

Set PS CtrlLoop.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.SetCurrent(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Set current value.

+
+
+function()[source]
+

Set PS Current.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.SetIDFFMode(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Set PS IDFFMode.

+
+
+function()[source]
+

Set PS IDFFMode.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.SetOpMode(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Set PS OpMode.

+
+
+function()[source]
+

Set PS OpMode.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.SetPulse(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Set PU Pulse.

+
+
+function()[source]
+

Set PU Pulse.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.SetPwrState(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Set PS PwrState.

+
+
+function()[source]
+

Set PS PwrState.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.SetSOFBMode(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Set PS SOFBMode.

+
+
+function()[source]
+

Set PS SOFBMode.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.SetTriggerState(parent=None, restore_initial_value=False, dis='PS', state='on', devices=None)[source]
+

Bases: TriggerTask

+

Set magnet trigger state.

+
+
+function()[source]
+

Function to implement.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.SetVoltage(devices, state=None, is_test=False, value=None, parent=None)[source]
+

Bases: BaseTask

+

Set voltage value.

+
+
+function()[source]
+

Set PU Voltage.

+
+ +
+ +
+
+class siriushla.as_ps_commands.tasks.TriggerTask(parent=None, restore_initial_value=False, dis='PS', state='on', devices=None)[source]
+

Bases: QThread

+

Base task to handle triggers.

+
+
+completed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+currentItem
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+exit_task()[source]
+

Set quit flag.

+
+ +
+
+function()[source]
+

Function to implement.

+
+ +
+
+initial_triggers_state = {}
+
+ +
+
+itemDone
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+run()[source]
+

Run task.

+
+ +
+
+size()[source]
+

Task size.

+
+ +
+ +
+
+

Module contents

+

HLA to Handle Power Supplies Tests.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ps_control.control_widget.html b/siriushla.as_ps_control.control_widget.html new file mode 100644 index 000000000..a3e10b9a7 --- /dev/null +++ b/siriushla.as_ps_control.control_widget.html @@ -0,0 +1,545 @@ + + + + + + + siriushla.as_ps_control.control_widget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ps_control.control_widget

+
+

Code Documentation

+
+
+

siriushla.as_ps_control.control_widget.BasePSControlWidget module

+

Base class for controlling a power supply.

+
+
+class siriushla.as_ps_control.control_widget.BasePSControlWidget.BasePSControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: QWidget

+

Base widget class to control power supply.

+
+
+HORIZONTAL = 0
+
+ +
+
+VERTICAL = 1
+
+ +
+
+contextMenuEvent(event)[source]
+

Show a custom context menu.

+
+ +
+
+get_summary_widgets()[source]
+

Return Summary Widgets.

+
+ +
+
+show_connections(checked)[source]
+

.

+
+ +
+ +
+
+class siriushla.as_ps_control.control_widget.BasePSControlWidget.PSContainer(widget, parent=None)[source]
+

Bases: QWidget

+

PSContainer.

+
+
+contextMenuEvent(event)[source]
+

Overload to create a custom context menu.

+
+ +
+
+show_connections(checked)[source]
+

.

+
+ +
+
+update_visible_props(new_value)[source]
+
+ +
+ +
+
+

siriushla.as_ps_control.control_widget.ControlWidgetFactory module

+

Define factory class to get a control widget.

+
+
+class siriushla.as_ps_control.control_widget.ControlWidgetFactory.ControlWidgetFactory[source]
+

Bases: object

+

Return a control widget.

+
+
+static factory(parent, section, device, subsection=None, orientation=0)[source]
+
+ +
+ +
+
+

siriushla.as_ps_control.control_widget.DipoleControlWidget module

+

Widgets to control Dipoles.

+
+
+class siriushla.as_ps_control.control_widget.DipoleControlWidget.BODipoleControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Class to control Dipole power supplies.

+
+ +
+
+class siriushla.as_ps_control.control_widget.DipoleControlWidget.LISpectControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Class to control Dipole power supplies.

+
+ +
+
+class siriushla.as_ps_control.control_widget.DipoleControlWidget.SIDipoleControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Class to control Dipole power supplies.

+
+ +
+
+class siriushla.as_ps_control.control_widget.DipoleControlWidget.TBDipoleControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Class to control Dipole power supplies.

+
+ +
+
+class siriushla.as_ps_control.control_widget.DipoleControlWidget.TSDipoleControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Class to control Dipole power supplies.

+
+ +
+
+

siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget module

+

Widgets to control Fam Quadrupoles magnets.

+
+
+class siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget.BOFamQuadrupoleControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: SIFamQuadrupoleControlWidget

+

Class to control all Fam Quad from the Booster section.

+
+ +
+
+class siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget.LIQuadrupoleControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Class to control all quads from the LI section.

+
+ +
+
+class siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget.SIFamQuadrupoleControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Class to control all Fam Quad from the Sirius section.

+
+ +
+
+class siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget.TBQuadrupoleControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Class to control all quads from the TB transport line.

+
+ +
+
+class siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget.TSQuadrupoleControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Class to control all quads from the TB transport line.

+
+ +
+
+siriushla.as_ps_control.control_widget.FamQuadrupoleControlWidget.run_test(psname_list=None)[source]
+

Run test application.

+
+ +
+
+

siriushla.as_ps_control.control_widget.FamSextupoleControlWidget module

+

Define control widget for family sextupoles.

+
+
+class siriushla.as_ps_control.control_widget.FamSextupoleControlWidget.BOFamSextupoleControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: SIFamSextupoleControlWidget

+

Booster sextupoles.

+
+ +
+
+class siriushla.as_ps_control.control_widget.FamSextupoleControlWidget.SIFamSextupoleControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Storage ring sextupoles.

+
+ +
+
+siriushla.as_ps_control.control_widget.FamSextupoleControlWidget.run_test(psname_list=None)[source]
+

Run test application.

+
+ +
+
+

siriushla.as_ps_control.control_widget.FastCorrectorControlWidget module

+

Define control widget for fast correctors.

+
+
+class siriushla.as_ps_control.control_widget.FastCorrectorControlWidget.SIFastCorrectorControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Storage ring fast correctors.

+
+ +
+
+

siriushla.as_ps_control.control_widget.IDFFCorrectorControlWidget module

+

Define widget for controlling idff correctors.

+
+
+class siriushla.as_ps_control.control_widget.IDFFCorrectorControlWidget.IDFFCorrectorControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

IDFF corrector control widget.

+
+ +
+
+

siriushla.as_ps_control.control_widget.LensControlWidget module

+

Define widget for controlling slow correctors.

+
+
+class siriushla.as_ps_control.control_widget.LensControlWidget.ITLensControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Injector Test Lens control widget.

+
+ +
+
+class siriushla.as_ps_control.control_widget.LensControlWidget.LILensControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Linac Lens control widget.

+
+ +
+
+

siriushla.as_ps_control.control_widget.SeptFFCorrectorControlWidget module

+

Define control widget for fast correctors.

+
+
+class siriushla.as_ps_control.control_widget.SeptFFCorrectorControlWidget.SISeptFFCorrectorControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Storage ring fast correctors.

+
+ +
+
+

siriushla.as_ps_control.control_widget.SkewQuadControlWidget module

+

Sked Quadrupole control widgets.

+
+
+class siriushla.as_ps_control.control_widget.SkewQuadControlWidget.BOSkewQuadControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: SISkewQuadControlWidget

+

Booster skew quads.

+
+ +
+
+class siriushla.as_ps_control.control_widget.SkewQuadControlWidget.SISkewQuadControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Storage ring skew quads.

+
+ +
+
+siriushla.as_ps_control.control_widget.SkewQuadControlWidget.run_test(psname_list=None)[source]
+

Run test application.

+
+ +
+
+

siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget module

+

Define widget for controlling slow correctors.

+
+
+class siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget.BoSlowCorrectorControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: SISlowCorrectorControlWidget

+

Booster slow corretors.

+
+ +
+
+class siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget.LISlowCorrectorControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: SISlowCorrectorControlWidget

+

To booster transport line slow corrector.

+
+ +
+
+class siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget.SISlowCorrectorControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Storage ring slow correctors.

+
+ +
+
+class siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget.TBSlowCorrectorControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: SISlowCorrectorControlWidget

+

To booster transport line slow corrector.

+
+ +
+
+class siriushla.as_ps_control.control_widget.SlowCorrectorControlWidget.TSSlowCorrectorControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: SISlowCorrectorControlWidget

+

To sirius transport line slow correctors.

+
+ +
+
+

siriushla.as_ps_control.control_widget.SolenoidControlWidget module

+

Define widget for controlling slow correctors.

+
+
+class siriushla.as_ps_control.control_widget.SolenoidControlWidget.LISolenoidControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Storage ring slow correctors.

+
+ +
+
+

siriushla.as_ps_control.control_widget.TrimAllControlWidget module

+

Widgets to control Trim Quadrupoles magnets.

+
+
+class siriushla.as_ps_control.control_widget.TrimAllControlWidget.SITrimAllControlWidget(subsection=None, orientation=0, parent=None)[source]
+

Bases: BasePSControlWidget

+

Class to control a Fam Quad from the Sirius section.

+
+ +
+
+

siriushla.as_ps_control.control_widget.TrimFamControlWidget module

+

Widgets to control Trim Quadrupoles magnets.

+
+
+class siriushla.as_ps_control.control_widget.TrimFamControlWidget.SITrimFamControlWidget(trim, **kwargs)[source]
+

Bases: BasePSControlWidget

+

Class to control a Fam Quad from the Sirius section.

+
+ +
+
+

Module contents

+

Control widgets for power supplies.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ps_control.detail_widget.html b/siriushla.as_ps_control.detail_widget.html new file mode 100644 index 000000000..619fb185a --- /dev/null +++ b/siriushla.as_ps_control.detail_widget.html @@ -0,0 +1,439 @@ + + + + + + + siriushla.as_ps_control.detail_widget — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ps_control.detail_widget

+
+

Code Documentation

+
+
+

siriushla.as_ps_control.detail_widget.DetailWidgetFactory module

+

This module defines a factory to get a detailed window.

+
+
+class siriushla.as_ps_control.detail_widget.DetailWidgetFactory.DetailWidgetFactory[source]
+

Bases: object

+

Return a detail widget.

+
+
+static factory(psname, parent=None, psmodel=None, pstype=None)[source]
+

Return a DetailWidget.

+
+ +
+ +
+
+

siriushla.as_ps_control.detail_widget.InterlockWindow module

+

Magnet Interlock widget.

+
+
+class siriushla.as_ps_control.detail_widget.InterlockWindow.InterlockListWidget(parent=None, devname='', interlock='', labels=None)[source]
+

Bases: QWidget

+

Widget with interlock information.

+
+ +
+
+class siriushla.as_ps_control.detail_widget.InterlockWindow.InterlockWidget(parent=None, init_channel='', bit=-1, label='')[source]
+

Bases: QWidget

+

InterlockWidget class.

+
+ +
+
+class siriushla.as_ps_control.detail_widget.InterlockWindow.InterlockWindow(parent=None, devname='', database=None, interlock=None, auxdev=None, auxdev2mod=None)[source]
+

Bases: _SiriusWindow

+

InterlockWindow class.

+
+ +
+
+class siriushla.as_ps_control.detail_widget.InterlockWindow.LIInterlockWindow(parent=None, devname='')[source]
+

Bases: _SiriusWindow

+

LIInterlockWindow class.

+
+
+BIT_MAPS = {'IntlkSignalIn-Mon': {}, 'IntlkSignalOut-Mon': {}, 'IntlkWarn-Mon': {}}
+
+ +
+
+COLOR_MAPS = {'IntlkRdSignalInMask-Mon': {'off': <PyQt5.QtGui.QColor object>, 'on': <PyQt5.QtGui.QColor object>}, 'IntlkRdSignalOutMask-Mon': {'off': <PyQt5.QtGui.QColor object>, 'on': <PyQt5.QtGui.QColor object>}, 'IntlkSignalIn-Mon': {'off': <PyQt5.QtGui.QColor object>, 'on': <PyQt5.QtGui.QColor object>}, 'IntlkSignalOut-Mon': {'off': <PyQt5.QtGui.QColor object>, 'on': <PyQt5.QtGui.QColor object>}, 'IntlkWarn-Mon': {'off': <PyQt5.QtGui.QColor object>, 'on': <PyQt5.QtGui.QColor object>}}
+
+ +
+ +
+
+

siriushla.as_ps_control.detail_widget.PSDetailWidget module

+

PS Detail Widget.

+
+
+class siriushla.as_ps_control.detail_widget.PSDetailWidget.CustomLabel(parent=None, init_channel=None, keep_unit=False, **kws)[source]
+

Bases: SiriusLabel

+
+
+value_changed(new_value)[source]
+

Callback invoked when the Channel value is changed. +Sets the value of new_value accordingly at the Label.

+
+
Parameters:
+

new_value (str, int, float, bool or np.ndarray) – The new value from the channel. The type depends on the channel.

+
+
+
+ +
+ +
+
+class siriushla.as_ps_control.detail_widget.PSDetailWidget.DCLinkDetailWidget(psname, parent=None, psmodel=None, pstype=None)[source]
+

Bases: PSDetailWidget

+
+ +
+
+class siriushla.as_ps_control.detail_widget.PSDetailWidget.FACDCLinkDetailWidget(psname, parent=None)[source]
+

Bases: DCLinkDetailWidget

+
+ +
+
+class siriushla.as_ps_control.detail_widget.PSDetailWidget.FBPDCLinkDetailWidget(psname, parent=None)[source]
+

Bases: DCLinkDetailWidget

+
+ +
+
+class siriushla.as_ps_control.detail_widget.PSDetailWidget.FastCorrPSDetailWidget(psname, parent=None)[source]
+

Bases: _BaseDetailWidget

+
+ +
+
+class siriushla.as_ps_control.detail_widget.PSDetailWidget.LIPSDetailWidget(psname, parent=None)[source]
+

Bases: _BaseDetailWidget

+

.

+
+ +
+
+class siriushla.as_ps_control.detail_widget.PSDetailWidget.PSAuxMeasWidget(parent, psname, auxmeas, mod2dbase, auxdev, auxdev2mod)[source]
+

Bases: _SiriusWindow

+

PS Modules Detail Widget.

+
+ +
+
+class siriushla.as_ps_control.detail_widget.PSDetailWidget.PSDetailWidget(psname, parent=None, psmodel=None, pstype=None)[source]
+

Bases: _BaseDetailWidget

+

Widget with control interface for a given magnet.

+
+
+AuxDev2ModDict = {'BO-Fam:PS-B-1': {'A': '1', 'B': '2'}, 'BO-Fam:PS-B-1a': {'A': '3', 'B': '4'}, 'BO-Fam:PS-B-1b': {'A': '5', 'B': '6'}, 'BO-Fam:PS-B-1c': {'A': '7', 'B': '8'}, 'BO-Fam:PS-B-2': {'A': '1', 'B': '2'}, 'BO-Fam:PS-B-2a': {'A': '3', 'B': '4'}, 'BO-Fam:PS-B-2b': {'A': '5', 'B': '6'}, 'BO-Fam:PS-B-2c': {'A': '7', 'B': '8'}}
+
+ +
+
+BasicParams = ['Version-Cte', 'Properties-Cte', 'Reset-Cmd', 'Abort-Cmd', 'WfmUpdate-Cmd', 'TimestampBoot-Cte', 'TimestampUpdate-Mon', 'PwrState-Sel', 'PwrState-Sts', 'OpMode-Sel', 'OpMode-Sts', 'CtrlMode-Mon', 'CtrlLoop-Sel', 'CtrlLoop-Sts', 'Current-SP', 'Current-RB', 'CurrentRef-Mon', 'Current-Mon', 'CycleEnbl-Mon', 'CycleIndex-Mon', 'CycleType-Sel', 'CycleType-Sts', 'CycleNrCycles-SP', 'CycleNrCycles-RB', 'CycleFreq-SP', 'CycleFreq-RB', 'CycleAmpl-SP', 'CycleAmpl-RB', 'CycleOffset-SP', 'CycleOffset-RB', 'CycleAuxParam-SP', 'CycleAuxParam-RB', 'WfmIndex-Mon', 'WfmSyncPulseCount-Mon', 'WfmUpdateAuto-Sel', 'WfmUpdateAuto-Sts', 'SOFBMode-Sel', 'SOFBMode-Sts', 'SOFBUpdate-Cmd', 'IDFFMode-Sel', 'IDFFMode-Sts', 'PRUCtrlQueueSize-Mon', 'SyncPulse-Cmd', 'Wfm-SP', 'Wfm-RB', 'WfmRef-Mon', 'Wfm-Mon', 'Voltage-SP', 'Voltage-RB', 'VoltageRef-Mon', 'Voltage-Mon', 'CapacitorBankVoltage-SP', 'CapacitorBankVoltage-RB', 'CapacitorBankVoltageRef-Mon', 'CapacitorBankVoltage-Mon', 'ScopeSrcAddr-SP', 'ScopeSrcAddr-RB', 'ScopeFreq-SP', 'ScopeFreq-RB', 'ScopeDuration-SP', 'ScopeDuration-RB', 'WfmSyncMode-Sel', 'WfmSyncMode-Sts', 'WfmFreq-SP', 'WfmFreq-RB', 'WfmGain-SP', 'WfmGain-RB', 'WfmOffset-SP', 'WfmOffset-RB']
+
+ +
+ +
+
+class siriushla.as_ps_control.detail_widget.PSDetailWidget.PSParamsWidget(parent, psname, params)[source]
+

Bases: _SiriusWindow

+

PS Parameters Widget.

+
+ +
+
+

siriushla.as_ps_control.detail_widget.custom_widgets module

+

Custom widget.

+
+
+class siriushla.as_ps_control.detail_widget.custom_widgets.LISpectIntlkLed(parent=None, filters=None)[source]
+

Bases: QLed, PyDMWidget

+

Led to check LI Spect interlock status.

+
+
+filterlog
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+mouseDoubleClickEvent(self, a0: QMouseEvent | None)[source]
+
+ +
+
+normal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+value_changed(new_value=None)[source]
+

Callback invoked when the Channel value is changed.

+
+
Parameters:
+

new_val (str, int, float, bool or np.ndarray) – The new value from the channel. The type depends on the channel.

+
+
+
+ +
+
+warning
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ps_control.html b/siriushla.as_ps_control.html new file mode 100644 index 000000000..6b2987b1b --- /dev/null +++ b/siriushla.as_ps_control.html @@ -0,0 +1,745 @@ + + + + + + + siriushla.as_ps_control — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ps_control

+
+

Subpackages

+
+ +
+
+
+

Code Documentation

+
+
+

siriushla.as_ps_control.PSControlWindow module

+

Defines a class to control a set of a device from a given class.

+
+
+class siriushla.as_ps_control.PSControlWindow.PSControlWindow(section, device, subsection=None, parent=None)[source]
+

Bases: _SiriusWindow

+

Base window to show devices of a section in tabs.

+
+ +
+
+

siriushla.as_ps_control.PSDetailWindow module

+

Define a window with detailed controls for a given magnet.

+
+
+class siriushla.as_ps_control.PSDetailWindow.PSDetailWindow(psname, parent=None, psmodel=None, pstype=None)[source]
+

Bases: _SiriusWindow

+

Window to control a detailed widget.

+
+ +
+
+

siriushla.as_ps_control.PSTabControlWindow module

+

Defines a class to control elements from a given class.

+
+
+class siriushla.as_ps_control.PSTabControlWindow.PSTabControlWindow(section, parent=None)[source]
+

Bases: PSControlWindow

+

Base window to show devices of a section in tabs.

+
+
+Devices = {'BO': ['dipole', 'quadrupole', 'sextupole', 'corrector-slow', 'skew-quadrupole'], 'IT': ['lens'], 'LI': ['lens', 'corrector-slow', 'solenoid', 'quadrupole', 'spectrometer'], 'SI': ['dipole', 'quadrupole', 'sextupole'], 'TB': ['dipole', 'quadrupole', 'corrector-slow'], 'TS': ['dipole', 'quadrupole', 'corrector-slow']}
+
+ +
+
+TabName = {'corrector-fast': 'Fast Correctors', 'corrector-septff': 'Septa FF Correctors', 'corrector-slow': 'Slow Correctors', 'dipole': 'Dipoles', 'lens': 'Lens', 'quadrupole': 'Quadrupoles', 'sextupole': 'Sextupoles', 'skew-quadrupole': 'Quadrupoles Skew', 'solenoid': 'Solenoids', 'spectrometer': 'Spectrometer', 'trim-quadrupole': 'Trims'}
+
+ +
+
+tabFilled
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+

siriushla.as_ps_control.PSTrimWindow module

+

Defines window class to show trims of a magnet.

+
+
+class siriushla.as_ps_control.PSTrimWindow.PSTrimWindow(device, parent=None)[source]
+

Bases: _SiriusWindow

+

Allow controlling the trims of a given magnet.

+
+ +
+
+

siriushla.as_ps_control.SummaryWidgets module

+

Widget with general functions of DCLink Widgets.

+
+
+class siriushla.as_ps_control.SummaryWidgets.SummaryHeader(name, visible_props, parent=None)[source]
+

Bases: QWidget

+
+
+update_visible_props(new_value)[source]
+
+ +
+ +
+
+class siriushla.as_ps_control.SummaryWidgets.SummaryWidget(name, visible_props, parent=None)[source]
+

Bases: QWidget

+

General widget for controlling a power supply.

+
+
+acc_clear()[source]
+

Reset power supply.

+
+ +
+
+property bbbname
+

BBB name.

+
+ +
+
+ctrlloop_close()[source]
+

Close control loop.

+
+ +
+
+ctrlloop_open()[source]
+

Open control loop.

+
+ +
+
+property devname
+

PS name.

+
+ +
+
+fillWidget(name)[source]
+
+ +
+
+get_detail_button()[source]
+

Return psname button.

+
+ +
+
+get_trim_button()[source]
+

Return trim button.

+
+ +
+
+idffmode_off()[source]
+

Turn IDFFMode off.

+
+ +
+
+idffmode_on()[source]
+

Turn IDFFMode on.

+
+ +
+
+pulse_off()[source]
+

Turn power supply off.

+
+ +
+
+pulse_on()[source]
+

Turn power supply on.

+
+ +
+
+reset()[source]
+

Reset power supply.

+
+ +
+
+set_accfreeze_frozen()[source]
+

Set power supply AccFreeze to frozen.

+
+ +
+
+set_accfreeze_unfrozen()[source]
+

Set power supply AccFreeze to unfrozen.

+
+ +
+
+set_opmode_slowref()[source]
+

Set power supply OpMode to SlowRef.

+
+ +
+
+sofbmode_off()[source]
+

Turn SOFBMode off.

+
+ +
+
+sofbmode_on()[source]
+

Turn SOFBMode on.

+
+ +
+
+turn_off()[source]
+

Turn power supply off.

+
+ +
+
+turn_on()[source]
+

Turn power supply on.

+
+ +
+
+property udcname
+

UDC name.

+
+ +
+
+update_params()[source]
+

Update power supply parameters.

+
+ +
+
+wfmupdate_off()[source]
+

Disable WfmUpdateAuto.

+
+ +
+
+wfmupdate_on()[source]
+

Enable WfmUpdateAuto.

+
+ +
+ +
+
+siriushla.as_ps_control.SummaryWidgets.get_analog_name(psname)[source]
+

.

+
+ +
+
+siriushla.as_ps_control.SummaryWidgets.get_prop2label(psname)[source]
+
+ +
+
+siriushla.as_ps_control.SummaryWidgets.get_prop2width(psname)[source]
+
+ +
+
+siriushla.as_ps_control.SummaryWidgets.get_strength_name(psname)[source]
+

.

+
+ +
+
+siriushla.as_ps_control.SummaryWidgets.sort_propties(labels)[source]
+
+ +
+
+

siriushla.as_ps_control.ps_wfmerror_mon module

+
+
+class siriushla.as_ps_control.ps_wfmerror_mon.Graph(*args, **kwargs)[source]
+

Bases: SiriusWaveformPlot

+
+
+doubleclick
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+mouseDoubleClickEvent(self, event: QMouseEvent | None)[source]
+
+ +
+ +
+
+class siriushla.as_ps_control.ps_wfmerror_mon.GraphWidget(parent=None, pslist=[], name='', delta=0.0, idxini=0, idxfin=4000, legend=False)[source]
+

Bases: QWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_ps_control.ps_wfmerror_mon.PlotWfmErrorWindow(parent=None)[source]
+

Bases: _SiriusWindow

+
+
+setupui()[source]
+
+ +
+ +
+
+

Module contents

+

Package containing widgets and windows to control power supplies.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ps_cycle.html b/siriushla.as_ps_cycle.html new file mode 100644 index 000000000..dcca4c51a --- /dev/null +++ b/siriushla.as_ps_cycle.html @@ -0,0 +1,807 @@ + + + + + + + siriushla.as_ps_cycle — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ps_cycle

+
+

Code Documentation

+
+
+

siriushla.as_ps_cycle.cycle_window module

+

Power supplies cycle window.

+
+
+class siriushla.as_ps_cycle.cycle_window.CycleWindow(parent=None, checked_accs=(), adv_mode=False)[source]
+

Bases: _SiriusWindow

+

Power supplies cycle window.

+
+
+closeEvent(self, a0: QCloseEvent | None)[source]
+
+ +
+
+keyPressEvent(evt)[source]
+

Implement keyPressEvent.

+
+ +
+ +
+
+class siriushla.as_ps_cycle.cycle_window.MyProgressBar(parent=None)[source]
+

Bases: QProgressBar

+
+
+increment()[source]
+
+ +
+ +
+
+class siriushla.as_ps_cycle.cycle_window.UpdateProgressBar(duration, parent=None)[source]
+

Bases: QThread

+
+
+exit_task()[source]
+

Set flag to quit thread.

+
+ +
+
+increment
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+run(self)[source]
+
+ +
+ +
+
+

siriushla.as_ps_cycle.tasks module

+
+
+class siriushla.as_ps_cycle.tasks.BaseTask(parent=None, psnames=[], timing=None, need_controller=False, isadv=False)[source]
+

Bases: QThread

+

Base Task.

+
+
+completed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+currentItem
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+duration()[source]
+

Return task maximum duration.

+
+ +
+
+exit_task()[source]
+

Set flag to quit thread.

+
+ +
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+
+itemDone
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+run()[source]
+

Run task.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+
+update(message, done, warning, error)[source]
+
+ +
+
+updated
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+class siriushla.as_ps_cycle.tasks.CreateCyclers(parent=None, psnames=[], timing=None, need_controller=False, isadv=False)[source]
+

Bases: BaseTask

+

Create cyclers.

+
+
+function()[source]
+

Create cyclers.

+
+ +
+ +
+
+class siriushla.as_ps_cycle.tasks.Cycle(**kwargs)[source]
+

Bases: BaseTask

+

Cycle.

+
+
+duration()[source]
+

Return task maximum duration.

+
+ +
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+ +
+
+class siriushla.as_ps_cycle.tasks.CycleTrims(**kwargs)[source]
+

Bases: BaseTask

+

Cycle.

+
+
+duration()[source]
+

Return task maximum duration.

+
+ +
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+ +
+
+class siriushla.as_ps_cycle.tasks.PreparePSCurrentZero(**kwargs)[source]
+

Bases: BaseTask

+

Prepare power suplies to cycle.

+
+
+duration()[source]
+

Return task maximum duration.

+
+ +
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+ +
+
+class siriushla.as_ps_cycle.tasks.PreparePSIDFFMode(**kwargs)[source]
+

Bases: BaseTask

+

Prepare power suplies to cycle.

+
+
+duration()[source]
+

Return task maximum duration.

+
+ +
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+ +
+
+class siriushla.as_ps_cycle.tasks.PreparePSOpModeCycle(**kwargs)[source]
+

Bases: BaseTask

+

Prepare power suplies to cycle.

+
+
+duration()[source]
+

Return task maximum duration.

+
+ +
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+ +
+
+class siriushla.as_ps_cycle.tasks.PreparePSOpModeSlowRef(**kwargs)[source]
+

Bases: BaseTask

+

Prepare power suplies to cycle.

+
+
+duration()[source]
+

Return task maximum duration.

+
+ +
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+ +
+
+class siriushla.as_ps_cycle.tasks.PreparePSParams(**kwargs)[source]
+

Bases: BaseTask

+

Prepare power suplies to cycle.

+
+
+duration()[source]
+

Return task maximum duration.

+
+ +
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+ +
+
+class siriushla.as_ps_cycle.tasks.PreparePSSOFBMode(**kwargs)[source]
+

Bases: BaseTask

+

Prepare power suplies to cycle.

+
+
+duration()[source]
+

Return task maximum duration.

+
+ +
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+ +
+
+class siriushla.as_ps_cycle.tasks.PrepareTiming(**kwargs)[source]
+

Bases: BaseTask

+

Prepare timing to cycle.

+
+
+duration()[source]
+

Return task maximum duration.

+
+ +
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+ +
+
+class siriushla.as_ps_cycle.tasks.RestoreTiming(**kwargs)[source]
+

Bases: BaseTask

+

Restore timing initial state.

+
+
+duration()[source]
+

Return task maximum duration.

+
+ +
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+ +
+
+class siriushla.as_ps_cycle.tasks.SaveTiming(**kwargs)[source]
+

Bases: BaseTask

+

Save timing initial state.

+
+
+duration()[source]
+

Return task maximum duration.

+
+ +
+
+function()[source]
+

Must be reimplemented in each class.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+ +
+
+class siriushla.as_ps_cycle.tasks.VerifyPS(parent=None, psnames=[], timing=None, need_controller=False, isadv=False)[source]
+

Bases: BaseTask

+

Verify power supply initial state.

+
+
+function()[source]
+

Verify if PS is ready for cycle.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+ +
+
+

Module contents

+

HLA to Handle Power Supplies Cycling.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ps_diag.html b/siriushla.as_ps_diag.html new file mode 100644 index 000000000..8f00109a9 --- /dev/null +++ b/siriushla.as_ps_diag.html @@ -0,0 +1,753 @@ + + + + + + + siriushla.as_ps_diag — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ps_diag

+
+

Code Documentation

+
+
+

siriushla.as_ps_diag.main module

+

Interface to handle power supply diagnostic.

+
+
+class siriushla.as_ps_diag.main.LogItemDelegate[source]
+

Bases: QItemDelegate

+

Log Item Delegate.

+
+
+paint(painter, option, index)[source]
+

Paint.

+
+ +
+ +
+
+class siriushla.as_ps_diag.main.LogTable(parent=None, channels=[], label2width={}, is_status=False)[source]
+

Bases: QTreeView, PyDMWidget

+

Log Table.

+
+
+add_log(new_value)[source]
+
+ +
+
+add_log_slot(updated)[source]
+
+ +
+
+alarm_severity_changed(new_alarm_severity)[source]
+

Reimplement alarm_severity_changed.

+
+ +
+
+connection_changed(conn)[source]
+

Reimplement connection_changed to handle all channels.

+
+ +
+
+mouseDoubleClickEvent(ev)[source]
+

Trigger open PS detail window.

+
+ +
+
+remove_log(new_value)[source]
+
+ +
+
+remove_log_slot(updated)[source]
+
+ +
+
+updated
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+siriushla.as_ps_diag.main.MyLedMultiChannel
+

alias of MyLed

+
+ +
+
+siriushla.as_ps_diag.main.MyLedMultiConnection
+

alias of MyLed

+
+ +
+
+class siriushla.as_ps_diag.main.PSDiag(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: _SiriusWindow

+

Power Supply Diagnostic.

+
+ +
+
+siriushla.as_ps_diag.main.create_led_class(type='multichannel')[source]
+
+ +
+
+

siriushla.as_ps_diag.monitor module

+

Interface to handle general status.

+
+
+class siriushla.as_ps_diag.monitor.MyLed(parent=None, init_channel=None, init_tooltip='', **kws)[source]
+

Bases: PyDMLed

+

Monitor Led.

+
+
+default_colorlist = [<PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>]
+
+ +
+
+mouseDoubleClickEvent(_)[source]
+

Reimplement mouseDoubleClickEvent.

+
+ +
+
+mousePressEvent(event)[source]
+

Reimplement mousePressEvent.

+
+ +
+
+value_changed(new_val)[source]
+

Receive new value and set led color accordingly.

+

For int or float data type the standard led behaviour is to be red when +the value is 0, and green otherwise.

+

If a bit is set the value received will be treated as an int +and the bit value is extracted using a mask. The led represents the +value of the chosen bit.

+
+ +
+ +
+
+class siriushla.as_ps_diag.monitor.PSMonitor(parent=None, prefix=siriuspy.envars.VACA_PREFIX, get_label2devices_method=None, get_dev2sublabels_method=None, get_col2devcount_method=None, get_sec2devlaypos_method=None)[source]
+

Bases: QWidget

+

PS Monitor.

+
+ +
+
+

siriushla.as_ps_diag.ps_graph_mon module

+

PS Graph Monitor.

+
+
+class siriushla.as_ps_diag.ps_graph_mon.PSGraph(parent=None, psnames=[], y_data=[], symbols=[], color='blue')[source]
+

Bases: SiriusWaveformPlot

+

Power supply data graph.

+
+
+mouseDoubleClickEvent(event)[source]
+

Reimplement mouseDoubleClickEvent.

+
+ +
+
+mouseMoveEvent(event)[source]
+

Reimplement mouseMoveEvent.

+
+ +
+
+property psnames
+

Return psnames.

+
+ +
+
+property sector
+

Return sector.

+
+ +
+
+property symbols
+

Return symbols.

+
+ +
+
+property tooltips
+

Return tooltips.

+
+ +
+
+property x_data
+

Return x_data.

+
+ +
+
+property y_data
+

Return y_data.

+
+ +
+ +
+
+class siriushla.as_ps_diag.ps_graph_mon.PSGraphDevicesSelWidget(parent, psnames)[source]
+

Bases: QWidget

+

Power supply selection widget.

+
+
+matype_changed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+psnames_changed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+class siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, psnames='')[source]
+

Bases: QWidget

+

Power supply graph monitor widget.

+
+
+contextMenuEvent(event, return_menu=False)[source]
+

Show a custom context menu.

+
+ +
+
+propLineChanged
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+propSymbChanged
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+psnamesChanged
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+update_property_line(text)[source]
+

Update property line.

+
+ +
+
+update_property_symb(text)[source]
+

Update property symbol.

+
+ +
+
+update_psnames(psnames)[source]
+

Update psnames.

+
+ +
+ +
+
+class siriushla.as_ps_diag.ps_graph_mon.PSGraphMonWindow(parent=None, prefix=siriuspy.envars.VACA_PREFIX, filters='')[source]
+

Bases: _SiriusWindow

+

Power supply graph monitor window.

+
+
+contextMenuEvent(event)[source]
+

.

+
+ +
+
+show_connections(checked)[source]
+

.

+
+ +
+ +
+
+class siriushla.as_ps_diag.ps_graph_mon.PSGraphProptySelWidget(parent)[source]
+

Bases: QWidget

+

Power supply property selection widget.

+
+
+PROP_LINE_DEFAULT = ['Current-Mon', 'Current-SP', 'Current-RB', 'CurrentRef-Mon', 'DiagCurrentDiff-Mon', 'WfmSyncPulseCount-Mon', 'PRUCtrlQueueSize-Mon']
+
+ +
+
+PROP_LINE_FASTCORR = ['Current-Mon', 'Current-SP', 'Current-RB', 'CurrentRef-Mon', 'DiagCurrentDiff-Mon']
+
+ +
+
+PROP_SYMB_DEFAULT = ['DiagStatus-Mon', 'IntlkSoft-Mon', 'IntlkHard-Mon', 'PwrState-Sel', 'PwrState-Sts', 'OpMode-Sel', 'OpMode-Sts', 'CtrlMode-Mon', 'CtrlLoop-Sel', 'CtrlLoop-Sts', 'CycleEnbl-Mon']
+
+ +
+
+PROP_SYMB_FASTCORR = ['DiagStatus-Mon', 'AlarmsAmp-Mon', 'AlarmsAmpLtc-Mon', 'PwrState-Sel', 'PwrState-Sts']
+
+ +
+
+change_matype(magfunc, pstype)[source]
+

Change MA type.

+
+ +
+
+propty_line_changed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+propty_symb_changed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+

siriushla.as_ps_diag.util module

+

Util module.

+
+
+siriushla.as_ps_diag.util.get_col2dev_count(sec, label)[source]
+
+ +
+
+siriushla.as_ps_diag.util.get_dev2sub_labels(label)[source]
+
+ +
+
+siriushla.as_ps_diag.util.get_label2devices(sec)[source]
+
+ +
+
+siriushla.as_ps_diag.util.get_sec2dev_laypos(sec, label)[source]
+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_pu_control.html b/siriushla.as_pu_control.html new file mode 100644 index 000000000..dab2a3624 --- /dev/null +++ b/siriushla.as_pu_control.html @@ -0,0 +1,242 @@ + + + + + + + siriushla.as_pu_control — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_pu_control

+
+

Code Documentation

+
+
+

siriushla.as_pu_control.ControlWindow module

+

Modulet that defines the window class that control pulsed mangets.

+
+
+class siriushla.as_pu_control.ControlWindow.PUControlWindow(parent=None, section=None, is_main=True, main_secs=('TB', 'BO', 'TS', 'SI'))[source]
+

Bases: _SiriusWindow

+

Window to control pulsed magnets.

+
+
+contextMenuEvent(event)[source]
+

Show a custom context menu.

+
+ +
+
+show_connections(checked)[source]
+

.

+
+ +
+ +
+
+

siriushla.as_pu_control.DetailWidget module

+

Detailed widget for controlling a pulsed mangnet.

+
+
+class siriushla.as_pu_control.DetailWidget.PUDetailWidget(devname, parent=None)[source]
+

Bases: QWidget

+

Detailed widget for controlling a pulsed magnet.

+
+ +
+
+

siriushla.as_pu_control.DetailWindow module

+

Define detail window for a pulsed magnet.

+
+
+class siriushla.as_pu_control.DetailWindow.PUDetailWindow(devname, parent=None)[source]
+

Bases: _SiriusWindow

+

Window with all controls of Pulsed Manget.

+
+ +
+
+

Module contents

+

Package containing widgets and windows to control pulsed magnets.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_rf_control.html b/siriushla.as_rf_control.html new file mode 100644 index 000000000..35c79d63b --- /dev/null +++ b/siriushla.as_rf_control.html @@ -0,0 +1,226 @@ + + + + + + + siriushla.as_rf_control — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_rf_control

+
+

Code Documentation

+
+
+

siriushla.as_rf_control.control module

+

RF Main Control window.

+
+
+class siriushla.as_rf_control.control.RFMainControl(parent=None, prefix='', section='')[source]
+

Bases: _SiriusWindow

+

RF Control Overview Window.

+
+ +
+
+

siriushla.as_rf_control.custom_widgets module

+
+
+class siriushla.as_rf_control.custom_widgets.RFEnblDsblButton(parent=None, channels={})[source]
+

Bases: QWidget

+

Button to enbl/dsbl attribute controlled by 2 PVs.

+
+ +
+
+class siriushla.as_rf_control.custom_widgets.RFTitleFrame(parent=None, system='')[source]
+

Bases: QFrame

+

QFrame with background color set depending on the specific system.

+
+ +
+
+

siriushla.as_rf_control.details module

+
+
+

siriushla.as_rf_control.util module

+

Utilities.

+
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.as_ti_control.html b/siriushla.as_ti_control.html new file mode 100644 index 000000000..f96ef8c52 --- /dev/null +++ b/siriushla.as_ti_control.html @@ -0,0 +1,656 @@ + + + + + + + siriushla.as_ti_control — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.as_ti_control

+
+

Code Documentation

+
+
+

siriushla.as_ti_control.base module

+

.

+
+
+class siriushla.as_ti_control.base.BaseList(name=None, parent=None, prefix='', props={}, obj_names=[], has_search=True, props2search={})[source]
+

Bases: CustomGroupBox

+

Template for control of High Level Triggers.

+
+
+filter_columns()[source]
+
+ +
+
+filter_lines(text)[source]
+

Filter lines according to the regexp filter.

+
+ +
+
+getColumn(device, prop, header)[source]
+
+ +
+
+getLine(device=None, header=False)[source]
+
+ +
+
+setupUi()[source]
+
+ +
+ +
+
+class siriushla.as_ti_control.base.BaseWidget(parent=None, device='', prefix='')[source]
+

Bases: QWidget

+
+
+channels()[source]
+
+ +
+
+get_pvname(propty, field='')[source]
+
+ +
+ +
+
+class siriushla.as_ti_control.base.CustomGroupBox(title, parent=None)[source]
+

Bases: QGroupBox, PyDMPrimitiveWidget

+
+ +
+
+

siriushla.as_ti_control.hl_trigger module

+

.

+
+
+class siriushla.as_ti_control.hl_trigger.HLTriggerDetailed(parent=None, device='', prefix='')[source]
+

Bases: BaseWidget

+

Template for control of High Level Triggers.

+
+ +
+
+class siriushla.as_ti_control.hl_trigger.HLTriggerList(**kwargs)[source]
+

Bases: BaseList

+

Template for control of High Level Triggers.

+
+ +
+
+class siriushla.as_ti_control.hl_trigger.HLTriggerSimple(parent, device='', prefix='', delay=True, delayraw=False, duration=False, widthraw=False, nrpulses=False, src=False, deltadelay=False, deltadelayraw=False)[source]
+

Bases: BaseWidget

+
+ +
+
+class siriushla.as_ti_control.hl_trigger.LLTriggers(parent=None, prefix=None, hltrigger='', obj_names=[])[source]
+

Bases: QWidget

+
+ +
+
+

siriushla.as_ti_control.hltiming module

+

Control of EVG Timing Device.

+
+
+class siriushla.as_ti_control.hltiming.TimingMain(parent=None, prefix='')[source]
+

Bases: _SiriusWindow

+
+
+setevents()[source]
+
+ +
+
+setglobalparameters()[source]
+
+ +
+
+settriggers()[source]
+
+ +
+
+setupmenus()[source]
+
+ +
+
+setupui()[source]
+
+ +
+ +
+
+

siriushla.as_ti_control.low_level_devices module

+

.

+
+
+class siriushla.as_ti_control.low_level_devices.AFC(parent=None, device='', prefix='')[source]
+

Bases: BaseWidget

+

Template for control of High Level Triggers.

+
+ +
+
+class siriushla.as_ti_control.low_level_devices.AFCOUTList(**kwargs)[source]
+

Bases: LLTriggerList

+

Template for control of Timing devices Internal Triggers.

+
+ +
+
+class siriushla.as_ti_control.low_level_devices.BucketList(parent=None, device='', prefix='', min_size=25, show_graph=False)[source]
+

Bases: BaseWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_ti_control.low_level_devices.BucketListGraph(parent=None, device='', prefix='')[source]
+

Bases: BaseWidget

+

Bucket List Graph.

+
+ +
+
+class siriushla.as_ti_control.low_level_devices.BucketListLabel(parent=None, init_channel=None, keep_unit=False, **kws)[source]
+

Bases: SiriusLabel

+
+
+value_changed(value)[source]
+

Callback invoked when the Channel value is changed. +Sets the value of new_value accordingly at the Label.

+
+
Parameters:
+

new_value (str, int, float, bool or np.ndarray) – The new value from the channel. The type depends on the channel.

+
+
+
+ +
+ +
+
+class siriushla.as_ti_control.low_level_devices.BucketListLineEdit(parent=None, init_channel=None)[source]
+

Bases: PyDMLineEdit

+
+
+value_changed(value)[source]
+

Receive and update the PyDMLineEdit for a new channel value

+

The actual value of the input is saved as well as the type received. +This also resets the PyDMLineEdit display text using +set_display()

+
+
Parameters:
+

value (str, float or int) – The new value of the channel

+
+
+
+ +
+ +
+
+class siriushla.as_ti_control.low_level_devices.ClockList(name=None, parent=None, prefix='', props={}, obj_names=[], has_search=False)[source]
+

Bases: BaseList

+

Template for control of Low Level Clocks.

+
+ +
+
+class siriushla.as_ti_control.low_level_devices.EVE(parent=None, device='', prefix='')[source]
+

Bases: _EVR_EVE

+
+ +
+
+class siriushla.as_ti_control.low_level_devices.EVG(parent=None, prefix='', device='')[source]
+

Bases: BaseWidget

+

Template for control of High Level Triggers.

+
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_ti_control.low_level_devices.EVGFOUTOUTList(**kwargs)[source]
+

Bases: BaseList

+

Template for control of Timing devices Internal Triggers.

+
+ +
+
+class siriushla.as_ti_control.low_level_devices.EVR(parent=None, device='', prefix='')[source]
+

Bases: _EVR_EVE

+
+ +
+
+class siriushla.as_ti_control.low_level_devices.EVREVEDIList(**kwargs)[source]
+

Bases: BaseList

+

Template for control of Timing devices Internal Triggers.

+
+ +
+
+class siriushla.as_ti_control.low_level_devices.EVREVEOTPList(**kwargs)[source]
+

Bases: LLTriggerList

+

Template for control of Timing devices Internal Triggers.

+
+ +
+
+class siriushla.as_ti_control.low_level_devices.EVREVEOUTList(**kwargs)[source]
+

Bases: LLTriggerList

+

Template for control of Timing Devices Output Channels.

+
+ +
+
+class siriushla.as_ti_control.low_level_devices.EventList(**kwargs)[source]
+

Bases: BaseList

+

Template for control of Events.

+
+ +
+
+class siriushla.as_ti_control.low_level_devices.FOUT(parent=None, device='', prefix='')[source]
+

Bases: BaseWidget

+

Template for control of High Level Triggers.

+
+ +
+
+class siriushla.as_ti_control.low_level_devices.LLTriggerList(**kwargs)[source]
+

Bases: BaseList

+

Template for control of High Level Triggers.

+
+ +
+
+

siriushla.as_ti_control.monitor module

+

.

+
+
+class siriushla.as_ti_control.monitor.HLButton(trigger, prefix='', parent=None)[source]
+

Bases: QWidget

+
+ +
+
+class siriushla.as_ti_control.monitor.LLButton(device, link, prefix='', parent=None)[source]
+

Bases: QWidget

+
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.as_ti_control.monitor.MonitorHL(parent=None, prefix='')[source]
+

Bases: QGroupBox

+
+ +
+
+class siriushla.as_ti_control.monitor.MonitorLL(parent=None, prefix='')[source]
+

Bases: QGroupBox

+
+
+drawarrow(p1, p2)[source]
+
+ +
+
+drawline(p1, p2, angle, tip=False)[source]
+
+ +
+
+paintEvent(self, a0: QPaintEvent | None)[source]
+
+ +
+
+setupdown(down)[source]
+
+ +
+ +
+
+class siriushla.as_ti_control.monitor.MonitorWindow(parent=None, prefix='')[source]
+

Bases: QWidget

+
+ +
+
+

siriushla.as_ti_control.widgets module

+

Timing widgets.

+
+
+class siriushla.as_ti_control.widgets.EVGContinuousButton(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: PyDMStateButton

+

EVG Continuous State Button.

+
+ +
+
+class siriushla.as_ti_control.widgets.EVGContinuousLed(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: PyDMLed

+

EVG Continuous Led.

+
+ +
+
+class siriushla.as_ti_control.widgets.EVGInjectionButton(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: PyDMStateButton

+

EVG Injection State Button.

+
+ +
+
+class siriushla.as_ti_control.widgets.EVGInjectionLed(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: PyDMLed

+

EVG Injection Led.

+
+ +
+
+class siriushla.as_ti_control.widgets.EVGUpdateEvtButton(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: PyDMPushButton

+

EVG Update Events Button.

+
+ +
+
+class siriushla.as_ti_control.widgets.EVGUpdateEvtLed(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: SiriusLedAlert

+

EVG Update Events Led.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.bl_ap_imgproc.html b/siriushla.bl_ap_imgproc.html new file mode 100644 index 000000000..3bf365947 --- /dev/null +++ b/siriushla.bl_ap_imgproc.html @@ -0,0 +1,418 @@ + + + + + + + siriushla.bl_ap_imgproc — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.bl_ap_imgproc

+
+

Code Documentation

+
+
+

siriushla.bl_ap_imgproc.blintlkctl module

+

Beamline-specific classes.

+
+
+class siriushla.bl_ap_imgproc.blintlkctl.BLIntckCtrl(device)[source]
+

Bases: object

+

.

+
+
+beamline_open()[source]
+

.

+
+ +
+
+property beamline_opened
+

.

+
+ +
+
+gamma_enable()[source]
+

.

+
+ +
+ +
+
+

siriushla.bl_ap_imgproc.image module

+

BL AP ImgProc.

+
+
+class siriushla.bl_ap_imgproc.image.DVFImageView(device, pvname, parent=None)[source]
+

Bases: PyDMImageView

+

Image Processing Window.

+
+
+add_fit_ellipse()[source]
+

.

+
+ +
+
+add_fit_ellipse_connection(param)[source]
+

.

+
+ +
+
+add_fit_mean()[source]
+

.

+
+ +
+
+add_fit_mean_connection(axis)[source]
+

.

+
+ +
+
+add_prefixes(sufix)[source]
+

.

+
+ +
+
+add_roi()[source]
+

.

+
+ +
+
+add_roi_connection(axis)[source]
+

.

+
+ +
+
+plot_fit_ellipse(value, pvname)[source]
+

.

+
+ +
+
+plot_fit_mean(value, pvname)[source]
+

.

+
+ +
+
+plot_roi(value, pvname)[source]
+

.

+
+ +
+ +
+
+

siriushla.bl_ap_imgproc.main module

+

BL AP ImgProc.

+
+
+class siriushla.bl_ap_imgproc.main.BLImgProc(dvf, parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: QWidget

+

Image Processing Window.

+
+
+add_prefixes(sufix)[source]
+

.

+
+ +
+
+create_box_group(title, pv_info)[source]
+

.

+
+ +
+
+create_time_widget(pvname)[source]
+

.

+
+ +
+
+create_widget(title, pv_name)[source]
+

.

+
+ +
+
+end_processing_cmd()[source]
+

.

+
+ +
+
+format_datetime_lbl(value, pvname)[source]
+

.

+
+ +
+
+generate_pv_name(sufix)[source]
+

.

+
+ +
+
+intlk_cmd(cmd)[source]
+

.

+
+ +
+
+select_widget(pv_name, widget_type='label', units=True, labels=None)[source]
+

.

+
+ +
+
+setpoint_readback_widget(pv_list, sprb_type)[source]
+

.

+
+ +
+
+start_processing_cmd()[source]
+

.

+
+ +
+
+toggle_beamline_btns(value)[source]
+

.

+
+ +
+
+update_bl_open_status()[source]
+

.

+
+ +
+ +
+
+

siriushla.bl_ap_imgproc.util module

+

Utilities.

+
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.bo_ap_ramp.html b/siriushla.bo_ap_ramp.html new file mode 100644 index 000000000..9dce84f5a --- /dev/null +++ b/siriushla.bo_ap_ramp.html @@ -0,0 +1,308 @@ + + + + + + + siriushla.bo_ap_ramp — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.bo_ap_ramp

+
+

Code Documentation

+
+
+

siriushla.bo_ap_ramp.auxiliary_dialogs module

+
+
+

siriushla.bo_ap_ramp.bonormalized_edit module

+
+
+

siriushla.bo_ap_ramp.boramp_edit module

+
+
+

siriushla.bo_ap_ramp.custom_widgets module

+
+
+class siriushla.bo_ap_ramp.custom_widgets.ConfigLineEdit(config_type, *args, **kwargs)[source]
+

Bases: QLineEdit

+

Line Edit to choose a configuration.

+
+
+mouseReleaseEvent(self, a0: QMouseEvent | None)[source]
+
+ +
+ +
+
+class siriushla.bo_ap_ramp.custom_widgets.CustomTableWidgetItem(value)[source]
+

Bases: QTableWidgetItem

+

Auxiliar class to make a table column sortable by numeric data.

+
+ +
+
+class siriushla.bo_ap_ramp.custom_widgets.GraphKicks(parent=None, xdata=[], ydata=[], tooltip_names=[], c0=0, color='blue')[source]
+

Bases: SiriusWaveformPlot

+

Kick Graph.

+
+ +
+
+class siriushla.bo_ap_ramp.custom_widgets.MyTableWidget(parent=None, show_menu_fun=None, open_window_fun=None)[source]
+

Bases: QTableWidget

+

Reimplement mousePressEvent to show contextMenu.

+
+
+mouseDoubleClickEvent(self, e: QMouseEvent | None)[source]
+
+ +
+
+mousePressEvent(self, e: QMouseEvent | None)[source]
+
+ +
+ +
+
+class siriushla.bo_ap_ramp.custom_widgets.SpinBoxDelegate(parent, mini, maxi, prec)[source]
+

Bases: QStyledItemDelegate

+

Auxiliar class to draw a SpinBox in table items on editing.

+
+
+createEditor(parent, option, index)[source]
+

Create editor.

+
+ +
+
+displayText(self, value: Any, locale: QLocale) str[source]
+
+ +
+
+setEditorData(spinBox, index)[source]
+

Set editor data.

+
+ +
+
+setModelData(spinBox, model, index)[source]
+

Set model data.

+
+ +
+
+updateEditorGeometry(spinBox, option, index)[source]
+

Update editor geometry.

+
+ +
+ +
+
+

siriushla.bo_ap_ramp.main_window module

+
+
+

siriushla.bo_ap_ramp.menu module

+
+
+

siriushla.bo_ap_ramp.status_and_commands module

+
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.common.afc_acq_core.html b/siriushla.common.afc_acq_core.html new file mode 100644 index 000000000..f70b43359 --- /dev/null +++ b/siriushla.common.afc_acq_core.html @@ -0,0 +1,246 @@ + + + + + + + siriushla.common.afc_acq_core — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.common.afc_acq_core

+
+

Code Documentation

+
+
+

siriushla.common.afc_acq_core.base module

+

Base.

+
+
+class siriushla.common.afc_acq_core.base.BaseWidget(parent=None, prefix='', device='')[source]
+

Bases: QWidget

+
+
+get_pvname(propty)[source]
+
+ +
+ +
+
+

siriushla.common.afc_acq_core.triggers module

+

Trigger windows.

+
+
+class siriushla.common.afc_acq_core.triggers.LogicalTriggers(parent=None, prefix='', device='', names=None, trig_tp='')[source]
+

Bases: BaseWidget

+

Logical triggers.

+
+
+get_trigger_groupbox(idx)[source]
+
+ +
+
+setupui()[source]
+
+ +
+ +
+
+class siriushla.common.afc_acq_core.triggers.PhysicalTriggers(parent=None, prefix='', device='')[source]
+

Bases: BaseWidget

+

Physical triggers.

+
+
+get_trigger_groupbox(idx)[source]
+
+ +
+
+setupui()[source]
+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.common.cam_basler.html b/siriushla.common.cam_basler.html new file mode 100644 index 000000000..b5125b17d --- /dev/null +++ b/siriushla.common.cam_basler.html @@ -0,0 +1,535 @@ + + + + + + + siriushla.common.cam_basler — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.common.cam_basler

+
+

Code Documentation

+
+
+

siriushla.common.cam_basler.base module

+

SiriusScrnView widget.

+
+
+class siriushla.common.cam_basler.base.SiriusImageView(parent=None, image_channel=None, width_channel=None, offsetx_channel=None, offsety_channel=None, maxwidth_channel=None, maxheight_channel=None)[source]
+

Bases: PyDMImageView

+

A PyDMImageView with methods to handle screens calibration grids.

+
+
+ROIOffsetXChannel
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+ROIOffsetYChannel
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+property calibrationGrid
+

Return Numpy array containing original grid.

+
+ +
+
+property calibration_grid_filterfactor
+

Factor used to filter calibration grid.

+

Pixels with values smaller than filterfactor*img_maxdata +are set to zero.

+
+
Returns:
+

Calibration Grid Filter Factor

+
+
Return type:
+

float

+
+
+
+ +
+
+property calibration_grid_removeborder
+

Factor used to remove border of the calibration grid.

+
+
Returns:
+

Number of Rows/Columns to be removed

+
+
Return type:
+

float

+
+
+
+ +
+
+failToSaveGrid
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+property image_maxheight
+

Return image maximum height.

+
+ +
+
+image_maxheight_changed(new_max)[source]
+

Run when the maxHeight Channel value changes.

+
+
Parameters:
+

new_max (int) – The new image max height

+
+
+
+ +
+
+property image_maxwidth
+

Return image maximum width.

+
+ +
+
+image_maxwidth_changed(new_max)[source]
+

Run when the maxWidth Channel value changes.

+
+
Parameters:
+

new_max (int) – The new image max width

+
+
+
+ +
+
+image_roioffsetx_changed(new_offset)[source]
+

Run when the ROIOffsetX Channel value changes.

+
+
Parameters:
+

new_offsetx (int) – The new image ROI horizontal offset

+
+
+
+ +
+
+image_roioffsety_changed(new_offset)[source]
+

Run when the ROIOffsetY Channel value changes.

+
+
Parameters:
+

new_offsety (int) – The new image ROI vertical offset

+
+
+
+ +
+
+maxHeightChannel
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+maxWidthChannel
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+process_image(image)[source]
+

Reimplement process_image method to add grid to image.

+
+ +
+
+receivedData
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+roioffsetx_connection_state_changed(conn)[source]
+

Run when the ROIOffsetX Channel connection state changes.

+
+
Parameters:
+

conn (bool) – The new connection state.

+
+
+
+ +
+
+roioffsety_connection_state_changed(conn)[source]
+

Run when the ROIOffsetY Channel connection state changes.

+
+
Parameters:
+

conn (bool) – The new connection state.

+
+
+
+ +
+
+saveCalibrationGrid()[source]
+

Save current image as calibration_grid_image.

+
+ +
+
+set_calibration_grid_border2remove(value)[source]
+

Set factor used to remove border of the calibration grid.

+
+
Parameters:
+

value (int) – Number of Rows/Columns to be removed

+
+
+
+ +
+
+set_calibration_grid_filterfactor(value)[source]
+

Set factor used to filter calibration grid.

+

Pixels with values smaller than filterfactor*img_maxdata +are set to zero.

+
+
Parameters:
+

value (int) – Calibration Grid Filter Factor

+
+
+
+ +
+
+showCalibrationGrid(show)[source]
+

Show calibration_grid_image over the current image_waveform.

+
+ +
+ +
+
+siriushla.common.cam_basler.base.create_propty_layout(parent, prefix, propty, propty_type='', cmd={}, layout='hbox', width=7.1, height=1.29, use_linedit=False)[source]
+

Return a layout that handles a property according to ‘propty_type’.

+
+ +
+
+

siriushla.common.cam_basler.settings module

+
+
+class siriushla.common.cam_basler.settings.BaslerCamAcqAdvSettings(parent=None, device='', prefix='')[source]
+

Bases: QWidget

+
+ +
+
+class siriushla.common.cam_basler.settings.BaslerCamSettings(parent=None, device='', prefix='')[source]
+

Bases: QTabWidget

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.common.diff_ctrl.html b/siriushla.common.diff_ctrl.html new file mode 100644 index 000000000..e0fbaa798 --- /dev/null +++ b/siriushla.common.diff_ctrl.html @@ -0,0 +1,250 @@ + + + + + + + siriushla.common.diff_ctrl — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.common.diff_ctrl

+
+

Code Documentation

+
+
+

siriushla.common.diff_ctrl.base module

+

Scraper and Slit Monitor Base class.

+
+
+class siriushla.common.diff_ctrl.base.DiffCtrlDevMonitor(parent=None, prefix='', device='')[source]
+

Bases: QWidget

+

Diff Ctrl Dev Monitor Widget.

+
+
+channels()[source]
+

Return channels.

+
+ +
+
+updateDevWidget()[source]
+

Update device illustration.

+
+ +
+ +
+
+class siriushla.common.diff_ctrl.base.DiffCtrlView(parent=None, prefix='')[source]
+

Bases: QWidget

+

Diff Ctrl View Widget.

+
+
+DEVICE_CLASS = None
+
+ +
+
+DEVICE_PREFIX = ''
+
+ +
+
+changeEvent(event)[source]
+

Reimplement changeEvent.

+
+ +
+ +
+
+

siriushla.common.diff_ctrl.details module

+

DiffCtrl Details.

+
+
+class siriushla.common.diff_ctrl.details.DiffCtrlDetails(parent=None, prefix='', device='', pos_label='', neg_label='')[source]
+

Bases: _SiriusWindow

+

DiffCtrl Details.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.common.epics.html b/siriushla.common.epics.html new file mode 100644 index 000000000..66ca49826 --- /dev/null +++ b/siriushla.common.epics.html @@ -0,0 +1,267 @@ + + + + + + + siriushla.common.epics — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+
+ + + + \ No newline at end of file diff --git a/siriushla.common.epics.task.html b/siriushla.common.epics.task.html new file mode 100644 index 000000000..6b14d2533 --- /dev/null +++ b/siriushla.common.epics.task.html @@ -0,0 +1,460 @@ + + + + + + + siriushla.common.epics.task — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.common.epics.task

+
+

Code Documentation

+
+
+

siriushla.common.epics.task.checker module

+

Epics Checker Task.

+
+
+class siriushla.common.epics.task.checker.EpicsChecker(pvs, values, delays, cls_epics=<class 'siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper'>, parent=None, timeout=0.5)[source]
+

Bases: EpicsTask

+

Check if a set of PVs has the proper values.

+
+
+itemChecked
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+run()[source]
+

Thread execution.

+
+ +
+ +
+
+

siriushla.common.epics.task.connector module

+

Epics Connector.

+
+
+class siriushla.common.epics.task.connector.EpicsConnector(pvs, cls_epics=<class 'siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper'>, parent=None)[source]
+

Bases: EpicsTask

+

Interface to execute some task.

+

Allows a QThread to work with ProgressDialog widget. +Implements: +currentItem (Signal) +itemDone (Signal) +size (method) +exit_task (method)

+
+
+run()[source]
+

Thread execution.

+
+ +
+ +
+
+

siriushla.common.epics.task.getter module

+

Epics Getter.

+
+
+class siriushla.common.epics.task.getter.EpicsGetter(pvs, defvals=None, cls_epics=<class 'siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper'>, parent=None, timeout=0.5)[source]
+

Bases: EpicsTask

+

Get value of a set of PVs.

+
+
+itemNotRead
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+itemRead
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+run()[source]
+

Thread execution.

+
+ +
+ +
+
+

siriushla.common.epics.task.setter module

+

Epics Setter.

+
+
+class siriushla.common.epics.task.setter.EpicsSetter(pvs, values, delays, cls_epics=<class 'siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper'>, parent=None, timeout=0.5)[source]
+

Bases: EpicsTask

+

Set the value of a set of PVs.

+
+
+run()[source]
+

Thread execution.

+
+ +
+ +
+
+

siriushla.common.epics.task.task module

+

EpicsTask interface.

+
+
+class siriushla.common.epics.task.task.EpicsTask(pvs, values, delays, cls_epics=<class 'siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper'>, parent=None, timeout=0.5)[source]
+

Bases: QThread

+

Interface to execute some task.

+

Allows a QThread to work with ProgressDialog widget. +Implements: +currentItem (Signal) +itemDone (Signal) +size (method) +exit_task (method)

+
+
+PVs = {}
+
+ +
+
+completed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+currentItem
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+exit_task()[source]
+

Set flag to exit thread.

+
+ +
+
+get_pv(pvn)[source]
+
+ +
+
+itemDone
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+size()[source]
+

Task Size.

+
+ +
+ +
+
+

siriushla.common.epics.task.wait module

+
+
+class siriushla.common.epics.task.wait.EpicsWait(pvs, wait_time=1.0, parent=None)[source]
+

Bases: EpicsTask

+

.

+
+
+run()[source]
+

.

+
+ +
+ +
+
+

Module contents

+

Task module init.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.common.epics.wrapper.html b/siriushla.common.epics.wrapper.html new file mode 100644 index 000000000..7df634632 --- /dev/null +++ b/siriushla.common.epics.wrapper.html @@ -0,0 +1,238 @@ + + + + + + + siriushla.common.epics.wrapper — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.common.epics.wrapper

+
+

Code Documentation

+
+
+

siriushla.common.epics.wrapper.pyepics module

+

PyEpicsWrapper.

+
+
+class siriushla.common.epics.wrapper.pyepics.PyEpicsWrapper(pv)[source]
+

Bases: object

+

Wraps a PV object.

+

Implements: +pvname +put +check +get

+
+
+TIMEOUT = 0.5
+
+ +
+
+check(value, wait=0.5)[source]
+

Do timed get.

+
+ +
+
+get(wait=0.5)[source]
+

Return PV value.

+
+ +
+
+put(value, wait=0.5)[source]
+

Put if connected.

+
+ +
+
+property pvname
+

PV Name.

+
+ +
+ +
+
+

Module contents

+

Wrapper package init.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.common.html b/siriushla.common.html new file mode 100644 index 000000000..1136eb940 --- /dev/null +++ b/siriushla.common.html @@ -0,0 +1,302 @@ + + + + + + + siriushla.common — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.common

+
+

Subpackages

+
+ +
+
+
+

Module contents

+

Common package.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.html b/siriushla.html new file mode 100644 index 000000000..6e75ebf35 --- /dev/null +++ b/siriushla.html @@ -0,0 +1,355 @@ + + + + + + + Sirius HLA — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Sirius HLA

+
+

siriushla.sirius_application module

+

Definition of the Sirius Application class.

+
+
+class siriushla.sirius_application.SiriusApplication(ui_file=None, command_line_args=[], use_main_window=False, **kwargs)[source]
+

Bases: PyDMApplication

+

Derivation of PyDMApplication used in Sirius HLA.

+
+
+open_window(w_class, parent=None, **kwargs)[source]
+

Open new window.

+

A new window will be created if it is not already open. Otherwise, the +existing window is brought to focus.

+
+ +
+ +
+
+siriushla.sirius_application.excepthook(exctype, excvalue, tracebackobj)[source]
+

Global function to catch unhandled exceptions.

+

@param exctype exception type +@param excvalue exception value +@param tracebackobj traceback object

+
+ +
+
+

siriushla.util module

+

Util module.

+
+
+class siriushla.util.LoadingDialog(parent, title, message)[source]
+

Bases: QDialog

+
+ +
+
+class siriushla.util.LoadingThread(parent=None, cmd='', is_pydm=False)[source]
+

Bases: QThread

+
+
+closemessage
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+openmessage
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+run(self)[source]
+
+ +
+ +
+
+siriushla.util.check_process(cmd, is_window=True, is_pydm=False)[source]
+
+ +
+
+siriushla.util.check_window_by_pid(pid, comm)[source]
+
+ +
+
+siriushla.util.connect_newprocess(widget, cmd, is_window=True, parent=None, signal=None, is_pydm=False, **kwargs)[source]
+

Execute a child program in a new process.

+
+ +
+
+siriushla.util.connect_window(widget, w_class, parent, signal=None, **kwargs)[source]
+

Connect a widget to a window.

+
+ +
+
+siriushla.util.get_appropriate_color(section='SI')[source]
+
+ +
+
+siriushla.util.get_appropriate_signal(widget)[source]
+
+ +
+
+siriushla.util.get_monitor_icon(icon_name, color=None)[source]
+
+ +
+
+siriushla.util.get_package_version()[source]
+
+ +
+
+siriushla.util.get_window_id(w_class, **kwargs)[source]
+

Serialize parameters.

+
+ +
+
+siriushla.util.run_newprocess(cmd, is_window=True, is_pydm=False, **kwargs)[source]
+
+ +
+
+siriushla.util.set_style(app)[source]
+

Implement sirius-hla-style.css as default Qt resource file HLA.

+
+ +
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.li_ap_mps.html b/siriushla.li_ap_mps.html new file mode 100644 index 000000000..93962b6b9 --- /dev/null +++ b/siriushla.li_ap_mps.html @@ -0,0 +1,477 @@ + + + + + + + siriushla.li_ap_mps — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.li_ap_mps

+
+

Code Documentation

+
+
+

siriushla.li_ap_mps.bypass_btn module

+
+
+class siriushla.li_ap_mps.bypass_btn.BypassBtn(parent=None, init_channel=None)[source]
+

Bases: PyDMPushButton

+
+
+value_changed(new_value)[source]
+

Redefine value_changed.

+
+ +
+ +
+
+

siriushla.li_ap_mps.main module

+

Monitor Protection System Controller Interface

+
+
+class siriushla.li_ap_mps.main.MPSControl(parent=None, prefix='')[source]
+

Bases: QWidget

+

Monitor Protection System Controller Interface

+
+
+changeWid(layout)[source]
+
+ +
+
+clearLayout(lay)[source]
+

Erase the layout’s content

+
+ +
+
+controlBox(pv_name, lay, config, has_title, wid_type)[source]
+

Display the control features - Open control Box

+
+ +
+
+controlHiddenBox(pv_name, cb_glay, config)[source]
+

Display the status of the PV - Hidden control Box

+
+ +
+
+controlWidget(pv_name, lay, config)[source]
+

Create the control widget with opening and closing functions

+
+ +
+
+countGen(count, val)[source]
+

Counter for water data positioning

+
+ +
+
+countTemp(count, title)[source]
+

Counter for temperature data positioning

+
+ +
+
+countVA(count)[source]
+

Counter for vaccum data positioning

+
+ +
+
+countWater(count)[source]
+
+ +
+
+dispayAllControls(pv_name, control, config)[source]
+
+ +
+
+dispayHiddenControls(pv_name, control, config)[source]
+
+ +
+
+displayControlMPS(tab_type)[source]
+

Display the desired tab widget

+
+ +
+
+displayGroup(pv_data, title, group_type)[source]
+

Display one MPS group

+
+ +
+
+displayHeader()[source]
+

Display the window header

+
+ +
+
+displayMpsGroups(group_type)[source]
+

Display all the MPS groups

+
+ +
+
+displayTabs()[source]
+

Display all the tabs

+
+ +
+
+displayTempGroup(pv_data, title)[source]
+

Display one temperature group

+
+ +
+
+displayTempGroups()[source]
+

Display all the temperatures groups

+
+ +
+
+eventFilter(obj_wid, event)[source]
+

Hover listener with hover function

+
+ +
+
+gateValve(pv_name, config)[source]
+

Display the gate valves widget

+
+ +
+
+genStringTempPV(name, prefix_num, name_num)[source]
+

Generate Temperature PV name

+
+ +
+
+getCtrlWidget(pv_name, ctrl_type, config)[source]
+

Display the specific control widget

+
+ +
+
+getDeviceName(pv_name)[source]
+

Set device name

+
+ +
+
+getPVConfig(config, index)[source]
+

Get if the PV has configuration 1 or 0

+
+ +
+
+getPVControl(is_control, index)[source]
+

Get if the PV is a control or a status

+
+ +
+
+getParamAll(has_title, pv_name, wid_type)[source]
+
+ +
+
+getSingleTitle(title, layout)[source]
+

Display a single Title

+
+ +
+
+getTempWidget(pv_name, temp_type)[source]
+

Display the temperature label widget

+
+ +
+
+setParamLabel(layout)[source]
+

Display Temperature parameters labels

+
+ +
+
+setPvLbl(pv_name)[source]
+

Display the water title label

+
+ +
+
+setTempHeader(item_list, layout)[source]
+

Display Temperature header labels

+
+ +
+
+setTitleLabel(item, axis, layout)[source]
+

Display title labels

+
+ +
+
+statusBox(pv_name, config)[source]
+

Display the status widget

+
+ +
+
+tempMonBox(pv_name)[source]
+

Display the status features for the temperature monitor

+
+ +
+
+updateCount(count, title)[source]
+

Update counter for data positioning

+
+ +
+ +
+
+

siriushla.li_ap_mps.monitor module

+

Control of EVG Timing Device.

+
+
+class siriushla.li_ap_mps.monitor.MPSMonitor(parent=None, prefix='')[source]
+

Bases: QWidget

+
+ +
+
+

siriushla.li_ap_mps.util module

+
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.li_di_bpms.html b/siriushla.li_di_bpms.html new file mode 100644 index 000000000..7bde3d417 --- /dev/null +++ b/siriushla.li_di_bpms.html @@ -0,0 +1,260 @@ + + + + + + + siriushla.li_di_bpms — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.li_di_bpms

+
+

Code Documentation

+
+
+

siriushla.li_di_bpms.bpm_main module

+

Diagnostic Interface of the LINAC’s BPM

+
+
+class siriushla.li_di_bpms.bpm_main.DigBeamPosProc(device_name, prefix='', parent=None)[source]
+

Bases: _SiriusWindow

+

Class Digital Beam Position Processor

+
+
+createGraph(graph_data)[source]
+

Build a graph widget

+
+ +
+
+dataItem(channel, style)[source]
+

Get data channel info

+
+ +
+
+display_data(title, info, pos_x, pos_y, style)[source]
+

Build a data widget

+
+ +
+
+display_graph()[source]
+

Display the graph tabs and all their contents

+
+ +
+
+display_header()[source]
+

Display the header of the interface

+
+ +
+
+display_mainData()[source]
+

Display all main data widgets

+
+ +
+
+display_secData()[source]
+

Build the secondary data widget

+
+ +
+
+display_selectors()[source]
+

Display the selector and the secondary data

+
+ +
+
+selectionItem(title, channel, orientation)[source]
+

Build a selection widget

+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.li_di_scrns.html b/siriushla.li_di_scrns.html new file mode 100644 index 000000000..d6c13e027 --- /dev/null +++ b/siriushla.li_di_scrns.html @@ -0,0 +1,469 @@ + + + + + + + siriushla.li_di_scrns — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.li_di_scrns

+
+

Code Documentation

+
+
+

siriushla.li_di_scrns.main module

+

Diagnostic Interface of the LINAC’s Screen

+
+
+class siriushla.li_di_scrns.main.GeneralFunctions[source]
+

Bases: object

+

Class with the functions used in both Screens Windows

+
+
+getPvName(device, pv_name)[source]
+

Build PV name

+
+ +
+
+setBasicInfo(device, label, pv_name)[source]
+

Build one basic information Component

+
+ +
+
+setRBVObj(device, channel, label, pv_prefix)[source]
+

Build formatted RBV Component

+
+ +
+
+setSingleScrn(device, screen)[source]
+

Build a single screen Component

+
+ +
+
+setWidgetType(wid_type, device, pv_name, label='', value=0)[source]
+

Get widget type

+
+ +
+ +
+
+class siriushla.li_di_scrns.main.LiBeamProfile(prefix='', parent=None)[source]
+

Bases: _SiriusWindow, GeneralFunctions

+

Linac Profile Screen

+
+
+buildStacks(stack_type)[source]
+

Build all the stack groups

+
+ +
+
+getScrnSelBtns(device, label)[source]
+

Get the button label for the position of the screen

+
+ +
+
+getStackItem(stack_type, device)[source]
+

Get one stack item

+
+ +
+
+header()[source]
+

Build the header

+
+ +
+
+imageViewer()[source]
+

Build the image

+
+ +
+
+radioBtnClick(value)[source]
+

Action on radio button change

+
+ +
+
+saveStack(stack, stack_type)[source]
+

Save the stack for future item changes

+
+ +
+
+selectionItem(channel)[source]
+

Build a selection widget

+
+ +
+
+setLight(device, pv_list, title)[source]
+

Build Light Component

+
+ +
+
+setMotorsConfig()[source]
+

Build the Motor Control Buttons

+
+ +
+
+setPanelInfo(device, layout, row)[source]
+

Build the information of one screen in screen panel

+
+ +
+
+setScrnHeader(layout)[source]
+

Build the screen panel header

+
+ +
+
+setScrnInfo(device)[source]
+

Build the screen information Component

+
+ +
+
+setScrnPanel()[source]
+

Build the Screens Panel Component

+
+ +
+
+setScrnSelection(selection_info, device)[source]
+

Build the screen position selection menu

+
+ +
+
+setSingleScrnInfo(device)[source]
+

Build selected screen information

+
+ +
+
+setZeroOpt(item, device)[source]
+

Build Zero Operation Component

+
+ +
+ +
+
+class siriushla.li_di_scrns.main.ROIViewWindow(parent=None, prefix='')[source]
+

Bases: _SiriusWindow, GeneralFunctions

+

Show the ROI View Window.

+
+
+buildStacks(stack_type)[source]
+

Build all the stack groups

+
+ +
+
+getStackItem(stack_type, device)[source]
+

Get one stack item

+
+ +
+
+radioBtnClick(value)[source]
+

Action on radio button change

+
+ +
+
+rotate_chart(x_array)[source]
+

Rotate X and Y Axis in the Chart

+
+ +
+
+saveStack(stack, stack_type)[source]
+

Save the stack for future item changes

+
+ +
+
+scrnAndProj(device)[source]
+

Display ROI Screen, the projection charts +and the projection information

+
+ +
+
+setGraph(device, graph_data, orientation='V')[source]
+

Build a graph widget

+
+ +
+
+setGraphInfo(device, graph_info)[source]
+

Build the basic graph information

+
+ +
+
+setRoiInfo(device, roi_data, title)[source]
+

Build the ROI information

+
+ +
+ +
+
+

siriushla.li_di_scrns.motorBtn module

+
+
+class siriushla.li_di_scrns.motorBtn.MotorBtn(parent=None, init_channel=None, invert=False, bit=-1)[source]
+

Bases: PyDMStateButton

+

Rederivation to change send values.

+
+
+send_value()[source]
+

Send value rederivation.

+
+ +
+
+value_changed(new_val)[source]
+

Value changed rederivation.

+
+ +
+ +
+
+

siriushla.li_di_scrns.util module

+
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.li_eg_control.html b/siriushla.li_eg_control.html new file mode 100644 index 000000000..21159c18b --- /dev/null +++ b/siriushla.li_eg_control.html @@ -0,0 +1,203 @@ + + + + + + + siriushla.li_eg_control — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.li_eg_control

+
+

Code Documentation

+
+
+

siriushla.li_eg_control.main module

+

LI Egun control.

+
+
+class siriushla.li_eg_control.main.ITTIWidget(parent=None, prefix='', is_main=False)[source]
+

Bases: QWidget

+

IT Timing control widget.

+
+ +
+
+class siriushla.li_eg_control.main.LIEgunWindow(parent=None, prefix=siriuspy.envars.VACA_PREFIX, is_it=False)[source]
+

Bases: _SiriusWindow

+

Egun Control Window.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.li_pu_modltr.html b/siriushla.li_pu_modltr.html new file mode 100644 index 000000000..1a31ca5e5 --- /dev/null +++ b/siriushla.li_pu_modltr.html @@ -0,0 +1,218 @@ + + + + + + + siriushla.li_pu_modltr — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.li_pu_modltr

+
+

Code Documentation

+
+
+

siriushla.li_pu_modltr.auxiliary_dialogs module

+

Modulator auxiliary dialogs.

+
+
+class siriushla.li_pu_modltr.auxiliary_dialogs.ModEmerStopDialog(parent=None, device='', prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: _SiriusWindow

+

Modulator Emergency Stop Window.

+
+ +
+
+class siriushla.li_pu_modltr.auxiliary_dialogs.ModIntlkDetailDialog(parent=None, device='', prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: _SiriusWindow

+

Modulator Interlock Details.

+
+ +
+
+

siriushla.li_pu_modltr.main module

+

LI Modulators Control.

+
+
+class siriushla.li_pu_modltr.main.LIModltrWindow(prefix=siriuspy.envars.VACA_PREFIX, parent=None)[source]
+

Bases: _SiriusWindow

+

LI Modulators Control.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.li_rf_llrf.html b/siriushla.li_rf_llrf.html new file mode 100644 index 000000000..7c1586fa6 --- /dev/null +++ b/siriushla.li_rf_llrf.html @@ -0,0 +1,496 @@ + + + + + + + siriushla.li_rf_llrf — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.li_rf_llrf

+
+

Code Documentation

+
+
+

siriushla.li_rf_llrf.chart module

+

LI LLRF Chart Window.

+
+
+class siriushla.li_rf_llrf.chart.ChartMon(parent=None, dev='', prefix='')[source]
+

Bases: QWidget

+

Show the Chart Window.

+
+
+chartsMon(lay)[source]
+
+ +
+ +
+
+class siriushla.li_rf_llrf.chart.ChartWindow(parent=None, dev='', channel='', chart_type='Forward', prefix='')[source]
+

Bases: _SiriusWindow

+

Show the Chart Window.

+
+
+chartsIQAmpPha(lay)[source]
+

Show the 4 basic charts

+
+ +
+
+chartsPulseAmpPha(lay)[source]
+

Show the pulse charts of Amplitude and Phase

+
+ +
+ +
+
+

siriushla.li_rf_llrf.controls module

+

LILLRF Control Widget.

+
+
+class siriushla.li_rf_llrf.controls.ControlBox(parent=None, dev='', main_dev='', device=None, prefix='')[source]
+

Bases: QWidget

+

.

+
+ +
+
+class siriushla.li_rf_llrf.controls.DEVICES(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
+

Bases: IntEnum

+

.

+
+
+Kly1 = 1
+
+ +
+
+Kly2 = 0
+
+ +
+
+SHB = 2
+
+ +
+ +
+
+

siriushla.li_rf_llrf.details module

+

LILLRF Device Detail Windows.

+
+
+class siriushla.li_rf_llrf.details.DeviceParamSettingWindow(parent=None, device=None, main_dev='', prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: _SiriusWindow

+

Device Parameter Setting Window.

+
+ +
+
+

siriushla.li_rf_llrf.main module

+

Main module of the Application Interface.

+
+
+class siriushla.li_rf_llrf.main.LLRFMain(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: QWidget

+

.

+
+
+baseWidget(title='', pv_name='')[source]
+

Show the base widget

+
+ +
+
+basicInfoBox(device, channel, info)[source]
+

Show the basic information of an element

+
+ +
+
+buildChartMonitor()[source]
+

Build the Control Loop Monitor tab

+
+ +
+
+buildDevicesWidgets()[source]
+

Build and arrange the basic information +and control buttons on the image

+
+ +
+
+buildLine()[source]
+

Build a single horizontal line

+
+ +
+
+buildPvName(pv_name, device, pvPrefix='', pvSufix='')[source]
+

Build the pv name

+
+ +
+
+buildTabs()[source]
+

Build the tab widget

+
+ +
+
+eventFilter(obj, event)[source]
+

Signal the resize event to the relative Widgets

+
+ +
+
+formatLabel(pv_name='', pv_type='Power')[source]
+

Get widget type

+
+ +
+
+imageViewer()[source]
+

Build the image

+
+ +
+
+motorControlBtn(device, info)[source]
+

Show the motor control button

+
+ +
+
+showChartBtn(device, channel, chart_type)[source]
+

Show the Chart Button Widget

+
+ +
+ +
+
+

siriushla.li_rf_llrf.motor_control module

+

LI LLRF Motor Control Windows.

+
+
+class siriushla.li_rf_llrf.motor_control.MotorControlWindow(parent=None, motor_type='SHB')[source]
+

Bases: _SiriusWindow

+

Motor Control Window of the SHB and HPPS.

+
+
+basicData(pos=None, lay=None)[source]
+

Show all the general control information

+
+ +
+
+buildLed(pv_name='')[source]
+

Build a led widget

+
+ +
+
+getWidget(wid_type='', pv_name='')[source]
+

Get the selected widget

+
+ +
+
+infoBox(title='', pv_name='')[source]
+

Show general control information (Besides the leds)

+
+ +
+
+ledBox(main_title='', data=None, basename='')[source]
+

Show all the leds PVs of a dict

+
+ +
+
+pidBox()[source]
+

Show the PID control widgets

+
+ +
+
+rbvBox()[source]
+

Show a RBV Widget

+
+ +
+ +
+
+

siriushla.li_rf_llrf.util module

+
+
+

siriushla.li_rf_llrf.widgets module

+

LI LLRF Custom Widgets.

+
+
+class siriushla.li_rf_llrf.widgets.DeltaIQPhaseCorrButton(parent=None, device=None, main_dev='', delta=0, show_label=True, prefix='')[source]
+

Bases: QPushButton

+

.

+
+ +
+
+class siriushla.li_rf_llrf.widgets.GraphIvsQ(parent=None, dev=None, prop='Time', main_dev='', channel='CH1', prefix='')[source]
+

Bases: QWidget

+

Show the I&Q Chart based on IxQ or Time

+
+ +
+
+class siriushla.li_rf_llrf.widgets.GraphTime(parent=None, dev='', prop='Amp', main_dev='', channel='CH1', prefix='')[source]
+

Bases: QWidget

+

Show the graphs of Amplitude, Phase and Diff Data

+
+ +
+
+class siriushla.li_rf_llrf.widgets.GraphWave(parent=None, dev='', prop='Amp', main_dev='', channel='CH1', prefix='')[source]
+

Bases: QWidget

+

Show the graphs of Pulse Amplitude, Pulse Phase and Raw Data.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.li_va_control.html b/siriushla.li_va_control.html new file mode 100644 index 000000000..775e6256a --- /dev/null +++ b/siriushla.li_va_control.html @@ -0,0 +1,714 @@ + + + + + + + siriushla.li_va_control — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.li_va_control

+
+

Code Documentation

+
+
+

siriushla.li_va_control.chart module

+

CCG Chart Window

+
+
+class siriushla.li_va_control.chart.ChartWindow(parent=None, prefix='')[source]
+

Bases: _SiriusWindow, BaseFunctionsInterface

+

Show the Chart Window.

+
+
+addChannels(graph, id_num, color)[source]
+

Add one channel(curve) to the chart

+
+ +
+
+chartsMon(lay)[source]
+

Display the three charts with their channels

+
+ +
+
+setupGraph()[source]
+

Create and configure Chart Widget

+
+ +
+ +
+
+

siriushla.li_va_control.details module

+

All the detail Chart Windows

+
+
+class siriushla.li_va_control.details.DetailWindow(parent=None)[source]
+

Bases: QWidget, BaseFunctionsInterface

+

Display General Detail Window

+
+
+buildList(cat)[source]
+

Select which widget list to build

+
+ +
+
+selWindow(cat)[source]
+

Open selected window with click

+
+ +
+
+setupAllDevices(title, data, lay, pos)[source]
+

Display the VGC informations of one device

+
+ +
+
+setupIPSControl(pv_name)[source]
+

Display simple buttons for IPS Control

+
+ +
+
+setupIPSListDet()[source]
+

Display IPS Widget List with all IPS elements

+
+ +
+
+setupVgcListDet()[source]
+

Display VGC Widget List with all VGC elements

+
+ +
+
+widgetLists()[source]
+

Build all lists

+
+ +
+ +
+
+class siriushla.li_va_control.details.IpsDetailWindow(parent=None, prefix='', id_num='')[source]
+

Bases: _SiriusWindow, BaseFunctionsInterface

+

Display IPS Detail Window

+
+
+buildGroup(info, title)[source]
+

Display one detail group

+
+ +
+
+buildIPSDetail(info)[source]
+

Display IPS measurement complete information

+
+ +
+ +
+
+class siriushla.li_va_control.details.VgcDetailWindow(parent=None, prefix='', id_num='')[source]
+

Bases: _SiriusWindow, BaseFunctionsInterface

+

Display VGC Detail Window

+
+
+buildVgcTable()[source]
+

Create the information columns

+
+ +
+
+setupDevices(title, data, lay, col)[source]
+

Display the infomation of three devices of the same group

+
+ +
+ +
+
+

siriushla.li_va_control.functions module

+

Basic functions

+
+
+class siriushla.li_va_control.functions.BaseFunctionsInterface[source]
+

Bases: object

+

Export basic functions to the Vacuum windows

+
+
+SPRBWidget(title, control, readback, wid_type, kp_unit=False, precision=True, sec_wid='label')[source]
+

Build a setpoint and readback widget: +title + setpoint + readback

+
+ +
+
+buildAllLegends(listleg={'CCG': [{'color': <PyQt5.QtGui.QColor object>, 'text': 'Ok'}, {'color': <PyQt5.QtGui.QColor object>, 'text': 'Warning'}, {'color': <PyQt5.QtGui.QColor object>, 'text': 'Alarm'}], 'Gauge Status': [{'color': <PyQt5.QtGui.QColor object>, 'text': 'ON'}, {'color': <PyQt5.QtGui.QColor object>, 'text': 'Inconsistent'}, {'color': <PyQt5.QtGui.QColor object>, 'text': 'OFF'}], 'PRG': [{'color': <PyQt5.QtGui.QColor object>, 'text': 'Ok'}, {'color': <PyQt5.QtGui.QColor object>, 'text': 'Warning'}], 'Relay Status': [{'text': 'ENABLE: Depends on the pressure\n and the setpoint value'}, {'text': 'SET: Forces relay activation'}, {'text': 'CLEAR: Disable the relay'}], 'size': [8.5, 15]})[source]
+

Display all the legends

+
+ +
+
+buildBasicGroup(cat, id_num, orient='V')[source]
+

Build anc configure group template

+
+ +
+
+buildIPSInfo(pv_name, lay, orient)[source]
+

Display IPS measurement information

+
+ +
+
+buildIdName(id_num, is_valve=False)[source]
+

Format number in the PV name

+
+ +
+
+buildIdsVac(id_num)[source]
+

Get VGC group and individual identity and with VGC id

+
+ +
+
+buildLed(pv_name, sufix_list, comp)[source]
+

Build and configure different types of Led

+
+ +
+
+buildVacPv(id_num)[source]
+

Generate VGC PV name with VGC id

+
+ +
+
+getGroupTitle(cat, id_num)[source]
+

Get element simple name

+
+ +
+
+getLayout(orient='G')[source]
+

Get Layout with correct orientation

+
+ +
+
+getLayoutWidget(orient='G')[source]
+

Get Widget with a layout inside

+
+ +
+
+getProgressBar(pv_name, limit, color=<PyQt5.QtGui.QColor object>)[source]
+

Create and configure Progress Bar

+
+ +
+
+getSPTable(num, gen, data, show_title=False, alternative=False)[source]
+

Build and configure VGC SP table

+
+ +
+
+getSimplePvWidget(title, suf, num, gen)[source]
+

Get simple VGC widget

+
+ +
+
+getSufixes(data)[source]
+

Format sufixes based on info type

+
+ +
+
+getVacPosition(id_vgc, divide=True)[source]
+

Get VGC widget position on the VGC Lists

+
+ +
+
+getVgcLed(name, gen, suf_list)[source]
+

Select led type based on VGC identity

+
+ +
+
+getVgcSPRB(data, pv_list, num, gen, sec_wid='led')[source]
+

Use dict info to create a self.SPRBWidget

+
+ +
+
+getWidget(name, wid_type='button', keep_unit=False, precision=True)[source]
+

Build and configure widgets used

+
+ +
+
+setWindowBtn(cat, id_num)[source]
+

Create and configure button to open detail windows

+
+ +
+
+setupLegend(legend)[source]
+

Show one of the legends present in the LEGEND variable in util

+
+ +
+
+setupUnitView(pv_name, color='#00000000', min_width=3)[source]
+

Create and format SiriusLabel

+
+ +
+ +
+
+siriushla.li_va_control.functions.getShape(name)[source]
+

Get led shape number

+
+ +
+
+siriushla.li_va_control.functions.headerWidget(title, alternative)[source]
+

Get SP Table Header Widget

+
+ +
+
+

siriushla.li_va_control.main module

+

Main window of the Vacuum Control.

+
+
+class siriushla.li_va_control.main.VacuumMain(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: QWidget, BaseFunctionsInterface

+

Vaccum Control Main Window

+
+
+buildAllLegendsRel()[source]
+

Display Legend in a relative widget

+
+ +
+
+buildVacInfo(config, id_num, lay)[source]
+

Display VGC basic information

+
+ +
+
+eventFilter(obj, event)[source]
+

Signal the resize event to the relative Widgets

+
+ +
+
+getGroupWidgets(config, item, cat, orient)[source]
+

Select and build group widget

+
+ +
+
+imageViewer()[source]
+

Build the image

+
+ +
+
+saveRelWid(widget, size, coord)[source]
+

Save relative widget to list

+
+ +
+
+saveWidToList(widget, cat)[source]
+

Save widget to list

+
+ +
+
+selWindow(cat)[source]
+

Open selected window with click

+
+ +
+
+setupButtons()[source]
+

Display button menu

+
+ +
+
+setupIPSList(config)[source]
+

Display IPS Widget List with all IPS elements

+
+ +
+
+setupLists(cat)[source]
+

Select which widget list to build

+
+ +
+
+setupMainWidgets(cat='Vacuum')[source]
+

Display relative widgets and save list items

+
+ +
+
+setupVgcList(config)[source]
+

Display VGC Widget List with all VGC elements

+
+ +
+ +
+
+

siriushla.li_va_control.util module

+

Static information about the PVs and colors

+
+
+

siriushla.li_va_control.widgets module

+

Contains the special widgets used in the windows

+
+
+class siriushla.li_va_control.widgets.LedLegend(parent=None, shape=1, color='#FFFFFF')[source]
+

Bases: QWidget

+

Drawing of a Led for the Legend

+
+
+drawSingleLed(painter, color, pos_x, width)[source]
+

Draw a single Led

+
+ +
+
+getShape(painter, pos, size)[source]
+

Draw different shapes of led

+
+ +
+
+paintEvent(event)[source]
+

Called to paint led on the window

+
+ +
+ +
+
+class siriushla.li_va_control.widgets.PyDMLedMultiIncosistencyDetector(parent=None, channels2values={}, color_list=[<PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>])[source]
+

Bases: PyDMLedMultiChannel

+

Drawing of a Led for the Legend

+
+
+LightGreen = <PyQt5.QtGui.QColor object>
+
+ +
+
+Red = <PyQt5.QtGui.QColor object>
+
+ +
+
+Yellow = <PyQt5.QtGui.QColor object>
+
+ +
+ +
+
+class siriushla.li_va_control.widgets.QGroupBoxButton(parent=None, title='')[source]
+

Bases: QGroupBox

+

A clickable GroupBox

+
+
+mousePressEvent(event)[source]
+

Emit a clicked function in the GroupBox

+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.si_ap_fofb.html b/siriushla.si_ap_fofb.html new file mode 100644 index 000000000..876a9f252 --- /dev/null +++ b/siriushla.si_ap_fofb.html @@ -0,0 +1,486 @@ + + + + + + + siriushla.si_ap_fofb — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.si_ap_fofb

+
+

Code Documentation

+
+
+

siriushla.si_ap_fofb.base module

+

Base module.

+
+
+class siriushla.si_ap_fofb.base.BaseObject(device, prefix='')[source]
+

Bases: BaseObject

+

Base object.

+
+
+UM2M = 1e-06
+
+ +
+
+UM2NM = 1000.0
+
+ +
+
+URAD2RAD = 1e-06
+
+ +
+
+property acc
+

Accelerator.

+
+ +
+
+property acc_idx
+

Accelerator index.

+
+ +
+
+property isring
+

Whether accelerator is a ring.

+
+ +
+ +
+
+class siriushla.si_ap_fofb.base.BaseWidget(parent, device, prefix='')[source]
+

Bases: BaseWidget, BaseObject

+

Base widget.

+
+ +
+
+siriushla.si_ap_fofb.base.get_fofb_icon(color=True)[source]
+

Return default icon.

+
+ +
+
+

siriushla.si_ap_fofb.custom_widgets module

+

Custom widgets.

+
+
+class siriushla.si_ap_fofb.custom_widgets.BPMSwModeWidget(parent, device, prefix='')[source]
+

Bases: BaseObject, QWidget

+

Auxiliary BPM switching control widget.

+
+ +
+
+class siriushla.si_ap_fofb.custom_widgets.ControllersDetailDialog(parent, device, prefix='', tab_selected=0)[source]
+

Bases: BaseObject, _SiriusWindow

+

Controllers detail dialog.

+
+ +
+
+class siriushla.si_ap_fofb.custom_widgets.PSConfigWidget(parent, device, prefix='')[source]
+

Bases: BaseObject, QWidget

+

Basic widget to set and get a configuration from ServConf.

+
+ +
+
+class siriushla.si_ap_fofb.custom_widgets.RefOrbWidget(parent, device, prefix='')[source]
+

Bases: BaseObject, QWidget

+

Reference Orbit widget.

+
+ +
+
+class siriushla.si_ap_fofb.custom_widgets.StatusDialog(parent, pvname, labels, cmds, title='', detail_button=None)[source]
+

Bases: _SiriusWindow

+

Status Detail Dialog.

+
+ +
+
+

siriushla.si_ap_fofb.graphics module

+

Graphics module.

+
+
+class siriushla.si_ap_fofb.graphics.CorrGainWidget(parent, device, prefix='')[source]
+

Bases: BaseObject, QWidget

+

Corrector gain widget.

+
+ +
+
+class siriushla.si_ap_fofb.graphics.KickWidget(parent, device, prefix='')[source]
+

Bases: BaseObject, QWidget

+

Corrector kicks widget.

+
+ +
+
+class siriushla.si_ap_fofb.graphics.MatrixWidget(parent, device, propty, prefix='')[source]
+

Bases: BaseObject, QWidget

+

Matrix widget.

+
+ +
+
+class siriushla.si_ap_fofb.graphics.RefOrbViewWidget(parent, device, prefix='')[source]
+

Bases: BaseObject, _SiriusWindow

+

RefOrb View widget.

+
+ +
+
+

siriushla.si_ap_fofb.main module

+

High level FOFB main module.

+
+
+class siriushla.si_ap_fofb.main.MainWindow(parent=None, prefix='', device='')[source]
+

Bases: BaseObject, _SiriusWindow

+

FOFB Main Window.

+
+ +
+
+

siriushla.si_ap_fofb.respmat module

+

RespMat.

+
+
+class siriushla.si_ap_fofb.respmat.RespMatWidget(parent, device, prefix='')[source]
+

Bases: RespMatWidget, BaseWidget

+

FOFB RespMat widget.

+
+
+get_main_widget(parent)[source]
+
+ +
+
+get_selection_lists_widget(parent)[source]
+

Selection lists.

+
+ +
+ +
+
+class siriushla.si_ap_fofb.respmat.SelectionMatrix(parent, device, prefix='', rules=None)[source]
+

Bases: BaseWidget

+
+ +
+
+class siriushla.si_ap_fofb.respmat.SingleSelMatrix(parent, dev, device, prefix='', rules=None)[source]
+

Bases: SingleSelMatrix, BaseObject

+

Create the Selection Matrices for BPMs and Correctors.

+
+
+get_headers()[source]
+

Should be implemented in class derivation.

+
+
Returns:
+

    +
  • top_headers (tuple or list) – A list of strings for top headers of the selection matrix widget.

  • +
  • side_headers (tuple or list) – A list of strings for side headers of the selection matrix widget.

  • +
+

+
+
+
+ +
+
+get_positions()[source]
+

Should be implemented in class derivation.

+
+
Returns:
+

positions – A tuple or list of layout positions for each widget +returned by get_widgets.

+
+
Return type:
+

tuple or list

+
+
+
+ +
+ +
+
+

siriushla.si_ap_fofb.trig_acq_config module

+

System identification module.

+
+
+class siriushla.si_ap_fofb.trig_acq_config.FOFBAcqBaseWindow(parent=None, prefix='', device='')[source]
+

Bases: AcqBaseWindow

+

FOFB acquisition base window

+
+
+CONV_IDX2BPM = {0: 'M1', 1: 'M2', 2: 'C1-1', 3: 'C1-2', 4: 'C2', 5: 'C3-1', 6: 'C3-2', 7: 'C4'}
+
+ +
+ +
+
+class siriushla.si_ap_fofb.trig_acq_config.FOFBAcqLAMPWindow(parent=None, prefix='', device='')[source]
+

Bases: FOFBAcqBaseWindow

+

FOFB lamp acquisition window.

+
+
+ACQCORE = 'LAMP'
+
+ +
+ +
+
+class siriushla.si_ap_fofb.trig_acq_config.FOFBAcqSYSIDWindow(parent=None, prefix='', device='')[source]
+

Bases: FOFBAcqBaseWindow

+

FOFB system identification acquisition window.

+
+
+ACQCORE = 'SYSID'
+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.si_ap_genstatus.html b/siriushla.si_ap_genstatus.html new file mode 100644 index 000000000..889223388 --- /dev/null +++ b/siriushla.si_ap_genstatus.html @@ -0,0 +1,210 @@ + + + + + + + siriushla.si_ap_genstatus — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.si_ap_genstatus

+
+

Code Documentation

+
+
+

siriushla.si_ap_genstatus.main module

+

Sirius General Status Window.

+
+
+class siriushla.si_ap_genstatus.main.SIGenStatusWindow(prefix=siriuspy.envars.VACA_PREFIX, parent=None)[source]
+

Bases: _SiriusWindow

+

Sirius General Status Window.

+
+
+changeEvent(event)[source]
+

Change event handler.

+
+ +
+
+formatLifetimeLabel(value)[source]
+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.si_ap_idff.html b/siriushla.si_ap_idff.html new file mode 100644 index 000000000..9d9526d83 --- /dev/null +++ b/siriushla.si_ap_idff.html @@ -0,0 +1,277 @@ + + + + + + + siriushla.si_ap_idff — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.si_ap_idff

+
+

Code Documentation

+
+
+

siriushla.si_ap_idff.custom_widgets module

+

Custom widgets.

+
+
+class siriushla.si_ap_idff.custom_widgets.ConfigLineEdit(parent=None, init_channel=None)[source]
+

Bases: PyDMLineEdit

+

Configuration line edit.

+
+
+mouseReleaseEvent(_)[source]
+

Reimplement mouseReleaseEvent.

+
+ +
+ +
+
+class siriushla.si_ap_idff.custom_widgets.SectionedWaveformCurveItem(section, **kwargs)[source]
+

Bases: WaveformCurveItem

+
+
+GAP_MAX = 24
+
+ +
+
+GAP_MIN = 0
+
+ +
+
+receiveYWaveform(new_waveform)[source]
+

Handler for new y waveform data. This method is usually called by a +PyDMChannel when it updates. You can call this yourself to inject data +into the curve.

+
+
Parameters:
+

new_waveform (numpy.ndarray) – A new array values for the Y axis.

+
+
+
+ +
+ +
+
+

siriushla.si_ap_idff.main module

+

Main window.

+
+
+class siriushla.si_ap_idff.main.IDFFWindow(parent=None, prefix='', idname='')[source]
+

Bases: _SiriusWindow

+

ID FF main window.

+
+
+addNewTableCurve(plt, name, section)[source]
+
+ +
+ +
+
+

siriushla.si_ap_idff.util module

+

Utilities.

+
+
+siriushla.si_ap_idff.util.get_idff_icon(color=True)[source]
+

Return IDFF icon.

+
+ +
+
+

Module contents

+

SI ID feedforward.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.si_ap_orbintlk.html b/siriushla.si_ap_orbintlk.html new file mode 100644 index 000000000..44b15485b --- /dev/null +++ b/siriushla.si_ap_orbintlk.html @@ -0,0 +1,811 @@ + + + + + + + siriushla.si_ap_orbintlk — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.si_ap_orbintlk

+
+

Code Documentation

+
+
+

siriushla.si_ap_orbintlk.base module

+

Base Object.

+
+
+class siriushla.si_ap_orbintlk.base.BaseObject(*args: Any, **kwargs: Any)[source]
+

Bases: BaseOrbitIntlk

+

Base SI BPM info object.

+
+
+CONV_NM2M = 1e-09
+
+ +
+
+CONV_UM2NM = 1000.0
+
+ +
+
+get_ref_orb(configname)[source]
+

Get reference orbit from config [um].

+
+
Parameters:
+

configname (str) – si orbit configuration name.

+
+
Returns:
+

si orbit configuration value from ConfigDB

+
+
Return type:
+

si_orbit

+
+
+
+ +
+
+property monitsum2intlksum_factor
+

Return factor between BPM Monit Sum and interlock Sum.

+
+ +
+ +
+
+

siriushla.si_ap_orbintlk.bpmdetail module

+

Individual BPM Orbit Interlock Window.

+
+
+class siriushla.si_ap_orbintlk.bpmdetail.BPMOrbIntlkDetailWindow(*args: Any, **kwargs: Any)[source]
+

Bases: BaseObject, _SiriusWindow

+

Individual BPM Orbit Interlock Window.

+
+ +
+
+

siriushla.si_ap_orbintlk.custom_widgets module

+

BPM Interlock Buttons.

+
+
+class siriushla.si_ap_orbintlk.custom_widgets.BPMIntlkEnblWidget(*args: Any, **kwargs: Any)[source]
+

Bases: _BPMSelectionWidget, PyDMWidget

+

BPM Orbit Interlock Enable Widget.

+
+
+connection_changed(new_conn)[source]
+

Callback invoked when the connection state of the Channel is changed. +This callback acts on the connection state to enable/disable the widget +and also trigger the change on alarm severity to ALARM_DISCONNECTED.

+
+
Parameters:
+

connected (int) – When this value is 0 the channel is disconnected, 1 otherwise.

+
+
+
+ +
+
+send_value()[source]
+

Send new value.

+
+ +
+
+value_changed(new_val)[source]
+

Callback invoked when the Channel value is changed.

+
+
Parameters:
+

new_val (str, int, float, bool or np.ndarray) – The new value from the channel. The type depends on the channel.

+
+
+
+ +
+ +
+
+class siriushla.si_ap_orbintlk.custom_widgets.BPMIntlkLimSPWidget(*args: Any, **kwargs: Any)[source]
+

Bases: BaseObject, QWidget

+

BPM Orbit Interlock Limit Setpoint Widget.

+
+
+send_value()[source]
+

Send new value.

+
+ +
+ +
+
+class siriushla.si_ap_orbintlk.custom_widgets.MonitoredDevicesDialog(*args: Any, **kwargs: Any)[source]
+

Bases: BaseObject, QDialog

+

Monitored Devices Detail Dialog.

+
+ +
+
+class siriushla.si_ap_orbintlk.custom_widgets.RefOrbComboBox(parent=None)[source]
+

Bases: QComboBox

+

Reference Orbit Selection ComboBox.

+
+
+refOrbChanged
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+

siriushla.si_ap_orbintlk.graphics module

+

Graph Widgets.

+
+
+class siriushla.si_ap_orbintlk.graphics.AngXGraphWidget(*args: Any, **kwargs: Any)[source]
+

Bases: _BaseGraphWidget

+

Angulation Graph Widget.

+
+
+INTLKTYPE = 'AngX'
+
+ +
+
+PROPTY_MAX_DATA = 'IntlkLmtAngMaxX-RB'
+
+ +
+
+PROPTY_MAX_SYMB = {'Instantaneous': 'IntlkAngUpperX-Mon', 'Latch': 'IntlkAngUpperLtcX-Mon'}
+
+ +
+
+PROPTY_MEAS_DATA = 'IntlkAngX-Mon'
+
+ +
+
+PROPTY_MEAS_SYMB = {'Instantaneous': {'General': 'Intlk-Mon'}, 'Latch': {'General': 'IntlkLtc-Mon'}}
+
+ +
+
+PROPTY_MIN_DATA = 'IntlkLmtAngMinX-RB'
+
+ +
+
+PROPTY_MIN_SYMB = {'Instantaneous': 'IntlkAngLowerX-Mon', 'Latch': 'IntlkAngLowerLtcX-Mon'}
+
+ +
+ +
+
+class siriushla.si_ap_orbintlk.graphics.AngYGraphWidget(*args: Any, **kwargs: Any)[source]
+

Bases: _BaseGraphWidget

+

Angulation Graph Widget.

+
+
+INTLKTYPE = 'AngY'
+
+ +
+
+PROPTY_MAX_DATA = 'IntlkLmtAngMaxY-RB'
+
+ +
+
+PROPTY_MAX_SYMB = {'Instantaneous': 'IntlkAngUpperY-Mon', 'Latch': 'IntlkAngUpperLtcY-Mon'}
+
+ +
+
+PROPTY_MEAS_DATA = 'IntlkAngY-Mon'
+
+ +
+
+PROPTY_MEAS_SYMB = {'Instantaneous': {'General': 'Intlk-Mon'}, 'Latch': {'General': 'IntlkLtc-Mon'}}
+
+ +
+
+PROPTY_MIN_DATA = 'IntlkLmtAngMinY-RB'
+
+ +
+
+PROPTY_MIN_SYMB = {'Instantaneous': 'IntlkAngLowerY-Mon', 'Latch': 'IntlkAngLowerLtcY-Mon'}
+
+ +
+ +
+
+class siriushla.si_ap_orbintlk.graphics.Graph(*args: Any, **kwargs: Any)[source]
+

Bases: BaseObject, SiriusWaveformPlot

+

BPM orbit interlock data graph.

+
+
+mouseDoubleClickEvent(event)[source]
+

Reimplement mouseDoubleClickEvent.

+
+ +
+
+property symbols_max
+

Return symbols for max curve.

+
+ +
+
+property symbols_meas
+

Return symbols for meas curve.

+
+ +
+
+property symbols_min
+

Return symbols for min curve.

+
+ +
+
+property tooltips
+

Return tooltips.

+
+ +
+
+property x_data
+

Return x_data.

+
+ +
+
+property y_data_max
+

Return y_data for max curve.

+
+ +
+
+property y_data_meas
+

Return y_data for meas curve.

+
+ +
+
+property y_data_min
+

Return y_data for min curve.

+
+ +
+ +
+
+class siriushla.si_ap_orbintlk.graphics.GraphLegendWidget(parent=None, metric='', plan='')[source]
+

Bases: QWidget

+

Graph Legend Widget.

+
+ +
+
+class siriushla.si_ap_orbintlk.graphics.GraphMonitorWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: QWidget

+

Graph Monitor Widget.

+
+ +
+
+class siriushla.si_ap_orbintlk.graphics.GraphProptySelWidget(parent=None)[source]
+

Bases: QWidget

+

Graph Interlock and Comparision Type Selelction Widget.

+
+
+propty_comp_changed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+propty_intlk_changed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+propty_reforb_changed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+class siriushla.si_ap_orbintlk.graphics.MinSumGraphWidget(*args: Any, **kwargs: Any)[source]
+

Bases: _BaseGraphWidget

+

MinSum Graph Widget.

+
+
+INTLKTYPE = 'MinSum'
+
+ +
+
+PROPTY_MAX_DATA = ''
+
+ +
+
+PROPTY_MAX_SYMB = ''
+
+ +
+
+PROPTY_MEAS_DATA = 'SlowSumRaw-Mon'
+
+ +
+
+PROPTY_MEAS_SYMB = ''
+
+ +
+
+PROPTY_MIN_DATA = 'IntlkLmtMinSum-RB'
+
+ +
+
+PROPTY_MIN_SYMB = ''
+
+ +
+ +
+
+class siriushla.si_ap_orbintlk.graphics.PosXGraphWidget(*args: Any, **kwargs: Any)[source]
+

Bases: _BaseGraphWidget

+

Position Graph Widget.

+
+
+INTLKTYPE = 'PosX'
+
+ +
+
+PROPTY_MAX_DATA = 'IntlkLmtPosMaxX-RB'
+
+ +
+
+PROPTY_MAX_SYMB = {'Instantaneous': 'IntlkPosUpperX-Mon', 'Latch': 'IntlkPosUpperLtcX-Mon'}
+
+ +
+
+PROPTY_MEAS_DATA = 'IntlkPosX-Mon'
+
+ +
+
+PROPTY_MEAS_SYMB = {'Instantaneous': {'General': 'Intlk-Mon'}, 'Latch': {'General': 'IntlkLtc-Mon'}}
+
+ +
+
+PROPTY_MIN_DATA = 'IntlkLmtPosMinX-RB'
+
+ +
+
+PROPTY_MIN_SYMB = {'Instantaneous': 'IntlkPosLowerX-Mon', 'Latch': 'IntlkPosLowerLtcX-Mon'}
+
+ +
+ +
+
+class siriushla.si_ap_orbintlk.graphics.PosYGraphWidget(*args: Any, **kwargs: Any)[source]
+

Bases: _BaseGraphWidget

+

Position Graph Widget.

+
+
+INTLKTYPE = 'PosY'
+
+ +
+
+PROPTY_MAX_DATA = 'IntlkLmtPosMaxY-RB'
+
+ +
+
+PROPTY_MAX_SYMB = {'Instantaneous': 'IntlkPosUpperY-Mon', 'Latch': 'IntlkPosUpperLtcY-Mon'}
+
+ +
+
+PROPTY_MEAS_DATA = 'IntlkPosY-Mon'
+
+ +
+
+PROPTY_MEAS_SYMB = {'Instantaneous': {'General': 'Intlk-Mon'}, 'Latch': {'General': 'IntlkLtc-Mon'}}
+
+ +
+
+PROPTY_MIN_DATA = 'IntlkLmtPosMinY-RB'
+
+ +
+
+PROPTY_MIN_SYMB = {'Instantaneous': 'IntlkPosLowerY-Mon', 'Latch': 'IntlkPosLowerLtcY-Mon'}
+
+ +
+ +
+
+

siriushla.si_ap_orbintlk.main module

+

BPM Orbit Interlock Main Window.

+
+
+class siriushla.si_ap_orbintlk.main.BPMOrbIntlkMainWindow(*args: Any, **kwargs: Any)[source]
+

Bases: BaseObject, _SiriusWindow

+

BPM Orbit Interlock Control Window.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.si_di_bbb.html b/siriushla.si_di_bbb.html new file mode 100644 index 000000000..a57830923 --- /dev/null +++ b/siriushla.si_di_bbb.html @@ -0,0 +1,518 @@ + + + + + + + siriushla.si_di_bbb — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.si_di_bbb

+
+

Code Documentation

+
+
+

siriushla.si_di_bbb.acquisition module

+

BbB Acquisition Module.

+
+
+class siriushla.si_di_bbb.acquisition.BbBAcqBRAM(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: _BbBAcqBase

+

BbB BRAM Acquisition Widget.

+
+
+TYPE = 'BRAM'
+
+ +
+ +
+
+class siriushla.si_di_bbb.acquisition.BbBAcqSB(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QWidget

+

BbB Tune Tracking Acquisition Widget.

+
+ +
+
+class siriushla.si_di_bbb.acquisition.BbBAcqSRAM(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: _BbBAcqBase

+

BbB SRAM Acquisition Widget.

+
+
+TYPE = 'SRAM'
+
+ +
+ +
+
+

siriushla.si_di_bbb.advanced_settings module

+

BbB Devices Module.

+
+
+class siriushla.si_di_bbb.advanced_settings.BbBADCWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QWidget

+

BbB 8-Channel ADC Widget.

+
+ +
+
+class siriushla.si_di_bbb.advanced_settings.BbBAdvancedSettingsWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QWidget

+

BbB Advanced Settings Widget.

+
+ +
+
+class siriushla.si_di_bbb.advanced_settings.BbBGeneralSettingsWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QWidget

+

BbB General Settings Widget.

+
+ +
+
+class siriushla.si_di_bbb.advanced_settings.BbBInterlock(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QWidget

+

BbB Interlock Settings Widget.

+
+ +
+
+class siriushla.si_di_bbb.advanced_settings.BbBSlowDACsWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QWidget

+

BbB Slow DACs Settings Widget.

+
+ +
+
+

siriushla.si_di_bbb.bbb module

+

BbB Control Module.

+
+
+class siriushla.si_di_bbb.bbb.BbBControlWindow(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: _SiriusWindow

+

BbB Control Window.

+
+ +
+
+class siriushla.si_di_bbb.bbb.BbBInfoWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QGroupBox

+

BbB Info Widget.

+
+ +
+
+class siriushla.si_di_bbb.bbb.BbBMainSettingsWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='', resume=True)[source]
+

Bases: QWidget

+

BbB Main Senttings Widget.

+
+ +
+
+class siriushla.si_di_bbb.bbb.BbBStatusWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='', resume=False)[source]
+

Bases: QWidget

+

.

+
+ +
+
+

siriushla.si_di_bbb.coefficients module

+

BbB Coefficients Module.

+
+
+class siriushla.si_di_bbb.coefficients.BbBCoefficientsWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QWidget

+

BbB Coefficients Settings Widget.

+
+ +
+
+class siriushla.si_di_bbb.coefficients.Label(parent=None, init_channel=None, keep_unit=False, **kws)[source]
+

Bases: SiriusLabel

+

.

+
+
+value_changed(new_value)[source]
+

.

+
+ +
+ +
+
+

siriushla.si_di_bbb.custom_widgets module

+

Custom Widgets Module.

+
+
+class siriushla.si_di_bbb.custom_widgets.TimeGraph(*args, **kwargs)[source]
+

Bases: SiriusTimePlot

+

SiriusTimePlot rederivation.

+
+ +
+
+class siriushla.si_di_bbb.custom_widgets.WfmGraph(*args, **kwargs)[source]
+

Bases: SiriusWaveformPlot

+

SiriusWaveformPlot rederivation.

+
+
+add_marker(xchannel, ychannel, name, color=<PyQt5.QtGui.QColor object>, symbol='o', symbolSize=10)[source]
+

.

+
+ +
+
+add_scatter_curve(ychannel='', xchannel='', name='', color=<PyQt5.QtGui.QColor object>, lineStyle=0, lineWidth=1, symbolSize=10, nchannel=None, offset=None)[source]
+

.

+
+ +
+ +
+
+

siriushla.si_di_bbb.drive module

+

BbB Drive Module.

+
+
+class siriushla.si_di_bbb.drive.BbBDriveSettingsWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QWidget

+

BbB Drive Settings Widget.

+
+ +
+
+class siriushla.si_di_bbb.drive.BbBSingleDriveSettingsWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='', dr_num=None)[source]
+

Bases: QWidget

+

BbB Drive Settings Widget.

+
+ +
+
+

siriushla.si_di_bbb.environment module

+

BbB Environment Module.

+
+
+class siriushla.si_di_bbb.environment.BbBEnvironmMonWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QWidget

+

BbB Environment Monitor Widget.

+
+ +
+
+

siriushla.si_di_bbb.gpio module

+

BbB GPIO Module.

+
+
+class siriushla.si_di_bbb.gpio.BbBGPIOWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QWidget

+

BbB GPIO Settings Widget.

+
+ +
+
+

siriushla.si_di_bbb.main module

+

BbB Main Module.

+
+
+class siriushla.si_di_bbb.main.BbBMainWindow(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: _SiriusWindow

+

BbB Main Window.

+
+ +
+
+

siriushla.si_di_bbb.masks module

+

BbB Devices Module.

+
+
+class siriushla.si_di_bbb.masks.BbBMasksWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QWidget

+

BbB Masks Settings Widget.

+
+ +
+
+

siriushla.si_di_bbb.pwr_amps module

+

BbB Devices Module.

+
+
+class siriushla.si_di_bbb.pwr_amps.BbBPwrAmpsWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QWidget

+

BbB Power Amplifiers Settings Widget.

+
+ +
+
+

siriushla.si_di_bbb.timing module

+

BbB Timing Module.

+
+
+class siriushla.si_di_bbb.timing.BbBTimingWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: QWidget

+

BbB Timing Settings Widget.

+
+ +
+
+

siriushla.si_di_bbb.util module

+

BbB Util Module.

+
+
+siriushla.si_di_bbb.util.get_bbb_icon()[source]
+

Get BbB icon.

+
+ +
+
+siriushla.si_di_bbb.util.set_bbb_color(obj, device)[source]
+

Set BbB color.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.si_di_equalize_bpms.html b/siriushla.si_di_equalize_bpms.html new file mode 100644 index 000000000..598a7d762 --- /dev/null +++ b/siriushla.si_di_equalize_bpms.html @@ -0,0 +1,285 @@ + + + + + + + siriushla.si_di_equalize_bpms — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.si_di_equalize_bpms

+
+

Code Documentation

+
+
+

siriushla.si_di_equalize_bpms.main module

+

Main module of the Application Interface.

+
+
+class siriushla.si_di_equalize_bpms.main.BPMsEqualizeSwitching(parent=None)[source]
+

Bases: _SiriusWindow

+

.

+
+
+DEFAULT_DIR = '/home/runner/shared/screens-iocs/data_by_day'
+
+ +
+
+EXTS = ('.pickle', '.pkl', '.h5', '.hdf5', '.hdf', '.hd5')
+
+ +
+
+EXT_FLT = 'Pickle Files (*.pickle *.pkl);;HDF5 file (*.h5 *.hdf5 *.hdf *.hd5)'
+
+ +
+
+create_central_widget()[source]
+

.

+
+ +
+
+get_acq_control_widget(parent)[source]
+

.

+
+ +
+
+get_analysis_control_widget(parent)[source]
+

.

+
+ +
+
+get_application_widget(parent)[source]
+

.

+
+ +
+
+get_check_data_widget(parent)[source]
+

.

+
+ +
+
+get_plots_widget(parent)[source]
+

.

+
+ +
+
+get_saveload_widget(parent)[source]
+

.

+
+ +
+
+get_status_widget(parent)[source]
+

.

+
+ +
+
+get_update_reforb_widget(parent)[source]
+

.

+
+ +
+
+setupui()[source]
+

.

+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.si_di_scraps.html b/siriushla.si_di_scraps.html new file mode 100644 index 000000000..516165539 --- /dev/null +++ b/siriushla.si_di_scraps.html @@ -0,0 +1,234 @@ + + + + + + + siriushla.si_di_scraps — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.si_di_scraps

+
+

Code Documentation

+
+
+

siriushla.si_di_scraps.Scrap_monitor module

+

HLA SI Scrapers monitoring Window.

+
+
+class siriushla.si_di_scraps.Scrap_monitor.ScraperMonitoring(parent=None, prefix='', device='')[source]
+

Bases: DiffCtrlDevMonitor

+

Scraper Monitor Widget.

+
+
+channels()[source]
+

Return channels.

+
+ +
+
+updateDevWidget()[source]
+

Update Scraper illustration.

+
+ +
+ +
+
+class siriushla.si_di_scraps.Scrap_monitor.ScrapersView(parent=None, prefix='')[source]
+

Bases: DiffCtrlView

+

Scrapers View Widget.

+
+
+DEVICE_CLASS
+

alias of ScraperMonitoring

+
+ +
+
+DEVICE_PREFIX = 'SI-01SA:DI-Scrap'
+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.si_id_control.html b/siriushla.si_id_control.html new file mode 100644 index 000000000..4c1bf55d7 --- /dev/null +++ b/siriushla.si_id_control.html @@ -0,0 +1,551 @@ + + + + + + + siriushla.si_id_control — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.si_id_control

+
+

Code Documentation

+
+
+

siriushla.si_id_control.apu module

+

APU Control Module.

+
+
+class siriushla.si_id_control.apu.APUAlarmDetails(parent=None, prefix='', device='')[source]
+

Bases: IDCommonDialog

+

APU Alarm Details Dialog.

+
+ +
+
+class siriushla.si_id_control.apu.APUControlWindow(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: IDCommonControlWindow

+

APU Control Window.

+
+ +
+
+class siriushla.si_id_control.apu.APUHardLLDetails(parent=None, prefix='', device='')[source]
+

Bases: IDCommonDialog

+

APU Hardware and LowLevel Details Dialog.

+
+ +
+
+class siriushla.si_id_control.apu.APUInterlockDetails(parent=None, prefix='', device='')[source]
+

Bases: IDCommonDialog

+

APU Interlock Details Dialog.

+
+ +
+
+class siriushla.si_id_control.apu.APUSummaryBase(parent=None)[source]
+

Bases: IDCommonSummaryBase

+

APU Summary Base Widget.

+
+
+MODEL_WIDTHS = (('Alarms', 4), ('Phase', 6), ('Phase Speed', 6), ('Start', 4), ('Stop', 4))
+
+ +
+ +
+
+class siriushla.si_id_control.apu.APUSummaryHeader(parent=None)[source]
+

Bases: IDCommonSummaryHeader, APUSummaryBase

+

APU Summary Header.

+
+ +
+
+class siriushla.si_id_control.apu.APUSummaryWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: IDCommonSummaryWidget, APUSummaryBase

+

APU Summary Widget.

+
+ +
+
+

siriushla.si_id_control.base module

+

ID Common classes module.

+
+
+class siriushla.si_id_control.base.IDCommonControlWindow(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: _SiriusWindow

+

ID Common Control Window.

+
+ +
+
+class siriushla.si_id_control.base.IDCommonDialog(parent=None, prefix='', device='', title='')[source]
+

Bases: _SiriusWindow

+

ID Common Auxiliary Dialog.

+
+ +
+
+class siriushla.si_id_control.base.IDCommonSummaryBase(parent=None)[source]
+

Bases: QWidget

+

ID Common Summary Widget.

+
+
+MODEL_WIDTHS = ()
+
+ +
+ +
+
+class siriushla.si_id_control.base.IDCommonSummaryHeader(parent=None)[source]
+

Bases: IDCommonSummaryBase

+

ID Common Summary Header.

+
+ +
+
+class siriushla.si_id_control.base.IDCommonSummaryWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: IDCommonSummaryBase

+

ID Common Summary Widget.

+
+
+disable_beamline_control()[source]
+

Disable beamline control.

+
+ +
+
+enable_beamline_control()[source]
+

Enable beamline control.

+
+ +
+ +
+
+

siriushla.si_id_control.delta module

+

DELTA Control Module.

+
+
+class siriushla.si_id_control.delta.DELTAControlWindow(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: IDCommonControlWindow, DELTAControlWindowUtils

+

DELTA Control Window.

+
+ +
+
+class siriushla.si_id_control.delta.DELTAControlWindowUtils[source]
+

Bases: object

+

.

+
+
+AUX_CONTROL_PVS = {'Acceleration': ('KParamAcc-SP', 'KParamAcc-RB', 'PParamAcc-SP', 'PParamAcc-RB'), 'Header': ('KParam', 'PParam'), 'Max. Acc.': {'RB': 'MaxAcc-RB', 'SP': 'MaxAcc-SP'}, 'Max. Speed': {'RB': 'MaxVelo-RB', 'SP': 'MaxVelo-SP'}, 'Start Parking': {'icon': 'fa5s.parking', 'pvname': 'StartParking-Cmd'}, 'Tolerance': ('PosTol-SP', 'PosTol-RB', 'PolTol-SP', 'PolTol-RB')}
+
+ +
+
+MAIN_CONTROL_PVS = {'Abort': {'icon': 'fa5s.stop', 'pvname': 'Abort-Cmd'}, 'Change KParam': {'icon': 'fa5s.play', 'pvname': 'KParamChange-Cmd'}, 'Change PParam': {'icon': 'fa5s.play', 'pvname': 'PParamChange-Cmd'}, 'Change Polarization': {'icon': 'fa5s.play', 'pvname': 'PolChange-Cmd'}, 'KParam': {'Mon': 'KParam-Mon', 'RB': 'KParam-RB', 'SP': 'KParam-SP'}, 'KParam Speed': {'RB': 'KParamVelo-RB', 'SP': 'KParamVelo-SP'}, 'Motors Enabled': 'MotorsEnbld-Mon', 'Moving': 'Moving-Mon', 'PParam': {'Mon': 'PParam-Mon', 'RB': 'PParam-RB', 'SP': 'PParam-SP'}, 'PParam Speed': {'RB': 'PParamVelo-RB', 'SP': 'PParamVelo-SP'}, 'Polarization': {'Mon': 'Pol-Mon', 'RB': 'Pol-Sts', 'SP': 'Pol-Sel'}}
+
+ +
+
+STATUS_PVS = {'Alarms': ('Alarm-Mon', 'AlarmBits-Mon', 'AlarmLabels-Cte'), 'Interlock': ('Intlk-Mon', 'IntlkBits-Mon', 'IntlkLabels-Cte'), 'Is Operational': 'IsOperational-Mon', 'Logs': {'IOC Log': 'Log-Mon', 'Sequencer State Machine Log': 'StateMachineLog-Mon'}, 'PLC State': 'PLCState-Mon', 'Sw': {'Killed': 'KillSw-Mon', 'Limit': 'LimSw-Mon'}}
+
+ +
+ +
+
+class siriushla.si_id_control.delta.DELTASummaryBase(parent=None)[source]
+

Bases: IDCommonSummaryBase

+

DELTA Summary Base Widget.

+
+
+MODEL_WIDTHS = (('Alarms', 4), ('Interlock', 4), ('KParam', 6), ('KParam Speed', 6), ('Start', 4), ('Stop', 4))
+
+ +
+ +
+
+class siriushla.si_id_control.delta.DELTASummaryHeader(parent=None)[source]
+

Bases: IDCommonSummaryHeader, DELTASummaryBase

+

DELTA Summary Header.

+
+ +
+
+class siriushla.si_id_control.delta.DELTASummaryWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: IDCommonSummaryWidget, DELTASummaryBase

+

DELTA Summary Widget.

+
+ +
+
+

siriushla.si_id_control.epu module

+

EPU Control Module.

+
+
+class siriushla.si_id_control.epu.EPUControlWindow(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: IDCommonControlWindow

+

EPU Control Window.

+
+ +
+
+class siriushla.si_id_control.epu.EPUDriveDetails(parent=None, prefix='', device='')[source]
+

Bases: IDCommonDialog

+

EPU Drive Details.

+
+ +
+
+class siriushla.si_id_control.epu.EPUSummaryBase(parent=None)[source]
+

Bases: IDCommonSummaryBase

+

EPU Summary Base Widget.

+
+
+MODEL_WIDTHS = (('Status', 4), ('Gap', 6), ('Gap Speed', 6), ('Start Gap', 4), ('Stop Gap', 4))
+
+ +
+ +
+
+class siriushla.si_id_control.epu.EPUSummaryHeader(parent=None)[source]
+

Bases: IDCommonSummaryHeader, EPUSummaryBase

+

EPU Summary Header.

+
+ +
+
+class siriushla.si_id_control.epu.EPUSummaryWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: IDCommonSummaryWidget, EPUSummaryBase

+

EPU Summary Widget.

+
+ +
+
+

siriushla.si_id_control.id_control module

+

ID Control Module.

+
+
+class siriushla.si_id_control.id_control.IDControl(parent=None, prefix=siriuspy.envars.VACA_PREFIX)[source]
+

Bases: _SiriusWindow

+

ID Control Window.

+
+
+contextMenuEvent(event)[source]
+

Show a custom context menu.

+
+ +
+
+show_connections(checked)[source]
+

Show connections.

+
+ +
+ +
+
+

siriushla.si_id_control.papu module

+

PAPU Control Module.

+
+
+class siriushla.si_id_control.papu.PAPUControlWindow(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: IDCommonControlWindow

+

PAPU Control Window.

+
+ +
+
+class siriushla.si_id_control.papu.PAPUDetails(parent=None, prefix='', device='')[source]
+

Bases: IDCommonDialog

+

PAPU Details.

+
+ +
+
+class siriushla.si_id_control.papu.PAPUSummaryBase(parent=None)[source]
+

Bases: IDCommonSummaryBase

+

PAPU Summary Base Widget.

+
+
+MODEL_WIDTHS = (('Status', 4), ('Phase', 6), ('Phase Speed', 6), ('Start Phase', 4), ('Stop Phase', 4))
+
+ +
+ +
+
+class siriushla.si_id_control.papu.PAPUSummaryHeader(parent=None)[source]
+

Bases: IDCommonSummaryHeader, PAPUSummaryBase

+

PAPU Summary Header.

+
+ +
+
+class siriushla.si_id_control.papu.PAPUSummaryWidget(parent=None, prefix=siriuspy.envars.VACA_PREFIX, device='')[source]
+

Bases: IDCommonSummaryWidget, PAPUSummaryBase

+

PAPU Summary Widget.

+
+ +
+
+

siriushla.si_id_control.util module

+
+
+siriushla.si_id_control.util.get_id_icon()[source]
+
+ +
+
+

Module contents

+

ID controls.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.tb_di_slits.html b/siriushla.tb_di_slits.html new file mode 100644 index 000000000..b36ad596a --- /dev/null +++ b/siriushla.tb_di_slits.html @@ -0,0 +1,234 @@ + + + + + + + siriushla.tb_di_slits — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.tb_di_slits

+
+

Code Documentation

+
+
+

siriushla.tb_di_slits.Slit_monitor module

+

HLA TB Slits monitoring Window.

+
+
+class siriushla.tb_di_slits.Slit_monitor.SlitMonitoring(parent=None, prefix='', device='')[source]
+

Bases: DiffCtrlDevMonitor

+

Class to create Slits Monitor Widget.

+
+
+channels()[source]
+

Return channels.

+
+ +
+
+updateDevWidget()[source]
+

Update Slit illustration.

+
+ +
+ +
+
+class siriushla.tb_di_slits.Slit_monitor.SlitsView(parent=None, prefix='')[source]
+

Bases: DiffCtrlView

+

Class to create Slits View Widget.

+
+
+DEVICE_CLASS
+

alias of SlitMonitoring

+
+ +
+
+DEVICE_PREFIX = 'TB-01:DI-Slit'
+
+ +
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.widgets.dialog.html b/siriushla.widgets.dialog.html new file mode 100644 index 000000000..42be804a8 --- /dev/null +++ b/siriushla.widgets.dialog.html @@ -0,0 +1,337 @@ + + + + + + + siriushla.widgets.dialog — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

siriushla.widgets.dialog

+
+

Code Documentation

+
+
+

siriushla.widgets.dialog.progress_dialog module

+

Dialog that handle thread that implement a task interface.

+

Task QThread Interface: +- itemDone: Signal +- size: method that return task size +- exit_task: set quit_thread flag True

+
+
+class siriushla.widgets.dialog.progress_dialog.ProgressDialog(label, task, parent=None)[source]
+

Bases: QDialog

+

Progress dialog.

+
+
Parameters:
+
    +
  • strings (label - string or list of) –

  • +
  • interface) (task - QThread or list of QThread (implementing task) –

  • +
  • QObject (parent -) –

  • +
+
+
+
+
+canceled
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+exec_()[source]
+

Override.

+
+ +
+
+inc_value()[source]
+

Increase value.

+
+ +
+
+set_value(value)[source]
+

Set progress bar value.

+
+ +
+ +
+
+

siriushla.widgets.dialog.ps_status_dialog module

+

List with power supplies cycling status.

+
+
+class siriushla.widgets.dialog.ps_status_dialog.PSList(pwrsupplies={}, parent=None)[source]
+

Bases: QListWidget

+

PS List.

+
+
+property pwrsupplies
+

List items.

+
+ +
+ +
+
+class siriushla.widgets.dialog.ps_status_dialog.PSStatusDialog(pwrsupplies={}, text='', parent=None)[source]
+

Bases: QDialog

+

Dialog to show list of pwrsupplies not ok.

+
+ +
+
+

siriushla.widgets.dialog.pv_status_dialog module

+

Status PV detail dialog.

+
+
+class siriushla.widgets.dialog.pv_status_dialog.StatusDetailDialog(pvname='', labels=None, pvname_labels='', section='', parent=None, title='')[source]
+

Bases: _SiriusWindow

+

Status Detail Dialog.

+
+ +
+
+

siriushla.widgets.dialog.report_dialog module

+

Report dialog.

+
+
+class siriushla.widgets.dialog.report_dialog.ReportDialog(items, parent=None)[source]
+

Bases: QDialog

+

Show a list of items.

+
+ +
+
+

Module contents

+

Dialog package.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/siriushla.widgets.html b/siriushla.widgets.html new file mode 100644 index 000000000..69144784b --- /dev/null +++ b/siriushla.widgets.html @@ -0,0 +1,5565 @@ + + + + + + + Widgets — siriushla 1.6.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Widgets

+
+

Subpackages

+ +
+
+

Code Documentation

+
+
+

siriushla.widgets.QDoubleScrollBar module

+

QDoubleScrollBar module.

+
+
+class siriushla.widgets.QDoubleScrollBar.QDoubleScrollBar(orientation=1, parent=None)[source]
+

Bases: QScrollBar

+

A QScrollBar that handles float values.

+
+
+contextMenuEvent(ev)[source]
+

Show context menu.

+
+ +
+
+decimals
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+dialogPageStep(value)[source]
+

Show dialog to set pageStep.

+
+ +
+
+dialogSingleStep(value)[source]
+

Show dialog to set singleStep.

+
+ +
+
+getDecimals()[source]
+

Return decimals.

+
+ +
+
+getMaximum()[source]
+

Return maximum value.

+
+ +
+
+getMinimum()[source]
+

Return minimum value.

+
+ +
+
+getPageStep()[source]
+

Get page step.

+
+ +
+
+getSingleStep()[source]
+

Get single step.

+
+ +
+
+getSliderPosition()[source]
+

Get slider position.

+
+ +
+
+getValue()[source]
+

Get value.

+
+ +
+
+keyPressEvent(event)[source]
+

Reimplement keyPressEvent.

+
+ +
+
+maximum
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+minimum
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+pageStep
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+rangeChanged
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+setDecimals(value)[source]
+

Set decimals.

+
+ +
+
+setMaximum(value)[source]
+

Set maximum value.

+
+ +
+
+setMinimum(value)[source]
+

Set minimum value.

+
+ +
+
+setPageStep(value)[source]
+

Set page step.

+
+ +
+
+setRange(mini, maxi)[source]
+

Set range.

+
+ +
+
+setSingleStep(value)[source]
+

Set single step.

+
+ +
+
+setSliderPosition(value)[source]
+

Set slider position.

+
+ +
+
+setValue(value)[source]
+

Set value.

+
+ +
+
+singleStep
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+sliderMoved
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+sliderPosition
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+value
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+valueChanged
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+

siriushla.widgets.QLed module

+

QLed module.

+

Based on Robert Kent’s LED Widget for the PyQt Framework, available on +https://pypi.python.org/pypi/QLed or https://github.com/jazzycamel/QLed.

+
+
+class siriushla.widgets.QLed.QLed(parent=None, **kwargs)[source]
+

Bases: QFrame, ShapeMap

+

QLed class.

+
+
+Blue = <PyQt5.QtGui.QColor object>
+
+ +
+
+DarkGreen = <PyQt5.QtGui.QColor object>
+
+ +
+
+DarkRed = <PyQt5.QtGui.QColor object>
+
+ +
+
+Gray = <PyQt5.QtGui.QColor object>
+
+ +
+
+Green = <PyQt5.QtGui.QColor object>
+
+ +
+
+LightGreen = <PyQt5.QtGui.QColor object>
+
+ +
+
+NotSelColor1 = <PyQt5.QtGui.QColor object>
+
+ +
+
+NotSelColor2 = <PyQt5.QtGui.QColor object>
+
+ +
+
+Red = <PyQt5.QtGui.QColor object>
+
+ +
+
+SelColor = <PyQt5.QtGui.QColor object>
+
+ +
+
+class ShapeMap
+

Bases: object

+

Shape enum mapping class.

+
+
+Circle = 1
+
+ +
+
+Rectangle = 5
+
+ +
+
+Round = 2
+
+ +
+
+Square = 3
+
+ +
+
+Triangle = 4
+
+ +
+ +
+
+Yellow = <PyQt5.QtGui.QColor object>
+
+ +
+
+abspath = '/home/runner/work/hla/hla/pyqt-apps/siriushla/widgets'
+
+ +
+
+adjust(r, g, b)[source]
+

Adjust the color to set on svg code.

+
+ +
+
+clicked
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+dsblColor
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+f = <PyQt5.QtCore.QFile object>
+
+ +
+
+getDsblColor()[source]
+

Disabled color property getter.

+
+ +
+
+getOffColor()[source]
+

Off color property getter.

+
+ +
+
+getOnColor()[source]
+

On color property getter.

+
+ +
+
+getRGBfromQColor(qcolor)[source]
+

Convert QColors to a tupple of rgb colors to set on svg code.

+
+ +
+
+getShape()[source]
+

Shape property getter.

+
+ +
+
+getState()[source]
+

Value property getter.

+
+ +
+
+isSelected()[source]
+

Return selected state of object.

+
+ +
+
+mousePressEvent(event)[source]
+

Handle mouse press event.

+
+ +
+
+mouseReleaseEvent(event)[source]
+

Handle mouse release event.

+
+ +
+
+offColor
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+onColor
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+paintEvent(event)[source]
+

Handle appearence of the widget on state updates.

+
+ +
+
+selected
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+setDsblColor(newColor)[source]
+

Disabled color property setter.

+
+ +
+
+setOffColor(newColor)[source]
+

Off color property setter.

+
+ +
+
+setOnColor(newColor)[source]
+

On color property setter.

+
+ +
+
+setSelected(sel)[source]
+

Configure selected state of object.

+
+ +
+
+setShape(newShape)[source]
+

Shape property setter.

+
+ +
+
+setState(value)[source]
+

Value property setter.

+
+ +
+
+shape
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+shapesdict = {1: '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"\n   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"\n   height="50.000000px"\n   id="svg9493"\n   width="50.000000px"\n   version="1.1"\n   inkscape:version="0.91 r13725"\n   sodipodi:docname="round_led4.svg">\n  <metadata\n     id="metadata4250">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <sodipodi:namedview\n     pagecolor="#ffffff"\n     bordercolor="#666666"\n     borderopacity="1"\n     objecttolerance="10"\n     gridtolerance="10"\n     guidetolerance="10"\n     inkscape:pageopacity="0"\n     inkscape:pageshadow="2"\n     inkscape:window-width="3840"\n     inkscape:window-height="2140"\n     id="namedview4248"\n     showgrid="false"\n     inkscape:zoom="14.014856"\n     inkscape:cx="2.8105841"\n     inkscape:cy="24.583514"\n     inkscape:window-x="0"\n     inkscape:window-y="0"\n     inkscape:window-maximized="1"\n     inkscape:current-layer="svg9493" />\n  <defs\n     id="defs9495">\n    <linearGradient\n       id="linearGradient4276">\n      <stop\n         id="stop4278"\n         offset="0.0000000"\n         style="stop-color:%s;stop-opacity:%s" />\n      <stop\n         id="stop4280"\n         offset="1.0000000"\n         style="stop-color:%s;stop-opacity:1" />\n    </linearGradient>\n    <linearGradient\n       gradientUnits="userSpaceOnUse"\n       id="linearGradient6650"\n       x1="23.402565"\n       x2="23.389874"\n       xlink:href="#linearGradient6506"\n       y1="44.066776"\n       y2="42.883698"\n       gradientTransform="matrix(24.162375,0,0,18.685562,-538.24645,-790.03875)" />\n    <linearGradient\n       id="linearGradient6494">\n      <stop\n         id="stop6496"\n         offset="0.0000000"\n         style="stop-color:%s;stop-opacity:1" />\n      <stop\n         id="stop6498"\n         offset="1.0000000"\n         style="stop-color:%s;stop-opacity:1.0000000;" />\n    </linearGradient>\n    <linearGradient\n       gradientUnits="userSpaceOnUse"\n       id="linearGradient6648"\n       x1="23.213980"\n       x2="23.201290"\n       xlink:href="#linearGradient6494"\n       y1="42.754631"\n       y2="43.892632"\n       gradientTransform="matrix(30.2835,0,0,30.2835,-680.9062,-1286.1606)" />\n    <linearGradient\n       gradientUnits="userSpaceOnUse"\n       id="linearGradient6646"\n       x1="23.349695"\n       x2="23.440580"\n       xlink:href="#linearGradient5756"\n       y1="42.767944"\n       y2="43.710873"\n       gradientTransform="matrix(33.827312,0,0,33.827312,-763.51223,-1439.5942)" />\n    <linearGradient\n       gradientUnits="userSpaceOnUse"\n       id="linearGradient6644"\n       x1="23.193102"\n       x2="23.200001"\n       xlink:href="#linearGradient4276"\n       y1="42.429230"\n       y2="44.000000"\n       gradientTransform="matrix(31.25,0,0,31.25,-700.00001,-1325)" />\n    <linearGradient\n       id="linearGradient6506">\n      <stop\n         id="stop6508"\n         offset="0.0000000"\n         style="stop-color:#ffffff;stop-opacity:0.0000000;" />\n      <stop\n         id="stop6510"\n         offset="1.0000000"\n         style="stop-color:#ffffff;stop-opacity:0.87450981;" />\n    </linearGradient>\n    <linearGradient\n       gradientUnits="userSpaceOnUse"\n       id="linearGradient7498"\n       x1="23.402565"\n       x2="23.389874"\n       xlink:href="#linearGradient6506"\n       y1="44.066776"\n       y2="42.883698" />\n    <linearGradient\n       id="linearGradient7464">\n      <stop\n         id="stop7466"\n         offset="0.0000000"\n         style="stop-color:#00039a;stop-opacity:1.0000000;" />\n      <stop\n         id="stop7468"\n         offset="1.0000000"\n         style="stop-color:#afa5ff;stop-opacity:1.0000000;" />\n    </linearGradient>\n    <linearGradient\n       gradientUnits="userSpaceOnUse"\n       id="linearGradient7496"\n       x1="23.213980"\n       x2="23.201290"\n       xlink:href="#linearGradient7464"\n       y1="42.754631"\n       y2="43.892632" />\n    <linearGradient\n       id="linearGradient5756">\n      <stop\n         id="stop5758"\n         offset="0.0000000"\n         style="stop-color:#828282;stop-opacity:1.0000000;" />\n      <stop\n         id="stop5760"\n         offset="1.0000000"\n         style="stop-color:#929292;stop-opacity:0.35294119;" />\n    </linearGradient>\n    <linearGradient\n       gradientUnits="userSpaceOnUse"\n       id="linearGradient9321"\n       x1="22.935030"\n       x2="23.662106"\n       xlink:href="#linearGradient5756"\n       y1="42.699776"\n       y2="43.892632" />\n    <linearGradient\n       id="linearGradient5742">\n      <stop\n         id="stop5744"\n         offset="0.0000000"\n         style="stop-color:#adadad;stop-opacity:1.0000000;" />\n      <stop\n         id="stop5746"\n         offset="1.0000000"\n         style="stop-color:#f0f0f0;stop-opacity:1.0000000;" />\n    </linearGradient>\n    <linearGradient\n       gradientUnits="userSpaceOnUse"\n       id="linearGradient7492"\n       x1="23.193102"\n       x2="23.200001"\n       xlink:href="#linearGradient5742"\n       y1="42.429230"\n       y2="44.000000" />\n    <linearGradient\n       gradientUnits="userSpaceOnUse"\n       id="linearGradient9527"\n       x1="23.193102"\n       x2="23.200001"\n       xlink:href="#linearGradient5742"\n       y1="42.429230"\n       y2="44.000000" />\n    <linearGradient\n       gradientUnits="userSpaceOnUse"\n       id="linearGradient9529"\n       x1="22.935030"\n       x2="23.662106"\n       xlink:href="#linearGradient5756"\n       y1="42.699776"\n       y2="43.892632" />\n    <linearGradient\n       gradientUnits="userSpaceOnUse"\n       id="linearGradient9531"\n       x1="23.213980"\n       x2="23.201290"\n       xlink:href="#linearGradient7464"\n       y1="42.754631"\n       y2="43.892632" />\n    <linearGradient\n       gradientUnits="userSpaceOnUse"\n       id="linearGradient9533"\n       x1="23.402565"\n       x2="23.389874"\n       xlink:href="#linearGradient6506"\n       y1="44.066776"\n       y2="42.883698" />\n  </defs>\n  <path\n     d="m 50.000021,25.000031 c 0,13.8 -11.2,25 -25,25 -13.8,0 -24.99999975,-11.2 -24.99999975,-25 0,-13.8 11.19999975,-24.99999975 24.99999975,-24.99999975 13.8,0 25,11.19999975 25,24.99999975 z"\n     id="path6596"\n     style="overflow:visible;fill:url(#linearGradient6644);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     inkscape:connector-curvature="0" />\n  <path\n     d="m 45.175601,25.000001 c 0,11.136932 -9.038658,20.17559 -20.17559,20.17559 -11.136932,0 -20.1755899,-9.038658 -20.1755899,-20.17559 0,-11.136932 9.0386579,-20.1756236 20.1755899,-20.1756236 11.136932,0 20.17559,9.0386916 20.17559,20.1756236 z"\n     id="path6598"\n     style="overflow:visible;fill:url(#linearGradient6646);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     inkscape:connector-curvature="0" />\n  <path\n     d="m 43.061992,24.999994 c 0,9.970206 -8.091751,18.061957 -18.061957,18.061957 -9.970207,0 -18.0619578,-8.091751 -18.0619578,-18.061957 0,-9.970207 8.0917508,-18.0619881 18.0619578,-18.0619881 9.970206,0 18.061957,8.0917811 18.061957,18.0619881 z"\n     id="path6600"\n     style="overflow:visible;fill:url(#linearGradient6648);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     inkscape:connector-curvature="0" />\n  <path\n     d="m 39.387937,18.975154 c 0,6.151829 -6.456187,11.144611 -14.411141,11.144611 -7.954955,0 -14.411141,-4.992782 -14.411141,-11.144611 0,-6.151829 6.456186,-11.1446295 14.411141,-11.1446295 7.954954,0 14.411141,4.9928005 14.411141,11.1446295 z"\n     id="path6602"\n     style="overflow:visible;fill:url(#linearGradient6650);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     inkscape:connector-curvature="0" />\n</svg>\n', 2: '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   version="1.1"\n   width="100.00000px"\n   id="svg9493"\n   height="50.000000px">\n  <metadata\n     id="metadata4280">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs9495">\n    <linearGradient\n       id="linearGradient4360">\n      <stop\n         id="stop4362"\n         offset="0.0000000"\n         style="stop-color:%s;stop-opacity:%s" />\n      <stop\n         id="stop4364"\n         offset="1.0000000"\n         style="stop-color:%s;stop-opacity:1" />\n    </linearGradient>\n    <linearGradient\n       y2="46.774261"\n       y1="47.917328"\n       xlink:href="#linearGradient6506"\n       x2="21.593750"\n       x1="21.593750"\n       id="linearGradient13424"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(29.003969,0,0,19.969156,-576.36428,-922.62906)" />\n    <linearGradient\n       id="linearGradient6494">\n      <stop\n         style="stop-color:%s;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop6496" />\n      <stop\n         style="stop-color:%s;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop6498" />\n    </linearGradient>\n    <linearGradient\n       y2="47.781250"\n       y1="46.617390"\n       xlink:href="#linearGradient6494"\n       x2="21.593750"\n       x1="21.591305"\n       id="linearGradient13427"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(31.25,0,0,31.25,-624.9999,-1450.0001)" />\n    <linearGradient\n       y2="47.843750"\n       y1="46.556522"\n       xlink:href="#linearGradient5756"\n       x2="21.834784"\n       x1="21.408695"\n       id="linearGradient13430"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(31.25,0,0,31.25,-624.9999,-1450.0001)" />\n    <linearGradient\n       y2="48.000000"\n       y1="46.376728"\n       xlink:href="#linearGradient4360"\n       x2="21.600000"\n       x1="21.594427"\n       id="linearGradient13433"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(31.25,0,0,31.25,-624.9999,-1450.0001)" />\n    <linearGradient\n       y2="46.774261"\n       y1="47.917328"\n       xlink:href="#linearGradient6506"\n       x2="21.593750"\n       x1="21.593750"\n       id="linearGradient13472"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.928127,0.000000,0.000000,0.639013,21.55634,15.27587)" />\n    <linearGradient\n       y2="47.781250"\n       y1="46.617390"\n       xlink:href="#linearGradient9163"\n       x2="21.593750"\n       x1="21.591305"\n       id="linearGradient13475"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="translate(20.00000,-1.600002)" />\n    <linearGradient\n       y2="47.843750"\n       y1="46.556522"\n       xlink:href="#linearGradient5756"\n       x2="21.834784"\n       x1="21.408695"\n       id="linearGradient13478"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="translate(20.00000,-1.600002)" />\n    <linearGradient\n       y2="48.000000"\n       y1="46.376728"\n       xlink:href="#linearGradient5742"\n       x2="21.600000"\n       x1="21.594427"\n       id="linearGradient13481"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="translate(20.00000,-1.600002)" />\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient9199"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient9163">\n      <stop\n         style="stop-color:#000000;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop9165" />\n      <stop\n         style="stop-color:#8c8c8c;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop9167" />\n    </linearGradient>\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient9163"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient9197"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="43.710873"\n       y1="42.767944"\n       xlink:href="#linearGradient5756"\n       x2="23.440580"\n       x1="23.349695"\n       id="linearGradient9195"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient9193"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient6506">\n      <stop\n         style="stop-color:#ffffff;stop-opacity:0.0000000;"\n         offset="0.0000000"\n         id="stop6508" />\n      <stop\n         style="stop-color:#ffffff;stop-opacity:0.87450981;"\n         offset="1.0000000"\n         id="stop6510" />\n    </linearGradient>\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient7498"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient7464">\n      <stop\n         style="stop-color:#00039a;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop7466" />\n      <stop\n         style="stop-color:#afa5ff;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop7468" />\n    </linearGradient>\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient7464"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient7496"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient5756">\n      <stop\n         style="stop-color:#828282;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop5758" />\n      <stop\n         style="stop-color:#929292;stop-opacity:0.35294119;"\n         offset="1.0000000"\n         id="stop5760" />\n    </linearGradient>\n    <linearGradient\n       y2="43.892632"\n       y1="42.699776"\n       xlink:href="#linearGradient5756"\n       x2="23.662106"\n       x1="22.935030"\n       id="linearGradient9321"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient5742">\n      <stop\n         style="stop-color:#adadad;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop5744" />\n      <stop\n         style="stop-color:#f0f0f0;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop5746" />\n    </linearGradient>\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient7492"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient9527"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="43.892632"\n       y1="42.699776"\n       xlink:href="#linearGradient5756"\n       x2="23.662106"\n       x1="22.935030"\n       id="linearGradient9529"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient7464"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient9531"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient9533"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient1336"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(24.16238,0.000000,0.000000,18.68556,-538.2464,-790.0391)" />\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient9163"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient1339"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(30.28350,0.000000,0.000000,30.28350,-680.9062,-1286.161)" />\n    <linearGradient\n       y2="43.710873"\n       y1="42.767944"\n       xlink:href="#linearGradient5756"\n       x2="23.440580"\n       x1="23.349695"\n       id="linearGradient1342"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(33.82731,0.000000,0.000000,33.82731,-763.5122,-1439.594)" />\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient1345"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(31.25000,0.000000,0.000000,31.25000,-700.0000,-1325.000)" />\n  </defs>\n  <path\n     style="fill:url(#linearGradient13433);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path13335"\n     d="m 25.000037,0 50.000001,0 c 13.85,0 25.000002,11.15 25.000002,25 0,13.85 -11.150002,25 -25.000002,25 L 25.000037,50 C 11.150038,50 3.75e-5,38.85 3.75e-5,25 3.75e-5,11.15 11.150038,0 25.000037,0 Z" />\n  <path\n     style="overflow:visible;fill:url(#linearGradient13430);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path13337"\n     d="m 25.390662,5.0780625 c -11.409718,0 -20.507812,8.3471245 -20.507812,19.5312495 0,11.184125 9.323719,20.507875 20.507812,20.507813 l 49.804688,0 c 11.184156,0 19.53125,-9.098031 19.53125,-20.507813 0,-11.409718 -8.121563,-19.5312495 -19.53125,-19.5312495 l -49.804688,0 z" />\n  <path\n     style="overflow:visible;fill:url(#linearGradient13427);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path13339"\n     d="m 25.390662,7.0311875 c -10.206593,0 -18.554687,7.7083435 -18.554687,17.5781245 0,9.869813 8.684969,18.554719 18.554687,18.554688 l 49.804688,0 c 9.869813,0 17.578125,-8.348031 17.578125,-18.554688 0,-10.206593 -7.371563,-17.5781245 -17.578125,-17.5781245 l -49.804688,0 z" />\n  <path\n     style="overflow:visible;fill:url(#linearGradient13424);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path13341"\n     d="m 27.280819,8.4327813 c -9.473,0 -17.221094,4.9257497 -17.221094,11.2326567 0,6.306937 8.06075,11.856718 17.221094,11.856687 l 46.225062,0 c 9.160469,0 16.31475,-5.3345 16.31475,-11.856687 0,-6.522157 -6.84175,-11.2326567 -16.31475,-11.2326567 l -46.225062,0 z" />\n</svg>\n', 3: '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   version="1.1"\n   width="50.000000px"\n   id="svg9493"\n   height="50.000000px">\n  <metadata\n     id="metadata4299">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs9495">\n    <linearGradient\n       id="linearGradient4310">\n      <stop\n         id="stop4312"\n         offset="0.0000000"\n         style="stop-color:%s;stop-opacity:%s" />\n      <stop\n         id="stop4314"\n         offset="1.0000000"\n         style="stop-color:%s;stop-opacity:1" />\n    </linearGradient>\n    <linearGradient\n       y2="46.774261"\n       y1="47.917328"\n       xlink:href="#linearGradient6506"\n       x2="21.593750"\n       x1="21.593750"\n       id="linearGradient31681"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(12.138594,0,0,19.315531,-237.28437,-892.92719)" />\n    <linearGradient\n       id="linearGradient6494">\n      <stop\n         style="stop-color:%s;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop6496" />\n      <stop\n         style="stop-color:%s;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop6498" />\n    </linearGradient>\n    <linearGradient\n       gradientTransform="matrix(31.25,0,0,31.25,-549.70703,-1350)"\n       y2="44.593750"\n       y1="43.400002"\n       xlink:href="#linearGradient6494"\n       x2="18.390625"\n       x1="18.390625"\n       id="linearGradient31704"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       gradientTransform="matrix(31.25,0,0,31.25,-549.70703,-1350)"\n       y2="44.656250"\n       y1="43.337502"\n       xlink:href="#linearGradient5756"\n       x2="19.031250"\n       x1="17.728125"\n       id="linearGradient31624"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="41.599998"\n       y1="39.991302"\n       xlink:href="#linearGradient4310"\n       x2="29.600000"\n       x1="29.600000"\n       id="linearGradient31686"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(15.625,0,0,31.25,-437.5,-1250)" />\n    <linearGradient\n       y2="46.774261"\n       y1="47.917328"\n       xlink:href="#linearGradient6506"\n       x2="21.593750"\n       x1="21.593750"\n       id="linearGradient31649"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.388435,0.000000,0.000000,0.618097,7.606900,5.026330)" />\n    <linearGradient\n       y2="44.593750"\n       y1="43.400002"\n       xlink:href="#linearGradient9163"\n       x2="18.390625"\n       x1="18.390625"\n       id="linearGradient31710"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="44.656250"\n       y1="43.337502"\n       xlink:href="#linearGradient5756"\n       x2="19.031250"\n       x1="17.728125"\n       id="linearGradient31570"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="41.599998"\n       y1="39.991302"\n       xlink:href="#linearGradient5742"\n       x2="29.600000"\n       x1="29.600000"\n       id="linearGradient31654"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.500000,0.000000,0.000000,1.000000,1.200000,-6.400000)" />\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient9199"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient9163">\n      <stop\n         style="stop-color:#000000;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop9165" />\n      <stop\n         style="stop-color:#8c8c8c;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop9167" />\n    </linearGradient>\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient9163"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient9197"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="43.710873"\n       y1="42.767944"\n       xlink:href="#linearGradient5756"\n       x2="23.440580"\n       x1="23.349695"\n       id="linearGradient9195"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient9193"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient6506">\n      <stop\n         style="stop-color:#ffffff;stop-opacity:0.0000000;"\n         offset="0.0000000"\n         id="stop6508" />\n      <stop\n         style="stop-color:#ffffff;stop-opacity:0.87450981;"\n         offset="1.0000000"\n         id="stop6510" />\n    </linearGradient>\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient7498"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient7464">\n      <stop\n         style="stop-color:#00039a;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop7466" />\n      <stop\n         style="stop-color:#afa5ff;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop7468" />\n    </linearGradient>\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient7464"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient7496"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient5756">\n      <stop\n         style="stop-color:#828282;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop5758" />\n      <stop\n         style="stop-color:#929292;stop-opacity:0.35294119;"\n         offset="1.0000000"\n         id="stop5760" />\n    </linearGradient>\n    <linearGradient\n       y2="43.892632"\n       y1="42.699776"\n       xlink:href="#linearGradient5756"\n       x2="23.662106"\n       x1="22.935030"\n       id="linearGradient9321"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient5742">\n      <stop\n         style="stop-color:#adadad;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop5744" />\n      <stop\n         style="stop-color:#f0f0f0;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop5746" />\n    </linearGradient>\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient7492"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient9527"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="43.892632"\n       y1="42.699776"\n       xlink:href="#linearGradient5756"\n       x2="23.662106"\n       x1="22.935030"\n       id="linearGradient9529"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient7464"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient9531"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient9533"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient1336"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(24.16238,0.000000,0.000000,18.68556,-538.2464,-790.0391)" />\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient9163"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient1339"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(30.28350,0.000000,0.000000,30.28350,-680.9062,-1286.161)" />\n    <linearGradient\n       y2="43.710873"\n       y1="42.767944"\n       xlink:href="#linearGradient5756"\n       x2="23.440580"\n       x1="23.349695"\n       id="linearGradient1342"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(33.82731,0.000000,0.000000,33.82731,-763.5122,-1439.594)" />\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient1345"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(31.25000,0.000000,0.000000,31.25000,-700.0000,-1325.000)" />\n  </defs>\n  <path\n     style="fill:url(#linearGradient31686);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path31614"\n     d="M 0,0 50,0 50,50 0,50 0,0 Z" />\n  <path\n     style="overflow:visible;fill:url(#linearGradient31624);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path31616"\n     d="m 4.98047,4.4921875 0,41.0156245 40.039062,0 0,-41.0156245 -40.039062,0 z" />\n  <path\n     style="overflow:visible;fill:url(#linearGradient31704);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path31618"\n     d="m 6.933595,6.4453125 0,37.1093745 36.132812,0 0,-37.1093745 -36.132812,0 z" />\n  <path\n     style="overflow:visible;fill:url(#linearGradient31681);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path31620"\n     d="M 15.349844,7.66 C 7.198625,7.6864688 8.1425938,6.0403125 8.1425938,18.525 c 0,6.1005 3.3735622,11.468625 7.2072502,11.468594 l 19.345875,0 c 3.833812,0 6.827937,-5.159906 6.827937,-11.468594 0,-12.5878125 0.807188,-10.9699687 -6.827937,-10.865 l -19.345875,0 z" />\n</svg>\n', 4: '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   version="1.1"\n   width="50.000000px"\n   id="svg9493"\n   height="50.000000px">\n  <metadata\n     id="metadata4372">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs9495">\n    <linearGradient\n       id="linearGradient4383">\n      <stop\n         id="stop4385"\n         offset="0.0000000"\n         style="stop-color:%s;stop-opacity:%s" />\n      <stop\n         id="stop4387"\n         offset="1.0000000"\n         style="stop-color:%s;stop-opacity:1" />\n    </linearGradient>\n    <linearGradient\n       y2="26.670279"\n       y1="28.449617"\n       xlink:href="#linearGradient6506"\n       x2="23.187498"\n       x1="23.187498"\n       id="linearGradient28861"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(12.187313,0,0,12.623188,-257.59344,-317.63062)" />\n    <linearGradient\n       id="linearGradient6494">\n      <stop\n         style="stop-color:%s;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop6496" />\n      <stop\n         style="stop-color:%s;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop6498" />\n    </linearGradient>\n    <linearGradient\n       y2="27.843750"\n       y1="26.793751"\n       xlink:href="#linearGradient6494"\n       x2="23.187500"\n       x1="23.181250"\n       id="linearGradient28864"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(31.25,0,0,31.25,-699.60937,-825)" />\n    <linearGradient\n       y2="27.906250"\n       y1="26.687500"\n       xlink:href="#linearGradient5756"\n       x2="23.812500"\n       x1="22.762501"\n       id="linearGradient28867"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(31.25,0,0,31.25,-699.60937,-825)" />\n    <linearGradient\n       y2="28.000000"\n       y1="26.400000"\n       xlink:href="#linearGradient4383"\n       x2="23.200001"\n       x1="23.187500"\n       id="linearGradient28870"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(31.25,0,0,31.25,-700,-825)" />\n    <linearGradient\n       y2="26.670279"\n       y1="28.449617"\n       xlink:href="#linearGradient6506"\n       x2="23.187498"\n       x1="23.187498"\n       id="linearGradient28801"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.389994,0.000000,0.000000,0.403942,9.357010,32.23582)" />\n    <linearGradient\n       y2="27.843750"\n       y1="26.793751"\n       xlink:href="#linearGradient9163"\n       x2="23.187500"\n       x1="23.181250"\n       id="linearGradient28804"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="translate(-4.787500,16.00000)" />\n    <linearGradient\n       y2="27.906250"\n       y1="26.687500"\n       xlink:href="#linearGradient5756"\n       x2="23.812500"\n       x1="22.762501"\n       id="linearGradient28807"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="translate(-4.787500,16.00000)" />\n    <linearGradient\n       y2="28.000000"\n       y1="26.400000"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.187500"\n       id="linearGradient28810"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="translate(-4.800000,16.00000)" />\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient9199"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient9163">\n      <stop\n         style="stop-color:#000000;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop9165" />\n      <stop\n         style="stop-color:#8c8c8c;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop9167" />\n    </linearGradient>\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient9163"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient9197"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="43.710873"\n       y1="42.767944"\n       xlink:href="#linearGradient5756"\n       x2="23.440580"\n       x1="23.349695"\n       id="linearGradient9195"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient9193"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient6506">\n      <stop\n         style="stop-color:#ffffff;stop-opacity:0.0000000;"\n         offset="0.0000000"\n         id="stop6508" />\n      <stop\n         style="stop-color:#ffffff;stop-opacity:0.87450981;"\n         offset="1.0000000"\n         id="stop6510" />\n    </linearGradient>\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient7498"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient7464">\n      <stop\n         style="stop-color:#00039a;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop7466" />\n      <stop\n         style="stop-color:#afa5ff;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop7468" />\n    </linearGradient>\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient7464"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient7496"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient5756">\n      <stop\n         style="stop-color:#828282;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop5758" />\n      <stop\n         style="stop-color:#929292;stop-opacity:0.35294119;"\n         offset="1.0000000"\n         id="stop5760" />\n    </linearGradient>\n    <linearGradient\n       y2="43.892632"\n       y1="42.699776"\n       xlink:href="#linearGradient5756"\n       x2="23.662106"\n       x1="22.935030"\n       id="linearGradient9321"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient5742">\n      <stop\n         style="stop-color:#adadad;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop5744" />\n      <stop\n         style="stop-color:#f0f0f0;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop5746" />\n    </linearGradient>\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient7492"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient9527"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="43.892632"\n       y1="42.699776"\n       xlink:href="#linearGradient5756"\n       x2="23.662106"\n       x1="22.935030"\n       id="linearGradient9529"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient7464"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient9531"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient9533"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient1336"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(24.16238,0.000000,0.000000,18.68556,-538.2464,-790.0391)" />\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient9163"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient1339"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(30.28350,0.000000,0.000000,30.28350,-680.9062,-1286.161)" />\n    <linearGradient\n       y2="43.710873"\n       y1="42.767944"\n       xlink:href="#linearGradient5756"\n       x2="23.440580"\n       x1="23.349695"\n       id="linearGradient1342"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(33.82731,0.000000,0.000000,33.82731,-763.5122,-1439.594)" />\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient1345"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(31.25000,0.000000,0.000000,31.25000,-700.0000,-1325.000)" />\n  </defs>\n  <path\n     style="fill:url(#linearGradient28870);fill-opacity:1;stroke:none;stroke-width:0.064;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path28664"\n     d="M 50,50 0,50 25,0 50,50 Z" />\n  <path\n     style="overflow:visible;fill:url(#linearGradient28867);fill-opacity:1;stroke:none;stroke-width:0.064;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path28666"\n     d="M 25,8.0078125 5.46875,47.070312 l 39.0625,0 L 25,8.0078125 Z" />\n  <path\n     style="overflow:visible;fill:url(#linearGradient28864);fill-opacity:1;stroke:none;stroke-width:0.064;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path28668"\n     d="m 25,11.914063 -16.6015625,33.203124 33.2031245,0 L 25,11.914063 Z" />\n  <path\n     style="overflow:visible;fill:url(#linearGradient28861);fill-opacity:1;stroke:none;stroke-width:0.064;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path28670"\n     d="m 24.238156,17.278313 c -0.61875,0.212499 -1.154062,0.627187 -1.523437,1.183437 -0.1375,0.11875 -0.265625,0.25 -0.380938,0.394375 l -6.474406,13.412219 c -0.259375,0.48125 -0.392187,1.02625 -0.380938,1.577812 0.04687,0.417188 0.178125,0.819688 0.380938,1.183438 0.09062,0.28125 0.21875,0.54625 0.380937,0.789062 0.115625,0.14375 0.24375,0.275 0.380938,0.394375 0.234375,0.16875 0.490938,0.3 0.761562,0.394375 0.350938,0.209375 0.739688,0.344688 1.1425,0.394375 l 12.949,0 c 0.894375,-0.01994 1.733125,-0.454375 2.285,-1.183437 0.1375,-0.11875 0.265625,-0.25 0.380938,-0.394375 0.203125,-0.363438 0.332812,-0.76625 0.380937,-1.183438 0.01125,-0.551875 -0.11875,-1.096562 -0.380937,-1.577812 0.0081,-0.13125 0.0081,-0.2625 0,-0.394375 l -6.4745,-13.412125 c -0.115625,-0.14375 -0.24375,-0.275 -0.380938,-0.394375 -0.700625,-0.983438 -1.894687,-1.447188 -3.046875,-1.183438 z" />\n</svg>\n', 5: '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   version="1.1"\n   width="50.000000px"\n   id="svg9493"\n   height="50.000000px">\n  <metadata\n     id="metadata4299">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title></dc:title>\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <defs\n     id="defs9495">\n    <linearGradient\n       id="linearGradient4310">\n      <stop\n         id="stop4312"\n         offset="0.0000000"\n         style="stop-color:%s;stop-opacity:%s" />\n      <stop\n         id="stop4314"\n         offset="1.0000000"\n         style="stop-color:%s;stop-opacity:1" />\n    </linearGradient>\n    <linearGradient\n       y2="46.774261"\n       y1="47.917328"\n       xlink:href="#linearGradient6506"\n       x2="21.593750"\n       x1="21.593750"\n       id="linearGradient31681"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(12.138594,0,0,19.315531,-237.28437,-892.92719)" />\n    <linearGradient\n       id="linearGradient6494">\n      <stop\n         style="stop-color:%s;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop6496" />\n      <stop\n         style="stop-color:%s;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop6498" />\n    </linearGradient>\n    <linearGradient\n       gradientTransform="matrix(31.25,0,0,31.25,-549.70703,-1350)"\n       y2="44.593750"\n       y1="43.400002"\n       xlink:href="#linearGradient6494"\n       x2="18.390625"\n       x1="18.390625"\n       id="linearGradient31704"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       gradientTransform="matrix(31.25,0,0,31.25,-549.70703,-1350)"\n       y2="44.656250"\n       y1="43.337502"\n       xlink:href="#linearGradient5756"\n       x2="19.031250"\n       x1="17.728125"\n       id="linearGradient31624"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="41.599998"\n       y1="39.991302"\n       xlink:href="#linearGradient4310"\n       x2="29.600000"\n       x1="29.600000"\n       id="linearGradient31686"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(15.625,0,0,31.25,-437.5,-1250)" />\n    <linearGradient\n       y2="46.774261"\n       y1="47.917328"\n       xlink:href="#linearGradient6506"\n       x2="21.593750"\n       x1="21.593750"\n       id="linearGradient31649"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.388435,0.000000,0.000000,0.618097,7.606900,5.026330)" />\n    <linearGradient\n       y2="44.593750"\n       y1="43.400002"\n       xlink:href="#linearGradient9163"\n       x2="18.390625"\n       x1="18.390625"\n       id="linearGradient31710"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="44.656250"\n       y1="43.337502"\n       xlink:href="#linearGradient5756"\n       x2="19.031250"\n       x1="17.728125"\n       id="linearGradient31570"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="41.599998"\n       y1="39.991302"\n       xlink:href="#linearGradient5742"\n       x2="29.600000"\n       x1="29.600000"\n       id="linearGradient31654"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.500000,0.000000,0.000000,1.000000,1.200000,-6.400000)" />\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient9199"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient9163">\n      <stop\n         style="stop-color:#000000;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop9165" />\n      <stop\n         style="stop-color:#8c8c8c;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop9167" />\n    </linearGradient>\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient9163"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient9197"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="43.710873"\n       y1="42.767944"\n       xlink:href="#linearGradient5756"\n       x2="23.440580"\n       x1="23.349695"\n       id="linearGradient9195"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient9193"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient6506">\n      <stop\n         style="stop-color:#ffffff;stop-opacity:0.0000000;"\n         offset="0.0000000"\n         id="stop6508" />\n      <stop\n         style="stop-color:#ffffff;stop-opacity:0.87450981;"\n         offset="1.0000000"\n         id="stop6510" />\n    </linearGradient>\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient7498"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient7464">\n      <stop\n         style="stop-color:#00039a;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop7466" />\n      <stop\n         style="stop-color:#afa5ff;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop7468" />\n    </linearGradient>\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient7464"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient7496"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient5756">\n      <stop\n         style="stop-color:#828282;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop5758" />\n      <stop\n         style="stop-color:#929292;stop-opacity:0.35294119;"\n         offset="1.0000000"\n         id="stop5760" />\n    </linearGradient>\n    <linearGradient\n       y2="43.892632"\n       y1="42.699776"\n       xlink:href="#linearGradient5756"\n       x2="23.662106"\n       x1="22.935030"\n       id="linearGradient9321"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       id="linearGradient5742">\n      <stop\n         style="stop-color:#adadad;stop-opacity:1.0000000;"\n         offset="0.0000000"\n         id="stop5744" />\n      <stop\n         style="stop-color:#f0f0f0;stop-opacity:1.0000000;"\n         offset="1.0000000"\n         id="stop5746" />\n    </linearGradient>\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient7492"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient9527"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="43.892632"\n       y1="42.699776"\n       xlink:href="#linearGradient5756"\n       x2="23.662106"\n       x1="22.935030"\n       id="linearGradient9529"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient7464"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient9531"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient9533"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       y2="42.883698"\n       y1="44.066776"\n       xlink:href="#linearGradient6506"\n       x2="23.389874"\n       x1="23.402565"\n       id="linearGradient1336"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(24.16238,0.000000,0.000000,18.68556,-538.2464,-790.0391)" />\n    <linearGradient\n       y2="43.892632"\n       y1="42.754631"\n       xlink:href="#linearGradient9163"\n       x2="23.201290"\n       x1="23.213980"\n       id="linearGradient1339"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(30.28350,0.000000,0.000000,30.28350,-680.9062,-1286.161)" />\n    <linearGradient\n       y2="43.710873"\n       y1="42.767944"\n       xlink:href="#linearGradient5756"\n       x2="23.440580"\n       x1="23.349695"\n       id="linearGradient1342"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(33.82731,0.000000,0.000000,33.82731,-763.5122,-1439.594)" />\n    <linearGradient\n       y2="44.000000"\n       y1="42.429230"\n       xlink:href="#linearGradient5742"\n       x2="23.200001"\n       x1="23.193102"\n       id="linearGradient1345"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(31.25000,0.000000,0.000000,31.25000,-700.0000,-1325.000)" />\n  </defs>\n  <path\n     style="fill:url(#linearGradient31686);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path31614"\n     d="M 0,0 50,0 50,50 0,50 0,0 Z" />\n  <path\n     style="overflow:visible;fill:url(#linearGradient31624);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path31616"\n     d="m 4.98047,4.4921875 0,41.0156245 40.039062,0 0,-41.0156245 -40.039062,0 z" />\n  <path\n     style="overflow:visible;fill:url(#linearGradient31704);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path31618"\n     d="m 6.933595,6.4453125 0,37.1093745 36.132812,0 0,-37.1093745 -36.132812,0 z" />\n  <path\n     style="overflow:visible;fill:url(#linearGradient31681);fill-opacity:1;stroke:none;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"\n     id="path31620"\n     d="M 15.349844,7.66 C 7.198625,7.6864688 8.1425938,6.0403125 8.1425938,18.525 c 0,6.1005 3.3735622,11.468625 7.2072502,11.468594 l 19.345875,0 c 3.833812,0 6.827937,-5.159906 6.827937,-11.468594 0,-12.5878125 0.807188,-10.9699687 -6.827937,-10.865 l -19.345875,0 z" />\n</svg>\n'}
+
+ +
+
+sizeHint()[source]
+

Return the base size of the widget according to shape.

+
+ +
+
+state
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+property stateColors
+

Color list property getter.

+
+ +
+
+toggleSelected()[source]
+

Toggle isSelected property.

+
+ +
+
+toggleState()[source]
+

Toggle state property.

+
+ +
+ +
+
+class siriushla.widgets.QLed.ShapeMap[source]
+

Bases: object

+

Shape enum mapping class.

+
+
+Circle = 1
+
+ +
+
+Rectangle = 5
+
+ +
+
+Round = 2
+
+ +
+
+Square = 3
+
+ +
+
+Triangle = 4
+
+ +
+ +
+
+

siriushla.widgets.QSpinBoxPlus module

+

Module to define QSpinBoxPlus and QDoubleSpinBoxPlus.

+
+
+siriushla.widgets.QSpinBoxPlus.QDoubleSpinBoxPlus
+

alias of MySpinBoxPlus

+
+ +
+
+siriushla.widgets.QSpinBoxPlus.QSpinBoxPlus
+

alias of MySpinBoxPlus

+
+ +
+
+

siriushla.widgets.bar_graph module

+

This module defines a widget that represent a PV as bar graph.

+
+
+class siriushla.widgets.bar_graph.BarGraphModel(waveform=[], width=1, brush='b', scale=1)[source]
+

Bases: object

+

Model for BarGraphWidget.

+
+
+connected()[source]
+

Return always connected.

+
+ +
+
+property size
+

Return size of PV array.

+
+ +
+
+property waveform
+

Return the value read from PV.

+
+ +
+ +
+
+class siriushla.widgets.bar_graph.BarGraphWidget(**kwargs)[source]
+

Bases: BaseBarGraphWidget

+

Widget to show a waveform as graph of bars.

+
+
Functions:

set_waveform - plot a waveform (array) as a bar graph; +Also see BaseBarGraphWidget.

+
+
+
+
+set_waveform(waveform)[source]
+

Set waveform.

+
+ +
+ +
+
+class siriushla.widgets.bar_graph.BaseBarGraphWidget(parent=None, background='default', plotItem=None, **kargs)[source]
+

Bases: PlotWidget

+

Widget that represents a waveform as a bar graph.

+

Uses pyqtgraph (PlotWidget and BarGraphItem) to represent a wave, +usually an array, as a bar graph.

+
+
Functions:

set_scale - sets a scale factor for viewing the graph; +set_width - set the widtg of the bars; +set_brush - set brush color.

+
+
+
+
+set_brush(color)[source]
+

Set brush color.

+
+ +
+
+set_scale(scale)[source]
+

Set scale.

+
+ +
+
+set_width(width)[source]
+

Set bar width.

+
+ +
+
+sizeHint()[source]
+

Preferred size.

+
+ +
+ +
+
+class siriushla.widgets.bar_graph.EpicsBarGraphModel(width=1, brush=None, scale=1, update_interval=1000)[source]
+

Bases: object

+

Handle the model data to be represented as a bar graph.

+
+
+TIMEOUT = 0.2
+
+ +
+
+property connected
+

Return connection status.

+
+ +
+
+property pvname
+

Name of the PV to retrieve value.

+
+ +
+
+property size
+

Return size of PV array.

+
+ +
+
+property waveform
+

Retrun the value read from PV.

+
+ +
+ +
+
+class siriushla.widgets.bar_graph.PyDMBarGraph(channel=None, **kwargs)[source]
+

Bases: BaseBarGraphWidget

+

Widget that represents a PV as a bar graph.

+

The widget reads a PV value and updates it synchronously.

+
+
Functions:
+
set_update_interval - set the update interval at which the PV value is

is queried and the view is updated;

+
+
+

Also see BaseBarGraphWidget.

+
+
+
+
+channels()[source]
+

Used by PyDmApplication to set the model channel.

+
+ +
+
+set_update_interval(interval)[source]
+

Set timer update interval.

+
+ +
+
+start()[source]
+

Start running timer.

+
+ +
+
+stop()[source]
+

Stop.

+
+ +
+ +
+
+class siriushla.widgets.bar_graph.PyDMBarGraphModel(init_channel=None, width=1, brush=None, scale=1, update_interval=1000)[source]
+

Bases: object

+

Data model for the bar graph widget based on PyDMChannel.

+
+
+channels()[source]
+

Define slots and signals mappings for the epics channel.

+
+ +
+
+property connected
+

Return connection status.

+
+ +
+
+connectionChanged(conn)[source]
+

Slot called when connection state changes.

+
+ +
+
+property size
+

Return size of PV array.

+
+ +
+
+valueChanged(value)[source]
+

Slot called when value changes.

+
+ +
+
+property waveform
+

Return waveform array.

+
+ +
+ +
+
+

siriushla.widgets.detachable_tabwidget module

+

.

+
+
+class siriushla.widgets.detachable_tabwidget.DetachableTabWidget(parent=None)[source]
+

Bases: QTabWidget

+

The DetachableTabWidget adds additional functionality to Qt’s +QTabWidget that allows it to detach and re-attach tabs.

+

Detach tabs by double clicking the tab

+

Adapted from https://stackoverflow.com/questions/47267195/in-pyqt-is-it-possible-to-detach-tabs-from-a-qtabwidget

+

Original by Stack Overflow user: Blackwood, 13/11/2017

+
+
+attachTab(contentWidget, name, icon, index)[source]
+

Attach tab to QTabWidget.

+
+ +
+
+attachTabSlot(name)[source]
+

Slot responsible for attaching tab to QTabWidget.

+
+ +
+
+closeDetachedTabs()[source]
+

Slot responsible for clsing detached tabs.

+
+ +
+
+detachTab(index, point)[source]
+

Detach tab from TabWidget.

+
+ +
+ +
+
+class siriushla.widgets.detachable_tabwidget.DetachedTab(name, text, contentWidget, parent=None)[source]
+

Bases: _SiriusWindow

+

Reimplement SiriusMainWindow to accomodated detached tabs.

+
+
+closeEvent(event)[source]
+

.

+
+ +
+
+do_close()[source]
+

.

+
+ +
+
+onAttachSignal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+class siriushla.widgets.detachable_tabwidget.TabBar(parent=None)[source]
+

Bases: QTabBar

+

Reimplement QTabBar to add DoubleClickEvent handling.

+
+
+mouseDoubleClickEvent(event)[source]
+

.

+
+ +
+
+onDetachTabSignal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+

siriushla.widgets.enum_combo_box module

+

Sirius Enum ComboBox.

+
+
+class siriushla.widgets.enum_combo_box.SiriusEnumComboBox(parent, init_channel=None)[source]
+

Bases: PyDMEnumComboBox

+

Subclass PyDMEnumComboBox to reimplement whellEvent.

+
+
+wheelEvent(event)[source]
+

Reimplement wheel event to ignore event when out of focus.

+
+ +
+ +
+
+

siriushla.widgets.frame module

+

Sirius Frame.

+
+
+class siriushla.widgets.frame.SiriusAlarmFrame(parent=None, init_channel=None, orientation='H')[source]
+

Bases: _BaseFrame

+

Sirius Alarm Frame.

+
+
+alarm_severity_changed(new_value)[source]
+

Callback invoked when the Channel alarm severity is changed. +This callback is not processed if the widget has no channel +associated with it. +This callback handles the composition of the stylesheet to be +applied and the call +to update to redraw the widget with the needed changes for the +new state.

+
+
Parameters:
+

new_alarm_severity (int) – The new severity where 0 = NO_ALARM, 1 = MINOR, 2 = MAJOR +and 3 = INVALID

+
+
+
+ +
+
+default_colorlist = [<PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>]
+
+ +
+ +
+
+class siriushla.widgets.frame.SiriusFrame(parent=None, init_channel=None, color_list=None, is_float=True, orientation='H')[source]
+

Bases: _BaseFrame

+

Sirius Frame.

+
+
+default_colorlist = [<PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>]
+
+ +
+
+value_changed(new_value)[source]
+

Callback invoked when the Channel value is changed.

+
+
Parameters:
+

new_val (str, int, float, bool or np.ndarray) – The new value from the channel. The type depends on the channel.

+
+
+
+ +
+ +
+
+

siriushla.widgets.horizontal_ruler module

+

Horizontal Ruler Widget.

+
+
+class siriushla.widgets.horizontal_ruler.HorizontalRuler(parent=None)[source]
+

Bases: QFrame

+
+
+setHeight(height)[source]
+
+ +
+ +
+
+

siriushla.widgets.label module

+

Sirius Label.

+
+
+class siriushla.widgets.label.CALabel[source]
+

Bases: QLabel, PyDMPrimitiveWidget

+

QLabel with rules.

+
+ +
+
+class siriushla.widgets.label.SiriusLabel(parent=None, init_channel=None, keep_unit=False, **kws)[source]
+

Bases: QLabel, TextFormatter, PyDMWidget, DisplayFormat

+

A QLabel with support for Channels and more from PyDM

+
+
Parameters:
+
    +
  • parent (QWidget) – The parent widget for the Label

  • +
  • init_channel (str, optional) – The channel to be used by the widget.

  • +
  • keep_unit (bool, optional) – If True, label do not use unit convertion feature. +Default to False.

  • +
+
+
+
+
+class DisplayFormat
+

Bases: object

+

Display format for showing data in a PyDM widget.

+
+
+BSMPUDCVersion = 7
+
+ +
+
+Binary = 5
+

Show numerical values in base 2 (binary) notation.

+
+ +
+
+Decimal = 2
+

Show numerical values as floating point (base 10, decimal) values.

+
+ +
+
+Default = 0
+

The default display format.

+
+ +
+
+Exponential = 3
+

Show numerical values in scientific / exponential notation.

+
+ +
+
+Hex = 4
+

Show numerical values in base 16 (hexadecimal) notation.

+
+ +
+
+String = 1
+

Show the data as a string.

+
+ +
+
+Time = 6
+
+ +
+ +
+
+displayFormat
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+update_format_string()[source]
+

Reconstruct the format string to be used when representing the +output value.

+
+
Returns:
+

format_string – The format string to be used including or not the precision +and unit

+
+
Return type:
+

str

+
+
+
+ +
+
+value_changed(new_value)[source]
+

Callback invoked when the Channel value is changed. +Sets the value of new_value accordingly at the Label.

+
+
Parameters:
+

new_value (str, int, float, bool or np.ndarray) – The new value from the channel. The type depends on the channel.

+
+
+
+ +
+ +
+
+

siriushla.widgets.led module

+

Led widgets.

+
+
+class siriushla.widgets.led.MultiChannelStatusDialog(parent=None, text='', pvs={}, fun_show_diff=None)[source]
+

Bases: _SiriusWindow

+
+ +
+
+class siriushla.widgets.led.PyDMLed(parent=None, init_channel=None, bit=-1, color_list=None)[source]
+

Bases: QLed, PyDMWidget

+

A QLed with support for Channels and more from PyDM.

+
+
Parameters:
+
    +
  • parent (QWidget) – The parent widget for the led.

  • +
  • init_channel (str, optional) – The channel to be used by the widget.

  • +
  • bit (int) – Bit of the PV value to be handled.

  • +
  • color_list (int) – List of QColor objects for each state the channel can assume.

  • +
+
+
+
+
+default_colorlist = [<PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>]
+
+ +
+
+pvbit
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+value_changed(new_val)[source]
+

Receive new value and set led color accordingly.

+

For int or float data type the standard led behaviour is to be red when +the value is 0, and green otherwise.

+

If a bit is set the value received will be treated as an int +and the bit value is extracted using a mask. The led represents the +value of the chosen bit.

+
+ +
+ +
+
+class siriushla.widgets.led.PyDMLedMultiChannel(parent=None, channels2values={}, color_list=None)[source]
+

Bases: QLed, PyDMWidget

+

A QLed with support for checking values of several Channels.

+

The led state notify if a set of PVs is in a desired state or not.

+
+
Parameters:
+
    +
  • parent (QWidget) – The parent widget for the led.

  • +
  • channels2values (dict) –

    A dict with channels as keys and desired PVs values as values. +Values can be either a scalar, to simple comparision, or a dict. +This dict can have as keys:

    +
    +
      +
    • ’value’ (the value to use in comparision);

    • +
    • +
      ’comp’ (a string that select the type of comparision, can be

      ’eq’, ‘ne’, ‘gt’, ‘lt’, ‘ge’, ‘le’);

      +
      +
      +
    • +
    • and ‘bit’ (select a bit of the pv to compare to ‘value’).

    • +
    +
    +

  • +
+
+
+
+
+property channels2status
+

Return channels2status dict.

+
+ +
+
+property channels2values
+

Return channels2values dict.

+
+ +
+
+connection_changed(conn)[source]
+

Reimplement connection_changed to handle all channels.

+
+ +
+
+default_colorlist = [<PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>]
+
+ +
+
+mouseDoubleClickEvent(self, a0: QMouseEvent | None)[source]
+
+ +
+
+normal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+set_channels2values(new_channels2values)[source]
+

Set channels2values.

+
+ +
+
+value_changed(new_val)[source]
+

Receive new value and set led color accordingly.

+
+ +
+
+warning
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+class siriushla.widgets.led.PyDMLedMultiConnection(parent=None, channels=[], color_list=None)[source]
+

Bases: QLed, PyDMWidget

+

A QLed with support for checking connection of several Channels.

+

The led state notify if a set of PVs is connected.

+
+
Parameters:
+
    +
  • parent (QWidget) – The parent widget for the led.

  • +
  • channels (list) – A list of channels.

  • +
+
+
+
+
+property channels2conn
+

Return dict with connection state of each channel.

+
+ +
+
+connection_changed(conn)[source]
+

Reimplement connection_changed to handle all channels.

+
+ +
+
+default_colorlist = [<PyQt5.QtGui.QColor object>, <PyQt5.QtGui.QColor object>]
+
+ +
+
+mouseDoubleClickEvent(self, a0: QMouseEvent | None)[source]
+
+ +
+
+normal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+set_channels(new_channels)[source]
+
+ +
+
+warning
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+class siriushla.widgets.led.SiriusLedAlert(parent=None, init_channel=None, bit=-1)[source]
+

Bases: PyDMLed

+

PyDMLed specialization to represent 2 states in red/light green.

+
+
+value_changed(new_val)[source]
+

If no bit is set, treat new_val as 2 states, zero and non-zero.

+
+ +
+ +
+
+class siriushla.widgets.led.SiriusLedState(parent=None, init_channel=None, bit=-1)[source]
+

Bases: PyDMLed

+

PyDMLed specialization to represent 2 states in dark/light green.

+
+
+value_changed(new_val)[source]
+

Reimplement value_changed to filter bug.

+
+ +
+ +
+
+

siriushla.widgets.ledit_scrollbar module

+

Defines PyDM widget with a line edit and a double scrollbar.

+
+
+class siriushla.widgets.ledit_scrollbar.PyDMLinEditScrollbar(parent=None, init_channel=None)[source]
+

Bases: QWidget

+

Composition of a LineEdit and a Scrollbar to set a float PV.

+
+
+paintEvent(event)[source]
+

Need to override paintEvent in order to apply CSS.

+
+ +
+ +
+
+

siriushla.widgets.line_edit module

+

PyDMLine edit with validator.

+
+
+class siriushla.widgets.line_edit.SiriusLineEdit(parent=None, init_channel=None)[source]
+

Bases: PyDMLineEdit

+

LineEdit with validator.

+
+
+update_format_string()[source]
+

Accept a unit to display with a channel’s value

+

The unit may or may not be displayed based on the showUnits +attribute. Receiving a new value for the unit causes the display to +reset.

+
+ +
+ +
+
+class siriushla.widgets.line_edit.SiriusWaveformLineEdit(parent=None, init_channel=None)[source]
+

Bases: SiriusLineEdit

+

Line Edit with bugfix for waveform setpoints.

+
+
+value_changed(value)[source]
+

Force value to be a numpy array.

+
+ +
+ +
+
+

siriushla.widgets.loading_dialog module

+
+
+class siriushla.widgets.loading_dialog.LoadingDialog(title, maximum, parent=None)[source]
+

Bases: QDialog

+
+
+closeEvent(self, a0: QCloseEvent | None)[source]
+
+ +
+
+done(self, a0: int)[source]
+
+ +
+
+update(self)[source]
+
+update(self, a0: QRect) None
+
+update(self, a0: QRegion) None
+
+update(self, ax: int, ay: int, aw: int, ah: int) None
+
+ +
+ +
+
+

siriushla.widgets.log_display module

+

SiriusLogDisplay.

+
+
+class siriushla.widgets.log_display.SiriusGuiHandler(level=0, parent=None)[source]
+

Bases: GuiHandler

+
+
+emit(record)[source]
+

Emit formatted log messages when received but only if level is set.

+
+ +
+
+message
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+class siriushla.widgets.log_display.SiriusLogDisplay(parent=None, logname=None, level=0)[source]
+

Bases: PyDMLogDisplay

+

Standard display for Log Output

+

This widget handles instantating a GuiHandler and displaying log +messages to a QPlainTextEdit. The level of the log can be changed from +inside the widget itself, allowing users to select from any of the +.levels specified by the widget.

+
+
Parameters:
+
    +
  • parent (QObject, optional) –

  • +
  • logname (str) – Name of log to display in widget

  • +
  • level (logging.Level) – Initial level of log display

  • +
+
+
+
+
+Colors = {10: 'black', 20: 'black', 30: 'yellow', 40: 'red', 50: 'red'}
+
+ +
+
+writehtml(message, levelno)[source]
+

Write a message to the log display.

+
+ +
+ +
+
+

siriushla.widgets.log_label module

+

Log label.

+
+
+class siriushla.widgets.log_label.PyDMLogLabel(parent=None, init_channel=None, replace=None)[source]
+

Bases: QListWidget, TextFormatter, PyDMWidget, DisplayFormat

+

A QListWidget with support for Channels and more from PyDM.

+
+
Parameters:
+
    +
  • parent (QWidget) – The parent widget for the Label

  • +
  • init_channel (str, optional) – The channel to be used by the widget.

  • +
+
+
+
+
+class DisplayFormat
+

Bases: object

+

Display format for showing data in a PyDM widget.

+
+
+BSMPUDCVersion = 7
+
+ +
+
+Binary = 5
+

Show numerical values in base 2 (binary) notation.

+
+ +
+
+Decimal = 2
+

Show numerical values as floating point (base 10, decimal) values.

+
+ +
+
+Default = 0
+

The default display format.

+
+ +
+
+Exponential = 3
+

Show numerical values in scientific / exponential notation.

+
+ +
+
+Hex = 4
+

Show numerical values in base 16 (hexadecimal) notation.

+
+ +
+
+String = 1
+

Show the data as a string.

+
+ +
+
+Time = 6
+
+ +
+ +
+
+bufferSize
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+dateTimeFmt
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+displayFormat
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+errorcolor = <PyQt5.QtGui.QColor object>
+
+ +
+
+prependDateTime
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+value_changed(new_value)[source]
+

Callback invoked when the Channel value is changed.

+

Sets the value of new_value accordingly at the Label.

+
+
Parameters:
+

new_value (str, int, float, bool or np.ndarray) – The new value from the channel. The type depends on the channel.

+
+
+
+ +
+
+warncolor = <PyQt5.QtGui.QColor object>
+
+ +
+ +
+
+

siriushla.widgets.matplotlib module

+

Derive matplotlib FigureCanvas to resize labels in ZoomIn/ZoomOut.

+
+
+class siriushla.widgets.matplotlib.MatplotlibCanvas(figure=None, parent=None)[source]
+

Bases: FigureCanvasQTAgg

+

MatplotlibCanvas class.

+
+
+changeEvent(event)[source]
+

Reimplement changeEvent to handle labels resizing.

+
+ +
+ +
+
+class siriushla.widgets.matplotlib.MatplotlibWidget(parent=None, figure=None, toolbar_position='bottom')[source]
+

Bases: QWidget

+

MatplotlibWidget class.

+
+ +
+
+

siriushla.widgets.process_image module

+

Process Image Widget.

+
+
+class siriushla.widgets.process_image.SiriusProcessImage(parent=None, device='', convertion_set=True, orientation='V')[source]
+

Bases: QWidget

+
+ +
+
+

siriushla.widgets.pushbutton module

+

Sirius pushbutton.

+
+
+class siriushla.widgets.pushbutton.CAPushButton[source]
+

Bases: QPushButton, PyDMPrimitiveWidget

+

QPushButton with rules.

+
+ +
+
+class siriushla.widgets.pushbutton.SiriusPushButton(parent=None, init_channel=None, label='', icon=None, pressValue=1, releaseValue=None, relative=False)[source]
+

Bases: PyDMPushButton

+

Basic PushButton to send a fixed value.

+

The PyDMPushButton is meant to hold a specific value, and send that value +to a channel when it is clicked, much like the MessageButton does in EDM. +The PyDMPushButton works in two different modes of operation, first, a +fixed value can be given to the pressValue attribute, whenever the +button is clicked a signal containing this value will be sent to the +connected channel. This is the default behavior of the button. However, if +the relativeChange is set to True, the fixed value will be added +to the current value of the channel. This means that the button will +increment a channel by a fixed amount with every click, a consistent +relative move

+
+
Parameters:
+
    +
  • parent (QObject, optional) – Parent of PyDMPushButton

  • +
  • init_channel (str, optional) – ID of channel to manipulate

  • +
  • label (str, optional) – String to place on button

  • +
  • icon (QIcon, optional) – An Icon to display on the PyDMPushButton

  • +
  • pressValue (int, float, str) – Value to be sent when the button is pressed

  • +
  • releaseValue (int, float, str) – Value to be sent when the button is released

  • +
  • relative (bool, optional) – Choice to have the button perform a relative put, instead of always +setting to an absolute value

  • +
+
+
+
+
+releaseValue
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+sendReleaseValue()[source]
+

Send a new value to the channel.

+

This function interprets the settings of the PyDMPushButton and sends +the appropriate value out through the send_value_signal.

+
+
Returns:
+

    +
  • None if any of the following condition is False

    +
      +
    1. There’s no new value (pressValue) for the widget

    2. +
    3. There’s no initial or current value for the widget

    4. +
    5. The relative flag is True

    6. +
    +
  • +
  • Otherwise, return the value sent to the channel

    +
      +
    1. The value sent to the channel is the same as the releaseValue

    2. +
    +
  • +
+

+
+
+
+ +
+ +
+
+

siriushla.widgets.pvnames_tree module

+

PVName selection tree view.

+
+
+class siriushla.widgets.pvnames_tree.BuildTree(obj)[source]
+

Bases: QThread

+

QThread to build tree.

+
+
+completed
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+currentItem
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+exit_task()[source]
+

Set flag to quit thread.

+
+ +
+
+itemDone
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+run()[source]
+

Build tree.

+
+ +
+
+size()[source]
+

Return task size.

+
+ +
+ +
+
+class siriushla.widgets.pvnames_tree.PVNameTree(items=(), tree_levels=(), checked_levels=(), parent=None)[source]
+

Bases: QWidget

+

Build a tree with SiriusPVNames.

+
+
+check_all()[source]
+

Check all items.

+
+ +
+
+check_requested_levels(levels)[source]
+

Set requested levels checked.

+
+ +
+
+checked_items()[source]
+

Return checked items.

+
+ +
+
+clear()[source]
+

Clear tree.

+
+ +
+
+collapse_all()[source]
+
+ +
+
+contextMenuEvent(event)[source]
+

Show context menu.

+
+ +
+
+expand_all()[source]
+

Expand all items.

+
+ +
+
+itemChecked
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+property items
+

Items.

+
+ +
+
+static mag_group(name)[source]
+

Return magnet group.

+
+ +
+
+property message
+
+ +
+
+sizeHint()[source]
+

Override sizehint.

+
+ +
+
+uncheck_all()[source]
+

Uncheck all items.

+
+ +
+
+updateItemCheckedCount
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+class siriushla.widgets.pvnames_tree.QTreeItem(string_list, parent=None)[source]
+

Bases: QTreeWidgetItem

+

Tree Item.

+
+
+childChecked(child, column, status)[source]
+

Child was checked.

+
+ +
+
+childHidden(child, status)[source]
+

Set child hidden.

+
+ +
+
+isLeaf()[source]
+

Return if is Leaf.

+
+ +
+
+property myhash
+
+ +
+
+setData(column, role, value)[source]
+

Set data.

+
+ +
+
+setHidden(status)[source]
+

Overhide setHidden method.

+
+ +
+ +
+
+class siriushla.widgets.pvnames_tree.Tree(parent=None)[source]
+

Bases: QTreeWidget

+
+
+resizeEvent(self, e: QResizeEvent | None)[source]
+
+ +
+ +
+
+

siriushla.widgets.qtplugins module

+
+
+

siriushla.widgets.relative_widget module

+
+
+class siriushla.widgets.relative_widget.RelativeWidget(parent=None, widget=None, relative_pos=None)[source]
+

Bases: QWidget

+

Widget that stays in a relative position in the window

+
+
+relativeResize()[source]
+

Resize and position in according to the relative position

+
+ +
+ +
+
+

siriushla.widgets.scrollbar module

+

PyDMScrollBar module.

+
+
+class siriushla.widgets.scrollbar.PyDMScrollBar(parent=None, orientation=1, init_channel=None)[source]
+

Bases: QDoubleScrollBar, TextFormatter, PyDMWritableWidget

+

A QDoubleScrollBar with support for Channels and more from PyDM.

+
+
Parameters:
+
    +
  • parent (QWidget) – The parent widget for the scroll bar

  • +
  • init_channel (str, optional) – The channel to be used by the widget.

  • +
  • orientation (Qt.Horizontal, Qt.Vertical) – Orientation of the scroll bar

  • +
  • precision (int) – Precision to be use. Used to calculate size of the scroll bar step

  • +
+
+
+
+
+connected_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+ctrl_limit_changed(which, new_limit)[source]
+

Set new upper/lower limits as maximum/minimum values.

+
+ +
+
+disconnected_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+precision_changed(new_precision)[source]
+

Set the step size based on the new precision value received.

+
+ +
+
+send_value()[source]
+

Emit a send_value_signal to update channel value.

+
+ +
+
+value_changed_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+widget_ctx_menu()[source]
+

Return context menu.

+
+ +
+ +
+
+

siriushla.widgets.selection_matrix module

+

Selection Widget.

+
+
+class siriushla.widgets.selection_matrix.SelectionMatrixWidget(parent=None, title='', has_bothplanes=False, toggle_all_false_text='Disable All', show_toggle_all_false=True, toggle_all_true_text='Enable All', show_toggle_all_true=True, use_scroll=True, rules=None)[source]
+

Bases: QWidget

+

Widget to perform component selection.

+
+
Parameters:
+
    +
  • parent (QWidget, optional) – The parent widget for the SelectionMatrixWidget.

  • +
  • title (str, optional) – Widget title.

  • +
  • has_bothplanes (bool, optional) – Whether to show button to send applyBothPlanesClicked signal. +Default: False.

  • +
  • toggle_all_false_text (string, optional) – Text to be displayed in toggleAllItems to False button. +Default: ‘Disable All’.

  • +
  • show_toggle_all_false (bool, optional) – Whether to show button to send toggleAllItems to False. +Default: True.

  • +
  • toggle_all_true_text (string, optional) – Text to be displayed in toggleAllItems to True button. +Default: ‘Enable All’.

  • +
  • show_toggle_all_true (bool, optional) – Whether to show button to send toggleAllItems to True. +Default: True.

  • +
  • use_scroll (bool, optional) – Whether to use or not QScrollArea. +Default: True.

  • +
  • rules – PyDM rules to be applied in write buttons. +Default: None.

  • +
  • Signals

  • +
  • -------

  • +
  • applyChangesClicked – emitted when “Apply Changes” button is clicked

  • +
  • applyBothPlanesClicked – emitted when “Apply Both Planes” button is clicked

  • +
+
+
+
+
+applyBothPlanesClicked
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+applyChangesClicked
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+get_headers()[source]
+

Should be implemented in class derivation.

+
+
Returns:
+

    +
  • top_headers (tuple or list) – A list of strings for top headers of the selection matrix widget.

  • +
  • side_headers (tuple or list) – A list of strings for side headers of the selection matrix widget.

  • +
+

+
+
+
+ +
+
+get_positions()[source]
+

Should be implemented in class derivation.

+
+
Returns:
+

positions – A tuple or list of layout positions for each widget +returned by get_widgets.

+
+
Return type:
+

tuple or list

+
+
+
+ +
+
+get_widgets()[source]
+

Should be implemented in class derivation.

+
+
Returns:
+

widgets – A tuple or list of widgets to be put in matrix.

+
+
Return type:
+

tuple or list

+
+
+
+ +
+
+property header_widgets
+

Return top and side header widget lists, respectively.

+
+ +
+
+property headers
+

Return top and side header text lists, respectively.

+
+ +
+
+mouseMoveEvent(event)[source]
+

Mouse move event.

+
+ +
+
+mousePressEvent(event)[source]
+

Mouse press event.

+
+ +
+
+mouseReleaseEvent(event)[source]
+

Mouse release event.

+
+ +
+
+paintEvent(_)[source]
+

Paint event to draw selection rectangle.

+
+ +
+
+property positions
+

Return widget position list.

+
+ +
+
+selectItems()[source]
+

Select items.

+
+ +
+
+selectWidgetsAt(idx, isrow=False)[source]
+

Select widgets at idx (row or column).

+
+ +
+
+toggleAllItems(value)[source]
+

Toggle all items.

+
+ +
+
+undoItemsSelection()[source]
+

Undo items selection.

+
+ +
+
+property widgets
+

Return widget list.

+
+ +
+ +
+
+

siriushla.widgets.signal_channel module

+
+
+class siriushla.widgets.signal_channel.SiriusConnectionSignal(address, **kws)[source]
+

Bases: QObject, PyDMChannel

+
+
+connection_state_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+enum_strings_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+getvalue()[source]
+
+ +
+
+lower_ctrl_limit_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+new_severity_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+new_value_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+prec_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+send_value_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+unit_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+upper_ctrl_limit_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+property value
+
+ +
+
+write_access_signal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+

siriushla.widgets.spectrogram_view module

+

SiriusSpectrogramView widget.

+

Based on ImageView from pydm and GradientLegend from pyqtgraph.

+
+
+class siriushla.widgets.spectrogram_view.SiriusSpectrogramView(parent=None, image_channel=None, xaxis_channel=None, yaxis_channel=None, roioffsetx_channel=None, roioffsety_channel=None, roiwidth_channel=None, roiheight_channel=None, title='', background='w', image_width=0, image_height=0)[source]
+

Bases: GraphicsLayoutWidget, PyDMWidget, PyDMColorMap, ReadingOrder

+

A SpectrogramView with support for Channels and more from PyDM.

+

If there is no channelWidth it is possible to define the width of +the image with the width property.

+

The normalizeData property defines if the colors of the images are +relative to the colorMapMin and colorMapMax property or to +the minimum and maximum values of the image.

+

Use the newImageSignal to hook up to a signal that is emitted when +a new image is rendered in the widget.

+
+
Parameters:
+
    +
  • parent (QWidget) – The parent widget for the Label

  • +
  • image_channel (str, optional) – The channel to be used by the widget for the image data.

  • +
  • xaxis_channel (str, optional) – The channel to be used by the widget to receive the image width +(if ReadingOrder == Clike), and to set the xaxis values

  • +
  • yaxis_channel (str, optional) – The channel to be used by the widget to receive the image width +(if ReadingOrder == Fortranlike), and to set the yaxis values

  • +
  • background (QColor, optional) – QColor to set the background color of the GraphicsView

  • +
+
+
+
+
+ROIHeight
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+ROIHeightChannel
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+ROIOffsetX
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+ROIOffsetXChannel
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+ROIOffsetY
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+ROIOffsetYChannel
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+ROIWidth
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+ROIWidthChannel
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+autoDownsample
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+autoSetColorbarLims
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+channels()[source]
+

Return the channels being used for this Widget.

+
+
Returns:
+

channels – List of PyDMChannel objects

+
+
Return type:
+

list

+
+
+
+ +
+
+channels_for_tools()[source]
+

Return channels for tools.

+
+ +
+
+colorMap
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+colorMapMax
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+colorMapMin
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+color_maps = {0: array([[3.72810000e-01, 1.18830000e-01, 3.53583000e+00],        [5.75790000e-01, 3.30225000e-01, 4.67440500e+00],        [8.36145000e-01, 5.87775000e-01, 6.04554000e+00],        [1.15056000e+00, 8.89950000e-01, 7.64107500e+00],        [1.51725000e+00, 1.23496500e+00, 9.46815000e+00],        [1.93494000e+00, 1.62078000e+00, 1.14681150e+01],        [2.40363000e+00, 2.04561000e+00, 1.34752200e+01],        [2.92357500e+00, 2.50614000e+00, 1.54912500e+01],        [3.49554000e+00, 3.00160500e+00, 1.75100850e+01],        [4.11978000e+00, 3.52920000e+00, 1.95337650e+01],        [4.79782500e+00, 4.08663000e+00, 2.15689200e+01],        [5.53146000e+00, 4.67160000e+00, 2.36155500e+01],        [6.32196000e+00, 5.28232500e+00, 2.56723800e+01],        [7.17136500e+00, 5.91625500e+00, 2.77406850e+01],        [8.08248000e+00, 6.57007500e+00, 2.98260750e+01],        [9.05760000e+00, 7.24123500e+00, 3.19282950e+01],        [1.01000400e+01, 7.92795000e+00, 3.40463250e+01],        [1.11766500e+01, 8.62665000e+00, 3.61809300e+01],        [1.22558100e+01, 9.33478500e+00, 3.83333850e+01],        [1.33416000e+01, 1.00487850e+01, 4.05044550e+01],        [1.44368250e+01, 1.07508000e+01, 4.26987300e+01],        [1.55419950e+01, 1.14224700e+01, 4.49128950e+01],        [1.66591500e+01, 1.20660900e+01, 4.71474600e+01],        [1.77898200e+01, 1.26801300e+01, 4.94024250e+01],        [1.89355350e+01, 1.32643350e+01, 5.16783000e+01],        [2.00978250e+01, 1.38169200e+01, 5.39750850e+01],        [2.12787300e+01, 1.43373750e+01, 5.62925250e+01],        [2.24795250e+01, 1.48239150e+01, 5.86301100e+01],        [2.37019950e+01, 1.52755200e+01, 6.09868200e+01],        [2.49474150e+01, 1.56904050e+01, 6.33616350e+01],        [2.62178250e+01, 1.60675500e+01, 6.57527700e+01],        [2.75142450e+01, 1.64054250e+01, 6.81586950e+01],        [2.88389700e+01, 1.67004600e+01, 7.05799200e+01],        [3.01932750e+01, 1.69521450e+01, 7.30118550e+01],        [3.15774150e+01, 1.71602250e+01, 7.54491450e+01],        [3.29919000e+01, 1.73234250e+01, 7.78879650e+01],        [3.44385150e+01, 1.74397050e+01, 8.03250000e+01],        [3.59187900e+01, 1.75067700e+01, 8.27571900e+01],        [3.74301750e+01, 1.75281900e+01, 8.51728050e+01],        [3.89739450e+01, 1.75024350e+01, 8.75680200e+01],        [4.05495900e+01, 1.74302700e+01, 8.99354400e+01],        [4.21535400e+01, 1.73173050e+01, 9.22630800e+01],        [4.37868150e+01, 1.71627750e+01, 9.45466050e+01],        [4.54440600e+01, 1.69768800e+01, 9.67717350e+01],        [4.71242550e+01, 1.67616600e+01, 9.89331150e+01],        [4.88223000e+01, 1.65285900e+01, 1.01018760e+02],        [5.05351350e+01, 1.62848100e+01, 1.03022295e+02],        [5.22584250e+01, 1.60412850e+01, 1.04936070e+02],        [5.39880900e+01, 1.58079600e+01, 1.06754985e+02],        [5.57205600e+01, 1.55952900e+01, 1.08474960e+02],        [5.74520100e+01, 1.54134750e+01, 1.10094210e+02],        [5.91796350e+01, 1.52716950e+01, 1.11612225e+02],        [6.09006300e+01, 1.51768350e+01, 1.13030280e+02],        [6.26134650e+01, 1.51347600e+01, 1.14351180e+02],        [6.43161000e+01, 1.51508250e+01, 1.15578240e+02],        [6.60085350e+01, 1.52250300e+01, 1.16716050e+02],        [6.76889850e+01, 1.53604350e+01, 1.17769200e+02],        [6.93584700e+01, 1.55534700e+01, 1.18743300e+02],        [7.10157150e+01, 1.58043900e+01, 1.19643450e+02],        [7.26625050e+01, 1.61078400e+01, 1.20475005e+02],        [7.42983300e+01, 1.64610150e+01, 1.21242810e+02],        [7.59237000e+01, 1.68598350e+01, 1.21951965e+02],        [7.75406550e+01, 1.72979250e+01, 1.22607060e+02],        [7.91474100e+01, 1.77740100e+01, 1.23212430e+02],        [8.07467700e+01, 1.82809500e+01, 1.23771900e+02],        [8.23392450e+01, 1.88144100e+01, 1.24289040e+02],        [8.39240700e+01, 1.93728600e+01, 1.24768185e+02],        [8.55035400e+01, 1.99501800e+01, 1.25211120e+02],        [8.70779100e+01, 2.05438200e+01, 1.25620905e+02],        [8.86471800e+01, 2.11512300e+01, 1.26000855e+02],        [9.02121150e+01, 2.17701150e+01, 1.26352755e+02],        [9.17739900e+01, 2.23969050e+01, 1.26678390e+02],        [9.33330600e+01, 2.30300700e+01, 1.26979800e+02],        [9.48895800e+01, 2.36680800e+01, 1.27258515e+02],        [9.64438050e+01, 2.43096600e+01, 1.27517085e+02],        [9.79962450e+01, 2.49530250e+01, 1.27755510e+02],        [9.95479200e+01, 2.55966450e+01, 1.27975320e+02],        [1.01099085e+02, 2.62400100e+01, 1.28177790e+02],        [1.02649740e+02, 2.68821000e+01, 1.28363430e+02],        [1.04200395e+02, 2.75221500e+01, 1.28533260e+02],        [1.05750795e+02, 2.81599050e+01, 1.28688810e+02],        [1.07301705e+02, 2.87946000e+01, 1.28829825e+02],        [1.08853635e+02, 2.94257250e+01, 1.28957070e+02],        [1.10406585e+02, 3.00530250e+01, 1.29070800e+02],        [1.11960810e+02, 3.06759900e+01, 1.29171525e+02],        [1.13516565e+02, 3.12946200e+01, 1.29259755e+02],        [1.15074105e+02, 3.19086600e+01, 1.29335490e+02],        [1.16633430e+02, 3.25181100e+01, 1.29399240e+02],        [1.18194540e+02, 3.31227150e+01, 1.29451260e+02],        [1.19758200e+02, 3.37224750e+01, 1.29491295e+02],        [1.21323900e+02, 3.43171350e+01, 1.29519855e+02],        [1.22891895e+02, 3.49072050e+01, 1.29537195e+02],        [1.24462440e+02, 3.54924300e+01, 1.29542805e+02],        [1.26035790e+02, 3.60728100e+01, 1.29536940e+02],        [1.27611690e+02, 3.66483450e+01, 1.29519600e+02],        [1.29190395e+02, 3.72192900e+01, 1.29490530e+02],        [1.30771905e+02, 3.77856450e+01, 1.29450240e+02],        [1.32356475e+02, 3.83476650e+01, 1.29397965e+02],        [1.33943850e+02, 3.89050950e+01, 1.29333960e+02],        [1.35534285e+02, 3.94584450e+01, 1.29258225e+02],        [1.37127525e+02, 4.00079700e+01, 1.29170505e+02],        [1.38723825e+02, 4.05534150e+01, 1.29070545e+02],        [1.40323185e+02, 4.10952900e+01, 1.28958345e+02],        [1.41925605e+02, 4.16335950e+01, 1.28833650e+02],        [1.43530830e+02, 4.21688400e+01, 1.28696460e+02],        [1.45138860e+02, 4.27007700e+01, 1.28546775e+02],        [1.46749950e+02, 4.32301500e+01, 1.28383830e+02],        [1.48363845e+02, 4.37569800e+01, 1.28208135e+02],        [1.49980290e+02, 4.42812600e+01, 1.28018925e+02],        [1.51599540e+02, 4.48037550e+01, 1.27816455e+02],        [1.53221340e+02, 4.53244650e+01, 1.27600470e+02],        [1.54845690e+02, 4.58436450e+01, 1.27370460e+02],        [1.56472335e+02, 4.63618050e+01, 1.27126680e+02],        [1.58101275e+02, 4.68792000e+01, 1.26868620e+02],        [1.59732255e+02, 4.73960850e+01, 1.26596280e+02],        [1.61365275e+02, 4.79127150e+01, 1.26309660e+02],        [1.63000080e+02, 4.84298550e+01, 1.26008250e+02],        [1.64636415e+02, 4.89477600e+01, 1.25692050e+02],        [1.66274280e+02, 4.94664300e+01, 1.25360805e+02],        [1.67913165e+02, 4.99868850e+01, 1.25014515e+02],        [1.69553325e+02, 5.05091250e+01, 1.24653180e+02],        [1.71193995e+02, 5.10339150e+01, 1.24276290e+02],        [1.72835430e+02, 5.15617650e+01, 1.23883845e+02],        [1.74477120e+02, 5.20929300e+01, 1.23475845e+02],        [1.76118555e+02, 5.26279200e+01, 1.23052290e+02],        [1.77759990e+02, 5.31677550e+01, 1.22612925e+02],        [1.79400660e+02, 5.37126900e+01, 1.22157495e+02],        [1.81040310e+02, 5.42632350e+01, 1.21686255e+02],        [1.82678685e+02, 5.48204100e+01, 1.21198950e+02],        [1.84315275e+02, 5.53844700e+01, 1.20695580e+02],        [1.85950080e+02, 5.59564350e+01, 1.20176145e+02],        [1.87582080e+02, 5.65368150e+01, 1.19640900e+02],        [1.89211020e+02, 5.71263750e+01, 1.19089590e+02],        [1.90836390e+02, 5.77261350e+01, 1.18522470e+02],        [1.92457935e+02, 5.83368600e+01, 1.17939795e+02],        [1.94074635e+02, 5.89595700e+01, 1.17341310e+02],        [1.95686490e+02, 5.95947750e+01, 1.16727525e+02],        [1.97292225e+02, 6.02434950e+01, 1.16098695e+02],        [1.98891840e+02, 6.09070050e+01, 1.15455075e+02],        [2.00484060e+02, 6.15860700e+01, 1.14796920e+02],        [2.02068885e+02, 6.22817100e+01, 1.14123465e+02],        [2.03645040e+02, 6.29952000e+01, 1.13436240e+02],        [2.05211760e+02, 6.37273050e+01, 1.12736010e+02],        [2.06768025e+02, 6.44795550e+01, 1.12022775e+02],        [2.08313070e+02, 6.52532250e+01, 1.11297555e+02],        [2.09846130e+02, 6.60490800e+01, 1.10561115e+02],        [2.11365930e+02, 6.68683950e+01, 1.09814220e+02],        [2.12871705e+02, 6.77127000e+01, 1.09056105e+02],        [2.14362180e+02, 6.85830150e+01, 1.08289830e+02],        [2.15836080e+02, 6.94806150e+01, 1.07515905e+02],        [2.17292130e+02, 7.04070300e+01, 1.06736115e+02],        [2.18729565e+02, 7.13635350e+01, 1.05951480e+02],        [2.20146600e+02, 7.23508950e+01, 1.05162765e+02],        [2.21542215e+02, 7.33706400e+01, 1.04372265e+02],        [2.22914880e+02, 7.44240450e+01, 1.03582275e+02],        [2.24263320e+02, 7.55118750e+01, 1.02795090e+02],        [2.25586005e+02, 7.66351500e+01, 1.02011985e+02],        [2.26881405e+02, 7.77951450e+01, 1.01235510e+02],        [2.28148500e+02, 7.89921150e+01, 1.00468725e+02],        [2.29385760e+02, 8.02270800e+01, 9.97144350e+01],        [2.30591655e+02, 8.15005500e+01, 9.89749350e+01],        [2.31765420e+02, 8.28125250e+01, 9.82535400e+01],        [2.32905270e+02, 8.41632600e+01, 9.75535650e+01],        [2.34010695e+02, 8.55525000e+01, 9.68783250e+01],        [2.35080420e+02, 8.69799900e+01, 9.62308800e+01],        [2.36113935e+02, 8.84452200e+01, 9.56145450e+01],        [2.37110475e+02, 8.99471700e+01, 9.50326350e+01],        [2.38069530e+02, 9.14848200e+01, 9.44879550e+01],        [2.38991355e+02, 9.30568950e+01, 9.39845850e+01],        [2.39875185e+02, 9.46621200e+01, 9.35243100e+01],        [2.40721530e+02, 9.62989650e+01, 9.31096800e+01],        [2.41530900e+02, 9.79653900e+01, 9.27437550e+01],        [2.42303550e+02, 9.96591000e+01, 9.24293400e+01],        [2.43040245e+02, 1.01378565e+02, 9.21666900e+01],        [2.43741495e+02, 1.03122000e+02, 9.19578450e+01],        [2.44408320e+02, 1.04887620e+02, 9.18035700e+01],        [2.45041995e+02, 1.06672365e+02, 9.17056500e+01],        [2.45644050e+02, 1.08474450e+02, 9.16645950e+01],        [2.46214995e+02, 1.10292345e+02, 9.16798950e+01],        [2.46756105e+02, 1.12124265e+02, 9.17515500e+01],        [2.47268400e+02, 1.13968680e+02, 9.18793050e+01],        [2.47753410e+02, 1.15823550e+02, 9.20626500e+01],        [2.48212155e+02, 1.17687600e+02, 9.23010750e+01],        [2.48645910e+02, 1.19559555e+02, 9.25933050e+01],        [2.49055950e+02, 1.21437630e+02, 9.29388300e+01],        [2.49443550e+02, 1.23321060e+02, 9.33363750e+01],        [2.49809475e+02, 1.25208570e+02, 9.37846650e+01],        [2.50155000e+02, 1.27099140e+02, 9.42821700e+01],        [2.50481145e+02, 1.28992005e+02, 9.48278700e+01],        [2.50788675e+02, 1.30886400e+02, 9.54204900e+01],        [2.51078610e+02, 1.32781815e+02, 9.60579900e+01],        [2.51351715e+02, 1.34677740e+02, 9.67396050e+01],        [2.51608500e+02, 1.36573410e+02, 9.74635500e+01],        [2.51849730e+02, 1.38468825e+02, 9.82285500e+01],        [2.52075915e+02, 1.40363730e+02, 9.90330750e+01],        [2.52287565e+02, 1.42257615e+02, 9.98761050e+01],        [2.52485190e+02, 1.44150480e+02, 1.00756110e+02],        [2.52672105e+02, 1.46040030e+02, 1.01672070e+02],        [2.52847290e+02, 1.47927285e+02, 1.02622455e+02],        [2.53009980e+02, 1.49813010e+02, 1.03606245e+02],        [2.53160175e+02, 1.51697205e+02, 1.04622165e+02],        [2.53298130e+02, 1.53580125e+02, 1.05669450e+02],        [2.53427670e+02, 1.55459220e+02, 1.06746315e+02],        [2.53548795e+02, 1.57334745e+02, 1.07852250e+02],        [2.53658190e+02, 1.59209250e+02, 1.08986235e+02],        [2.53756110e+02, 1.61082480e+02, 1.10147505e+02],        [2.53847400e+02, 1.62951885e+02, 1.11334785e+02],        [2.53931550e+02, 1.64817720e+02, 1.12547055e+02],        [2.54004480e+02, 1.66683045e+02, 1.13784315e+02],        [2.54066955e+02, 1.68547095e+02, 1.15045800e+02],        [2.54127900e+02, 1.70405280e+02, 1.16328960e+02],        [2.54177625e+02, 1.72262955e+02, 1.17635070e+02],        [2.54215875e+02, 1.74121140e+02, 1.18964130e+02],        [2.54254635e+02, 1.75972440e+02, 1.20311805e+02],        [2.54282430e+02, 1.77823995e+02, 1.21681410e+02],        [2.54299770e+02, 1.79675805e+02, 1.23071925e+02],        [2.54317875e+02, 1.81521240e+02, 1.24479270e+02],        [2.54324505e+02, 1.83367695e+02, 1.25907525e+02],        [2.54324505e+02, 1.85212620e+02, 1.27354140e+02],        [2.54321955e+02, 1.87053975e+02, 1.28817585e+02],        [2.54307675e+02, 1.88896860e+02, 1.30300665e+02],        [2.54293140e+02, 1.90735155e+02, 1.31799045e+02],        [2.54270190e+02, 1.92573450e+02, 1.33315530e+02],        [2.54239845e+02, 1.94411490e+02, 1.34849355e+02],        [2.54208990e+02, 1.96245705e+02, 1.36397460e+02],        [2.54165385e+02, 1.98082725e+02, 1.37964945e+02],        [2.54125605e+02, 1.99914135e+02, 1.39544415e+02],        [2.54074095e+02, 2.01747585e+02, 1.41142245e+02],        [2.54021310e+02, 2.03578740e+02, 1.42754100e+02],        [2.53962660e+02, 2.05409385e+02, 1.44381510e+02],        [2.53898400e+02, 2.07240030e+02, 1.46024475e+02],        [2.53833120e+02, 2.09068125e+02, 1.47680700e+02],        [2.53758405e+02, 2.10898260e+02, 1.49353755e+02],        [2.53687005e+02, 2.12724315e+02, 1.51038285e+02],        [2.53603620e+02, 2.14553685e+02, 1.52740665e+02],        [2.53526610e+02, 2.16377700e+02, 1.54452480e+02],        [2.53435830e+02, 2.18206305e+02, 1.56182910e+02],        [2.53353975e+02, 2.20029045e+02, 1.57921245e+02],        [2.53258350e+02, 2.21856120e+02, 1.59678195e+02],        [2.53171905e+02, 2.23677840e+02, 1.61442795e+02],        [2.53072200e+02, 2.25504150e+02, 1.63225245e+02],        [2.52982695e+02, 2.27324850e+02, 1.65014580e+02],        [2.52880440e+02, 2.29149885e+02, 1.66821510e+02],        [2.52789660e+02, 2.30969565e+02, 1.68633795e+02],        [2.52687150e+02, 2.32793325e+02, 1.70462655e+02],        [2.52595350e+02, 2.34612495e+02, 1.72297125e+02],        [2.52494625e+02, 2.36434980e+02, 1.74146130e+02],        [2.52402825e+02, 2.38253895e+02, 1.76000490e+02],        [2.52305670e+02, 2.40074850e+02, 1.77867345e+02],        [2.52214635e+02, 2.41894020e+02, 1.79740065e+02],        [2.52122835e+02, 2.43714210e+02, 1.81621710e+02],        [2.52033585e+02, 2.45533890e+02, 1.83510495e+02],        [2.51948415e+02, 2.47353060e+02, 1.85404635e+02],        [2.51861205e+02, 2.49174270e+02, 1.87306680e+02],        [2.51783685e+02, 2.50993440e+02, 1.89210510e+02],        [2.51698515e+02, 2.52816690e+02, 1.91123520e+02]]), 1: array([[3.72810000e-01, 1.18830000e-01, 3.53583000e+00],        [5.78085000e-01, 3.23850000e-01, 4.73535000e+00],        [8.41245000e-01, 5.73495000e-01, 6.18094500e+00],        [1.15948500e+00, 8.64960000e-01, 7.88179500e+00],        [1.53153000e+00, 1.19646000e+00, 9.83229000e+00],        [1.95738000e+00, 1.56468000e+00, 1.19431800e+01],        [2.43805500e+00, 1.96681500e+00, 1.40614650e+01],        [2.97406500e+00, 2.40133500e+00, 1.61823000e+01],        [3.56872500e+00, 2.86237500e+00, 1.83248100e+01],        [4.22305500e+00, 3.34968000e+00, 2.04719100e+01],        [4.94011500e+00, 3.85891500e+00, 2.26355850e+01],        [5.72398500e+00, 4.38574500e+00, 2.48183850e+01],        [6.57721500e+00, 4.92940500e+00, 2.70121500e+01],        [7.50516000e+00, 5.48326500e+00, 2.92283550e+01],        [8.51317500e+00, 6.04401000e+00, 3.14662350e+01],        [9.60534000e+00, 6.60985500e+00, 3.37191600e+01],        [1.07745150e+01, 7.17544500e+00, 3.59909550e+01],        [1.19633250e+01, 7.73262000e+00, 3.82918200e+01],        [1.31692200e+01, 8.28087000e+00, 4.06097700e+01],        [1.43944950e+01, 8.81509500e+00, 4.29455700e+01],        [1.56417000e+01, 9.33045000e+00, 4.52987100e+01],        [1.69144050e+01, 9.81852000e+00, 4.76753100e+01],        [1.82143950e+01, 1.02749700e+01, 5.00702700e+01],        [1.95424350e+01, 1.06857750e+01, 5.24787450e+01],        [2.09003100e+01, 1.10486400e+01, 5.48986950e+01],        [2.22898050e+01, 1.13617800e+01, 5.73273150e+01],        [2.37124500e+01, 1.16236650e+01, 5.97612900e+01],        [2.51690100e+01, 1.18325100e+01, 6.21955200e+01],        [2.66605050e+01, 1.19870400e+01, 6.46246500e+01],        [2.81866800e+01, 1.20867450e+01, 6.70425600e+01],        [2.97472800e+01, 1.21313700e+01, 6.94418550e+01],        [3.13415400e+01, 1.21216800e+01, 7.18141200e+01],        [3.29676750e+01, 1.20597150e+01, 7.41509400e+01],        [3.46233900e+01, 1.19482800e+01, 7.64428800e+01],        [3.63063900e+01, 1.17917100e+01, 7.86810150e+01],        [3.80136150e+01, 1.15943400e+01, 8.08566750e+01],        [3.97417500e+01, 1.13625450e+01, 8.29611900e+01],        [4.14856950e+01, 1.11062700e+01, 8.49856350e+01],        [4.32416250e+01, 1.08346950e+01, 8.69228700e+01],        [4.50057150e+01, 1.05575100e+01, 8.87683050e+01],        [4.67743950e+01, 1.02838950e+01, 9.05176050e+01],        [4.85435850e+01, 1.00237950e+01, 9.21689850e+01],        [5.03107350e+01, 9.79200000e+00, 9.37214250e+01],        [5.20732950e+01, 9.59616000e+00, 9.51756900e+01],        [5.38292250e+01, 9.44265000e+00, 9.65335650e+01],        [5.55769950e+01, 9.33682500e+00, 9.77981100e+01],        [5.73145650e+01, 9.28327500e+00, 9.89728950e+01],        [5.90421900e+01, 9.28327500e+00, 1.00062000e+02],        [6.07596150e+01, 9.33835500e+00, 1.01070015e+02],        [6.24665850e+01, 9.44902500e+00, 1.02001785e+02],        [6.41631000e+01, 9.61477500e+00, 1.02861390e+02],        [6.58496700e+01, 9.83560500e+00, 1.03653675e+02],        [6.75265500e+01, 1.01099850e+01, 1.04382975e+02],        [6.91934850e+01, 1.04351100e+01, 1.05053880e+02],        [7.08517500e+01, 1.08000150e+01, 1.05669960e+02],        [7.25018550e+01, 1.12029150e+01, 1.06235040e+02],        [7.41445650e+01, 1.16392200e+01, 1.06752435e+02],        [7.57803900e+01, 1.21048500e+01, 1.07225205e+02],        [7.74098400e+01, 1.25959800e+01, 1.07656410e+02],        [7.90334250e+01, 1.31087850e+01, 1.08048855e+02],        [8.06519100e+01, 1.36399500e+01, 1.08404580e+02],        [8.22655500e+01, 1.41866700e+01, 1.08726135e+02],        [8.38748550e+01, 1.47458850e+01, 1.09015305e+02],        [8.54803350e+01, 1.53153000e+01, 1.09273620e+02],        [8.70825000e+01, 1.58928750e+01, 1.09503375e+02],        [8.86816050e+01, 1.64770800e+01, 1.09705335e+02],        [9.02781600e+01, 1.70658750e+01, 1.09881030e+02],        [9.18724200e+01, 1.76579850e+01, 1.10031735e+02],        [9.34648950e+01, 1.82526450e+01, 1.10158470e+02],        [9.50558400e+01, 1.88483250e+01, 1.10262000e+02],        [9.66452550e+01, 1.94445150e+01, 1.10343345e+02],        [9.82331400e+01, 2.00407050e+01, 1.10403525e+02],        [9.98205150e+01, 2.06363850e+01, 1.10442795e+02],        [1.01406870e+02, 2.12305350e+01, 1.10461665e+02],        [1.02992970e+02, 2.18229000e+01, 1.10460645e+02],        [1.04578815e+02, 2.24134800e+01, 1.10439990e+02],        [1.06164405e+02, 2.30017650e+01, 1.10400465e+02],        [1.07749995e+02, 2.35877550e+01, 1.10342070e+02],        [1.09335840e+02, 2.41714500e+01, 1.10265060e+02],        [1.10921685e+02, 2.47525950e+01, 1.10169945e+02],        [1.12507785e+02, 2.53311900e+01, 1.10056470e+02],        [1.14094140e+02, 2.59072350e+01, 1.09925400e+02],        [1.15681005e+02, 2.64812400e+01, 1.09776990e+02],        [1.17268125e+02, 2.70526950e+01, 1.09610730e+02],        [1.18855500e+02, 2.76221100e+01, 1.09426875e+02],        [1.20443640e+02, 2.81894850e+01, 1.09225170e+02],        [1.22032290e+02, 2.87548200e+01, 1.09006125e+02],        [1.23621195e+02, 2.93183700e+01, 1.08769740e+02],        [1.25210610e+02, 2.98806450e+01, 1.08515760e+02],        [1.26800535e+02, 3.04416450e+01, 1.08244440e+02],        [1.28390715e+02, 3.10016250e+01, 1.07955780e+02],        [1.29981150e+02, 3.15610950e+01, 1.07649780e+02],        [1.31571585e+02, 3.21198000e+01, 1.07326185e+02],        [1.33162530e+02, 3.26782500e+01, 1.06984995e+02],        [1.34753220e+02, 3.32369550e+01, 1.06626210e+02],        [1.36344165e+02, 3.37961700e+01, 1.06250085e+02],        [1.37934600e+02, 3.43558950e+01, 1.05856365e+02],        [1.39525035e+02, 3.49168950e+01, 1.05445305e+02],        [1.41114960e+02, 3.54791700e+01, 1.05016395e+02],        [1.42704120e+02, 3.60432300e+01, 1.04569890e+02],        [1.44292770e+02, 3.66095850e+01, 1.04105790e+02],        [1.45880655e+02, 3.71782350e+01, 1.03624095e+02],        [1.47467520e+02, 3.77499450e+01, 1.03124805e+02],        [1.49052855e+02, 3.83249700e+01, 1.02608175e+02],        [1.50637170e+02, 3.89035650e+01, 1.02073950e+02],        [1.52219700e+02, 3.94862400e+01, 1.01521875e+02],        [1.53800445e+02, 4.00735050e+01, 1.00952205e+02],        [1.55379150e+02, 4.06658700e+01, 1.00365195e+02],        [1.56955815e+02, 4.12633350e+01, 9.97608450e+01],        [1.58529675e+02, 4.18669200e+01, 9.91391550e+01],        [1.60100985e+02, 4.24766250e+01, 9.85003800e+01],        [1.61669490e+02, 4.30929600e+01, 9.78445200e+01],        [1.63234425e+02, 4.37166900e+01, 9.71715750e+01],        [1.64796300e+02, 4.43480700e+01, 9.64815450e+01],        [1.66354095e+02, 4.49873550e+01, 9.57744300e+01],        [1.67908065e+02, 4.56353100e+01, 9.50507400e+01],        [1.69457700e+02, 4.62924450e+01, 9.43107300e+01],        [1.71002745e+02, 4.69590150e+01, 9.35541450e+01],        [1.72542690e+02, 4.76357850e+01, 9.27814950e+01],        [1.74077280e+02, 4.83227550e+01, 9.19930350e+01],        [1.75606515e+02, 4.90209450e+01, 9.11887650e+01],        [1.77129885e+02, 4.97303550e+01, 9.03689400e+01],        [1.78646880e+02, 5.04520050e+01, 8.95338150e+01],        [1.80157500e+02, 5.11856400e+01, 8.86831350e+01],        [1.81660980e+02, 5.19322800e+01, 8.78176650e+01],        [1.83157320e+02, 5.26921800e+01, 8.69374050e+01],        [1.84646265e+02, 5.34658500e+01, 8.60431200e+01],        [1.86126795e+02, 5.42535450e+01, 8.51345550e+01],        [1.87599165e+02, 5.50560300e+01, 8.42124750e+01],        [1.89062865e+02, 5.58735600e+01, 8.32768800e+01],        [1.90517385e+02, 5.67063900e+01, 8.23282800e+01],        [1.91962470e+02, 5.75550300e+01, 8.13666750e+01],        [1.93397610e+02, 5.84197350e+01, 8.03928300e+01],        [1.94822550e+02, 5.93012700e+01, 7.94067450e+01],        [1.96236780e+02, 6.01996350e+01, 7.84086750e+01],        [1.97640045e+02, 6.11150850e+01, 7.73991300e+01],        [1.99031835e+02, 6.20483850e+01, 7.63783650e+01],        [2.00411895e+02, 6.29992800e+01, 7.53466350e+01],        [2.01779715e+02, 6.39682800e+01, 7.43044500e+01],        [2.03134785e+02, 6.49556400e+01, 7.32523200e+01],        [2.04477105e+02, 6.59618700e+01, 7.21902450e+01],        [2.05805910e+02, 6.69864600e+01, 7.11189900e+01],        [2.07120945e+02, 6.80304300e+01, 7.00385550e+01],        [2.08421955e+02, 6.90932700e+01, 6.89494500e+01],        [2.09708430e+02, 7.01752350e+01, 6.78516750e+01],        [2.10979860e+02, 7.12768350e+01, 6.67462500e+01],        [2.12236245e+02, 7.23978150e+01, 6.56326650e+01],        [2.13477075e+02, 7.35381750e+01, 6.45119400e+01],        [2.14702095e+02, 7.46979150e+01, 6.33838200e+01],        [2.15910795e+02, 7.58775450e+01, 6.22488150e+01],        [2.17102920e+02, 7.70763000e+01, 6.11071800e+01],        [2.18277960e+02, 7.82946900e+01, 5.99589150e+01],        [2.19435915e+02, 7.95324600e+01, 5.88045300e+01],        [2.20576530e+02, 8.07896100e+01, 5.76440250e+01],        [2.21699295e+02, 8.20658850e+01, 5.64779100e+01],        [2.22803955e+02, 8.33610300e+01, 5.53059300e+01],        [2.23890255e+02, 8.46753000e+01, 5.41283400e+01],        [2.24957940e+02, 8.60081850e+01, 5.29451400e+01],        [2.26007010e+02, 8.73594300e+01, 5.17568400e+01],        [2.27036955e+02, 8.87290350e+01, 5.05629300e+01],        [2.28047775e+02, 9.01167450e+01, 4.93639200e+01],        [2.29038960e+02, 9.15223050e+01, 4.81593000e+01],        [2.30010765e+02, 9.29454600e+01, 4.69495800e+01],        [2.30962425e+02, 9.43857000e+01, 4.57342500e+01],        [2.31894450e+02, 9.58432800e+01, 4.45135650e+01],        [2.32806330e+02, 9.73171800e+01, 4.32875250e+01],        [2.33697810e+02, 9.88076550e+01, 4.20556200e+01],        [2.34569145e+02, 1.00314195e+02, 4.08178500e+01],        [2.35419825e+02, 1.01836545e+02, 3.95742150e+01],        [2.36249850e+02, 1.03374195e+02, 3.83244600e+01],        [2.37059220e+02, 1.04927145e+02, 3.70685850e+01],        [2.37847935e+02, 1.06494885e+02, 3.58063350e+01],        [2.38615485e+02, 1.08076905e+02, 3.45372000e+01],        [2.39362125e+02, 1.09673205e+02, 3.32616900e+01],        [2.40087855e+02, 1.11283275e+02, 3.19792950e+01],        [2.40792675e+02, 1.12906860e+02, 3.06902700e+01],        [2.41476075e+02, 1.14543705e+02, 2.93943600e+01],        [2.42138310e+02, 1.16193300e+02, 2.80918200e+01],        [2.42779125e+02, 1.17855390e+02, 2.67829050e+01],        [2.43399030e+02, 1.19529720e+02, 2.54678700e+01],        [2.43997260e+02, 1.21215780e+02, 2.41472250e+01],        [2.44574070e+02, 1.22913570e+02, 2.28222450e+01],        [2.45129715e+02, 1.24622580e+02, 2.14936950e+01],        [2.45663685e+02, 1.26342810e+02, 2.01636150e+01],        [2.46176235e+02, 1.28073495e+02, 1.88340450e+01],        [2.46667110e+02, 1.29814890e+02, 1.75080450e+01],        [2.47136565e+02, 1.31566230e+02, 1.61894400e+01],        [2.47584345e+02, 1.33327515e+02, 1.48835850e+01],        [2.48010450e+02, 1.35098490e+02, 1.35976200e+01],        [2.48414880e+02, 1.36878900e+02, 1.23399600e+01],        [2.48797635e+02, 1.38668490e+02, 1.11225900e+01],        [2.49158460e+02, 1.40466750e+02, 9.95775000e+00],        [2.49497610e+02, 1.42273935e+02, 8.90740500e+00],        [2.49814830e+02, 1.44089535e+02, 8.00929500e+00],        [2.50110120e+02, 1.45913295e+02, 7.26954000e+00],        [2.50383225e+02, 1.47744960e+02, 6.69375000e+00],        [2.50634655e+02, 1.49584530e+02, 6.28855500e+00],        [2.50863645e+02, 1.51431495e+02, 6.06135000e+00],        [2.51070705e+02, 1.53286110e+02, 6.01953000e+00],        [2.51255325e+02, 1.55147610e+02, 6.17151000e+00],        [2.51417760e+02, 1.57016250e+02, 6.52596000e+00],        [2.51558010e+02, 1.58891775e+02, 7.09257000e+00],        [2.51675820e+02, 1.60773675e+02, 7.88154000e+00],        [2.51770935e+02, 1.62661950e+02, 8.90358000e+00],        [2.51843610e+02, 1.64556600e+02, 1.01709300e+01],        [2.51893845e+02, 1.66457115e+02, 1.16231550e+01],        [2.51921130e+02, 1.68363750e+02, 1.31962500e+01],        [2.51925975e+02, 1.70275740e+02, 1.48738950e+01],        [2.51907870e+02, 1.72193085e+02, 1.66405350e+01],        [2.51867070e+02, 1.74115785e+02, 1.84846950e+01],        [2.51803320e+02, 1.76043330e+02, 2.03974500e+01],        [2.51716620e+02, 1.77975720e+02, 2.23714050e+01],        [2.51606970e+02, 1.79912700e+02, 2.44019700e+01],        [2.51474625e+02, 1.81854015e+02, 2.64850650e+01],        [2.51319330e+02, 1.83799410e+02, 2.86183950e+01],        [2.51140575e+02, 1.85748885e+02, 3.08001750e+01],        [2.50939125e+02, 1.87702185e+02, 3.30293850e+01],        [2.50714980e+02, 1.89658290e+02, 3.53055150e+01],        [2.50468140e+02, 1.91617710e+02, 3.76290750e+01],        [2.50199115e+02, 1.93579425e+02, 4.00000650e+01],        [2.49908160e+02, 1.95543435e+02, 4.24200150e+01],        [2.49595530e+02, 1.97508975e+02, 4.48894350e+01],        [2.49261735e+02, 1.99475790e+02, 4.74103650e+01],        [2.48907540e+02, 2.01443370e+02, 4.99845900e+01],        [2.48532690e+02, 2.03411460e+02, 5.26146600e+01],        [2.48137440e+02, 2.05379295e+02, 5.53036350e+01],        [2.47724340e+02, 2.07346110e+02, 5.80527900e+01],        [2.47294665e+02, 2.09310375e+02, 6.08649300e+01],        [2.46850455e+02, 2.11271325e+02, 6.37428600e+01],        [2.46391965e+02, 2.13228705e+02, 6.66911700e+01],        [2.45920470e+02, 2.15181240e+02, 6.97147050e+01],        [2.45441835e+02, 2.17126380e+02, 7.28142300e+01],        [2.44959630e+02, 2.19062595e+02, 7.59925500e+01],        [2.44473600e+02, 2.20989120e+02, 7.92591000e+01],        [2.43992670e+02, 2.22902895e+02, 8.26133700e+01],        [2.43524235e+02, 2.24800095e+02, 8.60561250e+01],        [2.43069825e+02, 2.26680210e+02, 8.95990950e+01],        [2.42644230e+02, 2.28537630e+02, 9.32348850e+01],        [2.42254590e+02, 2.30369295e+02, 9.69691050e+01],        [2.41914165e+02, 2.32170615e+02, 1.00798695e+02],        [2.41636470e+02, 2.33936745e+02, 1.04719575e+02],        [2.41436295e+02, 2.35662840e+02, 1.08725115e+02],        [2.41329960e+02, 2.37344055e+02, 1.12803585e+02],        [2.41332765e+02, 2.38975545e+02, 1.16940960e+02],        [2.41460265e+02, 2.40553740e+02, 1.21117350e+02],        [2.41723935e+02, 2.42076090e+02, 1.25313630e+02],        [2.42133975e+02, 2.43541065e+02, 1.29504300e+02],        [2.42693700e+02, 2.44949685e+02, 1.33671765e+02],        [2.43404895e+02, 2.46303480e+02, 1.37792055e+02],        [2.44263480e+02, 2.47605765e+02, 1.41850125e+02],        [2.45262060e+02, 2.48860620e+02, 1.45840875e+02],        [2.46393495e+02, 2.50072890e+02, 1.49737530e+02],        [2.47646310e+02, 2.51246910e+02, 1.53549270e+02],        [2.49010305e+02, 2.52387015e+02, 1.57273800e+02],        [2.50475535e+02, 2.53497795e+02, 1.60909335e+02],        [2.52032310e+02, 2.54582820e+02, 1.64455620e+02]]), 2: array([[1.28476650e+01, 7.59976500e+00, 1.34633625e+02],        [1.62016800e+01, 7.24863000e+00, 1.35946620e+02],        [1.92150150e+01, 6.93753000e+00, 1.37191785e+02],        [2.19866100e+01, 6.66187500e+00, 1.38377790e+02],        [2.45766450e+01, 6.41707500e+00, 1.39511265e+02],        [2.70249000e+01, 6.19879500e+00, 1.40598840e+02],        [2.93566200e+01, 6.00678000e+00, 1.41644340e+02],        [3.15952650e+01, 5.83389000e+00, 1.42652865e+02],        [3.37571550e+01, 5.67579000e+00, 1.43628750e+02],        [3.58537650e+01, 5.53018500e+00, 1.44574545e+02],        [3.78947850e+01, 5.39427000e+00, 1.45493310e+02],        [3.98873550e+01, 5.26600500e+00, 1.46386575e+02],        [4.18378500e+01, 5.14360500e+00, 1.47256890e+02],        [4.37513700e+01, 5.02503000e+00, 1.48105530e+02],        [4.56322500e+01, 4.90926000e+00, 1.48933770e+02],        [4.74843150e+01, 4.79476500e+00, 1.49743140e+02],        [4.93103700e+01, 4.68027000e+00, 1.50534150e+02],        [5.11134750e+01, 4.56501000e+00, 1.51307820e+02],        [5.28959250e+01, 4.44771000e+00, 1.52064915e+02],        [5.46592500e+01, 4.32811500e+00, 1.52805945e+02],        [5.64052350e+01, 4.20673500e+00, 1.53531165e+02],        [5.81356650e+01, 4.08178500e+00, 1.54241085e+02],        [5.98523250e+01, 3.95301000e+00, 1.54935960e+02],        [6.15559800e+01, 3.81964500e+00, 1.55616045e+02],        [6.32481600e+01, 3.68194500e+00, 1.56281340e+02],        [6.49298850e+01, 3.53991000e+00, 1.56931845e+02],        [6.66016650e+01, 3.39354000e+00, 1.57567305e+02],        [6.82642650e+01, 3.24258000e+00, 1.58188230e+02],        [6.99187050e+01, 3.08779500e+00, 1.58794110e+02],        [7.15652400e+01, 2.92944000e+00, 1.59384690e+02],        [7.32043800e+01, 2.76802500e+00, 1.59960225e+02],        [7.48368900e+01, 2.60431500e+00, 1.60519950e+02],        [7.64630250e+01, 2.43805500e+00, 1.61064120e+02],        [7.80835500e+01, 2.27001000e+00, 1.61591970e+02],        [7.96984650e+01, 2.10094500e+00, 1.62103500e+02],        [8.13082800e+01, 1.93188000e+00, 1.62598200e+02],        [8.29132500e+01, 1.76332500e+00, 1.63075560e+02],        [8.45136300e+01, 1.59655500e+00, 1.63535580e+02],        [8.61091650e+01, 1.43259000e+00, 1.63977495e+02],        [8.77008750e+01, 1.27270500e+00, 1.64401050e+02],        [8.92882500e+01, 1.11741000e+00, 1.64805990e+02],        [9.08715450e+01, 9.68490000e-01, 1.65191550e+02],        [9.24510150e+01, 8.26965000e-01, 1.65557475e+02],        [9.40269150e+01, 6.94620000e-01, 1.65903255e+02],        [9.55987350e+01, 5.72475000e-01, 1.66228380e+02],        [9.71669850e+01, 4.62570000e-01, 1.66532340e+02],        [9.87316650e+01, 3.65670000e-01, 1.66815135e+02],        [1.00292520e+02, 2.84070000e-01, 1.67075745e+02],        [1.01849805e+02, 2.19045000e-01, 1.67313915e+02],        [1.03403265e+02, 1.72890000e-01, 1.67529135e+02],        [1.04952900e+02, 1.47135000e-01, 1.67721150e+02],        [1.06498710e+02, 1.43820000e-01, 1.67889450e+02],        [1.08040695e+02, 1.64730000e-01, 1.68033780e+02],        [1.09578345e+02, 2.11905000e-01, 1.68153375e+02],        [1.11112170e+02, 2.87385000e-01, 1.68248235e+02],        [1.12641660e+02, 3.92700000e-01, 1.68317595e+02],        [1.14167070e+02, 5.30400000e-01, 1.68361200e+02],        [1.15687635e+02, 7.02525000e-01, 1.68379050e+02],        [1.17203865e+02, 9.11370000e-01, 1.68370635e+02],        [1.18715250e+02, 1.15897500e+00, 1.68335445e+02],        [1.20221535e+02, 1.44789000e+00, 1.68273735e+02],        [1.21722720e+02, 1.77990000e+00, 1.68184995e+02],        [1.23218550e+02, 2.15730000e+00, 1.68069225e+02],        [1.24709025e+02, 2.58238500e+00, 1.67926170e+02],        [1.26193635e+02, 3.05745000e+00, 1.67755575e+02],        [1.27672890e+02, 3.58402500e+00, 1.67557440e+02],        [1.29145770e+02, 4.16491500e+00, 1.67331510e+02],        [1.30612530e+02, 4.80241500e+00, 1.67078295e+02],        [1.32072915e+02, 5.49856500e+00, 1.66797795e+02],        [1.33526415e+02, 6.25566000e+00, 1.66489755e+02],        [1.34973030e+02, 7.07548500e+00, 1.66154430e+02],        [1.36412760e+02, 7.96033500e+00, 1.65792075e+02],        [1.37845350e+02, 8.91225000e+00, 1.65403200e+02],        [1.39270035e+02, 9.93327000e+00, 1.64987550e+02],        [1.40687325e+02, 1.09996800e+01, 1.64545635e+02],        [1.42096965e+02, 1.20694050e+01, 1.64077965e+02],        [1.43498190e+02, 1.31439750e+01, 1.63584795e+02],        [1.44891255e+02, 1.42233900e+01, 1.63066635e+02],        [1.46276160e+02, 1.53071400e+01, 1.62523995e+02],        [1.47652395e+02, 1.63954800e+01, 1.61957130e+02],        [1.49019705e+02, 1.74876450e+01, 1.61367060e+02],        [1.50378345e+02, 1.85838900e+01, 1.60754040e+02],        [1.51727805e+02, 1.96834500e+01, 1.60118835e+02],        [1.53067830e+02, 2.07865800e+01, 1.59462210e+02],        [1.54398675e+02, 2.18927700e+01, 1.58784930e+02],        [1.55720085e+02, 2.30020200e+01, 1.58087505e+02],        [1.57032060e+02, 2.41138200e+01, 1.57370700e+02],        [1.58334345e+02, 2.52281700e+01, 1.56635535e+02],        [1.59626685e+02, 2.63445600e+01, 1.55882775e+02],        [1.60909335e+02, 2.74632450e+01, 1.55113185e+02],        [1.62182040e+02, 2.85834600e+01, 1.54327275e+02],        [1.63444545e+02, 2.97054600e+01, 1.53526575e+02],        [1.64697360e+02, 3.08289900e+01, 1.52711085e+02],        [1.65940230e+02, 3.19537950e+01, 1.51882335e+02],        [1.67172900e+02, 3.30798750e+01, 1.51040835e+02],        [1.68395370e+02, 3.42067200e+01, 1.50187605e+02],        [1.69607895e+02, 3.53343300e+01, 1.49323410e+02],        [1.70810475e+02, 3.64629600e+01, 1.48449270e+02],        [1.72003110e+02, 3.75918450e+01, 1.47565440e+02],        [1.73185800e+02, 3.87212400e+01, 1.46673195e+02],        [1.74358290e+02, 3.98508900e+01, 1.45773300e+02],        [1.75521090e+02, 4.09807950e+01, 1.44866265e+02],        [1.76674200e+02, 4.21109550e+01, 1.43953110e+02],        [1.77817620e+02, 4.32411150e+01, 1.43034345e+02],        [1.78951095e+02, 4.43712750e+01, 1.42110480e+02],        [1.80075390e+02, 4.55014350e+01, 1.41182535e+02],        [1.81189995e+02, 4.66313400e+01, 1.40251020e+02],        [1.82295165e+02, 4.77612450e+01, 1.39316190e+02],        [1.83391155e+02, 4.88908950e+01, 1.38379065e+02],        [1.84478220e+02, 5.00202900e+01, 1.37440155e+02],        [1.85555850e+02, 5.11494300e+01, 1.36499715e+02],        [1.86624810e+02, 5.22783150e+01, 1.35558255e+02],        [1.87684845e+02, 5.34069450e+01, 1.34616540e+02],        [1.88736465e+02, 5.45353200e+01, 1.33675080e+02],        [1.89779160e+02, 5.56634400e+01, 1.32733620e+02],        [1.90813695e+02, 5.67913050e+01, 1.31792670e+02],        [1.91839560e+02, 5.79189150e+01, 1.30852995e+02],        [1.92857520e+02, 5.90465250e+01, 1.29914340e+02],        [1.93867320e+02, 6.01738800e+01, 1.28977470e+02],        [1.94869215e+02, 6.13009800e+01, 1.28042130e+02],        [1.95862950e+02, 6.24283350e+01, 1.27108575e+02],        [1.96849290e+02, 6.35554350e+01, 1.26177315e+02],        [1.97827980e+02, 6.46827900e+01, 1.25248605e+02],        [1.98799020e+02, 6.58098900e+01, 1.24322445e+02],        [1.99762665e+02, 6.69375000e+01, 1.23399090e+02],        [2.00718915e+02, 6.80651100e+01, 1.22478285e+02],        [2.01668025e+02, 6.91929750e+01, 1.21560030e+02],        [2.02609995e+02, 7.03213500e+01, 1.20644835e+02],        [2.03545080e+02, 7.14502350e+01, 1.19732190e+02],        [2.04473025e+02, 7.25796300e+01, 1.18822605e+02],        [2.05394085e+02, 7.37095350e+01, 1.17915825e+02],        [2.06308260e+02, 7.48402050e+01, 1.17011850e+02],        [2.07216060e+02, 7.59716400e+01, 1.16111190e+02],        [2.08116720e+02, 7.71038400e+01, 1.15213080e+02],        [2.09011005e+02, 7.82370600e+01, 1.14318030e+02],        [2.09898660e+02, 7.93715550e+01, 1.13425530e+02],        [2.10779940e+02, 8.05070700e+01, 1.12535580e+02],        [2.11654590e+02, 8.16438600e+01, 1.11648180e+02],        [2.12522610e+02, 8.27819250e+01, 1.10763330e+02],        [2.13384255e+02, 8.39217750e+01, 1.09880775e+02],        [2.14239525e+02, 8.50629000e+01, 1.09001025e+02],        [2.15088420e+02, 8.62058100e+01, 1.08123315e+02],        [2.15930940e+02, 8.73505050e+01, 1.07247645e+02],        [2.16766830e+02, 8.84972400e+01, 1.06374015e+02],        [2.17596345e+02, 8.96460150e+01, 1.05502170e+02],        [2.18419485e+02, 9.07968300e+01, 1.04632110e+02],        [2.19236250e+02, 9.19499400e+01, 1.03763835e+02],        [2.20046385e+02, 9.31053450e+01, 1.02897345e+02],        [2.20849890e+02, 9.42633000e+01, 1.02032130e+02],        [2.21646765e+02, 9.54240600e+01, 1.01168190e+02],        [2.22437265e+02, 9.65873700e+01, 1.00305525e+02],        [2.23220880e+02, 9.77534850e+01, 9.94438800e+01],        [2.23997865e+02, 9.89226600e+01, 9.85830000e+01],        [2.24767965e+02, 1.00094895e+02, 9.77233950e+01],        [2.25531180e+02, 1.01270445e+02, 9.68643000e+01],        [2.26287510e+02, 1.02449310e+02, 9.60059700e+01],        [2.27036700e+02, 1.03631490e+02, 9.51481500e+01],        [2.27778750e+02, 1.04817240e+02, 9.42908400e+01],        [2.28513405e+02, 1.06006560e+02, 9.34337850e+01],        [2.29240920e+02, 1.07199960e+02, 9.25769850e+01],        [2.29960785e+02, 1.08397185e+02, 9.17204400e+01],        [2.30673255e+02, 1.09598235e+02, 9.08638950e+01],        [2.31378075e+02, 1.10803620e+02, 9.00073500e+01],        [2.32074990e+02, 1.12013340e+02, 8.91505500e+01],        [2.32764000e+02, 1.13227395e+02, 8.82940050e+01],        [2.33445105e+02, 1.14445785e+02, 8.74369500e+01],        [2.34117795e+02, 1.15668765e+02, 8.65798950e+01],        [2.34782070e+02, 1.16896335e+02, 8.57223300e+01],        [2.35438185e+02, 1.18129005e+02, 8.48642550e+01],        [2.36085375e+02, 1.19366265e+02, 8.40059250e+01],        [2.36723895e+02, 1.20608625e+02, 8.31470850e+01],        [2.37353490e+02, 1.21856085e+02, 8.22877350e+01],        [2.37974160e+02, 1.23108900e+02, 8.14278750e+01],        [2.38585650e+02, 1.24366560e+02, 8.05677600e+01],        [2.39187450e+02, 1.25630085e+02, 7.97066250e+01],        [2.39779815e+02, 1.26898710e+02, 7.88452350e+01],        [2.40362490e+02, 1.28172945e+02, 7.79830800e+01],        [2.40935220e+02, 1.29452790e+02, 7.71204150e+01],        [2.41498005e+02, 1.30738245e+02, 7.62574950e+01],        [2.42050335e+02, 1.32029565e+02, 7.53938100e+01],        [2.42592720e+02, 1.33326750e+02, 7.45301250e+01],        [2.43124140e+02, 1.34629800e+02, 7.36651650e+01],        [2.43644850e+02, 1.35938715e+02, 7.27999500e+01],        [2.44154595e+02, 1.37253750e+02, 7.19344800e+01],        [2.44653120e+02, 1.38574905e+02, 7.10687550e+01],        [2.45140680e+02, 1.39902180e+02, 7.02027750e+01],        [2.45616765e+02, 1.41235575e+02, 6.93367950e+01],        [2.46081120e+02, 1.42575090e+02, 6.84708150e+01],        [2.46533490e+02, 1.43920980e+02, 6.76050900e+01],        [2.46974130e+02, 1.45273500e+02, 6.67388550e+01],        [2.47402275e+02, 1.46632140e+02, 6.58728750e+01],        [2.47817925e+02, 1.47997410e+02, 6.50074050e+01],        [2.48221080e+02, 1.49369055e+02, 6.41427000e+01],        [2.48611485e+02, 1.50747075e+02, 6.32785050e+01],        [2.48989140e+02, 1.52131725e+02, 6.24155850e+01],        [2.49353280e+02, 1.53523005e+02, 6.15536850e+01],        [2.49704415e+02, 1.54920660e+02, 6.06933150e+01],        [2.50041780e+02, 1.56324945e+02, 5.98347300e+01],        [2.50365630e+02, 1.57735860e+02, 5.89781850e+01],        [2.50675455e+02, 1.59153405e+02, 5.81239350e+01],        [2.50970745e+02, 1.60578090e+02, 5.72717250e+01],        [2.51251755e+02, 1.62009150e+02, 5.64225750e+01],        [2.51517975e+02, 1.63447095e+02, 5.55767400e+01],        [2.51769660e+02, 1.64891415e+02, 5.47352400e+01],        [2.52006300e+02, 1.66342875e+02, 5.38978200e+01],        [2.52227640e+02, 1.67800965e+02, 5.30655000e+01],        [2.52433425e+02, 1.69265685e+02, 5.22390450e+01],        [2.52623655e+02, 1.70737290e+02, 5.14187100e+01],        [2.52798075e+02, 1.72215525e+02, 5.06055150e+01],        [2.52956175e+02, 1.73700645e+02, 4.98002250e+01],        [2.53097955e+02, 1.75192650e+02, 4.90033500e+01],        [2.53223160e+02, 1.76691285e+02, 4.82164200e+01],        [2.53331280e+02, 1.78196550e+02, 4.74404550e+01],        [2.53422570e+02, 1.79708955e+02, 4.66759650e+01],        [2.53496265e+02, 1.81227990e+02, 4.59247350e+01],        [2.53552620e+02, 1.82753655e+02, 4.51880400e+01],        [2.53590870e+02, 1.84286205e+02, 4.44671550e+01],        [2.53611015e+02, 1.85825640e+02, 4.37636100e+01],        [2.53613055e+02, 1.87371705e+02, 4.30791900e+01],        [2.53596225e+02, 1.88924400e+02, 4.24154250e+01],        [2.53560525e+02, 1.90483725e+02, 4.17743550e+01],        [2.53505955e+02, 1.92049935e+02, 4.11580200e+01],        [2.53432005e+02, 1.93622520e+02, 4.05684600e+01],        [2.53337910e+02, 1.95202245e+02, 4.00072050e+01],        [2.53223415e+02, 1.96788600e+02, 3.94760400e+01],        [2.53088775e+02, 1.98381585e+02, 3.89780250e+01],        [2.52933735e+02, 1.99980945e+02, 3.85157100e+01],        [2.52758295e+02, 2.01586935e+02, 3.80911350e+01],        [2.52561945e+02, 2.03199045e+02, 3.77068500e+01],        [2.52344685e+02, 2.04817275e+02, 3.73648950e+01],        [2.52105240e+02, 2.06442645e+02, 3.70660350e+01],        [2.51843355e+02, 2.08074390e+02, 3.68125650e+01],        [2.51559795e+02, 2.09712255e+02, 3.66070350e+01],        [2.51255070e+02, 2.11355730e+02, 3.64509750e+01],        [2.50927905e+02, 2.13005325e+02, 3.63446400e+01],        [2.50576515e+02, 2.14662060e+02, 3.62872650e+01],        [2.50203450e+02, 2.16323895e+02, 3.62811450e+01],        [2.49809220e+02, 2.17990830e+02, 3.63255150e+01],        [2.49388725e+02, 2.19665160e+02, 3.64160400e+01],        [2.48947575e+02, 2.21344080e+02, 3.65545050e+01],        [2.48482965e+02, 2.23028610e+02, 3.67355550e+01],        [2.47995150e+02, 2.24718750e+02, 3.69553650e+01],        [2.47485915e+02, 2.26413480e+02, 3.72093450e+01],        [2.46952965e+02, 2.28113820e+02, 3.74885700e+01],        [2.46399105e+02, 2.29818495e+02, 3.77859000e+01],        [2.45825355e+02, 2.31527250e+02, 3.80893500e+01],        [2.45228655e+02, 2.33241360e+02, 3.83826000e+01],        [2.44615380e+02, 2.34958785e+02, 3.86493300e+01],        [2.43986040e+02, 2.36678760e+02, 3.88642950e+01],        [2.43343185e+02, 2.38401540e+02, 3.89948550e+01],        [2.42690130e+02, 2.40126105e+02, 3.89958750e+01],        [2.42033505e+02, 2.41850925e+02, 3.88053900e+01],        [2.41383510e+02, 2.43573450e+02, 3.83336400e+01],        [2.40758760e+02, 2.45288580e+02, 3.74495550e+01],        [2.40183480e+02, 2.46990450e+02, 3.59437800e+01],        [2.39703825e+02, 2.48665290e+02, 3.34881300e+01]]), 3: array([[ 68.08602 ,   1.24287 ,  84.000825],        [ 68.47005 ,   2.449275,  85.533885],        [ 68.83572 ,   3.729375,  87.051645],        [ 69.182775,   5.08521 ,  88.553595],        [ 69.51147 ,   6.518565,  90.038715],        [ 69.821295,   8.031735,  91.507515],        [ 70.11276 ,   9.62676 ,  92.958465],        [ 70.38561 ,  11.262585,  94.39182 ],        [ 70.63959 ,  12.83772 ,  95.807325],        [ 70.874955,  14.36262 ,  97.203705],        [ 71.091705,  15.846975,  98.58096 ],        [ 71.28933 ,  17.29818 ,  99.938835],        [ 71.468085,  18.721335, 101.276565],        [ 71.62797 ,  20.121285, 102.593895],        [ 71.76873 ,  21.5016  , 103.89057 ],        [ 71.89062 ,  22.86483 , 105.165825],        [ 71.993385,  24.213525, 106.419405],        [ 72.07728 ,  25.54998 , 107.6508  ],        [ 72.14205 ,  26.875215, 108.86001 ],        [ 72.188205,  28.191015, 110.04627 ],        [ 72.215235,  29.4984  , 111.209325],        [ 72.223395,  30.798135, 112.34892 ],        [ 72.212685,  32.09124 , 113.4648  ],        [ 72.18336 ,  33.378225, 114.556455],        [ 72.13542 ,  34.6596  , 115.623885],        [ 72.068865,  35.93613 , 116.666835],        [ 71.98395 ,  37.20756 , 117.68505 ],        [ 71.881185,  38.474655, 118.678275],        [ 71.76006 ,  39.73767 , 119.646255],        [ 71.62134 ,  40.996605, 120.589245],        [ 71.465025,  42.251715, 121.50699 ],        [ 71.29137 ,  43.502745, 122.399235],        [ 71.10063 ,  44.74995 , 123.266235],        [ 70.89306 ,  45.993585, 124.107735],        [ 70.66917 ,  47.23314 , 124.92399 ],        [ 70.42947 ,  48.46887 , 125.715255],        [ 70.173705,  49.700775, 126.481275],        [ 69.90264 ,  50.928855, 127.222305],        [ 69.61653 ,  52.1526  , 127.938855],        [ 69.31614 ,  53.372265, 128.63067 ],        [ 69.001725,  54.587595, 129.29826 ],        [ 68.67354 ,  55.79859 , 129.942135],        [ 68.33184 ,  57.004995, 130.56204 ],        [ 67.9779  ,  58.20681 , 131.158995],        [ 67.611975,  59.40378 , 131.732745],        [ 67.234065,  60.595905, 132.28431 ],        [ 66.84519 ,  61.78293 , 132.813435],        [ 66.445605,  62.96511 , 133.32114 ],        [ 66.036075,  64.141935, 133.80768 ],        [ 65.61711 ,  65.31315 , 134.273565],        [ 65.189475,  66.479265, 134.71956 ],        [ 64.753425,  67.63977 , 135.145665],        [ 64.30947 ,  68.794665, 135.552645],        [ 63.858375,  69.94395 , 135.941265],        [ 63.400395,  71.087625, 136.31178 ],        [ 62.936805,  72.225435, 136.664955],        [ 62.46786 ,  73.357125, 137.0013  ],        [ 61.993815,  74.48346 , 137.32158 ],        [ 61.515435,  75.603675, 137.625795],        [ 61.03323 ,  76.718025, 137.91522 ],        [ 60.547455,  77.82651 , 138.189855],        [ 60.05913 ,  78.929385, 138.45072 ],        [ 59.568765,  80.02614 , 138.69807 ],        [ 59.07687 ,  81.11703 , 138.93267 ],        [ 58.583445,  82.202055, 139.15503 ],        [ 58.08951 ,  83.28147 , 139.36566 ],        [ 57.595065,  84.355275, 139.56507 ],        [ 57.100875,  85.42347 , 139.753515],        [ 56.607195,  86.486055, 139.93176 ],        [ 56.114535,  87.543285, 140.100315],        [ 55.62315 ,  88.59516 , 140.25969 ],        [ 55.13355 ,  89.641425, 140.409885],        [ 54.64599 ,  90.682845, 140.55192 ],        [ 54.160725,  91.719165, 140.68605 ],        [ 53.678265,  92.750385, 140.81253 ],        [ 53.198865,  93.77676 , 140.932125],        [ 52.72278 ,  94.79829 , 141.044835],        [ 52.250265,  95.81523 , 141.150915],        [ 51.781065,  96.82758 , 141.250875],        [ 51.315945,  97.83585 , 141.34497 ],        [ 50.85465 ,  98.839785, 141.43371 ],        [ 50.39718 ,  99.83964 , 141.517095],        [ 49.9443  , 100.835415, 141.59538 ],        [ 49.4955  , 101.827365, 141.669075],        [ 49.051035, 102.815745, 141.73818 ],        [ 48.610905, 103.800555, 141.802695],        [ 48.175365, 104.78205 , 141.86313 ],        [ 47.743905, 105.76023 , 141.919485],        [ 47.31678 , 106.73535 , 141.972015],        [ 46.89399 , 107.707665, 142.02072 ],        [ 46.47528 , 108.67692 , 142.0656  ],        [ 46.060395, 109.643625, 142.10691 ],        [ 45.649845, 110.60778 , 142.14465 ],        [ 45.242865, 111.569385, 142.179075],        [ 44.839455, 112.52895 , 142.209675],        [ 44.43987 , 113.48622 , 142.23696 ],        [ 44.043345, 114.441705, 142.260675],        [ 43.64988 , 115.39515 , 142.281075],        [ 43.25973 , 116.34681 , 142.29765 ],        [ 42.87213 , 117.29694 , 142.31091 ],        [ 42.487335, 118.24554 , 142.320345],        [ 42.104835, 119.192865, 142.325955],        [ 41.724375, 120.138915, 142.32774 ],        [ 41.34621 , 121.08369 , 142.3257  ],        [ 40.969575, 122.0277  , 142.319325],        [ 40.59447 , 122.970435, 142.308615],        [ 40.220895, 123.91266 , 142.293315],        [ 39.84885 , 124.85412 , 142.27368 ],        [ 39.477825, 125.794815, 142.2492  ],        [ 39.10782 , 126.735   , 142.21962 ],        [ 38.73909 , 127.674675, 142.184685],        [ 38.37138 , 128.614095, 142.14465 ],        [ 38.004945, 129.553005, 142.09875 ],        [ 37.639785, 130.491915, 142.047495],        [ 37.2759  , 131.430315, 141.989865],        [ 36.913545, 132.368715, 141.92586 ],        [ 36.552465, 133.307115, 141.855225],        [ 36.193425, 134.245515, 141.777705],        [ 35.83668 , 135.18366 , 141.693045],        [ 35.482485, 136.12206 , 141.60099 ],        [ 35.13135 , 137.06046 , 141.50103 ],        [ 34.78404 , 137.999115, 141.393165],        [ 34.44183 , 138.937515, 141.277395],        [ 34.104465, 139.876425, 141.152955],        [ 33.77322 , 140.81508 , 141.01959 ],        [ 33.44886 , 141.754245, 140.877045],        [ 33.132915, 142.69341 , 140.72532 ],        [ 32.825895, 143.632575, 140.563395],        [ 32.52984 , 144.571995, 140.39178 ],        [ 32.245515, 145.511415, 140.209455],        [ 31.97547 , 146.45109 , 140.01693 ],        [ 31.720725, 147.39051 , 139.813185],        [ 31.483065, 148.330185, 139.598475],        [ 31.26453 , 149.269605, 139.372035],        [ 31.066905, 150.209025, 139.133865],        [ 30.89274 , 151.148445, 138.883455],        [ 30.744075, 152.08761 , 138.620805],        [ 30.62346 , 153.02652 , 138.34515 ],        [ 30.53319 , 153.965175, 138.057   ],        [ 30.47556 , 154.90332 , 137.75559 ],        [ 30.452865, 155.840955, 137.44041 ],        [ 30.468165, 156.778335, 137.11146 ],        [ 30.523245, 157.71495 , 136.768485],        [ 30.620655, 158.651055, 136.41123 ],        [ 30.76269 , 159.58614 , 136.03944 ],        [ 30.9519  , 160.52046 , 135.653115],        [ 31.18956 , 161.454015, 135.25149 ],        [ 31.47822 , 162.386295, 134.834565],        [ 31.8189  , 163.317555, 134.40234 ],        [ 32.21313 , 164.247285, 133.954305],        [ 32.662185, 165.175995, 133.490205],        [ 33.167085, 166.10292 , 133.01004 ],        [ 33.72834 , 167.02857 , 132.513555],        [ 34.34646 , 167.95218 , 132.000495],        [ 35.021445, 168.87426 , 131.470605],        [ 35.75355 , 169.794045, 130.923885],        [ 36.542265, 170.712045, 130.359825],        [ 37.38708 , 171.62775 , 129.77868 ],        [ 38.28774 , 172.540905, 129.180195],        [ 39.24297 , 173.451765, 128.56386 ],        [ 40.252005, 174.360075, 127.92993 ],        [ 41.31408 , 175.26558 , 127.277895],        [ 42.427665, 176.16828 , 126.60801 ],        [ 43.59174 , 177.06792 , 125.919765],        [ 44.805285, 177.9645  , 125.213415],        [ 46.066515, 178.85751 , 124.488195],        [ 47.374665, 179.747205, 123.744615],        [ 48.72795 , 180.63333 , 122.98242 ],        [ 50.125605, 181.515885, 122.201355],        [ 51.565845, 182.39436 , 121.40142 ],        [ 53.04765 , 183.268755, 120.582615],        [ 54.57    , 184.13907 , 119.74494 ],        [ 56.13162 , 185.004795, 118.88763 ],        [ 57.731235, 185.86644 , 118.011195],        [ 59.367825, 186.722985, 117.115635],        [ 61.04037 , 187.57494 , 116.20044 ],        [ 62.74785 , 188.42205 , 115.26612 ],        [ 64.489245, 189.263805, 114.31242 ],        [ 66.263535, 190.10046 , 113.339085],        [ 68.069955, 190.931505, 112.346115],        [ 69.907995, 191.75694 , 111.333255],        [ 71.776635, 192.576765, 110.30076 ],        [ 73.674855, 193.39047 , 109.24863 ],        [ 75.602145, 194.198055, 108.176865],        [ 77.55774 , 194.99952 , 107.085465],        [ 79.540875, 195.79461 , 105.97443 ],        [ 81.551295, 196.58307 , 104.84376 ],        [ 83.58798 , 197.3649  , 103.6932  ],        [ 85.650675, 198.13959 , 102.522495],        [ 87.73887 , 198.907395, 101.332155],        [ 89.8518  , 199.667805, 100.12218 ],        [ 91.988955, 200.42082 ,  98.89257 ],        [ 94.14957 , 201.16644 ,  97.64307 ],        [ 96.333645, 201.904155,  96.374445],        [ 98.540415, 202.63422 ,  95.08593 ],        [100.76937 , 203.356125,  93.778035],        [103.020255, 204.070125,  92.45076 ],        [105.292815, 204.775455,  91.103595],        [107.58654 , 205.47237 ,  89.73705 ],        [109.900665, 206.160615,  88.35138 ],        [112.234935, 206.84019 ,  86.946585],        [114.58884 , 207.51084 ,  85.52292 ],        [116.96187 , 208.172565,  84.080385],        [119.353515, 208.824855,  82.61949 ],        [121.76352 , 209.46822 ,  81.139725],        [124.19163 , 210.101895,  79.641855],        [126.636825, 210.72588 ,  78.126135],        [129.099105, 211.34043 ,  76.59231 ],        [131.57796 , 211.94529 ,  75.041145],        [134.07288 , 212.540205,  73.472385],        [136.583355, 213.125175,  71.88654 ],        [139.10862 , 213.699945,  70.28463 ],        [141.64842 , 214.26477 ,  68.666655],        [144.20199 , 214.81965 ,  67.033635],        [146.768565, 215.36433 ,  65.385825],        [149.34789 , 215.898555,  63.723735],        [151.938945, 216.422835,  62.048895],        [154.541475, 216.936915,  60.36156 ],        [157.154715, 217.440795,  58.66326 ],        [159.777645, 217.934475,  56.955015],        [162.41001 , 218.41821 ,  55.2381  ],        [165.050535, 218.892   ,  53.514555],        [167.69871 , 219.355845,  51.78591 ],        [170.35377 , 219.809745,  50.054715],        [173.014695, 220.25421 ,  48.323265],        [175.68072 , 220.68924 ,  46.594875],        [178.350825, 221.114835,  44.872605],        [181.02399 , 221.531505,  43.160535],        [183.699705, 221.93925 ,  41.463765],        [186.376695, 222.33858 ,  39.787395],        [189.05394 , 222.729495,  38.138055],        [191.73042 , 223.112505,  36.52314 ],        [194.405115, 223.48812 ,  34.95132 ],        [197.07726 , 223.85634 ,  33.432795],        [199.745325, 224.217675,  31.978275],        [202.4088  , 224.57289 ,  30.601275],        [205.06641 , 224.92173 ,  29.316075],        [207.71688 , 225.265215,  28.138485],        [210.3597  , 225.6036  ,  27.085335],        [212.99385 , 225.937395,  26.17473 ],        [215.618055, 226.26711 ,  25.42401 ],        [218.23155 , 226.593255,  24.85026 ],        [220.833315, 226.91634 ,  24.468015],        [223.42284 , 227.236875,  24.28875 ],        [225.999105, 227.55537 ,  24.32037 ],        [228.5616  , 227.87208 ,  24.565425],        [231.109305, 228.188025,  25.021875],        [233.64171 , 228.503205,  25.682835],        [236.15703 , 228.81915 ,  26.538105],        [238.65552 , 229.13535 ,  27.573405],        [241.13718 , 229.452825,  28.77369 ],        [243.6015  , 229.771575,  30.12264 ],        [246.04797 , 230.092365,  31.604955],        [248.476335, 230.41545 ,  33.204825],        [250.88634 , 230.741085,  34.908735],        [253.27824 , 231.070035,  36.70368 ]]), 4: array([[  0,   0, 127, 255],        [  0,   0, 255, 255],        [  0, 127, 255, 255],        [  0, 255, 255, 255],        [127, 255, 127, 255],        [255, 255,   0, 255],        [255, 127,   0, 255],        [255,   0,   0, 255],        [127,   0,   0, 255]]), 5: array([[  0,   0,   0, 255],        [255, 255, 255, 255]]), 6: array([[  0,   0,   0, 255],        [255,   0,   0, 255],        [255, 255,   0, 255],        [255, 255, 255, 255]])}
+
+ +
+
+imageChannel
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+imageHeight
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+imageWidth
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+image_connection_state_changed(conn)[source]
+

Callback invoked when the Image Channel connection state is changed.

+
+
Parameters:
+

conn (bool) – The new connection state.

+
+
+
+ +
+
+image_value_changed(new_image)[source]
+

Callback invoked when the Image Channel value is changed.

+

We try to do as little as possible in this method, because it +gets called every time the image channel updates, which might +be extremely often. Basically just store the data, and set +a flag requesting that the image be redrawn.

+
+
Parameters:
+

new_image (np.ndarray) – The new image data. This can be a flat 1D array, or a 2D array.

+
+
+
+ +
+
+keyPressEvent(ev)[source]
+

Handle keypress events.

+
+ +
+
+maxRedrawRate
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+mouseMoveEvent(self, event: QMouseEvent | None)[source]
+
+ +
+
+normalizeData
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+process_image(image)[source]
+

Boilerplate method.

+

To be used by applications in order to add calculations and also modify +the image before it is displayed at the widget.

+
+

Warning

+

This code runs in a separated QThread so it MUST not try to +write to QWidgets.

+
+
+
Parameters:
+

image (np.ndarray) – The Image Data as a 2D numpy array

+
+
Returns:
+

The Image Data as a 2D numpy array after processing.

+
+
Return type:
+

np.ndarray

+
+
+
+ +
+
+readingOrder
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+redrawImage()[source]
+

Set the image data into the ImageItem, if needed.

+

If necessary, reshape the image to 2D first.

+
+ +
+
+redrawROI()[source]
+
+ +
+
+roiheight_connection_state_changed(conn)[source]
+

Run when the ROIHeight Channel connection state changes.

+
+
Parameters:
+

conn (bool) – The new connection state.

+
+
+
+ +
+
+roiheight_value_changed(new_height)[source]
+

Run when the ROIHeight Channel value changes.

+
+
Parameters:
+

new_height (int) – The new image ROI height

+
+
+
+ +
+
+roioffsetx_connection_state_changed(conn)[source]
+

Run when the ROIOffsetX Channel connection state changes.

+
+
Parameters:
+

conn (bool) – The new connection state.

+
+
+
+ +
+
+roioffsetx_value_changed(new_offset)[source]
+

Run when the ROIOffsetX Channel value changes.

+
+
Parameters:
+

new_offsetx (int) – The new image ROI horizontal offset

+
+
+
+ +
+
+roioffsety_connection_state_changed(conn)[source]
+

Run when the ROIOffsetY Channel connection state changes.

+
+
Parameters:
+

conn (bool) – The new connection state.

+
+
+
+ +
+
+roioffsety_value_changed(new_offset)[source]
+

Run when the ROIOffsetY Channel value changes.

+
+
Parameters:
+

new_offsety (int) – The new image ROI vertical offset

+
+
+
+ +
+
+roiwidth_connection_state_changed(conn)[source]
+

Run when the ROIWidth Channel connection state changes.

+
+
Parameters:
+

conn (bool) – The new connection state.

+
+
+
+ +
+
+roiwidth_value_changed(new_width)[source]
+

Run when the ROIWidth Channel value changes.

+
+
Parameters:
+

new_width (int) – The new image ROI width

+
+
+
+ +
+
+setColorMap(cmap=None)[source]
+

Update the image colormap.

+
+
Parameters:
+

cmap (ColorMap) –

+
+
+
+ +
+
+setColorMapLimits(mn, mx)[source]
+

Set the limit values for the colormap.

+
+
Parameters:
+
    +
  • mn (int) – The lower limit

  • +
  • mx (int) – The upper limit

  • +
+
+
+
+ +
+
+showROI(show)[source]
+

Set ROI visibility.

+
+ +
+
+xAxisChannel
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+xaxis_value_changed(new_array)[source]
+

Callback invoked when the Image Width Channel value is changed.

+
+
Parameters:
+

new_array (np.ndarray) – The new x axis array

+
+
+
+ +
+
+yAxisChannel
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+yaxis_connection_state_changed(connected)[source]
+

Callback invoked when the TimeAxis Channel connection state is changed.

+
+
Parameters:
+

conn (bool) – The new connection state.

+
+
+
+ +
+
+yaxis_value_changed(new_array)[source]
+

Callback invoked when the TimeAxis Channel value is changed.

+
+
Parameters:
+

new_array (np.array) – The new y axis array

+
+
+
+ +
+ +
+
+class siriushla.widgets.spectrogram_view.SpectrogramUpdateThread(spectrogram_view)[source]
+

Bases: QThread

+

Thread to update image.

+
+
+run()[source]
+

Thread main.

+
+ +
+
+updateSignal
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+ +
+
+

siriushla.widgets.spinbox module

+

Sirius Spinbox.

+
+
+class siriushla.widgets.spinbox.SiriusHexaSpinbox(parent=None, init_channel=None)[source]
+

Bases: SiriusSpinbox

+

Custom Hexa Spinbox.

+
+
+textFromValue(value)[source]
+

Convert text from value in hexa base.

+
+ +
+
+update_format_string()[source]
+

Reimplement to use hexa base.

+
+ +
+
+update_step_size()[source]
+

Reimplement to use hexa base.

+
+ +
+
+validate(text, pos)[source]
+

Validate input in hexa base.

+
+ +
+
+valueFromText(text)[source]
+

Convert value from text in hexa base.

+
+ +
+ +
+
+class siriushla.widgets.spinbox.SiriusSpinbox(parent=None, init_channel=None)[source]
+

Bases: PyDMSpinbox

+

A QDoubleSpinBox with support for Channels and more from PyDM.

+
+
Parameters:
+
    +
  • parent (QWidget) – The parent widget for the Label

  • +
  • init_channel (str, optional) – The channel to be used by the widget.

  • +
+
+
+
+
+ctrl_limit_changed(which, new_limit)[source]
+

Callback invoked when the Channel receives new control limit +values.

+
+
Parameters:
+
    +
  • which (str) – Which control limit was changed. “UPPER” or “LOWER”

  • +
  • new_limit (float) – New value for the control limit

  • +
+
+
+
+ +
+
+focusOutEvent(event)[source]
+

Overwrites the function called when a user leaves the widget +without pressing return. Resets the value of the text field +to the current channel value.

+
+ +
+
+get_user_limits()[source]
+

Get the user defined limits for the spinbox.

+
+
Returns:
+

limits – 2-tuple with the user defined minimum and maximum.

+
+
Return type:
+

tuple

+
+
+
+ +
+
+limitsFromChannel
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+precision_changed(new_precision)[source]
+

Callback invoked when the Channel has new precision value. +This callback also triggers an update_format_string call so the +new precision value is considered.

+
+
Parameters:
+

new_precison (int or float) – The new precision value

+
+
+
+ +
+
+setMaximum(value)[source]
+

Set the user defined upper limit for the spinbox.

+
+
Parameters:
+

value (float) – The new upper limit value.

+
+
+
+ +
+
+setMinimum(value)[source]
+

Set the user defined lower limit for the spinbox.

+
+
Parameters:
+

value (float) – The new lower limit value.

+
+
+
+ +
+
+setRange(mini, maxi)[source]
+

Set the user defined limits for the spinbox.

+
+
Parameters:
+
    +
  • mini (float) – The new lower limit value.

  • +
  • maxi (float) – The new upper limit value.

  • +
+
+
+
+ +
+
+update_limits()[source]
+

Callback invoked to update the control limits of the spinbox.

+
+
Parameters:
+
    +
  • which (str) – Which control limit was changed. “UPPER” or “LOWER”

  • +
  • new_limit (float) – New value for the control limit

  • +
+
+
+
+ +
+
+wheelEvent(event)[source]
+

Reimplement wheel event to ignore event when out of focus.

+
+ +
+ +
+
+

siriushla.widgets.spinbox_scrollbar module

+

Defines PyDM widget with a spinbox and a scrollbar.

+
+
+class siriushla.widgets.spinbox_scrollbar.PyDMSpinboxScrollbar(parent=None, init_channel=None)[source]
+

Bases: QWidget

+

Composition of a Spinbox and a Scrollbar to set a float PV.

+
+ +
+
+

siriushla.widgets.state_button module

+

PyDM State Button Class.

+
+
+class siriushla.widgets.state_button.PyDMStateButton(parent=None, init_channel=None, invert=False, bit=-1)[source]
+

Bases: QFrame, PyDMWritableWidget

+

A StateButton with support for Channels and much more from PyDM.

+

It consists on QPushButton with internal state.

+
+
Parameters:
+
    +
  • parent (QWidget) – The parent widget for the Label

  • +
  • init_channel (str, optional) – The channel to be used by the widget.

  • +
  • bit (int) – Bit of the PV value to be handled.

  • +
+
+
+
+
+DEFAULT_CONFIRM_MESSAGE = 'Are you sure you want to proceed?'
+
+ +
+
+Rounded = 1
+
+ +
+
+Squared = 0
+
+ +
+
+class buttonShapeMap[source]
+

Bases: object

+

Enum class of shapes of button.

+
+
+Rounded = 1
+
+ +
+
+Squared = 0
+
+ +
+ +
+
+clicked
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+confirmMessage
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+confirm_dialog()[source]
+

Show the confirmation dialog with the proper message in case +`showConfirmMessage` is True.

+
+
Returns:
+

True if the message was confirmed or if `showCofirmMessage` +is False.

+
+
Return type:
+

bool

+
+
+
+ +
+
+f = <PyQt5.QtCore.QFile object>
+
+ +
+
+invert
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+mouseReleaseEvent(ev)[source]
+

Deal with mouse clicks. Only accept clicks within the figure.

+
+ +
+
+paintEvent(event)[source]
+

Treat appearence changes based on connection state and value.

+
+ +
+
+password
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+passwordProtected
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+path = '/home/runner/work/hla/hla/pyqt-apps/siriushla/widgets'
+
+ +
+
+protectedPassword
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+pvbit
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+roundedbuttonstatesdict = {'Disconnected': '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"\n   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"\n   width="256"\n   height="129"\n   viewBox="0 0 67.733331 34.131251"\n   version="1.1"\n   id="svg159"\n   inkscape:version="0.92.1 unknown"\n   sodipodi:docname="RoundedDisconnectButton.svg">\n  <defs\n     id="defs153">\n    <linearGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="linearGradient47119-6-7"\n       x1="41.2561"\n       y1="248.90253"\n       x2="41.214836"\n       y2="256.65088"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.88273561,2.0057873e-8,-1.4941557e-8,0.99999332,-5.5335438,18.204087)" />\n    <linearGradient\n       inkscape:collect="always"\n       id="linearGradient47117">\n      <stop\n         style="stop-color:#cccccc;stop-opacity:1;"\n         offset="0"\n         id="stop47113" />\n      <stop\n         style="stop-color:#cccccc;stop-opacity:0;"\n         offset="1"\n         id="stop47115" />\n    </linearGradient>\n    <linearGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="linearGradient1689"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.88276109,0,0,0.99999997,-71.212307,-541.17351)"\n       x1="41.2561"\n       y1="248.90253"\n       x2="41.067112"\n       y2="255.32812" />\n    <radialGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="radialGradient44460-5"\n       cx="27.781246"\n       cy="262.60416"\n       fx="27.781246"\n       fy="262.60416"\n       r="33.337498"\n       gradientTransform="matrix(1.1815126,-0.01290238,0.00424111,0.38837207,-0.07175464,177.9078)"\n       gradientUnits="userSpaceOnUse" />\n    <radialGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="radialGradient8020"\n       cx="33.865868"\n       cy="279.53745"\n       fx="33.865868"\n       fy="279.53748"\n       r="33.072918"\n       gradientTransform="matrix(1.1909647,-0.01300556,0.00427502,0.39147863,-7.6622104,170.54499)"\n       gradientUnits="userSpaceOnUse" />\n  </defs>\n  <sodipodi:namedview\n     id="base"\n     pagecolor="#ffffff"\n     bordercolor="#666666"\n     borderopacity="1.0"\n     inkscape:pageopacity="0.0"\n     inkscape:pageshadow="2"\n     inkscape:zoom="1.7167969"\n     inkscape:cx="-61.7611"\n     inkscape:cy="-30.019748"\n     inkscape:document-units="px"\n     inkscape:current-layer="layer1"\n     showgrid="false"\n     units="px"\n     inkscape:window-width="1916"\n     inkscape:window-height="1057"\n     inkscape:window-x="3840"\n     inkscape:window-y="1080"\n     inkscape:window-maximized="0"\n     inkscape:measure-start="0,0"\n     inkscape:measure-end="0,0" />\n  <metadata\n     id="metadata156">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title />\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <g\n     inkscape:label="Layer 1"\n     inkscape:groupmode="layer"\n     id="layer1"\n     transform="translate(0,-262.86873)">\n    <rect\n       style="opacity:1;fill:#666666;stroke-width:0.26458332"\n       id="rect42330-9"\n       width="67.73333"\n       height="33.866665"\n       x="0"\n       y="263.1333"\n       rx="13.229167"\n       ry="13.229167" />\n    <rect\n       style="opacity:1;fill:#b3b3b3;stroke-width:0.2906689"\n       id="rect42330-3-1"\n       width="67.73333"\n       height="32.808334"\n       x="0"\n       y="263.1333"\n       rx="13.229167"\n       ry="13.229167" />\n    <rect\n       ry="13.229167"\n       rx="13.229167"\n       y="263.92706"\n       x="0.79370117"\n       height="31.220833"\n       width="66.145836"\n       id="rect42373-2"\n       style="opacity:1;fill:#333333;fill-opacity:1;stroke-width:0.28020677" />\n    <rect\n       ry="13.229167"\n       rx="13.229167"\n       y="263.80286"\n       x="0.9333176"\n       height="31.469278"\n       width="65.865112"\n       id="rect42373-3-7"\n       style="opacity:1;fill:url(#radialGradient8020);fill-opacity:1;stroke:url(#radialGradient44460-5);stroke-width:0.2807219;stroke-opacity:0.93956042" />\n    <rect\n       style="opacity:1;fill:#333333;fill-opacity:1;stroke-width:0.18414214"\n       id="rect42330-6-0"\n       width="33.866665"\n       height="32.808319"\n       x="16.933332"\n       y="263.13333"\n       rx="11.441442"\n       ry="13.229167" />\n    <rect\n       style="opacity:1;fill:#b3b3b3;stroke-width:0.20132458"\n       id="rect42330-3-2-3"\n       width="32.493694"\n       height="32.808334"\n       x="17.619816"\n       y="263.1333"\n       rx="11.441442"\n       ry="13.229167" />\n    <rect\n       style="opacity:1;fill:#ececec;stroke-width:0.1921802"\n       id="rect42330-3-2-2-6"\n       width="31.114475"\n       height="31.220833"\n       x="18.186249"\n       y="263.87042"\n       rx="11.441442"\n       ry="13.229167" />\n    <rect\n       transform="scale(-1)"\n       ry="13.229167"\n       rx="11.441442"\n       y="-292.63028"\n       x="-48.48159"\n       height="13.550447"\n       width="29.362278"\n       id="rect42330-3-2-2-3-0"\n       style="opacity:1;fill:url(#linearGradient1689);fill-opacity:1;stroke-width:0.12299201" />\n    <rect\n       style="opacity:1;fill:url(#linearGradient47119-6-7);fill-opacity:1;stroke-width:0.12298982"\n       id="rect42330-3-2-2-3-2-6"\n       width="29.361429"\n       height="13.550358"\n       x="17.196539"\n       y="266.74576"\n       rx="11.441554"\n       ry="13.229061"\n       transform="matrix(0.99996098,-0.00883377,0.00688345,0.99997631,0,0)" />\n  </g>\n</svg>\n', 'Off': '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"\n   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"\n   width="256"\n   height="129"\n   viewBox="0 0 67.73248 34.13082"\n   version="1.1"\n   id="svg8"\n   inkscape:version="0.92.1 unknown"\n   sodipodi:docname="RoundedOffButton.svg">\n  <defs\n     id="defs2">\n    <linearGradient\n       inkscape:collect="always"\n       id="7812">\n      <stop\n         style="stop-color:#005000;stop-opacity:1;"\n         offset="0"\n         id="stop7933" />\n      <stop\n         style="stop-color:#005000;stop-opacity:0;"\n         offset="1"\n         id="stop7935" />\n    </linearGradient>\n    <linearGradient\n       id="linearGradient46973"\n       osb:paint="gradient">\n      <stop\n         style="stop-color:#000000;stop-opacity:1;"\n         offset="0"\n         id="stop46969" />\n      <stop\n         style="stop-color:#000000;stop-opacity:0;"\n         offset="1"\n         id="stop46971" />\n    </linearGradient>\n    <linearGradient\n       id="linearGradient46862"\n       osb:paint="solid">\n      <stop\n         style="stop-color:#ececec;stop-opacity:1;"\n         offset="0"\n         id="stop46860" />\n    </linearGradient>\n    <linearGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="linearGradient47119-6-1"\n       x1="41.2561"\n       y1="248.90253"\n       x2="41.214836"\n       y2="256.65088"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.89734881,5.4897511e-8,-4.4871239e-8,0.99998121,-23.246377,17.159312)" />\n    <linearGradient\n       inkscape:collect="always"\n       id="linearGradient47117">\n      <stop\n         style="stop-color:#cccccc;stop-opacity:1;"\n         offset="0"\n         id="stop47113" />\n      <stop\n         style="stop-color:#cccccc;stop-opacity:0;"\n         offset="1"\n         id="stop47115" />\n    </linearGradient>\n    <linearGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="linearGradient47119-3"\n       x1="41.2561"\n       y1="248.90253"\n       x2="41.067112"\n       y2="255.32812"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.8973758,0,0,0.99998712,-54.763421,-541.86262)" />\n    <linearGradient\n       inkscape:collect="always"\n       id="7744">\n      <stop\n         style="stop-color:#005000;stop-opacity:1;"\n         offset="0"\n         id="stop44454" />\n      <stop\n         style="stop-color:#0caa00;stop-opacity:0"\n         offset="1"\n         id="stop44456" />\n    </linearGradient>\n    <radialGradient\n       inkscape:collect="always"\n       xlink:href="#7744"\n       id="radialGradient7910"\n       cx="27.780457"\n       cy="279.53751"\n       fx="27.780457"\n       fy="279.53751"\n       r="33.072918"\n       gradientTransform="matrix(1.0605954,0,0,0.43150718,4.401612,158.91485)"\n       gradientUnits="userSpaceOnUse" />\n    <radialGradient\n       inkscape:collect="always"\n       xlink:href="#7812"\n       id="radialGradient7939"\n       cx="27.780457"\n       cy="279.53751"\n       fx="27.780457"\n       fy="279.53751"\n       r="32.932556"\n       gradientTransform="matrix(0.9999871,0,0,0.47777758,6.0853402,145.98054)"\n       gradientUnits="userSpaceOnUse" />\n  </defs>\n  <sodipodi:namedview\n     id="base"\n     pagecolor="#ffffff"\n     bordercolor="#666666"\n     borderopacity="1.0"\n     inkscape:pageopacity="0.0"\n     inkscape:pageshadow="2"\n     inkscape:zoom="1.4"\n     inkscape:cx="-185.38798"\n     inkscape:cy="-6.8966862"\n     inkscape:document-units="px"\n     inkscape:current-layer="layer1"\n     showgrid="false"\n     units="px"\n     inkscape:window-width="1916"\n     inkscape:window-height="1057"\n     inkscape:window-x="5760"\n     inkscape:window-y="1080"\n     inkscape:window-maximized="0" />\n  <metadata\n     id="metadata5">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title />\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <g\n     inkscape:label="Layer 1"\n     inkscape:groupmode="layer"\n     id="layer1"\n     transform="translate(0,-262.86875)">\n    <rect\n       style="opacity:1;fill:#666666;stroke-width:0.26458001"\n       id="rect42330-4"\n       width="67.732475"\n       height="33.866241"\n       x="9.5439134e-07"\n       y="263.13333"\n       ry="13.228996"\n       rx="13.228996" />\n    <rect\n       style="opacity:1;fill:#b3b3b3;stroke-width:0.29066515"\n       id="rect42330-3-5"\n       width="67.732475"\n       height="32.807911"\n       x="9.5439134e-07"\n       y="263.13333"\n       ry="13.228996"\n       rx="13.228996" />\n    <rect\n       y="263.92709"\n       x="0.79375291"\n       height="31.220432"\n       width="66.144981"\n       id="rect42373-0"\n       style="opacity:1;fill:#112b0b;fill-opacity:1;stroke-width:0.28020319"\n       ry="13.228996"\n       rx="13.228996" />\n    <rect\n       y="263.80286"\n       x="0.93330657"\n       height="31.468872"\n       width="65.864265"\n       id="rect42373-3-3"\n       style="opacity:1;fill:url(#radialGradient7910);fill-opacity:1;stroke:url(#radialGradient7939);stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"\n       ry="13.228996"\n       rx="13.228996" />\n    <rect\n       style="opacity:1;fill:#2d0000;fill-opacity:1;stroke-width:0.18413982"\n       id="rect42330-6-6"\n       width="33.866241"\n       height="32.807896"\n       x="-33.866241"\n       y="-295.94122"\n       transform="scale(-1)"\n       ry="13.228996"\n       rx="11.683769" />\n    <rect\n       style="opacity:1;fill:#b3b3b3;stroke-width:0.20298296"\n       id="rect42330-3-2-1"\n       width="33.031651"\n       height="32.807911"\n       x="-33.031662"\n       y="-295.94125"\n       transform="scale(-1)"\n       ry="13.228996"\n       rx="11.683769" />\n    <rect\n       style="opacity:1;fill:#ececec;stroke-width:0.19376327"\n       id="rect42330-3-2-2-0"\n       width="31.629597"\n       height="31.220432"\n       x="-32.455887"\n       y="-295.20413"\n       transform="scale(-1)"\n       ry="13.228996"\n       rx="11.683769" />\n    <rect\n       transform="scale(-1)"\n       y="-293.32248"\n       x="-31.656364"\n       height="13.550274"\n       width="29.848396"\n       id="rect42330-3-2-2-3-3"\n       style="opacity:1;fill:url(#linearGradient47119-3);fill-opacity:1;stroke-width:0.12400515"\n       ry="13.228996"\n       rx="11.683769" />\n    <rect\n       style="opacity:1;fill:url(#linearGradient47119-6-1);fill-opacity:1;stroke-width:0.1240029"\n       id="rect42330-3-2-2-3-2-2"\n       width="29.847494"\n       height="13.550194"\n       x="-0.13999988"\n       y="265.69797"\n       transform="matrix(0.99996224,-0.0086898,0.0069975,0.99997552,0,0)"\n       ry="13.228905"\n       rx="11.683867" />\n  </g>\n</svg>\n', 'On': '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"\n   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"\n   width="256"\n   height="129"\n   viewBox="0 0 67.73248 34.13082"\n   version="1.1"\n   id="svg8"\n   inkscape:version="0.92.1 unknown"\n   sodipodi:docname="RoundedOnButton.svg">\n  <defs\n     id="defs2">\n    <linearGradient\n       id="linearGradient46973"\n       osb:paint="gradient">\n      <stop\n         style="stop-color:#000000;stop-opacity:1;"\n         offset="0"\n         id="stop46969" />\n      <stop\n         style="stop-color:#000000;stop-opacity:0;"\n         offset="1"\n         id="stop46971" />\n    </linearGradient>\n    <linearGradient\n       id="linearGradient46862"\n       osb:paint="solid">\n      <stop\n         style="stop-color:#ececec;stop-opacity:1;"\n         offset="0"\n         id="stop46860" />\n    </linearGradient>\n    <linearGradient\n       inkscape:collect="always"\n       id="linearGradient47117">\n      <stop\n         style="stop-color:#cccccc;stop-opacity:1;"\n         offset="0"\n         id="stop47113" />\n      <stop\n         style="stop-color:#cccccc;stop-opacity:0;"\n         offset="1"\n         id="stop47115" />\n    </linearGradient>\n    <radialGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient4625"\n       id="radialGradient4627"\n       cx="23.017721"\n       cy="353.20093"\n       fx="23.017721"\n       fy="353.20093"\n       r="33.071648"\n       gradientTransform="matrix(0.9999664,0.00819926,-0.00407819,0.49736889,12.288994,103.71222)"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       inkscape:collect="always"\n       id="linearGradient4625">\n      <stop\n         style="stop-color:#99ff55;stop-opacity:1;"\n         offset="0"\n         id="stop4621" />\n      <stop\n         style="stop-color:#99ff55;stop-opacity:0;"\n         offset="1"\n         id="stop4623" />\n    </linearGradient>\n    <radialGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient4617"\n       id="radialGradient44460-2"\n       cx="27.781246"\n       cy="262.60416"\n       fx="27.781246"\n       fy="262.60416"\n       r="33.337498"\n       gradientTransform="matrix(1.7352948,0.01419348,-0.00404564,0.49340262,-13.280736,149.60821)"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       inkscape:collect="always"\n       id="linearGradient4617">\n      <stop\n         style="stop-color:#66ff00;stop-opacity:1;"\n         offset="0"\n         id="stop4613" />\n      <stop\n         style="stop-color:#66ff00;stop-opacity:0;"\n         offset="1"\n         id="stop4615" />\n    </linearGradient>\n    <linearGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="linearGradient47119-6-3"\n       x1="41.2561"\n       y1="248.90253"\n       x2="41.214836"\n       y2="256.65088"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.8973486,0,0,0.99798919,10.922592,17.782479)" />\n    <linearGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="linearGradient47119-5-9"\n       x1="41.2561"\n       y1="248.90253"\n       x2="41.067112"\n       y2="255.32812"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.89737575,0,0,0.99799499,-88.935714,-541.14419)" />\n  </defs>\n  <sodipodi:namedview\n     id="base"\n     pagecolor="#ffffff"\n     bordercolor="#666666"\n     borderopacity="1.0"\n     inkscape:pageopacity="0.0"\n     inkscape:pageshadow="2"\n     inkscape:zoom="0.49497475"\n     inkscape:cx="-771.7445"\n     inkscape:cy="10.192956"\n     inkscape:document-units="px"\n     inkscape:current-layer="layer1"\n     showgrid="false"\n     units="px"\n     inkscape:window-width="1916"\n     inkscape:window-height="1057"\n     inkscape:window-x="5760"\n     inkscape:window-y="0"\n     inkscape:window-maximized="0"\n     scale-x="0.26458" />\n  <metadata\n     id="metadata5">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title />\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <g\n     inkscape:label="Layer 1"\n     inkscape:groupmode="layer"\n     id="layer1"\n     transform="translate(0,-262.86875)">\n    <rect\n       style="opacity:1;fill:#666666;stroke-width:0.26431346"\n       id="rect42330-9"\n       width="67.731026"\n       height="33.798767"\n       x="0"\n       y="263.20081"\n       rx="13.229"\n       ry="13.229" />\n    <rect\n       style="opacity:1;fill:#b3b3b3;stroke-width:0.29037237"\n       id="rect42330-3-1"\n       width="67.731026"\n       height="32.74255"\n       x="0"\n       y="263.20081"\n       rx="13.229"\n       ry="13.229" />\n    <rect\n       ry="13.229"\n       rx="13.229"\n       y="263.99298"\n       x="0.79373169"\n       height="31.158237"\n       width="66.143578"\n       id="rect42373-2"\n       style="opacity:1;fill:#00aa00;fill-opacity:1;stroke-width:0.27992097" />\n    <rect\n       ry="13.229"\n       rx="13.229"\n       y="263.86902"\n       x="0.93408203"\n       height="31.406181"\n       width="65.862862"\n       id="rect42373-3-7"\n       style="opacity:1;fill:url(#radialGradient4627);fill-opacity:1;stroke:url(#radialGradient44460-2);stroke-width:0.28043568;stroke-opacity:0.93956042" />\n    <rect\n       style="opacity:1;fill:#0c5a00;fill-opacity:1;stroke-width:0.18395628"\n       id="rect42330-6-0"\n       width="33.866241"\n       height="32.742535"\n       x="33.621399"\n       y="263.13336"\n       rx="13.229"\n       ry="13.229" />\n    <rect\n       style="opacity:1;fill:#b3b3b3;stroke-width:0.20278068"\n       id="rect42330-3-2-9"\n       width="33.031647"\n       height="32.74255"\n       x="34.455994"\n       y="263.13333"\n       rx="13.229"\n       ry="13.229" />\n    <rect\n       style="opacity:1;fill:#ececec;stroke-width:0.19357017"\n       id="rect42330-3-2-2-36"\n       width="31.629591"\n       height="31.158237"\n       x="35.031769"\n       y="263.86902"\n       rx="13.229"\n       ry="13.229" />\n    <rect\n       transform="scale(-1)"\n       ry="13.229"\n       rx="13.229"\n       y="-293.09921"\n       x="-65.828644"\n       height="13.52328"\n       width="29.848389"\n       id="rect42330-3-2-2-3-0"\n       style="opacity:1;fill:url(#linearGradient47119-5-9);fill-opacity:1;stroke-width:0.12388157" />\n    <rect\n       style="opacity:1;fill:url(#linearGradient47119-6-3);fill-opacity:1;stroke-width:0.12387931"\n       id="rect42330-3-2-2-3-2-6"\n       width="29.847486"\n       height="13.523202"\n       x="34.028969"\n       y="265.82593"\n       rx="13.229"\n       ry="13.229"\n       transform="matrix(0.99996239,-0.00867248,0.00701146,0.99997542,0,0)" />\n  </g>\n</svg>\n'}
+
+ +
+
+send_value()[source]
+

Emit a send_value_signal to update channel value.

+

If :attr:’pvBit’ is n>=0 or positive the button toggles the state of +the n-th digit of the channel. Otherwise it toggles the whole value.

+
+ +
+
+shape
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+showConfirmDialog
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+sizeHint()[source]
+

Return size hint to define size on initialization.

+
+ +
+
+squaredbuttonstatesdict = {'Disconnected': '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"\n   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"\n   width="256"\n   height="129"\n   viewBox="0 0 67.733331 34.131251"\n   version="1.1"\n   id="svg159"\n   inkscape:version="0.92.1 unknown"\n   sodipodi:docname="SquaredDisconnectButton.svg">\n  <defs\n     id="defs153">\n    <linearGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="linearGradient47119-6"\n       x1="41.2561"\n       y1="248.90253"\n       x2="41.214836"\n       y2="256.65088"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.88273561,1.8213812e-8,-1.4296e-8,0.99999332,-5.5262653,17.145788)" />\n    <linearGradient\n       inkscape:collect="always"\n       id="linearGradient47117">\n      <stop\n         style="stop-color:#cccccc;stop-opacity:1;"\n         offset="0"\n         id="stop47113" />\n      <stop\n         style="stop-color:#cccccc;stop-opacity:0;"\n         offset="1"\n         id="stop47115" />\n    </linearGradient>\n    <linearGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="linearGradient47119"\n       x1="41.2561"\n       y1="248.90253"\n       x2="41.067112"\n       y2="255.32812"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.88276109,0,0,0.99999997,-71.212313,-541.70269)" />\n    <radialGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="radialGradient44460"\n       cx="27.781246"\n       cy="262.60416"\n       fx="27.781246"\n       fy="262.60416"\n       r="33.337498"\n       gradientTransform="matrix(1.176961,2.4123198e-7,-8.8978764e-8,0.41608433,1.1684521,170.27202)"\n       gradientUnits="userSpaceOnUse" />\n    <radialGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="radialGradient8012"\n       cx="33.865871"\n       cy="279.53751"\n       fx="33.865871"\n       fy="279.53751"\n       r="33.072918"\n       gradientTransform="matrix(1.1863765,3.4113101e-7,-1.1988375e-7,0.41941276,-6.3117695,162.29589)"\n       gradientUnits="userSpaceOnUse" />\n  </defs>\n  <sodipodi:namedview\n     id="base"\n     pagecolor="#ffffff"\n     bordercolor="#666666"\n     borderopacity="1.0"\n     inkscape:pageopacity="0.0"\n     inkscape:pageshadow="2"\n     inkscape:zoom="1.7167969"\n     inkscape:cx="-104.29494"\n     inkscape:cy="92.021553"\n     inkscape:document-units="px"\n     inkscape:current-layer="layer1"\n     showgrid="false"\n     units="px"\n     inkscape:window-width="1916"\n     inkscape:window-height="1057"\n     inkscape:window-x="3840"\n     inkscape:window-y="0"\n     inkscape:window-maximized="0" />\n  <metadata\n     id="metadata156">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title />\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <g\n     inkscape:label="Layer 1"\n     inkscape:groupmode="layer"\n     id="layer1"\n     transform="translate(0,-262.86873)">\n    <rect\n       style="opacity:1;fill:#666666;stroke-width:0.26458332"\n       id="rect42330"\n       width="67.73333"\n       height="33.866665"\n       x="1.110223e-16"\n       y="263.1333"\n       rx="3.9999998"\n       ry="3.9999998" />\n    <rect\n       style="opacity:1;fill:#b3b3b3;stroke-width:0.29066887"\n       id="rect42330-3"\n       width="67.73333"\n       height="32.808334"\n       x="1.110223e-16"\n       y="263.1333"\n       rx="3.9999998"\n       ry="3.9999998" />\n    <rect\n       ry="3.9333332"\n       rx="3.9682536"\n       y="263.92706"\n       x="0.79370123"\n       height="31.220833"\n       width="66.145836"\n       id="rect42373"\n       style="opacity:1;fill:#333333;fill-opacity:1;stroke-width:0.28020677" />\n    <rect\n       ry="3.96875"\n       rx="3.96875"\n       y="263.80286"\n       x="0.9333176"\n       height="31.469278"\n       width="65.865112"\n       id="rect42373-3"\n       style="opacity:1;fill:url(#radialGradient8012);fill-opacity:1;stroke:url(#radialGradient44460);stroke-width:0.2807219;stroke-opacity:0.93956042" />\n    <rect\n       style="opacity:1;fill:#333333;fill-opacity:1;stroke-width:0.18414214"\n       id="rect42330-6"\n       width="33.866665"\n       height="32.808319"\n       x="16.933332"\n       y="263.13333"\n       rx="3.532774"\n       ry="3.8749981" />\n    <rect\n       style="opacity:1;fill:#b3b3b3;stroke-width:0.20132458"\n       id="rect42330-3-2"\n       width="32.49369"\n       height="32.808334"\n       x="17.619818"\n       y="263.13333"\n       rx="3.3895538"\n       ry="3.9999995" />\n    <rect\n       style="opacity:1;fill:#ececec;stroke-width:0.1921802"\n       id="rect42330-3-2-2"\n       width="31.114475"\n       height="31.220833"\n       x="18.186256"\n       y="263.87045"\n       rx="3.245682"\n       ry="3.8064513" />\n    <rect\n       transform="scale(-1)"\n       ry="1.6520737"\n       rx="3.0629039"\n       y="-293.15945"\n       x="-48.481586"\n       height="13.550447"\n       width="29.362278"\n       id="rect42330-3-2-2-3"\n       style="opacity:1;fill:url(#linearGradient47119);fill-opacity:1;stroke-width:0.12299201" />\n    <rect\n       style="opacity:1;fill:url(#linearGradient47119-6);fill-opacity:1;stroke-width:0.12298982"\n       id="rect42330-3-2-2-3-2"\n       width="29.361433"\n       height="13.550358"\n       x="17.203831"\n       y="265.68738"\n       rx="3.0628154"\n       ry="1.6520625"\n       transform="matrix(0.99996098,-0.00883377,0.00688345,0.99997631,0,0)" />\n  </g>\n</svg>\n', 'Off': '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"\n   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"\n   width="256"\n   height="129"\n   viewBox="0 0 67.73248 34.13082"\n   version="1.1"\n   id="svg8"\n   inkscape:version="0.92.1 unknown"\n   sodipodi:docname="SquaredOffButton.svg">\n  <defs\n     id="defs2">\n    <linearGradient\n       id="linearGradient7812"\n       inkscape:collect="always">\n      <stop\n         id="stop7808"\n         offset="0"\n         style="stop-color:#0c5a00;stop-opacity:1;" />\n      <stop\n         id="stop7810"\n         offset="1"\n         style="stop-color:#0caa00;stop-opacity:0" />\n    </linearGradient>\n    <linearGradient\n       inkscape:collect="always"\n       id="linearGradient7744">\n      <stop\n         style="stop-color:#0c5a00;stop-opacity:1;"\n         offset="0"\n         id="stop7740" />\n      <stop\n         style="stop-color:#0caa00;stop-opacity:0"\n         offset="1"\n         id="stop7742" />\n    </linearGradient>\n    <linearGradient\n       id="linearGradient46973"\n       osb:paint="gradient">\n      <stop\n         style="stop-color:#000000;stop-opacity:1;"\n         offset="0"\n         id="stop46969" />\n      <stop\n         style="stop-color:#000000;stop-opacity:0;"\n         offset="1"\n         id="stop46971" />\n    </linearGradient>\n    <linearGradient\n       id="linearGradient46862"\n       osb:paint="solid">\n      <stop\n         style="stop-color:#ececec;stop-opacity:1;"\n         offset="0"\n         id="stop46860" />\n    </linearGradient>\n    <radialGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient7812"\n       id="radialGradient44460"\n       cx="29.12948"\n       cy="262.3385"\n       fx="29.12948"\n       fy="262.3385"\n       r="33.337498"\n       gradientTransform="matrix(1.2611815,8.8607088e-5,-1.7345295e-4,0.42019145,-0.84900691,169.17349)"\n       gradientUnits="userSpaceOnUse" />\n    <linearGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="linearGradient47119"\n       x1="41.2561"\n       y1="248.90253"\n       x2="41.067112"\n       y2="255.32812"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(1.0160577,0,0,0.99998734,-62.006121,-541.86296)" />\n    <linearGradient\n       inkscape:collect="always"\n       id="linearGradient47117">\n      <stop\n         style="stop-color:#cccccc;stop-opacity:1;"\n         offset="0"\n         id="stop47113" />\n      <stop\n         style="stop-color:#cccccc;stop-opacity:0;"\n         offset="1"\n         id="stop47115" />\n    </linearGradient>\n    <linearGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="linearGradient47119-6"\n       x1="41.2561"\n       y1="248.90253"\n       x2="41.214836"\n       y2="256.65088"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(1.0160187,1.8494609e-8,-1.7616317e-8,0.99998834,-26.320612,17.159684)" />\n    <radialGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient7744"\n       id="radialGradient7746"\n       cx="28.309671"\n       cy="263.13199"\n       fx="28.309669"\n       fy="263.13199"\n       r="32.525963"\n       gradientTransform="matrix(1.2926485,9.0634671e-5,-1.7773177e-4,0.43067548,-0.70463684,166.08141)"\n       gradientUnits="userSpaceOnUse" />\n  </defs>\n  <sodipodi:namedview\n     id="base"\n     pagecolor="#ffffff"\n     bordercolor="#666666"\n     borderopacity="1.0"\n     inkscape:pageopacity="0.0"\n     inkscape:pageshadow="2"\n     inkscape:zoom="0.98994949"\n     inkscape:cx="59.865723"\n     inkscape:cy="191.47843"\n     inkscape:document-units="px"\n     inkscape:current-layer="layer1"\n     showgrid="false"\n     units="px"\n     inkscape:window-width="1916"\n     inkscape:window-height="1057"\n     inkscape:window-x="3840"\n     inkscape:window-y="0"\n     inkscape:window-maximized="0" />\n  <metadata\n     id="metadata5">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title />\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <g\n     inkscape:label="Layer 1"\n     inkscape:groupmode="layer"\n     id="layer1"\n     transform="translate(0,-262.86875)">\n    <rect\n       style="opacity:1;fill:#666666;stroke-width:0.26458001"\n       id="rect42330"\n       width="67.732483"\n       height="33.866241"\n       x="4.0228883e-08"\n       y="263.13333"\n       rx="3.9999495"\n       ry="3.9999495" />\n    <rect\n       style="opacity:1;fill:#b3b3b3;stroke-width:0.29066521"\n       id="rect42330-3"\n       width="67.732483"\n       height="32.807919"\n       x="4.0228883e-08"\n       y="263.13333"\n       rx="3.9999495"\n       ry="3.9999495" />\n    <rect\n       ry="3.9332836"\n       rx="3.9682035"\n       y="263.92709"\n       x="0.79374027"\n       height="31.22044"\n       width="66.144997"\n       id="rect42373"\n       style="opacity:1;fill:#112b0b;fill-opacity:1;stroke-width:0.28020325" />\n    <rect\n       ry="3.9686997"\n       rx="3.9686997"\n       y="263.98401"\n       x="0.93555796"\n       height="31.220446"\n       width="66.003174"\n       id="rect42373-3"\n       style="opacity:1;fill:url(#radialGradient7746);fill-opacity:1;stroke:url(#radialGradient44460);stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.93956042" />\n    <g\n       id="g5809"\n       transform="scale(0.88319365,1)">\n      <rect\n         transform="scale(-1)"\n         ry="3.874949"\n         rx="3.9999495"\n         y="-295.9415"\n         x="-38.345203"\n         height="32.807903"\n         width="38.345203"\n         id="rect42330-6"\n         style="opacity:1;fill:#2d0000;fill-opacity:1;stroke-width:0.1959385" />\n      <rect\n         transform="scale(-1)"\n         ry="3.9999492"\n         rx="3.9013755"\n         y="-295.94153"\n         x="-37.400234"\n         height="32.807919"\n         width="37.400234"\n         id="rect42330-3-2"\n         style="opacity:1;fill:#b3b3b3;stroke-width:0.21598901" />\n      <rect\n         transform="scale(-1)"\n         ry="3.8064034"\n         rx="3.7357788"\n         y="-295.20444"\n         x="-36.74831"\n         height="31.22044"\n         width="35.812752"\n         id="rect42330-3-2-2"\n         style="opacity:1;fill:#ececec;stroke-width:0.20617858" />\n      <path\n         inkscape:connector-curvature="0"\n         id="path47770"\n         d="m 34.653293,295.81587 c 1.202283,-0.40774 2.117931,-1.32505 2.568609,-2.57327 l 0.218932,-0.60637 0.02726,-12.56756 c 0.01741,-8.03127 -0.0071,-12.85035 -0.06793,-13.35106 -0.132866,-1.0937 -0.497502,-1.82283 -1.275617,-2.55072 -0.385387,-0.36052 -0.793099,-0.64034 -1.110913,-0.76244 -0.409461,-0.15731 -0.453593,-0.19381 -0.239241,-0.19782 0.401868,-0.008 1.330211,0.33664 1.912157,0.70891 0.59553,0.38095 1.079958,0.98807 1.390754,1.74298 l 0.213966,0.51971 v 13.32349 c 0,12.6785 -0.0084,13.34756 -0.173324,13.82069 -0.459914,1.3193 -1.798816,2.35087 -3.275664,2.52378 -0.303577,0.0355 -0.357641,0.0269 -0.188987,-0.0303 z"\n         style="opacity:1;fill:#17280b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.1006349;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers" />\n      <rect\n         style="opacity:1;fill:url(#linearGradient47119);fill-opacity:1;stroke-width:0.13195072"\n         id="rect42330-3-2-2-3"\n         width="33.795975"\n         height="13.550277"\n         x="-35.843052"\n         y="-293.32275"\n         rx="3.5254014"\n         ry="1.6520529"\n         transform="scale(-1)" />\n      <rect\n         transform="matrix(0.99997055,-0.00767484,0.00792289,0.99996861,0,0)"\n         ry="1.6520544"\n         rx="3.5252662"\n         y="265.7001"\n         x="-0.15851437"\n         height="13.55029"\n         width="33.794678"\n         id="rect42330-3-2-2-3-2"\n         style="opacity:1;fill:url(#linearGradient47119-6);fill-opacity:1;stroke-width:0.13194825" />\n    </g>\n  </g>\n</svg>\n', 'On': '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<svg\n   xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:xlink="http://www.w3.org/1999/xlink"\n   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"\n   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"\n   width="256"\n   height="129"\n   viewBox="0 0 67.73248 34.13082"\n   version="1.1"\n   id="svg8"\n   inkscape:version="0.92.1 unknown"\n   sodipodi:docname="SquaredOnButton.svg">\n  <defs\n     id="defs2">\n    <linearGradient\n       inkscape:collect="always"\n       id="linearGradient4625">\n      <stop\n         style="stop-color:#99ff55;stop-opacity:1;"\n         offset="0"\n         id="stop4621" />\n      <stop\n         style="stop-color:#99ff55;stop-opacity:0;"\n         offset="1"\n         id="stop4623" />\n    </linearGradient>\n    <linearGradient\n       inkscape:collect="always"\n       id="linearGradient4617">\n      <stop\n         style="stop-color:#66ff00;stop-opacity:1;"\n         offset="0"\n         id="stop4613" />\n      <stop\n         style="stop-color:#66ff00;stop-opacity:0;"\n         offset="1"\n         id="stop4615" />\n    </linearGradient>\n    <linearGradient\n       id="linearGradient46973"\n       osb:paint="gradient">\n      <stop\n         style="stop-color:#000000;stop-opacity:1;"\n         offset="0"\n         id="stop46969" />\n      <stop\n         style="stop-color:#000000;stop-opacity:0;"\n         offset="1"\n         id="stop46971" />\n    </linearGradient>\n    <linearGradient\n       id="linearGradient46862"\n       osb:paint="solid">\n      <stop\n         style="stop-color:#ececec;stop-opacity:1;"\n         offset="0"\n         id="stop46860" />\n    </linearGradient>\n    <linearGradient\n       inkscape:collect="always"\n       id="linearGradient47117">\n      <stop\n         style="stop-color:#cccccc;stop-opacity:1;"\n         offset="0"\n         id="stop47113" />\n      <stop\n         style="stop-color:#cccccc;stop-opacity:0;"\n         offset="1"\n         id="stop47115" />\n    </linearGradient>\n    <linearGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="linearGradient47119-6-3"\n       x1="41.2561"\n       y1="248.90253"\n       x2="41.214836"\n       y2="256.65088"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.89734862,-1.5002197e-8,1.251636e-8,0.99798917,10.92258,17.782472)" />\n    <linearGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient47117"\n       id="linearGradient47119-5"\n       x1="41.2561"\n       y1="248.90253"\n       x2="41.067112"\n       y2="255.32812"\n       gradientUnits="userSpaceOnUse"\n       gradientTransform="matrix(0.89737573,0,0,0.99799499,-88.935698,-541.14417)" />\n    <radialGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient4617"\n       id="radialGradient44460-2"\n       cx="27.781246"\n       cy="262.60416"\n       fx="27.781246"\n       fy="262.60416"\n       r="33.337498"\n       gradientTransform="matrix(1.7352948,0.01419348,-0.00404564,0.49340261,-13.280746,149.6082)"\n       gradientUnits="userSpaceOnUse" />\n    <radialGradient\n       inkscape:collect="always"\n       xlink:href="#linearGradient4625"\n       id="radialGradient4627"\n       cx="23.017721"\n       cy="353.20093"\n       fx="23.017721"\n       fy="353.20093"\n       r="33.071649"\n       gradientTransform="matrix(0.99996639,0.00819926,-0.00407819,0.49736889,12.288978,103.71221)"\n       gradientUnits="userSpaceOnUse" />\n  </defs>\n  <sodipodi:namedview\n     id="base"\n     pagecolor="#ffffff"\n     bordercolor="#666666"\n     borderopacity="1.0"\n     inkscape:pageopacity="0.0"\n     inkscape:pageshadow="2"\n     inkscape:zoom="1.4"\n     inkscape:cx="80.712392"\n     inkscape:cy="41.77284"\n     inkscape:document-units="px"\n     inkscape:current-layer="layer1"\n     showgrid="false"\n     units="px"\n     inkscape:window-width="1916"\n     inkscape:window-height="1057"\n     inkscape:window-x="3840"\n     inkscape:window-y="1080"\n     inkscape:window-maximized="0" />\n  <metadata\n     id="metadata5">\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n        <dc:title />\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <g\n     inkscape:label="Layer 1"\n     inkscape:groupmode="layer"\n     id="layer1"\n     transform="translate(0,-262.86875)">\n    <rect\n       style="opacity:1;fill:#666666;stroke-width:0.26431346"\n       id="rect42330-9"\n       width="67.731026"\n       height="33.798767"\n       x="0"\n       y="263.20081"\n       rx="3.9998636"\n       ry="3.9919798" />\n    <rect\n       style="opacity:1;fill:#b3b3b3;stroke-width:0.29037237"\n       id="rect42330-3-1"\n       width="67.731026"\n       height="32.74255"\n       x="0"\n       y="263.20081"\n       rx="3.9998636"\n       ry="3.9919798" />\n    <rect\n       ry="3.925447"\n       rx="3.9681182"\n       y="263.99298"\n       x="0.79372311"\n       height="31.158237"\n       width="66.143578"\n       id="rect42373-2"\n       style="opacity:1;fill:#00aa00;fill-opacity:1;stroke-width:0.27992097" />\n    <rect\n       ry="3.9607925"\n       rx="3.9686146"\n       y="263.86902"\n       x="0.93407822"\n       height="31.406181"\n       width="65.862862"\n       id="rect42373-3-7"\n       style="opacity:1;fill:url(#radialGradient4627);fill-opacity:1;stroke:url(#radialGradient44460-2);stroke-width:0.28043568;stroke-opacity:0.93956042" />\n    <rect\n       style="opacity:1;fill:#0c5a00;fill-opacity:1;stroke-width:0.18395628"\n       id="rect42330-6-0"\n       width="33.866241"\n       height="32.742535"\n       x="33.621384"\n       y="263.13336"\n       rx="3.5327301"\n       ry="3.8672287" />\n    <rect\n       style="opacity:1;fill:#b3b3b3;stroke-width:0.20278068"\n       id="rect42330-3-2-9"\n       width="33.031647"\n       height="32.74255"\n       x="34.455971"\n       y="263.13333"\n       rx="3.4456699"\n       ry="3.9919796" />\n    <rect\n       style="opacity:1;fill:#ececec;stroke-width:0.19357017"\n       id="rect42330-3-2-2-36"\n       width="31.629593"\n       height="31.158237"\n       x="35.03175"\n       y="263.86902"\n       rx="3.2994161"\n       ry="3.7988195" />\n    <rect\n       transform="scale(-1)"\n       ry="1.6487614"\n       rx="3.1136119"\n       y="-293.09921"\n       x="-65.828644"\n       height="13.52328"\n       width="29.848389"\n       id="rect42330-3-2-2-3-0"\n       style="opacity:1;fill:url(#linearGradient47119-5);fill-opacity:1;stroke-width:0.12388156" />\n    <rect\n       style="opacity:1;fill:url(#linearGradient47119-6-3);fill-opacity:1;stroke-width:0.12387931"\n       id="rect42330-3-2-2-3-2-6"\n       width="29.847486"\n       height="13.523202"\n       x="34.028965"\n       y="265.8259"\n       rx="3.113518"\n       ry="1.6487517"\n       transform="matrix(0.99996239,-0.00867248,0.00701146,0.99997542,0,0)" />\n  </g>\n</svg>\n'}
+
+ +
+
+validate_password()[source]
+

If the widget is `passwordProtected`, this method will propmt +the user for the correct password.

+
+
Returns:
+

True in case the password was correct of if the widget is not +password protected.

+
+
Return type:
+

bool

+
+
+
+ +
+
+value_changed(new_val)[source]
+

Callback invoked when the Channel value is changed.

+

Display the value of new_val accordingly. If :attr:’pvBit’ is n>=0 or +positive the button display the state of the n-th digit of the channel.

+
+
Parameters:
+

new_value (str, int, float, bool or np.ndarray) – The new value from the channel. The type depends on the channel.

+
+
+
+ +
+ +
+
+

siriushla.widgets.string_combo_box module

+

Sirius String ComboBox.

+
+
+class siriushla.widgets.string_combo_box.SiriusStringComboBox(parent=None, init_channel=None, items=None)[source]
+

Bases: QComboBox, PyDMWritableWidget

+

A ComboBox with a channel to handle PVs of string type.

+
+
+check_enable_state()[source]
+

Checks whether or not the widget should be disable.

+
+ +
+
+set_items(items)[source]
+

Add comboBox items.

+
+ +
+
+value_changed(new_val)[source]
+

Handle PV value changed in widget.

+
+ +
+ +
+
+

siriushla.widgets.timeplot module

+
+
+class siriushla.widgets.timeplot.SiriusTimePlot(*args, show_tooltip=False, **kws)[source]
+

Bases: PyDMTimePlot

+

PyDMTimePlot with some extra features.

+
+
+addCurve(plot_item, axis='left', curve_color=None)[source]
+

Reimplement to use right axis.

+
+ +
+
+addYChannel(y_channel=None, name=None, color=None, lineStyle=None, lineWidth=None, symbol=None, symbolSize=None, axis='left')[source]
+

Reimplement to use SiriusTimePlotItem and right axis.

+
+ +
+
+bufferReset
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+fill_curve_buffer(curve, datax, datay, factor=None)[source]
+

Fill curve buffer.

+
+ +
+
+fill_curve_with_archdata(curve, pvname, t_init, t_end, factor=None, process_type='', process_bin_intvl=None)[source]
+

Fill curve with archiver data.

+
+ +
+
+property legend
+

Legend object.

+
+ +
+
+showToolTip
+
+
pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

designable=True, scriptable=True, stored=True, user=False, +constant=False, final=False, notify=None, +revision=0) -> property attribute

+
+
+

type is the type of the property. It is either a type object or a string +that is the name of a C++ type. +freset is a function for resetting an attribute to its default value. +designable sets the DESIGNABLE flag (the default is True for writable +properties and False otherwise). +scriptable sets the SCRIPTABLE flag. +stored sets the STORED flag. +user sets the USER flag. +constant sets the CONSTANT flag. +final sets the FINAL flag. +notify is the NOTIFY signal. +revision is the REVISION. +The other parameters are the same as those required by the standard Python +property type. Properties defined using pyqtProperty behave as both Python +and Qt properties. +Decorators can be used to define new properties or to modify existing ones.

+
+ +
+
+timeSpanChanged
+

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

+

types is normally a sequence of individual types. Each type is either a +type object or a string that is the name of a C++ type. Alternatively +each type could itself be a sequence of types each describing a different +overloaded signal. +name is the optional C++ name of the signal. If it is not specified then +the name of the class attribute that is bound to the signal is used. +revision is the optional revision of the signal that is exported to QML. +If it is not specified then 0 is used. +arguments is the optional sequence of the names of the signal’s arguments.

+
+
Type:
+

pyqtSignal(*types, name

+
+
Type:
+

str = …, revision

+
+
+
+ +
+
+updateXAxis(update_immediately=False)[source]
+

Reimplement to show only existing range.

+
+ +
+ +
+
+class siriushla.widgets.timeplot.SiriusTimePlotItem(parent, *args, **kwargs)[source]
+

Bases: TimePlotCurveItem

+

Reimplement to do not receive inf values.

+
+
+initialize_buffer()[source]
+

Rederive initialize_buffer to avoid filling the entire buffer +with plot-eligible data.

+
+ +
+
+receiveNewValue(new_value)[source]
+

Rederive receiveNewValue to avoid infinit values.

+
+ +
+
+redrawCurve()[source]
+

Rederive redrawCurve to use data only refered to timespan.

+
+ +
+
+setBufferSize(value, initialize_buffer=False)[source]
+

Reimplement setBufferSize to fill buffer with points accumulated.

+
+ +
+ +
+
+

siriushla.widgets.waveformplot module

+

Waveform plot widget.

+
+
+class siriushla.widgets.waveformplot.SiriusWaveformPlot(*args, **kwargs)[source]
+

Bases: PyDMWaveformPlot

+

Sirius Waveform Plot widget.

+
+
+property legend
+

Legend object.

+
+ +
+ +
+
+

siriushla.widgets.waveformtable module

+

Sirius Waveform Table Widget.

+
+
+class siriushla.widgets.waveformtable.SiriusWaveformTable(parent=None, init_channel=None, transform=None)[source]
+

Bases: PyDMWaveformTable

+

Handle bugs for None, float and int values.

+
+
+value_changed(new_waveform)[source]
+

Callback invoked when the Channel value is changed.

+
+
Parameters:
+

new_waveform (np.ndarray) – The new waveform value from the channel.

+
+
+
+ +
+ +
+
+

siriushla.widgets.widget_factory module

+
+
+siriushla.widgets.widget_factory.pydmwidget_factory(widgetclass, pydm_class='read')[source]
+
+ +
+
+

siriushla.widgets.windows module

+

Sirius Windows module.

+
+
+siriushla.widgets.windows.SiriusDialog
+

alias of _SiriusWindow

+
+ +
+
+siriushla.widgets.windows.SiriusMainWindow
+

alias of _SiriusWindow

+
+ +
+
+siriushla.widgets.windows.create_window_from_widget(WidgetClass, title='', icon=None, is_main=False, withscroll=False, min_width=None, min_height=None)[source]
+

.

+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file