 CoCalc Public FilesTracking off axis at parallactic angle.sagews
Author: joe philip
Views : 35
Description: Calculations for Autoguider box positioning.
Compute Environment: Ubuntu 18.04 (Deprecated)

%md

Hi Douglas,

##  Auto Guider Tracking off axis at parallactic angle.

While tracking in parallactic angle, alt-azimuth mount telescope doesn't have to do any field rotation while trackign star.
Once the telescope rotator is set to parallactic angle it will remain so when telescope tracks Alt and Azimuth change.

But while using auto guider, when the guide star is a field star away from the star in slit, since the field has to roate during long exposures the position at which auto guider star has to be tracked changes with time. Following is the calculation required to update the position at which auto guider tracks the star.

### Calculation of parallactic angle
Following diagram is taken from Smart & Green (1997) Book on Spherical Astronomy

![Angles in sky](https://cloud.sagemath.com/8aa6ebbd-0222-4e49-8470-829d9393b2d0/raw/AnglesInSky_Smart_Book.png)

In the above diagram P is the North pole, Z is Zenith and X is the target star. $H$ is Hour angle, $\delta$ is declination and $z$ is altitute of target star, and $\phi$ is latitute of ARIES telescope.

Parallactic angle is PXZ.

Using sine formula in on the triangle PXZ, we obtain the following relation
$$\frac{sin(PXZ)}{sin(90-\phi)} = \frac{sin(H)}{sin(z)}$$
$$=> sin(PXZ) = sin(90-\phi) \frac{sin(H)}{sin(z)}$$

If we use cosine formula, it is possible to write the Parallactic angle PXZ completely in terms of $z$ and Dec of the object.
$$cos(PXZ) = \frac{cos(90-\phi) - cos(90-\delta) cos(z)}{sin(90-\delta) sin(z)}$$

If we could directly use $z$ from the telescope TCS life would have been simple. But since the telscope is moved by the autoguider the $z$ will drift away from the correct value slowly. We will need to predict the value of $z$ while tracking is going on. For this we will have to read from the telescope $RA$, $Dec$, and initial altitute $z$ from telescope server.

From initial $z$ and Dec we can  calculate hour angle $H$.
$$cos(z) = sin(\delta) sin(\phi) + cos(\delta) cos(\phi) cos(H)$$

Later this Hour angle $H$ can be simply updated using system time when the tracking is going on.
And the same formula can be used to calculate the updated value of $z$ for estimating parallactic angle.

## Calculation of the shift of autoguider tracking box

Figure below shows the Field of view of Guider. The Red dot is star in slit. And Green dot is the s=chosen Guider star.
When observing in parallactic angle the field rotates at the telescop's optical axis, which we denote by origin (0,0).

![Field Diagram](https://cloud.sagemath.com/8aa6ebbd-0222-4e49-8470-829d9393b2d0/raw/GuiderFieldDiagram.png)

When the parallactic angle rotates by $\theta$. If there is no tracking, the (x,y) positions of the stars will change by the rotation matrix to new coordinates (x',y')

ie.
$$\begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{bmatrix}\cos \theta & -\sin \theta \\\sin \theta & \cos \theta \\\end{bmatrix} \begin{pmatrix} x \\ y \end{pmatrix}$$

ie. for star in slit ($x_s$,$y_s$)
$$x'_s = x_s \cos\theta - y_s \sin\theta$$
$$y'_s = x_s \sin\theta + y_s \cos\theta$$

Our aim is to keep the star in slit at the same position. ie, the drift $x'_s - x_s$ and $y'_s - y_s$ should be made zero.

ie. we will shift the frame translationally by the above drift vector.

This is attained by adding this drift on top of the movement of guider star. So that, shifting the autoguider star to its new position will drfit the slit star back to slit.

The target position of auto guider star is $x^T_g = x'_g - (x'_s - x_s)$ and $y^T_g = y'_g - (y'_s - y_s)$.

Substituting $x'_g$, $y'_g$ and $x'_s$, $y'_s$. We obtain the final relation.
$$x^T_g = x_g \cos\theta - y_g \sin\theta - ( x_s \cos\theta - y_s \sin\theta - x_s) = (x_g - x_s)\cos\theta + (y_s - y_g)\sin\theta + x_s$$
$$y^T_g = x_g \sin\theta + y_g \cos\theta - ( x_s \sin\theta + y_s \cos\theta - y_s) = (x_g - x_s)\sin\theta + (y_g - y_s)\cos\theta + y_s$$

ie.
$$x^T_g = (x_g - x_s)\cos\theta + (y_s - y_g)\sin\theta + x_s$$
$$y^T_g = (x_g - x_s)\sin\theta + (y_g - y_s)\cos\theta + y_s$$

