Background & Theory
The MTF is a variant of the optical transfer function (OTF) of our optical system for a specific imaging scenario. Specifically, our optical system will transfer the spatial frequencies of an object in object space to an image in image space. We know that the transfer of any real system will be band limited, that is, we cannot transfer perfectly all of the spatial information from object space to image space. Instead, for physical systems, we can describe the transfer of a property through the system with the instrument transfer function, which the OTF is for an imaging system.
For an optical designer, it may be important to understand how specific spatial frequencies, or a range of frequencies, will be transferred through the system. Imagine that for example your end user will want to use a camera lens you have designed on a photography safari. They have saved up and purchased your cutting edge camera lens system for their camera and cannot wait to go collect perfect pictures of Zebras on their safari. You as the designer therefore care about assuring that, in an imaging scenario, the user can transfer the Zebra striping pattern through the optical system you designed sufficiently well to be satisfied with the image. Note, the electrical system also plays a large role in the concept of spatial transfer and sampling! However, this falls outside the scope of this discussion, but the knowledgeable scientist should always consider the system as a whole when designing. Back to the primary topic, the designer can define a spatial frequency in image space, and how much contrast it must retain to be considered a satisfactory image for the user. This fundamentally is a component of what the OTF of the system tell us.
The OTF describes how, considering all spatial frequencies in object space, the optical system transfers the frequencies to image space. What represents all spatial frequencies in object space? An infinitely small point. Fortunately for us, we have heard of an infinitely small point in object space, it is something we used for the Point Spread Function (link to PSF page). If we recall, the PSF describes the physical image formed by our optical system of an infinitely small, point source object at a specific point in space in our object field. Thus, the PSF contains the spatial information that was transferred through our optical system. How do we go about getting the frequency information, and therefore the transfer function? With our trusty friend the Fourier Transform. The OTF is defined as the Fourier Transform of our PSF, i.e., it is the frequency domain representation of the spatial frequencies of the transferred point source through our optical system. But, this still isn’t the MTF that we are looking for. Indeed, as this point, our math savvy optical scientist will note that the OTF must be a complex representation of the image space spatial frequencies. While useful, in practical systems we as the observers tend to care most about the contrast of the spatial frequencies of our optical system, which is represented by magnitude of the OTF. This measurement is the MTF; namely, the magnitude of the OTF defines the MTF and captures the contrast of spatial frequencies transferred by our system into image space. The phase of the OTF is also a useful parameters and describes the pattern translation in image space, and this is defined as the Phase Transfer Function.
The MTF therfore defines, for a given point in object space, the contrast of the spatial frequencies that our optical system transferred into image space. Note, the MTF may vary over the field of the system, therefore it can be important to analyze the MTF across your field of interest, and the MTF is directly related to the PSF, which therefore lets us know it is also dependent on the wavelength of light we are investigating. Lastly, we know from the PSF that for a perfect system the PSF will be limited by diffraction, thus we know that the OTF, and by association MTF, will not perfectly transfer all spatial frequencies with perfect contrast. Indeed, even a perfect, diffraction limited system, will achieve a maximum contrast of 1, at a spatial frequency of 0 line pairs per millimeter (a measurement of spatial frequency), and the contrast will fall off to 0 as the spatial frequency increases. For the designer, this implies that the goal should be to get as close to the diffraction limited scenario as possible in their design, which is also included on the MTF plot.
For the interested scientist and user, it is essential to know what exactly the software is doing to determine the PSF. The following section lays out the algorithms used:
Step 1: User selects a field coordinate for the MTF
This takes in the field coordinate and determines the x and y position at the object plane of the point source.
Step 2: The PSF is calculated
See our PSF post here: Point Spread Function by ELE Optics
Step 3: The OTF is calculated
After the point spread function has been determined, we calculate the OTF, as:
Where \xi and \eta represent the frequency domain spatial frequency variables in the x and y directions respectively. The OTF is normalized by its value at the origin (thank you BD for your insight here!). Their units are in [line pairs/millimeter] or [lp/mm] by default.
Step 4: Calculate MTF of Sagittal and Tangential Fields
The MTF is calculated from the OTF. Because the OTF is a complex function, we must determine the modulus of the OTF as:
The MTF is then reported to the user as the Tangential and Sagittal MTF. The Tangential field is the slice of the MTF that lies in the Tangential plane, which is the plane defined by the optical axis and a point on the object (in this case our point source) from which our traced rays originated from. The Sagittal field is the slice of the MTF that lies in the Sagittal plane, which the plane orthogonal to the Tangential plane.
If you have any questions regarding these algorithms, or find any errors in our algorithms, please let us know by contacting us at firstname.lastname@example.org
 For a general explanation of the MTF and how to measure it: https://www.edmundoptics.com/knowledge-center/application-notes/optics/introduction-to-modulation-transfer-function/
 Geary, Joseph M. “Chapter 34 – MTF: Image Quality V.” In Introduction to Lens Design: With Practical Zemax Examples, 389-96. Richmond, VA: Willmann-Bell, 2002.
 Smith, Warren J. “Chapter 15.8 The Modulation Transfer Function.” In Modern Optical Engineering, 385-90. 4th ed. New York, NY: McGraw-Hill Education, 2008.
 Tyo, Scott. “OPTI 512R - Linear Systems, Fourier Transforms.” Lecture, The University of Arizona, Tucson, AZ, Fall 2010.
 Goodman, Joseph W. “Chapter 6 -Frequency Analysis of Optical Imaging Systems” in Introduction to Fourier Optics. 4th ed. New York, NY : W.H. Freeman and Company, 2017.