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:
- 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)
- idlutils v5_2_0 - General utilities
(Blanton, Burles, Finkbeiner, Hogg & Schlegel),
including the Goddard utilities (Landsman)
- idlspec2d v5_2_0 - SDSS spectroscopy reduction + analysis tools
(Burles & Schlegel)
- photoop v1_7_14 - SDSS imaging reduction + analysis tools
(Blanton, Finkbeiner, Hogg, Padmanabhan & Schlegel)
- elodie v1_0 - Spectroscopic stellar templates for reducing raw SDSS data
(Schlegel)
- specflat v1_6 - Spectroscopic flat-fields for reducing raw SDSS data
(Burles & Schlegel)
- speclog v1_5 - Spectroscopic log files for reducing raw SDSS data
(Burles & Schlegel)
- ptcoeff v1_0 - Atmospheric extinction logs for reducing raw SDSS data
(Hogg & Schlegel)
- 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".
-
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
-
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).
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")
-
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
...
-
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".
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.
-
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
-
IDL must be installed on your system, and
the environment variables IDL_DIR and IDL_PATH must already be set.
-
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).
-
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
-
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).
-
Build the code:
cd $IDLUTILS_DIR ; evilmake all
cd $IDLSPEC2D_DIR ; evilmake all
cd $PHOTOOP_DIR ; evilmake all
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.
-
IDL must be installed on your system, and
the environment variables IDL_DIR and IDL_PATH must already be set.
-
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.
-
Unpack the tar files for "idlutils", "idlspec2d" and "photoop":
tar xvf idlutils*.tar
tar xvf idlspec2d*.tar
tar xvf photoop*.tar
-
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