next up previous contents
Next: wmrggti Up: Stage-I programs Previous: whkproc

wmakgti

WMAKGTI -------

FUNCTION Program to create Good Time Interval (GTI) FITS file based on parameters in a Housekeeping data FITS file.

USAGE wmakgti infile outfile expr

DESCRIPTION This task creates a GTI table from a subset of times in an input HK table. The rows are selected on the basis of a boolean expression whose variables are parameters in the column names. If, after substituting the values associated with a particular parameter into the variables, the expression evaluates to true, then the time is included in the GTI table.

Boolean operators can be used in the expression in either their Fortran or C forms. The following boolean operators can be used in the expression:

"equal" .eq. .EQ. == "not equal" .ne. .NE. != "less than" .lt. .LT. < "less than/equal" .le. .LE. <= =< "greater than" .gt. .GT. > "greater than/equal" .ge. .GE. >= => "or" .or. .OR. || "and" .and. .AND. && "negation" .not. .NOT. ! "approx. equal(1e-7)"

The expression may also include arithmetic operators and functions. Trigonometric functions use degrees, not radians. The following arithmetic operators and functions can be used in the expression:

"addition" + "subtraction" - "multiplication" * "division" / "negation" - "exponentiation" ** ^ "absolute value" abs(x) "cosine" cos(x) "sine" sin(x) "tangent" tan(x) "arc cosine" arccos(x) "arc sine" arcsin(x) "arc tangent" arctan(x) "arc tangent" arctan2(x,y) "exponential" exp(x) "square root" sqrt(x) "natural log" log(x) "common log" log10(x) "modulus" i

There is also a function for testing if two values are close to each other, i.e., if they are "near" each other to within a user specified tolerance. The arguments, value_1 and value_2 can be integer or real and represent the two values who's proximity is being tested to be within the specified tolerance, also an integer or real:

near(value_1, value_2, tolerance) NEAR(value_1, value_2, tolerance)

The following type casting operators are available, where the inclosing parentheses are required and taken from the C language usage. Also, the integer to real casts values to double precision:

"real to integer" (int) x (INT) x "integer to real" (float) i (FLOAT) i

In addition, several constants are built in for use in expressions:

#pi 3.1415... #e 2.7182... #deg #pi/180 #row current row number

A string constant must be enclosed in quotes as in 'Crab'. Due to the generalities of FITS column names, a column name which resembles an arithmetic or boolean expression must be enclosed in "" characters as in column-name" characters as in #MAX PHA or #MAX-PHA.

It is also possible to use a text file containing the expression by placing at the expression argument the name of that file preceeded by an AT sign line "@expr_file"

PARAMETERS

infile [string] Name and extension number in square brackets of the input FITS file containing the columns that are used for selection.

outfile [string] The name of the created GTI FITS file

expr [string] The boolean expression string giving the criteria to select from the the HK file Good Time Intervals. If the input is '-', the expression is taken from the file indicated by the parameter 'filexpr'. If the input is '@' the remainder is the name of the file from which the expression is taken.

(filexpr=" ") [string] The name name of file containing the boolean expression giving the criteria to select from the the HK file Good time intervals.

(time="TIME_WFC") [string] The column name containing the housekeeping parameter time stamp.

(value="VALUE") [string] --> see comment The column name containing the housekeeping parameter values. This parameter is ignored for expanded (compact=no) files.

(compact=no) [boolean] --> see comment The flag for compact ASCA Housekeeping FITS files. Compact files have three columns: time, housekeeping parameter name, and parameter value. Each row in the file indicates that the specified parameter changed value at that time. Expanded housekeeping files have a column for time, and a column for each housekeeping parameter, containing the value of that parameter at each time.

(timunit="T_SCALE") [string] Name of keyword that contains the unit of time values in seconds

(timeref="MJDREF") [string] Name of keyword containing the Mofified Julian Day that corresponds to the value 0 of the TIME

(start="START") [string] The output GTI column name containing the start times.

(stop="STOP") [string] The output GTI column name containing the stop times.

(prefr=0.5) [double] This is the amount of the previous time interval to be included in the GTI. A value of 1.0 means to include the whole interval. The default is to take half of the time interval as if the state change occurred between measurements.

(postfr=0.5) [double] This is the amount of the following time interval to be included in the GTI. A value of 1.0 means to include the whole interval. The default is to take half of the time interval as if the state change occurred between measurements.

(verbsty=0) [integer] The verbosity level will control the output volume.

(title=" ") [string] User caption to be tagged to each output FITS file header

EXAMPLES 1. Generate the GTI FITS file gti.fit using the expanded HK FITS file hk.fit which has the parameter HV_MON greater than and the parameter HV_SET equals 8:

ft> wmakgti fotid_hihk.fit gti.fit "(HV_MON.gt.3300).and.(HV_MON<3400)" \ anything anything TIME no

2. Generate the GTI FITS file gti.fit using a file containing the expression FITS Science HK file

ft> wmakgti fotid_hs.fit gti.fit "@hkexpr.file" NAME VALUE TIME yes

NOTES - The program uses the parameter passing of the FTOOLS convention.

COMMENTS - The source is copied largely from the FTOOLS utility 'maketime' It contains an option to use ASCA compacted HK files. Although SAX-WFC presently does not create such file the options to do so are left as a possible future extension. - Parameters 'prefr' and 'postfr' have not been evaluated

SEE ALSO whkproc, wmrggti, wgtiflt



next up previous contents
Next: wmrggti Up: Stage-I programs Previous: whkproc



Mark Savenije
Sat Jan 18 15:04:49 MET 1997