IDL Code Base Maintained by David Schlegel

This document explains how to download and build the IDL + C code mainained in the Princeton anonymous CVS repository. Listed is a summary of these product names, current versions, use, and authors:

  1. evilups v0_7_27 - This set of perl scripts makes it easy to install the code that follows, and to maintain several versions of that code (Padmanabhan)
  2. idlutils v5_2_0 - General utilities (Blanton, Burles, Finkbeiner, Hogg & Schlegel), including the Goddard utilities (Landsman)
  3. idlspec2d v5_2_0 - SDSS spectroscopy reduction + analysis tools (Burles & Schlegel)
  4. photoop v1_7_14 - SDSS imaging reduction + analysis tools (Blanton, Finkbeiner, Hogg, Padmanabhan & Schlegel)
  5. elodie v1_0 - Spectroscopic stellar templates for reducing raw SDSS data (Schlegel)
  6. specflat v1_6 - Spectroscopic flat-fields for reducing raw SDSS data (Burles & Schlegel)
  7. speclog v1_5 - Spectroscopic log files for reducing raw SDSS data (Burles & Schlegel)
  8. ptcoeff v1_0 - Atmospheric extinction logs for reducing raw SDSS data (Hogg & Schlegel)
  9. kcorrect v4_1_4 - K-correction and photo-z code for SDSS imaging (Blanton)

Described in this document are three ways to download and install the code:

I have assumed that you will be installing "idlutils", "idlspec2d" and "photoop".

Installing w/EvilUPS

  1. You must have "idl" in your path, and the IDL_PATH environment variable should already be set. At Princeton, you would type the following for C-shell:
      source /usr/peyton/common/licensed/idl/bin/idl_setup
      setenv IDL_PATH .:+{$IDL_DIR}/lib
    
    or the following for Bourne shell:
      export IDL_DIR=/usr/peyton/common/licensed/idl 
      export IDL_PATH=.:+{$IDL_DIR}/lib
      alias idl=$IDL_DIR/bin/idl
    
  2. The code is in a world-readable Princeton CVS repository. You will need the environment variables CVS_RSH and CVSROOT set. If you are using C-shell:
      setenv CVS_RSH ssh
      setenv CVSROOT :pserver:anonymous@sdsscvs.astro.princeton.edu:/usr/local/cvsroot
    
    If you are using Borne-shell:
      CVS_RSH=ssh
      CVSROOT=:pserver:anonymous@sdsscvs.astro.princeton.edu:/usr/local/cvsroot
    
    The above definitions could be put in your ~/.cshrc file (for C-shell users) or ~/.bashrc file (for Borne-shell users).
  3. To access this repository, you will need to generate a ~/.cvspass file as follows:
      cvs login
        (hit a carriage return when it asks for the "CVS password")
    
  4. Install the "evilups" product, which is a set of scripts written by Nikhil Padmanabhan for managing different versions of software. The example below puts the code in the directory $HOME/products:
      cvs export -d evilups-temp -r v0_7_14 evilups
      setenv PROD_DIR_PREFIX $HOME/products
      setenv PRODUCTS $PROD_DIR_PREFIX/ups_db
      setenv EUPS_DIR $PROD_DIR_PREFIX/evilups
      cd evilups-temp
      make clean
      make install
      setenv EUPS_FLAVOR `\uname`
      source $EUPS_DIR/bin/setups.csh
    
    If you are using the Bourne shell, then the environment variables would be set as follows (for ex):
      export PROD_DIR_PREFIX=$HOME/products
      ...
    
  5. Now install the code, installing first "idlutils", and then "idlspec2d" and "photoop". Installing in this order gets the dependencies right, since the UPS database needs to know that "idlspec2d" and "photoop" depend upon a particular version of idlutils. An install would then look something like:
      evilinstall idlutils v5_0_4
      setup idlutils
      evilinstall idlspec2d v5_0_0
      evilinstall photoop v1_7_5
    

That's it! Note that "evilinstall" will work for any of the other products listed in this document. For SDSS insiders, this will also work for products in the FNAL repository by setting CVSROOT to "cvsuser@sdss.fnal.gov:/cvs/sdss".

Install w/out EvilUPS

These steps are to check out tagged verions of the "idlutils", "idlspec2d" and "photoop" products using CVS. The examples below check out and build the code into your home directory.
  1. For the example that follows, I have assumed you are using the Bourne-shell. If you normally use C-shell, you can get the Bourne-shell prompt with:
      % bash
    
  2. IDL must be installed on your system, and the environment variables IDL_DIR and IDL_PATH must already be set.
  3. The code is in a world-readable Princeton CVS repository. To access this repository, you will first need to generate a ~/.cvspass file as follows:
      cvs -d :pserver:anonymous@sdsscvs.astro.princeton.edu:/usr/local/cvsroot login
    
    When the above asks for a password, just hit Enter. You will also need the environment variables CVS_RSH and CVSROOT set. If you are using Borne-shell:
      CVS_RSH=ssh
      CVSROOT=:pserver:anonymous@sdsscvs.astro.princeton.edu:/usr/local/cvsroot
    
    The above definitions could be put in your ~/.cshrc file (for C-shell users) or ~/.bashrc file (for Borne-shell users).
  4. Check out tagged versions of "idlutils", "idlspec2d", and "photoop". Put them into your home directory (for this example).
      cd
      cvs co -r v5_0_4 idlutils
      cvs co -r v5_0_0 idlspec2d
      cvs co -r v1_7_5 photoop
    
  5. Set the environment variables. From the Bourne-shell:
      export IDLUTILS_DIR=$HOME/idlutils
      export IDLSPEC2D_DIR=$HOME/idlspec2d
      export PHOTOOP_DIR=$HOME/photoop
      export PATH=$PHOTOOP_DIR/bin:$IDLSPEC2D_DIR/bin:$IDLUTILS_DIR/bin:$PATH
      export IDL_PATH=+$IDLUTILS_DIR/goddard/pro:$IDL_PATH
      export IDL_PATH=+$IDLUTILS_DIR/pro:$IDL_PATH
      export IDL_PATH=+$IDLSPEC2D_DIR/pro:$IDL_PATH
      export IDL_PATH=+$PHOTOOP_DIR/pro:$IDL_PATH
    
    You may wish to add the above lines to your ~/.bashrc file (or the equivalent setenv commands to your ~/.cshrc file).
  6. Build the code:
      cd $IDLUTILS_DIR ; evilmake all
      cd $IDLSPEC2D_DIR ; evilmake all
      cd $PHOTOOP_DIR ; evilmake all
    

Installing from a tar file

These steps are to check out tagged verions of the "idlutils", "idlspec2d" and "photoop" products using CVS. The examples below check out and build the code into your home directory.
  1. IDL must be installed on your system, and the environment variables IDL_DIR and IDL_PATH must already be set.
  2. Grab the tar files from the web site: http://spectro.princeton.edu/tarballs To download the tar files, press shift-(left-mouse) on the link to each file.
  3. Unpack the tar files for "idlutils", "idlspec2d" and "photoop":
      tar xvf idlutils*.tar
      tar xvf idlspec2d*.tar
      tar xvf photoop*.tar
    
  4. Continue from step 5 of the instructions for "Installing w/out EvilUPS".

Maintained by David Schlegel at Princeton University, Dept. of Astrophysics, Peyton Hall, Princeton NJ 08544