Keck Observing with LRIS 
Updated 12 April 1999


This document contains information on using LRIS, the Low Resolution Imaging Spectrograph, on the Keck II telescope. This document will print as a single file, so the PostScript version is no longer available.

Contents
  1. Designing Slitmasks
  2. Getting Started
  3. Creating User Lists
  4. Operating LRIS
  5. Taking Calibration Frames
  6. Aligning Slitmasks
  7. Miscellaneous LRIS Setup Details including:
  8. Credits

Designing Slitmasks

Before I write up the procedure Steve Odewahn and I have used to make slitmasks, I just want to say that there are many ways of doing this, depending on the kinds of objects you are observing, whether or not you have box slits for alignment stars, only straight slits, etc. We followed the method used by Chuck Steidel & Kurt Adelberger, for making straight slits + box slits for alignment stars. Much of this write-up is based on earlier documentation by Steve Odewahn of a lesson from Kurt Adelberger.

Of course, to make slitmasks, you must first have astrometric coordinates for the objects you want to take spectra of, plus a few stars of about 20th magnitude which will be used for aligning the mask at the telescope. Now, because most detectors have some spatial distortion, the coordinates derived from your original images must have this correction applied to be truly astrometric. Of course, you may already have done this, in which case you can skip to the steps using the autoslit program.

If you have taken imaging data with LRIS (Keck), COSMIC (P200), or CCD13 (P60), there is a program, called palcoords.f, which will take care of the distortion correction for you. It requires that you have a set of reference objects with known coordinates in your image, perhaps derived from examining the Digitized Sky Survey or some other such database. You will need about 7 astrometric reference stars per image.

Create a file called palcoords.input. There is an example file below. You will have to specify the center coordinates, some reference objects, and the x,y positions of your reference stars AND those you want in your mask. In the objects section, you must also specify a priority for each object; the higher the number, the higher the priority. Also, don't forget to include your alignment objects (they are the ones with priority=-10). Here's the example:

RA            00 30 16.2
DEC           +17 02 37.2
HA             0  0  0.0
DATE          01 01 00
EQUINOX       2000.0
EL             0.0
POS_ANG        0.0
END
\REFERENCE
 568.00   393.00  00 30 20.40   17 00 29.77   2000.0    REF_A
 716.00   385.00  00 30 18.15   17 00 29.71   2000.0    REF_B
 848.00   993.00  00 30 16.23   17 02 37.18   2000.0    REF_C
 916.00  1577.00  00 30 15.15   17 04 41.26   2000.0    REF_D
 456.00  1625.00  00 30 21.91   17 04 49.95   2000.0    REF_E
 400.00  1081.00  00 30 22.87   17 02 56.06   2000.0    REF_F
\OBJECTS
 568.00   393.00  20.0   10     REF_A
 716.00   385.00  20.0   10     REF_B
 848.00   993.00  20.0   10     REF_C
 916.00  1577.00  20.0   10     REF_D
 456.00  1625.00  20.0   10     REF_E
 400.00  1081.00  20.0   10     REF_F
 596.0   1521.0   22.0  800     SCO_001
 444.0   1441.0   22.0  800     SCO_002
 632.0    321.0   22.0  800     SCO_003
1508.0    153.0   22.0  800     SCO_004
 204.0   1089.0   22.0  800     SCO_005
 568.00   393.00  20.0  -10     SC_01
 456.00  1625.00  20.0  -10     SC_02
1152.00  1629.00  20.0  -10     SC_03
 948.00   173.00  20.0  -10     SC_04
Now, execute pal_coordinates (This is a Fortran program that can be copied from ~jlc/pal_coordinates). The output for autoslit can be called whatever you want, I'll use coordinate.list. In this output, there will be 2 columns with epochs; the first is always 2000.0, but you should change the second to be 2000.0 as well. Here's part of a sample coordinate.list file:
CENTER      9999   0.00     0 30 15.976     17  2 35.597     2000.0  2000.0  0.0  0.0
C0813        800  25.70     0 30 24.430     17  1 13.519     2000.0  2000.0  0.0  0.0
C1017        800  24.80     0 30 13.956     17  1 46.496     2000.0  2000.0  0.0  0.0
C1135        500  25.40     0 30 14.695     17  2  7.370     2000.0  2000.0  0.0  0.0
Make sure the first line looks similar to the one above.

