# Message Boards

Answer
(Unmark)

GROUPS:

9

# Incoherent optical MTF: analytical calculations

Posted 10 months ago

The detection range and recognition performance of electro-optical systems are dependent on the incoherent optical Modulation Transfer Function (MTF) which is defined as the autocorrelation of the entrance pupil function. Analytical MTF calculations are often difficult because integration limits change with the autocorrelation variable and the calculation of those limits require detailed calculations. Here we show how to use the Boole function to calculate the autocorrelation of an arbitrary area, which enables the calculation of incoherent optical MTF for a wide variety of entrance pupil functions.
1. Theory Figure 1, which was drawn using Mathematica’s drawing tools, defines the autocorrelation of the entrance pupil. The entrance pupil is shown at the top of the figure. The entrance pupil and the entry pupil displaced by a distance s A OL s (1a) MTF(f)= A OL A 0 s -3 10 MTF(f)= A OL A 0 sλf f A 0 -3 10 f Although Figure 1 shows the displacement s s f x s f y The calculation of A OL s A OL The above equations are are useful if the MTF is to be expressed in cycles/mm or cycles/mr. Sometimes it is convenient to express the MTF in a normalized frequency f n s s s max A 0 s max s max f oco x y s max (2a) f oco s max λ f oco s max -3 10 s max f n f n f f oco
2. Code Codes are given below corresponding to the binary choices: MTF given in the vertical or horizontal directions, analytical/numerical result, frequency given in normalized units, cycles per mm and cycles per mr. The user defined Mathematica functions MTFNoramilzedEqHor and MTFNormalizedEqVer given below enable computer calculation of analytical MTF functions. An important argument of these functions is the inequality that defines the entrance pupil. To have these functions properly output a normalized frequency the entrance pupil shape should satisfy the following rules: 1. The entrance pupil shape is input in units of mm. 2. When using MTFNoramilzedEqHor the entrance pupil shape is normalized so that s max 3. When using MTFNoramilzedEqVer the entrance pupil shape is normalized so that s max MTFNormalizedEqHor outputs an MTF equation in units of normalized frequency f In[]:= MTFNormalizedEqHor[Ineq_,{x_,y_},f_]:=Module{temp,A0,s},A0=Integrate[Boole[Ineq],{x,-∞,∞},{y,-∞,∞}];temp= 1 A0 In[]:= MTFNormalizedEqVer[Ineq_,{x_,y_},f_]:=Module{temp,A0,s},A0=Integrate[Boole[Ineq],{x,-∞,∞},{y,-∞,∞}];temp= 1 A0 NMTFNormalizedHor outputs NPoints which numerically describe the normalized MTF. The entrance pupil shape is described by Ineq and {x,y} corresponds to the variables used in Ineq. Similar comments apply to NMTFNormalizedVer. In[]:= NMTFNormalizedHor[Ineq_,{x_,y_},NPoints_]:=Module{A0,s},A0=NIntegrate[Boole[Ineq],{x,-∞,∞},{y,-∞,∞}];Tables, 1 A0 1 NPoints In[]:= NMTFNormalizedVer[Ineq_,{x_,y_},NPoints_]:=Module{A0,s},A0=NIntegrate[Boole[Ineq],{x,-∞,∞},{y,-∞,∞}];Tables, 1 A0 1 NPoints MTFCyclesPerMmEqHor produces an equation that describes the horizontal MTF in units of cycles per mm. The inputs are an inequality Ineq that describes the entrance pupil shape, {x,y} the variables used in the inequality, the wavelength λ and the focal length fl. The variable used to describe frequency in the equation is f. Similar comments apply to MTFCyclesPerMmEqVer. In[]:= MTFCyclesPerMmEqHor[Ineq_,{x_,y_},λ_,fl_,f_]:=Module{temp,A0,s},A0=Integrate[Boole[Ineq],{x,-∞,∞},{y,-∞,∞}];temp= 1 A0 -3 10 -3 10 In[]:= MTFCyclesPerMmEqVer[Ineq_,{x_,y_},λ_,fl_,f_]:=Module{temp,A0,s},A0=Integrate[Boole[Ineq],{x,-∞,∞},{y,-∞,∞}];temp= 1 A0 -3 10 -3 10 NMTFCyclesPerMmHor outputs a table with NPoints that numerically describes the horizontal MTF. The entrance pupil shape is described by Ineq that utilizes variables {x,y}. The wavelength of the incident radiation, focal length of the optical system and the maximum displacement that corresponds to the cutoff frequency are given by λ, fl and smax . Similar comments apply to NMTFCyclesPerMmVer. In[]:= NMTFCyclesPerMmHor[Ineq_,{x_,y_},λ_,fl_,smax_,NPoints_]:=Module{temp,A0,s},A0=NIntegrate[Boole[Ineq],{x,-∞,∞},{y,-∞,∞}];temp=Tables, 1 A0 smax NPoints -3 10 a -3 10 In[]:= NMTFCyclesPerMmVer[Ineq_,{x_,y_},λ_,fl_,smax_,NPoints_]:=Module{temp,A0,s},A0=NIntegrate[Boole[Ineq],{x,-∞,∞},{y,-∞,∞}];temp=Tables, 1 A0 smax NPoints -3 10 a -3 10 MTFCyclesPerMrHor produces an equation that describes the horizontal MTF in units of cycles per mr. The entrance pupil shape is described by an inequality Ineq that utilizes variables {x,y}. The incident radiation has wavelength λ. The symbol f is used for frequency in the output equation. Similar comments apply to MTFCyclesPerMrVer. In[]:= MTFCyclesPerMrEqHor[Ineq_,{x_,y_},λ_,f_]:=Module{temp,A0,s},A0=NIntegrate[Boole[Ineq],{x,-∞,∞},{y,-∞,∞}];temp= 1 A0 In[]:= MTFCyclesPerMrEqVer[Ineq_,{x_,y_},λ_,f_]:=Module{temp,A0,s},A0=NIntegrate[Boole[Ineq],{x,-∞,∞},{y,-∞,∞}];temp= 1 A0 NMTFCyclesPerMrHor outputs a table with NPoints that describes the horizontal MTF in cycles per mr. The entrance pupil shape is described by an inequality Ineq that utilizes variables {x,y}. The incident radiation has wavelength λ and smax is the displacement that corresponds to the cutoff frequency. Similar comments apply to NMTFCyclesPerMrVer. In[]:= NMTFCyclesPerMrHor[Ineq_,{x_,y_},λ_,smax_,NPoints_]:=Module{temp,A0,s},A0=NIntegrate[Boole[Ineq],{x,-∞,∞},{y,-∞,∞}];temp=Tables, 1 A0 smax NPoints a λ In[]:= NMTFCyclesPerMrVer[Ineq_,{x_,y_},λ_,smax_,NPoints_]:=Module{temp,A0,s},A0=NIntegrate[Boole[Ineq],{x,-∞,∞},{y,-∞,∞}];temp=Tables, 1 A0 smax NPoints a λ
3. Examples This section uses several examples to illustrate the use of code given in Section 2.
Circular Entrance Pupil Figure 2 was drawn using Mathematica’s drawing tools. It could have been drawn using RegionPlot. In[]:= RegionPlot 2 x 2 y 1 2 Out[]= Use MTFNormalizedEqHor and choose a diameter of one in the inequality so as to make s max In[]:= MTFNormalizedEqHor 2 x 2 y 2 1 2 Out[]=
The normalized MTF in the horizontal direction is given by(4)
Square Entrance Pupil Figure3.Squareentrancepupilwithsidea. Use MTFNormalizedEqHor to find the equation for the MTF of a square entrance pupil and choose the length of a side to be equal to one so as to make s max In[]:= MTFNormalizedEqHorAbs[x]< 1 2 1 2 Out[]=
The normalized MTF in the horizontal or vertical direction is(5)
Semi-Circular Aperture D 0 Use MTFNormalizedEqHor to find the equation for the MTF of the semi-circular pupil and choose the diameter to be equal to one so s max In[]:= MTFNormalizedEqHor 2 x 2 y 2 1 2 Out[]=
The normalized MTF in the horizontal direction for the semicircular aperture is (6)
To find the MTF in the vertical direction, use MTFNormalizedEqVer and choose the diameter equal to two so as to make s max In[]:= MTFNormalizedEqVer[ 2 x 2 y 2 1 Out[]= 2
π The normalized MTF for the semicircular aperture in the vertical direction is(7) 2 π
In Eq 7 the optical cutoff frequency f OCO D 0 Equations in Section 3 demonstrate that Mathematica reproduces known results.
4. Verification This section uses several examples to illustrate the use of code given in Section 2 and to validate results produced by that code.
Circular Entrance Pupil Equation 4 is a well-known expression. Evidence that NMTFNormalizedHor is correct is obtained by comparing the output of In[]:= temp=NMTFNormalizedHor 2 x 2 y 2 1 2 with Eq. 4. In[]:= ShowPlot
f n
Square Entrance Pupil Equation 5 is a well-known expression. Gain additional evidence NMTFNormalizedHor is correct by comparing its output with the results of Eq. 5. In[]:= temp=NMTFNormalizedHorAbs[x]< 1 2 1 2 In[]:= ShowPlot
f n
Semi-circular aperture Use NMTFNormalizedHor to gain confidence in this function and MTFNOrmalizedEqHor by determining if they are consistent. The command used to generate numerical results is In[]:= temp=NMTFNormalizedHor 2 x 2 y 2 1 2 In[]:= ShowPlot
f n The above calculations served to verify MTFNormalizedEqHor and NMTFNormalizedEqHor. Subsequent calculations will verify MTFCyclesPerMmEqHor and NTFCyclesPerMmHor. When the output is given in cycles per mm, besides specifying the entrance pupil size it is necessary to also specify the wavelength of the incident radiation λ and the optical system focal length fl. The calculations given below are for λ=10μ fl=10mm
Elliptical Entrance Pupil Figure 8 was constructed using Mathematica’s drawing tools. The entrance pupil shape is shown more accurately using RegionPlot. In[]:= RegionPlot 2 x 1.25 2 y 2.5 Out[]= Calculate the MTF in the horizontal and vertical directions for the entrance pupil illustrated in Fig. 8 for the case where the average wavelength of the incident radiation is 10 μ and the focal length is 10 mm. In[]:= temp1=MTFCyclesPerMmEqHor 2 x 1.25 2 y 2.5 In[]:= temp2=NMTFCyclesPerMmHor 2 x 1.25 2 y 2.5 In[]:= temp3=MTFCyclesPerMmEqVer 2 x 1.25 2 y 2.5 In[]:= temp4=NMTFCyclesPerMmVer 2 x 1.25 2 y 2.5 Exhibit the equation and numerical MTF results in the horizontal direction temp1 Out[]= 0.101859
In[]:= temp2 Out[]= {{0,1.},{0.833333,0.957567},{1.66667,0.91518},{2.5,0.872889},{3.33333,0.830739},{4.16667,0.78878},{5.,0.74706},{5.83333,0.705629},{6.66667,0.664538},{7.5,0.623838},{8.33333,0.583583},{9.16667,0.543828},{10.,0.504632},{10.8333,0.466053},{11.6667,0.428154},{12.5,0.391002},{13.3333,0.354668},{14.1667,0.319226},{15.,0.284757},{15.8333,0.25135},{16.6667,0.219102},{17.5,0.18812},{18.3333,0.158527},{19.1667,0.130461},{20.,0.104088},{20.8333,0.079605},{21.6667,0.0572611},{22.5,0.0373861},{23.3333,0.0204553},{24.1667,0.0072689},{25.,0}} Graph the equation for the MTF in the horizontal direction and compare with numerical results In[]:= Show[{Plot[temp1,{f,0,25},FrameTrue,FrameLabel{{"MTF",""},{"f [cycles/mm]","Horizontal MTF for Elliptical Entrance Pupil"}},PlotLegends{"Analytical"},ImageSizeLarge],ListPlot[temp2,PlotLegends{"Numerical"}]}] Graph the equation for the MTF in the vertical direction and compare with numerical results In[]:= Show[{Plot[temp3,{f,0,50},FrameTrue,FrameLabel{{"MTF",""},{"f [cycles/mm]","Vertical MTF for Elliptical Entrance Pupil"}},PlotLegends{"Analytical"},ImageSizeLarge],ListPlot[temp4,PlotLegends{"Numerical"}]}]
Distributed Entrance Pupil Figure 10 was constructed using Mathematica’s drawing tools and Paint. In Fig. 10 the center-to-center distance in the vertical and horizontal directions is 3.8 mm and each of the four clear areas has a diameter of 1.2 mm. By symmetry, the MTF in the vertical and horizontal directions are the same. Commands used to define the distributed aperture, RegionEntiree, are given below. In[]:= Region1= 2 x 2 (y-1.9) 2 0.6 2 x 2 (y+1.9) 2 0.6 2 (x-1.9) 2 y 2 0.6 2 (x+1.9) 2 y 2 0.6 The shape of the distributed pupil is shown more accurately using RegionPlot In[]:= RegionPlot[RegionEntire,{x,-3.5,3.5},{y,-3.5,3.5}] Out[]= Commands used to generate the equation and table that define the horizontal or vertical MTF are given below for the case where λ=10 μ and fl=10 mm In[]:= temp1=MTFCyclesPerMmEqVer[RegionEntire,{x,y},10,10,f]; In[]:= temp2=NMTFCyclesPerMmVer[RegionEntire,{x,y},10,10,5,30]; Exhibit temp1 and temp2 In[]:= temp1 Out[]= 0.221049
In[]:= temp2 Out[]= {0,1.}, 5 3 10 3 20 3 25 3 35 3 40 3 50 3 55 3 65 3 70 3 80 3 |