## Observer's Guide to Using Computers at the Telescope

1: Introduction
2: Assigning Visitor Accounts
3: Visitor Coordinate Files
4: Using Display Windows - ximtool, saoimage, and skycat
5: Writing Data to Tape
7: Mountain Paging System
8: Using the Printer at the Summit: lprint and enscript
9: IRAF Hints
10: Editors: vi and emacs
A: Appendix A: Device Names
B: Appendix B: Common Problems and Their Cure
C: Appendix C: Quick Reference for the vi Editor

1: Introduction

This manual was designed as a quick reference for astronomers using the computers on Mauna Kea. It goes through those tasks which they will most likely require during the night or at the end of their run. It includes the assignment of visitor accounts, visitor coordinate lists, displaying images, writing data to tape, bringing your own laptop, the mountain paging system, printing files, IRAF help, and editors. If there is something that has been overlooked, we would greatly appreciate your input (please send comments and suggestions to Lisa Wells, see the email address at the bottom of the page).

2: Assigning Visitor Accounts

The visitor accounts are set up under the run ID number, i.e., c54, h32, f102. The form of the password for your account is found on the white board in the telescope control room or you may ask your support astronomer, or observing assistant. These accounts are set up and maintained by Kanoa Withington. If you have any questions about your account, please address email to kanoa@cfht.hawaii.edu.

3: Visitor Coordinate Files

Visiting astronomers may bring with them or pull over from their home site via ftp, a coordinate file in the format used by the observing assistant. This will greatly reduce the time spent moving between objects. The form of these files is given by:

   nr      RA         Dec     EQ       name         pmRA   pmDec

or
   1 18:42:48.0   00:06:26.0 2000  "L110-362"         0      0
2 18:43:48.0   00:06:26.0 2000  "L110-362_15E"     0      0
3 18:41:48.0   00:06:26.0 2000  "L110-362_15W"     0      0
4 18:42:48.0   00:11:26.0 2000  "L110-362_7N"      0      0
5 18:43:48.0   00:11:26.0 2000  "L110-362_7N_15E"
6 18:41:48.0   00:11:26.0 2000  "L110-362_7N_15W"

The colons are required in the RA and Dec format. You must specify a number for the object followed by the RA, DEC and Epoch. In quotes, specify a name for the object and the last two numbers are optional proper motions in RA and Dec. If they are zero, you may delete these numbers as in the last 2 entries. Inputs for moving targets is done several ways. If you come with the calculated motions in RA and Dec in Arcsecs/sec, then we can directly input those numbers but they do not go into the list above. We also have the option to interpolate between 2 RA and Dec positions (with the LST or UT for the 2 positions) which automatically computes the non-sidereal rates for a moving object.

4: Using Display Windows - ximtool, saoimage, and skycat

This section gives some background information for using the various window displays for viewing images. We will describe some of the most important parameters and how to measure the FWHM of stars using each.

Using ximtool

Open an ximtool window by simply typing ximtool in any window. This can be run in the background if you follow it with an &. Strictly speaking ti is better to open this window from the xterm or xgterm from which you will run IRAF. The Control Panel window may be brought up by clicking on the left most box in the upper right side of the window. Many of the same functions may be used from the drop down menus under View and Options. Under the File menu, you may use the Load option to bring up a window which will direct you to the proper directory to display an image in the window. Also, you may use the IRAF display task.

     cl> display (imagename) (framenumber)
cl> display 098744o.fits 1

or
     cl> display 098744o.fits 1 fill+

Where (framenumber) is the integer frame number (1 through 4). Ximtool has 4 frames in which to load images for ease of blinking between frames. The fill+ in the second example tells IRAF to display the whole image in the display window even if the size definition is not set properly. Check the setting of the stdimage parameter in IRAF by typing show stdimage. If it is set to a value smaller than the image which you are trying to display then you may set it using:
     cl> set stdimage=(imtool definition)
cl> set stdimage=imt1024

A listing of all the possible settings for this parameter are found in Appendix A or by typing gdevices in IRAF. Hold down the right mouse button, and move the cursor to change the display transfer function. Once displayed the imexamine task is used to determine the FWHM of several stars in the image. Just type:
     cl> imexam (imagename)

If you have just displayed an image, you may leave off the (imagename). The cursor will shift over to the image window (and becomes a circle) and you simply move the cursor to the star you wish to measure and type "r" for a radial profile or type "." to get a quick radial profile. The other 2 commands which only print out the values to the window are "a" and ",". The first gives several fits to the star and the second just prints out the measured FWHM. If you forget the possible commands while running imexamine then simply type a "?". The cursor will move into the xterm or xgterm window where a listing of the commands will be shown. After you are done with this help page you must type "q" perhaps several times to return to the image display window and the interactive cursor. Remember to type "q" when you are finished with the image to get back to interactive IRAF again.

