{'fraction_non_alphanumeric': 0.034972472472472475, 'fraction_numerical': 0.014702202202202202, 'mean_word_length': 4.754139668826494, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
High-SNR snapshot multiplex spectrometer with sub-Hadamard-S matrix coding

We present a robust high signal-to-noise ratio (SNR) snapshot multiplex spectrometer with sub-Hadamard-S matrix coding. We demonstrated for the first time that the sub-Hadamard-S matrix coding could provide comparable SNR improvement with Hadamard-S matrix in Hadamard transform spectrometer (HTS). Normally, HTS should change the coding mask to obtain a reasonable spectrum result, causing unexpected time-consuming. An extra imaging path to collect the light intensity of the aperture is added in this paper. Both light intensity of the aperture and overlapped spectra are captured within one shot, turning Hadamard-S matrix coding into sub-Hadamard-S matrix coding. Simulations and experiments show that the proposed method could obtain comparable SNR improvement with the traditional HTS, maintaining snapshot.


Introduction
Spectrometer is an important tool used in widely scientific research, such as, chemical detection, medicine research. There are two fundamental problems challenge the result accuracy of the spectrometer, one is the weak source, the other is transient phenomenon. Sometimes it should deal with both of the problems, for example, the research of laser-matter interaction. There are two mainly remarkable technologies are proposed to address the spectrum measurement of weak source, Hadamard Transform Spectroscopy (HTS) and Fourier Transform Spectroscopy (FTS). Unfortunately, both of the technologies need many extra measurements to improve the SNR of result, which means that both of them can't deal with spectrum of weak source in transient phenomena. Snapshot measurement maintaining high signal-to-noise ratio (SNR) of result is demanded. Besides, as a measurement reliable improvement is very important, which means it should have a certain lower bound.
In order to realize high throughput advantage within snapshot, some creative ideas have been proposed, such as, spectrometer based on compressive sensing [1][2][3][4][5][6], computational slits [7,8] and deconvolution [9]. These methods try to improve the SNR and resolution of spectrum with numerical methods. However, compared with the coding aperture, the numerical methods are limited by the algorithm and structure of signal. Specifically, the retrieval algorithms are proposed to deal with the so-called ill-posed inverse problems, which means it cannot guarantee certain and robust SNR improvement.
The estimated results depend on the structure of signal and type of noise. The traditional multiplexing methods, such as HTS [10][11][12], guarantee certain improvement of SNR in detector noise dominated. Especially, the SNR boost would increase along with the scale of coding matrix [13][14][15]. Unfortunately, the traditional multiplexing would cause unexpected heavy time consumption. Spectrometer with certain and continuous SNR boost, maintaining snapshot, would enormously extend the application.
Among difference types of coding matric, Hadamard-S matrix is well-structured and easily to implement. Besides, it is the mostly used coding matrix in multiplexing, based on which a static, multimodal, multiplex spectrometer (MMS) is proposed [16]. In MMS, based on compressed sensing (CS), Nonnegative least-squares (NNLS) [16][17][18] method is employed to reconstruct the spectrum of the scene. It could realize a snapshot measurement keeping high-throughput advantage, and even estimate spectral images of target. MMS has a compact optical struct and can obtain high SNR measured results, however, in MMS the light intensity is represented by coding matrix and make the reconstructed results unstable. A dual-camera coded aperture snapshot spectral imaging is proposed [19] to overcome this drawback. The authors add an extra imaging path to detect the light intensity and then use two-step iterative shrinkage/thresholding (TwIST) [20] to obtain the final results. However, according to the theory of CS, the accuracy of reconstructed result depends on the structure of signal.
In this paper, we introduce a new coding matrix called sub-Hadamard-S matrix, which gains HTS comparable SNR improvement, maintaining snapshot. The proposed method contains two imaging paths: non-dispersive imaging path and dispersive imaging path. The nondispersive imaging path is employed to measure the light intensity at the coding aperture. The dispersive imaging path is employed to measure the overlapped dispersive spectra. Due to the variation of the light intensity at the aperture, the standard Hadamard-S matrix coding would be turned into a sub-Hadamard-S matrix. We demonstrated that the sub-Hadamard-S matrix coding could realize a proximity denoising capability with the Hadamard-S matrix coding. Most important, it could provide a tool to address the problem of spectrum detection of transient weak signal.

Implementation of snapshot multiplex spectrometer
The implementation and scheme of the proposed snapshot spectrometer with sub-Hadamard-S matrix coding are shown in Fig. 1(a) and 1(b), respectively. In the implementation, Hadamard-S matrix is employed to code the light at aperture. A beam splitter (split ratio, 70:30) is utilized to split the beam into two. One is reformed to detect the light intensity distribution of the aperture, which is employed to retrieve the coding matrix, called nondispersive path. It would be a sub-Hadamard-S matrix, as the light intensity of pixels would not be the same as each other. Another light beam is dispersed by the blazed grating, and is reformed as overlapped spectra of different pixels at aperture. The system contains two CCDs and they work at the same time and controlled through the synchronizing signal of DMD. The CCD1 is employed to collect the overlapped dispersed spectra and CCD2 is employed to collect the non-dispersed image of the aperture on DMD. The ground glass is employed to uniform the light intensity. The DMD used in this paper is D-ED01N, its resolution is 1024×768 and the pixel size is 13.68μm×13.68μm. The CCD is Basler acA1920-155um, its resolution is 1920×1200 and the pixel size is 5.86μm×5.86μm. The non-dispersive imaging path is easily to understand due to only mirror reflection and lens focusing involved. The light intensity will be modulated by the coding aperture (Hadamard-S matrix) on DMD. Taking the 77  Hadamard-S matrix as an example, Fig. 2 shows the coding process. Through using suitable focal length lens, we can guarantee each pixel of DMD is imaged by one or more pixels of camera. Then, we use the method mentioned in [21] to extra the light intensity of the scene. The implementation of snapshot HTS could be turned into a multiplexing coding spectrometer (Fig. 3), if the non-dispersive imaging path is not considered, described in [4,[16][17][18]. The measurement problem of dispersive imaging path in traditional HTS [4,[16][17][18] can be described as: () C = S Ι f (1) where, S is the coding matrix, I is the light intensity, is Hadamard product operation, f is the spectra need to be measured, C is the measured overlapped spectra. In traditional HTS, the measured spectrum is modulated by the light intensity.
Traditional HTS needs n times measurements to reconstruct the spectrum, obtaining reliable SNR improvement, n is the order of coding matrix. In the snapshot HTS, the light intensity distribution of aperture is modulated by the coding matrix, which can be stated as S I = S I . In the snapshot HTS, mapping the whole coding matrix (Hadamard-S matrix) to the DMD to encodes all spectra. Based on our pervious works [9,13,15], we take 7×7 Hadamard-S matrix as an example to explain the physical mechanism and mathematical expression of snapshot HTS in Fig. 4.  Fig. 4, S1 is 1 st row of Hadamard-S matrix, I1 is the 1 st row light intensity distribution of the scene, f1 is the spectrum of 1 st row of the scene, f11 is the spectrum of 1 st pixel in 1 st row and m represents its range, the zeros in the spectrum represent the shift invariant and make the processing easy to understand. The measurement problem of i th row of snapshot HTS is stated as: where, i g is overlapped dispersed spectra of i th row spectra, Specifically, the snap S has a key feature, which state as: . If each row of the scene has the same spectra or we want to measure the average spectra of each column, i.e.
where, 1 S is the difference between Hadamard-S matrix S and the normalized modulated light intensity distribution snap S , which satisfies Unlike NNLS, the problem of snapshot HTS is a welldefined problem, which means that we can obtain a certain and stable SNR boost. In the next section, we will analysis the SNR boost of snapshot HTS more detailed.

SNR analysis
In order to compare the denoising performance of sub S-matrix with Hadamard-S matrix, firstly, the restored spectrum f can be stated as:    The SNR of snapshot HTS degrades about 1 10log 1 k   −  (dB) compared with traditional HTS, which meets the conclusion obtained in Eq. (12). In snapshot HTS, the ground glass will make the disturbance factor lower than 0.5, in this way snapshot HTS will obtain more obvious SNR boost.

Simulation and Experimental Results
In order to demonstrate the denoising capability of sub-Hadamard-S matrix, we benchmark snapshot HTS in both simulations and experiments. Fig. 5 shows the denoising capability comparisons among snapshot HTS, HTS, MMS and slit-based spectrometer among the disturbance of light intensity k from 0.01 to 0.99 as 0.01,0.02, ,0.99 . Specifically, 127 127  Hadamard-S matrix is employed, the normalized solar spectrum is utilized as the original reflectance data, White Gaussian noise is simulated as detector noise. For the robustness, we perform all of the instances 100 times, and present the average value as the final result.
Since the NNLS method belong to so-called ill-posed inverse problem, in MMS, when 127 127  Hadamard-S matrix is employed, we will obtain 127 reconstructed spectra. However, in these spectra, it is hard to seek the "best" or the highest SNR spectrum, since the SNR of these spectra are quite different. In the simulation results, we record all SNR of reconstructed spectra in each simulation and we use mean SNR boost of each spectrum and the confidence interval of all measured spectra to evaluate the stable of all method. As shown in Fig. 6, the SNR boost of spectra located in different rows reconstructed by NNLS, are quite different. With the disturbance of light intensity increase, the SNR distribution will become more and more unstable. In practical, for a given reconstructed spectrum in MMS, we cannot ensure its SNR boost and limits its applications. However, snapshot HTS and traditional HTS have much more stable SNR boost.
In order to evaluate the distribution of SNR of all methods, we employ confidence interval to measure stableness of all methods based on the 100 127=12700  simulated spectra. Suppose that the distribution of SNR obey Gaussian distribution with mean value μ and variance 2  . According to law of large numbers and central limit law, the simulated results obey Gaussian distribution with mean value μ and variance 2 /12700  . Thus, in 95% confidence interval, the range of different methods are shown in Table. 1. 6.14-6.77 6.14-6.76 As shown in the Table. 1, for a given spectrum measured by MMS, its SNR distribution range is too wide, and with the disturbance of light intensity increase the distribution range will become more and more wide. That is to say, the lower bound of SNR boost is too small even smaller than slit-based spectrometer when the disturbance of light intensity is obvious. The SNR distribution range of snapshot HTS and HTS is much narrower than MMS, which means the lower bound of SNR boost of snapshot HTS and HTS is much higher than MMS. Slit-based spectrometer has the narrowest SNR distribution range, however, its SNR boost is too small and cannot be used to measure weak intensity signal.
We show some representative reconstructed spectra of all methods with the disturbance factor 0.1,0.5 k = in Fig.  7, respectively. For MMS, we select the spectrum with the mean SNR of all 127 reconstructed spectra. According to the simulation results (Fig. 7), snapshot HTS and HTS significantly outperform slit-based spectrometer, while detector noise dominated. However, we can find that, the advantage of snapshot HTS would decrease along with the increase of disturbance of light. When the light distribution of the scene is very smooth, HTS and snapshot HTS have almost the same performance. Though the variation of scene would degrade the denoising performance of snapshot HTS, it still has a significant improvement of SNR. Like snapshot HTS, the performance of MMS would decrease along with the increase of disturbance of light. However, as mentioned above, the SNR boost of MMS is not stable and limits its applications.
To evaluate the denoising capability in the real scene, we measure the SNR of snapshot HTS, HTS, MMS and slit-based spectrometer in low level light. In the experiment, we use an absorptive neutral density filter to cover an LED to simulate the low level light source. We use slit-based spectrometer to obtain the standard spectrum with high light of LED and long exposure time. In order to compare performance of all methods quantitatively, we set the same exposure time in snapshot HTS, HTS, MMS and slit-based spectrometer. Since we have the standard spectrum, we select the highest SNR of reconstructed spectra of MMS as the result of MMS. The final results are shown in Fig. 8. In Fig. 8, 10ms and 0dB means the exposure time of CCD is 10ms and gain is 10dB, so is 100μs and 36dB. The experimental results have demonstrated that compared to slit-based spectrometer, snapshot HTS has much higher sensitivity and much better robustness ( Fig. 8(a), (b)). Compared to MMS, snapshot HTS is a well-defined problem and can obtain better results. Compared to HTS, snapshot HTS has almost the same performance. That is to say, compared to the standard Hadamard-S matrix, the sub-Hadamard-S matrix has almost the same denoising capability.
Moreover, Hg lamp is employed to obtain the spectral resolution of snapshot HTS. The result of snapshot HTS is shown in Fig. 8(c). The corresponding peaks (577 nm and 579 nm) are located at 480 pixel and 485 pixel, that is to say, the spectral resolution of snapshot HTS is higher than 1 nm/pixel. Compared to traditional silt-based spectrometer, the proposed snapshot HTS has almost the same spectral resolution.

Conclusion
In brief, we proposed a snapshot HTS based on sub-Hadamard-S matrix in this paper. As far as we know, it is the first time a coding spectrometer is realized, having comparable SNR boost with HTS, maintaining snapshot advantage. It demonstrated that sub-Hadamard-S matrix coding still has significant SNR boost. The denoising capability of coding matrix is quite robust while the element of coding matrix is varying. This feature makes the high SNR snapshot spectrometer feasible. Different from traditional HTS, an extra imaging path to collect the nondispersed image of coding aperture is added in the proposed system. Therefore, we could turn the Hadamard-S matrix coding measurement into a sub-Hadamard-S matrix coding. Though the extra imaging path increase the complexity of the system, we can realize snapshot and obtain stable SNR boost. More importantly, different from snapshot spectrometer with convolution or compressive sensing, it is a kind of well-defined problem, which means the SNR boost has a lower bound. Compared to slit-based spectrometer, snapshot HTS could gain much higher SNR. Compared to traditional HTS, snapshot HTS can achieve comparable performance but with much higher speed. Compared to numerical method such as, MMS and dualcamera coded aperture snapshot spectral imaging, snapshot HTS is a well-defined problem and can obtain better and more stable results.