A description of the fits header position/offsets.

01dec04

Introduction:

    The ao fits header has a number of keyword values that refer to positions. This note tries to explain how they are computed. These keywords are:
 
crval2,crval3 crval2a,crval3a crval2b,crval3b crval2c,crval3c crval2g,crval3g
croff2,croff3 croff2b,croff3b
offc1,offc2,offtime rate_c1,rate_c2 rate_cs rate_cur
model_offaz
model_offza
beam_offaz
beam_offza
user_offaz
user_offza
rfeed_offaz
rfeed_offza
prfeed_offaz
prfeed_offza
beam_offraj
beam_offdecj
alfa_ang
para_ang
cur_tol
req_tol

The pointing program:

    The pointing program has a tracking command that contains up to 3 parts:
 
pnt tr -Up pos1 pos2 -tPtm -cCp -o -Uo off1 off2 -tOtm -cCo -r -Ur rate1 rate2 -tRTm -cCr

The three parts are the position, offset, and the rate. The properties of a tracking command are:

    The processing for a track command will start tracking the position when its time arrives. To this position it will add any rates (when then become active). A rate will be applied to the combined pos+off when the rate becomes active. Each of these steps can have different coordinate systems. The only constraint is that the pointing program will not go back up the coordinate transform chain. The chain is:
ra/dec epoch, ra/dec current, hourangle/dec, az/za.  This means that if the position is a current ra/dec, then you can not make the offset a J2000  offset. The pointing program starts at the position coordinate system. It  checks to see if the offset or rate needs to be added in and then steps to the next lowest coordinate system in the transformation from ra,dec to az,za.

The raJ, decJ requested position.

    A tracking request eventually generates an azimuth , zenith angle that gets sent to the encoders. Before doing this, the pointing program will back compute this az, za back to a J2000 ra,dec.  This is called the requested raJ, decJ coordinate that got stored in the interim correlator header. It is a requested position. It include the requested position and any offsets and rates that were active.
 

The az,za position errors.

    Once a second the azimuth and zenith angle encoders are read. The measured encoder values are compared with the requested azimuth, zenith angle values that were requested for this time stamp. The az,za errors is computed as:
 
az_error= Requested-measured azimuth encoder values.
za_error= Requested - measured zenith encoder values.
    The azimuth error is not a great circle arc on the sky.

Interpolating the positions to the data time stamps.

    The raJ, decJ, and errors are computed once a second. They are then distributed via the scram net memory to different devices at the observatory. The wapp data taking computers send their data buffers to a single computer (wappreader) that collates the data from the 4 wapps. This computer also receives the scram net information (indirectly via a network broadcast of the scram net memory). It interpolates the raJ,decJ, lst, az/zaerrors to be at the start of each data sample.   At the same time it tries to include the encoder position errors so that the ra,dec that it reports is the actual and not requested ra,dec positions (the errors are typically of the order of .5 arc seconds for normal tracking).
 

Steps in computing the positions:

    The steps in going from raJ,decJ,lst,az_error,za_error to the positions in the fits headers are:
  1. Get the time stamp for the start of the data sample. This is stored in mjd_obs in the fits header.
  2. Interpolate raJ, decJ, lst, az_error, za_error to the start of the data time stamp.
  3. Precess the raJ, decJ to the mjd_obs epoch (current coordinates) and then convert to azimuth, zenith angle. This should be the requested azimuth,za (without any model correction applied).
  4. Subtract the az_error, za_error from the az, za computed and call it center_az, center_za. This is the  az,za (with no model correction) that the paraxial ray would have (center of the optics).
  5. Convert center_az,  center_za back to J2000 coordinates to get center_raj, center_decJ. This is the actual raJ,decJ for the paraxial ray. It includes any measured encoder errors.
  6. cmd_ra/dec/az/za.  Start with crval2,3.
  7. off_az,za: off_az, za is (center_az-cmd_az)*sin(za) and (center_za-cmd_za). Center_az,za is the actual az,za for the center pixel. these are great circle offsets. off_az,za will be non-zero   if :
  8. fithdr.rfeed_offaz,_offza.  Computed in spectra.c by calling find_alfarot. It is the azoff,zaoff you add to the center beam az,za to then use in back computing ra,dec, from az,za. It includes the rotation angle. The azoff is great circle so divide by sin(za) before adding it in..
  9. h.beam_offaz,_offza. This is the az,za values to add to the center beam az,za when back computing the ra,dec of a beam if the rotation angle was 0. The az value is great circle (need to divide by sin(za) before adding it on. It will differ from rfeed_offaz, offza if the rotation angle is not zero.

The positions:

The offsets:

    Some of the offsets are: files/programs: home_~phil