Updating_Cdbs

Rationale

This document was written to assist anyone (including myself) who may need to update the cdbs tasks to support new reference files or instruments. Since the calibration pipelines are continually being updated, there is a need to also update the cdbs tasks to track these changes. Although I have tried to make these tasks as independent of instrument specific information as possible, that is not completely possible. This document only describes changes to the cdbs tasks, it does not describe the changes to the cdbs database which are also necessary. I will continue to update this document as I discover more dependencies on instrument specific information.

Key assumptions

When the new version of the cdbs tasks were written, certain key assumptions were made in its design. Violating these assumptions may require rewriting significant of the cdbs code and I hope this can be avoided. The current cdbs code assumes that:

Adding Reference Files

There are two areas that need to be changed if a new reference file is added to cdbs. First, the data files in the data subdirectory must be modified. A new entry must be made in the file cdbscatalog.dat for both the reference file and its associated loadfile. And template files must be contructed for the reference file and its associated loadfile. This change to cdbscatalog.dat is necessary so that the cdbs tasks can properly identify the file and the template files are necessary so that certify can be run on the new files.

Second, getref must be modified to contain information about the new reference file. The header file global.h contains the static arrays that contain this information. The comments in this file describe the information that needs to be changed. For each new reference file the name of the image header keyword containing the reference file name must be supplied as well as the names of the columns in the bestref database table containing the recommended and original reference file names for that reference file type. If the new reference file introduces new observation mode fields, the names of the field containg the new modes in the cdbs and dads database will also need to be modified.

Adding a New Instrument

If a new insrument is added, additional changes are needed to cdbs beyond the changes necessary for any of its new reference files.


Back to index of cdbs tasks.