To optimize the number of slits in a mask, Kurt Adelberger has written some code called slitassign. Disclaimer: This code not guaranteed to produce the optimal mask! Try inputting the PA and center from slitassign into autoslit, and see if autoslit does better.
Just execute:

~kla/prog/slitassign -m 10 0:179:10 < coordinates.list
The arguments are:

-m 10: slit length of 10"
0:179:10: PA's to test

This will dump screen output like:

=========== BEST ============
 theta = 20.000000   priority = 3252
 [-141.0:89.4,-225.4:155.8], around 26079.3,61350.3
CENTER      9999   0.00     0 30 15.950     17  2  6.415     2000.0  2000.0  0.0  0.0
REF_A         10  20.00     0 30 20.345     17  0 28.980     2000.0  2000.0  0.0  0.0
REF_D         10  20.00     0 30 15.153     17  4 42.056     2000.0  2000.0  0.0  0.0
SC_03        -10  20.00     0 30 11.629     17  4 52.997     2000.0  2000.0  0.0  0.0
SCO_004      800  22.00     0 30  6.333     16 59 39.122     2000.0  2000.0  0.0  0.0
REF_C         10  20.00     0 30 16.184     17  2 37.267     2000.0  2000.0  0.0  0.0
SC_04        -10  20.00     0 30 14.657     16 59 42.479     2000.0  2000.0  0.0  0.0
SCO_005      800  22.00     0 30 25.801     17  2 57.756     2000.0  2000.0  0.0  0.0
REF_F         10  20.00     0 30 22.882     17  2 56.055     2000.0  2000.0  0.0  0.0
SCO_003      800  22.00     0 30 19.383     17  0 13.678     2000.0  2000.0  0.0  0.0
REF_E         10  20.00     0 30 22.012     17  4 52.262     2000.0  2000.0  0.0  0.0
SCO_001      800  22.00     0 30 19.935     17  4 30.146     2000.0  2000.0  0.0  0.0
Copy the lines starting with ``CENTER'' to a new file, say mask1good.list, and note the theta, which is the PA you will need. You will have to edit in the lines for the alignment stars by hand! For more details on the meanings of parameters in autoslit input files, see the online
documentation.

Now, we prepare an input parameters file for the autoslit code, which will acutally make our mask files to send to Keck. Here's an example file called input.rrg:

# Header comment
FILENAME        mask1good.list
FILEOUT         rrgmask1.
 
Priority        10
# Press         455.5
# Mirror        x0y0
Epoch           2000
Pos_Angl        150  
WSlit           1.4
SLIT_SEP        1.0
Slit_len        9.85
Interact        True
Verbose         No
# Eng_Test      True
#
# several comments together
# ....
#
END
 
# Special slits:
BOXES 3
S1    4
S3    4
S7    4
END
Notice I have listed the number of box slits for alignment at the 'BOXES' line, and given the object id's for each. I've also set the minimum slit length to 9.85'', the slit width to 1.4'', the PA to 150 (based on the output of slitassign), and the minimum slit separation to 1''. You can change these to whatever you want.

Now, run autoslit:

~ccs/autoslit-3.02b/autoslit3 
Answer the questions until your plot window appears. Use the following key entries:

? - list all commands
i - identify an object
d - delete a slit

When you are happy with the mask, type 'Q'. The output files will be:

rrgmask1.list of parameters and objs.
rrgmask1.file2 autoslit parameters
rrgmask1.file3 the MILL data sent to Keck
rrgmask1.ps informative plots

You will want to print the .ps file and the first file to take on your run.

Email the .file3 file to the appropriate person at Keck.



Getting Started

