.help mkdtime Jan94 ftools.asca
.ih
NAME
mkdtime -- Create a file of GIS deadtimes or fill in columns of MKF file
.ih
USAGE
mkdtime infile 
.ih
DESCRIPTION
MKDTIME creates a file of GIS deadtimes based on the input file.  if the
outfile name is set to "NONE", the default, the specified deadtime
columns in the input MKFILTER2 file are filled in.  Separate
values are calculated for each instrument.  The deadtime is set to zero for
unphysical (i.e. <0) count rates.  
If the value of L1 (events which pass the rise time and PH discriminator) 
is below the value of the maximum allowable error in l1: minl1, the 
deadtime is calculated using:
.nf

                              Gn_TELM
GIS dead time fraction = 1 -  --------
                              Gn_CPU_O

.fi
The values are integrated until the CPU
input (Gn_CPU_I) counts are statistically significant based on the cpucts
parameter.  The deadtime is calculated by the formula:
.nf

                                                      Gn_CPU_I   Gn_TELM
GIS dead time fraction = 1 - ( 1 - Gn_LDHIT * tau ) * -------- * --------
                                                       Gn_L1     Gn_CPU_O

.fi
The output file can be in either expanded HK format (the assumed
file type by downstream software) or compressed HK format.
.ih
PARAMETERS
.ls infile [filename]
The name and extension for input MKFILTER2 file. Any file in expanded HK format
with all of the required columns can be used.  The required columns are:
TIME, GIS_MODE, Gn_LDHIT, Gn_L1, Gn_CPU_I, Gn_CPU_O and Gn_TELM, where Gn 
are both G2 and G3.
.le
.ls outfile = "NONE" [filename]
The name and extension containing the output deadtime information.  If
NONE is specified, the requested deadtime columns in the input file
are filled in. At present, the task supports outfile = "NONE" specification only.
.le
.ls (minl1 = 20) [integer]
The minimum value of Gn_L1 for which to calculate a deadtime.
.le
.ls (cpucts = 0.05) [real]
The maximum allowable relative error in the Gn_CPU_I counts.
.le
.ls (tau = 0.000025) [real]
The response time of the ADC.
.le
.ls (timecol = "TIME") [string]
The name of the time column in the input and output files.
.le
.ls (deadcol = "DEADT") [string]
The postfix of the fractional deadtime in the output deadtime file.  The 
column names will be prefixed with G2_ and G3_ respectively.
.le
.ls (ldcol = "LDHIT") [string]
The postfix of the LD hit rate columns.
.le
.ls (l1col = "L1") [string]
The postfix of the L1 columns.
.le
.ls (cpuicol = "CPU_I") [string]
The postfix of the CPU input count rate columns.
.le
.ls (cpuocol = "CPU_O") [string]
The postfix of the CPU output count rate columns.
.le
.ls (telmcol = "TELM") [string]
The postfix of the telemetry rate columns.
.le
.ls (compact = no) [boolean]
Whether to make the output file in "compact" HK format (i.e. TIME, NAME, VALUE
columns) or in "expanded" HK format (i.e. with TIME, G2_DEADTIME, G3_DEADTIME
columns).  Most downstream software assumes the latter.  If "NONE" is
specified for the output file, this parameter is ignored.
.le
.ls (sensecase = no) [boolean]
Whether to be case sensitive about column names.
.le
.ih
EXAMPLES
.nf
1.  Calculate the GIS deadtime from the mkfilter file filter.mkf. 

	ft> mkdtime filter.mkf 

.fi
.ih
BUGS
.ih
SEE ALSO
deadtime, hkexpand, hkunexpand

