The import is controlled by a "table" which specifies how FITS keyword values should be interpreted. This allows the evaluation of functions containing many FITS keywords as well as the mapping of CCDPACK recognised character items to arbitrary strings.
If the logging system has been initialised using CCDSETUP then the value specified there will be used. Otherwise, the default is "CCDPACK.LOG". [CCDPACK.LOG]
In its most simple format a FITS control table is just a series of lines which contain the names of CCDPACK extension items and the names of the FITS keywords to which they map.
If the HDS type of the destination Extension-item is known this may be included.
Extension-item FITS-keyword
Normally this is inferred. This is the format used by the KAPPA application FITSIMP (as of KAPPA version 0.8-6U). Extension items are the names of CCDPACK items (such as FTYPE, FILTER etc.). These may be heirarchical, e.g. TIMES.DARK. Note that they exclude the "NDF_NAME.MORE.CCDPACK." part of the extension path name.
Extension-item _HDS-type FITS-keyword
To allow functions of FITS-keywords to be possible a second "declarative" form of statement is necessary.
So for instance if you wanted to derive an exposure time for an observation which was given in milliseconds and which you wanted to convert into seconds you would use this sequence of commands:
_HDS-type FITS-keyword
The "_INTEGER EXPOSURE" tells this application to find a FITS keyword of EXPOSURE and extract its value as an integer. If you wanted to estimate the dark time from a knowledge of the start and end times (TAI0 and TAI1):
_INTEGER EXPOSURE TIMES.DARK _DOUBLE 1000.0D0*EXPOSURE
The function may use any of the usual Fortran operators; +, -, *, /, ** and many others that are supported by the TRANSFORM package (SUN/61).
_DOUBLE TAI0 _DOUBLE TAI1 TIMES.DARK _DOUBLE (TAI1-TAI0)
Functions are allowed to not contain any FITS-keywords in which case the extension item will be assigned to the value, so for instance numerical constants may be given:
In this way import tables could actually be used to set all the required values in the CCDPACK extension (but see PRESENT also).
EXTENT.MINX _INTEGER 1 EXTENT.MINY _INTEGER 1
Characters strings cannot be manipulated by functions so a single special format for translating their values is provided. The name of the destination extension item and (optionally) its type are given as usual followed by a FITS-keyword which contains the string to be translated. This is then followed by statements which translate an "input" string into an "output" string, i.e.:
FITS1 = Ext1 FITS2 = Ext2 FITS3 = Ext3 ... FITSn = ExtnSo for instance if you wanted to translate frame types to those recognised by CCDPACK you might use something like:
Which would compare the value of the FITS-keyword OBSTYPE with the strings "OBJECT", "FF" and "ZERO" (case insensitive) and convert these into the values in the right-hand side of the equals sign.
FTYPE _CHAR OBSTYPE OBJECT=TARGET - FF=FLAT - ZERO=BIAS
Logical data types are restricted to a single keyword whose value must be "YES", "TRUE", "T", "Y" for TRUE or "NO", "FALSE", "N", "F".
The FITS keywords may be hierarchical, and on the whole are specified simply by giving their name in the normal way. However, there is one special case: if the value of a FITS header is known to be a string of the form '[A:B,C:D]' the numbers A, B, C and D may be extracted individually by appending '<X1>', '<X2>', '<Y1>' or '<Y2>' respectively to the name of the keyword. Hence:
would set the extents from the first two fields of a suitably formatted TRIMSEC header.
EXTENT.MINX TRIMSEC<X1> EXTENT.MAXX TRIMSEC<X2>
Fields in the table may be separated by commas if desired, any amount of white space and tabs are also allowed. Comments may be placed anywhere and should start with the characters "#" or "!". Continuation onto a new line is indicated by use of "-".
Name HDS data type Description ADC _DOUBLE The analogue to digital conversion factor. BOUNDS.END1 _INTEGER The end row or column of the first bias strip region. BOUNDS.END2 _INTEGER The end row or column of the second bias strip region. BOUNDS.START1 _INTEGER The first row or column of the first bias strip region. BOUNDS.START2 _INTEGER The first row or column of the second bias strip region. DEFERRED _DOUBLE The deferred charge. DIRECTION _CHAR The "readout " direction (X or Y). EXTENT.MAXX _INTEGER Maximum X coordinate of useful region. EXTENT.MAXY _INTEGER Maximum Y coordinate of useful region. EXTENT.MINX _INTEGER Minimum X coordinate of useful region. EXTENT.MINY _INTEGER Minimum Y coordinate of useful region. FILTER _CHAR Filter name. FTYPE _CHAR Frame type (TARGET, BIAS, FLAT, DARK or FLASH) RNOISE _DOUBLE Readout noise (ADUs) SATURATION _DOUBLE Pixel saturation count. TIMES.DARK _DOUBLE Dark count time. TIMES.FLASH _DOUBLE Pre-flash time.
CCDPACK