|AHELP for CIAO 4.2||
Validate index file of calibration database (CALDB) products.
calvalid index keyconf caldb [rmv_dupl] [rec_offln] [rmv_inval] [add_miss] [verbose]
calvalid validates the CALDB index file (CIF). The validation process is conducted through three steps:
- Scan the FITS binary table of the index to determine whether it has a full array of mandatory columns of CALDB index standards, whether the data-types of these columns are up to the par of the standards, and whether the data-types of other optional columns, if defined, agree with the standards.
- Inspect the index if the attributes of the additional columns match those defined in key config file, "keyconf". The tool stops with an error if an invalid attribute is found.
- Look at the rows of the index table. Check if there are duplicated rows, inaccessible calibration files, or invalid entries in the rows. If any invalid information is found, the tool warns and prompts for an action: "modify", "delete", "remove" and/or "add" the rows.
If no changes are made, calvalid reports tht the validation passed; e.g.
calvalid: Index, './data/chandra/acis/caldb.indx', is validated and passed.
Otherwise, the tool reports that the file was updated and writes out the new index:
calvalid: Index, '/user/CALDB/caldb.indx', is validated and updated. The updated file is saved to './caldb.indx.upd' .
calvalid index=/soft/ciao/CALDB/data/chandra/acis/caldb.indx keyconf=/soft/ciao/CALDB/data/chandra/acis/key.conf caldb=/soft/ciao/CALDB
A basic example of running calvalid on the ACIS directory of the Chandra CALDB. The "caldb.indx" file to be validated and the key config file ("key.conf") are both located in the /soft/ciao/CALDB/data/chandra/acis/ directory. The CALDB root is "/soft/ciao/CALDB".
calvalid index=caldb.indx keyconf=key.conf caldb=/soft/ciao/CALDB rmv_dupl=yes
The input file, "caldb.indx", is the index to be validated in conjunction with key config file, "key.conf". The "caldb" is the CALDB root pointing to "/soft/ciao/CALDB" directory. This example sets "rmf_dupl=yes" with an interactive mode only on "duplicate" situation but others defauts ("no").
calvalid index=caldb.indx.inv keyconf=key.config caldb=/soft/ciao/CALDB rmv_dupl=yes rec_offln=yes
This example is similar to the previous one, except interactive mode is on ("rec_offln=yes"). The CAL_DEV entry of a row will be updated with "OFFLINE" if the calfile is inaccessible.
calvalid index=caldb.indx.inv keyconf=key.config caldb=/soft/ciao/CALDB rmv_dupl=yes rec_offln=yes rmv_inval=yes
The validation adds one more user's interaction on "rmv_inval=yes". To check the entries of an individual row, the assembled calfile of a row is used in creating an index prototype along with the key config file. The prototype then serves back as a reference to the current row of the parent index. The entries of the current row of the index are checked against those of rows of the prototype. If the row of the index does not match any rows of the prototype, calvalid issues the warning "invalid entry". The tool removes the infected row, after prompting the user for confirmation.
calvalid index=caldb.indx.inv keyconf=key.config caldb=/soft/ciao/CALDB rmv_dupl=yes rec_offln=yes rmv_inval=yes add_miss=yes
The example adds user interaction with "add_miss=yes". If a row is missing in the CIF, calvalid notifies the user and prompts whether it should be added.
Parameter=index (file required filetype=input)
Input CALDB index file
A CALDB Index file created through "calindex" tool or an equivalent method. It should be conform to CALDB Standards of the latest Version 4. The FITS binary file 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.
If the parameter value is not set, it defaults to "./caldb.indx".
The original CIF is not modified. If changes are required, an updated file named "<filename>.upd" is written to the working directory.
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 key config file used in creating the CALDB index file. The named parameters in the key config file define optional columns of the index. calvalid checks that the CIF and key conf files are consistent.
If the parameter value is not set, it defaults to "./key.conf".
Parameter=caldb (string required filetype=input)
CALDB root path
A string which points to the root of calibration installation, e.g. "/soft/data/CALDB".
If the parameter value is not set, it defaults to the environment variable "CALDB".
Parameter=rmv_dupl (boolean default=no)
Delete duplicate rows?
This parameter determines whether duplicated rows in the index should be deleted. If set to "yes", the tool will query the user for confirmation before deleting the row. If set to "no" (the default), the tool issues a warning about the duplicate row but doesn't delete it.
Parameter=rec_offln (boolean default=no)
Mark inaccessible files as "OFFLINE"?
This parameter determines whether the CAL_DEV entry of a row is updated with the value "OFFLINE" because the calfile is apparently inaccessible. If set to "yes", the tool will query the user for confirmation before updating the value. If set to "no" (the default), the tool issues a warning about the inaccessible file but doesn't change the CAL_DEV value.
Parameter=rmv_inval (boolean default=no)
Delete rows with invalid entries?
This parameter determines whether invalid rows in the index should be deleted. If set to "yes", the tool will query the user for confirmation before deleting the row. If set to "no" (the default), the tool issues a warning about the invalid row but doesn't delete it.
Parameter=add_miss (boolean default=no)
Add missing rows?
This parameter determines whether missing rows should be appending to the index file. Missing rows may be prototype rows which do not match the current index. If set to "yes", the tool will query the user for confirmation before adding the row at the end of the CIF. If set to "no" (the default), the tool issues a warning about the missing row but doesn't add it.
Parameter=verbose (integer default=0 min=0 max=5)
See the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs.