# Robust Full-Screen Wavelength Calibration Algorithm
## 2 Spectrometer Construction and Related Principles
### Construction of the Scanning, Double-Layer, Secondary Diffraction, Linear-Array CCD Spectrometer  
The wavelength calibration method of the scanning, double-layer, secondary diffraction, linear-array CCD spectrometer is suitable for the high-precision spectrometer with a double-layer grating, linear grating ruler, collimating lens (spherical lens), converging lens (aspheric lens), bending mirror, continuous current dynamo, linear-array CCD, raster scanning mechanism, etc. The spectrometer usually includes an optical path module, an integrated control module, a signal acquisition and processing module, and a portable industrial computer. In the optical path module, as demonstrated in Figure 1, the components numbered from 1 to 10 represent the filter, incident slit, shutter, spherical lens, grating group 1, plane mirror 1, plane mirror 2, grating group 2, aspheric lens, and linear CCD, respectively. Figure 1 clearly shows how an incident light propagates inside the spectrometer. Here, the red and blue lines indicate the upper and lower layers of the optical path, respectively. The integrated control module mainly includes a power supply, slit control module, filter control module, grating group control module, and rotating mirror control module. The signal acquisition and processing module is a high-speed acquisition and processing circuit of a linear-array CCD. The portable industrial computer is the sender of the received instruction, and the receiver of the feedback signal of the integrated control module, as well as the the signal-receiver of the signal acquisition and processing module. The double-layer grating comprises four gratings, and each group of two gratings has the same number of lines. Grating group 1 and grating group 2 were placed with a 1200-line grating and 2400-line grating, respectively, back-to-back and in parallel. Grating group 1 and grating group 2 were rotated in a common axis. Both 1200-line grating group 1 and 1200-line grating group 2, and 2400-line grating group 1 and 2400-line grating group 2, were simultaneously used for optimal path diffraction. The two groups of gratings were placed at the top and bottom of a plane. The upper and lower gratings with the same number of lines formed a group of dispersion units, and each group of dispersion units was installed on the same scanning rotation axis. The spectrometer has a sine mechanism. The linear grating ruler was installed on the linear guide rail, and the reading head was installed on the sinusoidal rod. The purpose was to feedback the rotation position of the  
Figure 1: The optical layout of the discussed spectrometer. grating and monitor the accuracy of the raster scanning positioning. The detector was a linear-array, charge-coupled device (CCD), with a pixel number of \(2048\times 1\). By processing of signal acquisition and the processing module, we obtained the wavelength map spread with 2048 pixels in the upper computer. The \(1024 th\) pixel is called the central pixel and the rest are called non-central pixels. Typical light sources include mercury lamps and lasers. When the shutter is opened during measurement, the light emitted by the light source passes through the filter to filter out the secondary spectrum, and the slit width is adjusted so that there is a good match between the useful signal received by the spectrometer and the spectral resolution. After that, the light passes through a spherical lens and the diverging light is collimated to parallel light. Parallel rays are split through grating group 1, and the rays of different wavelengths are reflected in plane mirror 1 at a certain angle. After being processed by plane mirror 1 and plane mirror 2, the upper optical path is transferred to the lower optical path. The light reflected by the plane mirror groups passes through grating group 2, and is split twice by grating group 2. Light rays of different wavelengths are reflected in the aspheric lens at twice the angle of the corresponding wavelength of grating 1.