An Airy Disk PSF

I would like to create an Airy Disk point spread function, but not sure on the functional form.

I can generate a circular gaussian PSF via:

Function fillingauss(c)
    variable c
    nVar W=root:width
    nVar yL=root:Ylocation
    nVar xL=root:xLocation
    make/o/n=(c,c) PSF_Part
   
    psf_Part=(1/((2*pi)*w^2))*exp(-((x-xL)^2 + (y-yL)^2)/(2*(w^2))) //equation for circular gaussian distribution
end


See attached gizmo image of above function (Circular Gauss). I would like to now modify this to generate an Airy Disk PSF, see attached image(AiryDisk).

Is there a simple modification (besselJ?) of the above function to generate the ripple on the guassian PSF?

CircularGauss.jpg AiryDisk.jpg
If you are looking for an expression similar to the intensity profile of an airy disk that has the form (besselj(1,r)/r)^2 you can write e.g.,

make/n=(100,100) ddd=(besselj(1,(sqrt((x-50)^2+(y-50)^2)/3))/sqrt((x-50)^2+(y-50)^2)/3)^2   // set at the center of the data with arbitrary width parameter 3


If you are looking for the PSF version then you would want the form besselj(1,r)/r with r replaced by the "scaled" distance from the optical axis.

A.G.
WaveMetrics, Inc.
Hi A.G.

Thanks. Was there supposed to be a bit of code pasted on your response?

Cheers,

C
ctmckee wrote:
Hi A.G.
Thanks. Was there supposed to be a bit of code pasted on your response?


I did not think that any code was necessary there but if you really want a function here is one example:
Function makeAiry(npix,cx,cy,D,lambda)
    Variable npix,cx,cy,D,lambda
   
    Make/O/D/N=(npix,npix) airyWave
    Variable rs=1   // set to 1 for unscaled example.
    // feel free to add wave scaling here and uncomment/modify the following
    // scale factor as appropriate for your application.
    // rs=pi*D/lambda
    airyWave=2*BesselJ(1,rs*sqrt((x-cx)^2+(y-cy)^2))/(rs*sqrt((x-cx)^2+(y-cy)^2))
End


I hope this helps,

AG
To elaborate a bit on AG's earlier response:
Quote:
If you are looking for the PSF version then you would want the form besselj(1,r)/r with r replaced by the "scaled" distance from the optical axis.

The intensity PSF for an incoherent source ought to be proportional to (besselj(1,r)/r)^2 to give a non-negative intensity point-spread function. The differences between coherent and incoherent optical response functions are interesting and significant. Be careful to choose the one appropriate to your needs. The Airy function per se given by AG's code is the Fourier-Bessel transform of a uniform, coherent circular aperture, and has negative regions where the optical phase of the field changes.