This library defines the chip cube, which is a way of storing CCD images in FITS files; the library also provides some routines for manipulating these files. A CCD image in the XMM-Newton context is a 2-dimensional image which has the same dimensions as a CCD of one of the EPIC x-ray cameras, and which usually records some quantity explicitly or implicitly related to the x-ray flux detected by the CCD. Because all the CCDs from any given EPIC camera have the same dimensions, their images can be stored as slices of a cube (3-dimensional array). This compact and convenient representation is the format used by the present library. The chip cube is stored in the primary data array of the FITS file.
When I wrote this library, I chose the 1st index (of both the fortran and FITS array representations) to be the CCD index, and the 2nd and 3rd as the CCD x and y coordinates respectively. Now it seems obvious to me that a representation in which the CCD index was the 3rd index would be far more natural. Since it seems unlikely that the present library will ever be widely used I feel reasonably sanguine about changing this order at some future date.
For most quantities measured on EPIC CCDs, an association with a set of Good Time Intervals (GTIs) is important. In the original x-ray event list created as part of the XMM product set, a separate series of GTIs is provided per CCD. Thus in the FITS format for storing chip cubes, an series of binary table extensions for storing GTIs, one per CCD, is an option.
Finally, for maximum generality, a key table is prescribed for the FITS file, for the purpose of relating the CCD number to the relevant plane of the chip cube and also to the GTI extension name which should apply to that CCD. This key table is a mandatory binary table extension with the name KEY2IMGS. The table should have as many rows as there are CCD planes in the chip cube, and must have the following columns:
I may some time in the future add the following:
There is a corresponding F90 data type defined:
type, public :: keyInfoType integer(int8) :: ccdNum=0, nodeNum=0 character(8) :: gtiTableName='' end type keyInfoType
Row of the table refers to plane array(i,:,:) (assuming both series start at 0).
The dataset header should contain INSTRUME and DATE-OBS keywords.