From 5d500840453dc945885f625cc08d807ac16e59e2 Mon Sep 17 00:00:00 2001 From: NYSBC-Rudra <133771854+NYSBC-Rudra@users.noreply.github.com> Date: Tue, 11 Jun 2024 09:39:57 -0400 Subject: [PATCH 1/3] Update control_main.py --- gui/control_main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/control_main.py b/gui/control_main.py index c08dab53..5d7ff3b8 100644 --- a/gui/control_main.py +++ b/gui/control_main.py @@ -596,7 +596,7 @@ def createSampleTab(self): self.resolution_ledit.setValidator(QtGui.QDoubleValidator()) self.resolution_ledit.textEdited[str].connect(self.resoTextChanged) if daq_utils.beamline == "nyx": - self.resolution_ledit.setEnabled(False) + self.resolution_ledit.setEnabled(True) detDistLabel = QtWidgets.QLabel("Detector Dist.") #detDistLabel.setAlignment(QtCore.Qt.AlignCenter) detDistRBLabel = QtWidgets.QLabel("Readback:") From ab900f0ae9184026b2cd4808d0ea93904ab96f1d Mon Sep 17 00:00:00 2001 From: NYSBC-Rudra <133771854+NYSBC-Rudra@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:36:19 -0400 Subject: [PATCH 2/3] Update control_main.py --- gui/control_main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/control_main.py b/gui/control_main.py index 5d7ff3b8..4806d0fb 100644 --- a/gui/control_main.py +++ b/gui/control_main.py @@ -2576,9 +2576,11 @@ def detDistTextChanged(self, text): 0, ) ) - except ValueError: + except ValueError as e: + logger.warning(e) reso_s = "50.0" - except TypeError: + except TypeError as t: + logger.warning(t) reso_s = "50.0" self.setGuiValues({"resolution": reso_s}) From cbdfe67d8d1741195dc6863623e863447004aa64 Mon Sep 17 00:00:00 2001 From: NYSBC-Rudra <133771854+NYSBC-Rudra@users.noreply.github.com> Date: Thu, 13 Jun 2024 12:12:16 -0400 Subject: [PATCH 3/3] updating setting resolution text to correctly output --- gui/control_main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/control_main.py b/gui/control_main.py index 4806d0fb..96a03715 100644 --- a/gui/control_main.py +++ b/gui/control_main.py @@ -596,7 +596,8 @@ def createSampleTab(self): self.resolution_ledit.setValidator(QtGui.QDoubleValidator()) self.resolution_ledit.textEdited[str].connect(self.resoTextChanged) if daq_utils.beamline == "nyx": - self.resolution_ledit.setEnabled(True) + self.resolution_ledit.setEnabled(False) + #self.resolution_ledit.setReadOnly(True) detDistLabel = QtWidgets.QLabel("Detector Dist.") #detDistLabel.setAlignment(QtCore.Qt.AlignCenter) detDistRBLabel = QtWidgets.QLabel("Readback:") @@ -2570,7 +2571,7 @@ def detDistTextChanged(self, text): try: reso_s = "%.2f" % ( daq_utils.calc_reso( - daq_utils.det_radius, + float(daq_utils.det_radius), float(text), daq_utils.energy2wave(float(self.energy_ledit.text())), 0,