Using saoimage

Open an saoimage window by simply typing saoimage in any window. Strictly speaking ti is better to open this window from the xterm or xgterm from which you will run IRAF. This can be run in the background if you follow it with an &. There are two ways of loading an image into the saoimage window. There is a new option under the etc options which allows you to type in the path of the image to be displayed. Also you may use the IRAF display task.

     cl> display (imagename) (framenumber)
cl> display 098744o.fits 1

or
     cl> display 098744o.fits 1 fill+

Where (imagename) and (framenumber) must be specified, and the latter is the integer frame number (1 through 4). This doesn't really matter in using saoimage since there is only one frame buffer for displaying. The fill+ in the second example tells IRAF to display the whole image in the display window even if the size definition is not set properly. Check the setting of the stdimage parameter in IRAF by typing show stdimage. If it is set to a value smaller than the image which you are trying to display then set it using:
     cl> set stdimage=(imtool definition)
cl> set stdimage=imt1024

A listing of all the possible settings for this parameter are found in Appendix A or by typing gdevices in IRAF. Playing with the transfer function can be done using the Scale and Color options. There is a panner also which will zoom in or out in the Pan options. Once displayed the imexamine task is used to determine the FWHM of several stars in the image. Just type:
     cl> imexam (imagename)

If you have just displayed an image, you may leave off the (imagename). The cursor will shift over to the image window (and becomes a +) and you simply move the cursor to the star you wish to measure and type "r" for a radial profile or type "." to get a quick radial profile. The other 2 commands which only print out the values to the window are "a" and ",". The first gives several fits to the star and the second just prints out the measured FWHM. If you forget the possible commands while running imexamine then simply type a "?". The cursor will move into the xterm or xgterm window where a listing of the commands will be shown. After you are done with this help page you must type "q" perhaps several times to return to the image display window and the interactive cursor. Remember to type "q" when you are finished with the image to get back to interactive IRAF again.

Using skycat

Bring up the skycat window by typing skycat in an xterm window. If you open skycat from the images directory in use, the pathname for the files directory will beset in the open option under the File menu. This can be run in the background if you follow it with an &. Adjust the window to the size required by moving into one of the gray corners and holding the left mouse button while dragging the cursor to the appropriate size. Bring up a Cut Levels window from the View options. Also bring up the Pick Object window from the View menu. Load an image using the Open option in the File menu. You can play with the transfer function using the Colors and Cut Levels windows from the View menu. Setting the transfer function to one of the Auto Set buttons in the Cut Levels window is the easiest. To get the FWHM, use the Pick Object window first by clicking on the Pick Object button on the bottom of the window. Then drag the cursor to the star you wish to measure. Click the left mouse button when centered on the star and the x and y values will be displayed in the Pick Object window. This can be repeated many times for the stars you wish to measure. If you get a scaling error from skycat then click on the Z button near the top of the window and try measuring the star again. An online help page for skycat is available at: http://archive.eso.org:8080/skycat/ Help pages for all the display windows are available in a binder in the telescope control room.

5: Writing Data to Tape

Reading and writing images from magnetic media is done using the UNIX tar command, or in IRAF wfits, and rfits in the dataio package. Do not write tapes from the instrument control machine since this can clog the acquisition processes. Use one of the other machines, like makani or the remote terminal for mahina to write tapes. It is a good idea to back up data before leaving for bed in the morning or back it up during the night. We do have an automatic backup of data on our system strictly for problems in reading tapes once you return home. This is not to be used as your data source. You may want to make 2 copies of your data before deleting them. Also, use only high grade magnetic media and be aware of manufacturer's warnings in the safe keeping of magnetic media. DO NOT LEAVE TAPES IN HOT PLACES (i.e., rental car in a parking lot at a hotel on the beach) OR DATA WRITTEN MAY BECOME INACCESSIBLE. Backup devices (DATs, DLTs, and exabytes) are available from the OA so ask for as many as you need. You will be asked to sign a form so that the tapes are charged to you.

Using UNIX, you will use either some form of the tar command or savedlt. The UNIX tar command may be used to transport data by first writing FITS files somewhere on disk using wfits unless they are already in this format, and then using tar to write that area to tape. This may be wise if an old version of IRAF is being used at home. The UNIX device name for all the machines is listed in the tables in Appendix A. Most device names are written on the device itself so write it down so that you have the name at your computer terminal. Putting an "n" at the end of the device name means that it will not rewind the tape after performing an operation, so if you are writing more than one file to exabyte, use /dev/rmt/0n for example:

     cl> !tar cvf /dev/rmt/0 .     #For these you must recall the devicename

or outside IRAF,
     cfh12k@mahina/images: tar cvf /dev/rmt/0n .


