Good Time Interval are defined as file containing START and STOP columns. However if the START and STOP varies with
a fix number of elements, a compact format includes beside the START and STOP columns an additional column (hereafter
name ELEMENT) containing the element values associate to the appropriate start and stop values.
'gticolconv' has two convertion functions:
1) Split a Good Time Interval (GTI) file containing START STOP and ELEMENT columns into a file containing several
extension as many as the unique values in the column ELEMENT .
2) Merge several GTI extensions into a single extension with three columns STATOP STOP and ELEMENT where ELEMENT
is populated with a unique value as many as GTI extensions are present.
If the 'direction' parameter is set to SPLIT,'gticolconv' checks that the GTI extension in the file contains three columns : the columns named START, STOP and the column which named is specified in the parameter 'column'. The script first calculates the unique values in 'column' and then creates a new GTI extension for each value found in the original input GTI file. The unique value is written in an header keyword specified in the parameter 'keyname'. The format of the value written in 'keyname' is specified in the parameter 'keyform' . The 'keyform' should be specified with a string followed by #s. The script replaces any #'s with the value from the 'column' associated to the GTI specific extension. Similarly, the extension name is set as GTI'keyform' with #'s replaced with column values. The TSTART and TSTOP for each extension are calculated based on the first row START value and last row STOP value for each extension.
If 'direction' is set to MERGE, 'gticolconv' expects a file with several GTI extensions, each containing two columns (START and STOP) and an header keyword specified in the parameter 'keyname' with a pattern specified in the parameter 'keyform'. 'gticolconv' searches for 'keyname' in all GTI extensions and read the # of the 'keyform' to construct the unique values that populate the columns specified in the parameter 'column'. All extension are merged into a single-extension GTI file with the columns START, STOP and 'column'. The merged extension is named "GTI'column" and the content of the keyword 'keyname' is set as the value in the parameter 'column'. The output file is sorted by START, STOP and then by 'column'. TSTART and TSTOP are calculated based on the first row START value and last row STOP value.
ftcopy ftmerge
August 2016