Possibility of Phase-Object Diffraction Simulation #8
Replies: 8 comments 2 replies
-
Yes, it's perfectly possible. In fact, I'm currently working on an interface for the repository for adding phase masks and even generating and reconstructing phase holograms. It will be ready in a few days (next week). How is your phase object specified? As a gray map image? |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply! @rafael-fuente |
Beta Was this translation helpful? Give feedback.
-
@rafael-fuente Could you please give some insight on how to implement phase transformation by phase masks? I have read about your post and Section5.1 in Goodman's book, which talks about phase transformation caused by thin lens. I guess transformation caused by phase object may be somewhat similar, but I failed to find any material about that. Could you please give some insight on how to convert a gray map image(phase mask) into phase transformation function Appreciate your help! |
Beta Was this translation helpful? Give feedback.
-
It's done. I added the new features I said. Specify your phase mask using For your example: import diffractsim
diffractsim.set_backend("CPU") #Change the string to "CUDA" to use GPU acceleration
from diffractsim import MonochromaticField, mm, nm, cm, PhaseRetrieval
#Add a plane wave
F = MonochromaticField(
wavelength=632.8 * nm, extent_x=30 * mm, extent_y=30 * mm, Nx=1800, Ny=1800, intensity = 0.005
)
# load the hologram as a phase mask aperture
F.add_aperture_from_image(
amplitude_mask_path= "./examples/apertures/white_background.png",
phase_mask_path= "./examples/apertures/cat.png", image_size=(10.0 * mm, 10.0 * mm), phase_mask_format = 'graymap'
)
# plot colors at z = 0
rgb = F.get_colors()
F.plot_colors(rgb)
# propagate field 80 cm
F.propagate(80*cm)
rgb = F.get_colors()
F.plot_colors(rgb) And this is the final diffracted pattern: Note: For reconstructing exactly your diffraction pattern I need to know the phase object size For the phase hologram generation, take a look at this example It generates the following phase mask, which is encoded by default using a cyclic HSV colormap instead of grayscale. (red color represents When diffracting the phase mask to the Fourier plane, it reconstructs a snowflake image: |
Beta Was this translation helpful? Give feedback.
-
Excellent! You did a really great job!! I think it's a perfect starting point for me, I am going to try right now 👍 |
Beta Was this translation helpful? Give feedback.
-
Hi! I was able to produce diffraction pattern like It seems that implemented GS algorithm assumes we know target amplitude (in the fourier plane, Fraunhofer diffraction model). But what happens in my case is Fresnel diffraction, should I exchange the roles of Thank you very much @rafael-fuente |
Beta Was this translation helpful? Give feedback.
-
I managed to solve this problem by integrating concrete light propagation into GS algorithm, thanks: ) |
Beta Was this translation helpful? Give feedback.
-
The phase holograms are perfectly fine, as they are reconstructed in the Fourier plane. What you may want to generate are Fresnel holograms, which look more like the image you attached. I would definitely add the possibility to generate Fresnel holograms in a near future! 🙂 Sorry for my late reply, these days were busy for me |
Beta Was this translation helpful? Give feedback.
-
Hi! Thanks for your really amazing work!
I am a newbie in optics and I am wondering whether it's possible to produce diffraction like
And here is the light field with the description from the paper
Appreciate it a lot if you could help me about this:)
Wish you a good day!
Beta Was this translation helpful? Give feedback.
All reactions