Back to Pytheia 2.1.1

Pytheia v2.1.0 — pointing terms

These 2.1.0 term definitions and control-system conventions are retained in Pytheia 2.1.1.

This document describes every built-in pointing term of Pytheia: what each one corrects, its exact formula, and the conventions needed to apply a fitted model to a telescope. The formulas are those of standard_terms.py, which is what Pytheia computes.


Conventions

Coordinates

The direction of a correction

Every term describes how the position of a star differs from where the encoders point:

star position = encoder position + Σ coefficient × correction

The encoder position is given by columns 1–2 of the data file, the star position by columns 3–4. Coefficients are in arcseconds; the corrections in the tables below are for a coefficient of 1.

For example, IE has the correction −1 in elevation: with IE = +10″, every star is found 10″ below the elevation the encoder reads.

The star position is the star's observed place: its catalogue position corrected for proper motion, precession, nutation, aberration, parallax and atmospheric refraction — where the star actually appears in the sky from the site. Pytheia's data must use it, and a control system computes it before applying the pointing model.

Corrections in azimuth and hour angle are changes of that coordinate. On the sky, such a change shrinks with cos El, or cos δ; Pytheia applies that factor itself, so it does not appear in the tables. A term describing a fixed shift on the sky therefore contains sec El, or sec δ.

Kinds


Applying a model in a telescope control system

The modules in the tcs/ folder apply a fitted model exactly as Pytheia does, in Python and in C, which C++ can use as it is; tcs/README.md shows how. Use them if you can. This section describes the model completely, for a control system in another language or for anyone who wants to know exactly what the modules compute. A control system must reproduce it in full: the same terms, the same signs, and the same steps.

From the encoders to the sky

Given the encoder position and the coefficients, in radians, for an alt-azimuth mount:

  1. Roll and pitch from the encoders: a = 180° − Az, b = El.
  2. The four rotation angles: ca = −CA, np = −NPAE, an = −AN, aw = −AW.
  3. Pitch: x₁ = cos b · cos ca, y₁ = sin ca, z₁ = sin b · cos ca.
  4. Axis non-perpendicularity: y₂ = cos np · y₁ + sin np · z₁, and z₂ = −sin np · y₁ + cos np · z₁.
  5. Roll: Aₓ = cos a · x₁ − sin a · y₂, A_y = sin a · x₁ + cos a · y₂, A_z = z₂.
  6. Tilt of the roll axis: V = Mᵀ · A, where M = R₁(aw) · R₂(−an), with R₁(t) = [[1, 0, 0], [0, cos t, sin t], [0, −sin t, cos t]] and R₂(t) = [[cos t, 0, −sin t], [0, 1, 0], [sin t, 0, cos t]].
  7. Back to the sky: Az₀ = 180° − atan2(V_y, Vₓ), El₀ = asin(V_z).
  8. Encoder terms: add, for every other term of kind encoder, coefficient × correction, evaluated at the encoder position. The correction in azimuth is added to the azimuth itself, as listed in the tables.
  9. Flexure terms: add, for every term of kind flexure, coefficient × correction, evaluated at the result, then evaluate them again at the new result, and repeat until it changes by less than 10⁻⁸″ — usually two to five times. Flexure follows where the telescope actually points, which is what is being computed.

For an equatorial mount, the same steps with a = −h, b = δ; ca = +CH, np = +NP, an = −ME, aw = +MA; and in step 7, h₀ = −atan2(V_y, Vₓ), δ₀ = asin(V_z).

Pointing at a star: from the sky to the encoders

To point at a star at position S, start with the encoder position P = S, and repeat: compute where the telescope would point from P, with the steps above, and move P by the difference between S and that result. Stop when the move is below 10⁻⁸″ — usually after three to five repetitions. P is where the encoders must go; P − S is the correction.

Reference values

These are the values each module checks itself against, computed by Pytheia. An implementation of the steps above must reproduce them to 10⁻⁵″, in both directions: from each encoder position to the star position, and back.

Az/El mode, latitude -29.259°, auxiliary reading aux1 = 0.5. Coefficients, in arcsec: IA -1238.04, IE +598.41, CA -129.11, NPAE +20, AN -64.37, AW -751.69, TF +71.11, TX -14.2, PZZ3 -20.84, ACEC -7.11, ECES +229.69, HZSZ2 +7.44, HZSA2 +3.1, NRX +4.5, NRY -2.2, AUX1E +3.

Encoder Az Encoder El Star Az Star El
12.5° 23.0° 12.0341346123° 22.8375589046°
95.0° 45.0° 94.6115923661° 45.0085544397°
180.0° 60.0° 179.9540271816° 59.8055080173°
271.3° 78.5° 270.8678832629° 78.0670621452°
333.0° 33.3° 332.5029097582° 32.9958781977°

