# Robust Full-Screen Wavelength Calibration Algorithm
## 4 Experimental Studies
### Validation on the Instrument  
In this subsection, we qualitatively analyze the calibration algorithm. This is shown in Figure 6, where the horizontal axis indicates the wavelength. On the vertical axis, the left part denotes the signal energy collected by CCD, while the right part denotes the signal voltage value. In Figure 6, the full width at half-maximum (FWHM) reflects the spectral resolution, \(W\) represents the wavelength value calibrated by the algorithm, \(P\) represents the pixel position, \(C\) means the signal energy value collected by the CCD, and \(V\) represents the signal voltage value. The units of these values in Figure 6 are nm, nm, pixel, count, and \(V\). The left subplot of Figure 6 shows the calibration accuracy of the fitting wavelengths. At the characteristic peak of 404.65 nm, the wavelength after calibration is 404.696 nm. The calibration accuracy at this pixel is 0.046 nm, and the spectral resolution is 0.016 nm. This shows that the calibration algorithm can achieve better calibration results on the fitting wavelengths. Moreover, we rotated the feature peak to the 1006 th pixel and other ones, and the calibration result remained unchanged. This reveals that the wavelengths at non-central pixels can be calibrated to meet the practical requirements. At the same time, to qualitatively study the calibration accuracy of the calibration algorithm beyond the fitting points, we used a variety of pulsed lasers to perform pulse verification on the spectrometer. The real wavelength was 532 nm and a 1-10 Hz pulsed laser was used. The wavelength after calibration was 532.045 nm, and the calibration accuracy of the test wavelength was 0.045 nm. The spectral resolution was 0.020 nm. The results are shown in the right subplot of Figure 6. This shows that the calibration algorithm can achieve better calibration results, even on the non-fitting points. For the full-screen calibration algorithm (i.e., Algorithm 3), we employed the parameters estimated above and wrote the calibration algorithm into the signal processing module of the spectrometer. After experimental verification, the calibration results are shown in Table 5.  
Figure 5: Qualitative comparison between Huber and LS. We carried out experiments with three spectrometers with the same structure; the obtained results are reported in Table 5. The second column is the standard value \(\lambda_{s}\) of the wavelength standards. Considering the given standard wavelength value \(\lambda_{s}\), six measurements \(\lambda_{i}(i=1,\cdots,6)\) were implemented to check the stability of the calibration algorithm. The third column of Table 5 lists the mean measured wavelengths \(\overline{\lambda}_{n}\). In the fourth column, the wavelength accuracy \(\Delta\lambda_{n}\) is reported, and \(\Delta\lambda_{n}=\overline{\lambda}_{n}-\lambda_{s}\). The fifth column represents the repeated-measurement accuracy \(\Delta\). Here, \(\Delta\) is computed as \(\Delta= \begin{cases}min,&|max|<|min|\\ max,&|max|>|min|\,,\text{ where }min=min_{i=1}^{6}(\overline{\lambda}_{n}-\lambda_{i}) \text{ and }max=max_{i=1}^{6}(\overline{\lambda}_{n}-\lambda_{i})\text{.}\\ \pm|max|,&|max|=|min|\\ \end{cases} \)  
\(\lambda_{i})\). It is noteworthy that the wavelength accuracy \(\Delta\lambda_{n}\) reflects the calibration accuracy of the algorithm, and the wavelength repeated-measurement accuracy reflects the stability of the algorithm. Table 5 shows that the wavelength accuracy was within \(\pm 0.05\) nm and the accuracy of the wavelength repeated measurements was within \(\pm 0.005\) nm when measuring the characteristic spectra of the mercury lamp. Through the experiments conducted on the three spectrometers, the spectral wavelength errors obtained at the central pixel of the 2400-line grating were all within 0.05 nm. We met the design requirements of the NIR spectrometer. The 1200-line grating reached similar conclusions; the results are omitted here due to the limited space in this paper.