Repository navigation
Drop 3.7 and add 3.8, 3.9, 3.10 - #99
Merged
Merged
Conversation
ziw-liu
reviewed
Dec 7, 2022
ziw-liu
approved these changes
Dec 7, 2022
talonchandler
added a commit
that referenced
this pull request
Dec 7, 2022
commit bfc8491 Merge: 5f60f0a 6cebe20 Author: Talon Chandler <talonchandler@gmail.com> Date: Wed Dec 7 10:49:16 2022 -0800 Merge pull request #99 from mehta-lab/drop-37 Drop 3.7 and add 3.8, 3.9, 3.10 commit 6cebe20 Author: Talon Chandler <talonchandler@gmail.com> Date: Wed Dec 7 10:41:00 2022 -0800 Tab -> spaces commit cc66a6a Author: Talon Chandler <talonchandler@gmail.com> Date: Tue Dec 6 12:12:26 2022 -0800 Drop 3.7 and add 3.8, 3.9, 3.10
mark-a-potts
added a commit
to mark-a-potts/waveorder
that referenced
this pull request
Jun 4, 2026
…-skip API
New module ``waveorder.models.phase_thick_3d_tilt`` providing:
- ``optimize_subtile_tilt_params(...)`` — batched NAdam optimizer over
per-subtile (zenith, azimuth, z_offset) tilt parameters, using
``isotropic_thin_3d.reconstruct`` as the forward model. Internally
groups subtiles by focus offset and shape so the forward TF is
computed once per group. Supports ``freeze_axes=("zenith","azimuth")``
for the 1-D z-only path that's significantly faster when the
warmstart map provides reliable angle estimates.
- ``warmstart_params`` + ``skip_optim_if_warmstart`` kwargs — the
algorithm hook for caller-side skip-opt / T-cache. When set,
``optimize_subtile_tilt_params`` bypasses the NAdam loop and returns
the warmstart verbatim. The caller (e.g. ops_process) owns the skip
decision; the library just honors it.
- ``radial_blend_zenith_init(...)`` — pure utility for the validated
zen_blend recipe (smooth radial ramp from 0 at well center to the
per-subtile formula value at the edge). Used for low-NA tilt-recon
on track-style FOVs.
- ``TiltOptimResult`` dataclass — explicit result type with per-subtile
outputs, final loss, iteration count, and a ``skipped`` flag.
Tests cover both the radial-blend utility and the optimizer (synthetic
recovery on CPU/CUDA, frozen-axis behavior, warmstart-skip roundtrip,
shape-check error path).
Algorithm body lifted from PR Biohub#99's ``_gpu_optimize_tilt_params`` in
royerlab/ops_process. Empirically validated this session: median phase
Pearson 0.994 vs PROD on ops0154 pheno (7035 positions), 0.988 on
ops0154 track. Per-position compute 8-12× faster than the vanilla
NAdam(5,15)/NAdam(10,25) recipes when paired with the closed-form 2×2
Tikhonov inverse (already in this branch).
This is the headline new public API for the tilt-recon waveorder PR.
The corresponding ops_process adapter PR (to be opened against
royerlab/ops_process main) will replace PR Biohub#99's monolithic
``_gpu_optimize_tilt_params`` body with a call to this function.
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.
Fixes #98