When you are observing at Keck from the Waimea Headquarters, it is important to familiarize yourself with all the local computers. Below is a list of some of the more important ones.

For my setup (RRG), I will assume that the user is running LRIS from Hanauma, and doing data reduction while seated at Manele. This document will describe the necessary setup to reduce data.

We log in to any computer in Waimea with the user name lris##, and the password as given to you, where ## is the run number we are there for. You should be notified of this in advance. A Command Tool window, and a window to Manuka will fire up.

Now, we have to figure out where our data will originally be written by LRIS, and where we want to reduce it. You will have been assigned a disk with a name like /sdata### ; this disk is actually on Manuka, the LRIS computer, but can be crossmounted to Manele by typing:

makapuu% cd /s/sdata###
There should exist a directory there for your run, named lris20 or somesuch. Create a subdirectory where you want the night's data to go. This directory will also have to be specified to the LRIS control computer. This can be done by selecting 'disk' form the ccd control window, and entering the appropriate path.

You will want to actually reduce your data on a headquarters scratch disk so you don't tie up Manuka. Find an emptyish /scratch## disk on Manele. Now, create an lris## directory there too, if needed. You can go there and make subdirectories for each night.

Now, we want to set up iraf the way we like it. Your basic iraf files are in /home/hanauma/lris##/iraf/

You should edit the login.cl to your liking, most specifically, I like to change the setting for imdir to ``HDR$'' so the pixel files are written to the same place as the headers.

Also, you will want to place any scripts you have brought along in a subdirectory called scripts/, and include them in the loginuser.cl file. Note that on some computers Emacs is not available, only XEmacs. Below is an example loginuser.cl file, with some scripts Kurt Adelberger has kindly provided for automatically reducing multislit LRIS data:

set scripts = "/home/hanauma/lris##/iraf/scripts/"
stty xgterm
set stdimage = imt2048
task $defslits = scripts$def_slits.cl
task fileroot = scripts$fileroot.cl
task iterstat = scripts$iterstat.cl
task makemask = scripts$makemask.cl
task minv = scripts$minv.cl
task szap = scripts$szap.cl
task xzap = scripts$xzap.cl
images
imdelete.verify = yes
delete.verify = yes
defslits
keep
Now, we will want to run a display on Manele.
Note:SAOimage no longer seems to work, only SAOtng.

