The scripts are stored in $WRAPDIR ($SOS_GeRT/scripts).
4.1 gert*.pl
Main Perl script for running the GeRT described in sections 1-4. gert.pl is setup to run without Perl threads. If Thread.pm is available, use gert_thread.pl for increased speed. gert_thread_rm.pl shows a modified gert_thread.pl script that deletes the intermediate SLOPER products to save disk space.
4.2 cleanup*.tcsh
The cleanup*.tcsh scripts are described in Chapter 2. These scripts mask sources and then calculate the filtering corrections and make new filtered BCDs.
Before running the script, an input list of sources for masking in the mask_pointsource.nl must have been set up, e.g., PointSourceList = 'source.tbl'. See Chapter 2 for details.
bcd70.lis, mask70.lis and unc70.lis are the nput lists of BCDs, bmasks, and uncertainties, respectively.
lirg70 is the output directory. The cleaned BCDs will be writted to cclirg70/.
DISCUSSION
The script deletes intermediate files.
Attaches header pointing information to Bmask files by running bcd2cube.pl (stacklayer) and then cube2bcd.pl (getlayer). This is not the most efficient way to do this, but the scripts are already developed.
Updates the Bmask files by masking out the location of the sources using ge_mask_pointsource script and controlled by the mask_pointsource_*.nl namelist file.
Stacks the data into cubes for filtering using bcd2cube.pl (stacklayer).
Runs column and high-pass time filtering on cube via slopecal with input namelist caler_cleanup*.nl. Bad pixels and source pixels are not included in the filtering corrections.
Output cleaned up BCDs put in cclirg70/.
See Chapter 2 for examples.
4.3 bcd2cube.pl
Offline BCD to cube Perl function.
USAGE
unix% bcd2cube.pl INlist CUBE
where
INlist: input list of original BCDs
CUBE: Output fits data cube
Uses system call to the downlink stacklayer binary (BCD headers are dropped).
4.4 cube2bcd.pl
Offline cube to BCD Perl function.
USAGE
unix% cube2bcd.pl INlist CUBE OUTdir
where
INlist: input list of original BCDs
CUBE: Clean fits data cube
OUTdir: Output directory of new BCDs
The headers are from the INlist files and the pixel values are from CUBE; uses a system call to the downlink binary getlayer.
4.5 mips/w_mips_rfitshead.pl
Perl script used by software to read FITS headers and put keywords into a hash table for processing.
4.6 mips/w_mips_cdfblock.pl
Perl script called from within gert.pl that picks the proper namelist block name based on keywords via calling yet another Perl script (w_mips_ensemble_files.pl).
FINE-scale photometry observations are picked for exptype = pht and aperture/FOVID > 117 (aperture -> fovid after online FPG), and exptype set to ffl for pfl and aperture > 117 (FINE-scale IC).
4.7 mips/w_mips_ensembles_files.pl
Perl script with hash tables mapping caltype with exptype.
# hash tables giving mapping from exptype to caltype
# must return an empty value for non calibration exposure types
# Hash to look up type from exptype
%exptypetab =
(
"scn" => "SCAN",
"pht" => "PHT",
"tpm" => "TPM",
"d2a" => "DARK",
"d2b" => "DARK",
"f2a" => "ILCORR",
"f2b" => "ILCORR",
"fs" => "ILCORRSED",
"sed" => "SED",
"d3" => "DARK",
"f3" => "ILCORR",
"sfl" => "SCAN",
"ffl" => "FINE",
"tfl" => "TFM",
"pfl" => "PHT",
"dfl" => "SED"
4.8 mk_*gert.tcsh
Scripts used to make public GeRT packages from SSC downlink areas. Used by internal SSC folks. Users can ignore this script. .