Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase reconstruction is invariant to voxel-size #164

Merged
merged 18 commits into from
Apr 23, 2024

Conversation

talonchandler
Copy link
Collaborator

@talonchandler talonchandler commented Apr 16, 2024

This PR is paired with a confluence page with more context.

Before: phase reconstructions varied with the square of the z step size.
After: phase density reconstructions are invariant to the z step size.

This PR:

  • changes the earlier "phase" reconstruction to a "phase density" reconstruction, which is constant as a function of voxel size. The "phase density" is comparable to a "fluorophore density" or "concentration", which does not change if you change the size of a voxel.
  • removes scaling factors for simulations and reconstructions, while leaving the reconstruction contrast unchanged
  • adds automated tests for voxel-size invariance (z and xy)

Note: this is a PR to alg-dev, a new branch from main that I will develop on for the next few PRs. My commit history is not clean (git accident), but this PR's diff is clean.

@talonchandler talonchandler marked this pull request as ready for review April 16, 2024 18:49
@talonchandler talonchandler requested a review from ziw-liu April 16, 2024 20:26
@talonchandler talonchandler requested a review from ziw-liu April 23, 2024 21:08
@ziw-liu ziw-liu added the bug Something isn't working label Apr 23, 2024
@talonchandler talonchandler merged commit 4a20aeb into alg-dev Apr 23, 2024
3 checks passed
@ziw-liu ziw-liu deleted the phase-voxel-size-invariance branch April 23, 2024 21:28
@ziw-liu ziw-liu mentioned this pull request Jul 1, 2024
talonchandler added a commit that referenced this pull request Jul 5, 2024
* Phase reconstruction is invariant to voxel-size (#164)

* fix bug finding focus in stack with only one slice

* refactor for clarify

* formatting

* print -> warnings.warn

* test single-slice case

* fix test bugs

* z-scale-invariant test object

* no rescaling on output

* forward simulation takes a "brightness" - simulating real microscope

* fix example script

* add background parameter for fluorescence forward model

* test voxel-size invariance

* rename I_norm -> direct_intensity

* refactor to clarify discretization factor

* remove comment

* fix fluorescence example bug

* improved docsring

---------

Co-authored-by: Ivan Ivanov <[email protected]>

* np.product -> np.prod

---------

Co-authored-by: Ivan Ivanov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants