HSRED Installation Guide

This page was originally written by Richard Cool (original author of HSRED) and resurrected by Ben Weiner to document setting up the IDL environment for running HSRED.

This page documents the 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 is 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. You can usually get them from an SDSS website, such as:

idlutils: IDLUTILS from SDSS-4
idlspec2d: IDLSPEC2D from SDSS SVN

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

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 SDSS packages – SDSS pipeline description

HSRED SETUP:

Now you are ready to setup the HSRED package itself. You can download the most recent incarnation from github, easiest with git clone:

git clone https://github.com/MMTObservatory/hsred.git

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, contact MMT or SAO TDC staff, most likely Benjamin Weiner at MMT or Sean Moran at SAO.