Skip to content

How to simulate Fourier Transform at the Focal Plane (when input_distance = f) #29

Discussion options

You must be logged in to vote

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_…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rafael-fuente
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #25 on September 24, 2022 00:18.