From within IRAF, you must precede these commands with a "!". The "c" means create a new tar file, "v" means give verbose information, and "f" followed by the device name specifies where the tar file is to be written. The period at the end means that the current directory is to be written as the tar file. NOTE: Do not specify the full path name including the disk name, or they will not be readable at home, instead go into the directory being saved. Read the tape, by changing the "c" to an "x" for extract. List the contents of the tape, by changing the "c" to "t".

Using IRAF, you must allocate the device to your account before using it. You may check the name of the devices on the various computers at CFHT by typing "devices" at the IRAF prompt. Allocate the device inside IRAF by typing (in the xgterm, or xterm window):

     cl> allocate mtexb           #For the exabyte drive
cl> allocate mtdat           #For the DAT drive
cl> allocate mtdlt           #For the DLT drive

If you receive an error message, then try it again and it should say that the device is already allocated to your account. Once the tape drive is allocated to you no other user can access it. The tape drive may be allocated to another user, if it is not being used by this person, notify them that they still have the drive allocated or ask the OA to deallocate it from the other account. The drive may already be allocated to the account, a message will indicate this.

The DLT may be used at several different densities. If you are able to read them at your home institution you may specify the density by allocating the device using:

     cl> allocate mtdlthic        #For high density
cl> allocate mtdltlo         #For low density

Now the dataio package is usually loaded automatically. This can be checked by doing an lpar on the task wfits. If you cannot do this, then type "dataio" to load the package. Now you use the following syntax:
     cl> epar wfits

And edit the parameters to run the task. This is exited by typing ":wq" as with the vi editor. Otherwise you may specify the parameters in the command line to run the task:
     cl> wfits (filenames) (output device) (yes/no)

where (filenames) is an alias list of image names or an input list, (output device) is the tape unit being used, and (yes/no) is the newtape parameter for the tape. This is used to keep from overwriting existing data on a tape. If newtape is "yes" then the writing begins at the beginning of the tape and anything already on the tape is overwritten. Make sure this parameter is set to "no" if you have data on the tape which you do not want overwritten. Preserve the name of the file by setting the oldirafname parameter to yes.
     cl> wfits a*.fits mtdat yes

or
     cl> wfits @list mtdat new+

You may also create a list of file images to be written to the tape which is then accessed by IRAF using an "@" in front of the name of the list. Using "new+" is equivalent to using the "yes". If you would like a listing of your fits tape, you may do this several ways. The rfits command has an option to make_image which may be set to "no", the file will then not be read off the tape and the output from rfits may be redirected to a filename as in:
     cl> rfits mtdat "im" 1-999 make- > tapelist &

The "&" at the end will place the process in the background and allow inputs to the window. There is an added option in the task called dfits in the ctio package in IRAF. This task will read through a tape and pull out the requested header parameters from each images on the tape and write them to a file. The default file is located at "ctio$src/dfits/format.dat". If you wish to modify this file, simply make a copy in your directory and edit the file using:  cl> cp ctio$src/dfits/format.dat .
cl> ed format.dat
cl> dfits mtdat 1-999 long- > tapelist &

Only those parameters specified in the format file will be read and listed to the window or saved in the specified file unless the long format is requested. If you plan to take a hardcopy of the list with you, it is suggested that you not use the longheader format. It is a major waste of paper if you plan to print it out and would be heavy to carry home.

There are ethernet connections at the summit for those who bring a laptop computer. At Hale Pohaku, the connection host hp8 has the IP address 128.171.71.108. The gateway (router) at HP is 128.171.71.137. The summit connection is host haole9 with IP address 128.171.83.247. The gateway (router) at the summit is 128.171.83.80.

7: Mountain Calling and Paging System

Safety is always a concern on the mountain, and a safety coordinator is always designated on the board as you walk in. The observing assistant (OA) is the safety coordinator at night. All observers must put a name on the board as they enter the summit building in case of emergency so that we know how many people must be gotten out in case of fire or other emergency. Any emergency will be responded to by the OA. To call for assistance in case of emergency, or if the telescope or instrument has a problem tell the OA or use the telephone pager if the OA has stepped out of the control room. To connect, pick up the phone and push the Page button. Just speak into the phone. The message is transmitted through all the phones and speakers located throughout the building. The OA will be the liaison for technical problems with staff members who are on-call.

In case of major medical problem or fire, emergency phone numbers should also be posted in a prominent place in the control room.

## For emergency response, call 911.

8: Using the Printer at the Summit: lprint and enscript

A list of available printers is given in Appendix A in Table 1. The full list of printers available is accessible by typing "printers" in UNIX. There are several ways to get hard copies of text files. Any ASCII-text file can be printed by typing;

     lprint (filename)

Text can also be piped to lprint, such as printing a help file for a UNIX command:
     man (command) | lprint

or
     man tar | lprint

The pipe character |' sends the output from commands like man to the input of lprint. Note that lpr may be used as a short version. This is also done within IRAF using a similar command, use help (taskname) | lprint. The UNIX commands for the printers are aliased within IRAF. Look at the printer queue by executing the UNIX command lpq. The commands to look at the printer queue and remove files from the queue are:
     lpq (-P[printername])
lprm (-P[printername]) (job number)

or
     lpq -Psps
lprm -Psps 812
lpq

The last command in the example uses the default printer for the machine in use. The default printer is the one closest to the workstation, named lw; the printer argument is optional. In addition, each printer is given a physical name, i.e.; makani's printer is sps. A complete list of printers and their locations may be found in Appendix~A. Text files that have longer than standard lines may be printed on the laser printer using the UNIX command enscript. Rotate, r the output by 90 degrees on the page with a gaudy appearance (G) using;
     enscript -rG -Plw3 filename

For a file with short lines, compact the output by printing two pages on one sheet of paper, using the -r2 option. This prints the 2 pages side by side on the page. If you require paper please ask the OA for assistance. We ask that you not abuse the privilege by printing out lengthly documents.

9: IRAF Hints

There is no designated staff member for IRAF help, however we hope that observers will find the following useful for simple operations while at the summit. This section is not intended for performing complete reductions of data using IRAF.

9a: Starting Up IRAF

IRAF is the Image Reduction and Analysis Facility used for data manipulation. You must be in an xterm or xgterm window to run IRAF. If you will be displaying images then you should start the display window of your choice from this window before starting up IRAF (see Section 4 of this manual). Some of the instrument sessions have an IRAF subdirectory, you want to start IRAF from this subdirectory. Simply type cl in the window. If you get the message "Warning: no login.cl found in login directory", then you are not in the correct directory for starting IRAF. Type a logout to exit and check your current directory. A proper login will include information about the version running, give a list of devices, and a list of some of the packages in IRAF. You should get a cl> prompt. You are now ready to start.

9b: Structure and Syntax: eparam and lparam

IRAF is a collection of tasks organized into packages grouped by their use. Packages are loaded by typing the package name, and typing package will display the packages currently loaded. Tasks are run by setting the parameters and typing the task name. The special parameter sets for tasks called psets are edited by typing the name of the pset file. List or edit the parameters respectively, for the task display for example, by typing:

     cl> lparam display
cl> eparam display

Editing invokes a modified version of the vi editor in a list of the parameters. Change a parameter by moving the cursor to the parameter line and typing in the new value followed by a carriage return, CR. Other possible commands are:
• uparrow - move to previous parameter line
• downarrow - move to next parameter line
• ^u ^l - edit the parameter at the current line
• leftarrow - move cursor left
• rightarrow - move cursor right
• :wq - quit and save parameter changes
• ZZ - quit and save parameter changes
• ^z - quit and save parameter changes
• ^c - quit and do not save parameter changes
• :go - run the task
Typing "^u ^l", not simultaneously but one after the other, sends the cursor to the parameter at the line specified in the parameter list and allows you to edit it. This uses the vi editor and the left and right arrow keys allow you to move to just before the character you wish to change. Using the delete key will erase the character to the left of the cursor and you may now type its replacement. It is possible that you will have to use the "shift" with the "delete" key to erase unwanted characters depending on the keyboard emulator mapping. More information about the vi editor is found in section 10 and appendix C.

There are many ways in which an image header parameter can be corrupted, so it is useful to know how to edit the header. This is done with the hedit task in IRAF. Below is an example of correcting one of the header parameters. The header has been shortened to conserve space.

     cl> imhead 551785d08.fits l+ | page
551785d08.fits[512,512][short]: m51  B  600s
No bad pixels, no histogram, min=unknown, max=unknown
Line storage mode, physdim [512,512], length of user area 1540 s.u.
Pixel file "551785d08.fits" [ok]
'KPNO-IRAF'           /
'08-04-92'            /
UT      = '88:88:88.00'         /  UNIVERSAL TIME
cl> hedit 551785d08.fits UT "9:27:27.00" add+ update+
551785d08.fits,UT (88:88:88.00 -> 9:27:27.00): CR
551785d08.fits,UT: 88:88:88.00 -> 9:27:27.00
update 551785d08.fits? (yes):
551785d08.fits updated
cl> imhead 551785d08.fits l+ | page
551785d08.fits[512,512][short]: m51  B  600s
No bad pixels, no histogram, min=unknown, max=unknown
Line storage mode, physdim [512,512], length of user area 1540 s.u.
Pixel file "551785d08.fits" [ok]
'KPNO-IRAF'           /
'08-04-92'            /
UT      = ' 9:27:27.00'         /  UNIVERSAL TIME

Other tasks which may be useful are those which automatically recalculate the airmass and UT for the middle of the exposure, setairmass. This task will not only read the old values from the header but add the specified header words and values to the header.

9d: Plotting Tasks: implot, splot and graph

Images may be examined using the task implot in the plot package. This task plots a 2D image, choosing a central line by default, with the x axis as columns, and the y axis as intensity in ad units. The right side shows the lines with tick marks identifying the line currently displayed, see the title also.

     cl> implot 551785.fits
cl> implot 551785d08.fits

Interactively there are many options:
• a - Plot the average of a range of lines or columns
• c - Plot a column
• e - Expand plot by marking corners of viewport
• l - Plot a line
• o - Overplot next vector
• q - Quit
• s - Print statistics on a region
There are also a number of colon commands which perform the same task as the single keystrokes above such as :l 350 or :c 350 400 to plot line 350 or average columns 350 to 400.

The task splot is mostly used for spectral data by specifying the dispersion axis, dispaxis and order or line to be examined.

     cl> splot 098744o.fits

There are a semi-infinite number of things which splot can do such that not all of them can be discussed here.
• d - Deblend lines using Gaussians
• e - Measure equivalent width, integrated flux and center of a line
• f - Arithmetic functions (many sub-options)
• g - Get a new image and plot it
• h - Equivalent widths (a, b, c, l, r, and k options)
• i - Write current image to a new image
• k - Gaussian fit to a single line
• l - Convert to F_lambda
• n - Convert to F_nu
• q - Quit
• # - Select a new line or aperture to plot
• :dispaxis (val) - Change axis plot
• :nsum (val) - Change the summing parameter for a 2D image
Arithmetic mode must be exited by typing "q".

Plotting two column files using the task graph with the defaults will automatically set the x and y scale for the smallest and largest values in each dimension. The format and style of the plot may be changed by choosing other options in the parameter file, including specifying a title, and axis labels.

     cl> graph magtable

Other tasks in the plot package plot histograms of the pixel values in an image, plot the radial profile of a star, plot rows or columns, plot a random vector specified by the beginning and ending point for the vector in the image coordinates, or makes a surface plot of an image.

All of the interactive graphics tasks have ways of getting help while in this mode, simply by typing a "?". The help page will appear on the gterm text window and may be paged to view the whole thing. Exit help mode by typing q or return.

There are three different ways to get a hard copy of a plot. The first is using the equal sign key = in interactive mode. This is equivalent to typing :.snap. If the task is not interactive, use =gcur to get into the graphics window, then press the equal sign to get a copy of the plot. Follow several queued snaps with a :.gflush, to help clear the queue.

Check the printer settings with

     cl> show printer
cl> show stdplot

If you wish to send output to a printer other than the default use:
     cl> set printer=ljps
cl> set stdplot=ljps

to send output to the Waimea printer. This is especially useful if a staff member downtown must see something in an image. Logging off the computer will not save any IRAF variables that were changed, only modifying the loginuser.cl file will save these changes.

9e: Image Statistics: imstatistics and imhistogram

It is a good idea to check the statistics of the bias, flat and sky flat images before combining them using the tasks in the ccdred package. Specify the whole image by typing its name, or a region of the image as shown:

     cl> imstat 098744o.fits
cl> imstat 098744o[200:300,350:450]
cl> imstat 098744o08[200:300,350:450]

The last of these specifies only CCD08 in the cfh12k mosaic. The result is a scroll listing of the images matching the template of the number of pixels, the mean, the standard deviation, minimum pixel value and the maximum pixel value. For a list of calibration frames of the same type these numbers should be very close. The non-interactive task imhistogram uses the graph plane of the gterm window to plot a histogram of the pixel values specified in the image parameter.
     cl> imhist 098744o[200:300,350:450]


10: Editors: vi and emacs

The vi editor is the UNIX editor on the Suns, and is the default set in the login.cl file when IRAF is entered. There is an online help page in the ctio package which lists the most important commands. To get a copy of these pages, load the ctio package in IRAF, and type:

     cl> help editor | lpr

This will queue a copy of the help page to the laser printer. Also check out appendix C for a quick help page of the vi editor. The ctio package must be loaded to access this help page. Another editor Emacs is available for those who know it and wish to use it. To change the editor setting, set it at login time within IRAF by typing, "set editor=emacs". Otherwise, change this parameter setting in the loginuser.cl file in the home directory of the account. The GNU Emacs text editor is invoked in the usual way, i.e., emacs foo.txt. Getting out is more complicated and is left as an exercise to the user. By default, Emacs will come up with the generic control and meta commands. To activate the commonly used Sun keyboard specific features (e.g., arrow keys, Home, End), create an .emacs file in the root directory which contains the following line:
     (setq sun-esc-bracket t)

A more extensive .emacs file might contain the following:
     (setq-default case-fold-search nil)
(setq default-major-mode 'text-mode)
(setq text-mode-hook '(lambda () (auto-fill-mode 1)))
(setq fill-column 72)
(setq sun-esc-bracket t)

In order, these commands: make string searches case sensitive; make Text the default mode for all new buffers; turn on auto fill; set the fill column to 72; and map certain Sun keyboard functions to use full Emacs functions (e.g. the last line activates the arrow keys). GNU Emacs documentation is not currently available on the mountain.

Appendix A: Device Names

Typing devices within IRAF gives the following listing, however, I have added the UNIX names for use of the tar command:

                            TABLE 1
***********************************************************
Printers
========

location      printer name
=========     =============
Computer room Waimea     wps, wpsdx, wpst3
Computer room Waimea     tek550
Room 73 Waimea     ljps, ljpsdx, ljpst3
Room 73 Waimea     hpcolor
Summit Remote Observing Room     sps
***********************************************************

The dx extension is for 2-sided printing. The t3 is for legal 11"x17" size paper.
                                    TABLE 2
*****************************************************************************
DEVICES (MAR99)                   CFHT                   DEVICES (MAR99)

IRAF V2.11 accessible tape drives at CFHT
=========================================

machine   location   device   iraf device  comments              unix
=======   ========   ======== ===========  ===================== ===========
kuanalu    waimea    dat      mtdat                              /dev/rmt/1
kuanalu    waimea    exabyte  mtexb                              /dev/rmt/0
----------------------------------------------------------------------------
hoku       waimea    dlt      mtdlt also mtdlthic, mtdltlo, ...  /dev/rmt/0
hoku       waimea    exabyte  mtexb                              /dev/rmt/1
----------------------------------------------------------------------------
makani     summit    dlt      mtdlt also mtdlthic, mtdltlo, ...  /dev/rmt/2
makani     summit    exabyte  mtexb                              /dev/rmt/1
makani     summit    dat      mtdat                              /dev/rmt/0
----------------------------------------------------------------------------
mahina     summit    dlt      mtdlt also mtdlthic, mtdltlo, ...  /dev/rmt/1
mahina     summit    exabyte  mtexb                              /dev/rmt/0
mahina     summit    dat      mtdat                              /dev/rmt/2
----------------------------------------------------------------------------
halepohaku  no drives available
----------------------------------------------------------------------------
*****************************************************************************

One device on neptune is missing from the list. It is a DAT drive named /dev/rmt/0. Typing gdevices within IRAF gives the following listing:
                                   TABLE 3
*****************************************************************************
Graphic Device Definitions for IRAF
*****************************************************************************
#                         ALIASES    NX   NY  DESCRIPTION
imt30 imtth1   408  608  TH1 CCD detector format
imt31 imtrca1   326  526  RCA1 CCD detector format
imt32 imtrca2   680 1056  RCA2 CCD detector format
imt33 imtfull   680  680  Full Sun Screen
imt34 imtrca4   680 1024  RCA4 detector detector form
imt35 imtphx   540  540  PHX1 detector detector form
imt36 imtdao  4096  200  DAO CCD detector format
imtx   512  512  Imtool display server
imt1 imt512 imtool   512  512  Imtool display server
imt2 imt800   800  800
imt3 imt1024  1024 1024
imt4 imt1600  1600 1600
imt5 imt2048  2048 2048
imt6 imt4096  4096 4096
imt7 imt4x1  4096 1024
imt8 imt1x4  1024 4096
imt9 imtfs  1144  880  Full screen, landscape mode
imt10 imtfs35 imtmatrix  1144  764  full screen at 35mm film as
imt11 imt128   128  128
imt12 imt256   256  256
imt13 imttall128   128 1056  tall and narrow for spectro
imt14 imttall256   256 1056  tall and wider for spectros
imt15 imtwide128  1056  128  wide and thin for spectrosc
imt16 imtwide256  1056  256  wide and fatter for spectro
imt17 imtssy  1008  648
imt18 imtssn  1024  680
imt20 imtgec   388  576  GEC CCD detector format
imt21 imtkpca  3040  976  KPCA CCD detector format
imt22 imt2df1 imt2df1x1   128 1520  2D-Frutti detector format
imt23 imt2df2 imt2df2x1   256 1520  2D-Frutti detector format
imt24 imt2df5 imt2df5x1   512 1520  2D-Frutti detector format
imt25 imt2df9 imt2df9x1   960 1520  2D-Frutti detector format
imt26 imtcryo  1232  400  Cryogenic camera
imt27 imtgcam  3104  348  Gold camera - Ford
imt28 imt2df9x3   976 3040  2D-Frutti detector format
imt29 imtgw   800  256  GONG Cache Monitor
imt30 imtgl imtgong   408  608  GONG Cache Monitor
imt31 imtret   326  526  Reticon detector format
imt32 imtti imtti2 imtti3
imtti4 imtti5   680 1056  KPNO TI 800x800
imt33 imtt5ha   680  680  KPNO Tek 512x512
imt34 imtt1ka   680 1024  KPNO Tek 1K
imt35 imts2ka imtt2ka imtt2kb   540  540  KPNO Tek or STIS 2K
imt36 imtf3ka imtfo3k  4096  200  KPNO Ford 3072x1024
imt37 imtf1ka  1232  800  KPNO Ford (Loral) 1200x800
*****************************************************************************


Appendix B: Common Problems and Their Cure

The following are some of the more common problems and some fixes:

• Screen Frozen: May have hit a "^s" which paused output to the screen. Try typing a "^q" to continue.
• Job Hangs Up: Try typing a "^q" to continue. If this doesn't work, type a "^c" and then type an flpr (if in IRAF) to flush the process register. Try the jobs again, if problems persist, try checking the parameters (again if in IRAF) or make sure you are in the proper directory for what you are trying to do. NEVER use a "^c" to kill a magnetic tape writing job!!! This will many times cut the communication line from the computer to the device and may require a recycling of the device or computer to get the link back.
• Tape Problems: Various causes. To recover, check the tape to see if it was written to the end of the tape or ran off the end(in this case, make a note of the last file written and change tapes and begin with this file on a new tape), try rewinding the tape, deallocating the drive, checking the density setting, or logging out and back in again. The drive may need to be cleaned. Ask the OA to clean the drive.
• Tape Writing Fails: Has it run into the end of tape marker? Check the tape and if it is at the end, make note of the last file written. Change tape and continue. Is the tape write protected?
• Exabyte Problems: Various causes of which the most likely is that the tape is bad. Try writing several times and if it stops at the same place, get a new tape. Retry messages don't mean anything unless accompanied by an error message or the tape stops writing before all files are written to the tape. The drive may need to be cleaned. Ask the OA to clean the drive. There might be a problem with the drives reliability also, check with a staff member to ask about a tape drive.
• Terminal Behaves Strangely: Was the caps lock on at login time? Try exit several times in a row to log off the machine and make sure the caps lock is off when logging in again. In the window environment the terminal type may be set wrong. If using the xgterm window in IRAF, type stty xgterm, for an xterm window, type stty xterm, and for a pc, type stty pc640. This should give the correct keyboard mapping.
• Image Reading Fails: Have you filled up the disk? Did you leave the tapes for a length of time in a very hot place? Reading files onto a computer is rarely done at the summit since it is advised that you not reduce data while observing due to the altitude and ease of making a mistake.
The following list of error messages are frequently encountered in IRAF however are not very useful. Sometimes getting the correct interpretation of the message needs creativity. Here are some hints:
• Job Crashes: Probably a bug in the program or a parameter is set to a strange value. Try typing flpr, check the parameters, and try again. If it still doesn't work, unlearn (resets the parameters) the task, or unload the package and load it again. If these do not work, try logging out of IRAF and restarting the cl. If all this fails, send a message to irafhelp.
• Left the CL: Suddenly outside of IRAF with the UNIX prompt, /usr/ucb/hostname/username/:. May have typed "^x" or "^c" too many times, stopping the cl, to get back in, type fg (foreground) or %%.
• Can't Display an Image: Are two display windows in any combination open? (ximtool, saoimage, or skycat?) Get rid of one of them. The correct machine node may not be specified, image may not exist or you may be in the wrong directory. The IRAF environment variable 'node' is possibly not set to the correct computer. Check this using show node. Set it to the computer name using set node = computername. Also possible that if you are using mscdisplay and you are not getting the full mosaic of the 12K images, if the image was binned you may not have all the header parameters you need for the display task. Compare the header of the file that doesn't work with one that does and add the required parameters. If you are using ".imh" extensions in IRAF, try checking the pixel directory for the pixel file using dir imdir. If the file is not listed here, check the image header to see where the pixel file is living, "imhead image l+ | page". If it says [NO PIXEL FILE], then read the image back in off the backup tape if the image was saved. If the image was not saved, then you have lost the image.
• ccdred Parameter Problems: If changing the parameters of a task in the ccdred package doesn't seem to be working, check your translation file setting in the ccdred parameters. Try doing a ccdlist *.fits to check that the translation file is working. Remember that ccdproc knows that it shouldn't apply a flat correction to an image whose imagetype is set to flat. If a flat correction is to be applied to a sky with imagetyp=flat, then ccdproc will not work. Use hedit to change that parameter to object, or other.
• error in DATASEC parameter: Probably tried to use a non-standard operation to trim some of the images but not all of them. Take one of the untrimmed images, trim it using the same values from the previous operation using ccdproc and check the header for the trimsec and datasec parameters. Then hedit the previously trimmed values of trimsec and datasec to the values in the ccdproc trimmed image, and don't mix non-standard and IRAF ccdred operations EVER AGAIN.
• Cannot open image... : The image does not exist, is this the correct directory? Are you using the proper syntax?
• write to IPC with no reader: This can be a caused by a partial crash of a task. Type {\bf flpr} several time in a row to clear the process register and try again.
• ERROR: Cannot open connected subprocess (process name): The cl is unable to find the executable for the package/task. This can be caused by a redefined IRAF environment variable used to get the pathname to the executable (i.e. noao, ctio, etc), or by an installation error. Try typing show (packagename). If the returned path name looks strange or there is a root directory, say noao$then try show noao. If this looks okay, tell the iraf programmer to install the package properly. • ERROR: Abnormal termination of child process 'process name': The process was terminated, and the cl didn't know about it. Retype the command that gave this error. If this fails, try typing flpr several times and run the task again. • PANIC in process name' : errmsg: This is caused by a "can't happen" error condition (something that isn't supposed to happen, is happening). Type flpr one or more times in a row to clear the process cache. Try running it again. • Segmentation violation: An error in the program execution normally caused by a program bug. Try typing flpr one or more times, and if it doesn't work try alternative ways of executing the task, like changing the parameters. You may be trying to divide by "zero" somewhere also so check you images. Please send a bug report to iraf@noao.edu. • Panic during process shutdown... error recursion.... cl dies: This means that the {\it cl} crashed and the {\it cl} must be started up again. The cause of this varies. • Kernel server has died: This happens when an error message is sent by one machine but doesn't get translated across to the machine being used like the tape drive has run to the end of the tape, when writing across a link. • ERROR: cannot rewind device devicename': There is no tape on the tape drive or it has run off the end of the tape. Is the device allocated? Is the tape drive online? Has the command been typed correctly (don't forget the machine name if working across the net)? Deallocate and allocate the tape drive and try again. Use the ps -ax command to check to see if a process has hung the device. If this is the case, kill the process and try again. It is possible that someone used a "^c" to kill a tape read or write job and this has messed up the link from the device to the computer itself. In this case, the OA may have to reboot the computer. • bad mode sec  ' in  ': It may then go into the parameter editing mode for the task. Check the mode parameter at the end of the parameter list, it may have been clobbered. It should be set to ql. Appendix C: Quick Reference for the vi Editor The main UNIX editor is VI, visual editor. If you are more familiar with another editor, then use the one you know. To edit a file using vi type:  cl> edit [filename] cl> vi [filename]  If you are forced to use vi without knowing anything about it, here are a few basic commands which should allow you to do most things. The commands will not be echoed, and in any of the insert modes (where an ESC is used to terminate it), a "delete" will backspace but will not erase even though it has deleted the letters. Remember also that vi is very case sensitive.  j - cursor down k - cursor up h - cursor left l - cursor right #G - move cursor to line # G - move cursor to last line 0 - move cursors to beginning of current line$     - move cursor to end of current line
dd    - delete current line
dw    - delete from cursor to next word
d)    - delete to the end of the sentence
d}    - delete to the end of the paragraph
#dd   - delete # of lines starting at current line
u     - undelete last command
U     - undelete all changes to current line
x     - delete character under the cursor
r     - replace character under the cursor with the next letter typed
/word - search forward for the first occurence of the word
?word - search backwards from cursor for word
n     - next occurance of word searched for using / or ?
^L    - rewrite the screen

The following insert modes are terminated by ESC:
     i     - insert before the cursor
a     - insert after the cursor
R     - write over text beginning at the cursor
o     - open a line following the current line
O     - open a line before the current line

The following commands are viewed at the bottom of the screen after a ':'
     :w    - write the text to the file
:q    - quit the editor, without saving changes
:q!   - emphatic quit, use when :q fails
:wq   - write the text to the file and quit
:1,$s/old/new - substitute new for first occurance of old in lines 1-$,
where 1,\$ is all lines
:1,10s/old/new/g - globally substitute new for old in lines 1-10
:10,20w file2    - write lines 10-20 to filename file2
:1,5w >> file2   - append lines 1-5 to file2

To do more substantial cut and paste work, use the following commands:
     yy    - yank a copy of the current line (copied into buffer)
#yy   - yank a copy of the next # lines from cursor position
p     - put the last item yanked or deleted after the cursor
P     - put the last item yanked or deleted before the cursor

If you get lost using this editor, just type ESC several times to get out of insert modes you might be in and type :q!. This will get you out of the editor and will not save any changes to the file you are working on. If you need help, just ask someone on the staff.
Comments on this document are welcome.
Lisa Wells