5 Commits
Author SHA1 Message Date
leonarski_fandClaude Opus 5 92a615085d grid scan: the snake reverses on the acquisition row, not the display row
GetElementPosFast_step took the snake parity from GetElementPosSlow_step,
which is the DISPLAY row: it is the acquisition row r = image / n_fast,
flipped to (n_slow-1) - r when the slow step is negative. So for a negative
slow step the parity it hands back is parity(n_slow-1) XOR parity(r), and
with an even n_slow that is inverted on every row - the whole raster comes
out mirrored along the fast axis. An odd n_slow leaves it correct, so the
same scan collected with 20 or 25 images disagreed about where image 0 sat:
n_fast=5, fast +1.5 um, slow -2.5 um, snake on gives images 0..4 at fast
index 4,3,2,1,0 with 4 rows and 0,1,2,3,4 with 5 rows. A positive slow step
was correct at both counts, and so was every non-snake configuration.

Snake means the stage reverses direction on alternate rows in acquisition
order, so the parity has to come from the acquisition row. Taking it from
image_number / n_fast directly makes the fast index independent of the slow
axis and of the row count, and drops the call into the display-row function
that caused the coupling. vertical_scan only relabels which axis is fast, so
it was wrong in exactly the same way and is fixed by the same line.

Affected files: written by an affected build, with snake on, a negative
grid slow step (step_y for a horizontal scan, step_x for a vertical one),
and an even number of rows. Their /entry/sample/transformations/grid_scan_x
or _y is mirrored along the fast axis, as was the grid map in the frontend
and the viewer - both mirrored together, which is why neither showed it.

Tests: the interaction of snake with the step signs was never asserted, only
each in isolation, so add a table over snake x {+,- fast step} x {+,- slow
step} x {even, odd row count} x {horizontal, vertical} asserting positions,
plus a case running one affected configuration through GetXContainer_m /
GetYContainer_m and Rearrange. Every pre-existing assertion is unchanged and
still passes; only the four negative-slow, even-row cells of the product
move.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFEJG6WBQv8th4UJFNe53N
2026-09-02 10:57:15 +02:00
leonarski_f 95acf3aba3 v1.0.0-rc.104 (#9)
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 9m17s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 10m9s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 7m29s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 8m52s
Build Packages / Generate python client (push) Successful in 25s
Build Packages / Build documentation (push) Successful in 49s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 8m47s
Build Packages / build:rpm (rocky8) (push) Successful in 8m49s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 7m4s
Build Packages / build:rpm (rocky9) (push) Successful in 8m52s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 8m11s
Build Packages / Unit tests (push) Successful in 1h14m42s
This is an UNSTABLE release.

jfjoch_writer: Fix and improve the way grid scan geometry is saved (non-NXmx extension makes it way easier)
jfjoch_viewer: Display grid scan results in 2D (work in progress)
jfjoch_viewer: Improve auto-scaling on start of images (work in progress)
jfjoch_viewer: Add B-factor and resolution estimate to the dataset info plots

Reviewed-on: #9
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
2025-11-19 17:28:10 +01:00
leonarski_f b59a03ff02 v1.0.0-rc.44 2025-06-15 17:46:46 +02:00
leonarski_f 80251cc5b8 v1.0.0-rc.43 2025-06-13 16:00:50 +02:00
leonarski_f 53c90ee5d8 v1.0.0-rc.40 2025-05-28 18:49:27 +02:00