docs(omny): TODO for filter check and missing eye/optics gate
CI for csaxs_bec / test (push) Failing after 2m3s
CI for csaxs_bec / test (push) Failing after 2m3s
Notes for the OMNY branch: 1) port the filter-out-of-beam check (added for flomni/lamni in the previous commit, shared helper already in OMNY_shared/filter_check.py) into omny.py's tomo_scan()/ tomo_scan_projection(); 2) OMNY.tomo_scan() has no eye-out/optics-in precondition check at all, unlike Flomni/LamNI's - a pre-existing, unrelated gap noticed while investigating the filter check. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018CUx5yV1iCBhL5sFEHEoPe
This commit is contained in:
1 parent
7d64b49918
commit
a457865768
1 file changed
+46
@@ -0,0 +1,46 @@
|
||||
# TODO: OMNY is missing two pre-scan safety checks that flomni/LamNI now have
|
||||
|
||||
Both items below were found while implementing a filter-out-of-beam check for
|
||||
flomni and LamNI (branch `flomni_fixes_during_beamtimes`). OMNY was deliberately
|
||||
left out of that work to avoid conflicting with other in-progress OMNY changes on
|
||||
a separate branch — do both of these there.
|
||||
|
||||
## 1. Filter-out-of-beam check (new feature, not yet on OMNY at all)
|
||||
|
||||
flomni (`flomni.py`) and LamNI (`lamni.py`) now warn hard if any of the four cSAXS
|
||||
exposure-box filters (`filter_array_1_x` … `filter_array_4_x`) are not at their "out"
|
||||
position before a scan starts. The check itself is already shared/reusable:
|
||||
|
||||
- `csaxs_bec/bec_ipython_client/plugins/OMNY_shared/filter_check.py`
|
||||
- `filters_out_of_beam(dev, tol=0.1) -> (bool, list[str])`
|
||||
- `warn_and_confirm(setup, warning, interactive=True, force=False) -> bool` — red
|
||||
warning + "Continue anyway?" prompt (default no) when interactive; warning + 10s
|
||||
pause + always-proceed when not (for unattended/queued runs).
|
||||
|
||||
To wire it into OMNY, mirror what was done in `flomni.py`/`lamni.py`:
|
||||
|
||||
- `OMNY.tomo_scan()` (`omny.py:1005`): add a check at the top, right where
|
||||
`Flomni.tomo_scan()`/`LamNI.tomo_scan()` now have theirs — note OMNY's
|
||||
`tomo_scan()` currently has **no `interactive`/`force` params at all** (OMNY has no
|
||||
tomo-queue, see item 2 below, so there's no unattended-run case to support yet);
|
||||
just call `warn_and_confirm(self, warning, interactive=True, force=False)`.
|
||||
- `OMNY.tomo_scan_projection()` (`omny.py:1244`): currently `def
|
||||
tomo_scan_projection(self, angle: float)` — no `_internal` flag. Add
|
||||
`_internal: bool = False`, gate the filter check on `not _internal`, and raise
|
||||
`OMNYError` on decline (same rationale as flomni/LamNI: a bare `return` inside a
|
||||
per-angle loop can silently drop a projection). Update its internal call sites to
|
||||
pass `_internal=True`: `_at_each_angle()` (`omny.py:1166`) and the loop call at
|
||||
`omny.py:893`.
|
||||
|
||||
## 2. Missing eye-out/optics-in check (pre-existing gap, unrelated to filters)
|
||||
|
||||
Discovered independently while researching the filter check: `Flomni.tomo_scan()`
|
||||
and `LamNI.tomo_scan()` both hard-warn if `_check_eye_out_and_optics_in()` fails
|
||||
(X-ray eye IN / optics OUT is not a valid measurement configuration). **`OMNY.tomo_scan()`
|
||||
(`omny.py:1005`) has no equivalent check at all** — there's no OMNY-side
|
||||
`_check_eye_out_and_optics_in()`, and nothing calls one. Worth adding the same gate,
|
||||
following `flomni_optics_mixin.py`/`lamni_optics_mixin.py`'s
|
||||
`_check_eye_out_and_optics_in()` implementations as the template (device names will
|
||||
differ for OMNY's axes).
|
||||
|
||||
Not scoped/designed further here — just flagging it so it isn't lost.
|
||||
Reference in new issue
Block a user