Open
Conversation
…graphs (from beads, centroids, etc..)
… or apply transformations
…h the path for each fov config is passed
… different channels and slurm fov,t
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.
Summary
This PR refactors the registration and stabilization pipeline from a set of independent scripts into a unified, modular system. The core change is moving from per-FOV SLURM jobs to a flexible dispatch model where jobs can be submitted per FOV, per timepoint, or per (FOV, T) depending on the method.
Motivation
estimate-registrationandestimate-stabilizationwere duplicating orchestration logicregisterandstabilizewere duplicating transform-application logicArchitecture
New module:
biahub/registration/Each registration method is now a self-contained module exposing a per-job unit function registered in a method registry dict:
PARALLEL_FOV_T_METHODSants,pcc,beads-independently,match-z-focusSEQUENTIAL_T_METHODSbeads-with-propagationPARALLEL_FOV_METHODSstackregregistration/estimator.pyOrchestrator that:
{output_dir}/transforms_per_position/{fov_key}/{t}.npyregistration/applier.pyUnified transform application that:
transform_dirpathsand composes them (T1 @ T2 @ ...) before applying — enabling combined z+xy stabilization in a single passregister.pyandstabilize.pyapplication logiccore/transform.pyNew
Transformclass wrapping homogeneous matrices (4×4 for 3D, 3×3 for 2D) used consistently across all methods.registration/match_z_focus.pyNew method for matching Z focus between channels, enabling cross-channel z-alignment as part of the registration pipeline.
What's in this PR (done)
core/module withTransformclass andGraphMatchingclassregistration/ants.pyrefactored to expose per-job unit functionregistration/phase_cross_correlation.pyrefactoredregistration/beads.pyrefactored withestimate_independentlyandestimate_with_propagationregistration/stackreg.pyrefactoredregistration/match_z_focus.pycreatedregistration/estimator.pycreated with method registry and SLURM orchestratorregistration/utils.pywith shared transform utilitiesWork in progress
estimator.py: settings kwargs passthrough, file I/O, registration vs stabilization modeapplier.py: per-T / per-FOV / broadcast modes + transform compositionestimate_registration.pyandregister.pyto CLI-only (delegate to estimator/applier)main.pyTest plan
estimateCLI with each method (ants, pcc, beads, stackreg, match-z-focus) on a test dataset.npyfiles are saved correctly for each parallelism modeapplyCLI with single transform dir and with composed transform dirs🤖 Generated with Claude Code