updated beamline environment, planner and position devices

This commit is contained in:
x06da committed 2026-10-04 16:54:35 +02:00
1 parent 31778c0b51
commit 5ad7ad8e1b
13 files changed
+176 -2382

No files matched your search

@@ -44,5 +44,6 @@ if _args.session.lower() == "alignment":
bec._ip.prompts.username = _session_name
bec._ip.prompts.status = 1
#d, planner = init_beamline_environment()
from pxiii_bec.scripts import beamline_context as bl
bl.initialise()
+66 -62
View File
@@ -9,7 +9,7 @@ contextMenuPolicy=@Variant(\0\0\0\x7f\0\0\0\x16Qt::ContextMenuPolicy\0\0\0\0\x1)
cursor=@Variant(\0\0\0J\0\0)
enabled=true
focusPolicy=@Variant(\0\0\0\x7f\0\0\0\x10Qt::FocusPolicy\0\0\0\0\0)
geometry=@Rect(0 23 1670 1505)
geometry=@Rect(0 23 2020 1130)
inputMethodHints=@Variant(\0\0\0\x7f\0\0\0\x14Qt::InputMethodHint\0\0\0\0\0)
layoutDirection=@Variant(\0\0\0\x7f\0\0\0\x14Qt::LayoutDirection\0\0\0\0\0)
maximumSize=@Size(16777215 16777215)
@@ -27,10 +27,10 @@ windowFilePath=
windowModality=@Variant(\0\0\0\x7f\0\0\0\x13Qt::WindowModality\0\0\0\0\0)
windowModified=false
windowOpacity=1
windowTitle=BEC - TestLayout4
windowTitle=BEC - DailySetup
workspace_is_locked=false
[BECDockArea.ads%3A%3ACDockManager.ads%3A%3ACDockSplitter.ads%3A%3ACDockSplitter.ads%3A%3ACDockAreaWidget.Info.dockWidgetScrollArea.qt_scrollarea_viewport.Info]
[BECDockArea.ads%3A%3ACDockManager.ads%3A%3ACDockSplitter.ads%3A%3ACDockAreaWidget.Info.dockWidgetScrollArea.qt_scrollarea_viewport.Info]
acceptDrops=false
accessibleDescription=
accessibleIdentifier=
@@ -41,14 +41,46 @@ contextMenuPolicy=@Variant(\0\0\0\x7f\0\0\0\x16Qt::ContextMenuPolicy\0\0\0\0\x1)
cursor=@Variant(\0\0\0J\0\0)
enabled=true
focusPolicy=@Variant(\0\0\0\x7f\0\0\0\x10Qt::FocusPolicy\0\0\0\0\0)
geometry=@Rect(0 0 816 1426)
html_text="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><meta charset=\"utf-8\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\nhr { height: 1px; border-width: 0; }\nli.unchecked::marker { content: \"\\2610\"; }\nli.checked::marker { content: \"\\2612\"; }\n</style></head><body style=\" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Starting daily beamline setup</p>\n<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ Machine current OK (401.8 mA)</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ Beamline is not offline, (operation mode is attended)</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ FE shutter is open</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ Hutch shutter is open</p>\n<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ SS Xray eye is OUT</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ Cryostream temperature: 99.96 K</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ Detector height: 62.0 mm</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ Beamstop blocking beam: I2 = 8.76e-09</p>\n<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ Beamline energy set to 12400 eV</p>\n<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ Beam aligned</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Displacement: Beam X: -0.1 microns, Beam Y: -0.3 microns</p>\n<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ Flux measured</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Intensity at current transmission: 8.62e+11 ph/s</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Intensity at 100% transmission: 8.53e+12 ph/s</p>\n<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Total duration: 39.7 s</p></body></html>"
geometry=@Rect(0 0 996 1051)
html_text="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><meta charset=\"utf-8\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\nhr { height: 1px; border-width: 0; }\nli.unchecked::marker { content: \"\\2610\"; }\nli.checked::marker { content: \"\\2612\"; }\n</style></head><body style=\" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;\">\n<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"
inputMethodHints=@Variant(\0\0\0\x7f\0\0\0\x14Qt::InputMethodHint\0\0\0\0\0)
layoutDirection=@Variant(\0\0\0\x7f\0\0\0\x14Qt::LayoutDirection\0\0\0\0\0)
maximumSize=@Size(16777215 16777215)
minimumSize=@Size(640 310)
minimumSize=@Size(0 0)
mouseTracking=false
plain_text="Starting daily beamline setup\n\n✓ Machine current OK (401.8 mA)\n✓ Beamline is not offline, (operation mode is attended)\n✓ FE shutter is open\n✓ Hutch shutter is open\n\n✓ SS Xray eye is OUT\n✓ Cryostream temperature: 99.96 K\n✓ Detector height: 62.0 mm\n✓ Beamstop blocking beam: I2 = 8.76e-09\n\n✓ Beamline energy set to 12400 eV\n\n✓ Beam aligned\nDisplacement: Beam X: -0.1 microns, Beam Y: -0.3 microns\n\n✓ Flux measured\nIntensity at current transmission: 8.62e+11 ph/s\nIntensity at 100% transmission: 8.53e+12 ph/s\n\nTotal duration: 39.7 s"
plain_text=
sizeIncrement=@Size(0 0)
sizePolicy=@Variant(\0\0\0K\0\0\0U)
statusTip=
tabletTracking=false
toolTip=
toolTipDuration=-1
whatsThis=
windowFilePath=
windowModality=@Variant(\0\0\0\x7f\0\0\0\x13Qt::WindowModality\0\0\0\0\0)
windowModified=false
windowOpacity=1
windowTitle=
[BECDockArea.ads%3A%3ACDockManager.ads%3A%3ACDockSplitter.ads%3A%3ACDockAreaWidget.Progress.dockWidgetScrollArea.qt_scrollarea_viewport.Progress]
acceptDrops=false
accessibleDescription=
accessibleIdentifier=
accessibleName=
autoFillBackground=true
baseSize=@Size(0 0)
contextMenuPolicy=@Variant(\0\0\0\x7f\0\0\0\x16Qt::ContextMenuPolicy\0\0\0\0\x1)
cursor=@Variant(\0\0\0J\0\0)
enabled=true
focusPolicy=@Variant(\0\0\0\x7f\0\0\0\x10Qt::FocusPolicy\0\0\0\0\0)
geometry=@Rect(0 0 495 1051)
html_text="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><meta charset=\"utf-8\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\nhr { height: 1px; border-width: 0; }\nli.unchecked::marker { content: \"\\2610\"; }\nli.checked::marker { content: \"\\2612\"; }\n</style></head><body style=\" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;\">\n<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"
inputMethodHints=@Variant(\0\0\0\x7f\0\0\0\x14Qt::InputMethodHint\0\0\0\0\0)
layoutDirection=@Variant(\0\0\0\x7f\0\0\0\x14Qt::LayoutDirection\0\0\0\0\0)
maximumSize=@Size(16777215 16777215)
minimumSize=@Size(0 0)
mouseTracking=false
plain_text=
sizeIncrement=@Size(0 0)
sizePolicy=@Variant(\0\0\0K\0\0\0U)
statusTip=
@@ -69,7 +101,7 @@ accessibleIdentifier=
accessibleName=
autoFillBackground=true
auto_range_x=true
auto_range_y=false
auto_range_y=true
baseSize=@Size(0 0)
color_palette=plasma
contextMenuPolicy=@Variant(\0\0\0\x7f\0\0\0\x16Qt::ContextMenuPolicy\0\0\0\0\x1)
@@ -81,7 +113,7 @@ enable_side_panel=false
enable_toolbar=true
enabled=true
focusPolicy=@Variant(\0\0\0\x7f\0\0\0\x10Qt::FocusPolicy\0\0\0\0\0)
geometry=@Rect(0 0 575 341)
geometry=@Rect(0 0 495 229)
inner_axes=true
inputMethodHints=@Variant(\0\0\0\x7f\0\0\0\x14Qt::InputMethodHint\0\0\0\0\0)
invert_x=false
@@ -92,17 +124,18 @@ lock_aspect_ratio=false
max_dataset_size_mb=10
maximumSize=@Size(16777215 16777215)
minimal_crosshair_precision=3
minimumSize=@Size(384 200)
minimumSize=@Size(0 0)
mouseTracking=false
outer_axes=false
signal_x=dcm_pitch
show_info_label=false
signal_x=
sizeIncrement=@Size(0 0)
sizePolicy=@Variant(\0\0\0K\0\0\0U)
skip_large_dataset_check=false
skip_large_dataset_warning=false
statusTip=
tabletTracking=false
title=Scan: Current
title=
toolTip=
toolTipDuration=-1
whatsThis=
@@ -112,13 +145,13 @@ windowModified=false
windowOpacity=1
windowTitle=
x_grid=false
x_label=dcm_pitch
x_limits=@Variant(\0\0\0\x1a\xc0\x1a\xb0\xb0)(\x17v\xc0\x15\xa0\xc4\x15n&N)
x_label=
x_limits=@Variant(\0\0\0\x1a\0\0\0\0\0\0\0\0?\xf0\0\0\0\0\0\0)
x_log=false
x_mode=dcm_pitch
x_mode=auto
y_grid=false
y_label=lu_bpmsum
y_limits=@Variant(\0\0\0\x1a\xc0g\xe2\xe0\x3|_\x2@\x9d\xf0\x41\x91k\xed@)
y_label=
y_limits=@Variant(\0\0\0\x1a\0\0\0\0\0\0\0\0?\xf0\0\0\0\0\0\0)
y_log=false
[BECDockArea.ads%3A%3ACDockManager.ads%3A%3ACDockSplitter.ads%3A%3ACDockSplitter.ads%3A%3ACDockAreaWidget.Plot_2.dockWidgetScrollArea.qt_scrollarea_viewport.Plot_2]
@@ -140,7 +173,7 @@ enable_side_panel=false
enable_toolbar=true
enabled=true
focusPolicy=@Variant(\0\0\0\x7f\0\0\0\x10Qt::FocusPolicy\0\0\0\0\0)
geometry=@Rect(0 0 575 304)
geometry=@Rect(0 0 495 231)
inner_axes=true
inputMethodHints=@Variant(\0\0\0\x7f\0\0\0\x14Qt::InputMethodHint\0\0\0\0\0)
invert_x=false
@@ -151,9 +184,10 @@ lock_aspect_ratio=false
max_dataset_size_mb=10
maximumSize=@Size(16777215 16777215)
minimal_crosshair_precision=3
minimumSize=@Size(384 200)
minimumSize=@Size(0 0)
mouseTracking=false
outer_axes=false
show_info_label=false
signal_x=
sizeIncrement=@Size(0 0)
sizePolicy=@Variant(\0\0\0K\0\0\0U)
@@ -199,7 +233,7 @@ enable_side_panel=false
enable_toolbar=true
enabled=true
focusPolicy=@Variant(\0\0\0\x7f\0\0\0\x10Qt::FocusPolicy\0\0\0\0\0)
geometry=@Rect(0 0 575 358)
geometry=@Rect(0 0 495 231)
inner_axes=true
inputMethodHints=@Variant(\0\0\0\x7f\0\0\0\x14Qt::InputMethodHint\0\0\0\0\0)
invert_x=false
@@ -210,9 +244,10 @@ lock_aspect_ratio=false
max_dataset_size_mb=10
maximumSize=@Size(16777215 16777215)
minimal_crosshair_precision=3
minimumSize=@Size(384 200)
minimumSize=@Size(0 0)
mouseTracking=false
outer_axes=false
show_info_label=false
signal_x=
sizeIncrement=@Size(0 0)
sizePolicy=@Variant(\0\0\0K\0\0\0U)
@@ -258,7 +293,7 @@ enable_side_panel=false
enable_toolbar=true
enabled=true
focusPolicy=@Variant(\0\0\0\x7f\0\0\0\x10Qt::FocusPolicy\0\0\0\0\0)
geometry=@Rect(0 0 575 294)
geometry=@Rect(0 0 495 231)
inner_axes=true
inputMethodHints=@Variant(\0\0\0\x7f\0\0\0\x14Qt::InputMethodHint\0\0\0\0\0)
invert_x=false
@@ -269,9 +304,10 @@ lock_aspect_ratio=false
max_dataset_size_mb=10
maximumSize=@Size(16777215 16777215)
minimal_crosshair_precision=3
minimumSize=@Size(384 200)
minimumSize=@Size(0 0)
mouseTracking=false
outer_axes=false
show_info_label=false
signal_x=
sizeIncrement=@Size(0 0)
sizePolicy=@Variant(\0\0\0K\0\0\0U)
@@ -298,38 +334,6 @@ y_label=
y_limits=@Variant(\0\0\0\x1a\0\0\0\0\0\0\0\0?\xf0\0\0\0\0\0\0)
y_log=false
[BECDockArea.ads%3A%3ACDockManager.ads%3A%3ACDockSplitter.ads%3A%3ACDockSplitter.ads%3A%3ACDockAreaWidget.Progress.dockWidgetScrollArea.qt_scrollarea_viewport.Progress]
acceptDrops=false
accessibleDescription=
accessibleIdentifier=
accessibleName=
autoFillBackground=true
baseSize=@Size(0 0)
contextMenuPolicy=@Variant(\0\0\0\x7f\0\0\0\x16Qt::ContextMenuPolicy\0\0\0\0\x1)
cursor=@Variant(\0\0\0J\0\0)
enabled=true
focusPolicy=@Variant(\0\0\0\x7f\0\0\0\x10Qt::FocusPolicy\0\0\0\0\0)
geometry=@Rect(0 0 256 1416)
html_text="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><meta charset=\"utf-8\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\nhr { height: 1px; border-width: 0; }\nli.unchecked::marker { content: \"\\2610\"; }\nli.checked::marker { content: \"\\2612\"; }\n</style></head><body style=\" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ Pre checks</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ Set energy</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ Move beam</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">– Align beamstop</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">– Align collimator</p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">✓ Measure flux</p></body></html>"
inputMethodHints=@Variant(\0\0\0\x7f\0\0\0\x14Qt::InputMethodHint\0\0\0\0\0)
layoutDirection=@Variant(\0\0\0\x7f\0\0\0\x14Qt::LayoutDirection\0\0\0\0\0)
maximumSize=@Size(16777215 16777215)
minimumSize=@Size(256 310)
mouseTracking=false
plain_text=✓ Pre checks\n✓ Set energy\n✓ Move beam\n– Align beamstop\n– Align collimator\n✓ Measure flux
sizeIncrement=@Size(0 0)
sizePolicy=@Variant(\0\0\0K\0\0\0U)
statusTip=
tabletTracking=false
toolTip=
toolTipDuration=-1
whatsThis=
windowFilePath=
windowModality=@Variant(\0\0\0\x7f\0\0\0\x13Qt::WindowModality\0\0\0\0\0)
windowModified=false
windowOpacity=1
windowTitle=
[BECDockArea.dockSettingsAction]
autoRepeat=true
checkable=false
@@ -348,13 +352,13 @@ toolTip=Dock settings
whatsThis=
[Perspectives]
1\Name=BEC - TestLayout4
1\State="@ByteArray(\0\0\x3:x\xda\x95\x92\xdfO\x83\x30\x10\xc7\xdf\xfd+.}\x9f@\xcb\x94%\xc0\xb2`\x96\xf8\xe2\x8f\xb0\xe9\xa3\x41\x38I#\xb4\xa6\xed\x16\x35\xfe\xf1\x16\xb6\x10\xa3\x65\x91\x87\xa6\xbd\xef]?\xed\xf7r\xf1\xf2\xbdm`\x8fJs)\x12\x12\x9c\xfb\x4P\x94\xb2\xe2\xa2N\xc8v\xb3\x9e\x45\x64\x99\xc6\xf7\x66U\xed\vQbu%\xcbW\x9b\xcb?\xb4\xc1\x16\x1e\x86\x8b\x4\xb6\x1a\xd5\x10[L&\x85)\xb8\xb0J\x97N\xe3!\x86u#\v\xd3?\xe0[=\x7fk\xb8\x31V\xbeU\x1cm\x89\xe9\x1_\x1d`'LB\xe8?kV\n\v\xd8\x14\xcf\xfds\x90\xed\x94\xc2.u\xa7\x64\xadPk[\xf1\xc8\xab\x1a\r\xdc\x14-\xfe\xd0!k\xa4\xc6\xaa\xfb\x8c\x97\xc6^\x87\x19\x85]\x8b\x17\xf9\x1b\xd4kNH\xce?Q\xa7t\x1e@D)\xc4\xde!\xb6\xfb\xd1\xcd\x98\xaf\xd9\xe0+<\xe1\xab\x91\xe6)\xf8\xe3\xea\xa0N\xf1\xd4_\xa1N\x10\x9d\xe\x62N\x10\x9b\xe\n\x9d\xa0\xf0T\xa7\xd9\xe5\x5\x30\xb6\0\xb6`\xc0\xe8\xc2\xdd\xf1^\t\xfc(\x80\xb9]\xae\x12o\x98T{\x1e\x99\xfc\xf4\xec\x1b\xd0\xbb\tD)"
1\Name=BEC - DailySetup
1\State="@ByteArray(\0\0\x2\xf8x\xda\x95\x92KK\xc4\x30\x14\x85\xf7\xfe\x8aK\xf6\x63\x9f\x16\x17m\x87\xa1\x32\xe0\xc6\a3\xa3K\x89\xed\xb5\x4\xdb\x44\x92\xcc\xa0\xe2\x8f\x37\xc9h\x10M\x85.B\x92sO\xbe{\xb8\xa4\\\xbe\x8e\x3\x1cP*&xE\x92\xd3\x98\0\xf2Vt\x8c\xf7\x15\xd9m\xd7\x8bs\xb2\xac\xcb[\xbd\xea\xe\x94\xb7\xd8]\x88\xf6\xd9\xd4\x36oJ\xe3\bw\xfe!\x81\x9d\x42\xe9\xef\x6\xd3\b\xae)\xe3\x46\xb1\xe5\xba\xf4wX\xf\x82j\xd7 6\xfa\xe6\x65`Z\x1b\xf9Z24\x16\xed\0\x1f\x16\xb0\xe7\xba\"\x99\xf1\xac$R\xd8\xd2G\x87\x82\x66/%\xda\xd2\x8d\x14\xbd\x44\xa5\x8c\xe3\x9eu=j\xb8\xa2#\xfe\xd0\xa1\x19\x84\xc2\xce\x36\x8a\xea\x32\xb2\x98I\xd8%\x7f\x12\xbf\x41N\vB\xc2\xa9\x17>u\xfeO\xea\x41\xe8\x87\xe4O\xe6\xa3:'\xb1{\x92\x6\x41\xe9|P\x16\x4\x65\xf3\x41y\x10\x94O\xcc\x91\xbd\xa3\xaa\xd3\"\x87\xb4(\xfc*\xa3\xa3n\xf6\xaf\x39\x7f;\xcf\xe2\x4\x92\x38N\xc1\x1e\x42\xb6\xc8\xff\x33s\x9e\xf8\xb7\xf5\xc9'\xbb\x8d\xf2\xce)"
size=1
[mainWindow]
DockingState="@ByteArray(\0\0\x3:x\xda\x95\x92\xdfO\x83\x30\x10\xc7\xdf\xfd+.}\x9f@\xcb\x94%\xc0\xb2`\x96\xf8\xe2\x8f\xb0\xe9\xa3\x41\x38I#\xb4\xa6\xed\x16\x35\xfe\xf1\x16\xb6\x10\xa3\x65\x91\x87\xa6\xbd\xef]?\xed\xf7r\xf1\xf2\xbdm`\x8fJs)\x12\x12\x9c\xfb\x4P\x94\xb2\xe2\xa2N\xc8v\xb3\x9e\x45\x64\x99\xc6\xf7\x66U\xed\vQbu%\xcbW\x9b\xcb?\xb4\xc1\x16\x1e\x86\x8b\x4\xb6\x1a\xd5\x10[L&\x85)\xb8\xb0J\x97N\xe3!\x86u#\v\xd3?\xe0[=\x7fk\xb8\x31V\xbeU\x1cm\x89\xe9\x1_\x1d`'LB\xe8?kV\n\v\xd8\x14\xcf\xfds\x90\xed\x94\xc2.u\xa7\x64\xadPk[\xf1\xc8\xab\x1a\r\xdc\x14-\xfe\xd0!k\xa4\xc6\xaa\xfb\x8c\x97\xc6^\x87\x19\x85]\x8b\x17\xf9\x1b\xd4kNH\xce?Q\xa7t\x1e@D)\xc4\xde!\xb6\xfb\xd1\xcd\x98\xaf\xd9\xe0+<\xe1\xab\x91\xe6)\xf8\xe3\xea\xa0N\xf1\xd4_\xa1N\x10\x9d\xe\x62N\x10\x9b\xe\n\x9d\xa0\xf0T\xa7\xd9\xe5\x5\x30\xb6\0\xb6`\xc0\xe8\xc2\xdd\xf1^\t\xfc(\x80\xb9]\xae\x12o\x98T{\x1e\x99\xfc\xf4\xec\x1b\xd0\xbb\tD)"
Geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\x17\0\0\x6\x85\0\0\x5\xf7\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xf\0\0\0\0\0\0\0\0\x17\0\0\x6\x85\0\0\x5\xf7)
DockingState="@ByteArray(\0\0\x2\xf8x\xda\x95\x92KK\xc4\x30\x14\x85\xf7\xfe\x8aK\xf6\x63\x9f\x16\x17m\x87\xa1\x32\xe0\xc6\a3\xa3K\x89\xed\xb5\x4\xdb\x44\x92\xcc\xa0\xe2\x8f\x37\xc9h\x10M\x85.B\x92sO\xbe{\xb8\xa4\\\xbe\x8e\x3\x1cP*&xE\x92\xd3\x98\0\xf2Vt\x8c\xf7\x15\xd9m\xd7\x8bs\xb2\xac\xcb[\xbd\xea\xe\x94\xb7\xd8]\x88\xf6\xd9\xd4\x36oJ\xe3\bw\xfe!\x81\x9d\x42\xe9\xef\x6\xd3\b\xae)\xe3\x46\xb1\xe5\xba\xf4wX\xf\x82j\xd7 6\xfa\xe6\x65`Z\x1b\xf9Z24\x16\xed\0\x1f\x16\xb0\xe7\xba\"\x99\xf1\xac$R\xd8\xd2G\x87\x82\x66/%\xda\xd2\x8d\x14\xbd\x44\xa5\x8c\xe3\x9eu=j\xb8\xa2#\xfe\xd0\xa1\x19\x84\xc2\xce\x36\x8a\xea\x32\xb2\x98I\xd8%\x7f\x12\xbf\x41N\vB\xc2\xa9\x17>u\xfeO\xea\x41\xe8\x87\xe4O\xe6\xa3:'\xb1{\x92\x6\x41\xe9|P\x16\x4\x65\xf3\x41y\x10\x94O\xcc\x91\xbd\xa3\xaa\xd3\"\x87\xb4(\xfc*\xa3\xa3n\xf6\xaf\x39\x7f;\xcf\xe2\x4\x92\x38N\xc1\x1e\x42\xb6\xc8\xff\x33s\x9e\xf8\xb7\xf5\xc9'\xbb\x8d\xf2\xce)"
Geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\x17\0\0\a\xe3\0\0\x4\x80\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xf\0\0\0\0\0\0\0\0\x17\0\0\a\xe3\0\0\x4\x80)
State=@Variant(\0\0\0\x7f\0\0\0\tPyObject\0\0\0\0\xf\x80\x4\x95\x4\0\0\0\0\0\0\0\x43\0\x94.)
[manifest]
@@ -451,7 +455,7 @@ widgets\6\widget_class=TextBox
widgets\size=6
[profile]
created_at=2026-09-27T09:27:43Z
created_at=2026-10-01T14:10:28Z
quick_select=true
screenshot="@ByteArray(\x89PNG\r\n\x1a\n\0\0\0\rIHDR\0\0\x6\x86\0\0\x5\xe1\b\x6\0\0\0\xb7\x5(\x97\0\0\0\tpHYs\0\0\xe\xc4\0\0\xe\xc4\x1\x95+\xe\x1b\0\0 \0IDATx\x9c\xec\xddut\x14\xd7\xfb\xc7\xf1w\x1c\x12\x92\xe0n\xc5\xdd\x83\xb6Xp\xb7\xe0RZ\xac\xb8\x43)R\\\x8a\xbbK\xb1\xe0.-\x85\x1f-\x14)\x14)\xe\xa5XB\bNB\x2\x44v\x7f\x7f\xe4\xcb\x96\x94\x18\xc9\xc6\xe0\xf3:'\xe7$3w\xef}\xb2wv\xf6\xce<3w,\xfc_\x5\x1a\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x91\x8f\x9e\x65|\a \"\"\"\"\"\"\"\"\"\"\"\"qC\x89!\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x91O\x84\x12\x43\"\"\"\"\"\"\"\"\"\"\"\"\x9f\b%\x86\x12\x90{\xf7\x1fq\xef\xfe\xa3\xf8\xe\x43$\xca\xb4\xcd&N\xea\xb7O\x97\xfa^DD\xe4\xc3\xe8\xbbSDDD\x12\x13\x8d]$\xaa\x94\x18\x12\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\xf9\x44(1$\"\"\"\"\"\"\"\"\"\"\"\xf2\x89\xb0\x8e\xef\0\x44\x44\x44\x44\x44\x44\x44\x12;?\xbf\xd7\xf8\xbc\xf4#(\xd8\x10\xdf\xa1\x88\x88\x88\x98\x95\xad\xad\rI\xeclqv\xb4\x8f\xefPD\xc4L\x94\x18\x12\x11\x11\x11\x11\x11\x11\x89\x1\xaf\x87OIjkC\xd6\xcci\xb0\xb6\xd2\xc4\x1c\"\"\xf2qy\xf3&\x90\x17>\xaf\xf0\xb8\xff\x98\xcc\x19S\xc7w8\"1r\xef\xfe#\xb2\x64L\x13\xdf\x61\xc4;%\x86\x44\x44\x44\x44\x44\x44\x44\xa2\xc9\xcf\xef\x35I\xecl\xc8\x90.E|\x87\"\"\"\x12+\xec\xeclH\x9b\xc6\x6+k\xf0\xf3\x7f\x83\x83\xbd]|\x87$\"1\xa4K\x99\x44\x44\x44\x44\x44\x44\x44\xa2\xc9\xe7\xa5\x1fiS;\xc7w\x18\"\"\xf2\t\xbb\xfe\x8fW\x9c\xb4\xe3\xec\xe4\xc0\v\x1f\xbf\x38iKDb\x97\x12\x43\"\"\"\"\"\"\"\xd1\x14\x14l\xd0\xf4q\"\"\xf2I\xb0\xb6\xb2\"\xd8\x10\x1c\xdf\x61\x88\x88\x19h\xf4*\"\"\"\"\"\"\"\"\"\"\xf2\x89\x33\x1a\x8d\x18\x8d\xc6\x38{\x9d\xc4\x1f=cHDDDDDDDDDD\xcc\xc2}\xc3\x66N\x9d>\x13\xe5\xf2\xe5\xca\xba\xd0\xaci\xe3X\x8cH\xa2\xc2h42m\xfal\x8c\x46#\x3\a\xf4\xc1`00x\xe8\b\xdc\x9a\x35\xa6l\x19\x97PeO\x9c<\xc5\xa6\xcd\xdb\x98\x34\x61\f\xd6\xd6VL\x9e\x32\x9d\x37\x1o\x18\x39\xfc[,,,\xcc\x1a\xd3\xac\x39\v\xb8w\xcf#\xd4\xf2,Y2\xd3\xa7\xd7\x37\x66m\xebS\xa3\xc4\x90\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88\x98\xc5\xa9\xd3g\xd8\xbdg\x1f\xb9s\xe5\x8c\xb4\xec\xcb\x97/\xd9\xbc\x65\x1b\xaf\xfc_\xd3\xae]\xabX\x89\xe7\xfa\xb5\x1b\x1c<\xfc+\xdft\xed\x14+\xf5G\xe6\xce\x9d{l\xd8\xb8\x19\xef\x87\x8f(X ?\xad[\xb9\x91$I\x92x\x89%*\xe6\xce_\x84\xd1h\xa4_\xdf^l\xde\xb2\r\x97R%\xdeK\f\xdd\xbe}\x87\xcd[\xb6\x31~\xecH\xa6\xcf\x98\xcd\x82\x45K\xe9\xf1M\x17\xb3\xc7\x32{\xee\x42\x66\xcc\x9c\x43\x81\xfc\xf9\xb0\xb2\xb2\x2\xc0`0\xb0y\xcb\xb6\x90\x18\xfb\xf4\x30{\x9bq-((\x18\x83!\x18[[\xdb\x38mW\x89!\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x31\x9b\xdc\xb9r\xb2s\xfb\x46\x9e<y\x12n\x19'''\xac\xac\xac\x19\x30p(\xc3G\x8d\x1\x30{r\xe8\xfa\xb5\x1b\xb4h\xf3%\xa9\xd3\xa4\xa2\x43\xbb\x36\xd8\xdb'5k\xfd\x91\xb9x\xe9\x32M\xdd\xda\x90\xc4\xce\x8e\xcc\x99\x33\xb1}\xc7N\xb6l\xdd\xce\xb6\xad\xee\xd8\xda\xd8\xc4i,\x91\xb1\xb0\xb0`@\xff\xde\0\xcc\x99\xb7\x90\xc0\xa0\xa0H_3u\xda,\x96,[I\xcf\xee]\x19\x38\xa0O\x8c\xee\xe0\xd9\xbc\x65\x1bK\x97\xaf\x32\xfdm4\xc2\xd5\xab\xd7\xe8\xdd\xb3\x1b\x3\xfa\xf7\tUv\xfa\x8c\xd9\xcc\x9c\x35\x97}?\xfd\x8c\xe5;mv\xfc\xb2=-\xdc\x9a\x44;\x86\xb8\x12\x18\x18\xc4\xa2%\xcb\xd8\xbcy\x1b\xb7\xef\xdc\x65\xd9\xe2\xf9\xb8\xbaV\x8e\xd3\x18\xe2\xed\x19\x43w\xef\xde%[\x8e\xfc\xdc\xbd{7Z\xeb#\xb2s\xd7.j\xd6\xaa\x13\xd3\x10\xe5\x7f\xcaW\xa8\xc4\xfe\xfd\xfb\xa3\xbd^bG\x81\x42\xc5\x39t\xe8P|\x87\x91 \xc5\xf7\x36\xab}\xd0\x87\xd3w\x82\x88\x88\x88\x88\x88\x88\xc8\xc7\xe5\xc9\x93'\x94*S1\xdc\x9f\xbd\xfb~\xc2\xda\xda\x8aiS'\xd1\xa8\x41=\x86\x8f\x1a\xc3\xe6-\xdb\xcc\xd6\xfe\xb5\xab\xd7i\xde\xba\x3\xa9\xd3\xa4\xc2}\xcd\x8a\x38O\n\x1\xfc\x30m\x16\x19\x33\xa4\xe7\xe8\xaf\a\xd8\xb3k\vkW\xaf\xe0\xe2\xa5\xcbl\xdb\xbe+\xce\x63\x89\x8a\xa0\xa0`z\xf6\xe8J\x97N\x1dY\xbc\x64y\xa4\xe5\x97,[I\x97N\x1d\xe9\xd5\xb3\x1b\x41\x41\xc1\x31j\xfb\xe9\xd3g\\\xbbv\x83\xa2\x85\vQ\xb4p!\x8a\x15)D\xbf\xbe\xbd\xe8\xdf\xaf\xf7{e\xfb\xf5\xed\x45\xbf\xbe\xbd(^\xa4\xb0\xa9\xfc\xb5k7\"LD&\x14w\xee\xdc\xa3Q\x93\x16l\xdf\xbe\x93\x9c\x39sP\xa6t\xa9\x38O\n\x81\x99\x13\x43\xfe\xfe\xfe\x64\xcb\x91\x9f\xdcy\v\xf3\xe6\xcd\x1bsV\x1d\xca\xe2\xc5K\xc8\x96#?\xd9r\xe4\xa7@\xa1\xe2|\xf5U'~\xfa\xe9'\f\x6\x43\xac\xb5\xf9\xb1\xe9\xd1\xa3\x17\xd9r\xe4\xe7\xea\xd5\xab\xb1\xd6\xc6\xc9\x93'M\xfd\x94-G~\xea\xd5o\xc4\x88\x11#9{\xf6\xacY\xea\xdf\xb7\x7f?\xed;t$ \xc0,\xf5\xbd\x15\x1c\x1c\xcc\x9e={\x19\x32\x64(\x95*\xbbR\xaf~#\xc6\x8c\x1d\xc7\xcd\x9b\x37\xcd\xda\x8e|\x98\xb8\xd8\x66\xe7\xcc\x99K\xef\xde}\xdf[~\xe4\xc8Q\xb2\xe5\xc8\x1f\xee>\xe6\xd5\xeb\xd7\xb4j\xddV\x89\xba\xff\xf8X\xbf\x13&N\x9c\xc4\x8c\x19\x33\x63\xa5n\x11\x11\x11\xf9\xf8\x5\x4\x4\x90\x36\x63n\xf6\xff\xf4s\xa4\x65\x83\x82\x82\xf9\xea\xeb\xae\xacZ\xb5\x1a\0ooo\xd2\x66\xcc\xcd\xe9\xd3\x7f\xc6v\x98\x11\x32\x18\f<\x7f\xfe\xdc\xec\xc7\x62\xaf_\xbf\x61\xed\xda\xf5|\xdd\xa9\x1b\xc5J\x94\xa7S\xe7o\xf8\xe3\x8fSfm\xe3\x43\xfc\xf7\xfd\x17\x11\x91\xd8\xf1\x36\x39\xf4Y\xf6l\x1c?a\x9e\xfd\xfe\xd5\xab\xd7h\xd1\xe6K\x9e={Fi\x97\x92\xac^\xb3\x9e\x99\xb3\xe6\x86\xfaY\xef\xbe\x89\v\x17/a4\x1a\xcd\xd2\x66Xn\\\xff\x9bj\xaeUptr\x4\xa0l\x19\x17\xd2\xa7K\xc7\xdf\x37\xfe\x8e\xb5\x36\x63\x62\xe8\xb0\x91\xe4-P\x9c\xc5KWD\xf9\x35\x8b\x97\xae o\x81\Line truncated
screenshot_at=2026-09-27T09:27:43Z
screenshot="@ByteArray(\x89PNG\r\n\x1a\n\0\0\0\rIHDR\0\0\a\xe4\0\0\x4j\b\x6\0\0\0q\x99\xcc\xb5\0\0\0\tpHYs\0\0\xe\xc4\0\0\xe\xc4\x1\x95+\xe\x1b\0\0 \0IDATx\x9c\xec\xddwTTG\x1b\xc7\xf1/]@\xc0\xae(\x96\xd8{\xc5\x9e\xd8\x35\xb6\xd8\xb1\xd7\xc4\x16{o\xb1\xc5\xae\xb1\xf7\xde\x62\xc1\xdeK\xa2&\x1a\x93\xa8\xd1h\x8c]c\xd4(\"vAP\xda\xee\xfb\a\xaf\x44\"\x9d\x5\x4\x7f\x9fs<\a\xee\xcc\xce<\xec\xbd\xee\xec\xdc\xe7\xde\xb9\x66~\xaf\x2\x8d\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88I\x99'v\0\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\xc9\x91\x12\xf2\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\xf1@\ty\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x91x\xa0\x84\xfc{\xe4\xee\xfdG\xdc\xbd\xff(\xb1\xc3\x10\x89\x36\x1d\xb3I\x93\xf6\xdb\x87K\xfb^DDD\xe4\xc3\xa0\xef}\"\"\"\"\"\xf1O\xdf\xbb%\xba\x94\x90\x17\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x89\aJ\xc8\x8b\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88\xc4\x3\xcb\xc4\xe@DDDDDDDD\x12\x87\xaf\xefk\xbc_\xfa\x12\x14lH\xecPDDDD\x4\xb0\xb6\xb6\"\x85\x8d\x35N\xev\x89\x1d\x8a\x88\x98\x88\x12\xf2\"\"\"\"\"\"\"\"\x1f \xcf\x87O\xb1\xb5\xb6\"\x9bKz,-\xb4\x88\xa2\x88\x88\x88\xc8\xfb\xc0\xdf?\x90\x17\xde\xaf\xb8w\xff\x31.\x99\xd3%v8\"qr\xf7\xfe#\xb2\x66N\x9f\xd8\x61$:%\xe4\x45\x44\x44\x44\x44\x44\x44\x44>0\xbe\xbe\xafIac\x85s\xc6\xd4\x89\x1d\x8a\x88\x88\x88\x88\xbc\xc5\xc6\xc6\x8a\f\xe9\xad\xb0\xb0\x4_?\x7f\xec\xedl\x12;$\x11\x89#]\xfe,\"\"\"\"\"\"\"\xf2\x81\xf1~\xe9K\x86tN\x89\x1d\x86\x88\x88\x88H\x92s\xfdo\xcf\x4\xe9\xc7\xc9\xd1\x9e\x17\xde\xbe\t\xd2\x97\x88\xc4/%\xe4\x45\x44\x44\x44\x44\x44\x44\x44>0A\xc1\x6-S/\"\"\"\xf2\x1e\xb3\xb4\xb0 \xd8\x10\x9c\xd8\x61\x88\x88\th\xe6%\"\"\"\"\"\"\"\"\"\"\"\"\"\x92\x80\x8c\x46#F\xa3\x31\xc1^'\x89G\xcf\x90\x17\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11I\x82\xdc\x37m\xe5\xf4\x99\xb3\xd1\xae_\xbe\\i\x9a\x35m\x1c\x8f\x11It\x18\x8d\x46\x66\xcc\x9c\x8b\xd1hd\xd0\xc0\xbe\x18\f\x6\x86\f\x1b\x85[\xb3\xc6\x94+[:L\xdd\x93\xa7N\xb3\x65\xeb\xe\xa6L\x1a\x87\xa5\xa5\x5S\xa7\xcd\xc4?\xc0\x9f\xd1#\x87\x63\x66\x66\x66\xd2\x98\xe6\xcc[\xc4\xdd\xbb\xf7\xc2l\xcf\x9a\xd5\x85\xbe\xbd\xbf\x34i_\x1f\x1a%\xe4\x45\x44\x44\x44\x44\x44\x44\x44\x44\x44\x44\x44\x44\x92\xa0\xd3g\xce\xb2w\xdf\x1\xf2\xe4\xce\x15\x65\xdd\x97/_\xb2u\xdb\xe^\xf9\xbd\xa6]\xbbV\xf1\x12\xcf\xf5k78r\xf4\x18_v\xeb\x1c/\xedG\xe5\xce\x9d\xbbl\xda\xbc\x15\xaf\x87\x8f(T\xb0\0\xad[\xb9\x91\"E\x8a\x44\x89%:\xe6/\\\x82\xd1h\xa4\x7f\xbf\xdel\xdd\xb6\x83\xd2\xae%\xdfI\xc8\xdf\xbe}\x87\xad\xdbv0q\xfchf\xce\x9a\xcb\xa2%\xcb\xe9\xf9\x65W\x93\xc7\x32w\xfe\x62\x66\xcd\x9eG\xc1\x2\xf9\xb1\xb0\xb0\0\xc0`0\xb0u\xdb\x8e\x90\x18\xfb\xf6\x34y\x9f\t-((\x18\x83!\x18kk\xeb\x4\xedW\ty\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x91$*O\xee\\\xec\xde\xb9\x99'O\x9e\x44X\xc7\xd1\xd1\x11\v\vK\x6\xe\x1a\xc6\xc8\x31\xe3\0L\x9e\x94\xbf~\xed\x6-\xdat$]\xfa\xb4th\xd7\x6;;[\x93\xb6\x1f\x95\x8b\x97.\xd3\xd4\xad\r)llpq\xc9\xc2\xce]\xbb\xd9\xb6}';\xb6\xbb\x63me\x95\xa0\xb1\x44\xc5\xcc\xcc\x8c\x81\x3\xfa\0\x30o\xc1\x62\x2\x83\x82\xa2|\xcd\xf4\x19sX\xb6\x62\x35\xbdztc\xd0\xc0\xbeq\xba\x63}\xeb\xb6\x1d,_\xb9&\xf4w\xa3\x11\xae^\xbd\x46\x9f^\xdd\x19\x38\xa0o\x98\xba\x33g\xcd\x65\xf6\x9c\xf9\x1c\xf8\xee{\xcc\xdf\xea\xb3S\xc7\xf6\xb4pk\x12\xeb\x18\x12J``\x10K\x96\xad`\xeb\xd6\x1d\xdc\xbe\xf3\xf+\x96.\xa4z\xf5*\t\x1a\x43\xa2=C\xfe\x9f\x7f\xfe!{\xce\x2\xfc\xf3\xcf?\xb1*\x8f\xcc\xee={\xf8\xb4v\xdd\xb8\x86(\xffW\xa1\x62\x65\xe\x1e<\x18\xebr\x89\x1f\x5\v\x97\xe0\x87\x1f~H\xec\x30\xdeK\x89}\xcc\xea\x33(\xe6\x34&\x88\x88\x88\x88\x88\x88\x88\x88\x88\x88\xc4\xde\x93'Op-[)\xc2\x7f\xfb\xf|\x87\xa5\xa5\x5\x33\xa6O\xa1Q\x83\xfa\x8c\x1c\x33\x8e\xad\xdbv\x98\xac\xffkW\xaf\xd3\xbcu\a\xd2\xa5O\x8b\xfb\xbaU\t\x9e\x8c\a\xf8\x66\xc6\x1c\x32;g\xe2\xe7\x63\x87\xd8\xb7g\x1b\xeb\xbf]\xc5\xc5K\x97\xd9\xb1sO\x82\xc7\x12\x1d\x41\x41\xc1\xf4\xea\xd9\x8d\xae\x9d;\xb1t\xd9\xca(\xeb/[\xb1\x9a\xae\x9d;\xd1\xbbWw\x82\x82\x82\xe3\xd4\xf7\xd3\xa7\xcf\xb8v\xed\x6\xc5\x8a\x14\xa6X\x91\xc2\x14/Z\x98\xfe\xfdz3\xa0\x7f\x9fw\xea\xf6\xef\xd7\x9b\xfe\xfdzS\xa2h\x91\xd0\xfa\xd7\xae\xdd\x88\xf4\x2\x90\xf7\xc5\x9d;wi\xd4\xa4\x5;w\xee&W\xae\x9c\x94-\xe3\x9a\xe0\xc9x0qB\xde\xcf\xcf\x8f\xec\x39\v\x90'_\x11\xfc\xfd\xfdM\xd9t\x18K\x97.#{\xce\x2\x64\xcfY\x80\x82\x85K\xf0\xf9\xe7\x9d\xf9\xee\xbb\xef\x30\x18\f\xf1\xd6gr\xd3\xb3go\xb2\xe7,\xc0\xd5\xabW\xe3\xad\x8fS\xa7N\x85\xee\xa7\xec\x39\vP\xff\xb3\x46\x8c\x1a\x35\x9as\xe7\xce\x99\xa4\xfd\x3\a\xf\xd2\xbe\x43'\x2\x2\x2L\xd2\xde\x1b\xc1\xc1\xc1\xec\xdb\xb7\x9f\xa1\x43\x87Q\xb9Ju\xea\x7f\xd6\x88q\xe3'p\xf3\xe6M\x93\xf6#1\x93\x10\xc7\xec\xbcy\xf3\xe9\xd3\xa7\xdf;\xdb\x8f\x1f\xff\x99\xec\x39\vD\xf8\x19\xf3\xea\xf5kZ\xb5n\xab\v$\xfe#\xb9\x8e\t\x93'Oa\xd6\xac\xd9\xf1\xd2\xb6\x88\x88\x88\x88\xc8\xfb* \x80\f\x99\xf3p\xf0\xbb\xef\xa3\xac\x1b\x14\x14\xcc\xe7_tc\xcd\x9ao\x1\xf0\xf2\xf2\"C\xe6<\x9c\x39\xf3{|\x87\x19)\x83\xc1\xc0\xf3\xe7\xcfM~\x1e!\xa1\xfd\xf7\xfd\x15\x11\x11\x11\x89\x89\x37I\xf9\x8frd\xe7\xc4\xc9\xd3&i\xf3\xea\xd5k\xb4h\xd3\x91g\xcf\x9eQ\xa6t)\xbe]\xb7\x91\xd9s\xe6\x87\xf9\xb7\xd1}\v\x17.^\xc2h4\x9a\xa4\xcf\xf0\Line truncated
screenshot_at=2026-10-01T14:10:28Z
+9 -9
View File
@@ -778,15 +778,15 @@ fl_bright:
'on': 3.0
type: continuous
"\u201Ctol\u201D": 0.01
fluorimeter:
description: fluorimeter
deviceClass: pxiii_bec.devices.Fluorimeter
deviceConfig:
prefix: 'X06DA-ES-XRF:'
deviceTags:
- xrf
enabled: true
readoutPriority: on_request
# fluorimeter:
# description: fluorimeter
# deviceClass: pxiii_bec.devices.Fluorimeter
# deviceConfig:
# prefix: 'X06DA-ES-XRF:'
# deviceTags:
# - xrf
# enabled: true
# readoutPriority: on_request
hfm_bd:
description: HFM Downstream Bender
deviceClass: ophyd_devices.EpicsMotorEC
@@ -1,43 +0,0 @@
beam_profile_gaussian:
readoutPriority: baseline
description: Beam location and size based on AD sample camera analysis with gaussiant fitting
deviceClass: pxiii_bec.devices.GaussianBeamProfile
deviceConfig:
prefix: "X06DA-ES-MS:XYP1:"
deviceTags:
- beam
enabled: true
readOnly: false
softwareTrigger: false
beam_profile_centroid:
readoutPriority: baseline
description: Beam location and size based on AD sample camera analysis with centroid analysis
deviceClass: pxiii_bec.devices.CentroidBeamProfile
deviceConfig:
prefix: "X06DA-ES-MS:Stats5:"
deviceTags:
- beam
enabled: true
readOnly: false
softwareTrigger: false
beam_steering:
readoutPriority: on_request
description: Beam location and size based on AD sample camera analysis
deviceClass: pxiii_bec.devices.BeamSteerer
deviceConfig:
prefix: ""
hfm_step_per_x_px: -0.00013
vfm_step_per_y_px: -0.00033
sample_loc_x_px: 1020
sample_loc_y_px: 1010
px_tolerance: 3
step_fraction: 0.7
userParameter:
profile_provider: "beam_profile_centroid" # "centroid" or "gaussian"
deviceTags:
- beam
enabled: true
readOnly: false
softwareTrigger: false
-11
View File
@@ -1,11 +0,0 @@
fluorimeter:
readoutPriority: on_request
description: fluorimeter
deviceClass: pxiii_bec.devices.Fluorimeter
deviceConfig:
prefix: "X06DA-ES-XRF:"
deviceTags:
- xrf
enabled: true
readOnly: false
softwareTrigger: false
@@ -1,213 +0,0 @@
states:
robot_sample_exchange:
allow_modifiers: true
bl_pos: in
bl_bright: 'off'
bs_pos: out
bs_z: safe
coll_y: out
cryo_pos: in
det_cov: 'close'
diag_y: out
fl_bright: 'off'
aerotech_x: in
aerotech_y: mount
aerotech_z: mount
aerotech_u: mount
smargon_x: mount
smargon_y: mount
smargon_chi: mount
smargon_phi: mount
xrf_pos: out
sample_alignment:
allow_modifiers: true
bl_pos: in
bl_bright: 'on'
bs_pos: in
bs_z: safe
coll_y: out
cryo_pos: in
det_cov: 'close'
diag_y: out
fl_bright: 'on'
aerotech_x: in
aerotech_y: work
aerotech_z: work
# aerotech_u: mount
# smargon_x: mount
# smargon_y: mount
# smargon_chi: mount
# smargon_phi: mount
xrf_pos: out
data_collection:
allow_modifiers: true
bl_pos: out
bl_bright: 'off'
bs_pos: in
bs_z: safe
coll_y: in
cryo_pos: in
det_cov: 'open'
diag_y: out
fl_bright: 'on'
aerotech_x: in
aerotech_y: work
aerotech_z: work
# aerotech_u: mount
# smargon_x: mount
# smargon_y: mount
# smargon_chi: mount
# smargon_phi: mount
xrf_pos: out
DC_XRF:
allow_modifiers: true
# bl_pos: out
bl_bright: 'off'
bs_pos: in
bs_z: safe
coll_y: in
cryo_pos: in
det_cov: 'close'
diag_y: out
fl_bright: 'on'
aerotech_x: in
aerotech_y: work
aerotech_z: work
aerotech_u: mount
# smargon_x: mount
# smargon_y: mount
# smargon_chi: mount
# smargon_phi: mount
xrf_pos: in
manual_sample_exchange:
allow_modifiers: true
bl_pos: out
bl_bright: 'off'
bs_pos: out
bs_z: safe
coll_y: park
cryo_pos: in
det_cov: 'close'
diag_y: park
fl_bright: 'off'
aerotech_x: in
aerotech_y: mount
aerotech_z: mount
aerotech_u: mount
smargon_x: mount
smargon_y: mount
smargon_chi: mount
smargon_phi: mount
xrf_pos: out
det_z: 'mse'
beam_visualisation:
bl_pos: out
bl_bright: 'off'
bs_pos: in
bs_z: safe
coll_y: in
cryo_pos: out
det_cov: 'close'
det_z: 'vis'
diag_y: scint
fl_bright: 'off'
aerotech_x: out
aerotech_y: mount
aerotech_z: mount
aerotech_u: mount
smargon_x: mount
smargon_y: mount
smargon_chi: mount
smargon_phi: mount
xrf_pos: out
flux_measurement:
bl_pos: in
bl_bright: 'off'
bs_pos: in
bs_z: safe
coll_y: out
cryo_pos: out
det_cov: 'close'
diag_y: i1
fl_bright: 'off'
aerotech_x: out
aerotech_y: mount
aerotech_z: mount
aerotech_u: mount
smargon_x: mount
smargon_y: mount
smargon_chi: mount
smargon_phi: mount
xrf_pos: out
beamstop_alignment:
bl_pos: out
bl_bright: 'off'
bs_pos: in
bs_z: samp
coll_y: out
cryo_pos: out
det_cov: 'close'
diag_y: out
fl_bright: 'on'
aerotech_x: out
aerotech_y: mount
aerotech_z: mount
aerotech_u: mount
smargon_x: mount
smargon_y: mount
smargon_chi: mount
smargon_phi: mount
xrf_pos: out
maintenance:
allow_modifiers: true
bl_pos: out
bl_bright: 'off'
bs_pos: out
bs_z: safe
coll_y: park
cryo_pos: in
det_cov: 'close'
diag_y: park
fl_bright: 'off'
aerotech_x: out
aerotech_y: mount
aerotech_z: mount
aerotech_u: mount
smargon_x: mount
smargon_y: mount
smargon_chi: mount
smargon_phi: mount
xrf_pos: out
xtal_snapshot:
allow_modifiers: true
bl_pos: in
bl_bright: 'on'
bs_pos: in
bs_z: safe
coll_y: in
cryo_pos: in
det_cov: 'close'
diag_y: out
fl_bright: 'on'
#aerotech_x: in
#aerotech_y: work
#aerotech_z: work
#aerotech_u: mount
#smargon_x: mount
#smargon_y: mount
#smargon_chi: mount
#smargon_phi: mount
xrf_pos: out
File diff suppressed because it is too large. Load diff
@@ -1,130 +0,0 @@
bl_bright:
description: Backlight Brightness
deviceClass: ophyd.EpicsSignal
deviceConfig: {read_pv: 'X06DA-ES-BL:SET', auto_monitor: true}
onFailure: buffer
enabled: True
readoutPriority: baseline
deviceTags:
- state
readOnly: False
softwareTrigger: false
userParameter: {"type": continuous, "on": 1.56, "off": 0, “tol”: 0.01}
bl_pos:
description: Backlight Positioner
deviceClass: ophyd.EpicsSignal
deviceConfig: {read_pv: 'X06DA-ES-BL:POS-SET', auto_monitor: true}
onFailure: buffer
enabled: True
readoutPriority: baseline
deviceTags:
- state
readOnly: False
softwareTrigger: false
userParameter: {"type": discrete, "in": 1, "out": 0}
bs_pos:
description: Beamstop Positioner
deviceClass: ophyd.EpicsSignal
deviceConfig: {read_pv: 'X06DA-ES-BS:POS-SET', auto_monitor: true}
onFailure: buffer
enabled: True
readoutPriority: baseline
deviceTags:
- state
readOnly: False
softwareTrigger: false
userParameter: {"type": discrete, "in": 1, "out": 0}
bs_z:
description: Beamstop Z
deviceClass: ophyd_devices.EpicsMotor
deviceConfig: {prefix: 'X06DA-ES-BS:TRZ'}
onFailure: buffer
enabled: True
readoutPriority: baseline
deviceTags:
- state
readOnly: False
softwareTrigger: false
userParameter: {"type": continuous, "min": 13, "samp": 15, "work_min": 20, "safe": 25, "max_blin": 26, "max_blout": 35}
coll_y:
description: Collimator Y
deviceClass: ophyd_devices.EpicsMotor
deviceConfig: {prefix: 'X06DA-ES-COL:TRY'}
onFailure: buffer
enabled: True
readoutPriority: baseline
deviceTags:
- state
readOnly: False
softwareTrigger: false
userParameter: {"type": continuous, "in": 25.42, "intermediate": 15, "out":5.0, "park": 0,"tol":0.05}
cryo_pos:
description: Cryo Positioner
deviceClass: ophyd.EpicsSignal
deviceConfig: {read_pv: 'X06DA-ES-CS:POS-SET', auto_monitor: true}
onFailure: buffer
enabled: True
readoutPriority: baseline
deviceTags:
- state
readOnly: False
softwareTrigger: false
userParameter: {"type": discrete, "in": 1, "out": 0}
det_cov:
description: Detector Cover
deviceClass: ophyd.EpicsSignal
deviceConfig: {read_pv: 'X06DA-ES-DETCOV:SET', auto_monitor: true}
onFailure: buffer
enabled: True
readoutPriority: baseline
deviceTags:
- state
readOnly: False
softwareTrigger: false
userParameter: {"type": discrete, "open": 2, "close": 1}
diag_y:
description: Scintillator/diode Y
deviceClass: ophyd_devices.EpicsMotor
deviceConfig: {prefix: 'X06DA-ES-SCL:TRY'}
onFailure: buffer
enabled: True
readoutPriority: baseline
deviceTags:
- state
readOnly: False
softwareTrigger: false
userParameter: {"type": continuous, "scint": 22, "i1": 29, "out": 5.0,"park": 0,"tol":0.3}
fl_bright:
description: Frontlight Brightness
deviceClass: ophyd.EpicsSignal
deviceConfig: {read_pv: 'X06DA-ES-FL:SET', auto_monitor: true}
onFailure: buffer
enabled: True
readoutPriority: baseline
deviceTags:
- state
readOnly: False
softwareTrigger: false
userParameter: {"type": continuous, "on": 3.0, "off": 0, “tol”: 0.01}
xrf_pos:
description: XRF Positioner
deviceClass: ophyd.EpicsSignal
deviceConfig: {read_pv: 'X06DA-ES-XRF:POS-SET', auto_monitor: true}
onFailure: buffer
enabled: True
readoutPriority: baseline
deviceTags:
- state
readOnly: False
softwareTrigger: false
userParameter: {"type": discrete, "in": 1, "out": 0}
@@ -1,5 +0,0 @@
base_config:
- !include ./pxiii-devices.yaml
#states_config:
# - !include ./pxiii-state-devices.yaml
+18 -27
View File
@@ -3,6 +3,8 @@
from collections import defaultdict, deque
from enum import Enum
# from pxii_bec.scripts import beamline_context as bl
# from enums import BeamlineState, TemperatureMode
# from matcher import DeviceMatcher, nonzero_is_on
@@ -20,6 +22,7 @@ class BeamlineState(str, Enum):
BEAMSTOP_ALIGNMENT = "beamstop_alignment"
MAINTENANCE = "maintenance"
XTAL_SNAPSHOT = "xtal_snapshot"
DET_DIODE = "det_diode"
class TemperatureMode(str, Enum):
@@ -64,6 +67,10 @@ class StateChangePlanner:
def move_to(self, state_name, modifier=None):
"""Move devices to the correct positions to achieve a given state"""
# Close the fast shutter before moving anything
dev.bcu_shutter.put(0)
if isinstance(state_name, str):
state_name = BeamlineState(state_name)
target = self._merged_state(state_name, modifier)
@@ -75,12 +82,12 @@ class StateChangePlanner:
print(f"Stage {i + 1}: {stage}")
for stage in plan:
for dev, pos in stage:
d = self.devices[dev]
for pd_devs, pos in stage:
d = self.devices[pd_devs]
if not d.is_at(pos):
if self.debug:
print(f"→ Moving {dev} -> {pos}")
print(f"→ Moving {pd_devs} -> {pos}")
# print(" Before:", self.get_states())
try:
@@ -88,14 +95,14 @@ class StateChangePlanner:
except Exception as e:
print(f"Exception occurred: {e}")
print(f"\nFAILED MOVE: {dev} -> {pos}")
print(f"\nFAILED MOVE: {pd_devs} -> {pos}")
print("States at failure:", self.get_positions())
raise
def available_states(self):
"""Return a list of available states"""
return list(self.states.keys())
def state_devices(self):
"""Return the set of devices that participate in
beamline state definitions"""
@@ -104,14 +111,13 @@ class StateChangePlanner:
for state in self.states.values():
devices.update(state.keys())
return sorted(devices)
def get_positions(self):
"""Return current positions of devices that are used
in state transitions"""
return {name: self.devices[name].pos
for name in self.state_devices()}
return {name: self.devices[name].pos for name in self.state_devices()}
def print_positions(self):
"""Return current state of all devices"""
@@ -124,7 +130,7 @@ class StateChangePlanner:
"""Return a dict of {device: (before, after)} pairs for devices that changed state"""
after = self.get_positions()
return {k: (before[k], after[k]) for k in before if before[k] != after[k]}
def __get_closest_states(self):
"""
Return states ordered by number of mismatches.
@@ -141,21 +147,9 @@ class StateChangePlanner:
for dev, expected in config.items():
if not self.devices[dev].is_at(expected):
mismatches.append(
(
dev,
self.devices[dev].pos,
expected,
)
)
mismatches.append((dev, self.devices[dev].pos, expected))
results.append(
(
state.name,
len(mismatches),
mismatches,
)
)
results.append((state.name, len(mismatches), mismatches))
return sorted(results, key=lambda x: x[1])
@@ -166,10 +160,7 @@ class StateChangePlanner:
print(f"\n{state}: {count} mismatch(es)")
for dev, actual, expected in mismatches:
print(
f" {dev:15s} "
f"{actual:10s} -> {expected}"
)
print(f" {dev:15s} " f"{actual:10s} -> {expected}")
def current_state(self):
"""Return all current matching BeamlineState and TemperatureMode combinations,
+33 -124
View File
@@ -1,32 +1,12 @@
"""Build the sample environment devices"""
import os
# from pxii_bec.macros.position_device import PositionDevice, motor_resolver
import yaml
# from position_device import PositionDevice
# from pxii_bec.scripts import beamline_context as bl
def motor_resolver(bec_name):
"""Used to handle aerotech and smargon motors"""
candidates = [bec_name, bec_name.replace("_", ".")]
for path in candidates:
try:
obj = dev
for part in path.split("."):
obj = getattr(obj, part)
return obj
except Exception:
pass
raise ValueError(f"Cannot resolve motor for '{bec_name}'")
def build_devices(yaml_file, mock_devices):
def build_devices(yaml_file):
"""Build devices from the beamline states yaml"""
state_devices = {}
@@ -35,7 +15,6 @@ def build_devices(yaml_file, mock_devices):
data = yaml.safe_load(f)
for bec_name, cfg in data.items():
user = cfg.get("userParameter")
# Skip devices without user parameters
@@ -43,11 +22,9 @@ def build_devices(yaml_file, mock_devices):
continue
if bec_name in ("aerotech", "smargon"):
tol = user.get("tol", 0.01)
for axis in ["x", "y", "z", "u", "chi", "phi"]:
positions = user.get(axis)
if positions is None:
@@ -61,17 +38,16 @@ def build_devices(yaml_file, mock_devices):
positions=positions,
tol=tol,
allow_arbitrary=True,
use_mock=component_name in mock_devices,
)
state_devices[component_name] = pos_dev
else:
tol = user.get("tol", 0.1)
allow_arbitrary = user.get("type") == "continuous"
move_method = user.get("move_method", "motor")
positions = {k: v for k, v in user.items() if k not in ("type", "tol")}
positions = {k: v for k, v in user.items() if k not in ("type", "tol", "move_method")}
pos_dev = PositionDevice(
bec_name=bec_name,
@@ -79,7 +55,7 @@ def build_devices(yaml_file, mock_devices):
positions=positions,
tol=tol,
allow_arbitrary=allow_arbitrary,
use_mock=bec_name in mock_devices,
move_method=move_method,
)
state_devices[bec_name] = pos_dev
@@ -87,15 +63,7 @@ def build_devices(yaml_file, mock_devices):
return state_devices
def update_position(
device,
position,
value,
axis=None,
force=False,
max_delta=0.5,
):
def update_position(device, position, value, axis=None, force=False, max_delta=0.5):
"""
Update a single saved position in memory.
@@ -109,19 +77,14 @@ def update_position(
# Nested device (e.g. aerotech.x.in)
# ------------------------------------------------------------------
if axis is not None:
if axis not in params:
raise KeyError(
f"Unknown axis '{axis}'. "
f"Valid axes: {list(params.keys())}"
)
raise KeyError(f"Unknown axis '{axis}'. Valid axes: {list(params.keys())}")
axis_params = params[axis].copy()
if position not in axis_params:
raise KeyError(
f"Unknown position '{position}'. "
f"Valid positions: {list(axis_params.keys())}"
f"Unknown position '{position}'. Valid positions: {list(axis_params.keys())}"
)
old_value = axis_params[position]
@@ -139,36 +102,22 @@ def update_position(
axis_params[position] = value
device.update_user_parameter(
{axis: axis_params}
)
device.update_user_parameter({axis: axis_params})
print(
f"Updated {device.name}.{axis}.{position}: "
f"{old_value} -> {value}"
)
print(f"Updated {device.name}.{axis}.{position}: {old_value} -> {value}")
return
# ------------------------------------------------------------------
# Flat device (e.g. bs_z)
# ------------------------------------------------------------------
nested_keys = [
k for k, v in params.items()
if isinstance(v, dict)
]
nested_keys = [k for k, v in params.items() if isinstance(v, dict)]
if nested_keys:
raise ValueError(
f"{device.name} has nested parameters "
f"({nested_keys}); specify axis=..."
)
raise ValueError(f"{device.name} has nested parameters ({nested_keys}); specify axis=...")
if position not in params:
raise KeyError(
f"Unknown position '{position}'. "
f"Valid positions: {list(params.keys())}"
)
raise KeyError(f"Unknown position '{position}'. Valid positions: {list(params.keys())}")
old_value = params[position]
@@ -183,31 +132,22 @@ def update_position(
f"Use force=True if intentional."
)
device.update_user_parameter(
{position: value}
)
device.update_user_parameter({position: value})
print(
f"Updated {device.name}.{position}: "
f"{old_value} -> {value}"
)
print(f"Updated {device.name}.{position}: {old_value} -> {value}")
def save_and_reload():
"""
Save current configuration to YAML and rebuild
the beamline environment.
the beamline environment using the same deployment.
"""
bl.initialise()
print(f"(saving changes to {bl.env.devices_file})")
beamline = os.environ["BEAMLINE"]
bec.config.save_current_session(bl.env.devices_file)
env = Environment(beamline=beamline)
print(f"(saving changes to {env.devices_file})")
bec.config.save_current_session(env.devices_file)
return init_beamline_environment()
bl.reload()
def update_positions(updates):
@@ -230,7 +170,6 @@ def update_positions(updates):
"""
for update in updates:
update_position(
device=update["device"],
position=update["position"],
@@ -243,13 +182,7 @@ def update_positions(updates):
return save_and_reload()
def save_current_position(
device,
position,
axis=None,
force=False,
max_delta=0.5,
):
def save_current_position(device, position, axis=None, force=False, max_delta=0.5):
"""
Save the current motor position as a named position.
"""
@@ -258,25 +191,20 @@ def save_current_position(
params = device.user_parameter
if axis is not None:
if axis not in params:
raise KeyError(
f"Unknown axis '{axis}'. "
f"Valid axes: {list(params.keys())}"
)
raise KeyError(f"Unknown axis '{axis}'. Valid axes: {list(params.keys())}")
axis_params = params[axis].copy()
if position not in axis_params:
raise KeyError(
f"Unknown position '{position}'. "
f"Valid positions: {list(axis_params.keys())}"
f"Unknown position '{position}'. Valid positions: {list(axis_params.keys())}"
)
old_value = axis_params[position]
print(f"Old value is {old_value}")
current_value = get_current_value(device, axis=None)
current_value = get_current_value(device, axis)
delta = abs(current_value - old_value)
@@ -291,35 +219,21 @@ def save_current_position(
axis_params[position] = current_value
device.update_user_parameter(
{axis: axis_params}
)
device.update_user_parameter({axis: axis_params})
print(
f"Updated {device.name}.{axis}.{position}: "
f"{old_value} -> {current_value}"
)
print(f"Updated {device.name}.{axis}.{position}: {old_value} -> {current_value}")
return
# ------------------------------------------------------------------
# Flat device (e.g. bs_z)
# ------------------------------------------------------------------
nested_keys = [
k for k, v in params.items()
if isinstance(v, dict)
]
nested_keys = [k for k, v in params.items() if isinstance(v, dict)]
if nested_keys:
raise ValueError(
f"{device.name} has nested parameters "
f"({nested_keys}); specify axis=..."
)
raise ValueError(f"{device.name} has nested parameters ({nested_keys}); specify axis=...")
if position not in params:
raise KeyError(
f"Unknown position '{position}'. "
f"Valid positions: {list(params.keys())}"
)
raise KeyError(f"Unknown position '{position}'. Valid positions: {list(params.keys())}")
old_value = params[position]
current_value = get_current_value(device, axis=None)
@@ -335,14 +249,9 @@ def save_current_position(
f"Use force=True if intentional."
)
device.update_user_parameter(
{position: current_value}
)
device.update_user_parameter({position: current_value})
print(
f"Updated {device.name}.{position}: "
f"{old_value} -> {current_value}"
)
print(f"Updated {device.name}.{position}: {old_value} -> {current_value}")
def get_current_value(device, axis=None):
@@ -359,4 +268,4 @@ def get_current_value(device, axis=None):
signal_name = next(iter(data))
return round(data[signal_name]["value"],3)
return round(data[signal_name]["value"], 8)
+5 -8
View File
@@ -1,23 +1,20 @@
"""
This module manages the initialization of devices."""
#from guards import attach_guards
#from policies import attach_policies
#from build_devices import build_devices
# from guards import attach_guards
# from policies import attach_policies
# from build_devices import build_devices
class DeviceManager:
"""Class for building devices and attaching safety guards and policies."""
@staticmethod
# def initialize_devices(state_devices_file, rest_devices_file, mock_devices):
def initialize_devices(devices_file, mock_devices):
def initialize_devices(devices_file):
"""
Initializes sample environment devices from the specified file.
"""
devices = build_devices(devices_file, mock_devices)
# rest_devices = build_devices(rest_devices_file, mock_devices)
# devices.update(rest_devices)
devices = build_devices(devices_file)
attach_guards(devices)
attach_policies(devices)
return devices
+43 -159
View File
@@ -2,130 +2,28 @@
from dataclasses import dataclass, field
from typing import Callable, List, Dict, Optional, Union
import time
from bec_lib.logger import bec_logger
from bec_lib.device import Device
class SimpleStatus:
"""Makes a mock motor return a status"""
def motor_resolver(bec_name):
"""Used to handle aerotech and smargon motors"""
def __init__(self, motor, target, delay=0.0, success=True, name=""):
self.motor = motor
self.target = target
self.delay = delay
self._success = success
self.name = name
self._done = False
candidates = [bec_name, bec_name.replace("_", ".")]
def wait(self, timeout=None):
start = time.time()
for path in candidates:
try:
obj = dev
while True:
# simulate motion completion
if not self._done:
if time.time() - start >= self.delay:
if self._success:
self.motor.position = self.target
self._done = True
for part in path.split("."):
obj = getattr(obj, part)
if self._done:
if not self._success:
raise RuntimeError(f"Motor {self.name} failed")
return True
return obj
if timeout is not None and (time.time() - start) > timeout:
raise TimeoutError(f"Timeout waiting for {self.name}")
except Exception:
pass
time.sleep(0.01)
class MotorAdapter:
"""Motor adapter for setting up mock/real motors"""
def move(self, pos: float):
"""Move the motor to the given position"""
raise NotImplementedError
def move_with_status(self, pos: float):
"""Move the motor to the given position with a status"""
raise NotImplementedError
def set_fail(self, value: bool):
"""Put the motor into a failure state"""
raise NotImplementedError
@property
def actual(self) -> float:
"""The actual position of the motor"""
raise NotImplementedError
class MockMotorAdapter(MotorAdapter):
"""Motor adapter for mock motors"""
def __init__(self, name: str):
self._motor = PositionDevice.MockMotor(name)
def move(self, pos: float):
"""Move the motor to the given position"""
self._motor.move(pos)
def move_with_status(self, pos: float):
"""Move the motor to the given position with a status"""
if self._motor.fail:
return SimpleStatus(
motor=self._motor,
target=pos,
delay=self._motor.delay,
success=False,
name=self._motor.name,
)
# don't update position immediately
return SimpleStatus(
motor=self._motor,
target=pos,
delay=self._motor.delay,
success=True,
name=self._motor.name,
)
def set_fail(self, value: bool):
"""Put the motor into a failure state"""
self._motor.fail = value
def set_delay(self, value: float):
self._motor.delay = value
@property
def actual(self) -> float:
"""The actual position of the motor"""
return self._motor.position
class RealMotorAdapter(MotorAdapter):
"""Motor adapter for real motors"""
def __init__(self, mot, name):
self._motor = mot
self._name = name
def move(self, pos: float):
"""Move the motor to the given position"""
scans.umv(self._motor, pos, relative=False)
def move_with_status(self, pos: float):
"""Move the motor to the given position with a status"""
return scans.mv(self._motor, pos, relative=False)
def set_fail(self, value: bool):
"""Put the motor into a failure state"""
raise NotImplementedError
@property
def actual(self) -> float:
"""The actual position of the motor"""
return self._motor.read()[self._name]["value"]
raise ValueError(f"Cannot resolve motor for '{bec_name}'")
@dataclass
@@ -140,17 +38,9 @@ class PositionDevice:
guards: List[Callable[[], None]] = field(default_factory=list)
policy: Optional[Callable[[float], None]] = None
allow_arbitrary: bool = False
use_mock: bool = True
move_method: str = "motor"
def __post_init__(self):
if self.use_mock:
self.mot = MockMotorAdapter(self.bec_name)
else:
# real_motor = getattr(dev, self.bec_name)
self.mot = RealMotorAdapter(self.mot_device, self.bec_name)
# self.mot = RealMotorAdapter(real_motor, self.bec_name)
# self.mot = getattr(dev, self.bec_name)
# Normalize position names
self.positions = {k.lower(): v for k, v in self.positions.items()}
@@ -164,11 +54,26 @@ class PositionDevice:
if isinstance(target, str):
name = target.lower()
try:
bec_logger.logger.info(
f"attempting to find position {name} from bec device {self.bec_name} userParameter."
)
bec_device: Device = dev[self.bec_name]
position = bec_device.user_parameter[target]
if name not in self.positions:
raise ValueError(f"Unknown position '{target}'")
bec_logger.logger.info(
f"obtained position {position} - compare to cached value {self.positions.get(target)}"
)
return position
except Exception as e:
bec_logger.logger.debug(
f"Failed to fetch user parameter for device {self.bec_name} and target {target} from bec, falling back to cached position {e}"
)
return self.positions[name]
if name not in self.positions:
raise ValueError(f"Unknown position '{target}'")
return self.positions[name]
if isinstance(target, (float, int)):
if not self.allow_arbitrary:
@@ -186,7 +91,10 @@ class PositionDevice:
if self.policy:
self.policy(pos)
self.mot.move(pos)
if self.move_method == "signal":
self.mot_device.put(pos)
else:
scans.umv(self.mot_device, pos, relative=False)
def mv(self, target: Union[str, float]):
"""move devices with a timeout"""
@@ -198,19 +106,18 @@ class PositionDevice:
if self.policy:
self.policy(pos)
# status.wait(self.device_timeout)
return self.mot.move_with_status(pos)
return scans.mv(self.mot_device, pos, relative=False)
def set_position(self, target: Union[str, float]):
"""Only to be used for testing purposes, bypasses guards"""
pos = self._resolve_target(target)
self.mot.move(pos)
# def set_position(self, target: Union[str, float]):
# """Only to be used for testing purposes, bypasses guards"""
# pos = self._resolve_target(target)
# self.mot.move(pos)
@property
def actual(self) -> float:
"""Return the actual position of the device."""
# return self.mot.read()[self.bec_name]["value"]
return self.mot.actual
return self.mot_device.read()[self.bec_name]["value"]
@property
def pos(self) -> str:
@@ -229,26 +136,3 @@ class PositionDevice:
pos = self._resolve_target(target)
return abs(self.actual - pos) <= self.tol
# -------------------------
# Mock Motor Implementation
# -------------------------
class MockMotor:
"""Mock motor implementation"""
def __init__(self, name: str):
self.name = name
self.position = 0.0
self._target = self.position
self.fail = False
self.delay = 0
#
def move(self, pos: float):
"""Move the motor to the given position."""
if self.fail:
return
# raise RuntimeError(f"Motor {self.name} failed")
time.sleep(self.delay)
self.position = pos