-
Notifications
You must be signed in to change notification settings - Fork 17
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
Starting point for implementation of multislice ePIE #500
Conversation
daurer
commented
Aug 23, 2023
- provides extra storage for slices
- shows how use nearfield propagator inside the engine
- tried to implement multislice ePIE with existing fourier/object/probe functions
Next steps
|
I modified the update loop and now it works on two-slice moon flow sample. I also add the function to save the slice information into another file. In the .ptyr file, I save the object function as the product of all the slices. |
Thanks very much @yiranlus for those modifications. Do you have any actual multislice data (real or simulated) that you could further test this code with? We could also adapt the moonflower simulation code to create some fake data that actually originates from multiple slices... @kahntm maybe you could also try it out with some of your multislice datasets and make modifications to the code if needed? |
I checked the implementation with some old published data and was able to recreate my result from back then. The implementation of multi-slice ePIE works both when used with one or two slices. |
Switched from the one pod per view assumption to multiple pods per view. |
ptypy/custom/ePIE_multislice.py
Outdated
for name, pod in view.pods.items(): | ||
# Forward multislice, calculate exit waves | ||
for i in range(self.p.number_of_slices-1): | ||
# exit wave for this slice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kahntm for expanding this code to use modes! Maybe switch these loops around? Shouldn't make any difference to the calculations but its more consistent with the backwards update further below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having a second loop over the pods should be fine. I doubt it would make much of a difference performance wise...
ptypy/custom/ThreePIE.py
Outdated
@@ -34,15 +34,15 @@ class ThreePIE(stochastic.EPIE): | |||
|
|||
[slice_thickness] | |||
default = 1e-6 | |||
type = float | |||
type = float, list, tuple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slice_thickness
can be a single value or a list of values. When a single value is used, all the slices are assumed to have the same thickness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks