package GlobalHK;
use strict;
use English;
use Carp;
use vars
qw(@ISA $VERSION $name $author $date $version @instList $numberOfStreams);
@ISA = qw(Module);
use ModuleResources;
# Declare identity, version, author, date, etc.
$name = __PACKAGE__;
$VERSION = '1.73';
$version = $VERSION;
$author="Richard West,Dean Hinshaw,Duncan John Fyfe,Eduardo Ojero,Ed Chapin";
$date="2014-03-13";
#
# ChangeLog
# =========
#
#
# Version 1.73 2014-03-13 (EC)
#
# + Set withpreqgti => 'no' in atthkgen (PPS SCR 0007190)
#
# Version 1.72 - 2014-02-21 (EOP)
#
# + Changed the order of execution of preqgti and atthkgen: First preqgti, then
# atthkgen so as the output of preqgti is used in atthkgen.
# (PPS PR 0007177)
#
# Version 1.71 - 2013-10-18 (EC)
#
# + Use preqgti instead of tabgtigen
#
# Version 1.70 - 2013-01-09 (EO)
#
# + Fixed typo in expresion changed in version 1.69. Must be TYPEID=='S'
#
# Version 1.69 - 2012-12-21 (EO)
#
# + Changed the expresion to be applied in tabgtigen, from
#
# expression="(TYPEID=='P')"
#
# to
#
# expression="(TYPEID=='P')||(TYPEID='S')"
#
#
# Version 1.68 - 2012-11-20 (EO)
#
# + To be able to produce the whole image of a set of mosaic observations, the command
#
# tabgtigen table=$hkFile:ATTHK expression => '!isNull(DAHFPNT) && DAHFPNT < 3.0/60.0'
#
# is replaced by
#
# tabgtigen table=$AttHistFile expression => "(TYPEID=='P')" timecolumn=VALTIME
#
# where $AttHistFile is the Reconstruted Attitude file in the ODF or AHF,
# that is filename RRRR_IIIIIIIIII_SCX00000ATS.FIT, where RRRR is the Rev. Number and
# IIIIIIIIII is the ODF ID number.
#
# Version 1.67 - 2006-09-28 (DJF)
# ------------
#
# + Commented out redundant work. Was calling findFile and newFile then doing nothing with returned values.
#
# Version 1.66 - 2006-07-05 (DJF)
# ------------
#
# + Changed numberOfStreams to use standerdized function.
#
# Version 1.65 - 2002-02-04 (DH)
# ------------
#
# + Remove creation of 'Good Attitude Data GTI', as it will no longer
# be used.
# + Add '!isNull(DAHFPNT) &&' to tabgti expression for creating the
# attitude GTI. Note that the cutoff of 3 acrmin is tighter than
# the rgsproc default of 5 acrmin.
#
# Version 1.64 - 2001-03-21 (DH)
# ------------
#
# + Create GTI of good attitude data, for use by other modules
#
# Version 1.63 - 2001-03-16 (DH)
# ------------
#
# + Print out version number in performAction() for
# tracking purposes.
#
# Version 1.62 - 2001-02-14 (DH)
# ------------
#
# + Change column name for test to make attitude GTIs
# from DAHFNOM to DAHFPNT.
#
# Version 1.61 - 2000-11-22 (DH)
# ------------
#
# + First production version.
#
@instList=qw(all);
sub numberOfStreams
{
return 1;
}
sub evaluateRules {
# ignore for slew processing
return ignore() if ($ENV{'PCMS_ISSLEW'});
#
start() if complete(module => 'MakeCIF', instrument => 'all');
}
sub performAction {
info("Module version number: $version");
#
# Create GTI from attitude data
#
my $gtiFile=newFile(class => 'intermediate',
instrument => 'all',
content => 'Attitude GTI');
# Command replaced to allow computation of full image for mosaic observations
doCommand('preqgti',
preqgtifile => $gtiFile
) or return exception();
#
# Create attitude HK file
#
my $hkFile=newFile(class => 'product',
instrument => 'all',
content => 'Attitude time series');
doCommand('atthkgen',
atthkset => $hkFile,
timestep => 1.0,
withpreqgti => 'no',
preqgtifile => $gtiFile
) or return exception();
# Create orbit file
#
# my $inOrbit=findFile(class => 'odf',
# content => 'Reconstructed orbit',
# required => 'true');
# my $outOrbit=newFile(class => 'intermediate',
# content => 'Spacecraft orbit');
# doCommand('orbit', useodf => 'no', set => $inOrbit, outfile => $outOrbit)
# or return exception();
success();
}
1;