From 695eac3706459db65c2fb690d2c7e5f8fe77e3bc Mon Sep 17 00:00:00 2001 From: x01dc Date: Thu, 17 Sep 2026 13:46:27 +0200 Subject: [PATCH] docs(flomni): document fermat_asymmetry's effective x/y spacing Add an intuitive spacing table (x spacing stays at step, y spacing becomes step/fermat_asymmetry) with a worked example, derived from measuring actual generated positions (area-per-point vs. point count, averaged over 20 randomized draws per ratio) rather than just stating the formula. Mirrored into the OMNY port TODO so the same relationship gets documented there once ported. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Lx3KffiFyyDMKT8vvPENUW --- .../omny/AI_docs/TODO_fermat_asymmetry_port.md | 12 ++++++++++++ docs/user/ptychography/flomni.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/csaxs_bec/bec_ipython_client/plugins/omny/AI_docs/TODO_fermat_asymmetry_port.md b/csaxs_bec/bec_ipython_client/plugins/omny/AI_docs/TODO_fermat_asymmetry_port.md index dd5684e4..140f989b 100644 --- a/csaxs_bec/bec_ipython_client/plugins/omny/AI_docs/TODO_fermat_asymmetry_port.md +++ b/csaxs_bec/bec_ipython_client/plugins/omny/AI_docs/TODO_fermat_asymmetry_port.md @@ -13,6 +13,18 @@ symmetric, keeps x spacing fixed at `step` and scales y spacing by the ratio while preserving the requested FOV. Soft-clamped to `[0.1, 10]` (with a `logger.warning` when clamped), same style as `zshift`/`corridor_size`. +**Effective spacing (verified against generated data, see +`docs/plans/flomni-fermat-asymmetry.md`'s conversation for the measurement +method):** x spacing always stays at `step`; y spacing becomes `step / +fermat_asymmetry`. E.g. with `step=1 um`, `fovx=fovy=10 um`: `fermat_asymmetry=0.7` +-> x spacing 1.0 um, y spacing ~1.43 um (sparser), ~70 points; +`fermat_asymmetry=1.3` -> x spacing 1.0 um, y spacing ~0.77 um (denser), +~130 points. Point count scales with the ratio since the FOV is fixed but +the density isn't. Same relationship should be documented for OMNY once +ported (Flomni's user doc has this table -- see +`docs/user/ptychography/flomni.md`, "Effective spacing with +`fermat_asymmetry`" -- OMNY's equivalent doc, if any, should get the same). + ## Important: compose with the already-ported sub-step randomization Before this, `fixes/flomni_beamtime_2` already ported a *different* fix to diff --git a/docs/user/ptychography/flomni.md b/docs/user/ptychography/flomni.md index 4bc4fba7..932cf613 100644 --- a/docs/user/ptychography/flomni.md +++ b/docs/user/ptychography/flomni.md @@ -234,6 +234,18 @@ The basic scan function can be called by `scans.flomni_fermat_scan()` and offers Example: `scans.flomni_fermat_scan(fovx=10, fovy=10, cenx=0, ceny=0, step=1, fermat_asymmetry=1.0, zshift=0, angle=0, exp_time=0.1, frames_per_trigger=1, burst_at_each_point=1)` +**Effective spacing with `fermat_asymmetry`:** the x spacing always stays at `step`; +the y spacing becomes `step / fermat_asymmetry`. So with `step=1 um`: + +| fermat_asymmetry | x spacing | y spacing | points (fovx=fovy=10 um example) | +| --- | --- | --- | --- | +| 0.7 | 1.0 um | ~1.43 um (sparser) | ~70 | +| 1.0 (default) | 1.0 um | 1.0 um | ~100 | +| 1.3 | 1.0 um | ~0.77 um (denser) | ~130 | + +The requested FOV stays exactly as specified either way -- only the point density +(and therefore the point count and scan duration) changes. + The Fermat spiral's sub-step phase is also randomized on every projection (drawn fresh per scan, not user-configurable) to decorrelate position-tied reconstruction errors that would otherwise accumulate into ring artifacts across a tomographic