From df7c90c5d72f0430077954dcef65aff35bd2d505 Mon Sep 17 00:00:00 2001 From: x12sa Date: Sun, 13 Sep 2026 21:56:15 +0200 Subject: [PATCH] docs(omny): document manual tomo_alignment_fit offset nudge Port the flomni doc addition to omny -- both setups share the identical tomo_alignment_fit mechanism (OMNYAlignmentMixin.get_alignment_offset mirrors Flomni's), so the same command-line offset nudge applies verbatim. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01FFeiCHv3qUxxssmP9Qzhom --- docs/user/ptychography/omny.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/user/ptychography/omny.md b/docs/user/ptychography/omny.md index e910c811..28af106d 100644 --- a/docs/user/ptychography/omny.md +++ b/docs/user/ptychography/omny.md @@ -378,6 +378,21 @@ The loading routine uses default values for the vertical alignment for setup. Th At each projection, the angular dependent is computed by `omny.get_alignment_offset(angle)`, with _angle_ in degrees. +To manually nudge the alignment by a few microns without recording a new fit, +edit the constant offset term of the currently loaded fit directly: +```python +fit = omny.client.get_global_var("tomo_alignment_fit") +fit[0][2] += 5.0 # x offset, microns +fit[1][2] += 3.0 # y offset, microns +omny.client.set_global_var("tomo_alignment_fit", fit) +``` +`tomo_alignment_fit` is a 2x5 list (row 0 = x, row 1 = y); column 2 in each +row is the constant offset of the sinusoidal fit +(`correction = A*sin(angle + phase) + offset [+ 3rd-order term for y]`), so +changing it shifts the correction by that amount at every angle without +touching the fitted amplitude/phase. Check the result with +`omny.get_alignment_offset(angle)`. + The alignment can be cleared by `omny.reset_tomo_alignment_fit()`