7.5.2: FITS keywords for DEIMOS mosaics
This section describes a set of FITS keywords which can be used to
document the nature of every section of pixel data from a mosaicked
array of CCDs.
This description suffices for the full readout of any mosaic comprised of
non-rotated, nearly adjacent, identically-sized rectangular CCDs
including all prescan and overscan calibration data.
This description also suffices for any mosaic comprised of
identically-sized rectangular sub-raster readouts from such a mosaic.
7.5.2.1: Precedents from NOAO and IRAF
NOAO IRAF
uses a notation for describing sections of the FITS image
array. Because IRAF is so widely distributed this notation is in
extremely common usage. It also matches the array
section notation in Fortran 90.
In IRAF an image section is denoted by a character string such as
'[1:2048,1:4096]' which gives the beginning and ending pixels in each
dimension. It is presumed that the image arrays begin with the pixel
numbered 1. Use of this will greatly simplify the operations
necessary to use IRAF cl language to perform the bias calibration
procedures.
7.5.2.1.1: NOAO/IRAF image sections
NOAO IRAF uses the following image sections internally in its
CCD calibration and processing packages.
These keywords are documented in the IRAF
noao.imred.ccdred help page on
ccdgeometry.
Images which include the information described by these keywords
can be calibrated automatically.
-
DATASEC
-
Section of FITS array which consists of actual data pixels.
-
CCDSEC
-
Section of entire CCD (as currently binned) represented by DATASEC.
Note that this is expressed in CCD pixel coordinates, not in
FITS array coordinates.
-
BIASSEC
-
Section of FITS array which consists of calibration/bias data.
The values of the first two keywords are used to match the locations of
pixels in the FITS array with the locations of known pixel, row, and column
defects on the detector. NOAO data acquisition systems also insert
the following cards.
-
ORIGSEC
-
Section giving full size of detector with no windowing.
Note that this is expressed in CCD pixel coordinates, not in
FITS array coordinates.
-
CCDSUM
-
String with 2 space separated integers denoting the binning.
The actual definitions of these cards are not available, but the above
appear to be adequate for a single amplifier readout. There
are no examples of ORIGSEC in the context of multiple amplifiers on
one or more detectors, and I know of no IRAF tasks which make use of
ORIGSEC.
CCDSUM also appears to be ignored by the basic IRAF CCD
reduction tasks. This effectively means that IRAF considers a CCD
which is read in a binned mode is a different CCD than the same piece of
silicon read without binning. Binned detectors need to have different
lists of pixel defects, bias sections, and other such documentary
databases. There is no automated means for the CCD reduction tasks to
switch their behavior depending upon the binning. This chapter
contains an appendix which delves deeper into
the issues of binning.
7.5.2.1.2: Other NOAO/IRAF image calibration keywords
IRAF includes the following two keywords for documenting the photon and
shot noise characteristics of the detectors.
-
GAIN
-
number of electrons per DN from the amplifier
-
RDNOISE
-
readout noise in electrons
7.5.2.1.3: Interpretation of the NOAO/IRAF keywords
It is our interpretation that the underlying purpose of the above
keywords is to guide IRAF through the data calibration steps in task
ccdproc of package
noao.imred.ccdred.
7.5.2.2: Precedents from Lick Observatory
The Lick Observatory Data Acquisition System (DAS) denotes the section
of CCD represented in the FITS image using a subset of the
WCS keywords to indicate pixel positions. CDELTn is used
to indicate the binning factor in each direction. CRPIXn is
used to denote the first physical pixel on the CCD whose data appear
along axis n of the FITS array. At Lick Observatory image pixels have
always been numbered starting with 0 (zero) not 1 (one). The
VISTA image reduction package
originally developed at Lick relies upon and suitably rewrites these
keywords as it manipulates images.
The Lick usage of the WCS keywords is inconsistent with the draft standard.
The Lick DAS must be modified to avoid this problem.
The values of the existing keywords should be transferred
to the keywords VDELTn and VRPIXn.
7.5.2.3: FITS keywords describing DEIMOS image layout
The DEIMOS detectors contain many elements not present in the
NOAO/IRAF model. A FITS image from DEIMOS could contain
data from multiple CCDs, readout windows, and amplifiers.
The scenario might best be described by resorting to
a separate FITS table. For consistency with past practice,
and for simplicity, we prefer a scheme which uses
keyword value pairs in the image header.
We also believe that FITS keywords with multiple indices (e.g.,
PCmmmnnn) should be avoided.
We choose to place
the complexity in the values rather than in the keywords.
This conserves the rather
precious 8-character namespace of FITS keywords. It also makes
the automated parsing of keywords easier.
We propose the following new FITS keywords to handle the case of
multi-detector, multi-amplifier mosaics.
Our premise is that the primary purpose of mosaic CCD keywords should
be to guide a data reduction package through the calibration steps.
Image sections are 1-based (as in FITS and old Fortran). Except where
otherwise noted image sections are expressed in the coordinate system
of the FITS array (the overall mosaic), not in the coordinate system
of the original detector.
7.5.2.3.1: Keywords for enumeration
In the case of a multiply-windowed mosaic detector with several
amplifiers per CCD it is essential to enumerate the scenario.
-
NUMDET
-
Number of detectors used to acquire this FITS array.
Each detector is presumed to produce pixels which are
located on a precise rectangular grid.
For typical imaging frames there will be 4 detectors and for
typical spectroscopic frames there will be 8 detectors.
There may be several sections (tiles) of data from
each detector.
-
NUMTIL
-
NUMTIL is the number of tiles of image data which
were stored into the FITS array.
A tile is one of many rectangular readout windows on the
mosaic. A tile consists of a contiguous rectangular region
of pixels from a single detector (but not necessarily from
a single amplifier) stored into the FITS array.
For full-readout spectroscopic frames stored into a single
FITS array there would be 8 such tiles each consisting of
an entire CCD.
For mask alignment observations there might be as many as 16
tiles.
All pixels from one detector could be described with a
single WCS, but the structure of the WCS keywords makes
it more natural to have one WCS per tile. Therefore
NUMTIL also enumerates the WCS lists.
-
NUMAMP
-
The number of amplifiers used to obtain the image data stored
in the FITS array.
This enumerates the gain and readout noise lists.
Amplifiers which exist but did not contribute any data to the
FITS array may be listed, but their values will be
irrelevant to the data reduction operations.
-
NUMCAL
-
The number of calibration sections.
A calibration section is a portion of the FITS array data
which can (or must) be calibrated separately.
Each tile contributes one or more calibration sections.
If a tile is readout by n different
amplifiers then it contributes n to
the total number of calibration sections.
7.5.2.3.2: Keywords enumerated by NUMDET
We permit up to 99 distinct detectors.
-
DETECTn
-
A character string uniquely identifying the nth detector.
This must serve as a key into the database of detector defects.
-
DETDOMn
-
Like NOAO ORIGSEC.
A character string containing an IRAF image section that
describes the full unbinned extent of the
imaging pixels of the nth detector.
It describes the maximum possible extent of an unwindowed image
read from the given detector.
(Note that this is expressed in terms of the pixels on the
individual detector, NOT in terms of the FITS array which
contains the whole mosaic.)
This keyword describes only the size of the detector,
not its orientation. The image section should run from
pixel [1,1] to the opposite corner of the detector.
Use of this keyword in conjunction with CCDSECn,
CALSUMn, and the WCS keywords permits reconstruction
of the layout of the mosaic.
Note that we make no direct attempt to document the total number of
amplifiers present or used on a detector. The total number of
amplifiers used can be inferred from other keywords. The total
number of amplifiers present is not relevant to data reduction.
7.5.2.3.3: Keywords enumerated by NUMAMP
We permit up to 999 distinct amplifiers.
-
AMPLIn
-
A character string uniquely identifying the nth
amplifier and detector which were used to obtain these data.
This will be used as a key into a database of detector
defects. It will permit fully automated treatment for bad
columns, hot pixels, and other cosmetic defects.
Note that Lick does not currently have a document which
specifies the nomenclature for different amplifiers on
CCDs. The identify of an amplifier appears to vary
depending on the orientaion of the CCD.
-
AMDETn
-
An index into the detector array. It identifies the
detector upon which the nth amplifier resides.
-
AGAINn
-
Like IRAF GAIN. The number of electrons per DN which is expected
from amplifier n.
-
RDNOIn
-
Like IRAF RDNOISE. This indicates the readout noise in
electrons which is expected from amplifier n.
Note to De: The function of the AMPDOMn card has been
replaced by DETDOMn and AMPDETn. I can see no
reason why it is relevant to document the readout domain of an
amplifier.
7.5.2.3.4: Keywords enumerated by NUMTIL
We permit up to 999 distinct tiles.
-
TLSECn
-
The section of the FITS array containing image and calibration
data from tile n.
The array section is followed by an integer that serves
as an index into the list of detectors.
These cards make it straightforward for a data reduction
system to split a mosaicked image containing data from
separate detectors into NUMTIL separate FITS images.
A mosaic image display client will use these sections to
determine the locations of WCS boundaries.
7.5.2.3.5: Keywords enumerated by NUMCAL
We permit up to 999 distinct calibration sections.
The values for most of the following keywords are character strings
which indicate an IRAF image section of the FITS array. In addition,
those values also give the indices into the tile and amplifier to
which they belong.
Note that this implies many redundant occurrences of the
tile and amplifier information. This is probably
not a good thing.
Note to De: In the light of the above observation I have
discarded the extra complexity of values like
'[iraf section],tile,amp'.
The duplication of tile and amplifier information in
DASECn, CCSECn, and the bias sections seemed
extremely redundant.
That information has now moved into integer-valued keywords
CLTILn and CLAMPn.
-
CLSUMn
-
Like NOAO CCDSUM. A character string of space-separated
integers which document the binning use for readout of each
dimension of tile n.
When reading out a multi-amplifier mosaic it becomes necessary
to reverse the order of the pixel stream from some amplifiers
when the data are written into the FITS array. In such
cases the binning value will be negative for any reversed
directions. This serves to document the amplifier orientation
at the same time as the binning.
Making the binning into a per tile quantity opens the
possibility that different tiles from the same amplifier
might be read with different binnings. There is currently no
intention to exploit this capability with the DEIMOS
mosaic.
-
CLTILn
-
An index into the tile array. It identifies the tile of
which calibration section n is a part.
-
CLAMPn
-
An index into the amplifier array. It identifies the amplifier
used to read the data in calibration section n.
-
DASECn
-
Like IRAF DATASEC.
This indicates the array section of the FITS
image which consists of real pixels from calibration section
n.
-
CCSECn
-
Like IRAF CCDSEC.
The shape of this array section must match
that of DASECn. This indicates the array
section from the original amplifier--when read with the current
binning--which is referred to by DASECn.
(Note that this is expressed in terms of the binned pixels from
the individual amplifier, NOT in terms of the FITS array which
contains the whole mosaic.)
DASECn and CCSECn are
used to determine where any defects on the original detector
will be found in the mosaicked FITS image array.
The coordinate origin for this keyword always denotes the
pixel closest to its amplifier as the origin.
A defect list may have been generated before the CCD was
installed into the mosaic. Such a defect list will not know
about the final orientation of the amplifier in the mosaic.
For this reason the values of CCSECn will always be
positive. If the orientation of an axis is flipped from
the sense of the FITS mosaic then the extent of the image
section along that axis will be negative.
-
UBSECn
-
In the spirit of IRAF CCDSEC.
This indicates the array section of the original amplifier -- when
read with a binning of one in each direction -- which is
referred to by CCSECn.
(Note that this is expressed in terms of the pixels from
the individual detector, NOT in terms of the FITS array which
contains the whole mosaic.)
For some values of readout binning the phase of the binning
may be constrained by the detector geometry and controller.
UBSECn may be used to disambiguate the phase
of the binning in these cases.
The coordinate origin for this keyword always denotes the
pixel closest to its amplifier as the origin.
The values in UBSECn will always be positive.
If the readout direction along an axis is opposite to the
FITS array order then the extent of the image section along
that axis will be negative.
-
PCSECn
-
Array section of the FITS image which consists of prescan column
pixels for calibration section n.
-
OCSECn
-
Array section of the FITS image which consists of overscan column
pixels for calibration section n.
This is very similar to the IRAF BIASSEC.
-
PRSECn
-
Array section of the FITS image which consists of prescan row
pixels for calibration section n.
See the overlap discussion below.
-
ORSECn
-
Array section of the FITS image which consists of overscan row
pixels for calibration section n.
See the overlap discussion below.
7.5.2.3.5.1: Overlap of the overscan regions
It is not obvious whether the image sections for the
prescan and overscan rows should overlap with the sections for the
prescan and overscan columns. The confusion arises because the extra
columns are stored discontiguously with their image data. The first
few extra columns are from amplifier 1, and the next few extra columns
are from amplifier 2. Thus the prescan row information from either
amplifier consists of 2 disjoint image sections. (See the
HIRES/LRIS readout page for more details.)
Having the overlap eases the task of discarding entire sections of the
image which consist of possibly unwanted calibration data.
However, having the overlap confuses the identities of the pre- and
overscan columns from the two different amplifiers.
At present it seems best not to have the overlap. The image sections
for the prescan and overscan row data will not include any of the
prescan and overscan column data.
7.5.2.3.5.2: Pixel order of the overscan regions
The FITS array storage order of the imaging region of the
CCD may be flipped from the original CCD readout order. In this case
the flip is indicated by the values in the CLSUMn card.
If the order of the imaging region is flipped along either axis
then the calibration data must also be flipped along the same axis.
The overscan sections must always have positive extents.
7.5.2.4: A sample FITS header with mosaic section keywords
This sample FITS header is presuming 8 2kx4k CCDs mosaicked in the
manner described for DEIMOS. Each CCD is being read through 2
amplifiers. For the purposes of this example, each amplifier has 10
prescan columns (PC), 30 overscan columns (OC), 5 prescan rows (PR),
and 25 overscan rows (OR).
NAXIS = 2 / standard FITS meaning
NAXIS1 = 8512 / 4 * (2 * PC + 2048 + 2 * OC)
NAXIS2 = 8252 / 2 * (PR + 4096 + OR)
NUMDET = 8 / number of detectors contributing to this image
NUMTIL = 8 / number of readout windows
NUMAMP = 16 / number of amplifiers contributing data
NUMCAL = 16 / number of calibration operations
COMMENT DETDOMn is the unbinned size of the imaging region of the CCD.
DETECT1 = 'CCDnnnn' / unique identifier keying into defects DB
DETDOM1 = '[ 1:2048, 1:4096]' / full domain of unbinned detector 1
COMMENT ... and so on until ...
DETECT8 = 'CCDnnnn' / unique identifier keying into defects DB
DETDOM8 = '[ 1:2048, 1:4096]' / full domain of unbinned detector 8
AMPLI1 = 'A' / amplifier name and detector index
AMDET1 = 1 / detector which hosts amplifier 1
AGAIN1 = 2.8 / gain of amplifier 1 [e/DN]
RDNOI1 = 1.9 / readout noise of amplifier 1 [e]
AMPLI2 = 'B' / amplifier name and detector index
AMDET2 = 1 / detector which hosts amplifier 2
AGAIN2 = 2.8 / gain of amplifier 2 [e/DN]
RDNOI2 = 1.9 / readout noise of amplifier 2 [e]
COMMENT ... and so on until ...
AMPLI15 = 'B' / amplifier name and detector index
AMDET15 = 8 / detector which hosts amplifier 15
AGAIN15 = 2.8 / gain of amplifier 15 [e/DN]
RDNOI15 = 1.9 / readout noise of amplifier 15 [e]
AMPLI16 = 'A' / amplifier name and detector index
AMDET16 = 1 / detector which hosts amplifier 16
AGAIN16 = 2.8 / gain of amplifier 16 [e/DN]
RDNOI16 = 1.9 / readout noise of amplifier 16 [e]
COMMENT The image section for each tile is given by TILSECn
COMMENT In this case, each tile corresponds to an entire CCD with calibration.
TLSEC1 = '[ 1:2128, 1:4126]'
TLSEC2 = '[2129:4256, 1:4126]'
TLSEC3 = '[4257:6384, 1:4126]'
TLSEC4 = '[6385:8512, 1:4126]'
TLSEC5 = '[ 1:2128,4127:8252]'
TLSEC6 = '[2129:4256,4127:8252]'
TLSEC7 = '[4257:6384,4127:8252]'
TLSEC8 = '[6385:8512,4127:8252]'
CLTIL1 = 1 / tile containing calibration section 1
CLAMP1 = 1 / amplifier producing calibration section 1
CLSUM1 = ' 1 1' / readout binning and direction
DASEC1 = '[ 21:1044, 6:5001]' / section of FITS array from amp 1 of tile 1
CCSEC1 = '[ 1:1024, 1:4096]' / section of CCD represented in DASEC
PRSEC1 = '[ 21:1044, 1: 5]' / prescan rows (or '[ 1:1044, 1: 5]'?)
ORSEC1 = '[ 21:1044,4102:4126]' / overscan rows (or '[ 1:1044,4102:4126]'?)
PCSEC1 = '[ 1: 10, 1:4126]' / prescan columns for calibration section 1
OCSEC1 = '[2069:2098, 1:4126]' / overscan columns for calibration section 1
CLTIL2 = 1 / tile containing calibration section 2
CLAMP2 = 2 / amplifier producing calibration section 2
CLSUM2 = '-1 1' / readout binning and direction
DASEC2 = '[1045:2068, 6:5001]' / section of FITS array from amp 2 of tile 1
CCSEC2 = '[1024: 1, 1:4096]' / section of CCD represented in DASEC
PRSEC2 = '[1045:2068, 1: 5]' / prescan rows (or '[1045:2128, 1: 5]'?)
ORSEC2 = '[1045:2068,4102:4126]' / overscan rows (or '[1045:2128,4102:4126]'?)
PCSEC2 = '[ 11: 20, 1:4126]' / prescan columns for calibration section 2
OCSEC2 = '[2099:2128, 1:4126]' / overscan columns for calibration section 2
COMMENT ... and so on for the next fourteen calibration sections. Finally ...
CLTIL15 = 8 / tile containing calibration section 15
CLAMP15 = 15 / amplifier producing calibration section 15
CLSUM15 = ' 1 -1' / readout binning and direction
DASEC15 = '[6405:7428,4152:8247]' / section of FITS array from amp B of det 8
CCSEC15 = '[ 1:1024,4096: 1]' / section of CCD represented in DASEC
PRSEC15 = '[6405:7428,8248:8252]' / prescan rows (or '[6385:7428,8248:8252]'?)
ORSEC15 = '[6405:7428,4127:4151]' / overscan rows (or '[6385:7428,4127:4151]'?)
PCSEC15 = '[6385:6394,4127:8252]' / prescan columns for calibration section 15
OCSEC15 = '[8453:8482,4127:8252]' / overscan columns for calibration section 15
CLTIL16 = 8 / tile containing calibration section 16
CLAMP16 = 16 / amplifier producing calibration section 16
CLSUM16 = '-1 -1' / readout binning and direction
DASEC16 = '[7429:8452,4152:8247]' / section of FITS array from amp A of det 8
CCSEC16 = '[1024: 1,4096: 1]' / section of CCD represented in DASEC
PRSEC16 = '[7429:8452,8248:8252]' / prescan rows (or '[7429:8512,8248:8252]'?)
ORSEC16 = '[7429:8452,4127:4151]' / overscan rows (or '[7429:8512,4127:4151]'?)
PCSEC16 = '[6395:6404,4127:8252]' / prescan columns for calibration section 16
OCSEC16 = '[8483:8512,4127:8252]' / overscan columns for calibration section 16
COMMENT The identities of amplifiers 1 and 2 on detector 8 might be swapped
COMMENT by a handedness convention of the CCD assembly team.
The
CTIO
ARCON
detectors use a scheme similar to this.
7.5.2.5: Things which have not yet been addressed:
The above data document the science in the image adequately for
posterity. However, the data acquisition software must know the
relative orientations of the detectors in order to descramble the
image pixel streams and produce the above FITS headers. Databases and
lookup tables relating to the wiring and installation of the detectors
in the dewars will be needed. The descrambler does not need the full
floating-point WCS specifications for the layout of the 8 CCDs, but it
does need to know how they are tiled and what their handedness is.
Steve Allen <sla@ucolick.org>
$Date: 1996/04/22 $