# Evaluation and Improvement of Lidar Performance Based on Temporal and Spatial Variance Calculation
## 4 Optimization of Data Acquisition Parameters and Calibration of Lidar Data
### Data Gluing between Analog Data and Photon-Counting Data  
Whatever the calculation results of temporal variance and spatial variance, the analog data is not distributed according to a Poisson distribution, as its variance distribution is not equal to the corresponding mean values. However, the scatter plot of the variance-mean distribution is parallel to the straight line \(y=x\), indicating that the analog data can be transformed to the PC-like data by a linear transformation, and the transformed PC-like data will have the characteristic of equality between the variance values and the mean values. If both analog data and PC data have an identical variance-mean distribution, the data traces could be uniformly merged by definition without any further requirement. The merging could thus be achieved by modifying analog data (\(A\)) into the transformed PC data (\(A^{\prime}\)), using a linear transformation:  
\[A^{\prime}=aA+b \tag{7}\]  
and the transfer coefficients \(a\) and \(b\) can be determined by minimizing the distance between the mean and the variance for all transformed PC data points (\(A^{\prime}\)) as:  
Figure 10: The number of non-zero photon-counting data distributions with different high voltages of PMT settings under clear atmospheric conditions, and the gain curve of the PMT.  
Figure 9: Spatial variance of the photon-counting data with different high voltages of the PMT settings in clear atmospheric conditions. (**a**) High voltage of 900 V; (**b**) high voltage of 600 V.  
\[\chi^{2}=\sum_{i}\left[\sigma^{2}(A^{\prime}_{i})-\mu(A^{\prime}_{i})\right]^{2} \tag{8}\]  
In the retrieval of the transfer coefficients, only the analog data with a high signal to noise ratio (\(>\)10) can contribute to the retrieval procedure. Figure 11 shows the retrieval results of the transfer coefficients \(a\) and \(b\), which are 0.2431 and \(-\)225.0, respectively. The variance-mean scatter plots of the raw analog data (SNR \(>\) 10 in near field) and the transformed PC data show that most of the transformed PC data have the necessary condition of Poisson distribution, in which the variance and its corresponding mean are basically equal.  
By linear transformation using the transfer coefficients \(a\) and \(b\), the analog data are shifted to the transformed PC data. Figure 12a shows the matching conditions between the transformed PC data and the PC data after dead time correction. It can be seen that within the bin index of 2000-3000, these two data traces are basically coincident. The merging point is selected at the position with the smallest dispersion between these two data traces, which makes the normalized lidar data trace constructed with the transformed PC data in the near field and the PC data after dead time correction in the far field (Figure 12b). The normalized lidar data trace improves the lidar detection capability and expresses the atmospheric condition uniformly.  
Figure 11: Spatial variances of lidar analog data and its corresponding transformed photon-counting data for determination of the transfer coefficients of \(a\) and \(b\).  
Figure 12: (**a**) Matching conditions between the transfer photon-counting data and the photon-counting data after dead time correction; (**b**) normalized lidar data trace constructed with the transformed PC data in near field and the photon-counting data in the far field. The green line marks the merging point.