Skip to content

Docs: thin stacks underestimate Z drift, in Fiji Fast4DReg too - #8

Merged
guijacquemet merged 1 commit into
mainfrom
claude/keen-mendel-ekvei7
Nov 17, 2026
Merged

guijacquemet merged 1 commit into
mainfrom
claude/keen-mendel-ekvei7

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

The docs said Z drift "may not be found" on stacks of about 10 slices or fewer. Measured more carefully, it is underestimated, and the original Fiji macro gives exactly the same numbers. So this is a property of the method, not of the Python port.

Test movie, true Z drift 0, 1, 2, 1 slices Fiji Fast4DReg Fast4DRegPy
Smooth texture, 10 slices 0, 0.02, 0.03, 0.02 0, 0.02, 0.03, 0.02
Beads, 10 slices 0, 0.74, 1.65, 0.74 0, 0.74, 1.65, 0.74
Smooth texture, 20 slices 0, 0.99, 1.99, 0.99 0, 0.99, 1.99, 0.99

Why. The side view of a 10-slice stack is 10 rows tall before stretching. Its top and bottom edges and its brightness profile along Z don't move with the drift, and a drift of 1–2 slices replaces 10–20% of the view. Both pull the correlation peak towards zero: tapering the edges with a Hann window moves the peak from 0 to 7 of the expected 12 px. NanoPyx alone finds shifts correctly on images of the same size.

Changes. README rule 3, docs/workflow.md (the explanation and the table), docs/troubleshooting.md, and lc_tests wording. No code change.


Generated by Claude Code

The docs said Z drift 'may not be found' on about 10 slices or fewer.
Measured: it is underestimated, by a quarter to a half for beads and down
to almost zero for smooth texture, and the original Fiji macro gives the
same numbers on the same movies (0.02 / 0.74 / 0.99 for a true drift of
1 slice on smooth 10-slice, bead 10-slice and smooth 20-slice movies).
The side view of a thin stack is a few rows tall; its fixed edges and Z
profile pull the correlation peak towards zero. workflow.md explains
it, with the table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Scma6VXx7mT1FYsKmB1184
@guijacquemet
guijacquemet merged commit fff183e into main Nov 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants