Skip to content

beam profile change that depends on Nx Ny #79

@oqt-ohm

Description

@oqt-ohm

examples/circular_aperture_lens.py yields a rectangular beam profile for following input:

from diffractsim import MonochromaticField, nm, mm, cm, CircularAperture, Lens
import diffractsim
# Change the string to "CUDA" to use GPU acceleration
diffractsim.set_backend("CPU")


F = MonochromaticField(
    wavelength=639 * nm, extent_x=10 * mm, extent_y=10 * mm, Nx=1000, Ny=1000, intensity=0.01
)

F.add(CircularAperture(radius=4*mm))

F.add(Lens(f=100*mm))  # Just remove this command to see the pattern without lens
F.propagate(80*mm)

rgb = F.get_colors()
F.plot_colors(rgb, xlim=[-3*mm, 3*mm], ylim=[-3*mm, 3*mm])

result:

Image

changing Nx,Ny to 2000 yields the expected circular beam profile:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions