sw0 (version 1.0)
#! /aps/tools/perl/bin/perl -w
##############################################################################
#
# DESCRIPTION: This is the processing script for Swift.
#
# HISTORY:
# HISTORY: $Log: sw0,v $
# HISTORY: Revision 1.72 2007/02/01 17:08:12 apsop
# HISTORY: New version of common code: Merge HEADAS and FTOOLS, clean up env variables, perl only pfile I/O.
# HISTORY:
# HISTORY: Revision 1.71 2006/09/10 20:21:50 apsop
# HISTORY: Version 7.2 of the common code.
# HISTORY:
# HISTORY: Revision 1.70 2006/08/01 21:24:34 apsop
# HISTORY: New version of common code.
# HISTORY:
# HISTORY: Revision 1.69 2006/06/28 19:31:41 apsop
# HISTORY: New version of common code.
# HISTORY:
# HISTORY: Revision 1.68 2006/05/26 19:41:19 apsop
# HISTORY: New version of common code.
# HISTORY:
# HISTORY: Revision 1.67 2006/04/28 18:48:04 apsop
# HISTORY: New version of common code.
# HISTORY:
# HISTORY: Revision 1.66 2006/04/28 13:11:29 apsop
# HISTORY: New version of common code.
# HISTORY:
# HISTORY: Revision 1.65 2006/03/06 17:30:28 apsop
# HISTORY: New UvotTdrss module.
# HISTORY:
# HISTORY: Revision 1.64 2006/02/10 15:14:45 apsop
# HISTORY: Replace CheckInput with SWCheckInput.
# HISTORY:
# HISTORY: Revision 1.63 2006/02/03 16:42:46 apsop
# HISTORY: New version of common code - now all times GMT.
# HISTORY:
# HISTORY: Revision 1.62 2006/01/20 19:47:11 apsop
# HISTORY: New version of common code.
# HISTORY:
# HISTORY: Revision 1.61 2006/01/11 19:51:04 apsop
# HISTORY: New version of common code.
# HISTORY:
# HISTORY: Revision 1.60 2005/11/23 22:39:55 apsop
# HISTORY: New version of common code.
# HISTORY:
# HISTORY: Revision 1.59 2005/11/15 20:15:51 apsop
# HISTORY: New version of common code.
# HISTORY:
# HISTORY: Revision 1.56 2005/11/08 16:30:51 apsop
# HISTORY: Go back to using CheckInput instead of SWCheckInput. Remove obsolete BATLightCurves. Add XrtTdrss.
# HISTORY:
# HISTORY: Revision 1.55 2005/08/31 18:09:53 apsop
# HISTORY: Use com5.2. Enable XRTDB and BATDB modules.
# HISTORY:
# HISTORY: Revision 1.54 2005/06/01 13:47:45 apsop
# HISTORY: New version of common (5.1). Use and call SWCheckInput instead of CheckInput.
# HISTORY:
# HISTORY: Revision 1.53 2005/04/11 02:17:19 apsop
# HISTORY: New version of common code.
# HISTORY:
# HISTORY: Revision 1.52 2005/04/01 18:20:22 apsop
# HISTORY: New version of common software.
# HISTORY:
# HISTORY: Revision 1.51 2005/03/07 22:39:17 apsop
# HISTORY: Use common code version 4.3
# HISTORY:
# HISTORY: Revision 1.50 2005/02/25 20:41:22 apsop
# HISTORY: New version of common code.
# HISTORY:
# HISTORY:
# HISTORY: Revision 1.48 2005/01/06 16:39:24 apsop
# HISTORY: Comment out UVOTDB module as quick bug fix.
# HISTORY:
# HISTORY: Revision 1.47 2004/12/14 18:19:21 apsop
# HISTORY: New version of common code.
# HISTORY:
# HISTORY: Revision 1.44 2004/11/30 21:22:28 apsop
# HISTORY: Explicitly call SW0Filename, in order to support test pipeline.
# HISTORY:
# HISTORY: Revision 1.43 2004/11/30 03:12:55 apsop
# HISTORY: Use version 4.0 of common code.
# HISTORY:
# HISTORY: Revision 1.42 2004/11/19 22:19:15 apsop
# HISTORY: Fix accidental commit.
# HISTORY:
# HISTORY: Revision 1.38 2004/11/11 22:31:21 apsop
# HISTORY: Put in modules for full BAT event processing.
# HISTORY:
# HISTORY: Revision 1.37 2004/11/10 18:34:56 apsop
# HISTORY: Add in call to BATQmap
# HISTORY:
# HISTORY: Revision 1.36 2004/11/03 02:51:11 apsop
# HISTORY: Fix up mistake in previous version
# HISTORY:
# HISTORY: Revision 1.34 2004/10/13 02:24:46 apsop
# HISTORY: Use com3.9, and include XRTProducts module (commented out for now).
# HISTORY:
# HISTORY: Revision 1.33 2004/09/14 19:06:56 apsop
# HISTORY: Add new SortTdrss module.
# HISTORY:
# HISTORY: Revision 1.32 2004/09/01 14:47:12 apsop
# HISTORY: Switch use lib order of common and sw code.
# HISTORY:
# HISTORY: Revision 1.31 2004/08/30 13:26:37 apsop
# HISTORY: Use com 3.7
# HISTORY:
# HISTORY
# HISTORY: 0.0 -> 1.0 2003-07-09
# HISTORY: The script actually does something now
#
# VERSION: 1.0
#
##############################################################################
use strict;
use lib "/aps/subsys/proc/common/com8.0";
use lib "/aps/subsys/proc/sw/proc3.9.12";
use Util::SW0Filename;
BEGIN {$::FILENAME='Util::SW0Filename'}
use Subs::SWCheckInput;
use Subs::XrtCoords;
use Subs::UvotCoords;
use Subs::Spacecraft2FITS;
use Subs::BAT2FITS;
use Subs::XRT2FITS;
use Subs::UVOT2FITS;
use Subs::ExtractTiming;
use Subs::ExtractGTIs;
use Subs::Attitude;
use Subs::StartEndTimes;
use Subs::SortTdrss;
use Subs::LocateBurst;
use Subs::BATQmap;
use Subs::BATBurst;
use Subs::BATIntervals;
use Subs::BATSurvey;
use Subs::BATImages;
use Subs::XrtEvents;
use Subs::XrtTdrss;
use Subs::UvotTdrss;
use Subs::Filter;
use Subs::XrtImages;
use Subs::UvotImages;
use Subs::XRTProducts;
use Subs::NFILightCurves;
use Subs::BATSpectra;
use Subs::Spectra;
use Subs::CalSources;
use Subs::SW0Header;
use Subs::BATFinish;
use Subs::BATDB;
use Subs::UVOTReport;
use Subs::UVOTDB;
use Subs::XRTDB;
use Subs::XRTReport;
use Subs::SW0WrapUp;
##########################
# PROCESSING STEPS:
##########################
Subs::SWCheckInput->new()->run();
############################
# convert telemetry to FITS
############################
Subs::Spacecraft2FITS->new()->run();
Subs::BAT2FITS ->new()->run();
Subs::XRT2FITS ->new()->run();
Subs::UVOT2FITS->new()->run();
Subs::ExtractTiming->new()->run();
Subs::ExtractGTIs ->new()->run();
Subs::Attitude ->new()->run();
Subs::StartEndTimes->new()->run();
Subs::XrtTdrss ->new()->run();
Subs::UvotTdrss ->new()->run();
Subs::SortTdrss ->new()->run();
Subs::LocateBurst ->new()->run();
#################################
# calibrate the unfiltered files
#################################
Subs::BATQmap ->new()->run();
Subs::BATBurst ->new()->run();
Subs::BATIntervals ->new()->run();
Subs::BATImages ->new()->run();
Subs::BATSpectra ->new()->run();
Subs::XrtCoords->new()->run();
Subs::XrtEvents->new()->run();
Subs::UvotCoords->new()->run();
############################
# filter the data
###########################
Subs::Filter->new()->run();
##############################
# extract products
##############################
##Subs::BATSurvey->new()->run();
###Subs::XrtImages ->new()->run();
Subs::UvotImages ->new()->run();
## Subs::NFILightCurves->new()->run();
## Subs::Spectra ->new()->run();
###Subs::XRTProducts ->new()->run();
###############################
# trend products
###############################
## Subs::CalSources->new()->run();
Subs::UVOTReport->new()->run();
Subs::UVOTDB->new()->run();
Subs::XRTDB->new()->run();
Subs::XRTReport->new()->run();
Subs::BATFinish->new()->run();
Subs::BATDB->new()->run();
Subs::SW0Header ->new()->run();
Subs::SW0WrapUp ->new()->run();
exit 0;