Thanks to Bo Xin [X] for the following data sources:

Compensation for elevation:

Compensation for temperature:

- Document 7334 (a powerpoint presentation) page 9, which lists the fit coefficient of expansion.

I used the elevation spreadsheets and the attached code to fit various models for elevation. I found:

- A Fourier series worked best: f(el) = C0 + C1 sin(el) + C2 cos(el0 + C3 sin(2 el) + C4 cos(2 el) + .... This model can also be used for azimuth, since it wrap around at 0/360.
- A standard polynomial worked well: f(el) = C0 + C1 el + C2 el^2 + .... This is not suitable for azimuth compensation.
- A "cosine polynomial" did not work very well: f(el) = C0 + C1 cos(el) + C2 cos(el)^2 + .... This can be used for azimuth compensation.

Tiago Ribeiro decided we should use the standard polynomial for now so I did the following on ~~DM-25856~~:

- I coded the standard polynomial for elevation compensation and removed azimuth compensation. (Before this ticket I had coded a cosine polynomial, as per Tiago Ribeiro's initial request).
- Added the fit coefficients to the default.yaml config file in ts_config_mttcs on the same ticket. I am not positive I got the sign of the corrections correct.
- Added support for the Fourier series to ts_hexapod, so we have it available. I personally think we should use it.

Note: I found that `scipy.optimize.curve_fit` did a far better job than `numpy.polyfit` so I used that for all fitting.

I also attached 3 of the graphs – all for the Camera since it is a bit harder to fit than M2.

Thanks to Bo Xin [X] for the following data sources:

Compensation for elevation:

Compensation for temperature:

I used the elevation spreadsheets and the attached code to fit various models for elevation. I found:

Tiago Ribeiro decided we should use the standard polynomial for now so I did the following on

~~DM-25856~~:Note: I found that

scipy.optimize.curve_fitdid a far better job thannumpy.polyfitso I used that for all fitting.I also attached 3 of the graphs – all for the Camera since it is a bit harder to fit than M2.