-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MX Energy Scan GUI changes #223
base: master
Are you sure you want to change the base?
Conversation
…consume sample tab transmission ledits
* 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
@@ -3670,6 +3670,18 @@ def calcLifetimeCB(self): | |||
self.sampleLifetimeReadback_ledit.setText(lifeTime_s) | |||
self.sampleLifetimeReadback_ledit.setStyleSheet("color : green"); | |||
|
|||
def setEscanTransCB(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should have been with the previous commit so that you have a cohesive change where you can check the callback while having the GUI connection
@@ -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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any fundamental difference between this and setTransCB? couldn't you refactor setTransCB so it can work with this?
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it make sense to show the escan readback? it is the same PV as "normal" transmission, so they should be the same, right?
@@ -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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so you remove the eScan protocol as an option from the combo box but add it back in text? can you explain why you did this?
maybe you can show me how the user is supposed to do the escan (which screens to go to, how to start, etc.) and then maybe it will become more obvious to me how this is supposed to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct, it is unusual. EScan is removed from the combo box list while on the main screen, so it can not be found with the "findText" when you queue from the e-scan tab. It does not appear on the list, instead the combo box on the main screen shows a blank when you switch back.
Overall it prevents you from queueing e-scans from the main tab and automatically applies it as the selected type when on the e-scan tab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that it's hacking the protocol system and the combo box.
can you do something like have a callback monitor for the combo box, then bring up the eScan tab when that protocol is selected?
@@ -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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the transmission in the escan interface the same as in the main collection area? what is different about it?
some more explanation would help me understand the logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention is that the setpoint is different for each tab, but the RBV has a duplicate label to allow it to be displayed on both tabs.
GUI updates for the energy scan tab, omitted the changes edwin declined (we are not ready for resizing)