Closed talonchandler closed 1 year ago
Thanks for the contributions and in-person chat @mattersoflight. I've made the following changes:
<object-type>_<object-thickness>_<data-shape>
. We're starting with isotropic_thin_3d
, phase_thick_3d
, and inplane_anisotropic_thin_pol3d
. isotropic_thin_3d
so that it handle absorption, and fixed the example to simulate a thin object. 2D/3D -> 2d/3d
following PEP8 and one of Keith's comments in the dragonfly repo.Merging into alg-dev
...we can discuss more when I open a PR into main
This PR makes the following changes to the "Phase2D" and "Phase3D" reconstructions methods:
waveorder_reconstructor
into their own files in/waveorder/models/phase2D_3D.py
andwaveorder/models/phase3D_3D.py
.calculate_transfer_function
,visualize_transfer_function
(for napari viewing),apply_transfer_function
(very simple simulation), andapply_inverse_transfer_function
. These methods are in preparation for direct calls from therecOrder
CLI.torch
optics
,utils
, and the newexamples
Birefringence_recon
(S1&S2 diffraction-aware reconstruction) inwaveorder_reconstructor
. I am now testing several example scripts to alert me to breaking changes.I suggest starting your review by running the new examples scripts in
/examples/PODT_Phase_simulation/
. This will demonstrate a simplified form of what I expect on therecOrder
side: the TF is calculated (and optionally viewed in napari), saved to a file, then used to reconstruct the data.Next, I suggest you take a look at the (currently under-documented but hopefully much clearer than before) function signatures for
calculate_transfer_function
andapply_inverge_transfer_function
inmodels/phase2D_3D.py
andmodels/phase3D_3D.py
. These function signatures have a nearly direct correspondence withrecOrder
's GUI parameters.Finally, I'll request your thoughts on my
models
format that arose naturally during my refactor. I've temporarily named the three models after our assumption about the sample (phase2D
,phase3D
,planaranisoND
) and the data we acquire (3D
,polND
). To my eye, this seems to be an extensible way to split up the code since different assumptions about the object and/or different data will lead to different models (and code). I'm also very aware that this could be a good application for an abstract base class (especially since I expect to implementcalculate_transfer_function
andapply_inverse_transfer_function
methods forplanaranisoND_polND
), but I've chosen to delay this for now in fear of premature abstraction.I'm happy to chat in person anytime tomorrow. My immediate focus is on the interface for the "Retardance + Orientation" pipeline which I expect to require about 3/4 of my day tomorrow. After that PR, I am planning to start working on the
recOrder
CLI side and link everything up.