wip
This commit is contained in:
@@ -211,7 +211,7 @@ class InputPanel(QWidget):
|
||||
)
|
||||
else:
|
||||
self.table = ComboBox("table", "Sample Position", ["ES1", "ES2"])
|
||||
self.smpl_group = Group("Sample Position", [self.ot_es1_trz, self.es1man_trz])
|
||||
self.smpl_group = Group("Sample Position", [self.es1man_trz])
|
||||
|
||||
# Assemble complete assistant group
|
||||
self.input_group = Group(
|
||||
|
||||
@@ -12,6 +12,19 @@ class MyListWidget(QListWidget):
|
||||
copyPressed = Signal()
|
||||
pastePressed = Signal()
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.setStyleSheet("""
|
||||
QListWidget::item {
|
||||
border-bottom: 1px solid #444444;
|
||||
padding: 4px;
|
||||
}
|
||||
QListWidget::item:selected {
|
||||
background-color: #3a3a3a;
|
||||
border-bottom: 1px solid #444444;
|
||||
}
|
||||
""")
|
||||
|
||||
def keyPressEvent(self, event):
|
||||
if event.key() == Qt.Key_Delete and self.currentItem() is not None:
|
||||
self.deletePressed.emit()
|
||||
|
||||
@@ -482,8 +482,8 @@ class Scheduler(BECWidget, QWidget):
|
||||
text = (
|
||||
f"XAS simple scan from {item.form_state['kwargs']['start']} eV to "
|
||||
+ f"{item.form_state['kwargs']['stop']} eV, {item.form_state['kwargs']['scan_time']}"
|
||||
+ f" s per spectrum, measure {item.form_state['kwargs']['scan_duration']}s. "
|
||||
+ f"Comment: {item.form_state['kwargs']['metadata']['comment']}, "
|
||||
+ f" s per spectrum, measure {item.form_state['kwargs']['scan_duration']}s"
|
||||
+ f"\n Comment: {item.form_state['kwargs']['metadata']['comment']}, "
|
||||
+ f"Sample Name: {item.form_state['kwargs']['metadata']['sample_name']}"
|
||||
)
|
||||
elif re.match(r"^dev\..*\.move", item.command):
|
||||
@@ -504,13 +504,32 @@ class Scheduler(BECWidget, QWidget):
|
||||
elif item.command.startswith("digital_twin.move_with_config({"):
|
||||
config = item.form_state["config"]
|
||||
if config["mo1_mode"] == "Monochromatic":
|
||||
text = f"Align Beamline for {config['energy']} eV"
|
||||
text = f"Align Beamline for {config['energy']:.0f} eV"
|
||||
else:
|
||||
text = "Align Beamline for pinkbeam"
|
||||
text += f" (CM: {config['cm_stripe']} at {config['cm_pitch']*1e3} mrad"
|
||||
text += (
|
||||
f"\n FE: {config['h_acc']*1e3:.3f} mrad x {config['v_acc']*1e3:.3f} mrad"
|
||||
+ f"\n CM: {config['cm_stripe']} at {config['cm_pitch']*1e3:.3f} mrad"
|
||||
)
|
||||
if config["mo1_mode"] == "Monochromatic":
|
||||
text += f", MO1: {config['mo1_xtal']}"
|
||||
text += f", FM: {config['fm_stripe']} at {config['fm_rotx']*1e3} mrad)"
|
||||
text += f"\n MO1: {config['mo1_xtal']}"
|
||||
text += f"\n FM: {config['fm_stripe']} at {config['fm_rotx']*1e3:.3f} mrad"
|
||||
if self.beamline == "x01da":
|
||||
text += f"\n ES1: {config['ot_es1_trz']:.0f} mm"
|
||||
text += f"\n SMPL_TRZ: {config['es1man_trz']:.3f} mm"
|
||||
if self.beamline == "x01da":
|
||||
text += f"\n SMPL-XRD: {config['smpl_to_xrd']:.3f} mm"
|
||||
elif item.command.startswith("auto_gain.start("):
|
||||
config = item.form_state
|
||||
text += f"Auto-configure gains for {item.form_state['element']}, {item.form_state['edge']}-edge"
|
||||
devices = ""
|
||||
for device in ["ic0", "ic1", "ic2", "pips"]:
|
||||
if config[device] is True:
|
||||
if len(devices) == 0:
|
||||
devices += f"\n for devices: {device}"
|
||||
else:
|
||||
devices += f", {device}"
|
||||
text += devices
|
||||
if text == "":
|
||||
text = f"{item.command}"
|
||||
if item.error:
|
||||
|
||||
Reference in New Issue
Block a user