#! /bin/tcsh 
# Name:
#    copy_originals.tcsh
# Purpose:
#    Copy the original BCD data to a single directory for further processing
# Notes:
#    Script assumes that you are in the directory you wish to work in and
#    that all 4 channels of data exists in subdirectories made by unpacking 
#    data from Leopard zipfiles

# Set path to location of BCDs, default is that the BCD directories are
# located in subdirectories of where the script is run

set mdir=./

# Copy channel 1 data
echo "Copying channel 1 data"
set idir=${mdir}ch1/bcd/
cp ${idir}SPITZER_I1_*bcd.fits .
cp ${idir}SPITZER_I1_*bdmsk.fits .
cp ${idir}SPITZER_I1_*bunc.fits .

# Copy channel 2 data
echo "Copying channel 2 data"
set idir=${mdir}ch2/bcd/
cp ${idir}SPITZER_I2_*bcd.fits .
cp ${idir}SPITZER_I2_*bdmsk.fits .
cp ${idir}SPITZER_I2_*bunc.fits .

# Copy channel 3 data
echo "Copying channel 3 data"
set idir=${mdir}ch3/bcd/
cp ${idir}SPITZER_I3_*bcd.fits .
cp ${idir}SPITZER_I3_*bdmsk.fits .
cp ${idir}SPITZER_I3_*bunc.fits .

# Copy channel 4 data
echo "Copying channel 4 data"
set idir=${mdir}ch4/bcd/
cp ${idir}SPITZER_I4_*bcd.fits .
cp ${idir}SPITZER_I4_*bdmsk.fits .
cp ${idir}SPITZER_I4_*bunc.fits .
