Custom WIRC Scripts (focus, snap, wcenter, wcal)

focus - focuses the telescope
cl> wirc
wi> focus

PACKAGE = wirc
   TASK = focus

(finc   =                  0.1) focus offset
(pics   =                   20) number of focus frames
(exptime=                  10.) exposure time
(ra     =                   15) RA offset
(dec    =                   15) DEC offset
(delfoc =                   no) delete old focus data from focus directory?
(autoexa=                  yes) start imexamine automatically?
(stploop=                  yes) prompt after each focus image?
(status =                    0) Status for script
(mode   =                   ql)

finc Focus increment in millimeters. You want to try to start the focus script with a focus value ~ 0.5 mm lower than true focus, and then run the script with positive increments. 0.1 mm is a good step size in reasonable Ksh seeing at Palomar.
pics The number of images the script will take. IRAF crashes if you try to stop a script with control-c, so best to choose a large number and then exit gracefully later using stploop once you think you have a good focus.
exptime Exposure time. 10 seconds is good for reasonable Palomar seeing.
ra Telescope offset between first two images in RA arcseconds.
dec Telescope offset between first two images in DEC arcseconds.
delfoc Delete any old focus data? When the script starts, a focus subdirectory is created in your working directory and all focus data is written to this subdirectory. When you run the script a second time, focus data can be deleted or added to what's already there.
autoexam Start imexamine after each image is displayed? If not, the script will continue to completion and you will have to investigate each image manually.
stploop Pause after each imexam session (or each image display if autoexam is off) and prompt to continue the script. This is the best way to exit the script if you have found a good focus.

When the focus script starts, a focus subdirectory is created and all focus data is written in this subddirectory as focus0001.fits and foc_diff1.fits. The camera gui parameters are saved, but NOT used (ie: exposure time, basename, etc).

When the focus script finishes, the telescope is moved back to the starting position, the working iraf directory is re-established, and all camera gui parameters are restored.

If the focus script crashes for some reason (hitting control-c, hitting an unrecognized key during the script or imexam), then you will have to manually return the telescope, manually backup to the iraf working directory, and manually restore camera gui parameters (sequence number in particular).


snap - Subtracts the last two images in your working directory, then displays the result

cl> wirc
wi> snap

PACKAGE = wirc
   TASK = snap

(basenam=                 wirc) name of file prefix
(autoexa=                  yes) start imexamine automatically?
(buff   =                    2) ximtool display buffer
(mode   =                   ql)

basename The basename for wirc images, from the camera gui.
autoexam Start imexamine automatically?
buff Display buffer, if you want to avoid automatic display in buffer 1.


wcenter - Moves a point of reference (star) from one location to another (center)
cl> wirc
wi> wcenter

PACKAGE = wirc
   TASK = wcenter

(X_array=                 2048) Size of array in X, as set by ROI
(Y_array=                 2048) Size of array in Y, as set by ROI
(center =                  yes) Move to center of array?
(Xpos   =                 1024) Move to X position, if not moving to center
(Ypos   =                 1024) Move to Y position, if not moving to center
(mode   =                   ql)


X_array The size of your WIRC array in the X direction as specified by the Region Of Interest (ROI) button. 2048 is the default.
Y_array The size of your WIRC array in the Y direction as specified by the Region Of Interest (ROI) button. 2048 is the default.
center Move the reference point to the center of the array? Most people will use this script to quickly center a pointing star.
Xpos If not moving the reference point to the center of the array, move to this X position.
Ypos If not moving the reference point to the center of the array, move to this Y position.


wcal - Sets up WIRC to take dome flats and darks
cl> wirc
wi> wcal

PACKAGE = wirc
   TASK = wcal

(flat   =                  yes) Take domeflats?
(flatnum=                    9) Number of images for each filter
(dark   =                  yes) Take dark images?
(darknum=                    9) Number of images for each dark SET
(mode   =                   ql)


flat Do you want to take domeflats? Once the script starts, if this is yes you will be prompted for the total number of filters you want to take. You will then be asked which filter to use, the exposure time for that filter, and whether you want to take flats with the lamps off (useful for H & K bands). You need to know exposure time before you start the script.
flatnum The number of images to take for each filter.
dark Do you want to take darks? If this is yes, you will be asked for the number of SETS of darks that you want to take, for example 3 (one set each for J, H, K). You will then be asked for exposure time and number of coadds for each set.
darknum The number of images to take for each set of darks.