User's Guide to the Kast Double Spectrograph


Table of Contents


Introduction
Quick Reference
Hardware Overview
Common Path
Blue Side
Red Side
Detector Characteristics
Software
Kast Controller
Data Taking System
Position Angle
Arc and Flat-field Lamps
Diagonal Mirror
Kast Focus
Eventsounds
Telescope Offset
Setup and Observing Hints
Setup Procedures
Observing Hints
Calibration Lamp Spectra
Exposure Time Calculator
Data Quicklook

Data Archive
Mt. Hamilton Homepage

Focusing the Kast Spectrograph

There are two programs available for focusing Kast: kastfocus and kastfocusp. Both programs are written in the IDL language and run from within IDL (IDL can be run from gouda, shanevnc, or karnak).

Kastfocus uses emission line source spectra taken with a narrow long slit to help the observer determine the best collimator position for the narrowest lines.

Kastfocusp uses emission line source spectra taken with a narrow 2 arcsec long slit to help the observer determine the best collimator position for the narrowest lines and best spatial dimension focus. At this time, we recommend using kastfocusp instead of kastfocus.



Kastfocusp

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 and 2 arcsecond long decker. Best focus is found where the line widths and spatial FWHM are at their minimum. The KAST-specific focus program called "kastfocusp" is designed to assist the observer in finding the best focus for either the red or blue side of KAST.

Kastfocusp operates on any emission line lamp spectrum, measuring selected lines to determine their full-width at half-maximum in both the dispersion and spatial directions. 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 Kastfocusp | Keywords | Creating a Line List | Using an Existing Line List | Measuring Focus | Exiting kastfocus | Exiting IDL | Helpful Hints


Starting Kastfocusp

If you're going to run IDL from the gouda (or karnak) console, or from a terminal hosted by gouda (or karnak, or shanevnc), start by simply typing

idl

Once in IDL simply type

kastfocusp,[dir=dir,files=files]

Kastfocus takes the optional keywords dir and files 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 kastfocusp 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

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.
files=files Specifies a file that lists the file names of the focus images
for either the red or blue side.
Syntax Examples: kastfocusp
kastfocusp,dir='/workspace/'
kastfocusp,files='file.list'
kastfocusp,dir='./',files='focusimages.list'


Creating a Line List

To measure the widths of the emission lines, kastfocusp needs to know their positions. This list can be interactively generated or read from a file.

The kastfocusp program will prompt if you want to create a new linelist file. If you respond yes to this query, you will then be prompted for an arc lamp file name. Enter the file name of the most recent arc lamp spectrum you have taken (e.g. scr.fits). The program automatically identifies reasonably high signal-to-noise emission lines in the spectrum. Kastfocusp will then display a contour plot of each identified line and query you if you wish to accept or reject each line. It is wise to accept only well separated and unblended lines to get the best focus measurement (also, take care not to select cosmic rays). The selected lines are written to a file on the host computer to,

/data/idl_tmp/linelistp.kast
and a plot is displayed showing the selected lines (the color of the the line shows the state of the line in the acceptance process: red is rejected, green accepted, blue or purple is current line being examined, white is as yet undetermined). The linelist file is overwritten each time a new linelist is created. If you wish to save the file for future reference or use, copy it to a new file name.

Arc Line Accept/Reject Plot

Do not accept Cosmic Rays or Blended Lines for focusing. Left: Cosmic Ray, Right: Blended Line


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) and CCD readout window 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

If you have created a new linelist, kastfocusp will use the first arc lamp file as the initial focus position. If you are using an existing linelist file, you will be prompted for a file name for the first focus image. Kastfocusp will measure the FWHM of each line in X and Y, as well as the peak flux, and print the mean X FWHM, Y FWHM, and Peak flux for the spectral lines.

You will then be prompted for the next focus image name. The same calculations will be performed on this image. This process will repeat until at least three focus positions have been measured. Then plots of X FWHM, Y FWHM, and normalized Peak flux vs. collimator focus position will be displayed and a best fit parabola overlayed. A printout of the predicted best fit collimator position and FWHM (or peak flux) will also be displayed. These parabolic fits will be updated with each additional focus position and file that is entered into kastfocusp.

The program will then instruct you to move the collimator and take a new focus exposure.

FWHM Plot


Exiting kastfocusp

To exit kastfocusp, simply respond no to the 'Another focus position and file?' query.



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.

Warning (Sept 2016): kastfocus will fail for the new red side Hamamatsu detector because the dispersion is along columns rather than rows.

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/'


Creating a Line List

To measure the width of the emission lines, kastfocus needs to know their positions. This list can be interactively generated or read from a file.

The kastfocus program will prompt if you want to create a new linelist file. If you respond yes to this query, you will then be prompted for an arc lamp file name. Enter the file name of the most recent arc lamp spectrum you have taken (e.g. bscr.ccd). The program automatically identifies reasonably high signal-to-noise emission lines in the spectrum. Kastfocus will then display a line profile of each identified line and query you if you wish to accept or reject each line. It is wise to accept only well separated, unsaturated, and unblended lines to get the best focus measurement. The selected lines are written to a file on gouda,

/data/idl_tmp/linelist.kast
and a plot is displayed showing the selected lines (the color diamond above the line shows the state of the line in the acceptance process: red is rejected, green accepted, white is current line being examined, blue is as yet undetermined). The linelist file is overwritten each time a new linelist is created. If you wish to save the file for future reference or use, copy it to a new file name.

Arc Line Accept/Reject Plot


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

If you have created a new linelist, kastfocus will use the first arc lamp file as the initial focus position. If you are using an existing linelist file, you will be prompted for a file name for the first focus image. Kastfocus will measure the FWHM of each line, plot the FWHM across the spectrum, and print the median FWHM, mean FWHM, and standard deviation for the spectral lines.

The program will then instruct you to move the collimator and take a new focus exposure.

FWHM Plot

You will then be prompted for the next focus image name. The same calculations will be performed on this image. This process will repeat until at least three focus positions have been measured. Then plots of FWHM (mean, median, and standard deviation) vs. collimator focus position will be displayed and a best fit parabola overlayed. A printout of the predicted best fit collimator position and FWHM will also be displayed. These parabolic fits will be updated with each additional focus position and file that is entered into kastfocus.

Focus Plot


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 0mm to 5mm.

The KAST blue side collimator focus position is typically around 16mm to 15mm.

A typical move of either the red or blue side collimator for focusing is 3mm.


Support Astronomers (sa@ucolick.org)
Last modified: Fri Sep 23 15:51:49 PDT 2016