feat(lamni): min-projection smear composite for absorption contrast
CI for csaxs_bec / test (push) Failing after 2m55s

The smear rotation-center aid built a max-projection composite, which suits
bright features on a dark background. On the X-ray eye the sample shows up
in absorption (dark on bright), and a max-projection washes those features
out because every pixel sees the bright background at some point during the
rotation.

Add projection="min"|"max" to _smear_sweep(),
find_rotation_center_smear_experimental() and
lamni.xrayeye_rotation_center_calibration_smear_experimental(), defaulting
to "min". Invalid values raise before any motion; the choice is stored in
the calibration HDF5. User and developer docs updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
x12saandClaude Opus 5.5 committed 2026-10-12 18:34:28 +02:00
1 parent 447c51dae9
commit af83afeed4
5 files changed
+93 -16

No files matched your search

+12 -2
View File
@@ -123,9 +123,19 @@ stepping the motor:
finish.
2. A plain loop polls `report.status` (exactly what `ScanReport.wait()` does
internally) and, while it isn't `"COMPLETED"`, grabs a frame via
`get_last_image()` and folds it into a running `np.maximum` composite —
`get_last_image()` and folds it into a running composite —
all single-threaded, since the rotation is progressing concurrently on
the server regardless of what the client does between polls.
the server regardless of what the client does between polls. The
composite is `np.minimum` for `projection="min"` (default; absorption
contrast, dark features on a bright background) or `np.maximum` for
`projection="max"` (bright features on a dark background). A
max-projection is useless for absorption: the bright background passes
every pixel at some point during the rotation and washes the dark
features out. Taking the minimum is equivalent to inverting the frames,
taking the maximum and inverting back, without needing the camera's
full-scale value. The value is validated up front (`ValueError` before
any motion) and stored as the `projection` attribute in the calibration
HDF5.
3. Every `display_update_interval_s`, the current composite is pushed to
`smear_preview` so the operator watches it grow; off-axis features trace
arcs as the sample turns, and the common center of curvature of those