6 Calibration

 6.1 Calibration overrides

The calibration system is essentially based on the concept of index files. An index file is a data file containing information on all calibration observation reduced by the pipeline. A separate index file is created for each calibration sub-system (e.g. one for dark observations, one for skydip observations etc) with the convention is that each index file is stored in ORAC_DATA_OUT and prefixed with the string index (e.g. index.dark, index.skydip etc.). It is the responsibility of a primitive (usually a complete recipe is dedicated to the calibration observation) to file a calibration to an index file. The index file can be used simply to register a file name (e.g. the name of a dark file or flatfield) or a calibration result (the current sky opacity or flux conversion factor). Methods are provided in the ORAC::Index class for retrieving this information from the index file9

The index object is responsible for searching the relevant index file and returning the most suitable calibration. This is achieved by the use of external rules files (stored in ORAC_DATA_CAL called rules.CALIBRATION_NAME) which list which header keywords are relevant and should be checked against the headers of the current frame. This means that the calibration object itself does not need to worry about searching the index file or reading the rules files.

An example rules file could look like:

  # Example rules file for SCUBA skydips
  MODE eq ’SKYDIP’
  FILTER eq $Hdr{FILTER}
  WAVE == $Hdr{WAVE}
  TAUZ
  ORACTIME ; abs(ORACTIME - $Hdr{ORACTIME}) < 0.5

The format is intended to be fairly simple as it should be possible for a non-programmer to edit it. The main points are:

6.1 Calibration overrides

orac-dr gives the user the ability to override the default calibration information as returned by the pipeline through use of the -calib commandline option. By adding methods in ORAC::Calib or in instrument-specific subclasses, it is possible to add various override methods. As an example of this, see the profile, profilename, profileindex, and profilenoupdate methods in ORAC::Calib::CGS4. For further information on adding override methods see §9.3, and for information on using override methods when reducing data with orac-dr see SUN/230.

A number of general overrides are available.

9For efficiency, the index file is kept in memory rather than read from disk every time it is to be accessed. This means that orac-dr is not guaranteed to work if two processes are sharing a single ouput data directory as this would cause problems with index file updates [they are not locked].