KastFocus
The principle of focusing the KAST spectrograph is simple. The spectrum of an emission line source is recorded at different focus positions using a narrow slit. Best focus is found where the line widths are at their minimum. The KAST-specific focus program called "kastfocus" is designed to assist the observer in finding the best focus for either the red or blue side of KAST.Kastfocus is written in the IDL language and run from within IDL (Mt. Hamilton's IDL licenses are on the machine gouda). Kastfocus operates on any emission line lamp spectrum, measuring selected lines to determine their full-width at half-maximum. The program provides a facility for interactively selecting lines to be measured. The program is fast and easy to use, allowing a large number of lines to be measured, resulting in accurate focusing.
Starting Kastfocus | Keywords | Creating a Line List | Using an Existing Line List | Measuring Focus | Exiting kastfocus | Exiting IDL | Helpful Hints
Starting Kastfocus
If you're going to run IDL from the gouda console, or from a terminal hosted by gouda, start by simply typing
idl
Once in IDL simply type
kastfocus,[/hardcopy,center_line=center_line,dir=dir]
Kastfocus takes the optional keywords /hardcopy, center_line, and dir and will prompt you for all the information it needs. The program assumes that you are focusing either the red or blue side of the KAST spectrograph. If you first run kastfocus to focus the red side, you will need to run the program a second time to focus the blue side of the spectrograph, or vice versa.
Keywords
| /hardcopy | Specifies that you want to print a hardcopy of the final focus fit plot. The plot will be sent to shane's printer. The plot will also be saved in the file on gouda /data/idl_tmp/kastfocus.ps until it is overwritten the next time kastfocus is run. |
| center_line=center_line | Specifies the center row of the 10 row region that is averaged together for identifying lines and measuring line widths. If no center_line is set, the default is to find the center row of the image and average the 10 rows around it. |
| dir=dir | Specifies a directory for the data files if they aren't in the default directory for the red or blue side data or scratch image directories. |
| Syntax Examples: | kastfocus kastfocus,/hardcopy kastfocus,center_line=100 kastfocus,center_line=40,/hardcopy kastfocus,dir='/workspace/' |
Using an Existing Line List
An existing line list may be used, in which case the grating and tilt (red side) or grism and x stage (blue side) must be set so that the lines match the positions (to within a few pixels) in the existing linelist.
To enter the existing linelist file, respond no to the 'Interactively create a new linelist file?' query. You will then be prompted for the linelist file name (please include the path to the file).
Measuring Focus
Exiting kastfocus
To exit kastfocus, simply respond no to the 'Another focus position and file?' query.
Exiting IDL
To end an IDL session, type
exit
Helpful hints
The KAST red side collimator focus position is typically around 20000.
The KAST blue side collimator focus position is typically around 60000.
A typical move of either the red or blue side collimator for focusing is 3000 counts.
Support Astronomers (sa@ucolick.org) Last modified: Thu Nov 13 16:06:57 PST 2008


