# Auto-generated batch file Sat Aug 27 15:16:49 2011
#PBS -l nodes=1
#PBS -l walltime=48:00:00
#PBS -W umask=0022
#PBS -V
#PBS -j oe
cd $PBS_O_WORKDIR

#- Echo commands to make debugging easier
set -o verbose

#- The real work
setup idlspec2d v5_4_45
echo 'sdss_plate_sort,"spPlan2d-4875-55676.par"' | idl
echo 'sdss_plate_sort,"spPlan2d-4875-55677.par"' | idl
echo 'spreduce2d,"spPlan2d-4875-55676.par"' | idl
echo 'spreduce2d,"spPlan2d-4875-55677.par"' | idl
echo 'spcombine_v5,"spPlancomb-4875-55677.par"' | idl
setup idlspec2d v5_4_45
echo 'spreduce1d,"spPlate-4875-55677.fits",run1d="v5_4_45"' | idl

setup runz
runz_BOSS.sh spPlate-4875-55677.fits -a
runz_BOSS.sh spPlate-4875-55677.fits -a -G -t GAL

#- Make pretty pictures
idl -e "plate_spec_image, 4875, mjd=55677, run1d='v5_4_45', run2d='v5_4_45', /silent"
