Add manual beamline selection (for development)
This commit is contained in:
@@ -136,7 +136,7 @@ class DigitalTwin(BECWidget, QWidget):
|
||||
widget_layout.setSpacing(0)
|
||||
widget_layout.addWidget(self.content_widget)
|
||||
self.setWindowTitle("Digital Twin")
|
||||
self.resize(1450, 760)
|
||||
self.resize(1450, 950)
|
||||
|
||||
self.input.energy.value_changed_connect(self.calc_assistant)
|
||||
self.input.sldi_hacc.value_changed_connect(self.calc_assistant)
|
||||
@@ -219,7 +219,17 @@ class DigitalTwin(BECWidget, QWidget):
|
||||
case _:
|
||||
raise ValueError(f"Not implemented beamline {beamline}")
|
||||
else:
|
||||
raise ValueError(f"Failed to extract beamline from bec server hostname {bec_hostname}")
|
||||
logger.warning(f"Failed to extract beamline from bec server hostname {bec_hostname}")
|
||||
choice = input("Do you want to manually select a beamline? (yes/no): ").strip().lower()
|
||||
if choice in ["yes", "y"]:
|
||||
bl = input(f"Choose from: {[bl.value for bl in BeamlineId]}")
|
||||
if bl in BeamlineId:
|
||||
logger.info(f'Manually selected beamline {bl}')
|
||||
return BeamlineId(bl)
|
||||
else:
|
||||
raise ValueError(f'Wrong selection {bl}')
|
||||
else:
|
||||
raise ValueError('Cannot open digital twin without a beamline')
|
||||
|
||||
@SafeSlot()
|
||||
def check_bec_config(self, *args):
|
||||
|
||||
Reference in New Issue
Block a user