Merge index files of calibration database (CALDB) products.
calindex indices keyconf outfile [--rmv_dupl n] [--verbose #] [--clobber y]
calmerge merges CALDB index (at CIF extension) files to create a new index file.
It scans the FITS binary tables of the indices to ensure they meet CALDB index standards. It then inspects key config file to ensure each of its defined columns is consistent with those defined in the indices. The tool exits with an error if any invalid attribute is found. A index table is formed with the merged indices data rows in the order of the inputs. The tool then looks into the merged rows and check for any duplicated rows. The duplicated rows are removed while it prompts the finding and the "removed" action. The primary block of the output file is the copy of the file's, listed first in the stack and the "date" keyword, if any, is updated with the current date. The "CIF", extension data block, of the new index is filled with the merged index table rows.
calmerge "caldb.indx1,caldb.indx2" keyckey.conf caldb.indx.mrg
There are two indicies, "caldb.indx1" and "caldb.indx2", to be merged along with a common "key.conf" file. Any duplicated rows, if found, are removed. The merged result is written on "caldb.indx.mrg".
calmerge @mystack key.conf caldb.indx.mrg
This is a similar run and the difference is that the indices to be merged are stacked in a separated file, 'mystack', prefixed with '@'. The stack file has two rows, one for "caldb.indx1" and the other "caldn.indx2".
Detailed Parameter Descriptions
Parameter=indices (file required filetype=input)
Input CALDB index files
The CALDB Index files used here, created through "calindex" tool or an equivalent method, should be conform to CALDB Standards of the latest Version 4. Each of the FITS binary files has an extension named after "CIF", Calibration Index File. The index table contains the CALDB mandatory columns and the CALDB optional columns. The CIF may also have additional columns defined in key config file; see "keyconf" parameter description.
The parameter must have at least two files in stack otherwise it has no output.
Parameter=keyconf (file required filetype=input)
Input key config file
An ASCII file containing rows of parameters with space-separated attributes. This should be the same or consistent key config file used in creating the CALDB index files. The named parameters in the key config file define optional columns of the index. calmerge looks for the consistency of key conf file with the indices files.
If the parameter value is not set, it defaults to "./key.conf".
Parameter=outfile (file required filetype=output)
The merged CALDB index file
The outfile is the results of the merged indicies. It has the same Null data block copied from the first index of the stacking merged files but the "date" keyword, if any, is updated with the current date. The "CIF" data block holds the index rows appended with an index followed by another of the stack. The duplicated rows, if any, are removed before the output is formed.
Parameter=--rmv_dupl (boolean default=yes)
The prefix, "--", to "rmv_dupl" is an optional tag, followed by the value of the parameter. It deletes the duplicate rows if the value is 1 or yes.
The parameter determines whether duplicated rows in the index should be deleted. The tool will issues a warning about the duplicate rows if spoted. If the parameter is set to "yes" (the default), the tool deletes the rows and issues the action.
Parameter=--clobber (boolean default=yes)
The prefix, "--", to "clobber" is an optional tag, followed by the value of the parameter. The tool removes the existing file if the value is set yes (yes|y|1) otherwise append the output to the existing file.
Remove the existing file if the value=yes.
Parameter=--verbose (integer default=0 min=0 max=5)
Verbosity level of terminal display information to user.
There is no output message for default but more details printed out in ascending levels.
See the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs.
Refer to the CIAO bug pages for an up-to-date listing of known issues.