Iacopo test pull request #10

Open
mochi_i wants to merge 3 commits from Iacopo into main
6 changed files with 1732 additions and 13 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1 @@
{'files': ['pressure_monitor.py']}
@@ -0,0 +1,62 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
from qtpy.QtWidgets import QWidget
from bec_widgets.utils.bec_designer import designer_material_icon
# NOTE: Qt Designer imports this file as a top-level script, so the import below must be
# absolute. Replace `my_beamline_plugin` with the package name of your BEC plugin repo.
from xil_bec.bec_widgets.widgets.pressure_monitor.pressure_monitor import (
PressureMonitor,
)
DOM_XML = """
<ui language='c++'>
<widget class='PressureMonitor' name='pressure_monitor'>
</widget>
</ui>
"""
class PressureMonitorPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
def __init__(self):
super().__init__()
self._form_editor = None
def createWidget(self, parent):
if parent is None:
return QWidget()
t = PressureMonitor(parent)
return t
def domXml(self):
return DOM_XML
def group(self):
return "BEC Plots"
def icon(self):
return designer_material_icon(PressureMonitor.ICON_NAME)
def includeFile(self):
return "pressure_monitor"
def initialize(self, form_editor):
self._form_editor = form_editor
def isContainer(self):
return False
def isInitialized(self):
return self._form_editor is not None
def name(self):
return "PressureMonitor"
def toolTip(self):
return "Rolling time-window monitor for pressure gauges and other BEC signals"
def whatsThis(self):
return self.toolTip()
@@ -0,0 +1,18 @@
def main(): # pragma: no cover
from qtpy import PYSIDE6
if not PYSIDE6:
print("PYSIDE6 is not available in the environment. Cannot patch designer.")
return
from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
# NOTE: replace `my_beamline_plugin` with the package name of your BEC plugin repo.
from xil_bec.bec_widgets.widgets.pressure_monitor.pressure_monitor_plugin import (
PressureMonitorPlugin,
)
QPyDesignerCustomWidgetCollection.addCustomWidget(PressureMonitorPlugin())
if __name__ == "__main__": # pragma: no cover
main()
+283 -13
View File
@@ -67,12 +67,12 @@ bm1_cam:
## Diode Readout ##
###################################
keithley2:
keithley_bl:
readoutPriority: monitored
description: Keithley 2 diode readout
description: Keithley BL diode readout
deviceClass: ophyd.EpicsSignalRO
deviceConfig:
read_pv: "X09LB-KEITHLEY-2:READOUT"
read_pv: "X09LB-KEITHLEY-BL:READOUT"
onFailure: retry
enabled: true
softwareTrigger: false
@@ -179,20 +179,290 @@ fe_sto_pressure:
deviceTags:
- pressure_gauge
###################################
## Pinhole PIN0 ##
###################################
pin0_trx:
readoutPriority: baseline
description: Pinhole PIN0 X Translation
##################################
## M2 TRY ##
##################################
m2try:
description: "m2-try"
deviceClass: ophyd_devices.EpicsMotorEC
deviceConfig:
prefix: X09LB-OP-PIN0:TRX
prefix: "X09LB-OP-MI2:TRY"
onFailure: raise
enabled: true
readoutPriority: monitored
readOnly: false
softwareTrigger: false
deviceTags:
- optics
- Motors
###################################
## Temperature M1 ##
###################################
m1_temp:
readoutPriority: monitored
description: m1 temperature
deviceClass: ophyd_devices.EpicsSignalRO
deviceConfig:
read_pv: X09LB-OP-M1-ETTC-1010:TEMP
onFailure: retry
enabled: true
softwareTrigger: false
deviceTags:
- optics
- pinhole
- temperature
###################################
## Temperature M2 ##
###################################
m2_temp:
readoutPriority: monitored
description: M2 temperature
deviceClass: ophyd_devices.EpicsSignalRO
deviceConfig:
read_pv: X09LB-OP-M2-ETTC-2010:TEMP
onFailure: retry
enabled: true
softwareTrigger: false
deviceTags:
- optics
- temperature
###################################
## Temperature FE Slit1-1 ##
###################################
fw_slit1_1_temp:
readoutPriority: monitored
description: FE Slit1 temperature
deviceClass: ophyd_devices.EpicsSignalRO
deviceConfig:
read_pv: X09L-FE-SL1-ETTC-0010:TEMP
onFailure: retry
enabled: true
softwareTrigger: false
deviceTags:
- FE
- temeprature
###################################
## Temperature FE Slit1_2 ##
###################################
fw_slit1_2_temp:
readoutPriority: baseline
description: FE Slit2 temperature
deviceClass: ophyd_devices.EpicsSignalRO
deviceConfig:
read_pv: X09L-FE-SL1-ETTC-0020:TEMP
onFailure: retry
enabled: true
softwareTrigger: false
deviceTags:
- FE
- temeprature
###################################
## Temperature FE Slit2-1 ##
###################################
fw_slit2_1_temp:
readoutPriority: monitored
description: FE Slit2 temperature
deviceClass: ophyd_devices.EpicsSignalRO
deviceConfig:
read_pv: X09L-FE-SL2-ETTC-0010:TEMP
onFailure: retry
enabled: true
softwareTrigger: false
deviceTags:
- FE
- temeprature
###################################
## Temperature FE Slit2_2 ##
###################################
fw_slit2_2_temp:
readoutPriority: monitored
description: FE Slit2 temperature
deviceClass: ophyd_devices.EpicsSignalRO
deviceConfig:
read_pv: X09L-FE-SL2-ETTC-0020:TEMP
onFailure: retry
enabled: true
softwareTrigger: false
deviceTags:
- FE
- temeprature
### FE Slits Motors ###
###################################
## Wall Slit ##
###################################
fe_slit_wall_trx:
readoutPriority: baseline
description: Wall slit X Translation
deviceClass: ophyd_devices.EpicsMotorEC
deviceConfig:
prefix: X09L-FE-SL1:TRXW
onFailure: retry
enabled: true
softwareTrigger: false
deviceTags:
- FE
- Motors
###################################
## Ring Slit ##
###################################
fe_slit_ring_trx:
readoutPriority: baseline
description: Ring slit X Translation
deviceClass: ophyd_devices.EpicsMotorEC
deviceConfig:
prefix: X09L-FE-SL1:TRXR
onFailure: retry
enabled: true
softwareTrigger: false
deviceTags:
- FE
- Motors
###################################
## Top Slit ##
###################################
fe_slit_top_try:
readoutPriority: baseline
description: Top slit Y Translation
deviceClass: ophyd_devices.EpicsMotorEC
deviceConfig:
prefix: X09L-FE-SL1:TRYT
onFailure: retry
enabled: true
softwareTrigger: false
deviceTags:
- FE
- Motors
###################################
## Bottom Slit ##
###################################
fe_slit_bottom_try:
readoutPriority: baseline
description: Top slit Y Translation
deviceClass: ophyd_devices.EpicsMotorEC
deviceConfig:
prefix: X09L-FE-SL1:TRYB
onFailure: retry
enabled: true
softwareTrigger: false
deviceTags:
- FE
- Motors
##################################
## Slits center X ##
##################################
sl1xc:
description: "Slit 1 (frontend) x center"
deviceClass: ophyd_devices.EpicsMotorEC
deviceConfig:
prefix: "X09L-FE-SL1:CENTERX"
onFailure: raise
enabled: true
readoutPriority: baseline
readOnly: false
softwareTrigger: false
deviceTags:
- frontend
##################################
## Slits center Y ##
##################################
sl1yc:
description: "Slit 1 (frontend) y center"
deviceClass: ophyd_devices.EpicsMotorEC
deviceConfig:
prefix: "X09L-FE-SL1:CENTERY"
onFailure: raise
enabled: true
readoutPriority: baseline
readOnly: false
softwareTrigger: false
deviceTags:
- frontend
##################################
## Slits size X ##
##################################
sl1x_size:
description: "Slit 1 (frontend) x size"
deviceClass: ophyd_devices.EpicsMotorEC
deviceConfig:
prefix: "X09L-FE-SL1:SIZEX"
onFailure: raise
enabled: true
readoutPriority: baseline
readOnly: false
softwareTrigger: false
deviceTags:
- frontend
##################################
## Slits size Y ##
##################################
sl1y_size:
description: "Slit 1 (frontend) y size"
deviceClass: ophyd_devices.EpicsMotorEC
deviceConfig:
prefix: "X09L-FE-SL1:SIZEY"
onFailure: raise
enabled: true
readoutPriority: baseline
readOnly: false
softwareTrigger: false
deviceTags:
- frontend
##################################
## ID - Gap ##
##################################
idgap:
description: "Motor control to the IDGap of X09LB"
deviceClass: ophyd_devices.devices.undulator.UndulatorGap
deviceConfig:
prefix: "X09LB-UIND:"
onFailure: raise
enabled: true
readoutPriority: baseline
readOnly: false
softwareTrigger: false
deviceTags:
- frontend
##################################
## ID - Energy ##
##################################
idenergy:
description: "ID energy value"
deviceClass: ophyd_devices.EpicsSignalRO
deviceConfig:
read_pv: "X09LB-UIND:ENERGY-RBV"
onFailure: raise
enabled: true
readoutPriority: monitored
readOnly: false
softwareTrigger: false
deviceTags:
- frontend