HA/Dec mode, latitude 33.3563°, auxiliary reading aux1 = 0.5. Coefficients, in arcsec: IH +94.91, ID +123.66, CH -46.42, NP +1.14, ME -59.75, MA +2.92, TF -4.53, TX +2.1, FO +3.3, HCES +1.7, HXSH2 -9.59, DCEC +2.2, HDSH2 -1.1, AUX1D +1.5.

Encoder h Encoder δ Star h Star δ
-60.0° 10.0° -60.0178019058° 9.9730710278°
-15.0° 45.0° -15.0139141418° 44.9803305643°
0.0° -20.0° -0.0128233537° -20.0196767503°
30.0° 70.0° 30.0423529767° 69.9789033844°
75.0° 5.0° 74.9880783811° 4.9687634895°

The rotations are part of the model

CA, NPAE, AN and AW, or CH, NP, ME and MA, must be applied through the rotation steps. Replacing them with their first-order formulas from the tables changes where the telescope points. In our tests the difference was below 0.3″ for coefficients of a few tens of arcseconds, but reached 6″ below 70° elevation, and 24″ below 85°, for an azimuth-axis tilt of 750″.

Coefficients belong to their definitions

A fitted model is valid only with the term definitions it was fitted with. Version 2.1.0 changed the definitions of some terms (see CHANGELOG.md): coefficients obtained with an earlier version must not be used with these definitions, nor with these modules.


Az/El mode

Geometry of the mount

Term What it corrects Correction in Az Correction in El Kind
IA Azimuth index error: the zero point of the azimuth encoder. 1 0 encoder
IE Elevation index error: the zero point of the elevation encoder. 0 −1 encoder
CA Collimation error: the optical axis is not perpendicular to the elevation axis. sec El 0 rotation
NPAE Non-perpendicularity of the azimuth and elevation axes. tan El 0 rotation
AN Tilt of the azimuth axis towards the north or south. sin Az · tan El cos Az rotation
AW Tilt of the azimuth axis towards the east or west. cos Az · tan El −sin Az rotation

Flexure

Term What it corrects Correction in Az Correction in El Kind
TF Tube flexure, proportional to cos El: the classical sag of the tube. 0 cos El flexure
TX Tube flexure, proportional to cot El: grows quickly towards the horizon. 0 cot El flexure
PZZ3 Polynomial in zenith distance, third power: empirical flexure. 0 z³ flexure
PZZ5 Polynomial in zenith distance, fifth power: empirical flexure. 0 z⁵ flexure

Encoder centring

Term What it corrects Correction in Az Correction in El Kind
ACEC Azimuth encoder centring error, cosine component. −cos Az 0 encoder
ACES Azimuth encoder centring error, sine component. sin Az 0 encoder
ECEC Elevation encoder centring error, cosine component. 0 −cos El encoder
ECES Elevation encoder centring error, sine component. 0 −sin El encoder

Harmonics

Term What it corrects Correction in Az Correction in El Kind
HSCA Left–right shift on the sky varying as cos Az. −cos Az · sec El 0 encoder
HVCA Azimuth–elevation non-perpendicularity varying as cos Az. −cos Az · tan El 0 encoder
HACA1 Azimuth correction varying as cos Az. −cos Az 0 encoder
HSCZ1 Left–right shift on the sky varying as cos z. cos z · sec El 0 encoder
HSCZ2 Left–right shift on the sky varying as cos 2z. cos 2z · sec El 0 encoder
HSCZ4 Left–right shift on the sky varying as cos 4z. cos 4z · sec El 0 encoder
HSSA1 Left–right shift on the sky varying as sin Az. sin Az · sec El 0 encoder
HSSZ1 Left–right shift on the sky varying as sin z. sin z · sec El 0 encoder
HSSZ2 Left–right shift on the sky varying as sin 2z. sin 2z · sec El 0 encoder
HSSZ3 Left–right shift on the sky varying as sin 3z. sin 3z · sec El 0 encoder
HZCZ1 Elevation correction varying as cos z. 0 cos z encoder
HZCZ2 Elevation correction varying as cos 2z. 0 cos 2z encoder
HZCZ4 Elevation correction varying as cos 4z. 0 cos 4z encoder
HZSA Elevation correction varying as sin Az, for example from an uneven azimuth track. 0 sin Az encoder
HZSA2 Elevation correction varying as sin 2Az. 0 −sin 2Az encoder
HZSZ1 Elevation correction varying as sin z. 0 sin z encoder
HZSZ2 Elevation correction varying as sin 2z. 0 sin 2z encoder
HZSZ4 Elevation correction varying as sin 4z. 0 sin 4z encoder

Nasmyth rotator

Term What it corrects Correction in Az Correction in El Kind
NRX Displacement of the Nasmyth rotator axis, horizontal component. 1 sin El encoder
NRY Displacement of the Nasmyth rotator axis, vertical component. tan El −cos El encoder

Auxiliary readings

