DATA SLURPING COOKBOOK

version 02 SEP 2003

This is used to retrieve data from the 0.9m at CTIO and to do basic bias subtraction and flat-fielding.

**********************************************************************
*****            YOU BEGIN BY SLURPING DATA FROM CTIO            *****
**********************************************************************

------
STEP A
------

01) Pull up an xterm window.

02) cd /nfs/recons3/SMARTS

03) mkdir ********

    Call the directory by a eight character string of numbers that
    corresponds to the observation date, e.g. 2006.0522

04) Keep this window available to check that files are being written to
    /recons/disk4.  Each .fits file should be 2301120 Mb in size.  To
    check the size of the files, type "ls -l" and you will get a list
    of file sizes for everything in the directory.

------
STEP B
------

05) Pull up a second xterm window.

06) Type "ssh -l v12 ctioa4.ctio.noao.edu", then hit enter.
    or,  "ssh -l v12 ctio36.ctio.noao.edu", if the data have been moved 
    to the ctio36 machine.

07) v12% will be displayed on the screen, you are now using unix.

08) Type in password, then hit enter.

09) Type "ls" to see where you are and verify that the data you are
    looking for are there.

10) Change directories into the one that you want by typing "cd
    ********-09" and the directory name.
 
11) Type "ls" to see what's in that directory, there should be files
    ending in ".imh" and ".fits".  If the .fits files have not yet been
    made, stop.  Send an email to the observer at the 0.9m to generate
    the .fits files.

12) To see how many entries you will slurp, do a word count by typing
    "ls *.fits |wc", then hit enter.

13) Type "sftp youracct@joy.chara.gsu.edu", then hit enter (use sftp
    not ftp!)

14) It will ask for a password --- use your account password that will
    bring you into your home directory.

15) Now type "cd /nfs/recons3/SMARTS/****.****" where the asterisks are
    the directory name that you made for this data, then hit enter.

16) Type "mput *.fits" and hit enter.  YOU CAN FTP APPROXIMATELY 1
    FILE/MINUTE.

>          [when using sftp, you don't need the next two steps]
>
> 17) It will ask "mput ... ?" where ... is the filename; just hit enter
>     if you want that file.
> 
> 18) Make sure to hit enter as many times as you have .fits entries. If
>     your wordcount found 100, enter 105 or more. You can not hit it too
>     many times, but if you don't hit it enough and are not paying
>     attention, the slurping will be incomplete and you will have to
>     enter the information manually, which you don't want to have to
>     do. If you happen to be sitting by the screen and have not hit
>     enter enough times, it will give you up to one minute to hit enter
>     again, and you should do so. You will know that the slurping is
>     done when you see ".ftp> .ftp> .ftp>." pop up on the screen. It
>     will pop up however many times too many you hit enter. This is no
>     problem, just let it finish.

19) Once the ftp is done, check two things:

    1. are all the files there?	           use "ls *.fits |wc"
    2. are they all the correct size?      use "ls -l"
       the size should be 2301120 Mb

    If the answer is "yes" to both, then email Alberto and Todd to let
    them know that the files are here at GSU.  Alberto can then delete
    them from the disk at CTIO, and Todd will have his stress level
    reduced (which is extremely important). 

20) Type "chrecons *" to change the permissions on the slurped files.

21) Time to show off your hard work --- update by editing the file 
    that gives the status of data:

    "emacs /nfs/morgan3/thenry/public_html/CTIOPI/ctiopi.reductionlog"

**********************************************************************
*****               YOU MAY NOW REBUILD THE CATALOG              *****
**********************************************************************

------
STEP C
------

***** MANY DETAILS GO IN HERE *****

22) Time to show off your hard work --- update by editing the file 
    that gives the status of data:

    "emacs /nfs/morgan3/thenry/public_html/CTIOPI/ctiopi.reductionlog"

XX) The location of the master catalog (sorted by time) is 

    /nfs/alphacen/subasavage/ctiocat/data/ccdlog0.9

XX) The location of the final catalog (sorted by object) is

    /nfs/alphacen/subasavage/ctiocat/data/ccd0.9/final

**********************************************************************
*****            YOU MAY NOW MOVE ONTO DATA REDUCTION            *****
**********************************************************************

------
STEP D
------

23) Pull up an xterm. Type in "recons". cd into iraf.  Type in "fari"
    or whatever your alias is to get to xgterm.  If you have no alias,
    type "xgterm", then go to iraf directory, and type "cl" then hit
    enter.

24) cd into the directory that you created for the slurping process
    (i.e. /nfs/recons4/SMARTS/20030327) if you want to cd from this
    point into another day's data, you must put quotes around the
    numbers. For example, if you are in nfs/recons4/SMARTS and want to
    go to 20030327, you must type cd "20030327". This is a peculiarity
    of the SMARTS transition.

25) Type "fixname" and hit enter.  It will ask you for the root name.
    The root name is the string of eight characters that is the date
    you are working on.  This will generate a list.  Wait until it's
    done to go to next step.

26) Type "gof" and hit enter.

27) Type 'hselect *.fits "biassec, trimsec, gtron21, gtgain21" yes' and
    then hit enter; make sure to include the quote marks before
    'biassec' and after 'gtgain21'. 

28) This will generate a long list, when it's done, type "proc". You
    will then be asked to enter the bias section, trim section, ccd
    readout noise, and ccd gain in turn.  The numbers provided should
    match the numbers in the first, second, third, and fourth columns,
    respectively. (The numbers in each column are identical all the way
    down). You must make sure that the number given for you to enter
    matches the one in the column. If it does, hit enter, otherwise,
    enter the number manually in the form specified and then hit enter.
    The window will then say "trim and median bias images" and it will
    be "sitting and thinking" for a while.  It will then say "trim and
    median V band flat images", and will again take it's time to move
    on.  "trim and median R band flat images" and "trim and median I
    band flat images" will also appear in turn. Then it will say "now
    reducing V band star images", "now reducing R band star images",
    "now reducing I band star images". Once the whole process is
    finished, you will see a "cl>" appear; this lets you know that
    you're done with this set of data.

29) Time to show off your hard work --- update by editing the file 
    that gives the status of data:
 
    "emacs /nfs/morgan3/thenry/public_html/CTIOPI/ctiopi.reductionlog"

**********************************************************************
*****  YOU ARE NOW DONE WITH BASIC REDUCTIONS --- PARTY TIME!!!  *****
**********************************************************************