feat: utility modules, preprocessing improvements, galvo correction#97
Open
FIrgolitsch wants to merge 3 commits intopr-a-build-toolingfrom
Open
feat: utility modules, preprocessing improvements, galvo correction#97FIrgolitsch wants to merge 3 commits intopr-a-build-toolingfrom
FIrgolitsch wants to merge 3 commits intopr-a-build-toolingfrom
Conversation
This was referenced Apr 1, 2026
7404517 to
4b150ff
Compare
66ac55c to
cb7cf4c
Compare
This was referenced Apr 17, 2026
cb7cf4c to
68783a7
Compare
e4c127f to
a48129d
Compare
cad9fc9 to
af2b3e4
Compare
ce8e35d to
cc75fc8
Compare
af2b3e4 to
199dd1d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #97 — Utility Modules, Preprocessing & Core Library Improvements
General-purpose library and script improvements that the feature PRs (#98–#102) build on. Two commits: the initial addition and a follow-up that refines registration, mosaic-grid generation, and adds rehoming detection.
New library modules
linumpy/preproc/normalization.py— intensity normalization (percentile / rolling-ball / per-slice) used by both CPU and GPU pathslinumpy/preproc/resampling.py— resampling utilities shared bylinum_resample_mosaic_grid.pyand the GPU equivalentslinumpy/utils/image_quality.py— image-quality metrics (variance, sharpness, edge score)linumpy/utils/orientation.py— orientation utilities (axis swaps, flips, orientation-code parsing)linumpy/utils/visualization.py— preview / annotation helpers used by AIP and screenshot scriptsNew scripts
linum_fix_galvo_shift_zarr.py— galvo-shift correction for OME-Zarr volumeslinum_clean_raw_data.py— raw-data cleaning / curationlinum_compare_stitching.py— A/B comparison of two stitching runslinum_extract_pyramid_levels.py— extract specific levels from an OME-Zarr pyramidlinum_normalize_z_intensity.py— per-slice z-axis intensity normalizationlinum_aip_png.py— average-intensity projection with PNG output + annotationslinum_screenshot_omezarr_annotated.py— annotated OME-Zarr screenshots for reportslinum_generate_mosaic_aips.py— batch mosaic-AIP generationlinum_detect_rehoming.py— detect motor rehoming events from stage logs (used by PR feat: updated Nextflow workflows with profiles, auto-assess, rehoming #102's auto-rehoming workflow)Library refactors
linumpy/stitching/registration.py— refactored for shared use by CPU and GPU registration paths; adds affine helpers and a unified SimpleITK wrapperlinumpy/stitching/mosaic_grid.py,topology.py,FileUtils.py,manual_registration.py— API cleanups and type-hintinglinumpy/preproc/icorr.py,xyzcorr.py— functional rewrite for vectorisation / thread-safetylinumpy/io/zarr.py,data_io.py,thorlabs.py— improved error handling and dtype handlinglinumpy/utils/metrics.py,io.py— misc. cleanup_thread_configimported first in all touched scripts so thread caps apply before numpy/jax/cupyScript refactors (significant)
linum_create_mosaic_grid_3d.py— rewrite for streaming and_thread_configcompatibilitylinum_estimate_transform.py— unified CPU entry point used by PR feat: GPU acceleration module and scripts #99's GPU pathlinum_fix_illumination_3d.py— refactored into reusable functionslinum_resample_mosaic_grid.py,linum_normalize_intensities_per_slice.py— align APIs with the newpreprocmoduleslinum_register_pairwise.py— uses the refactoredregistration.pylinum_aip_png.py,linum_generate_mosaic_aips.py— preview integrationTests added
test_preproc_normalization.py,test_preproc_resampling.py,test_preproc_xyzcorr.pytest_utils_orientation.py,test_utils_visualization.pyscripts/tests/test_crop_3d_mosaic_below_interface.py,scripts/tests/test_resample_mosaic_grid.pyDependencies
linumpy/stitching/__init__.pyimportsinterpolation,motor,stackingsubmodules, which are added by PR feat: slice interpolation for missing sections (z-morph) #87 and PR feat: motor stacking, auto-exclude, refined stitching #98 respectively — those imports resolve once the upstream PRs land