.help caldflag Feb98 ftools.caltools 
.ih
NAME
C_CALDBFLG -- switches flag status of calibration files in a CIF
.ih
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)
.ih
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.

.ih
PARAMETERS
.ls mission [character string]
 The user-supplied string for the mission name.
.le
.ls instrument [character string]
 The user-supplied string for the instrument name.
.le

.ls inpfile [character string]
 The name of the user ASCII file containing the calibration files whose CIF flag
 status is to be changed.
.le
.ls det_flag [integer]
 User-supplied request to switch DETNAM flag in CIF.
.ls det_swit [character string]
 New value supplied to DETNAM.
.le
.ls filt_flag [integer]
 User-supplied request to switch FILTER flag in CIF.
.ls filt_swit [character string]
 New value supplied to FILTER.
.le
.ls clas_flag [integer]
 User-supplied request to switch CAL_CLAS flag in CIF.
.ls clas_swit [character string]
 New value supplied to CAL_CLAS.
.le
.ls dtyp_flag [integer]
 User-supplied request to switch CAL_DTYP flag in CIF.
.ls dtyp_swit [character string]
 New value supplied to CAL_DTYP.
.le
.ls cnam_flag [integer]
 User-supplied request to switch CAL_CNAM flag in CIF.
.ls cnam_swit [character string]
 New value supplied to CAL_CNAM.
.le
.ls qual_flag [integer]
 User-supplied request to switch CAL_QUAL flag in CIF.
.ls qual_swit [integer]
 New value supplied to CAL_QUAL.
.le
.ls desc_flag [integer]
 User-supplied request to switch CAL_DESC flag in CIF.
.ls desc_swit [character string]
 New value supplied to CAL_DESC.
.le
.le
.ls (calfexp=CALDB) [character string] 
 The name of the environment variable.
.le
.ls (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.
.le
.ls (mode = "ql") [character string]
  
.le 

           

.ih
BUGS
None known

.ih
LOG OF SIGNIFICANT CHANGES


.ls v1.0.0 (1998 Feb)
    original version (Lorraine Breedon)
.le

.ih
PRIMARY AUTHOR

.nj
Lorraine Breedon
.br
.nj
HEASARC
.br
.nj
NASA/GFSC
.br
.nj
breedon@rosserv.gsfc.nasa.gov
.br
.nj
(301) 286-1364
.ju


.endhelp

