Sub-pixel Spectral Reduction Algorithm for Echelle Spectrometer

A sub - pixel spectral reduction algorithm for the echelle spectrometer is proposed here to ensure a high spectral resolution for it. The initial model is established by separating cross - dispersion and calculating the imaging offset from the center. The geometric optics formula and mathematical function are used to calculate the offset in two vertical directions respectively. The deviation of the initial model is less than two pixels which is caused by coupling effect of the two vertical directions ， and it is too difficult and complicated to calculate true value of the deviation. Therefore, the method of mathematical fitting is used to update the model that the deviation can be reduced. The coordinates were contrast between algorithm and both ray tracing and experimental results to determine the deviation. The results show that the maximum deviation of the whole image plane is not greater than one pixels (sub - pixel level). The proposed spectral reduction algorithm thus significantly improves the spectral accuracy of the echelle spectrometer, and the model is simple to establish and modify, which renders it suitable for applications.


Introduction
With the development of spectral analysis technology, the demand for equipment with high spectral resolution is increasing. The echelle spectrometer has the advantages of a high spectral resolution, full-spectrum direct reading, compact structure, and small size [1][2][3][4][5][6]. In recent years, it has been widely used in laser-induced breakdown spectroscopy (LIBS) [7][8][9] and inductively coupled plasma emission spectrometer (ICP) [2,10] as the core instrument for spectral analysis. An ultra-high spectral resolution and full-spectral direct reading are its most important characteristics.
As the problem of overlap is solved by cross-dispersion in the echelle spectrometer, the two-dimensional (2D) spectrum received by the array detector needs to be converted to a certain wavelength by a spectral reduction algorithm. Because the wavelength cannot be calculated directly by the 2D comb spectrogram on the array detector, it is necessary to establish the corresponding relationship between the coordinates and the wavelength at the spot on the imaging plane. The spectral reduction algorithm is used to this end. Therefore, the spectral resolution is directly determined by the accuracy of the spectral reduction algorithm of the echelle spectrometer.
To determine the corresponding relationship between wavelength and the coordinates, many methods have been proposed. The coordinates are first traced by ray tracing software or detected by calibration light at certain known wavelengths. Interpolation, fitting, and other mathematical methods are then used to calculate the coordinates at unknown wavelengths [11][12][13]. The coordinates thus obtained are highly accurate, and the deviation from true value is significantly smaller than one pixel (sub-pixel level). However, the coordinates calculated by the mathematical method deviate significantly.
Although increasing the number of traced wavelengths or calibration wavelengths can improve accuracy, the amount of requisite calculation is large. Some experts have subsequently proposed methods that use induction. The method of formula functions has also been established by analogy and approximation. The wavelength can be determined at any coordinate using this method by calculating the offset at different wavelengths [14][15][16]. Although this method simplifies the spectral reduction algorithm, its accuracy is related to the degree of approximation in establishing functional relationships.
It seems that the contradiction between complexity and accuracy remains unsolved. Many researchers have proposed revisions and optimizations based on this idea with the aim of improving the consistency of the model under the premise of reducing its complexity [7,17,18]. At present, the highest attainable accuracy incurs an error of approximately one pixel.
In summary, combining ray tracing and mathematical processing yields high accuracy but is slow, and formula functions are fast but inaccurate. In view of this, a highly precise spectral reduction algorithm is proposed in this paper. The method using formula functions is improved to preserve its speed and cause deviation in it to follow mathematical laws. Therefore, its accuracy can be improved by fitting the deviation. The proposed method thus is highly accurate and fast. Both optical ray tracing software and experimental spectrum of mercury and argon were used to verify its accuracy.

Method
The basic idea is to combine the ray tracing method with mathematical fitting. First, the initial model is established according to geometric optics. Second, the functional relationship between the deviation in the initial model and the coordinates of actual spots is studied. Finally, the updated model is obtained by reducing the deviation through mathematical fitting, instead of calculating the value of the aberration and the bending of the prism spectral line that cause the deviation. In this way, both speed and the accuracy are significantly improved.
To express our ideas more clearly, in the following, we first introduce the optical path structure of the echelle spectrometer and the method to construct its initial model. Then, ray tracing software is used to reduce the deviation of initial model by curve fitting. Finally, the spectrum of mercury and argon was introduced to verify the accuracy of updated model considering all impacts.

Optical structure of echelle spectrometer
The echelle spectrometer is composed of an incident aperture, collimator mirror, echelle, prism, imaging mirror, and detector. With the development of optical design, researchers have learned that the placing a cylindrical lens in front of the detector can significantly improve the quality of imaging while keeping the optical structure simple. The most widely used optical structure is the research object of our algorithm, as shown in Figure 1. In the direction of dispersion of light from the echelle, the dispersion equation is satisfied as follows: where  is the incident angle,   is the diffraction angel, and  is the azimuth of the echelle. We can determine from Formula (1) that the diffraction angel is uniquely determined by the wavelength.
In the direction of dispersion of the prims, the laws of refraction and reflection of geometrical optics are satisfied. As the optical structure is determined, the angle of emission of the prism is uniquely determined by the wavelength.

