fixed bugs in PaganinProcessor #2214 - #2225
Conversation
|
Hi @adamdoc thanks for opening this PR! 😄 |
|
Hi @lauramurgatroyd |
|
Hi @lauramurgatroyd |
|
Hi @adamdoc, thank you for looking at this it looks great to me! My only question is about the change that scales alpha by 1/magnification. As I understand it you are now accounting for the magnification in the Fourier-space pixel size. Do we also need to scale alpha as well? The propagation distance we use is the physical sample-to-detector distance and not scaled by magnification, I think in some implementations propagation distance is also scaled so need to scale alpha as well. |
Hi @hrobarts Yes it's related to Fresnel scaling theorem, which is always something I've struggled to understand why it exists but I know at least it has to be used in the Paganin equation for cone beam setups Fresnel scaling theorem says you can model a cone beam system using a parallel beam system with a shorter propagation distance (R2/M). One of the ways you can use this is apply theory designed for parallel beam systems to cone beam systems that have been scaled accordingly. The derivation in Paganin's paper is designed for a parallel beam, and states this can also be applied to a cone beam setup by first applying Fresnel scaling theorem (going from Equation 10 to Equation 12 in his 2002 paper). The PaganinProcessor.py function I believe to now implement Equation 12 in that paper, which you will notice has a R2/M term on the filter So to convert a cone beam image to one that would be captured by a parallel beam through the scaling theorem you scale: I've validated the retrieval with a code we have for simulating phase propagation. Although this does use Fresnel scaling theorem too, so it makes sense that the retrieval un-does this propagation. But happy to chat more ! |
Co-authored-by: Hannah Robarts <[email protected]> Signed-off-by: Adam Doherty <[email protected]>
Description
Fixed bugs in Paganin Processor that gave incorrect output for cone-beam phase retrieval
Example Usage
sim_image3.tif
Contribution Notes
I made three changes to Paganin_processor.py
mag2variable as a scaling factor on the retrieved thicknesspixel_size_dmagwhich defines the fourier mesh and filter, replacing use ofself.pixel_sizeself.magnificationto the definition ofalpha❤️ Thanks for your contribution!