| AHELP for CIAO 4.4 | calquiz |
Context: tools |
Synopsis
Find calibration files in the CALDB
Syntax
calquiz infile telescope instrument product calfile [outfile] [echo] [verbose]
Description
`calquiz' is the CALDB4 replacement for the 'quizcaldb' tool. The tool is use to query the CALDB for calibrations matching a set of conditions. It may be run in two ways:
- an input file (FITS image, FITS table, or observation parameter file) is specified. This file is used to get the metadata needed to complete the CALDB lookup, such as DATE-OBS, DATE-END, INSTRUME, and TELESCOP
- no infile is specified; in this case, the telescope and instrument parameters must be set
For detailed information on the structure and operation of the CALDB, see "ahelp caldb" and the Chandra CALDB webpages.
Converting a quizcaldb command to calquiz
A quizcaldb command that looked like:
quizcaldb \ infile=none \ mission=chandra \ instrument=ACIS \ detector=- \ expr=FP_TEMP.eq.153.28.and.CTI_APP.eq.PPPPPBPBPP \ filter=- \ codename=CTI_TDM \ date=2000-03-14 \ time=02:35:12 \ verbose=5
is converted to calquiz as:
calquiz \ infile= \ telescope=chandra \ instrument=acis \ product=cti \ calfile="CALDB(fp_temp=153.28;CTI_APP=PPPPPBPBPP; DATE-OBS=2000-03-14T02:35:11;DATE-END=2000-03-14T02:35:12)" \ verbose=5
Note that the components of the query (fp_temp, cti_app) are separated by semicolons, not combined with ".and.". The start/stop times should match the format of the FITS keywords DATE-OBS and DATE-END.
Example 1
calquiz acisf00459N002_evt2.fits product=DET_GAIN calfile=CALDB pget calquiz outfile /soft/ciao/CALDB/data/chandra/acis/det_gain/acisD1999-09-16gainN0006.fit s[2]
Query the CALDB for the detector gain (DET_GAIN) for the data in acisf00459N002_evt2.fits. The pget tool is used to get the resulting filename from calquiz.par.
Example 2
calquiz sources.wmap8 product=fef_pha calfile=CALDB verbose=1
Use the information in sources.wmap8 to determine which FEF file would be used to create the RMF. calquiz is run with "verbose=1", so the information is printed to the screen:
Telescope: CHANDRA
Instrument: ACIS
Data: FEF_PHA
Detector: -
Start-Date: 2002-02-27
Start-Time: 14:51:49
Stop-Date: 2002-03-01
Stop-Time: 01:38:40
Expression: GRATING=NONE
CTI_APP=PPPPPNPNPP
FP_TEMP=153.446
Config: /soft/ciao-4.2/CALDB/software/tools/caldb.config
CXC-caldb: v1.6
caldb4: #
No error.
Found 1 files:
/soft/ciao/CALDB/data/chandra/acis/fef_pha/acisD2000-01-29fef_pha_ctiN0004.fits[2]
Parameters
| name | type | ftype | def | min | max | reqd |
|---|---|---|---|---|---|---|
| infile | file | input | yes | |||
| telescope | string | yes | ||||
| instrument | string | yes | ||||
| product | string | yes | ||||
| calfile | string | CALDB | yes | |||
| outfile | string | output | ||||
| echo | boolean | no | no | |||
| verbose | integer | 0 | 0 | 5 |
Detailed Parameter Descriptions
Parameter=infile (file required filetype=input)
Input file name
The input file from which the metadata needed to complete the CALDB lookup is obtained. This includes things such as DATE-OBS, DATE-END, INSTRUME, TELESCOP, etc. The file can be either a datamodel file or a parameter file. It can also be left blank and users can use the `telescope' and `instrument' parameters.
Parameter=telescope (string required default=)
Telescope name
The input "telescope" is to replace the "infile" only when the file string is empty. The value of TELESCOP keyword is needed to do the CALDB lookup.
Parameter=instrument (string required default=)
Instrument name
The input "instrument", together with "telescope", is to replace the "infile" when the input file is an empty string. This parameter is optional.
Parameter=product (string required)
Calibration Database product code name
Each data type of data-product in the CALDB has a unique code-name. See the CALDB keywords page for a complete list of code names. Common examples are CTI, DET_GAIN, and P2_RESP.
Parameter=calfile (string required default=CALDB)
The CALDB directive
This parameter indicates that the CALDB should be used to lookup the calibration file and accepts optional arguments to refine the search. Arguments take the form:
CALDB(PARAMETER=VALUE;PARAMETER=VALUE)
The PARAMETER's above are arbitrary, so if for example the CALDB query needs a value for 'GRATTYPE' but no such header keyword exists, you can specify
CALDB(GRATTYPE=HEG)
There are two special directives:
- _FIDELITY : this can take the values 'HIGHEST', 'LOWEST', or can take a colon separated range, eg '1:3.4', ':4', or '0:'
- _MATCH : this can take the values 'ALL', 'FIRST', 'WARNFIRST', 'LAST', 'WARNLAST', 'SINGLE'
Parameter=outfile (string filetype=output)
The selected file with path and extension appended.
This field is populated after the tool has finished running. The information is also printed to the screen if verbose>0.
Parameter=echo (boolean not required default=no)
Echo value to screen?
Determines if the retrieved value is printed to the screen in addition to being stored in the parameter file.
Parameter=verbose (integer default=0 min=0 max=5)
Amount of tool output.
Bugs
There are no known bugs for this tool.

![[CIAO Logo]](../imgs/ciao_logo_navbar.gif)