The SBU 1.5m Spectroscopic Database

This is a guidebook for Stony Brook users of RC Spectrograph data. It requires access to the raid array on nut, and some knowledge of IDL. The IDL procedures are located in /home/fwalter/LIBS. This directory must be in the IDL_PATH variable in your .cshrc file.

Contents

I. Introduction

The RC spectrograph is a grating spectrograph mounted on the 1.5m telescope at CTIO. The instrument manual can be found at this this CTIO web site. The spectrograph currently shares time with the CPAPIR near-IR camera, and is mounted about half the time.

The spectra are taken by service observers. We download the raw data each morning, and process it ourselves. The data are also archived at Yale.

II. Data Processing

Data processing and storage are currently done using nut.

The IDL procedure s15_start is used to process the data.

In general, each observation consists of three (or more) spectra obtained consecutively. The three spectra can be median-filtered to remove cosmic rays. This summed image is stored as a Txx.fits image.

The data are extracted in four ways.

  • The spectrum is boxcar-extracted from the summed image. A fit to the cross-section determines the width of the extraction slit. Background is extracted above and below the spectrum.
  • The spectrum is boxcar-extracted from each of the individual image. A fit to the cross-section determines the width of the extraction slit. Background is extracted above and below the spectrum. The individual spectra are then summed.
  • A Gaussian is fit to the spatial profile at each wavelength point in the summed image. The integrated Gaussian flux is the extracted counts. This has the advantage of avoiding single bad pixels, but underestimates the flux of bright sources because the spatial wings are non-Gaussian.
  • A Gaussian is fit to the spatial profile at each wavelength point in each of the individual spectra. The fluxes are summed to produce the final spectrum.

    III. Data Storage

    The raw images are copied to CD after processing (so errors in the headers can be corrected). Copies of the CDs are available in the lab. The raw data are retained on the raid array on a space-available basis.

    The reduced images and extracted spectra are retained on the raid array. They are also backed up to CD. Note that while all the raw data are archived, only the Stony Brook data are processed/extracted.

    The SMARTS spectroscopic service schedule is at this page. It contains observing logs and plans, and links to finding charts.

    The catalog of images is maintained in a pair of IDL databases, one for the raw data and one for the reduced/extracted data. each channel. For manageability, a new database is created for each observing year. SMARTS began operations in 2003. Note that the observing year generally, but not always, runs from February through January. After processing the images, we update the databases.

    In order to access the databases, you must be logged into nut. you must have the following line in your .cshrc file:

    setenv ZDBASE /data/fwalter/DB/

    In order to access the IDL software, you must have a line in your .cshrc file that looks like the following:
    setenv IDL_PATH +/usr/local/rsi/idl_5.3/local_pro:+/home/fwalter/ASTROLIB:+/home/fwalter/LIBS:+/usr/local/rsi/idl_5.3/lib:

    The databases are named s15_yyyy and s15p_yyyy, for the raw and processed data, respectively. yyyy is the year (e.g., 2006)

    While you can in principle query the databases using any IDL databasing routines, most routine queries are handled through the software described below.

    The 2003 and 2006 databases are complete. The 2004 and 2005 databases are currently incomplete, and will be completed as time allows.

    IV. Observing Programs

    The long term monitoring programs we are engaged in include:

    V. Querying the Databases

    One queries the databases with the IDL procedure find_targets.

    1. To find all observations of a specific target, use find_targets,name='xxx', where xxx is the name of the target.
    2. To find all observations in a specific program, use find_targets,prop='xxx', where xxx is the name of the program (e.g., SUNY 06a-11).
    3. To find all observations in a specific observing mode, use find_targets,mode='xxx', where xxx is the name of the mode (see below).

    By default, the full database is queried. To limit the query to a single year, use the year keyword.

    To search the raw data archive, use the /raw keyword.

    For details of the individual spectra that make up a particular observation, use the procedure s15id. Typing

    s15id,dir='060408',14,/d0,/raw
    shows that there are 9 spectra of HD 93308 (eta Carina), with exposure times of 5, 2, and 1 second. There are also two Neon comparison spectra. Note that because the s15id procedure operated on the files and does not query the database, the raw or trimmed and flattened files must be on disk: it does not work on summed images or extracted data files.

    Va. Observing Modes

    There are a number of standard observing modes. The ones most used for SBU programs are:

    See this page for a summary of all observing modes.

    VI. Extracting Spectra

    The data are stored in individual FITS format files on the nut raid array. You can extract the spectra wwith the ps15 procedure.

    Suppose you want to extract a spectrum of the magnetic cataclysmic variable V834 Cen. First you would use find_targets to locate the files.

    find_targets,name='v834 cen',year=2006
    The output will look line this:
                    Catalog of SMARTS SUNY Reduced Spectroscopic Observations  2006
     ------------------------------------------------------------------------------
            Object                2-d x         gr grat  spect.  Exposur  Proposal 
                                  file             tilt   mode    time       ID 
                                  name                           (sec) 
     ------------------------------------------------------------------------------
     V834 Cen             060112/XC_21.fits    47 22.64 47/Ia    400.00 SUNY 06a-01
     V834 Cen             060115/XC_29.fits    26 15.93 26/Ia    400.00 SUNY 06a-01
     V834 Cen             060117/XC_25.fits    47 22.64 47/Ia    300.00 SUNY 06a-01
     V834 Cen             060118/XC_26.fits    26 15.93 26/Ia    400.00 SUNY 06a-01
     V834 Cen             060120/XC_23.fits    47 22.64 47/Ia    300.00 SUNY 06a-01
     V834 Cen             060125/XC_23.fits    26 15.93 26/Ia    400.00 SUNY 06a-01
     V834 Cen             060202/XC_26.fits    47 22.64 47/Ia    300.00 SUNY 06a-01
     V834 Cen             060203/XC_23.fits    26 15.93 26/Ia    300.00 SUNY 06a-01
     V834 Cen             060205/XC_23.fits    26 15.93 26/Ia    300.00 SUNY 06a-01
     V834 Cen             060308/XC_18.fits    47 22.64 47/Ia    400.00 SUNY 06a-01
     V834 Cen             060309/XC_19.fits    47 22.64 47/Ia    400.00 SUNY 06a-01
     V834 Cen             060315/XC_20.fits    26 15.93 26/Ia    300.00 SUNY 06a-01
     V834 Cen             060318/XC_20.fits    47 27.39 47/II    300.00 SUNY 06a-01
     V834 Cen             060319/XC_23.fits    26 15.93 26/Ia    300.00 SUNY 06a-01
     V834 Cen             060324/XC_20.fits    26 15.93 26/Ia    300.00 SUNY 06a-01
     V834 Cen             060329/XC_22.fits    26 15.93 26/Ia    300.00 SUNY 06a-01
     V834 Cen             060330/XC_24.fits    26 15.93 26/Ia    300.00 SUNY 06a-01
     V834 Cen             060331/XC_19.fits    47 22.64 47/Ia    400.00 SUNY 06a-01
     V834 Cen             060406/XC_29.fits    26 15.93 26/Ia    300.00 SUNY 06a-01
     V834 Cen             060408/XC_16.fits    47 22.64 47/Ia    300.00 SUNY 06a-01
     V834 Cen             060409/XC_18.fits    26 15.93 26/Ia    300.00 SUNY 06a-01
     V834 Cen             060508/XC_20.fits    26 15.93 26/Ia    300.00 SUNY 06a-01
     V834 Cen             060512/XC_15.fits    47 22.64 47/Ia    300.00 SUNY 06a-01
     V834 Cen             060514/XC_25.fits    26 15.93 26/Ia    300.00 SUNY 06a-01
     V834 Cen             060517/XC_15.fits    47 22.64 47/Ia    300.00 SUNY 06a-01
     V834 Cen             060521/XC_28.fits    47 22.64 47/Ia    300.00 SUNY 06a-01
    

    The file name column gives the subdirectory (the date in yymmdd format) and the name of the extracted data file.The important thing is the 2 digit file number between the underscore and the .fits. This is the file number.

    To view a spectrum, say the one taken on Jan 15, you would type

    ps15,/d0,dir='060115',29
  • The /d0 keyword indicates that the directory is located in the standard file storage directory tree.
  • The dir=yymmdd keyword gives the data directory, which is the observation date.
  • The argument 29 is the file number on this date.

    The plot should look like:

    Called in this way, all ps15 does is display the file. You can extract the wavelength vector and spectrum into IDL variables w,s with the command

    ps15,/d0,dir='060115',29,w,s,e
    Note that no plot is made. w, s, and e are the wavelength, flux, and error (uncertainty) vectors, respectively . You can plot the spectrum by typing
    plot,w,s
    There are actually 4 extracted data vectors. Data are extracted both with a boxcar extraction (the default) and a Gaussian fit to the profile at each wavelength (/gauss keyword). Spectra are extracted with from the summed image (default) or the sum of the individually-extracted spectra (/sum keyword).

    VII. Manipulating and Measuring Spectra

    A program you can use to examine and manipulate spectra, and do simple measurements, is ICUR. Documentation is in this postscript file. To invoke icur to measure the spectra of V834 Cen you extracted, type

    icur,0,w,s,e
    ICUR responds to single keystrokes. The most important use capital letters: most commands are case-senitive. Type the letter Q to exit icur. Within icur, type a question mark (?) for terse on-line help. Read the documentation.

    In many cases you will wish to write your own spectral analysis code.

    VIIa. Creating ICD-format Spectral Files

    If you will be analyzing a large number of spectra of the same (or similar) object, there are advantages to putting the spectra into a single icd-format file. The file format is described in the icur documentation. Essentially this is an associated variable with each spectrum compressed into a single variable.

    Among the advantages of this format are:

  • You can copy the .icd file to another machine; you are not tied to the spectroscopic database on nut.
  • You can easily work within icur, and switch among spectra.
  • You can easily extract spectra with the gdat procedure.

    The primary disadvantage is that an icd file stores only a single kind of extracted data record per file.

    To make an icd format file, use the procedure make_icd. In general, you will execute make_icd,name='xxx', where 'xxx' is the name of the target (as in the call to find_targets). The output will be xxx.icd (with any spaces in the name removed). By default, the boxcar-extracted spectrum from the coadded image is used (this is the same default spectrum shown by ps15). Other options are set with keywords. Among these are:

    VIIb. What to Measure

    Spectra can be complex. You will be told what to measure. In general, you will use ICUR to :
  • Measure line centroids: the C command
  • Measure equivalent widths: the E command
  • Fit lines and continuua: the F command