Fabrication error detection in diffraction gratings with high dynamic range Fourier plane imaging and spatial filtering

Abstract. We summarize our development of a low-cost instrument for the detection of fabrication errors in diffraction gratings. Our instrument applies a low-cost digital camera and high dynamic range (HDR) imaging in the focal plane of a lens to analyze light reflected by a diffraction grating. A dynamic range close to 1010 is achieved for a spatial frequency range that is relevant for types of errors that occur in the lithographic fabrication of gratings. We also describe a modification of the instrument in which a spatial filter is used to block the large fraction of light that does not carry information on fabrication errors. This “coronagraph” modification reduces measurement times by about an order of magnitude. A unique pseudologarithmic transformation is described for the visualization of wide range data that include zero or negative values, such as HDR images.


Introduction
The instrument we are describing in this paper was developed as part of an effort to improve the lithographic fabrication of silicon immersion gratings for high resolution infrared spectrometers. Von Fraunhofer 1 first observed that the diffraction angles of light passing through a transmission grating immersed in a fluid increase in proportion to the refractive index of the fluid. More than a century later, Hulthén described the same magnification of the resolving power by the refractive index in reflection gratings immersed in a medium. 2,3 This finding has a useful application because, for a given resolving power, the required width of a diffraction grating is proportional to the wavelength. 4 The width of an immersed grating can, therefore, be reduced by the inverse of the refractive index of the immersion medium. This is why immersed gratings made from silicon, which has a refractive index of ∼3.4, have found application in high resolution infrared spectrometry. The magnification of the resolving power by the high refractive index of silicon enables the design of more compact and lower-mass spectrometers, as was first suggested by Dekker. 5 High-resolution spectrometers based on silicon immersion gratings have now been developed, or are in development, for a number of ground-based [6][7][8][9][10][11][12][13] and space-based 14,15 spectrometers.
A concurrent reduction of manufacturing tolerances by a factor 1∕n (n stands for the refractive index) is the price that must be paid for the increase in resolving power made possible by immersed gratings. The manufacturing tolerances are a particular challenge for near-infrared echelle gratings that are used close to the short-wavelength cutoff of 1.1 μm. This becomes clear when the planar grating equation for a grating immersed in a slab of material with refractive index n is considered (in the notation of the Diffraction Grating Handbook 4 ) *Address all correspondence to Ulf Griesmann, ulf.griesmann@nist.gov † Present address: ASML Netherlands B.V., De Run 6501, 5504DR Veldhoven, The Netherlands mGλ ¼ mλ p ¼ nðsin α þ sin β m Þ; (1) where m denotes a diffraction order, G the grating constant or linear groove density, p is the grating period (p ¼ 1∕G), λ is the wavelength, α is the angle of incidence, and β m is the exit angle of a beam diffracted into the m'th order inside the medium. 7 High-resolution spectrographs often use echelle gratings at high diffraction orders, and errors in the diffraction angle resulting from placement errors of the grating lines are amplified by a factor of m for this type of grating, and the angle errors outside the immersion material are further increased by the refractive index n of the medium (see Marsh et al. 7 ). Periodic fabrication errors in gratings cause spectral side bands ("ghosts"), and stochastic errors lead to reduced signal-to-noise ratio from stray light ("flare" or "grass"), especially at short wavelengths. The control of fabrication errors is thus critically important to achieving immersed gratings in which such spectral errors are minimized.
Immersed gratings for infrared wavelengths can be made made by patterning the grating on one side of a silicon substrate. Because echelle gratings have a relatively low groove density, they can be machined with micromachining techniques as shown by Ikeda et al. 16 or made using a lithographic process. The lithographic fabrication of an immersed grating is a multistep process that begins with the deposition of a silicon nitride layer on a single-crystal silicon substrate. The nitride layer is then patterned with either photo-or electron beam-lithography into a mask that is needed to create the grating through a wet etch process with potassium hydroxide (KOH) or tetramethylammonium hydroxide. The crystal orientation of the substrate and the orientation of the etch mask relative to the crystal axes are chosen such that the subsequent hydroxide etch process results in the formation of v-shaped grating grooves with the desired blaze angle due to the strongly anisotropic etch properties of the hydroxide etch step. 7,10,13,15,17 Any fabrication process has errors that are characteristic to the process. A grating made with a lithographic process may have large-scale errors at a very low spatial frequency resulting from motion system errors in the lithography tool that was used to create a photomask or to directly pattern an etch mask. Mechanical motion systems can also create periodic errors due to the incremental nature of grating fabrication, which lead to "ghosts" in the vicinity of spectral lines when the gratings are used in spectrographs. The control of such errors has long been the primary challenge in the fabrication of advanced ruled diffraction gratings. 18,19 The control of fabrication errors requires that they can be characterized over a range of spatial frequencies, ideally at all steps of the fabrication process, to ensure that finished gratings have acceptable levels of ghosts and stray light. A phase-shifting Fizeau interferometer can be used to evaluate a grating at the lowest spatial frequencies (e.g., see Burke's 20 review of phase measurement), but the angular field of typical Fizeau interferometers is small, often <1 deg, and the sensitivity of the instrument may not be sufficient for detecting periodic errors that are significant for spectroscopic applications of a grating. Microscopy can also be inadequate for the detection of periodic fabrication errors due to the very limited field of view at the magnifications that may be needed to image fabrication defects. For example, the field of view of a high-magnification microscope may be smaller than 100 μm × 100 μm, which makes it difficult and time consuming to discern the periodic nature of a patterning defect with periods larger than the field of view in gratings covering many square centimeters.
We developed an instrument that we call a "focal plane imager" for the evaluation of fabrication errors in diffraction gratings 21-23 that is capable of sensing small fabrication errors and covers an angular field relevant for gratings fabricated using lithographic methods. In this instrument collimated light diffracted at a reflection grating under test is examined at the focal plane of a lens. The grating modulates the light in amplitude and phase, and at the focal plane of the lens a Fourier transform of the modulation function is observed. 24 Small modulations due to fabrication errors are spatially separated from the diffraction order at the focal plane and thus can be appraised even if their irradiance is orders of magnitude smaller than that of the diffraction order itself.
This way of testing a diffraction grating resembles the way a grating is used in a spectrograph, and variations of our approach have been known for decades. For example, Babcock and Babcock 25 describe a similar test that was used for gratings made at the Mount Wilson Observatory, and it was undoubtedly used before that. A similar test was described by Heusinger et al. 26,27 to evaluate gratings patterned with electron beam lithography. In our instrument, we chose to test gratings in a Littrow configuration because it makes for a more compact and simpler instrument. The disadvantage is that a larger number of optical components are required, especially a beam splitter (BS), which increases the amount of scattered light and requires more effort to mitigate it.
In Sec. 2, we summarize the improvements that were made to the prototype described by Corzo-Garcia et al. 23 to reduce stray light and the image noise caused by it. These improvements made it possible to combine Fourier plane imaging with spatial filtering to create what we call the "coronagraph" configuration due to its similarity to astronomical coronagraphs on telescopes. The primary diffracted beam is blocked in the focal plane of the lens, and the focal plane is reimaged on the camera sensor. The primary benefit of the coronagraph configuration is that weak signals from fabrication errors do not have to be measured in the presence of the orders-of-magnitude larger signal from the primary diffraction order, which can greatly reduce the measurement time.

Instrument Design
In the prototype instrument described by Corzo-Garcia et al., 23 it was found that the ability to detect fabrication errors in diffraction gratings was limited by stray light. In the revision of the instrument described here, every effort was made to reduce the level of stray light; the resulting modifications are described in the following sections.
The overall layout of the system is shown in Fig. 1. Light from a frequency stabilized heliumneon laser operating at 632.82 nm (L) is transmitted through a single-mode optical fiber (OF) (Fig. 1) to a collimator (CL) that produces a collimated Gaussian beam with an 1∕e 2 diameter of about 11 mm. The mechanism for laser power control is described in Corzo-Garcia et al. 23 The collimated beam is directed by a BS, with a transmissivity to reflectivity ratio of about one, toward a grating under test (TG). The grating is always tested in the Littrow condition, which means that for the diffraction order being used in the test the diffracted beam is retro-reflected by the grating. Half of the power in the reflected beam traverses the BS and is focused by a lens onto the image sensor of a digital camera (CM) with a CMOS (complementary metal-oxide semiconductor) image sensor. When a wire beam stop (W) is used to block the primary fraction of the diffracted light, a relay lens (RL) is used to re-image the focal plane of the focusing lens onto the image sensor.

Optics
The most significant modification in the improved focal plane imager is a custom BS designed to make stray light control easier. The BS is made from a high-quality borosilicate glass with the lowest number of bubbles and inclusions among commercially available grades. The glass also has a low level of striae. The substrate of the BS is 130 mm wide, 50 mm high, and 70 mm deep. It is polished on all sides, and the top and bottom surfaces are fine ground. Figure 2(a) shows the BS in its mount. An 80-mm-wide area of the BS has a coating that reflects about 50% of the light and transmits the remainder. The large BS thickness of 70 mm was chosen because it makes it possible to spatially separate the stray reflection at the back surface from the primary beam as is shown in Fig. 2(b). The back, or exit, surface of the BS has an antireflection coating optimized for the laser wavelength (632.82 nm) with a residual reflectance of ∼0.25% according to measurements made by the supplier. The fraction of the beam reflected by the grating that is transmitted by the BS surface and the fraction of light back-reflected at the back surface of the BS are trapped by absorbers that are cemented to the sides of the BS and cover a 50-mm-wide area of the front and back surfaces as shown in Fig. 2. The absorbers are made from an OF glass that has an internal transmittance of 1.1 × 10 −5 at 632.82 nm for a glass thickness of 1 mm. The thickness of the absorbers bonded to the BS is 2 mm. Between the wavelengths of 300 and 400 nm, the internal transmittance (at 1 mm thickness) is larger than 0.9, which enabled us to use an ultraviolet curing optical cement to bond the filter glass absorbers to the BS substrate by exposing the cement through the absorbers. We calculated the reflectance 28 of the glass-cement-absorber interfaces using vendor-supplied refractive index data for the materials and assuming that the optical cement layer has a thickness in the vicinity of 10 μm. The worst-case reflectance was found to be 0.17%, which is comparable to the reflectance that is typically found in single-wavelength antireflection coatings. The use of absorbers is, however, much more cost effective than the four coating runs that would be required for antireflection coatings. Stray light that is not trapped by the absorbers, as shown in Fig. 2(b), can be blocked with a suitable aperture. A custom mount for the BS [shown in Fig. 2(a)] was made from (acrylonitrile butadiene styrene) plastic and shaped to minimize reflection of light into the direction of the camera. Surfaces that are exposed to light diffracted by the TG were painted with an ultrablack acrylic paint.
Our prototype was built with a plano-spherical focusing lens that resulted in marked aberrations in focal plane images near the ends of the angular range. 23 In the revised instrument, the focusing lens was replaced with a customized aspheric lens made from a borosilicate glass. The result of this modification was a much lower level of aberrations, which allowed us to almost double the angular range of the instrument to nearly AE4 deg by increasing the diameter of the focusing lens to 70 mm and using a camera with a much larger sensor. The angular range of the instrument is set by the sensor size and focal length of the focusing lens. Different focal lengths may be chosen depending on the spatial frequency range of interest. We opted for a focal length of 100 mm because we found it to be well suited to the spatial frequency range of fabrication errors caused by imperfections in the photo-lithographic process that we used for diffractive optics fabrication, which is above the range accessible with phase shifting interferometers. The imaging of the focusing lens is diffraction limited over an angular range of approximately AE2 deg with a Strehl ratio well above 0.8. A spot diagram for the primary diffracted beam at the center of the field is shown in Fig. 3. The Airy disk in the diagram has a diameter of 6.7 μm, and most rays cluster at the center of the disk. The root-mean-square (RMS) spot diameter is below the camera pixel size within the diffraction limited range of AE2 deg. At AE3 deg, the RMS spot diameter increases to approximately twice the pixel size. The full angular range of the instrument is about AE4 deg. This is confirmed by measurements. An inset in Fig. 6 shows the beam focused on the image sensor with a square pixel size of 3.45 μm. Only a single pixel is fully illuminated, which is in agreement with the spot size obtained in the optical model of the imaging system. This small spot size is also necessary to implement spatial filtering e.g., to efficiently block some of the light diffracted by a grating with a beam stop.
When the instrument is used with a beam stop to suppress the light in the primary diffraction order, a RL is used to re-image the focal plane onto the camera sensor. The RL is made from a flint glass and has a diameter of 50 mm. The lens is positioned 100 mm from the focal plane, and the camera sensor is at a distance of 125 mm from the RL. The asymmetry occurs because one side of the lens is aspherized to control aberrations.The imaging is no longer diffraction limited, but it remains adequate with a spot size of ∼30 μm.
In the focal plane imaging configuration, the light path between the focusing lens and camera is enclosed by a baffle, which consists of a conical section surrounding the space near the focusing lens and a straight section in front of the camera [see Fig. 1(b)]. This baffle prevents stray light scattered by components of the instrument from reaching the image sensor. The interior surface of the conical section is covered with a light-absorbing synthetic felt material, and the straight section is a commercially available baffle that has an ultrablack-coated metal mesh on its interior surface to reduce the amount of stray light reaching the camera sensor.
The instrument is enclosed in a light tight enclosure made from a black anodized aluminum frame and walls that are covered on the inside with a light absorbing fabric designed to be used as a black background in museum exhibits and theater stages.

Camera
We use an uncooled monochrome camera with a progressive scan CMOS sensor for the current version of the focal plane imager. The sensor area has a size of 14.13 mm × 10.35 mm and contains 4096 × 3000 square pixels with a width of 3.45 μm. The nominal pixel depth of the sensor is 12 bit. The camera has a programmable electronic shutter that can be set to exposure times ranging from 10 μs to 32 s. The sensitivity of the camera can further be varied by setting the amplifier gain in the range from 1 to 251. High-dynamic-range (HDR) images are obtained by acquiring images with multiple different settings of exposure time and gain and superposing them in the way described in Sec. 3.1.
The window of the camera housing and the window on the sensor chip were both removed to eliminate light scattering at the window surfaces. All surfaces inside the camera housing that are exposed to incoming light were painted with an ultrablack acrylic paint.
The conical baffle in front of the camera can be rotated out of the light path and replaced by a mirror that reflects all light coming from the grating under test into a light trap. The general measurement procedure that we used was to always block the light and only open the path to the camera for a measurement to avoid saturation effects due to prolonged exposure of the camera to light, such as residual bulk images. After every acquisition of an image, the light was blocked again by rotating the mirror into the light path, and a dark image was acquired immediately with the same settings for exposure time and gain, which could be subtracted from the corresponding image to remove the fixed pattern noise of the camera.

Spatial Filtering
The primary purpose of the focal plane imager is to detect imperfections in a diffraction grating that are introduced during the fabrication process and that cause light to be scattered in the vicinity of the diffraction orders. This immediately suggests that the sensitivity of the instrument may be improved by blocking the light in the primary beam in the focal plane of the focusing lens in a way that is reminiscent of some forms of solar or stellar coronagraphs. Beam stops for this purpose were made from stainless steel wire with a diameter of 50 μm. The wire was mounted on an aluminum frame and tensioned. The center of the tensioned wire was flattened with a press to achieve a more favorable geometry of the beam stop with less forward scattering when the beam focus is not perfectly centered on the wire. The wire press is shown in Fig. 4(a). A pin made from hardened steel with a diameter of 1 mm flattens the wire against a hard tungsten carbide surface. Once a wire with an acceptable flat section was achieved, it was coated with a layer of carbon nanotubes. For the application of carbon nanotubes, the wire on its mounting frame was heated to about 100°C, and an aqueous suspension of carbon nanotubes was sprayed on the wire with an air brush. After the wire was dry, the coating process was repeated until inspection with a microscope showed that the wire was fully coated with nanotubes. An example of a coated wire is shown in Fig. 4(b). Examples of measurements with spatial filtering are shown in Sec. 4. Fig. 4 Wire press used in creating beam stops for spatial filtering (a) and steel wire with carbon nanotube coating (b).

High Dynamic Range Imaging
Measurement and processing of HDR images is performed with a modification of the procedure described in Sec. 3 of Corzo-Garcia et al. 23 A set of images I k ðk ¼ 1; : : : ; NÞ with varying exposure parameters is acquired. For each of the images I k , the camera can be programmed with an exposure time τ k and an amplification (gain) factor g k . The product of exposure time and gain is the camera sensitivity σ k ¼ g k τ k . The relative laser power r k can also be varied during the acquisition of an HDR image sequence, but this feature of our setup was not used for the measurements described in this paper. The laser power was set at the start of each image sequence such that the peak value of the pixels in the image with the lowest sensitivity remained below a threshold level θ s , which was about 90% of the pixel saturation level of 4096 (12 bit). All image sequences were acquired with increasing camera sensitivity, beginning with the lowest sensitivity, generally with an exposure time of 21 μs and unity gain. The images at each sensitivity were the average of 10 images to increase the signal-to-noise ratio.
For the computation of an HDR image, each image I k in a sequence of N images is assigned a scale factor E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 2 ; 1 1 6 ; 5 4 9 which expresses the camera senstivity relative to the highest sensitivity used in the image sequence. With this definition of the scale factors Ω k , the factor Ω N for the image measured with the highest camera sensitivity, I N , has a value of one. The definition of scale factors in Eq.
(2) was chosen to enable a pseudologarithmic representation of the HDR images as is described in Sec. 5. It differs from the choice made in Corzo-Garcia et al. 23 Another important modification of the measurement procedure relative to the procedure described by Corzo-Garcia et al. 23 is that for every image I k a dark image D k was acquired with the same camera sensitivity and was subtracted from the corresponding image I k prior to calculating the HDR image. HDR images were then calculated for each image pixel ði; jÞ as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 3 ; 1 1 6 ; 3 9 9 where E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 4 ; 1 1 6 ; 3 3 7 η k;ij ¼ 1 for I k;ij ≤ θ s ∧ I k;ij − D k;ij ≥ θ n 0 for I k;ij > θ s ∨ I k;ij − D k;ij < θ n ; is a factor that marks a pixel ði; jÞ as valid when its value in the image I k was below the selected saturation threshold θ s and its value in the dark frame corrected image I k − D k above a configured noise threshold θ n . The sensitivies for the measurements of image sequences were chosen such that, at each pixel, about three valid measurements were obtained. Dark frame corrected images were then averaged with weights according to Eq. (2). In the HDR images shown by Corzo-Garcia et al. 23 dark frames were not subtracted from the images in HDR sequences, which caused the dynamic range of HDR images to be overestimated.

Angle Scale Calibration
We illustrate the potential of the focal plane imaging system to detect and characterize fabrication errors in diffraction gratings with a few examples. In practice, the instrument must be calibrated so that distances on the sensor can be translated into diffraction angles. This calibration is best accomplished using a coarse grating with a known grating period. We chose a commercially available Ronchi grating with a grating period of 100 μm to be used as a reflection grating and with the grating grooves oriented vertically. The grating was set up so that the incident beam was normal on the grating (α ¼ 0). With this grating, 21 diffraction orders were visible on the image sensor. An example of a focal plane HDR image of the light diffracted by the Ronchi grating is shown in Fig. 5(a). The diffraction angles for the diffraction orders are calculated from the known grating constant using the grating equation Eq. (1), and the corresponding peak positions on the sensor relative to the 0'th are estimated from an HDR image like the one shown in Fig. 5(a). The relationship between distances in sensor pixels and diffraction angles for the image in Fig. 5(a) is shown in Fig. 5(b), which shows the pixel values and corresponding angles for the diffraction peaks of the Ronchi grating and a best-fit linear model. The residuals, multiplied by 100, that result from subtraction of the linear model from the data are shown as open cirles in Fig. 5(b). For the focal plane configuration, the angular dispersion at the sensor is 536 pixels∕degree, which corresponds to an angular resolution of 1.87 × 10 −3 degree∕pixel. The position of diffraction peaks on the sensor can be determined with an uncertainty of AE0.5 pixels, or AE1.7 μm, and the resulting angle uncertainty is 16.3 μrad. Both the uncertainty in diffraction peak position and the diffraction angle are too small to be shown in Fig. 5(b).

Flat Mirror
The first example shown in Fig. 6 is an HDR focal plane image made with a plane-parallel, glass mirror as a test part. The mirror was made from a borosilcate glass and polished to  a peak-to-valley flatness error of about 60 nm ("λ∕10") with a scratch-dig specification of 60 to 40 and was uncoated. The reflection from the back surface of the mirror was attenuated by a piece of black poly-vinyl chloride (PVC) tape bonded to the back surface. Measuring a flat mirror is a way to evaluate the noise floor of the instrument. Figure 6(a) shows an HDR image resulting from 27 exposures covering a range of exposure times and camera gains. The maximum exposure time in the set was 32 s, and the highest camera amplification factor, or gain, was 2. Ten images were acquired at each setting of the camera sensitivity and averaged. For all camera settings, ten dark frames were acquired, averaged, and then subtracted from the irradiance measurements before constructing the HDR image as described in Sec. 3.1. In Fig. 6(b), we show a horizontal section through the peak in Fig. 6(a) for HDR images constructed for different ranges of camera sensitivity. The legends in Fig. 6 show the number of images in the image sequence used for the calculation of the HDR image and the largest values for exposure time and gain in the sequences. All sections are scaled to have the same peak value as the section with the longest exposure time. The image set with the maximum exposure time of 5 ms consisted of 10 images, and the acquisition time for the complete set was about 1 s. Figure 6 illustrates the reduction of the noise floor relative to the peak value through the HDR imaging process. The large spikes that can be seen in Fig. 6(b) in the curve measured with the longest exposure time are caused by saturated pixels. Saturated pixels become more numerous when the camera gain is increased further and their emergence signals the limit of the useful range of the camera for HDR imaging. The inset in Fig. 6 shows the pixel with the highest irradiance in the image that was acquired with the lowest camera sensitivity. In this image, usually the first in a sequence, none of the pixels of the image are saturated, and the peak pixel value is about 2900. The peak shown in Fig. 6 has a base that is much broader than might be expected from the spot diagram shown in Fig. 3, which may be caused by residual aberrations due to imperfect optical alignment and scattering of light by defects on the mirror surface, and the optical surfaces in the light path as well as glass defects in BS and focusing lens.

Ruled Grating
One of the gratings that we investigated is a commercially available mechanically ruled reflection grating with a line density of 600 mm −1 and a blaze angle of 8.62 deg. This grating was tested in the first diffraction order at a 10.9 deg angle of incidence. An image sequence consisting of 31 images with exposure times up to 32 s, and a gain of 20 was acquired and combined, using Eq. (3), into the focal plane HDR image shown in Fig. 7(a). In Fig. 7(b), we show two sections through the HDR image in the horizontal and vertical directions through the center of the diffraction peak. Five or seven adjacent lines of pixels are averaged for the sections shown in Fig. 7 (and in the image sections shown in subsequent figures) to improve the signal-to-noise ratio. Images, and image sections, are plotted using the pseudologarithmic scale discussed in the appendix. In Fig. 7, two types of fabrication errors are easily recognized. The primary peak at 0 deg has two side bands at AE0.0962ð2Þ deg. This type of sideband is a "Rowland ghost" caused by a periodic fabrication error in the grating surface. In many cases the periodic error occurs in the groove density of the grating, and it is caused by a positioning error of the motion system that advances the diamond scribe in the direction orthogonal to the grating grooves. 18 However, periodic fabrication errors may also modulate, e.g., the shape and depth of grating grooves. The period of the fabrication error can be calculated using Eq. (1). For the Littrow configuration in our measurement, one obtains from Eq. (1) that E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 5 ; 1 1 6 ; 6 4 0 ΔG Δβ m ≃ 2 cos β m mλ : For the first-order diffraction angle of 11.9 deg, the laser wavelength in air of 0.63282 μm, and the angular separation Δβ m of the Rowland ghost from the central peak of 0.0962 deg, one obtains the period of the fabrication error, 1∕ΔG, with a value of 192.6 μm.
In addition to the periodic error, the horizontal section in Fig. 7(b) shows an elevated noise background that extends through most of the angular range, which suggests the presence of a fabrication error with random character. This noise signal could be the result of a modulation of the grating line width by the formation of burrs at the edge of the sloped grating grooves [see Fig. 2(a) in Afzal et al. 21 ]. The defects on the grating surface and the burrs also result in more nondirectional scattering of light compared with the flat mirror shown in Fig. 6, resulting in a larger "halo" at the center of the focal plane image in Fig. 7. There are also indications of quasiperiodic errors in the vertical section in Fig. 7(b), which may be related to the scalloping in the burrs that form during grating groove machining [see Fig. 2(a) in Afzal et al. 21 ].
A disadvantage of the focal plane measurements is the long measurement time when large exposure times are used with multiple gains in combination with averaging of images. For example, in the acquisition of the image sequence for Fig. 7(a), the largest exposure time was 32 s. Ten images were acquired and avereraged for every setting of exposure time and gain, which meant that each image at the longest exposure time required a measurement time of 5 min. The total image acquisition time for image sequences such as the one required for the HDR image shown in Fig. 7 was between 1 and 2 hr. We therefore explored if the same information can be obtained in a measurement configuration in which the primary diffracted beam is blocked at the focal plane of the focusing lens with the beam stop described in Sec. 3. Figure 8 show the result of a measurement in which a beam stop as described in Sec. 3 was used to filter the primary diffracted beam. Acquisition of the image sequence required for Fig. 8(a) took about 1 min (the shortest exposure times are in the milli-second range), and the signal-to-noise ratio exceeded that of the focal plane measurement without spatial filtering. The asymmetry visible in Fig. 8(b) can be attributed to imperfect placement of the beam stop and to the flattened portion of the beam stop wire [see Fig. 4(b)] not being orthogonal to the beam direction. The blocked area in the upper right corner of the image in Fig. 8(a) is caused by the frame on which the wire was mounted.

Silicon Immersed Echelle Grating
Our second example is that of a silicon immersed echelle grating with a nominal grating period of 13.8 μm that was fabricated by KOH deep etching of a single crystal substrate as described in Sec. 1. Although the grating was designed to be used through its silicon substrate, it can be tested for fabrication errors as a first surface grating using visible light. Due to the trapezoidal shape of the grating line profile, the grating has two blaze angles. It was tested in the 26'th diffraction order at an angle of incidence of 37 deg. A focal plane HDR image of the 26'th diffraction order is shown in Fig. 9(a). As in the case of the mechanically ruled grating, we show horizontal and vertical sections through the central peak in Fig. 9. A consequence of the high angle of incidence is that diffraction peaks due to fabrication errors in the vertical direction line up along a conical section, which was approximated by a best-fit circle for the vertical section shown in Fig. 9(b). These periodic errors likely reflect the incremental patterning of the photomask by a lithography system in which adjacent areas are exposed sequentially. Exposure dose errors, or stitching errors, can then occur at the boundaries of the exposed areas.  As in the case of the mechanically ruled grating, we made a measurement in the coronagraph configuration of the instrument with the W. This time, we measured two image sequences with the wire in two orientations. Figure 10(a) shows an image that is the pixel-by-pixel mean of the two HDR images, and Fig. 10(b) is a plot of horizontal and vertical sections through the center of the HDR image. The measurement time was again much reduced when compared with the measurement time for the focal plane image and the signal-to-noise ratio was also improved.
A close inspection of Fig. 10(a) reveals numerous small peaks in the image. The precise origin of these is unclear because we do not know how the photomask that was used in the fabrication of the echelle grating was made.

Conclusions and Avenues for Improvement
We show that a simple measurement system in which light diffracted by a grating is detected at the focal plane of a lens with an electronic image sensor can be used to find fabrication errors in diffraction gratings in a range of spatial frequencies that is relevant to fabrication methods that are employed to make gratings. Despite the limited dynamic range of uncooled CMOS image sensors, the use of HDR imaging enables a dynamic range of about 10 10 when stray light is controlled carefully. We also explored a modification of the instrument in which spatial filtering in the focal plane of the lens, similar to that used in astronomical coronagraphs, is used to block light that does not carry information about fabrication errors to mitigate against long measurement times of focal plane imaging. The reduction of measurement times by over an order of magnitude with a further increase in the signal-to-noise ratio was achieved. An important advantage of an image sensor-based measurement system is that fabrication errors can be analyzed in two dimensions.
The uncooled CMOS camera was found to be the component that prevents further improvement of the dynamic range. An uncooled camera had to be used because the sensor must be operated without windows to eliminate the back-scattering of light that is reflected by the sensor. A cooled sensor cannot be operated windowless because humidity that is present in the air would condense and freeze on the sensor. It seems that this limitation could be overcome by, effectively, using the focusing lens as the camera window and sealing the space between lens and sensor or purging it with dry air or nitrogen. Thermoelectrically cooled CMOS cameras are becoming available at a low cost, and they have a much lower sensor noise floor than uncooled cameras. With a cooled camera, the measurement time could be reduced, or if required, the dynamic range of the HDR imaging could be increased further.

Appendix: Pseudologarithmic Visualization of HDR Images
The graphical representation of data with values spanning multiple orders of magnitude presents a problem when the dynamic range of the data exceeds the dynamic range of the display medium or that of certain aspects of human visual perception. One familiar solution is to compress the dynamic range of the data by depicting the decadic logarithm of the image data. This visualization of data using a log 10 transformation fails when the data contain values that are zero or negative, as is the case with digital images after subtraction of the camera noise. It is generally desirable to have a transformation that preserves salient features of a log 10 transformation while allowing for negative data values. One such transformation is E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 6 ; 1 1 6 ; 1 8 1 x ↦ T as ðxÞ ¼ arsinhðx∕2Þ lnð10Þ ; where x is a data value, for example the value of an image pixel. The transformation in Eq. (6) is shown in Fig. 11. For large values of x, the transformation T as approaches the log 10 transformation because it follows from the definition of the arsinh function that lim x→∞ ðT as ðxÞ − log 10 ðxÞÞ ¼ 0: This is a useful property because it implies that pseudolog plots using the transformation in Eq. (6) can be interpreted intuitively in much the same way as familiar decadic logarithm plots, except for small values.
In some applications, it is further desirable to have a unity transformation for data values close to zero so that small values are less distorted by the transformation. A transformation of this type was described by Webber 29 and is given as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 8 ; 1 1 6 ; 3 4 6 x ↦ T w ðxÞ ¼ σðxÞlog 10 ð1 þ lnð10ÞjxjÞ; (8) where σðxÞ is the sign function. This transformation, shown as a blue line in Fig. 11, has a unity slope at x ¼ 0, but its asymptotic behavior is different from the log 10 transformation because of the scaling factor lnð10Þ that is needed to achieve the desired behavior at the origin. For the pseudologarithmic visualization of the HDR images in this paper, we use a new transform that combines the unity transformation behavior for values near zero of the transformation in Eq. (8) with the asymptotic behavior of the transformation in Eq. (6). This is achieved by combining the transformations of Eqs. (6) and (8) using suitable weighting factors E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 9 ; 1 1 6 ; 2 3 1 x ↦ TðxÞ ¼ T w ðxÞe −βjxj þ T as ðxÞð1 − e −βjxj Þ; where β is a positive number. Transformation TðxÞ of Eq. (9) has the desired log 10 asymptotic behavior, and it is a unity transform near x ¼ 0. The pseudolog transformation of Eq. (9) is shown as the yellow line in Fig. 11. The parameter β was evaluated empirically and was set to 0.1 for the HDR images shown in this paper. A pseudolog representation of an HDR image is calculated by applying TðxÞ to each pixel of the image. Using the transformation of Eq. (9) for the visualization of HDR images shown in Sec. 4 has the advantage that noise properties can be estimated directly from the HDR image without first applying the inverse transform of TðxÞ. A limitation of pseudologarithmic representations of wide-range data is that data cannot be represented in a normalized fashion, as was done for the images shown in Corzo-Garcia et al., 23 because for pseudologarithmic transforms Tða∕bÞ ≠ TðaÞ − TðbÞ.