# Definition of the pointing offsets (getting the sign correct)

#### jan,2004

It seems that every time I try to correct for a pointing error, I have to figure out the sign of the pointing error as reported by the various routines. The pointing error is computed using the heiles calibration scans and by using the turret scans. Below is a description of the errors for each.
In the examples, x,y  (or azComputed, zaComputed) will be the offsets of the pattern relative to the center of the pattern. The center of the pattern is the "computed" position of the source using the ra,dec transformation to az,za and any current pointing model. The "measured" position of the peak will be the position in each strip that is centered on the actual peak that was found by fitting a 2d gaussian to the data. When doing the fitting, the offset that is added to the computed values must make the measured center be at 0.

#### Turret scan error definition.

The turret scans fits to the functions:
`    z(x,y)=A*exp(-(x-x0)**2/sigx**2)*exp(-(y-y0)**2/sigy**2)`
• x, y are the az,za offset positions of the motion centered on 0 (actually turret, za).
• X0, Y0 are reported as the error.
Let's use y,y0 (za position) to determine the sign of the error.
• If there is no pointing error, then y0 is 0 and the measured peak is at y=0.
• If the peak comes after the center of the pattern (say at y=1.5) then y0 will  be positive  (1.5) so that (y-y0)=0 so we have the gaussian peak be at (y-y0)=0.
So the turret scans are reporting  zaErr=(measured - computed) position. Since the pointing model adds the model value to the computed position, you want to added the zaErr to the model value so you point at the measured position:
`zaPos= zaComputed + modelErr= zaComputed + zaErr=zaComputed+(zaMeasured-zaComputed)=zaMeasured.`
So for turret scans, Add the az,za error to the pointing model.
Note: the routines that report the turret scans errors automatically correct for the difference in azimuth motion and turret motion. What is reported is the actual azimuth error.

#### Calib scan error definition:

Atoms technical memo 2000-4 (Main beam and first sidelobe parameters for arecibo's receiver systems) describes the calib scan fitting. eq 4a,4b on page 4 define the az,za offsets that are fit as:
`azoffOfFit=azComputed + deltaAz`
`zaOffOfFit=zaComputed + deltaZa`
deltaAz and deltaZa are the values that are reported as the az,za pointing errors.
• If there is no pointing error then deltaAz,deltaZa equals 0.
• If the peak comes after the center of the pattern (say zaComputed of 1.5) then deltaZa must be negative (-1.5) to make zaOffToFit be 0 at the center of the beam.
So the calib scans are returning zaErr=zaComputed(0) - zaMeasured(1.5). When putting these errors back into the model you need:
`zaPos=zaComputed + modelErr= zaComputed - zaErr=zaComputed-(zaComp-zaMeas)=zaMeas`
So for the calib scans, Subtract the az,za error from the current pointing model.
Note:
I also verified this in the g2dcurv fitting code.
` home_~phil`