Initial model
Without considering the coupling effects of the directions of dispersion of the prism and the echelle, such as by the bending of the spectral lines of the prism and aberration, the law of transmission of the main light in the two directions of dispersion is considered independently to establish the initial model.
In establishing this model, the optical structure is determined, and angular deviations along both directions of dispersion are uniquely determined by wavelength.

Directions of prism dispersion
Light passing through the collimator becomes parallel incident to the echelle. In the direction of dispersion of light from the prism, the echelle can be regarded as a plane mirror. As shown in Figure    To analyze the path of light around the focusing mirror in its direction of dispersion from the echelle, the incident and reflected planes were shifted to the same plane as shown in Figure 5. A8 is the vertex of the focusing mirror, H is the point of intersection of light and the focusing mirror, A9 is the center of the focusing mirror, G is the exit point of light on the front surface of echelle, A8 is the point of intersection of the vertical line between H and the optical axis, and the distance between A8 and O is no more than 0.5 mm, and can be ignored because the other lengths are generally greater than 200 mm. 8 HGA  is the angle between light emitted from the echelle and the optical axis, and can be calculated from the formula below. According to Formulae (4) and (5), we can obtain h2 and 1  :

Directions of echelle dispersion
The angle between the optical axis and the ray emitted from H satisfies the geometric relationship:

Updating model
Before discussing the coordinates of spots which influenced by many factors, aberration are considered first to test the method of curve fitting. The other factors can be considered as random noise.
Ray tracing software was used as the actual coordinates of spots when only the aberration effect is considered. The result of the deviation is shown in Figure 6.  Figure 6 shows that the deviation in the X direction (direction of dispersion of light from prism) was small with a maximum of 0.8 pixels, and that in the Y direction (direction of dispersion through the grating) was large with a maximum of 1.6 pixels. Although the initial model had higher accuracy than many prevalent algorithms, we modified it nonetheless for even higher accuracy.
As the initial model was constructed, X and Y were independent functions of wavelength λ, but the small coupling factors along the two dispersion directions were neglected. Formulae (3) and (7) should be written as:  The deviation in terms of the number of pixels decreased significantly after fitting, where deviation along the X direction was smaller than 0.2 pixels and that along the Y direction was smaller than 0.5 pixels for all coordinates. A comparison of deviations before and after model update is shown in Figure   8. Error X Error X after correction Error Y after correction Error Y Fig. 9. Contrast between results of modification on the image plane.
Error Y after correction Error Y Error X Error X after correction Fig. 10. Contrast of results of modification using 3D maps.

Results and discussion
It is obviously that initial model can be updated by curve fitting. Therefore, the method of curve fitting is used to test the deviation between updated model and actual coordinates. The spectrum of mercury and argon was captured by the echelle spectrometer. As the characteristic wavelength of mercury and argon were known, parts of which were used to update the initial model by curve fitting and the others were used to test the accuracy. As is shown in Fig.11, the spots marked red are used for fitting and green are used for testing. Fig.11 The spectrum of mercury and argon lamp The wavelength range of the echelle spectrometer is 190nm-900nm and the characteristic wavelength of mercury and argon lamp are distribute at 250nm-900nm. Therefore the spots of mercury and argon lamp are fallen at the left part of the CCD. Because of the dispersion of prism, long wavelength has low dispersion rate and short wavelength has high dispersion rate.
In addition to aberration, coordinates of the spot are affected by many factors, such as assembling error and temperature. The influence of aberration can be fitted according to the mathematical law, and other factors can be considered as random noise. Comparing the experiment data in table.1 and the ray tracing data in Fig.7, it is obviously that the trend of error distribution is same but the error value increases significantly.
As is shown in table.1 and Fig.12, the deviations are fitted using the spots marked in red. The fitting curve of coordinate X is half of quadratic curve. It is obviously that the y-direction coordinates are in good agreement with the fitting results but the maximal error at the x-direction is one pixel. The results meet the actual situation that the x-direction coordinates are influenced by environment because of the index of prism are temperature sensitivity.  The coordinates of spots marked in green in Fig.11 are recalculated using the fitting parameters, the results are shown in table. 2. The results show that the deviation from the actual results is less than 1 pixels after correction, which can meet the ultra-high accuracy requirements of the spectral reduction algorithm for the echelle spectrometer.

Conclusions
The accuracy of the spectral reduction algorithm is an important prerequisite to ensure a high spectral resolution of the echelle spectrometer. In view of this, a spectral reduction algorithm with sub-pixel accuracy was proposed in this paper. By combining geometric optical tracing with mathematical fitting, imaging shift was calculated in two directions of dispersion of light by the optical tracing method, and the deviation caused by the coupling of the directions of dispersion, such as through the bending of the spectral line of the prism and aberration, was directly reduced by mathematical fitting instead of calculating the actual deviation.
The proposed spectral reduction algorithm can thus ensure that the model and imaging coordinates are in good agreement. Simulation results shows that the deviation along the direction of dispersion of light from the prism was smaller than 1 pixels, and that along the direction of dispersion of light from the echelle was smaller than 1 pixels, thus reaching the sub-pixel level, meanwhile, the experimental results are in good agreement with the theoretical model. Therefore, the method proposed in this paper has high practical value, which is significant for the application of the echelle spectrometer.