-
Notifications
You must be signed in to change notification settings - Fork 25
Add refractive index ML #604
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
base: dev
Are you sure you want to change the base?
Conversation
|
Hi. Thanks for implementing this. I will have a look at it soon. |
|
I have now added the wavefield preconditioner to refractive index ML (option |
|
Thank you for sharing this with us. It seems to work, but I am a bit concerned about the gray values of the amplitude. I assume that both calculations were done on the same dataset, am I right? However, in the results obtained with "ML with the smoothing preconditioner," the range of gray values for the amplitude goes from 0.5e-10 up to 0.79e-10 (a delta of 2.9e-11). In contrast, the results from "refractive-ML with the smoothing preconditioner" show a range from 0 to 2.8 (a delta of 2.8). Additionally, the contrast seems inverted for the amplitude images: what is darker in one appears lighter in the other, and vice versa. Could a minus sign be floating somewhere where it's not supposed to be? Additionally, the probes have completely different power values, with one P = 8.5e8 and the other having P =4.8e8, which is almost a factor of 2 different. This obviously also affects the range of the color scale. This may indicate that something not so correct occurred, as even if one is now retrieving the refractive index for the object rather than the exponential of the phase, the probe should have remained very similar. Could one force the amplitude to be between 0 and 1 (or even 1.2 to allow some flexibility) to check if there are improvements? |
|
Is this also implemented for the near-field ptycho? If so, is it possible to try it in the dataset I send you @jfowkes? The probe retrieval may complicate things a bit, though. |
|
@jcesardasilva yeah sorry I’m being lazy with the plotting (as ptypy isn’t setup for plotting refractive indexes) so for the refractive ML it’s actually plotting the amplitude and phase of the refractive index rather than the real and imaginary part, I’ll see if I can hack the plot script to fix this. It should work with nearfield data out of the box so I will try with your dataset today. |
|
As discussed at the developer meeting, we should do a proper comparison of the results (not using ptypy.utils) so that we can discuss whether the refractive ML code makes sense. @jfowkes do you still have the scripts and could do this? |
|
Yes I still have the runscripts, happy to do the comparison properly. I should add that it does not work for the second example as the gradients explode. |


Refractive Index Maximum Likelihood (i.e. the object is the refractive index). Just the CPU version for now.
@kahntm hopefully of interest to you. I don't have a good example to test this out on.
Will need to add support for the wavefield preconditioner once that goes in (but this is trivial).