manele% saotng &
manele% cd ~/iraf
manele% cl
Basically, we are now ready to reduce data in IRAF on Manele. We have the Manuka data disk (/s/sdata##) and Manele scratch disk (/scratch##) available.

During the night, we will want data taken on Manuka to get copied to our scratch location on Manele. After starting the LRIS control software, sit down at Manele, and rlogin to Manuka. There, execute:

manuka% cd /h/scratch##/lris##/n1  (or whatever your scratch location is)
manuka% copymon lris
This starts a perl script which will make a copy of each new image from Manuka onto your scratch disk.


Creating User Lists

A User List (or Star List) is a file with object names, coordinates, etc. that the OA can use to point the telescope. This prevents problems in communicating coordinates from Remote Ops to the summit. To create a starlist, edit a file with any name. The format must be followed strictly. All whitespace is created with spaces; there are no tabs. An example file is shown below:

rmz50            03 41 20.00 +19 34 41.0 2000.0   SkyPA=0
ujo51            04 32 28.95 +05 12 49.5 2000.0   SkyPA=0
bbp27            10 24 38.13 +47 04 39.2 2000.0   SkyPA=60
bbp10            11 17 29.69 +18 12 42.3 2000.0   SkyPA=45  
bbp24            12 23 29.72 +15 51 20.3 2000.0   SkyPA=0
bbp16            12 31 17.01 +12 28 07.6 2000.0   SkyPA=-10 
bbp28            14 17 43.36 +52 23 21.2 2000.0   SkyPA=10
Place the file in /kroot/starlists/scratch/filename.
Then, just let the night assistant know which file is yours.


LRIS Operations

After logging in to Hanauma, fire up the LRIS controls windows by selecting Startup all LRIS Control from the LRIS Control Menu, within the Workspace menu. This will start up a number of windows, shown and described below.

The object_tcl window:


This is a window for specifying the object name (top panel) and any cursory comments to be included in the FITS header. You must hit the ACCEPT button prior to the time when the FITS image is written to disk.

The LRIS exposure command window:


This is the window used to issue commands to LRIS. At the start of the night you will use the DISK button to bring up a window for specifying the disk location for your images. Also, use the CMD window to bring up a screen for setting the image number of the next frame. The most commonly used part of this screen is the exposure time area at the top of the window. After entering the desired time, hit the "set" button to enter it. Use the START button to begin an LRIS integration.

The LRIS configuration window:


By far the window you will look at the most! This window lets you change the LRIS configuration, i.e. change gratings, masks, filters, etc. To make a change for any area (specified by the buttons described below), just click on the small lettered button to the right of the box in question and wait for a pull-down window to pop up giving you your possible choices. The main buttons of interest are:

Now you are ready to go to work:
  1. Activate "Start Up ALL LRIS Control" utility under LRIS Control Window in left display. This starts XLRIS, Xpose, CCD Log, object.tcl (to edit image header), and Figaro.
  2. Answer the questions the startup script asks you, including where you want your data to end up. I recommend letting the script reset all settings to default, to clear any settings left by prior observers.
  3. Click SET in XLRIS window to get slitmask, grating, filter, and focus parameter window.
  4. Activate Master -> current screen mode under Guider Eavesdropping Menu. This also starts the Guider Compass Rose.
  5. Activate LRIS FACSUM utility under K2 Telescope Status Menu in right display. Parameters include LST, UT, HA, Ra, Dec, airmass and telescope focus.
  6. Verify that display section is set correctly by hitting "WIN..." button on exposure window. You should have X,Y binning equal to 1 and window W,H equal to 2048 (unless you want to readout only part of the chip). Note here that X,Y indicate the start row,column while W,H indicate the TOTAL number of rows,columns.
  7. Set exposure number ID using the "Set Next Image Frame #" item under the CMD button menu in XLRIS.
  8. Set object name and description in the object.tcl window. This window is brought up automatically when you start "ALL LRIS Control". You can also get this window by clicking CMD in the XLRIS window and specifying "object.tcl".
  9. Set gain setting with "m ccdgain=low" from the UNIX window, verify with "s ccdgain". This gives a gain of 2 e-/DN. The gain is also shown on the XPOSE window display.


Calibration

For various observing projects, you will need different calibration frames. In the case of multislit spectroscopy, you will need arcs, internal flats, and dome flats.

To take arcs and internal flats, close the trapdoor on LRIS. Insert the desired mask, set your grating and grating angle, and turn on the desired lamp. Integration times with the 300 line/5000A are:


For imaging dome flats, put direct mirror in, have the observing assistant turn on the low lamps, and take 8 second exposures in R. Make sure to Enable disk writing!

DOME FLAT EXPOSURE TIMES
B 20 sec
V 10 sec
R 6 sec
I 3 sec


Aligning Slitmasks

In the afternoon, take an image of your mask and record the centers of the box slits. We find that a few second (<5) exposure with the Ne lamp, through the B filter, trapdoor closed, works fine. The boxes can be centroided by eye as long as the centers are good to one or two pixels. Note the centers of each box, and create a file, for example object.xy, with the box centers. Here's an example:

576 1689 S1
1021 1696 S3
1345 1560 S5
Then, at night, take a short (30s) image of your field. Find one of the alignment stars in this image, and calculate its offset from the earlier mask postion using mshift:

PACKAGE = ucsclris
   TASK = mshift
 
xobs    =                 100.  x coord observed
yobs    =                 100.  y coord observed
(xref   =                  98.) x coord desired
(yref   =                  97.) y coord desired
(pa     =                 120.) current PA of CCD
(invert =                   no) invert orientation (N-top, E-right)?
dcs     =                   no  [CONFIRM]  Send DCS commands? 
(mode   =                   ql)
Apply the move output by mshift, either by telling the OA, or by cutting and pasting the commands into the Manuka window. Then, put in the mask and take another image (30s).

This time, your alignment stars should show up in your boxes. Now, we will use the qbox routine to centroid our stars within the boxes. This will require our image of the mask, with the stars hopefully in the boxes, and the file with the box x,y's. Then, epar qbox:

PACKAGE = ucsclris
   TASK = qbox
 
image   =             lris0246  input image
box_pos =            object.xy  input box positions
(fwhm   =                   4.) FWHM of star (pixels)
(xsz    =                  20.) x-size of box (pixels)
(ysz    =                  20.) y-size of box (pixels)
(prescan =                  42) prescan included in input x-coordinates (pixels)
(invert =                   no) reverse orientation? (N-top, E-right)
(mode   =                    q)
Change the fwhm to be appropriate for the seeing; 1 pixel = .2" or so. The prescan value of 42 is appropriate for twoamp readout.

Qbox will display some plots showing a cut through each box.


Using the mouse, put the movable line at the background level in the 1st box, and hit space. It should automatically centroid the first object. If you don't like its centroid, you can use 'f' to mark your own. Hit 'q' to go on to the next object.

Repeat for each alignment object. Qbox will then show the offsets in a plot. Hit 'q' to quit. You will then get a new list of telescope commands to execute in the manuka window. If you have edited the parameters for xbox, and set dcs=yes and dcs_rot=yes, the telescope commands are automatically sent. If you set dcs=no, you will be asked if you want the moves sent. This may be prudent.

That's it.


Miscellaneous Setup Details

Focusing the telescope:
  1. Set exptime to 10 sec
  2. mirror in, clear mask in.
  3. Filter to GG495
  4. Spectrograph focus to 2640
  5. type (in UNIX window): focusloop tel_focus (where tel_focus is the central telescope focus value, e.g., 12.9). Notice that this can now be done by clicking CDM in XLRIS window and specifying starting focus.
  6. To change telescope focus type (UNIX): modify -s dcs telfocus=NEWVALUE
LRIS Focus Settings (as of December 1997 on Keck II):
Imaging: Clear 2060
B 2060
V 2230
R 2080
I 2060

Spectra: Longslit GG495 2080
clear 2080
Slitmask GG495 2110
clear 2060

Note that a new V Filter was installed after 4/96; previous focus was 2080.

Changing the Slitmasks:

  1. Place slitmask wheel in position 1 - normally DIRECT
  2. Replace appropriate slitmasks
  3. Check slitmask names by typing "configure slitname" in a Manuka window. Output to screen should look something like :
  4. Value aliases for slitname:
    long_1.5 = 4
    7_774 = 3
    7_796 = 7
    direct = 1
  5. Delete names of removed slitmasks by typing "configure -d slitname name1 name2 etc". Confirmation of deletion should appear on screen.
  6. Put in names of new slitmasks by typing "configure slitname name = #" Confirmation of name change should appear on screen.
  7. Quit the SETUP and restart to refresh names on slitmask window.
Checking Grating Positions:
  1. Check grating names by typing "configure graname" in Manuka window. Output to screen should look something like :

    Value aliases for graname:
        mirror = 1
        600/5000 = 5
        1200/7500 = 2
        300/5000 = 3

  2. Show grating port number by typing "s grating" and show corresponding grating name by typing "s graname" in a Manuka window.
Writing Setup Procedures:
  1. Set up the mask, the grating, and the grating angle. Note that the position of trap door and the status of lamps are NOT included in setup.
  2. Click WRITE in XLRIS display window. Give filename for setup file which is written to "setups" directory on (e.g) /home/manuka1/lris18.
  3. To enable, click GO in XLRIS window. Note that this can change grating and slitmask simultaneously and that the Angle changes NOT the central wavelength.
Figaro Display Notes: General Notes:


Credits
Written by Roy Gal and Steve Odewahn
.
Caltech
With help from:

Updated 4/12/99