HSRED Installation Guide

This page documents to installation procedures for the HSRED reduction package for IDL.  The installation assumes you already have a working distribution of IDL running on your account.  I have tested this software on IDL versions 5.6 and 6.0, as well as IDL student edition 5.6.  I have tried to make everything self consistent, but you have problems during installation, please let me know so that I can try and make the code work for everyone.  

The Basics:

The HSRED software if based heavily on the SDSS spectroscopic reduction pipeline and the code is dependent on the presence of these packages in your IDL_PATH.  If you already have a working version of IDLUTILS and IDLSPEC2D (version >= 5.0.0) running, then you can skip directly to the HSRED setup.  Otherwise, download the tarballs for these codes here:

    1. Unpack the tarballs (I will assume you are installing all of these packages to your home directory)
             % tar xvf idlutils*tar
             % tar xvf idlspec2d*tar
UPDATE April 2020: You should get these directly from the SDSS site: https://www.sdss.org/dr15/software/products/

    2.  Setup the environment variables:
                a.   You need to have idl in your path and the IDL_PATH should be setup.  For me, I use the following in my .cshrc files
                              source /usr/local/rsi/idl/bin/idl_setup
                                    setenv IDL_PATH .:+{IDL_DIR}/lib

                b.    Now include the IDLSPEC2D and IDLUTILS variables in the path
                                  setenv IDLUTILS_DIR $HOME/idlutils-v5_0_0
                                    setenv IDLSPEC2D_DIR $HOME/idlspec2d-v5_0_0
                                    setenv PATH $IDLUTILS_DIR/bin:$IDLSPEC2D_DIR/bin:$PATH
                                    setenv IDL_PATH +$IDLUTILS_DIR/goddard/pro/:$IDL_PATH
                                    setenv IDL_PATH +$IDLUTILS_DIR/pro/:$IDL_PATH
                                    setenv IDL_PATH +$IDLSPEC2D_DIR/pro/:$IDL_PATH
     3. After you source your .cshrc file, you now need to compile to code
             % cd $IDLUTILS_DIR
             % evilmake all
             % cd $IDLSPEC2D_DIR
             % evilmake all

    4. IDLSPEC2D and IDLUTILS should now be ready to run.  If you have problems getting these up and running, you might want to take a look at the official reduction page for the packages - here.

Now you are ready to setup the HSRED package itself.  You can download the most recent incarnation in github :
    1. Add HSRED environment variables to the .cshrc:
                 setenv HSRED_DIR $HOME/hsred  
                 setenv DUST_DIR $HSRED_DIR/dust
                 setenv IDL_PATH +$HSRED_DIR:$IDL_PATH

    2. HSRED should now be ready to run.  If you have problems with the HSRED reductions, please contact Richard Cool or fill out an issue ticket on Google code.