#! /bin/tcsh -f
 
echo "**************************" >>& $log_dir/analysis.log
echo "*                        *" >>& $log_dir/analysis.log
echo "*  THE FULLDET ANALYSIS  *" >>& $log_dir/analysis.log
echo "*                        *" >>& $log_dir/analysis.log
echo "**************************" >>& $log_dir/analysis.log

echo "BEGIN CLEAN_MAKE_DETECTION_DIR.CSH"
echo start: `date`
source $progr_dir/clean_make_detection_dir_3XMM.csh >>& $log_dir/analysis.log
echo end: `date`
echo "END CLEAN_MAKE_DETECTION_DIR.CSH"

echo "BEGIN MAKE_IMAGE.CSH"
echo start: `date`
source $progr_dir/make_image.csh >>& $log_dir/analysis.log 
echo end: `date`
echo "END MAKE_IMAGE.CSH"

echo "BEGIN MAKE_EXPO.CSH"
echo start: `date`
source $progr_dir/make_expo.csh >>& $log_dir/analysis.log
echo end: `date`
echo "END MAKE_EXPO.CSH"

echo "BEGIN EXP_DETECT_PREP_WEIGHT_IMAGE_3XMM.CSH"
echo start: `date`
source $progr_dir/ExpDetectPrep_weight_image_3XMM.csh >>& $log_dir/analysis.log
echo end: `date`
echo "END EXP_DETECT_PREP_WEIGHT_IMAGE_3XMM.CSH"

echo "BEGIN EXP_DETECT_PREP_MERGE_EVT_LIST_3XMM.CSH"
echo start: `date`
source $progr_dir/ExpDetectPrep_merge_evt_list_3XMM.csh >>& $log_dir/analysis.log
echo end: `date`
echo "END EXP_DETECT_PREP_MERGE_EVT_LIST_3XMM.CSH"

echo "BEGIN EXP_DETECT_DETMASK_3XMM.CSH"
echo start: `date`
source $progr_dir/ExpDetect_detmask_3XMM.csh >>& $log_dir/analysis.log
echo end: `date`
echo "END EXP_DETECT_DETMASK_3XMM.CSH"

echo "BEGIN CF.CSH"
echo start: `date`
#source $progr_dir/CF.csh >>& $log_dir/analysis.log
source $progr_dir/CF_test.csh >>& $log_dir/analysis.log
echo end: `date`
echo "END CF.CSH"

echo "BEGIN EBOXDETECT_LM.CSH"
echo start: `date`
source $progr_dir/eboxdetect_LM.csh >>& $log_dir/analysis.log
echo end: `date`
echo "END EBOXDETECT_LM.CSH"

echo "BEGIN ESPLINEMAP_LM.CSH"
echo start: `date`
source $progr_dir/esplinemap_LM.csh >>& $log_dir/analysis.log
echo end: `date`
echo "END ESPLINEMAP_LM.CSH"

echo "BEGIN EBOXDETECT_MM.CSH"
echo start: `date`
source $progr_dir/eboxdetect_MM.csh >>& $log_dir/analysis.log
echo end: `date`
echo "END EBOXDETECT_MM.CSH" 

echo "BEGIN EMLETECT.CSH"
echo start: `date`
source $progr_dir/emldetect.csh >>& $log_dir/analysis.log
echo end: `date`
echo "END EMLDETECT.CSH"

echo "BEGIN SENSITIVITY.CSH"
echo start: `date`
source $progr_dir/sensitivity.csh >>& $log_dir/analysis.log
echo end: `date`
echo "END SENSITIVITY.CSH" 

echo "BEGIN PILEUP_SUM.CSH"
echo start: `date`
source $progr_dir/pileup_sum.csh >>& $log_dir/analysis.log
echo end: `date`
echo "END PILEUP_SUM.CSH" 

echo "BEGIN EMOSAIC.CSH"
echo start: `date`
source $progr_dir/emosaic.csh >>& $log_dir/analysis.log
echo end: `date`
echo "END EMOSAIC.CSH" 