Term What it corrects Correction in Az Correction in El Kind
AUX1A Azimuth correction proportional to auxiliary reading 1. aux1 0 encoder
AUX2A Azimuth correction proportional to auxiliary reading 2. aux2 0 encoder
AUX1S Left–right shift on the sky proportional to auxiliary reading 1. aux1 · sec El 0 encoder
AUX2S Left–right shift on the sky proportional to auxiliary reading 2. aux2 · sec El 0 encoder
AUX1E Elevation correction proportional to auxiliary reading 1. 0 −aux1 encoder
AUX2E Elevation correction proportional to auxiliary reading 2. 0 −aux2 encoder

HA/Dec mode

In the formulas for TX, sin a = sin δ sin φ + cos δ cos h cos φ is the sine of the altitude.

Geometry of the mount

Term What it corrects Correction in h Correction in δ Kind
IH Hour-angle index error: the zero point of the hour-angle encoder. −1 0 encoder
ID Declination index error: the zero point of the declination encoder. 0 −1 encoder
CH Collimation error: the optical axis is not perpendicular to the declination axis. −sec δ 0 rotation
NP Non-perpendicularity of the polar and declination axes. −tan δ 0 rotation
MA Misalignment of the polar axis towards the east or west. cos h · tan δ −sin h rotation
ME Misalignment of the polar axis in elevation, towards the north or south. −sin h · tan δ −cos h rotation

Flexure

Term What it corrects Correction in h Correction in δ Kind
TF Tube flexure, proportional to sin z. −cos φ · sin h · sec δ sin φ · cos δ − cos φ · cos h · sin δ flexure
TX Tube flexure, proportional to tan z: TF divided by sin a, the sine of the altitude. −cos φ · sin h · sec δ / sin a (sin φ · cos δ − cos φ · cos h · sin δ) / sin a flexure
FO Fork flexure: a change in declination proportional to cos h. 0 −cos h flexure

Encoder centring

Term What it corrects Correction in h Correction in δ Kind
HCEC Hour-angle encoder centring error, cosine component. −cos h 0 encoder
HCES Hour-angle encoder centring error, sine component. −sin h 0 encoder
DCEC Declination encoder centring error, cosine component. 0 −cos δ encoder
DCES Declination encoder centring error, sine component. 0 −sin δ encoder

Harmonics

Term What it corrects Correction in h Correction in δ Kind
HXCH East–west shift on the sky varying as cos h. −cos h · sec δ 0 encoder
X2HC East–west shift on the sky varying as cos 2h. −cos 2h · sec δ 0 encoder
HXSH2 East–west shift on the sky varying as sin 2h. −sin 2h · sec δ 0 encoder
HDSH2 Declination correction varying as sin 2h. 0 −sin 2h encoder

Auxiliary readings

Term What it corrects Correction in h Correction in δ Kind
AUX1H Hour-angle correction proportional to auxiliary reading 1. −aux1 0 encoder
AUX2H Hour-angle correction proportional to auxiliary reading 2. −aux2 0 encoder
AUX1X East–west shift on the sky proportional to auxiliary reading 1. −aux1 · sec δ 0 encoder
AUX2X East–west shift on the sky proportional to auxiliary reading 2. −aux2 · sec δ 0 encoder
AUX1D Declination correction proportional to auxiliary reading 1. 0 −aux1 encoder
AUX2D Declination correction proportional to auxiliary reading 2. 0 −aux2 encoder

How the names are built

Most harmonic terms follow one pattern: H, then what is corrected, then S or C for sine or cosine, then the coordinate it varies with, then the multiple, which is left out when it is 1.

Letter What is corrected Letter Coordinate it varies with
A azimuth A azimuth
S a left–right shift on the sky Z zenith distance
V the azimuth–elevation non-perpendicularity H hour angle
Z zenith distance (shown as a correction in elevation)
X an east–west shift on the sky
D declination

For example, HZSZ2 corrects the zenith distance (Z), varying as the sine (S) of twice (2) the zenith distance (Z). The polynomial terms follow the same idea: PZZ3 corrects the zenith distance (Z) in proportion to the zenith distance (Z) to the third power.


Terms that are identical

Some terms have the same formula, up to its sign, under different names:

Mode Identical terms
Az/El IA = HSSZ1 · NPAE = HSCZ1 · TF = HZSZ1 = −ECEC · ACEC = HACA1 · ECES = −HZCZ1
HA/Dec none

The data cannot tell two such terms apart: fitting both only splits one effect between them arbitrarily, and the report says so. Fit the one whose physical meaning matches the effect you expect.


Your own terms

Terms of your own go in additional_terms.py, in the same form and with the same convention as the built-in ones: each correction is the change from the encoder position to the star position, for a coefficient of 1. The instructions at the top of that file and the Terms section of the README explain the rest.

The control-system modules need them too: the Python module reads additional_terms.py directly, and the C module has a marked function, user_term(), where each term is added in one line. tcs/README.md explains both.