{'fraction_non_alphanumeric': 0.036511558686377614, 'fraction_numerical': 0.01627145550153785, 'mean_word_length': 4.640738668158925, 'pattern_counts': {'":': 0, '<': 1, '<?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}}
Spectral imaging with dual compressed sensing

We experimentally demonstrated a spectral imaging scheme with dual compressed sensing. With the dimensions of spectral and spatial information both compressed, the spectral image of a colored object can be obtained with only a single point detector. The effect of spatial and spectral modulation numbers on the imaging quality is also analyzed. Our scheme provides a stable, highly consistent approach of spectral imaging.

1 Spectral imaging, which can capture both the spatial information and spectral information of an object, is of great importance in physics and biology as it can give rich evidence in the diagnoses of matter component and structure [1][2][3] . For a spectral image, there are three dimensions of information to be measured, two-dimensional spatial information and onedimensional spectral information. It is obviously not possible to obtain three-dimensional information in one time measurement with current detectors. As an alternative approach, the detection of spatial image or spectrum should to be performed by scanning, which will lead to mechanical movement and reduce the stability of imaging.
In recent years, a sampling theory called compressed sensing (CS) is derived and attracts widely interests [4][5][6][7] . With this theory, one can measure a signal with sampling number far less than Nyquist-Shannon theorem demands [8][9][10][11] . Based on CS theory, Baraniuk et al. proposed an imaging approach named single-pixel camera, in which only a single pixel detector is needed to image a two-dimensional object [12][13][14] . This experiment shows that CS makes it possible to reduce the detection dimensions, which is very important in spectral imaging.
The CS theory is also applied in spectral imaging [15][16][17] . Arce et al. obtained spectral images with an array detector needless of scanning through CS theory [18][19][20][21] . In this paper, it is shown that by dual compressed sensing, we can reduce the detection dimensions in both spatial space and spectral space, and only a position-fixed single pixel detector is needed to achieve spectral imaging.
Compressed sensing is a measurement theory in which sampling can be performed with number less than unknown in the signals [8][9][10][11] . The applying of CS theory has two conditions. First, the signal x with unknown number of p must be sparse, or sparse under certain basis such as discrete cosine transform or wavelets. Second, a linear measurement on the signal must be performed. That means, we measure the scalar product of the signal and a measurement matrix A with size q × p (q < p): in which e is the measurement noise. As the number of measurement result y is only q which is less than the unknown, Eq. (1) can not be solved directly. However, if the measurement A is a random matrix, the signal x can be reconstructed by solving the following optimization problem: It is proved mathematically that for a signal with sparsity k, it can be constructed accurately through q ≥ Ck log (n/k) measurements, in which C is a constant coefficient 10,11 . The experimental apparatus is given in Fig. 1. A halogen lamp illuminates on the object, which is imaged onto the Digital micromirror device (DMD) by a lens L1. The DMD consists of 1024 × 768 micromirrors which can reflect the light to two directions individually.
Controlled by the matrix loaded on the DMD1, it can reflect the modulated image to the direction of collecting lens L2, which focuses the light to a pinhole. The light is collimated by the lens L3 and illuminates on the blazed grating. The spectral line will emerge on the focal plane of L4, on which another DMD2 locates. Similarly with DMD1, the DMD2 reflects the modulated spectral line to the lens L5, which collects the light to a photomultiplier tube (PMT).
The working timing sequence of DMDs and PMT is shown in Fig. 2

. M random matrixes
A (x, y) are loaded on DMD1 sequentially, modulating the spatial information of the object.
When DMD1 states on each modulation, N random matrixes B (λ) are loaded on DMD2 sequentially, modulating the spectral information of the object. During each modulation of DMD2, the PMT detects the total intensity of object under the spatial modulation A (x, y) and spectral modulation B (λ).
The spectral image of the object can be expressed by T (λ) (x, y), in which λ denotes the wavelength and (x, y) denotes the spatial coordinate. The modulation process of DMD1 can be described mathematically as in which S (λ) is the spectrum of the image all over the modulated spatial area, which is also the image on DMD2. The modulation process of DMD2 can be described as in which I is the total intensity detected by the PMT. Based on CS algorithm, the spectrum S (λ) can be recovered by B (λ) and I, and then the spectral image T (λ) (x, y) can be reconstructed by S (λ) and A (x, y).
In our experiment, the object to be imaged is a film printed a green"C" and red "S" on it, which is shown in the left bottom of The experimental results are shown in Fig. 3

. Based on CS algorithm, in each modulation
A (x, y) on DMD1 we can obtain a spectrum line according to the N = 450 modulations on DMD2 and correspondent intensity I detected by the PMT, which is shown as a row in Fig. 3(a). Corresponding to spatial modulations on DMD1, M = 3000 spectrum lines are recovered. For clear vision, we only show the first 200 spectrum lines in Fig. 3(a). Each column of Fig. 3(a) indicates the intensity fluctuation of the same wavelength. Combined the spatial modulation on DMD1 and intensity fluctuations of different wavelengths, we can reconstruct images of different wavelengths with CS algorithm for the second time. giving the green "C" and red "S", which is shown in Fig. 3(c1) and (c2). From the imaging results, by our spectral imaging system with dual compressed sensing, we can obtain the images of various wavelengths without affected by other spectral components. If we integrate the intensity in each row of Fig. 3(a) over the whole spectrum, the spectral information will be vanished and the image without spectrum can be obtained, similarly to the conventional compressed sensing imaging. The intensity fluctuation of the all-spectrum imaging is shown 5 in Fig. 3(b3) and the corresponding imaging result in Fig. 3(c3  To study the impact of sampling numbers on the imaging quality, a simulation is performed. The spectral object is still a green "C" and red "S", the center transmission wavelengths are 500 nm and 600 nm, respectively, with spectral widths both 40 nm. The image pixel is 64 × 64, and the spectrum ranging from 400 nm to 700 nm expands on 1 × 1024 pixels. The image with spectrum range of 480 nm to 520 nm is recovered to reveal the green "C". Fig. 4 presents the reconstructions for various numbers of spatial modulation m and 6 spectral modulation n. In the three rows, the number of n is 200, 400, and 600, respectively, and in the three columns, the number of m is 800, 1600, and 2400, respectively. It is obviously that the increase of both m and n can improve the imaging quality, while the particular impacted aspects are different. In Fig. 4(a1-a3), the sampling number in spectral information n is only about 20% of the spectrum pixels, causing inaccurate in the reconstruction of spectrum, resulting in the emergence of "S" in the reconstruction results, as the information of other wavelengths is contained in the intensity fluctuations of spectrum used to recover the "C". When the spectral sampling number increases, the spectrum can be reconstructed accurately and the red "S" will not be imaged, as shown in Fig. 4(b) and Fig. 4(c). From the left column to the right column, the increase of spatial sampling number m can dramatically decrease the noise in the images, while it is unrelated with the spectrum reconstruction accuracy. In Fig. (a), with the increased m, the image of "S" even tends to be more clear.
As the intensity fluctuations of the reconstructed spectrum have contained the information of "S", the increase of spatial samples can improve the quality of ghost image which should not appear with the right image simultaneously. From Fig. 4, it is shown that the spectral modulation n decides the accuracy of spectrum reconstruction, and the spatial modulation m affects the noise level in the image. This conclusion is meaningful in the design of experiment. In fig. 4(a3) and Fig. 4(c1), the sampling number decided by m × n is the same, while the spectral imaging result is quite different. In fig. 4(a3), the large number of spatial modulations m makes the imaging noise be very low. However, the lack of enough spectral modulations n causes ghost image in the spectral image, which is fatal in most spectral imaging applications, as spectrum information is usually with high interest. In fig. 4(c1), the ghost image is eliminated by enough spectral modulations n. Although there is a relatively high noise level, it can be distinguished artificially according to experience in most situations. Therefore, in spectral imaging, the proper choice of spatial modulations m and spectral modulations n is important for a finite sampling time. To obtain accurate spectrum information, enough number of spectral sampling should be guaranteed.
In conclusion, we experimentally demonstrated a spectral imaging scheme with dual compressed sensing. We successfully obtain the image of a spectral object with only a point detector, with spatial sampling and spectral sampling number both compressed. We analyze the effect of spatial modulation number and spectral modulation number on the imaging quality. Through simulation, we find that the spectral modulation number must be enough to avoid emerging false ghost image in the result. As our spectral imaging scheme does not need mechanical movement and each measurement is an overall sampling, it has satisfying stability and consistency. Therefore, we hope that it will have wide applications in material, biology and other fields in which spectral imaging is interested.