Where $\theta$ is the change in Parallatic angle estimated from the formula in previous section.

Note that, eventhough $x_s$ and  $y_s$ values apear in the above eqution. Since while tracking we only need to calculate the shift in the position of the guider box, we do not have to measure the rotaion center and estimate the $x_s$ and  $y_s$ values. This is a big relief!

That is all.

-cheers

joe



Hi Douglas,

## Auto Guider Tracking off axis at parallactic angle.

While tracking in parallactic angle, alt-azimuth mount telescope doesn't have to do any field rotation while trackign star. Once the telescope rotator is set to parallactic angle it will remain so when telescope tracks Alt and Azimuth change.

But while using auto guider, when the guide star is a field star away from the star in slit, since the field has to roate during long exposures the position at which auto guider star has to be tracked changes with time. Following is the calculation required to update the position at which auto guider tracks the star.

### Calculation of parallactic angle

Following diagram is taken from Smart & Green (1997) Book on Spherical Astronomy In the above diagram P is the North pole, Z is Zenith and X is the target star. $H$ is Hour angle, $\delta$ is declination and $z$ is altitute of target star, and $\phi$ is latitute of ARIES telescope.

Parallactic angle is PXZ.

Using sine formula in on the triangle PXZ, we obtain the following relation $\frac{sin(PXZ)}{sin(90-\phi)} = \frac{sin(H)}{sin(z)}$ $=> sin(PXZ) = sin(90-\phi) \frac{sin(H)}{sin(z)}$

If we use cosine formula, it is possible to write the Parallactic angle PXZ completely in terms of $z$ and Dec of the object. $cos(PXZ) = \frac{cos(90-\phi) - cos(90-\delta) cos(z)}{sin(90-\delta) sin(z)}$

If we could directly use $z$ from the telescope TCS life would have been simple. But since the telscope is moved by the autoguider the $z$ will drift away from the correct value slowly. We will need to predict the value of $z$ while tracking is going on. For this we will have to read from the telescope $RA$, $Dec$, and initial altitute $z$ from telescope server.

From initial $z$ and Dec we can calculate hour angle $H$. $cos(z) = sin(\delta) sin(\phi) + cos(\delta) cos(\phi) cos(H)$

Later this Hour angle $H$ can be simply updated using system time when the tracking is going on. And the same formula can be used to calculate the updated value of $z$ for estimating parallactic angle.

## Calculation of the shift of autoguider tracking box

Figure below shows the Field of view of Guider. The Red dot is star in slit. And Green dot is the s=chosen Guider star. When observing in parallactic angle the field rotates at the telescop's optical axis, which we denote by origin (0,0). When the parallactic angle rotates by $\theta$. If there is no tracking, the (x,y) positions of the stars will change by the rotation matrix to new coordinates (x',y')

ie. $\begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{bmatrix}\cos \theta & -\sin \theta \\\sin \theta & \cos \theta \\\end{bmatrix} \begin{pmatrix} x \\ y \end{pmatrix}$

ie. for star in slit ($x_s$,$y_s$) $x'_s = x_s \cos\theta - y_s \sin\theta$ $y'_s = x_s \sin\theta + y_s \cos\theta$

Our aim is to keep the star in slit at the same position. ie, the drift $x'_s - x_s$ and $y'_s - y_s$ should be made zero.

ie. we will shift the frame translationally by the above drift vector.

This is attained by adding this drift on top of the movement of guider star. So that, shifting the autoguider star to its new position will drfit the slit star back to slit.

The target position of auto guider star is $x^T_g = x'_g - (x'_s - x_s)$ and $y^T_g = y'_g - (y'_s - y_s)$.

Substituting $x'_g$, $y'_g$ and $x'_s$, $y'_s$. We obtain the final relation. $x^T_g = x_g \cos\theta - y_g \sin\theta - ( x_s \cos\theta - y_s \sin\theta - x_s) = (x_g - x_s)\cos\theta + (y_s - y_g)\sin\theta + x_s$ $y^T_g = x_g \sin\theta + y_g \cos\theta - ( x_s \sin\theta + y_s \cos\theta - y_s) = (x_g - x_s)\sin\theta + (y_g - y_s)\cos\theta + y_s$

ie. $x^T_g = (x_g - x_s)\cos\theta + (y_s - y_g)\sin\theta + x_s$ $y^T_g = (x_g - x_s)\sin\theta + (y_g - y_s)\cos\theta + y_s$

Where $\theta$ is the change in Parallatic angle estimated from the formula in previous section.

Note that, $x_s$ and $y_s$ values are needed for this calculation. This is the pixel coordinates of the slit star position with respect to rotation center of the field. Hence after each time telescope instrument alignement is done, we will have to measure the roataion center and feed it to auto guider software.

That is all.

-cheers

joe