Skip to content

Drop 3.7 and add 3.8, 3.9, 3.10 - #99

Merged
talonchandler merged 2 commits into
masterfrom
drop-37
Dec 7, 2022
Merged

talonchandler merged 2 commits into
masterfrom
drop-37

Conversation

@talonchandler

Copy link
Copy Markdown
Collaborator

Fixes #98

@talonchandler
talonchandler requested a review from ziw-liu December 6, 2022 20:16
Comment thread setup.cfg Resolved
@talonchandler
talonchandler merged commit bfc8491 into master Dec 7, 2022
@talonchandler
talonchandler deleted the drop-37 branch December 7, 2022 18:49
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.
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.

Bump Python version

2 participants