You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought I could use the parameter resolution in Ptypy to implement the super-resolution approach, but it does not work as expected. Images of the results below.
The pixel size of the object and probe arrays are indeed modified accordingly. Still, although the array shape of the
object changed (not to the expected value, which was twice bigger, but it changed), the one for the probe did not change, causing potential problems with sampling when using large probes. The probe array size should also change if it is to be used for super-resolution, given the probe pixel size has changed. If not changed, we access only a tiny area of the probe array. If I pad the data using numpy before loading the data in Ptypy, I can do super-resolution properly without using the parameter resolution.
After a discussion with @bjoernenders@daurer, I can imagine that that parameter was not made for this goal, so I wonder what the best solution would be. Maybe I should consider an additional method for HDF5_loader that implements the padding according to the aimed pixel size?
Normal calculations
Calculations using the resolution parameter with a pixel size of half the original.
The text was updated successfully, but these errors were encountered:
I used the approach proposed by @bjoernenders, which involved adding a mask to the areas where the padding was applied. But somehow, it did not work well.
The exit wave propagated to the detector, after the phase retrieval using the data with padding and with the mask, gives this weird image:
And the retrieved image gets weird artifacts on the images (left = normal, right = super-resolution):
@pierrethibault suggested using the p.engines.engine00.probe_fourier_support = 0.3 to impose support on the Fourier transform of the probe function since it is supposed to represent the image of the pupil. This improved the reconstruction quality, although we still observed unwanted Fourier frequencies in the padded area. We are progressing.
Following the suggestion by @bjoernenders , I tried the approach on simulated data. I picked the moonflower example and applied the zero padding. As seen in the results shown below, I got the sample problem as in the case using the experimental data:
I thought I could use the parameter
resolution
in Ptypy to implement the super-resolution approach, but it does not work as expected. Images of the results below.The pixel size of the object and probe arrays are indeed modified accordingly. Still, although the array shape of the
object changed (not to the expected value, which was twice bigger, but it changed), the one for the probe did not change, causing potential problems with sampling when using large probes. The probe array size should also change if it is to be used for super-resolution, given the probe pixel size has changed. If not changed, we access only a tiny area of the probe array. If I pad the data using numpy before loading the data in Ptypy, I can do super-resolution properly without using the parameter
resolution
.After a discussion with @bjoernenders @daurer, I can imagine that that parameter was not made for this goal, so I wonder what the best solution would be. Maybe I should consider an additional method for
HDF5_loader
that implements the padding according to the aimed pixel size?Normal calculations
Calculations using the
resolution
parameter with a pixel size of half the original.The text was updated successfully, but these errors were encountered: