60"/FAST Observing Instructions
----------------------------

PB, TG, MC, et al Last update 2004 PB

 1.  Before starting rtsystem,  make sure tv guider system is up and running 
     on the guide pc.  TV camera and gain boxes stay powered on at all times.
     Keep FAST tv gain turned down until you are on the sky.  See Ted's linmax
     docs on the new guide tv system for more info.  Use gain = 2.1, or try
     blev=30, wlev=130, gain=2.5, 32 frames.
     Try values of   1  blev=40 wlev=90 gain=2.3 for higher contrast, 
     avg 32 frames.  New presets now available, just use "FAST dark".

 2.  Start rtsystem with "gofast" from any xterm.

 3.  To take FLATs and BIAS frames for the normal 300-line, 3" slit combo
     configuration, just source the script /home/observer/doflats
     This takes 10 BIAS and 10 FLATs for binby4 and binby2, in 13-minutes.
     "source doflats" in rtshell window.  To take flats
     for other configurations, turn on incand lamp, move sky/comp to comp, 
     and do "goflat exptime; repeat 9". 

3b.  For FAST combo observing, make sure that the henear line at 7384A is positioned at
     pixel 2661. See printout on wall of observing room.  To fine-tune the tilt, one step of
     the micrometer moves the line by ~9-pixels.  Increase micrometer to decrease pixel
     location.

 4.  Take darks in the afternoon and/or morning.  "godark 900; repeat 9"
     Or source the script /home/observer/dodarks.   Use cntrl-C to exit
     a script.

 5.  Other useful rtshell commands for observing include:
     "total exptime"  which starts an exposure of your chosen exptime in seconds.
     "cex"  which takes a 5-sec henear exposure.
     "cexx" which takes a 10-sec henear exposure (for binby2)
     "cexv exptime"  which takes a comp exposure of your chosen exptime in seconds.
     "view file#"  displays file with saoimage.
     "comment"  which pulls up the header comment field editor.
  
     ***NOTE Please keep the comment field info
     updated in order to maintain correct grating, tilt, slit,
     and rotator PA in the headers!!!*** 

 6.  At sunset, open the dome.  Go into the dome and press the "Open" 
     button twice.  This button is to your left as you enter.

 7.  Open the mirror covers.  This is the knob to the left of the south pier.
     You turn to "open" and release.  The first batch of mirror covers opens;
     about 10 seconds later the other 4 do.  Make sure they are all open.  If
     not, try "open" again.  Remember to wait about 10 seconds to see if
     anything happens.  If not, close and then reopen.   If this relay box
     gets confused, wait 5 full minutes and try again.

 8.  Start up IRAF with "ncl".  cd to qfast.  epar qfast and change the 
     "Observation date", and leave with ":q".  qfast lives in the "procd" package 
     "initlog" to start logging.

10.  Leave the rack and the TV gain down until you are ready to observe an object.  
     You can
     check the focus of the spectrograph in the meantime.  Do an "splot" on the
     "COMP" exposure you just took.  Zoom ("a" and "a") in on the range near
     2000 pixels.  Mark the beginning and end of the Gaussian-looking line
     profiles with "k"; you want the FWHM to be below 4.1.  If it's not, focus
     the spectrograph up or down in the yellow windows and note the changes in
     the logs.  You may want to adjust the Guide Rates of the handpaddle from
     the "Rates" menu in the yellow window; I find a value of 3 for both RA
     and dec to be fine (default is 0.5, which is very slow).

11.  Turn on the rack as follows: MAKE SURE the "RA" and "Dec" indicators on
     the TCS-PC (right monitor) are solid blue and not flashing red.   If they
     are, then either hit the hot key on the right PC keyboard (F9) (it is
     marked in red) or click on "Stop" in the yellow window.  Then
     go into the back room and push button "2" on the rack.  Wait about 5 sec
     for the relay to click.  Then flip switch "3" and switch "4".

