How to simulate Fourier Transform at the Focal Plane (when input_distance = f) #29
-
Hi, I have implemented the lens system as given in this script. I also followed your article as well. When I set up input_distance = output_distance = focal_length= 25cm, Ideally I should get the Fourier Transform at the output. But the implementation does not give that. Could you please guide me on how I can get that? What I got from the simulation (I checked for multiple scale factors in scale_propagation function (in this script). Below are images for scale_factor= 30) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, I edited the script to accommodate the parameters you mentioned (input_distance = output_distance = focal_length= 25cm) import diffractsim
diffractsim.set_backend("CPU") #Change the string to "CUDA" to use GPU acceleration
from diffractsim import MonochromaticField, ApertureFromImage, Lens, nm, mm, cm, um
zi = 25*cm # distance from the image plane to the lens
z0 = 25*cm # distance from the lens to the current position
radius = 6*mm
# set up simulation
F = MonochromaticField(
wavelength=488 * nm, extent_x=1.5 * mm, extent_y=1.5 * mm, Nx=2048, Ny=2048,intensity = 0.4
)
F.add(ApertureFromImage("./apertures/QWT.png", image_size = (1.0 * mm, 1.0 * mm), simulation = F))
F.scale_propagate(25*cm, scale_factor = 20)
F.add(Lens(f = 25*cm , radius = radius))
F.scale_propagate(25*cm, scale_factor = 0.7)
I = F.get_intensity()
F.plot_intensity(I, square_root = True, units = mm, grid = True) That is the absolute value of the Fourier transform of the aperture, at least within the paraxial approximation. |
Beta Was this translation helpful? Give feedback.
Hi,
I edited the script to accommodate the parameters you mentioned (input_distance = output_distance = focal_length= 25cm)