daily startup procedure for pxiii

This commit is contained in:
x06da committed 2026-10-04 16:55:55 +02:00
1 parent 5ad7ad8e1b
commit 6880f46467
5 files changed
+40 -63

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 KiB

@@ -0,0 +1,20 @@
timestamp,energy_eV,pitch_offset,flux_ph_s,beam_start_x_px,beam_start_y_px,vfm_mot_start_mm,hfm_mot_start_mm,vfm_mot_final_mm,hfm_mot_final_mm,beam_final_x_um,beam_final_y_um,vfm_y_mm,vfm_mot_mm,vfm_pitch_mrad,hfm_x_mm,hfm_mot_mm,hfm_pitch_mrad
2026-10-04T11:48:55,,,,,,,,,,,,-6.56761,-4.49412,-4.49412,1.69982,4.00179,4.00179
2026-10-04T11:49:50,,,,,,,,,,,,-6.56762,-4.49413,-4.49413,1.69983,4.00173,4.00173
2026-10-04T11:51:15,,,,,,,,,,,,-6.56762,-4.49411,-4.49411,1.69983,4.00179,4.00179
2026-10-04T11:59:42,,,,,,,,,,,,-6.56761,-4.49412,-4.49412,1.69983,4.00175,4.00175
2026-10-04T12:06:37,,,,,,,,,,,,-6.56761,-4.49412,-4.49412,1.69983,4.00168,4.00168
2026-10-04T12:22:06,,,,,,,,,,,,-6.56761,-4.49408,-4.49408,1.69984,4.00169,4.00169
2026-10-04T13:01:57,12000,0.002,,,,,,,,,,-6.56762,-4.49412,-4.49412,1.69982,4.00174,4.00174
2026-10-04T13:04:00,13000,0.000,,,,,,,,,,-6.56762,-4.49410,-4.49410,1.69982,4.00190,4.00190
2026-10-04T13:10:56,,,,,,,,,,,,-6.56762,-4.49412,-4.49412,1.69983,4.00171,4.00171
2026-10-04T13:14:14,13000,0.002,,,,,,,,,,-6.56762,-4.49412,-4.49412,1.69981,4.00190,4.00190
2026-10-04T14:15:43,13000,0.002,,,,,,,,1061.7,1044.3,-6.56762,-4.49412,-4.49412,1.69983,4.00179,4.00179
2026-10-04T14:37:30,13001,0.002,,,,,,,,2.4,-14.4,-6.56763,-4.49408,-4.49408,1.69982,4.00192,4.00192
2026-10-04T15:33:27,13001,0.002,,,,,,,,6.2,5.7,-6.70411,-6.86825,-4.49421,1.69988,0.31495,4.00179
2026-10-04T15:35:07,13001,0.002,,,,,,,,6.1,4.9,-6.30518,-6.07005,-4.49449,1.69997,0.67211,4.00190
2026-10-04T15:36:06,13001,0.002,,,,,,,,,,-5.90622,-5.27207,-4.49506,1.70006,1.03838,4.00166
2026-10-04T15:46:37,13001,0.002,,,,,,,,0.2,0.8,-6.58864,-6.63734,-4.49435,1.69981,-0.04983,4.00191
2026-10-04T16:06:54,13001,0.002,,,,,,,,-3.3,0.2,-6.58865,-6.63733,-4.49432,1.69984,-0.04999,4.00172
2026-10-04T16:10:07,13001,0.002,,,,,,,,-0.1,-0.3,-6.58865,-6.63734,-4.49436,1.69983,-0.04991,4.00177
2026-10-04T16:12:45,13001,0.002,,,,,,,,-2.1,-0.8,-6.58866,-6.63735,-4.49437,1.69983,-0.04986,4.00193
1 timestamp energy_eV pitch_offset flux_ph_s beam_start_x_px beam_start_y_px vfm_mot_start_mm hfm_mot_start_mm vfm_mot_final_mm hfm_mot_final_mm beam_final_x_um beam_final_y_um vfm_y_mm vfm_mot_mm vfm_pitch_mrad hfm_x_mm hfm_mot_mm hfm_pitch_mrad
2 2026-10-04T11:48:55 -6.56761 -4.49412 -4.49412 1.69982 4.00179 4.00179
3 2026-10-04T11:49:50 -6.56762 -4.49413 -4.49413 1.69983 4.00173 4.00173
4 2026-10-04T11:51:15 -6.56762 -4.49411 -4.49411 1.69983 4.00179 4.00179
5 2026-10-04T11:59:42 -6.56761 -4.49412 -4.49412 1.69983 4.00175 4.00175
6 2026-10-04T12:06:37 -6.56761 -4.49412 -4.49412 1.69983 4.00168 4.00168
7 2026-10-04T12:22:06 -6.56761 -4.49408 -4.49408 1.69984 4.00169 4.00169
8 2026-10-04T13:01:57 12000 0.002 -6.56762 -4.49412 -4.49412 1.69982 4.00174 4.00174
9 2026-10-04T13:04:00 13000 0.000 -6.56762 -4.49410 -4.49410 1.69982 4.00190 4.00190
10 2026-10-04T13:10:56 -6.56762 -4.49412 -4.49412 1.69983 4.00171 4.00171
11 2026-10-04T13:14:14 13000 0.002 -6.56762 -4.49412 -4.49412 1.69981 4.00190 4.00190
12 2026-10-04T14:15:43 13000 0.002 1061.7 1044.3 -6.56762 -4.49412 -4.49412 1.69983 4.00179 4.00179
13 2026-10-04T14:37:30 13001 0.002 2.4 -14.4 -6.56763 -4.49408 -4.49408 1.69982 4.00192 4.00192
14 2026-10-04T15:33:27 13001 0.002 6.2 5.7 -6.70411 -6.86825 -4.49421 1.69988 0.31495 4.00179
15 2026-10-04T15:35:07 13001 0.002 6.1 4.9 -6.30518 -6.07005 -4.49449 1.69997 0.67211 4.00190
16 2026-10-04T15:36:06 13001 0.002 -5.90622 -5.27207 -4.49506 1.70006 1.03838 4.00166
17 2026-10-04T15:46:37 13001 0.002 0.2 0.8 -6.58864 -6.63734 -4.49435 1.69981 -0.04983 4.00191
18 2026-10-04T16:06:54 13001 0.002 -3.3 0.2 -6.58865 -6.63733 -4.49432 1.69984 -0.04999 4.00172
19 2026-10-04T16:10:07 13001 0.002 -0.1 -0.3 -6.58865 -6.63734 -4.49436 1.69983 -0.04991 4.00177
20 2026-10-04T16:12:45 13001 0.002 -2.1 -0.8 -6.58866 -6.63735 -4.49437 1.69983 -0.04986 4.00193
@@ -0,0 +1,20 @@
def create_daily_setup():
dock = bec.gui.new("DailySetup")
plot1 = dock.new(widget="Waveform", object_name= "Plot_1")
plot2 = dock.new(widget="Waveform", object_name= "Plot_2", where="bottom")
plot3 = dock.new(widget="Waveform", object_name= "Plot_3", where="bottom")
plot4 = dock.new(widget="Waveform", object_name= "Plot_4", where="bottom")
log = dock.new(widget="TextBox", object_name= "Info", where="left")
progress = dock.new(widget="TextBox", object_name= "Progress", where="left")
dock.set_layout_ratios(
horizontal=[1,2,1],
vertical=[1,1,1,1],
)
progress.set_plain_text("")
log.set_plain_text("")
dock.save_profile()
-63
View File
@@ -1,63 +0,0 @@
"""Used for checking device positions match current state"""
class DeviceMatcher:
"""Class for checking device positions match current state"""
def __init__(self):
self._rules = {}
def register(self, device_name, func):
"""Register a matching function for a device."""
self._rules[device_name] = func
def matches(self, device_name, device, expected):
"""Return True if device matches expected state."""
if expected is None:
return True # "don't care"
if device_name in self._rules:
return self._rules[device_name](device, expected)
# default fallback
return device.is_at(expected)
def explain(self, device_name, device, expected):
"""Return True if device matches expected state."""
val = device.readback.get()
if device_name in self._rules:
ok = self._rules[device_name](device, expected)
else:
ok = device.is_at(expected)
return ok, val
def nonzero_is_on(device, expected, eps=1e-6):
"""Define that anything > 0 is on"""
val = device.actual
if expected == "off":
return abs(val) < eps
if expected == "on":
return val > eps
return abs(val - expected) < eps
# def threshold_rule(param_name):
# def _rule(device, expected):
# val = device.actual
#
# if expected == param_name:
# threshold = device.position
# return val >= threshold
#
# return device.is_at(expected)
#
# return _rule
#
#
# def within_tolerance(tol):
# def _rule(device, expected):
# val = device.readback.get()
# return abs(val - expected) < tol
#
# return _rule
Binary file not shown.