12.  Now turn the tracking and dome in the tcs window and observe a velocity
     standard, like NGC 7331; move the mirror to "Sky"; focus the guide TV by
     looking at a small star and adjusting the handpaddle buttons.  In the CCD
     window say "comment" and make the appropriate changes.  Then say "total
     180; fresh; repeat 1"; this gives you two 3-minute exposures.  Giude the
     telescope by hand during these exposures.  Do a "cex" afterwards.

13. If the dome gets lost:  from ntcs window, turn off dome track.  Reset vitrax
     controller, inside chart room.  Home dome from ntcs window.  turn dome track
     back on.  Set dome az, or slew to new object.

14.  Do some more of these little projects -- AGN monitoring, stars, etc.
     Often they have specific standards they want for comparison, like Massey
     standards, which should be indicated nearby.  Generally you want the
     standard for a given object to be near the object itself in the sky.
     Also they will often want multiple exposures (usually short -- a few
     minutes tops) of both the targets and the standards.  Remember to do a
     "cex" (turn TV gain down!) after each new object (not each new exposure
     of the same object).

15.  Observe ... 
     To check an exposure for redshift, say "qf 161" (for instance) in the
     red IRAF window, in the "qfast" directory there (see Appendix).  To
     get a redshift (instead of just a spectrum), say "quickred=yes".
     Type 'q' in the non-Tek IRAF window to achieve the quick-reduction.
     If you feed it coordinates that the telescope cannot go to, the "Next"
     indicator on the right PC monitor will be red and the telescope will not
     slew.  So do some other object.

16.  To stow the telescope, click on "Stow" in the yellow window; the tracking
     turns off automatically.  Home the dome.

17.  Close the mirror covers -- check visually that they all shut.

18.  Close the dome and restart the A/C; leave fan on 'Auto'.

19.  Turn off the rack in the order: switch 4, switch 3, button 2.

20.  Source the flats script again at the end of the night.  "source doflats"

21.  Make the night's entry in the on-line observing report.

22.  Load a (size 60) 4mm data tape into nrst11 on flwo60.
     In some other window (not the IRAF or CCD windows) on the Sparc, say
     "backup dat".  Make up the labels.  Retrieve the tape when this is 
     done.  One tape is ok for all 3 or more of your nights.

23.  Fill the dewar.

