ptycho: enhance show_scan_positions for probe overlap/size estimation and metadata#190
Conversation
bobleesj
left a comment
There was a problem hiding this comment.
@arthurmccray ready for review
| diffraction_limit_A = 0.61 * wavelength / conv_angle_rad | ||
| defocus_blur_A = abs(defocus) * conv_angle_rad | ||
| probe_radius_A = diffraction_limit_A + defocus_blur_A | ||
| probe_radius_px = probe_radius_A / self.sampling[0] |
There was a problem hiding this comment.
I noticed that the ptycho sampling is different from the original sampling.
For printing, I used the original sampling
There was a problem hiding this comment.
ptycho.sampling is the realspace sampling of the reconstructed object, i.e. it's dependent on the maximum scattering angle of the diffraction patterns. We generate this image with the scan positions using the _get_probe_overlap method, which uses the same patches backend as is in the forward model, so that is the correct sampling to use. Just wanted to clarify :)
There was a problem hiding this comment.
thanks for this clafirication! I will take a look!
bobleesj
left a comment
There was a problem hiding this comment.
A few more comments on unit code convention and metadata
arthurmccray
left a comment
There was a problem hiding this comment.
Looks good! I would make the super minor change of specifying the object FOV in the printed string, but otherwise ready to merge.
| diffraction_limit_A = 0.61 * wavelength / conv_angle_rad | ||
| defocus_blur_A = abs(defocus) * conv_angle_rad | ||
| probe_radius_A = diffraction_limit_A + defocus_blur_A | ||
| probe_radius_px = probe_radius_A / self.sampling[0] |
There was a problem hiding this comment.
ptycho.sampling is the realspace sampling of the reconstructed object, i.e. it's dependent on the maximum scattering angle of the diffraction patterns. We generate this image with the scan positions using the _get_probe_overlap method, which uses the same patches backend as is in the forward model, so that is the correct sampling to use. Just wanted to clarify :)
bobleesj
left a comment
There was a problem hiding this comment.
@arthurmccray Thanks Arthur for your feedback on adding "FOV" text. This has been fixed. Ready for review and merge.
| diffraction_limit_A = 0.61 * wavelength / conv_angle_rad | ||
| defocus_blur_A = abs(defocus) * conv_angle_rad | ||
| probe_radius_A = diffraction_limit_A + defocus_blur_A | ||
| probe_radius_px = probe_radius_A / self.sampling[0] |
There was a problem hiding this comment.
thanks for this clafirication! I will take a look!
What this PR does
No physics is changed for probe size estimation.
User wants to get an approximation for probe overlap, size, etc. The existing implementation works but with a minor fix as mentioned in the in-line comment:
Here is the plot and output:
Yes, probes are tiny.
API renders:
What should the reviewer(s) do
This was brought up while going through the ptycho notebook w/ @arthurmccray. I will probably the only user for now but since no physics is modified, it can be merged but if you more ideas, please share.