CALDFLAG (Feb98) ftools.caltools CALDFLAG (Feb98) NAME C_CALDBFLG -- switches flag status of calibration files in a CIF USAGE mission instrument inpfile det_flag det_swit filt_flag filt_swit clas_flag clas_swit dtyp_flag dtyp_swit cnam_flag cnam_swit qual_flag qual_swit desc_flag desc_swit (calfexp) (chatter) (mode) DESCRIPTION This task is a maintenance task for CALDB managers. For a given calibration dataset listed within a local Calibration Index File (CIF), the task enables 1 or more CIF flags to be switched to requested values (at the EXTENSION level). THIS TASK SHOULD BE RUN FROM THE TOP LEVEL DIRECTORY TO THE CALDB i.e. from $CALDB. As input, the task requires : (i) an ASCII file containing a list of calibration files whose flag status is to be changed. FOR EACH FILE the path to the file should be given AND the extension i.e. data/xte/pca/bcf/e2c/pca_e2c_eo3v00.fits[1] data/xte/pca/bcf/e2c/pca_e2c_eo3v00.fits[2] data/xte/pca/bcf/e2c/pca_e2c_eo3v00.fits[5] (ii) the mission & instrument whose CIF is to be updated. (iii) the names of the CIF flags (equivalent to CIF columns) to switch. (iv) the NEW value for each CIF flag. The input ASCII file consists of one entry (filename[#extn]) per row. The task parses each entry, separating the filename[#extn] from any directory path. This i/p filename[#extn] is then compared to entries in the CIF. If a match is found then the status of the requested flag(s) for that file is updated appropriately in the CIF. The CIF flags whose values (status) may be switched are: det_flag (CIF column DETNAM) Detector Name filt_flag (CIF column FILTER) Filter Name clas_flag (CIF column CAL_CLAS) OGIP class dtyp_flag (CIF column CAL_DTYP) OGIP Caldb data type cnam_flag (CIF column CAL_CNAM) OGIP data set qual_flag (CIF column CAL_QUAL) Data quality flag desc_flag (CIF column CAL_DESC) Description string Flags DETNAM, FILTER, CAL_CLAS, CAL_DTYP, CAL_CNAM, CAL_QUAL, CAL_DESC : the NEW input value merely replaces the old value. General Points : The i/p ASCII file may contain blank lines, which will be ignored. In addition, lines in the ASCII file starting with the character # will be considered comment cards and also be ignored. The calibration filenames may include local path names (since to determine filename matches, all files, including those in the CIF, are stripped of their paths). Appropriate Errors & Warnings are issued if a calibration file given in the ASCII file does not exist in the CIF, or already has the flag status requested. PARAMETERS mission [character string] The user-supplied string for the mission name. instrument [character string] The user-supplied string for the instrument name. inpfile [character string] The name of the user ASCII file containing the calibration files whose CIF flag status is to be changed. det_flag [integer] User-supplied request to switch DETNAM flag in CIF. det_swit [character string] New value supplied to DETNAM. filt_flag [integer] User-supplied request to switch FILTER flag in CIF. filt_swit [character string] New value supplied to FILTER. clas_flag [integer] User-supplied request to switch CAL_CLAS flag in CIF. clas_swit [character string] New value supplied to CAL_CLAS. dtyp_flag [integer] User-supplied request to switch CAL_DTYP flag in CIF. dtyp_swit [character string] New value supplied to CAL_DTYP. cnam_flag [integer] User-supplied request to switch CAL_CNAM flag in CIF. cnam_swit [character string] New value supplied to CAL_CNAM. qual_flag [integer] User-supplied request to switch CAL_QUAL flag in CIF. qual_swit [integer] New value supplied to CAL_QUAL. desc_flag [integer] User-supplied request to switch CAL_DESC flag in CIF. desc_swit [character string] New value supplied to CAL_DESC. (calfexp=CALDB) [character string] The name of the environment variable. (chatter = 9) [integer] Flag to indicate how chatty the task is at execution. A value of 9 is the default, with lower/higher values producing quieter/verbose output respectively. (mode = "ql") [character string] BUGS None known LOG OF SIGNIFICANT CHANGES v1.0.0 (1998 Feb) original version (Lorraine Breedon) PRIMARY AUTHOR Lorraine Breedon HEASARC NASA/GFSC breedon@rosserv.gsfc.nasa.gov (301) 286-1364