FUNCTION Main script to invoke the FOT reading program wfotfits call into action programs (stage-1) for extracting, monitoring and processing SAX-WFC FOTs in order to prepare the data for detecter correlation and X-ray sources detection (stage-2). USAGE w_fits -f prefix [-specifier [argument]] ..... [-specifier [argument]] Where a specifier can be a switch or option followed by an argument. Common practice is taking for the FOTID the Observation Period number preceded by 'OP' Before being able to use the w_proc at least the following shell environment variables must be set: WFC_TOP e.g. /home/xrayman/wfc WFC_ETC e.g. $WFC_TOP/etc WFC_BIN e.g. $WFC_TOP/bin path e.g. ( $WFC_ETC $WFC_BIN $path ) As in some instances use is made of ftools utilities also the following environment variable must be set FTOOLDIR e.g. /home/library/ftools To store the parameter files In addition a directory in your home directory must exist with the following name: $HOME/pfiles/release The names of these directories may be site dependent, so when in doubt ask your local ftools manager. It is advisable to create a single shell source file for setting these variables plus others to be used with stage-2 processing. DESCRIPTION From the recieved FOT data is extracted checked on anomalies and copied into FITS formatted files. The producing of the files is done by invoking program 'wfotfits' with the proper parameters. Checking of required directory structures is performed and the user is warned if missing. The following filetypes are/can be produced of all but the last are in FITS format: FOT | V -------- wfotfits -------- | |--> *__att0.fits [attitude data] |--> *__eph0.fits [ephemerides data] |--> *__utc0.fits [OBT-UTC table] |--> *__obs0.fits [observations table] |--> *w#hit0.fits [IT diagnostic ITHKD000] |--> *w#@hi0.fits [instrument housekeeping HKD000] |--> *w#@hs0.fits [science housekeeping ENG000] |--> *w#@rn0.fits [normal rate data DIR001] |--> *w#@rh0.fits [high rate data DIR002] |--> *w#@ba0.fits [background analysis data DIR003] |--> *w#@dr0.fits [reduced diagnostic data DIR004] |--> *w#@de0.fits [extended diagnostic data DIR005] |--> *w#@ib0.fits [packetblocks info] |--> *w#@rn0.gti [GTI file] |--> *w#@rh0.gti [GTI file] |--> *w#obs0.txt (observation times survey text] - where 'w#' denotes the camarea ('w1' or 'w2'), '@' denotes the type of observation ('p' for pointing, 's' for slewing) and '0.' the level of processing. This will be reflected in keyword 'VERSION' of the The "EXCONF'(experiment configuration) data is stored in the extension header of the instrument housekeeping (*hi0.fits) file The script allows the insertion or replacement of auxiliary files according to te following conventions. A file can be explicitly assigned by using swith '-att' or by pre-setting the corresponding environment variable. It is also possible to have a directory searched automatically for a file. This is done by pre-setting environment variable 'WFC_FOTREPDIR'. Then for '-f prefix' a files are searched with the name $WFC_FOTREPDIR/Wprefix_ATT/attitude*.dat or $WFC_FOTREPDIR/Wprefix_EPH/ephemeris*.dat or $WFC_FOTREPDIR/Wprefix_OBT/obt_utc*.dat If found that file will be the replacement file. OPTION SPECIFIERS The order of actions or options is not fixed. An option can be either a switch or a keyword followed by one or more arguments. At least one of the following actions must be selected: -h Display a concise help on the available switches and recognized environment settings. It will not show the switches of possible subsequently invoked programs however. -f [string] The argument specifies the FOT identifier. TFor resulting files this will become the prefix of all names. Only when processing directly from tape with the '-fot' action can this switch be omitted, in which case the FOTID is taken from the FOT directory. But also in this case it will be overruled by giving the -f FOT_ID switch. -t [string] Specify (top-)directory where input (link)files are located. By default the current directory is taken. This default can be overruled by setting environment variable $WFC_OBS Only in case of '-fot' action this will be the destination directory where the FOT files from tape will be placed to be used as input for level 0 (-fits) processing. It will overrle the value of enveironment variable FOT_TOP. -d [string] Force result files under destination top-dir. By default this will be the input directory. Already existing result files will be overwritten. -vv [integer] Argument value regulates the output verbosity volume. When 0 a minimal (silent) output will occur. The default is 1 where it will show the programs that were active and some info on files produced. A larger value will produce more diagnostic info. This switch will be passed on to subsequently invoked scripts. -w1 -w2 Only process the data of one (-w1 or -w2) camera. (not relevant for '-fot' and -fits' actions) -save Force intermediate files to be saved. By default the lower level files will be discarded. -n [integer] -n1 [integer] -n2 [integer] Indicates the number (-n) or number range (-n1 and -n2) of observations to be processed. By default n1 = 1 and n2 = 999. -c1 [string] -c2 [string] The name of the input FITS file that contains the coefficients to calculate the physical values of temperatures and voltages from digitally coded analog value. By default they are $WFC_CAL/wfc1.det and $WFC_CAL/wfc1.det respectively. The defaults can be fixed by setting environment variables W_INSCAL1 and W_INSCAL2 respectively. -blockio Allow writing and reading data files in fast block I/O. This may introduce a non-standerd FITS format that cannot be used across different computer systems and will not work with systems using VAX byte order. Presently by default the blockio option is disabled for OSF1 unix systems and enabled for all other systems like HPUX. -swap -noswap Specify whether the data is organized according to VAX definition and bytes of words and double-words must be swapped. This will be normally the case if FOT's were produced by the Science Data Centre. Presently by default the swap option is disabled for OSF1 unix systems and enabled for all other systems like HPUX. -att [string] -eph [string] -obt [string] Specify the name of an alternative file containing attitude, ephemeris or OBT_UTC data. It will replace the one that is in the FOT. If not present in the FOT it will be inserted at the porper place in the original FOT. It is possible to specify the alternative file by setting the respective environment variables W_ATTFILE, W_EPHFILE, or W_OBTFILE. -frt [string] Argument specifies root-name of disk created fotfiles By default takes the specified FOTID plus '_' NOT RECOMMENDED TO CHANGE THE DEFAULT -fxt [string] Argument specifies extension of disk located fotfiles (default .fot) NOT RECOMMENDED TO CHANGE THE DEFAULT RECOGNIZED ENVIRONMENT VARIABLES In addition default values for switches and installed settings can be overruled by the following shell environment variables. WFC_TOP The top directory of the WFC software distribution No default as it is site dependent WFC_ETC Place where scripts and general selection files are located if not present default to $WFC_TOP/etc WFC_BIN Place where the program executable binaries are located if not present default to $WFC_TOP/bin WFC_CAL Place where calibration and instrument definition files. if not present default to $WFC_TOP/cal (see also switches '-c1' and '-c2') WFC_FITSORIG String to be used for the ORIGIN keyword in produced Fitsfiles (default: `hostname` ) FOT_TOP The directory where the FOT files are resided. This is the input directory for all actions except for the '-fot' option where it will be the directory in which the FOT files are loaded. (default: `pwd` ) W_INSCAL1 if not present default to $WFC_CAL/wfc1.det (see also switch '-c1') W_INSCAL2 if not present default to $WFC_CAL/wfc2.det (see also switch '-c2') W_EPHFILE if not present default to "-" (see also switch '-eph') W_ATTFILE if not present default to "-" (see also switch '-att') W_OBTFILE if not present default to "-" (see also switch '-obt') EXAMPLES: Process a FOT from tape completely with standard options, put resulting files in the current directory and save the output in a logfile > w_fits -fot -f OP1234 -t FOTDIR > logfile To re-process all observation of camera 2 only and store the results in a different destination directory > w_proc -f OP1234 -w2 -clean -t FOTDIR -d /DESTDIR NOTES - For narmal use it is recommended to invoke this script by use of script w_proc - The destination directory will be created if not present. - In case a FOT resides on disk its filenaming is not of the form 'prefix__nnnn.fot' a renaming or namelink is needed by script w_vaxlink available in $WFC_ETC. - The detector calibration files are created during the installment of Stage-2 software package. - Unspecified options exist fot handling cases of incomplete or corrupt FOTs. They are not advised for use in general operations. SEE ALSO w_vaxlink, w_stageI, w_proc, wfotfits