SDSS Spectro (idlspec2d) Installation

This document explains how to install the idlutils,idlspec2d,specflat products needed for reducing SDSS spectroscopic data. The current (Nov 2003) versions of the code are:

  idlutils v5_3_0
  specflat v1_5
  idlspec2d v5_2_0

In this document:

CVS install w/UPS and 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:
      IDL_DIR=/usr/peyton/common/licensed/idl 
      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 `/bin/uname`
      source $EUPS_DIR/bin/setups.csh
    
  5. The idlutils code is in a world-readable SVN repository at Berkeley Lab.
      % svn co https://projects.lbl.gov/svn/idlutils/tags/v5_3_0 $HOME/products/idlutils/$EUPS_FLAVOR/v5_3_0
      % cd $HOME/products/$EUPS_FLAVOR/idlutils/v5_3_0
      % bin/evilmake
      % eups_declare -f $EUPS_FLAVOR -r $EUPS_PATH/$EUPS_FLAVOR/idlutils/v5_3_0 -c idlutils v5_3_0
    
  6. Now install the remaining code, installing first "specflat" and then "idlspec2d". Installing in this order gets the dependencies right, since the UPS database needs to know that idlspec2d depends upon particular versions of those other products. An install would then look something like:
      % evilinstall specflat v1_5 ; setup specflat
      % evilinstall idlspec2d v4_10_6 ; setup idlspec2d
    

That's it! Note that "evilinstall" should work for any survey code, not just the Spectro products.

CVS install w/out EvilUPS

These steps are to check out tagged verions of the "specflat", "idlutils" and "idlspec2d" 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 idlutils code is in a world-readable SVN repository at Berkeley Lab.
      svn co https://projects.lbl.gov/svn/idlutils/tags/v5_3_0 idlutils
    
  4. The other 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).
  5. Check out tagged versions of "idlutils", "specflat" and "idlspec2d". Put them into your home directory (for this example).
      % cvs co -r v1_5 specflat
      % cvs co -r v5_2_0 idlspec2d
    
  6. Set the environment variables. From the Bourne-shell:
      % IDLUTILS_DIR=$HOME/idlutils
      % SPECFLAT_DIR=$HOME/specflat
      % IDLSPEC2D_DIR=$HOME/idlspec2d
      % PATH=$IDLUTILS_DIR/bin:$SPECFLAT_DIR/bin:$IDLSPEC2D_DIR/bin:$PATH
      % IDL_PATH=+$IDLUTILS_DIR/goddard/pro:$IDL_PATH
      % IDL_PATH=+$IDLUTILS_DIR/pro:$IDL_PATH
      % IDL_PATH=+$IDLSPEC2D_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).
  7. Build the code:
      % cd $IDLUTILS_DIR
      % evilmake all
      % cd $SPECFLAT_DIR
      % evilmake all
      % cd $IDLSPEC2D_DIR
      % evilmake all
    

Installing from a tar file

These steps are to check out tagged verions of the "specflat", "idlutils" and "idlspec2d" 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", "specflat" and "idlspec2d":
      % tar xvf idlutils*.tar
      % tar xvf specflat*.tar
      % tar xvf idlspec2d*.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