24.  Turn off the Sparc screen, the lamps in the room, open the blinds.



                                    APPENDIX
                                    --------

 A.  Windows on the Sparc --there are 5.
     1. IRAF window -- red.
     2. CCD window -- black.  Do "total 600", "comment", "dirs", "dlink now",
        "cex" and so on from here.  I think this is called "rtshell".
     3. Yellow window.  This is where you control the comp mirror, the 
        various lamps, enter new coordinates, slew or stow the telescope,
        and so on.
     4. Status window -- small and gray.  Tells you what's going on.  You
        do nothing with it other than look at it to see what the CCD is doing,
        for instance.
     5. Log window -- small and gray.  Do nothing with this one either.


 C.  If you mess up
     1. To interrupt an exposure, in the CCD window say "stop" then "abort" then
        "clear".
     2. To get rid of a file say "purge 136" for instance, again in
        the CCD window.
     3. If you did a "repeat", to stop that say "ccd norepeat".

 D.  Getting the headers right.
     1. You enter the new coordinates from the yellow window.
        - from a catalog: load the catalog by saying "newcat whatever.mct"; it
          knows in which directory to look.  Select an item by its sequence
          in the catalog with "#23", or by name with "!M31" or "!awm7_2.002".
        - by hand -- type in the RA and Dec and epoch with fields separated
          by spaces; remember to update the "comment" manually also (see below).
     2. If the next target came from a catalog, you're set; just say
        "total 300; fresh" in the CCD window.
     3. If you are entering coords by hand, you have to update the comments
        manually as well.  If the exposure will be short, do this before you
        start the exposure, and leave that dialog box by clicking on "File"
        at the top; then you can say "total 300; fresh" to start exposing.
        If the exposure will be long, you can update it while you are
        exposing.  So start the exposure with "total 900", then say "comment",
        update as appropriate, and leave with "File".  This will update the
        header as needed.

 E.  IRAF directories and qfast

     Make a "/home/observer/qfast" directory in which you will do "qfast" 
     (or just "qf").  This is because it generates a lot of ancillary files
     that you don't want in your data directory (/fast/flwo1/1995/10/29, e.g.).
     You toggle between the "trash" and "[date]" directories with "back".
     You need to be in the data directory to do splots.
     You do "iview" (SAOimage of the whole chip) from the CCD window.
     The various programs (iview, q, splot) differ in terms of what argument
     they take.  "q" and "iview" require only the number of the exposure
     (i.e. "q 67") whereas "splot" needs the whole file name (i.e. "splot
     0034.COMP").
    

There is a valid wavelength solution already created for FAST quicklook (qfast).
The key to making this work is to make sure the following files are in place,
and that they are referenced properly from qfast, and that you operate
qfast only from the directory where you have the files (the trash directory).

The example below is for the observer account.  You should copy the necessary
files to your account and create the same directories to use with your account.

You can also create your own wavelength solution, notes on doing that
and a henear atlas are in the blue FAST notebook by the stereo.


epar qfast in IRAF to look like the following:

PACKAGE = procdata
   TASK = qfast

nobs    =                   61  FAST image number to process
(rootdir=         /fast/flwo1/) Spectum image root directory
(obsdate=           1996/09/07) Date of observation directory (yy/mm/dd)
(fcal   =            0041.COMP) Calibration file name
(caldir = /home/observer/calcomp) Calibration image directory
(row1   =                   10) First row for spectrum search
(row2   =                   70) Last row for spectrum search
(keepnam=                  yes) Keep object name in file name (y or n)
(apdisp =                  yes) Display aperture and background (y or n
(imdisp =                   no) Display raw image (y or n)
(spdisp =                  yes) Display spectrum (y or n)
(quickre=                   no) Find redshift (y or n)?
(delquic=                  yes) Delete quick-look 1-D spectrum (y or n)?
(verbose=                   no) Log progress (y or n)?
(flpar  =                   no) flush pfile on assign?
(mode   =                   ql)



Run qfast only from the /home/observer/trash directory  (important).

Make sure the following files are in place:

/home/observer/trash/
..0041.COMP.ms.imh
0041.COMP.ms.imh
0041.COMP.ms.pix

/home/observer/trash/database/
id0041.COMP.ms

/home/observer/calcomp/
0041.COMP.imh
0041.COMP.pix
id0041.COMP.ms


Extra copies of all of these files are stored in the /home/observer/quicklook/
directory.

Qfast creates extra ap* files in the /home/observer/trash/database/ dir
as the night goes on, ignore and/or delete these.


Problems:

If "q" is ambiguous, type "procd"

If qfast says id* file not found in the trash directory, you are probably
not running qfast from the trash directory.

pr> q 130 row2=150
QFAST:  Calibration file id0041.COMP.ms not in /home/perry/calcomp
pr> pwd
/home/perry
pr> cd trash
pr> q 130 row2=150
[0130.SN1996boq.ms] refspec1='0041.COMP.ms'

pr> q 46
ERROR on line 202: ambiguous task `refspec'
    qfast (nobs=46)
try exiting iraf, cd to home, and re-start iraf with ncl, then cd to trash


**  To get instant redshifts, say quickred+, or epar qfast and turn on 
    quickred.  Then epar xcsao, and make it look for the template directories 
    in /home/perry/template .  Look there to see what the templates' names
    are, and then when it asks you which ones to use, you can tell it.


 F. It is possible to the change the integration time on the fly.  Just go
    into the CCD window and say "total [new # of seconds]".  The new number
    can be more or less than the original.  I don't know what happens if the
    new number of seconds is less than the time that has already elapsed since
    the beginning of the exposure.

 G. It is possible to update the telescope coordinates if it is consistently
    off.  You move it by hand to where it should have gone, then on the right
    PC keyboard, say "Alt =", then "y".

 I. How far to drive the telescope?
    To the West: HA of 3.5 hours; up to 4 if dec is around 30.
           East: HA of 3 hours