Skip to content

feat: motor stacking, auto-exclude, refined stitching#98

Open
FIrgolitsch wants to merge 1 commit into
mainfrom
pr-e-motor-stacking
Open

feat: motor stacking, auto-exclude, refined stitching#98
FIrgolitsch wants to merge 1 commit into
mainfrom
pr-e-motor-stacking

Conversation

@FIrgolitsch

@FIrgolitsch FIrgolitsch commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Stacked PR 1/22 — review order: #115#97#98#99#100#101#108#106#107#87#116#110#111#40#112#113#117#118#120#121#122#123#124#125

Base: main. Retargets to main as upstream PRs merge.


PR #98 — Motor Stacking & Refined Stitching

Adds motor-based slice stacking and the refined 3D stitching used by the new reconstruction workflow. Two commits: initial feature drop and a follow-up that smooths drift, adds a per-slice reliability flag, and tightens the auto-exclude logic.

New library modules

  • linumpy/stitching/motor.py — motor-only stacking. Adds a transform_source column (motor / registered / motor+refined), a per-slice reliable flag, drift smoothing (bounded low-pass on cumulative motor z), and drift / sigma limits used to gate auto-exclude.
  • linumpy/stitching/stacking.py — enhanced stacking with confidence gating, z-consistency enforcement between neighbouring slice pairs, and configurable drift limits.

New scripts

  • linum_stack_motor_only.py — motor-only stacking CLI
  • linum_stack_slices_motor.py — motor-first stacking with optional registration refinement, drift smoothing, rehoming-aware reset (consumes linum_detect_rehoming output from feat: utility modules, preprocessing improvements, galvo correction #97)
  • linum_stitch_motor_only.py — motor-only stitch driver
  • linum_stitch_3d_refined.py — refined 3D stitching (motor + registration + z-consistency)
  • linum_auto_exclude_slices.py — automatic slice exclusion based on drift / sigma / reliability

Updated scripts

  • linum_stack_slices_3d.py, linum_stack_slices.py, linum_stitch_3d.py — integrated with the new modules
  • linum_align_mosaics_3d_from_shifts.py — consumes the new transform_source column

Tests

  • linumpy/tests/test_stitching_motor.py, test_stitching_stacking.py

@FIrgolitsch FIrgolitsch force-pushed the pr-e-motor-stacking branch from c3092e2 to a82b899 Compare April 17, 2026 22:07
@FIrgolitsch FIrgolitsch force-pushed the pr-e-motor-stacking branch 2 times, most recently from 7a4c344 to 24fa7d7 Compare April 17, 2026 22:15
@FIrgolitsch FIrgolitsch changed the base branch from main to pr-c-utility-preprocessing April 17, 2026 22:22
@FIrgolitsch FIrgolitsch force-pushed the pr-e-motor-stacking branch from 24fa7d7 to dc806fe Compare April 23, 2026 19:43
@FIrgolitsch FIrgolitsch changed the base branch from pr-c-utility-preprocessing to pr-a-build-tooling April 23, 2026 19:57
@FIrgolitsch FIrgolitsch force-pushed the pr-e-motor-stacking branch from dc806fe to 8f1637e Compare April 23, 2026 21:09
@FIrgolitsch FIrgolitsch force-pushed the pr-a-build-tooling branch 2 times, most recently from 82b44be to ce8e35d Compare April 23, 2026 21:23
@FIrgolitsch FIrgolitsch force-pushed the pr-e-motor-stacking branch 2 times, most recently from 7a4dd66 to e939493 Compare April 23, 2026 21:28
@FIrgolitsch FIrgolitsch changed the base branch from pr-a-build-tooling to pr-c-utility-preprocessing April 27, 2026 23:36
@FIrgolitsch FIrgolitsch force-pushed the pr-c-utility-preprocessing branch from 199dd1d to fffe682 Compare April 29, 2026 19:39
@FIrgolitsch FIrgolitsch force-pushed the pr-e-motor-stacking branch from e939493 to 20d26d1 Compare April 29, 2026 19:39
@FIrgolitsch FIrgolitsch force-pushed the pr-c-utility-preprocessing branch from fffe682 to c38bcf9 Compare April 30, 2026 03:13
@FIrgolitsch FIrgolitsch force-pushed the pr-e-motor-stacking branch from 20d26d1 to 15db0d2 Compare April 30, 2026 03:13
@FIrgolitsch FIrgolitsch force-pushed the pr-e-motor-stacking branch from 15db0d2 to 7b331c8 Compare April 30, 2026 03:21
@FIrgolitsch FIrgolitsch force-pushed the pr-c-utility-preprocessing branch from c38bcf9 to 3e7849d Compare April 30, 2026 03:26
@FIrgolitsch FIrgolitsch force-pushed the pr-e-motor-stacking branch from 7b331c8 to 258fdee Compare April 30, 2026 03:26
@FIrgolitsch FIrgolitsch force-pushed the pr-c-utility-preprocessing branch from 3e7849d to f3b6b4b Compare April 30, 2026 03:51
@FIrgolitsch FIrgolitsch force-pushed the pr-e-motor-stacking branch from 258fdee to 6649b3a Compare April 30, 2026 03:51
An error occurred while trying to automatically change base from pr-c-utility-preprocessing to pr-a-build-tooling May 7, 2026 15:27
An error occurred while trying to automatically change base from pr-c-utility-preprocessing to pr-a-build-tooling May 7, 2026 15:27
An error occurred while trying to automatically change base from pr-c-utility-preprocessing to pr-a-build-tooling May 7, 2026 15:28
@FIrgolitsch FIrgolitsch changed the base branch from pr-c-utility-preprocessing to main May 7, 2026 15:28
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.

1 participant