From 4bf481dd5c319e6da99e27819e463ab8ab0e7bda Mon Sep 17 00:00:00 2001 From: Michael Skinner Date: Mon, 2 May 2022 08:29:30 -0700 Subject: [PATCH 1/6] removed escan from protocol list --- lsdcGui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsdcGui.py b/lsdcGui.py index 39abeff2..87ff9146 100755 --- a/lsdcGui.py +++ b/lsdcGui.py @@ -2029,7 +2029,7 @@ def createSampleTab(self): self.protoOtherRadio = QtWidgets.QRadioButton("other") self.protoOtherRadio.setEnabled(False) self.protoRadioGroup.addButton(self.protoOtherRadio) - protoOptionList = ["standard","screen","raster","vector","burn","eScan","rasterScreen","stepRaster","stepVector","multiCol","characterize","ednaCol","specRaster"] # these should probably come from db + protoOptionList = ["standard","screen","raster","vector","burn","rasterScreen","stepRaster","stepVector","multiCol","characterize","ednaCol","specRaster"] # these should probably come from db self.protoComboBox = QtWidgets.QComboBox(self) self.protoComboBox.addItems(protoOptionList) self.protoComboBox.activated[str].connect(self.protoComboActivatedCB) From 7c4226b9026716a7d202ba05d3c64d41ffd3e262 Mon Sep 17 00:00:00 2001 From: Michael Skinner Date: Mon, 2 May 2022 09:00:32 -0700 Subject: [PATCH 2/6] adds transmission to escan interface --- lsdcGui.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lsdcGui.py b/lsdcGui.py index 87ff9146..afdaa4e4 100755 --- a/lsdcGui.py +++ b/lsdcGui.py @@ -2490,6 +2490,15 @@ def createSampleTab(self): tempPlotButton.clicked.connect(self.queueEnScanCB) clearEnscanPlotButton = QtWidgets.QPushButton("Clear") clearEnscanPlotButton.clicked.connect(self.clearEnScanPlotCB) + escanTransmissionLabel = QtWidgets.QLabel("Transmission") + self.transmissionReadback_ledit = self.transmissionReadback.getEntry() + escanTransmissionSPLabel = QtWidgets.QLabel("SetPoint:") + self.escan_transmission_ledit = self.transmissionSetPoint.getEntry() + self.escan_transmission_ledit.returnPressed.connect(self.setEScanTransCB) + hBoxEScanButtons.addWidget(escanTransmissionLabel) + hBoxEScanButtons.addWidget(self.transmissionReadback_ledit) + hBoxEScanButtons.addWidget(escanTransmissionSPLabel) + hBoxEScanButtons.addWidget(self.escan_transmission_ledit) hBoxEScanButtons.addWidget(clearEnscanPlotButton) hBoxEScanButtons.addWidget(tempPlotButton) escanStepsLabel = QtWidgets.QLabel("Steps") From 7addc0322eb65c3b67846d5877e1ca424f27d934 Mon Sep 17 00:00:00 2001 From: Michael Skinner Date: Mon, 2 May 2022 09:03:12 -0700 Subject: [PATCH 3/6] adds transmission input callback for energy scan page --- lsdcGui.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lsdcGui.py b/lsdcGui.py index afdaa4e4..3af82bde 100755 --- a/lsdcGui.py +++ b/lsdcGui.py @@ -3670,6 +3670,18 @@ def calcLifetimeCB(self): self.sampleLifetimeReadback_ledit.setText(lifeTime_s) self.sampleLifetimeReadback_ledit.setStyleSheet("color : green"); + def setEscanTransCB(self): + try: + if (float(self.escan_transmission_ledit.text()) > 1.0 or float(self.escan_transmission_ledit.text()) < 0.001): + self.popupServerMessage("Transmission must be 0.001-1.0") + return + except ValueError as e: + self.popupServerMessage("Please enter a valid number") + return + comm_s = "setTrans(" + str(self.escan_transmission_ledit.text()) + ")" + logger.info(comm_s) + self.send_to_server(comm_s) + def setTransCB(self): if (float(self.transmission_ledit.text()) > 1.0 or float(self.transmission_ledit.text()) < 0.001): From 72a10a9ea8ad22933b11bb9b7e486345b24356fd Mon Sep 17 00:00:00 2001 From: Michael Skinner Date: Wed, 4 May 2022 17:02:52 -0400 Subject: [PATCH 4/6] Add PV connections for escan transmission ledits so that it does not consume sample tab transmission ledits --- lsdcGui.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lsdcGui.py b/lsdcGui.py index 3af82bde..249614d7 100755 --- a/lsdcGui.py +++ b/lsdcGui.py @@ -1908,15 +1908,21 @@ def createSampleTab(self): if (daq_utils.beamline == "fmx"): if (getBlConfig("attenType") == "RI"): self.transmissionReadback = QtEpicsPVLabel(daq_utils.pvLookupDict["RI_Atten_SP"],self,60,3) + self.escan_transmissionReadback = QtEpicsPVLabel(daq_utils.pvLookupDict["RI_Atten_SP"],self,60,3) self.transmissionSetPoint = QtEpicsPVEntry(daq_utils.pvLookupDict["RI_Atten_SP"],self,60,3) + self.escan_transmissionSetPoint = QtEpicsPVEntry(daq_utils.pvLookupDict["RI_Atten_SP"],self,60,3) colTransmissionLabel = QtWidgets.QLabel('Transmission (RI) (0.0-1.0):') else: self.transmissionReadback = QtEpicsPVLabel(daq_utils.pvLookupDict["transmissionRBV"],self,60,3) + self.escan_transmissionReadback = QtEpicsPVLabel(daq_utils.pvLookupDict["transmissionRBV"],self,60,3) self.transmissionSetPoint = QtEpicsPVEntry(daq_utils.pvLookupDict["transmissionSet"],self,60,3) + self.escan_transmissionSetPoint = QtEpicsPVEntry(daq_utils.pvLookupDict["transmissionSet"],self,60,3) colTransmissionLabel = QtWidgets.QLabel('Transmission (BCU) (0.0-1.0):') else: self.transmissionReadback = QtEpicsPVLabel(daq_utils.pvLookupDict["transmissionRBV"],self,60,3) + self.escan_transmissionReadback = QtEpicsPVLabel(daq_utils.pvLookupDict["transmissionRBV"],self,60,3) self.transmissionSetPoint = QtEpicsPVEntry(daq_utils.pvLookupDict["transmissionSet"],self,60,3) + self.escan_transmissionSetPoint = QtEpicsPVEntry(daq_utils.pvLookupDict["transmissionSet"],self,60,3) colTransmissionLabel = QtWidgets.QLabel('Transmission (0.0-1.0):') self.transmissionReadback_ledit = self.transmissionReadback.getEntry() @@ -2491,12 +2497,12 @@ def createSampleTab(self): clearEnscanPlotButton = QtWidgets.QPushButton("Clear") clearEnscanPlotButton.clicked.connect(self.clearEnScanPlotCB) escanTransmissionLabel = QtWidgets.QLabel("Transmission") - self.transmissionReadback_ledit = self.transmissionReadback.getEntry() + self.escan_transmissionReadback_ledit = self.transmissionReadback.getEntry() escanTransmissionSPLabel = QtWidgets.QLabel("SetPoint:") - self.escan_transmission_ledit = self.transmissionSetPoint.getEntry() + self.escan_transmission_ledit = self.escan_transmissionSetPoint.getEntry() self.escan_transmission_ledit.returnPressed.connect(self.setEScanTransCB) hBoxEScanButtons.addWidget(escanTransmissionLabel) - hBoxEScanButtons.addWidget(self.transmissionReadback_ledit) + hBoxEScanButtons.addWidget(self.escan_transmissionReadback_ledit) hBoxEScanButtons.addWidget(escanTransmissionSPLabel) hBoxEScanButtons.addWidget(self.escan_transmission_ledit) hBoxEScanButtons.addWidget(clearEnscanPlotButton) From 8f19756ac7ef9757251394406706b0fe82663bc0 Mon Sep 17 00:00:00 2001 From: Michael Skinner Date: Wed, 4 May 2022 17:34:52 -0400 Subject: [PATCH 5/6] fixed inconsistency with capitalization on escan transmission callback --- lsdcGui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsdcGui.py b/lsdcGui.py index 249614d7..2e8b9042 100755 --- a/lsdcGui.py +++ b/lsdcGui.py @@ -3676,7 +3676,7 @@ def calcLifetimeCB(self): self.sampleLifetimeReadback_ledit.setText(lifeTime_s) self.sampleLifetimeReadback_ledit.setStyleSheet("color : green"); - def setEscanTransCB(self): + def setEScanTransCB(self): try: if (float(self.escan_transmission_ledit.text()) > 1.0 or float(self.escan_transmission_ledit.text()) < 0.001): self.popupServerMessage("Transmission must be 0.001-1.0") From b271d2190c3461d7a3d1da8d77ec491591270b0a Mon Sep 17 00:00:00 2001 From: Michael Skinner Date: Thu, 5 May 2022 15:56:20 -0400 Subject: [PATCH 6/6] Queue Requests button from the Energy Scan tab works. * It writes eScan to the protocol box on the Sample Control Tab * It would be a significant effort to change the functionality to bypass this --- lsdcGui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsdcGui.py b/lsdcGui.py index 2e8b9042..b313c767 100755 --- a/lsdcGui.py +++ b/lsdcGui.py @@ -3061,7 +3061,7 @@ def processSampMove(self,posRBV,motID): self.vecLine.setLine(self.vectorStart["graphicsitem"].x()+self.vectorStart["centerCursorX"]+self.centerMarkerCharOffsetX,self.vectorStart["graphicsitem"].y()+self.vectorStart["centerCursorY"]+self.centerMarkerCharOffsetY,self.vectorEnd["graphicsitem"].x()+self.vectorStart["centerCursorX"]+self.centerMarkerCharOffsetX,self.vectorEnd["graphicsitem"].y()+self.vectorStart["centerCursorY"]+self.centerMarkerCharOffsetY) def queueEnScanCB(self): - self.protoComboBox.setCurrentIndex(self.protoComboBox.findText(str("eScan"))) + self.protoComboBox.setCurrentText("eScan") self.addRequestsToAllSelectedCB() self.treeChanged_pv.put(1)