Skip to content

Commit

Permalink
Merge pull request #362 from vshekar/update-cryostream-temperature
Browse files Browse the repository at this point in the history
Updated cryostream signal for AMX
  • Loading branch information
vshekar authored Apr 22, 2024
2 parents fd3b0fc + 18c65b7 commit c42c50b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class RasterStatus(Enum):
DEWAR_SECTORS = {"amx": 8, "fmx": 8, "nyx": 5}
PUCKS_PER_DEWAR_SECTOR = {"amx": 3, "fmx": 3, "nyx": 3}

cryostreamTempPV = {"amx": "AMX:cs700:gasT-I", "fmx": "FMX:cs700:gasT-I"}
cryostreamTempPV = {"amx": "XF:17IDB-ES:AMX{CS:1}SAMPLE_TEMP_RBV", "fmx": "FMX:cs700:gasT-I"}

VALID_EXP_TIMES = {
"amx": {"min": 0.005, "max": 1, "digits": 3},
Expand Down
21 changes: 14 additions & 7 deletions gui/control_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class ControlMain(QtWidgets.QMainWindow):
roiChangeSignal = QtCore.Signal(int, str)
highMagCursorChangeSignal = QtCore.Signal(int, str)
lowMagCursorChangeSignal = QtCore.Signal(int, str)
cryostreamTempSignal = QtCore.Signal(str)
cryostreamTempSignal = QtCore.Signal(object)
sampleZoomChangeSignal = QtCore.Signal(object)

def __init__(self):
Expand Down Expand Up @@ -1334,7 +1334,7 @@ def createSampleTab(self):
140,
highlight_on_change=False,
)
ringCurrentMessageLabel = QtWidgets.QLabel("Ring(mA):")
ringCurrentMessageLabel = QtWidgets.QLabel("Ring (mA):")
self.ringCurrentMessage = QtWidgets.QLabel(str(self.ringCurrent_pv.get()))
beamAvailable = self.beamAvailable_pv.get()
if beamAvailable:
Expand All @@ -1350,12 +1350,12 @@ def createSampleTab(self):
else:
self.sampleExposedLabel = QtWidgets.QLabel("Sample Not Exposed")
self.sampleExposedLabel.setStyleSheet("background-color: #99FF66;")
gripperLabel = QtWidgets.QLabel("Gripper Temp:")
gripperLabel = QtWidgets.QLabel("Gripper Temp (K):")
if daq_utils.beamline == "nyx":
self.gripperTempLabel = QtWidgets.QLabel("N/A")
else:
self.gripperTempLabel = QtWidgets.QLabel("%.1f" % self.gripTemp_pv.get())
cryostreamLabel = QtWidgets.QLabel("Cryostream Temp:")
cryostreamLabel = QtWidgets.QLabel("Cryostream Temp (K):")
if getBlConfig(CRYOSTREAM_ONLINE):
self.cryostreamTempLabel = QtWidgets.QLabel(
str(self.cryostreamTemp_pv.get())
Expand Down Expand Up @@ -2074,14 +2074,21 @@ def processFastShutter(self, shutterVal):
self.shutterStateLabel.setStyleSheet("background-color: #99FF66;")

def processGripTemp(self, gripVal):
self.gripperTempLabel.setText("%.1f" % gripVal)
if int(gripVal) > -170:
gripValKelvin = gripVal + 273.15
gripValMaxKelvin = 103.15 # -170 in degC
self.gripperTempLabel.setText("%.1f" % gripValKelvin)
if gripValKelvin > gripValMaxKelvin:
self.gripperTempLabel.setStyleSheet("background-color: red;")
else:
self.gripperTempLabel.setStyleSheet("background-color: #99FF66;")

def processCryostreamTemp(self, cryostreamVal):
self.cryostreamTempLabel.setText(str(cryostreamVal))
self.cryostreamTempLabel.setText(f"{cryostreamVal:.2f}")
if cryostreamVal is not None:
if 99 < cryostreamVal < 102:
self.cryostreamTempLabel.setStyleSheet("background-color: #99FF66;")
else:
self.cryostreamTempLabel.setStyleSheet("background-color: red;")

def processRingCurrent(self, ringCurrentVal):
self.ringCurrentMessage.setText(str(int(ringCurrentVal)))
Expand Down

0 comments on commit c42c50b

Please sign in to comment.