Skip to content

Conversation

@talonchandler
Copy link
Collaborator

@talonchandler talonchandler commented Jun 10, 2025

This PR enables optimizing reconstructions using torch gradients with respect to:

  • NA_illumination + NA_detection
  • defocus offset
  • illumination tilts
  • detection aberrations (via Zernike modes)

These optimization have been trialed in the following reconstruction modes:

  • 3D-to-2D phase, and
  • 3D widefield fluoresence.

Quickstart:

  • on the HPC with access to a screen, install from this branch with pip install waveorder[all] and run python ./waveorder/docs/examples/visuals/optimize_phase_recon.py
  • script will start a short 10-iteration optimization loop. Try modifying NUM_ITERATIONS and OPTIMIZABLE_PARAMS.
  • view traces with tensorboard --logdir runs

@codecov
Copy link

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.59%. Comparing base (57a2004) to head (fd7c79e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #455   +/-   ##
=======================================
  Coverage   36.59%   36.59%           
=======================================
  Files          49       49           
  Lines       10224    10225    +1     
=======================================
+ Hits         3741     3742    +1     
  Misses       6483     6483           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@talonchandler talonchandler changed the title WIP propagate gradients through reconstructions Optimize reconstructions Jul 2, 2025
@mattersoflight mattersoflight self-requested a review July 8, 2025 02:59
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.

4 participants