CALibration DataBase (CALDB)
The Chandra CALDB is the directory and indexing structure that stores and provides access to all calibration files that are required for standard processing and analysis, provided that they have been put into FITS format. The Chandra X-ray Observatory calibration database is modeled after the HEASARC style CALDB. It is the directory and file structure which stores the calibration data used in standard data (a.k.a. pipeline) processing, as well as for analysis with systems such as CIAO.
When you analyze data - reprocessing data to apply a new CTI or GAIN correction, creating an exposure map, or calculating an ARF and RMF - you are using a local version of the Chandra CALDB to access the calibration files.
The Chandra CALDB is updated several times a year, whenever there are new or update calibration files approved for use by the CXC. The version of the CALDB you have installed affects your analysis results. Users should:
- maintain the most current version of the CALDB for your analysis,
- understand what version was used at the time your data were processed through the SDP pipelines
CALDB releases are announced on the CALDB and CIAO websites.
Checking the CALDB Version
The CIAO contributed script check_ciao_caldb allows users to easily check that the CIAO Calibration Database (CALDB) is installed correctly.
unix% check_ciao_caldb CALDB environment variable = /soft/ciao-4.2/CALDB CALDB version = 4.2.2 release date = 2010-04-19T19:00:00 UTC CALDB query completed successfully.
Calling the script with the --latest flag will check whether there are any newer versions of the CALDB available. This step requires internet access. If a newer version is available then see the CALDB downloads page or the ciao _install thread.
Querying the CALDB
To query the CALDB for calibrations matching a set of conditions, use the tool calquiz. Information and examples are available in the calquiz help file.
Many CIAO tools can access the CALDB directly by getting the necessary metadata from an input file. Information such as the instrument, date, and instrumental configuration parameters are extracted and can be used to query the CALDB. This is done by setting the tool paramter to "CALDB". This is generally the default value for the parameter, when the tool is able to query the CALDB, e.g.
unix% pget acis_process_events ctifile CALDB
The header values can be overridden by passing parameter arguments to the CALDB. This may be useful to work around a CALDB index feature, e.g. the 'HRC-SI' calibrations are indexed as 'HRC-S'. The syntax is
Adjustable parameters in CALDB parameter
|DETECTOR||Change the detector (DETNAM) name|
|START_TIME||Start time of observation (DATE-OBS), HH:MM:SS format|
|STOP_TIME||Stop time of observation (DATE-END), HH:MM:SS format|
|START_DATE||Start DATE of observation (DATE-OBS), YYYY-MM-DD format|
|STOP_DATE||Stop DATE of observation (DATE-END), YYYY-MM-DD format|
|QUERY||Query expression to further restrict search|
acis_process_events evt2.fits gainfile=CALDB ....
The correct gain file for the observation will be selected from the CALDB using the header information in "evt2.fits".
hrc_process_events my_hrc-si.fits tapfile='CALDB(DETECTOR=HRC-S)' ...
This will load all the necessary meta data from 'my_hrc-si.fits' but will override the DETECTOR, aka DETNAM, to look for HRC-S data since the CALDB doesn't know about the 'HRC-SI' DETECTOR.