Conversation
…tialization and oversampling
|
I've now tested the near-field code on some near field data from a paper by Wenhui Xu. We are discussing the possibility of including this data in the repo and licensing it properly - if so, then I can add an example script using the data and that would leave only the test coverage |
|
I have added tests for near-field ptycho using the data here. This data comes from an exeriment I was helping with last month, and we got everyone's approval to release it with the proper CC license so we could use it as test near-field data. If anyone has time to give this a review, you get cookies the next time I see you in person! Then we can stop saying "cdtools kiiiind of has near-field ptycho, but..."!!! |
|
We should also include the example near-field ptycho dataset, as it is currently missing from examples/example_data. |
Whoops, I forgot to track the file in git. It is now added, thanks for the catch. |
yoshikisd
left a comment
There was a problem hiding this comment.
Looks good for the most part. There's one suggested change and one question I have at the moment.
|
Responded to the comments and made a commit. lmk how it looks :) |
yoshikisd
left a comment
There was a problem hiding this comment.
This looks good to me!
I'm starting some work to get a near-field ptychography model working. I thought about a few different ways to do it, and eventually I settled on the idea of making it just an option in fancy_ptycho. I think this has the main downside of making Fancy_ptycho more unwieldy, but it has many upsides:
The way that it works at present is that near-field can be turned on in the
FancyPtycho.from_dataset()factory function by setting thenear_fieldargument to True. In that case, the code will either set up:(1) Genuine near-field propagation with a 2-step Fresnel propagator if "propagation_distance" is set to 0
(2) Fresnel-scaling-theorem propagation with a 2-step Fresnel propagator if "propagation_distance" is finite
This meshes with "propagation_distance" being the initial guess of the illumination's propagation distance from focus. Essentially, if one has a reconstruction working in Far-field with a moderate "propagation_distance" argument, there's a chance you can just try turning on
near_field=Trueand the reconstruction will still work (even if far field is still the appropriate method).Right now, I've tested the Fresnel-scaling theorem part on some internal datasets that I unfortunately can't share here.
Todos