NAME

setstage - calculates guide stage offsets and blocking

SYNOPSIS

setstage cstring | present [ok] [passthru] [move] [old] [debug..]
setstage xy [debug..]

OPTIONS

cstring | present - if the option present is used it will read the current telescope coordinates using the where command. Otherwise it will use a coordinate string as the current center coordinate. This option is required.

move - will move the XY stage to the calculated position if there is only one coordinate in the standard input and position, vignetting and blocking are satisfactory.

old - will use the simple offset calculation instead of the gnomonic version. There is very little difference between the two.

ok - will only show guidestars that are not outside,blocked or vignetted.

passthru - copies and prints the guidestar coordinate lines that are ok (see above).

xy - is a different mode used for test ing and takes strings guider position strings like x=-34 y=22 prints out the outside, vignetting and blocking factors.

debug - for debugging printout. Maybe repeated for too much output.

DESCRIPTION

setstage takes guide star coordinate strings from the standard input and calculates the x, y coordinates (in mm) that the guider stage should be positioned to from the celestial coordinates of the telescope and the guide star. If the passthru option is NOT used, it prints out lines similar to:
outside=0 vignette=0 block=0 x=-48.47 y=178.13 name=4027930212632765184
outside=0 vignette=0 block=1 x=-68.78 y=55.24 name=4027917396449807488
outside=1 vignette=0 block=0 x=64.46 y=18.10 name=4027968562395866880
outside=0 vignette=1 block=0 x=-23.72 y=170.49 name=4027931075921347584
When the position is out of range of the stage, the outside flag is set to 1. If the guider is vignetted, then vignette=1. Finally it sets block=1 if the guider blocks the science chip. The name of the star is appended if it appears in the input stream.

The guide star positions must be entered in standard input as coordinate strings.

TECHNICAL DISCUSSION

This program relies on several defines in the file rct.h
GUIDER_X_CEN  - this is the X coordinate of when the guider center is aligned with the science CCD center
GUIDER_Y_CEN  - this is the Y coordinate of when the guider center is aligned with the science CCD center
GUIDER_ROT    - the rotation angle of the guider
RCT_SCALE     - the plate scale of the telescope
The input (telescope center and guide star) coordinates are then precessed to the current epoch. These coordinates are converted to vectors with length of the focal length of the telescope. This is computed from the telscope scale. The guide star vector is then stretched by 1/dot_product, so that the location is co-planar just like the stage is. I do not do any correction for shift of focus.

Then vector difference between the two vectors is calculated. This is then rotated by the GUIDER_ROTATION to get the XY stage coordinates.

If the X (-100 --> 0 )and Y (0,200) are outside of the range of the stage, the program prints "outside=1" else it prints it equal to zero.

If the x,y puts it in front of the chip, it prints block=1.


Program index