File:ZernikeAiryImage.jpg

From testwiki
Jump to navigation Jump to search
    Original file (1,151 × 1,107 pixels, file size: 82 KB, MIME type: image/jpeg)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Image plane of a flat-top beam under the effect of the first 21 Zernike polynomials. The beam starts in the so-called Fourier plane, which is imaged onto the image plane by an ideal lens.

    A lens of focal length f is a Fourier-transform device between the place at distance f before it and the plane at distance f after it. These planes are called "Fourier" and "Image" plane respectively.

    (*https://mathematica.stackexchange.com/questions/33574/whats-the-\
    correct-way-to-shift-zero-frequency-to-the-center-of-a-fourier-transf*)
    fftshift[dat_?ArrayQ, k : (_Integer?Positive | All) : All] := 
     Module[{dims = Dimensions[dat]}, 
      RotateRight[dat, 
       If[k === All, Quotient[dims, 2], 
        Quotient[dims[[:w:k]], 2] UnitVector[Length[dims], k]]]]
    
    ZernikePoly = 
     Table[Table[
         If[m < 0, 
          Sqrt[(2 (n + 1))/(\[Pi] (1 + KroneckerDelta[0, m]))]
            ZernikeR[n, -m, \[Rho]] Sin[m \[Theta]], 
          Sqrt[(2 (n + 1))/(\[Pi] (1 + KroneckerDelta[0, m]))]
            ZernikeR[n, m, \[Rho]] Cos[m \[Theta]]], {m, -n, n, 2}], {n, 
         0, 5}] /. {\[Rho] -> Sqrt[x^2 + y^2], \[Theta] -> ArcTan[x, y]} //
       FullSimplify
    
    (*The flat-top beam size (HeavisideTheta) has radius 1*)
    (*The Fourier plane is taken to be much larger than the aperture size*)
    (*The Fourier transform is the result of the imaging setup*)
    (*Each Zernike polynomial is simulated with a coefficient of 2*)
    
    Column[Map[
      ArrayPlot[
        Abs[fftshift[
          Fourier[Table[
            HeavisideTheta[1 - Sqrt[x^2 + y^2]]/Sqrt[\[Pi]]
              E^(-I 2 #), {y, -20, 20, 0.051}, {x, -20, 20, 0.051}]]]]^2, 
        PlotRange -> {{393 - 60, 393 + 60}, {393 - 60, 393 + 60}}, 
        PlotTheme -> "Scientific"] & , ZernikePoly, {2}], Center]
    Export["ZernikeAiryImage.jpg", %]

    Licensing

    I, the copyright holder of this work, hereby publish it under the following license:
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
    You are free:
    • to share – to copy, distribute and transmit the work
    • to remix – to adapt the work
    Under the following conditions:
    • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
    • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    image/jpeg

    84,445 byte

    1,107 pixel

    1,151 pixel

    743badb6b85a288185fe55f7c5f67c5b6cb7db12

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current21:18, 16 June 2023Thumbnail for version as of 21:18, 16 June 20231,151 × 1,107 (82 KB)wikimediacommons>RolancitoZoom in to discard numerical artifacts. Also increased accuracy

    There are no pages that use this file.