# Remote Spectral Identification in the THz Band with Reflection Spectroscopy in an Open Atmosphere
## 4 Results
### Identification Results  
_Calculating Spectrum Similarity_  
Spectrum similarity is a metric used to measure how two different spectra are related. In this article, we use only most common methods used to calculate spectrum similarity, the Pearson correlation coefficient.  
\[\rho(A,B)=\frac{1}{N-1}\sum_{i=1}^{N}\biggl{(}\frac{A_{i}-\mu_{A}}{\rho_{A}} \biggr{)}\biggl{(}\frac{B_{i}-\mu_{B}}{\rho_{B}}\biggr{)}, \tag{3}\]  
This method measures the linear correlation between two spectra by using a correlation coefficient. It is often used to compare the similarities of two spectra in the same band. The higher score values of the comparison indicate that the spectra are more similar, while lower scores of the comparison indicate that they are less similar. Results of the comparison are show in two sets. First, Table 3 contains the correlation efficiencies of six materials measured over 1 m, presented in Figures 7-12. Data from this part of the experiment have not been processed in any way. Results were computed from the comparison of reference data and raw data from the detector.  
Figure 14: The reflectance spectra of PABA measured in the 0.67–1 THz range in an atmosphere with 44% RH. The presented water vapor absorption spectra were measured in the transmission configuration.  
Figure 13: The reflectance spectra of RDX measured in the 0.67–1 THz range in an atmosphere with 40% RH. The presented water vapor absorption spectra were measured in the transmission configuration.  
The second set of correlation coefficients, presented in Table 4, contains results measured over 1, 3, and 5 m, as presented in Figures 13 and 14. Data from this part of the experiment were submitted to noise reduction and signal filters. Namely, outlier elimination was applied, and a few missing points were filled by calculating the interpolation between neighboring points. A basic low-pass filter was applied, and finally, curves were smoothed with a moving average. Results were computed from a comparison of reference data and raw data from the detector.  
In the case of measurements at 1 m distance, we can see that correlation scores in Table 3 span from 0.23 up to 0.87, and in Table 4 span from 0.58 to 0.94. Particularly for lactose, when results from both sets are compared, we can see significant improvement from 0.36 to 0.94. When we investigate the measurement data collected at different distances, there is a tendency for the correlation coefficient to decrease with increasing distance. Since the overall detected power levels were high, the decrease in the correlation coefficients most probably was caused by the decrease in the signal-to-noise ratio. Values of the correlation for RDX in the Table 4 show an almost constant value. The authors believe that the lack of correlation value decrease is a coincidence of the main spectral feature of RDX present in the 0.7-0.9 THz range perfectly aligning with the spectral range of the source with the highest power output. This provided an additional 10+dB of dynamic range in the crucial spectral range. Authors believe that with increasing distance, the decrease in correlation values would appear eventually.  
In conclusion, there are many methods used to calculate spectrum similarity. Each method has its own advantages and disadvantages, and should be selected depending on the specific application. The proposed methods identified all test chemicals correctly when used with processed data. This indicates that the methods could be used in a laboratory-based experiment. For real life applications, a more complex solution may be desired. Recent advancements in the area of scientific computing, machine learning, neural networks, and similar make it possible to prepare tailored methods, adapting to the appropriate aspects of the experiment.