# A Simplified Pointing Model for Alt-Az Telescopes
## 3 The Methodology for Creating the Telescope Pointing Model
### Fitting the Pointing Model  
The pointing error distribution of an alt-az telescope is typically characterized by a series of sine or cosine functions. This method utilizes a fundamental function, as follows:  
\[A_{1}(\Theta)sin(A_{2}(\Theta)\Phi+A_{3}(\Theta))+A_{4}(\Theta) \tag{2}\]  
where \(\Phi\) represents the true azimuth angle and \(\Theta\) represents the true elevation angle, both of which in the local geodetic horizontal coordinate system. The coefficients \(A_{1}(\Theta)\), \(A_{2}(\Theta)\), \(A_{3}(\Theta)\), and \(A_{4}(\Theta)\) are functions of the elevation angle. The fitting is realized in the following three sub-steps:  
Step 1: A function fitting is performed on the azimuth angle error matrix. For a given elevation angle \(\Theta\), a sine function fitting is performed on azimuth angle error data gathered at different azimuth angles. This process yields multiple sets of coefficients, as follows:  
\[\left[\begin{array}{c}A_{11},A_{21},A_{31},A_{41};\\ A_{1i},A_{2i},A_{3i},A_{4i};\\ A_{1n},A_{2n},A_{3n},A_{4n};\end{array}\right] \tag{3}\]  
Here, \(i=1,2,\,\ldots\,n\), where \(n\) is a positive integer representing the number of elevation angles observed. \(A_{1i}\), \(A_{2i}\), \(A_{3i}\), and \(A_{4i}\) represent the coefficients of the basic function corresponding to the elevation angle \(\Theta_{i}\). In this work, we imaged the sky at 7 elevation angles, from \(20^{\circ}\) to \(80^{\circ}\), with a step of \(10^{\circ}\).  
Step 2: Separate function fittings on \(A_{1i}\), \(A_{2i}\), \(A_{3i}\), and \(A_{4i}\), with respect to the elevation angle \(\Theta_{i}\) (\(i=1,2,\,\ldots\,n\), \(n=7\)), are performed to derive functions \(A_{1}(\Theta)\), \(A_{2}(\Theta)\), \(A_{3}(\Theta)\), and \(A_{4}(\Theta)\). These functions can also be obtained for any arbitrary elevation angle \(\Theta_{x}\) through interpolation. As a result, the azimuth angle error function is established as follows:  
\[\Delta\Phi(\Theta,\,\Phi)=A_{1}(\Theta)sin(A_{2}(\Theta)\Phi+A_{3}(\Theta))+A_ {4}(\Theta) \tag{4}\]  
For the elevation angle error matrix, the same fitting method as the azimuth angle error matrix can be applied. This allows the establishment of the elevation angle error function, as follows:  
\[\Delta\Theta(\Theta,\,\Phi)=B_{1}(\Theta)sin(B_{2}(\Theta)\Phi+B_{3}(\Theta))+ B_{4}(\Theta) \tag{5}\]  
Step 3: The correction of the residual errors is performed. After we have obtained the two functions, \(\Delta\Phi(\Theta,\,\Phi)\) and \(\Delta\Theta(\Theta,\,\Phi)\), we can calculate the residual errors of the functions relative to the error matrices. The azimuth and elevation residual errors are then both fitted with a 5-order polynomial, as follows:  
\[E_{\Phi}(\Phi)\;(\text{or}\;E_{\Theta}(\Phi))=C_{0}+C_{1}\Phi^{1}+C_{2}\Phi^ {2}+C_{3}\Phi^{3}+C_{4}\Phi^{4}+C_{5}\Phi^{5} \tag{6}\]  
The final azimuth error functions are as follows:  
\[\Delta\Phi(\Theta,\,\Phi)=A_{1}(\Theta)sin(A_{2}(\Theta)\Phi+A_{3}(\Theta))+ A_{4}(\Theta)-E_{\Phi}(\Phi) \tag{7}\]  
and the elevation error functions are as follows:  
\[\Delta\Theta(\Theta,\,\Phi)=B_{1}(\Theta)sin(B_{2}(\Theta)\Phi+B_{3}(\Theta))+ B_{4}(\Theta)-E_{\Theta}(\Phi) \tag{8}\]