Section 7. Wide Field/Planetary Camera 2

Observation datasets produced by the Wide Field/Planetary Camera 2 u (WFPC 2) are calibrated by the calwp2 task. This task requires a set of reference files to perform the calibration, as described in this section.

All reference files for the WFPC 2 calibration must be in GEIS format. All files must contain four groups of two-dimensional data. The groups correspond to the CCD detectors in the WFPC 2 camera in the nominal readout order. That is, group 1 contains the image from CCD PC1, group 2 contains the image from CCD WFC2, group 3 contains the image from CCD WFC3, and group 4 contains the image from CCD WFC4. The keyword DETECTOR in the group parameter block should agree with this convention. The data is of either 2-byte integer (INTEGER*2) or singleprecision real (REAL*4) data type.

Reference file headers must be copies of the headers created during generic conversion for the WFPC 2 science image (*. D0H) file. This is to ensure a common header format throughout the WFPC 2 calibration process. This header format will be known as the WFPC 2 generic header. Additional keywords (especially comment and history keywords) may be appended to the headers. However, the size of the group parameter block should not be changed.

7.1 Data Quality Files

Most WFPC 2 reference files are accompanied by a data quality file (DQF) that flags unsatisfactory pixel values. This information is propagated in the output DQF produced by calwp2. The DQFs are all of short integer (INTEGER*2) data type, have the same number of dimensions as the files associated with them, and have headers in the same format as the WFPC 2 generic header.

By convention, DQF pixel values of 0 designate good pixels. The values of the DQFs of all images used in the processing are bitwise ORed together. Generic calibration defects are flagged with the value 2. Table 7-1 shows the DQF condition codes used in routine WFPC 2 pipeline processing.

Table 7-1. WFPC 2 Data Quality Flag Values

Condition

Value

Comment

GOODPIXEL

0

Unflagged pixel

SOFTERROR

1

R-S error in data transmission

CALIBDEFECT

2

Generic problem with reference file

STATICDEFECT

4

Static defect in WFPC 2 camera

ATODSAT

8

A-to-D converter was saturated - value unknown

DATALOST

16

Missing data BADPIXEL 32 Generic bad pixel - reason not specified

OVERLAP

64

Portion of image not corrected for aberration

NOTUSED

128

Flag value not used

CTTRAPCOL

256

Column above charge transfer trap

UNFIXHOTPIX

512

Highly variable hot pixel, cannot be fixed

FIXABLEHOTPIX

1024

Moderate hot pixel (fix via warmpix task)

7.2 WFPC 2 Reference Files

WFPC 2 reference files are composed of a FITS header file and a binary data file. Although the header files do follow the FITS conventions, the header listings in this section do not adhere precisely to these conventions.

In the header listings contained in this section, beware of the following:

The single quotes required around character strings have been omitted.

Numerical values have not been right justified.

The third column in the listing denoting the variable type is additional information, not part of the FITS header itself.

All WFPC 2 reference files have image headers that contain the same keywords as shown in the following header listing. For the descriptions of the individual reference files only a partial header listing is given to show which keywords are essential and are likely to change from one reference file to another.

The following reference files are used for calibrating WFPC 2 observations:

Static Mask: Formerly known as the data quality mask, this file flags those pixels that always contain degraded values (e.g., blocked columns, hot pixels). This mask is routinely incorporated into the DQF generated in the RSDP pipeline by calwp2 (the .C1H file).

A-to-D Lookup Tables: These files are used to correct the image data for a pattern introduced by the analog-to-digital converter electronics. This correction replaces the short integer pixel values obtained from the WFPC 2 with floating-point values that remove the systematic degradation introduced by this hardware problem.

Bias Reference File and DQF: These files are subtracted from the image to remove the structure in the electronic bias.

Dark Reference File and DQF: The WFPC 2 CCDs generate a spurious signal during exposures known as dark current. This signal is a function of the time since the last erase command and the operating temperature of the CCD detectors and varies from pixel to pixel. The dark reference file is scaled by the time since the last erase command and subtracted from the image.

Flat Field Reference File and DQF: Variations in sensitivity between pixels in the CCD detectors are corrected by applying a flat field reference file. This file contains the normalized inverse sensitivity (gain) for each pixel in the detector. It is made from internal exposures in conjunction with streaked earth flats. The image is multiplied by the flat field file after correction for additive effects (i.e., bias and dark).

Shutter Shading Reference File: When a WFPC 2 exposure is relatively short, shutter shading (resulting from the finite time of flight of the shutter blade) gives rise to uneven illumination across the field of view. This is corrected by means of an additive correction that varies spatially according to the shutter shading reference file, which is scaled for the appropriate exposure time.

7.2.1 Generic Image Header: All WFPC 2 Reference Files

The following listing shows a standard header used by all WFPC 2 reference files.

   Instrument: WIDEFIELD PLANETARY CAMERA II                  Revised: 20-AUG-93 File Type:  SCIENCE DATA HEADER

   SIMPLE  = F                  data conforms to the fits standard                    L1
   BITPIX  = 16                 bits per data value                                   I2
   DATATYPE= INTEGER*2          datatype of the group array                           C10
   NAXIS   = 2                  number of data axes                                   I2
   NAXIS1  =                    length of 1st data axis                               I2
   NAXIS2  =                    length of 2nd data axis                               I2
   GROUPS  = T                  data has groups                                       L1
    GCOUNT  = 1                  number of groups per observation (1-4)                I2
   PCOUNT  = 38                 number of parameters                                  I2
   PSIZE   = 1760               bits in each parameter block                          I2

                               / GROUP PARAMETERS: OSS
   PTYPE1  = CRVAL1             right ascension of reference pixel (deg)              C08
   PDTYPE1 = REAL*8                                                                   C18
   PSIZE1  = 64                                                                       I2
   PTYPE2  = CRVAL2             declination of reference pixel (deg)                  C08
   PDTYPE2 = REAL*8                                                                   C18
   PSIZE2  = 64                                                                       I2
   PTYPE3  = CRPIX1             x-coordinate of reference pixel                       C08
   PDTYPE3 = REAL*4                                                                   C18
   PSIZE3  = 32                                                                       I2
   PTYPE4  = CRPIX2             y-coordinate of reference pixel                       C08
   PDTYPE4 = REAL*4                                                                   C18
   PSIZE4  = 32                                                                       I2
   PTYPE5  = CD1_1              partial of the right ascension w.r.t. x               C08
   PDTYPE5 = REAL*4                                                                   C18
   PSIZE5  = 32                                                                       I2
   PTYPE6  = CD1_2              partial of the right ascension w.r.t. y               C08
   PDTYPE6 = REAL*4                                                                   C18
   PSIZE6  = 32                                                                       I2
   PTYPE7  = CD2_1              partial of the declination w.r.t. x                   C08
   PDTYPE7 = REAL*4                                                                   C18
   PSIZE7  = 32                                                                       I2
   PTYPE8  = CD2_2              partial of the declination w.r.t. y                   C08
   PDTYPE8 = REAL*4                                                                   C18
   PSIZE8  = 32                                                                       I2
   PTYPE9  = DATAMIN            minimum value of the data                             C08
   PDTYPE9 = REAL*4                                                                   C18
   PSIZE9  = 32                                                                       I2
   PTYPE10 = DATAMAX            maximum value of the data                             C08
   PDTYPE10= REAL*4                                                                   C18
   PSIZE10 = 32                                                                       I2
   PTYPE11 = MIR_REVR           is the image mirror reversed?                         C08
   PDTYPE11= LOGICAL*4                                                                C18
   PSIZE11 = 32                                                                       I2
   PTYPE12 = ORIENTAT           orientation of the image (deg)                        C08
   PDTYPE12= REAL*4                                                                   C18
   PSIZE12 = 32                                                                       I2
   PTYPE13 = FILLCNT            number of segments containing fill                    C08
   PDTYPE13= INTEGER*4                                                                C18
   PSIZE13 = 32                                                                       I2
   PTYPE14 = ERRCNT             number of segments containing errors                  C08
   PDTYPE14= INTEGER*4                                                                C18
   PSIZE14 = 32                                                                       I2
   PTYPE15 = FPKTTIME           time of the first packet                              C08
   PDTYPE15= REAL*8             (Modified Julian Date)                                C18
   PSIZE15 = 64                                                                       I2
   PTYPE16 = LPKTTIME           time of the last packet                               C08
   PDTYPE16= REAL*8             (Modified Julian Date)                                C18
   PSIZE16 = 64                                                                       I2
   PTYPE17 = CTYPE1             first coordinate type                                 C08
   PDTYPE17= CHARACTER*8                                                              C18
   PSIZE17 = 64                                                                       I2
   PTYPE18 = CTYPE2             second coordinate type                                C08
   PDTYPE18= CHARACTER*8                                                              C18
   PSIZE18 = 64                                                                       I2
   PTYPE19 = DETECTOR           CCD detector: PC 1, WFC 2-4                           C08
   PDTYPE19= INTEGER*4                                                                C18
   PSIZE19 = 32                                                                       I2

                               / GROUP PARAMETERS: PODPS
   PTYPE20 = DEZERO             mean bias level from EED extended register            C08
   PDTYPE20= REAL*4                                                                   C18
   PSIZE20 = 32                                                                       I2
   PTYPE21 = BIASEVEN           bias level for even-numbered columns                  C08
   PDTYPE21= REAL*4                                                                   C18
   PSIZE21 = 32                                                                       I2
   PTYPE22 = BIASODD            bias level for odd-numbered columns                   C08
   PDTYPE22= REAL*4                                                                   C18
   PSIZE22 = 32                                                                       I2
   PTYPE23 = GOODMIN            minimum value of the "good" pixels                    C08
   PDTYPE23= REAL*4                                                                   C18
   PSIZE23 = 32                                                                       I2
   PTYPE24 = GOODMAX            maximum value of the "good" pixels                    C08
   PDTYPE24= REAL*4                                                                   C18
   PSIZE24 = 32                                                                       I2
   PTYPE25 = DATAMEAN           mean value of the "good" pixels                       C08
   PDTYPE25= REAL*4                                                                   C18
   PSIZE25 = 32                                                                       I2

                               / GROUP PARAMETERS: DATA QUALITY FILE SUMMARY
   PTYPE26 = GPIXELS            number of "good" pixels               (DQF=0)         C08
   PDTYPE26= INTEGER*4                                                                C18
   PSIZE26 = 32                                                                       I2
   PTYPE27 = SOFTERRS           number of "soft error" pixels         (DQF=1)         C08
   PDTYPE27= INTEGER*4                                                                C18
   PSIZE27 = 32                                                                       I2
   PTYPE28 = CALIBDEF           number of "calibration defect" pixels (DQF=2)         C08
   PDTYPE28= INTEGER*4                                                                C18
   PSIZE28 = 32                                                                       I2
   PTYPE29 = STATICD            number of "static defect" pixels      (DQF=4)         C08
   PDTYPE29= INTEGER*4                                                                C18
   PSIZE29 = 32                                                                       I2
   PTYPE30 = ATODSAT            number of "A to D saturated" pixels   (DQF=8)         C08
   PDTYPE30= INTEGER*4                                                                C18
   PSIZE30 = 32                                                                       I2
   PTYPE31 = DATALOST           number of "data lost" pixels          (DQF=16)        C08
   PDTYPE31= INTEGER*4                                                                C18
   PSIZE31 = 32                                                                       I2
   PTYPE32 = BADPIXEL           number of "generic bad" pixels        (DQF=32)        C08
   PDTYPE32= INTEGER*4                                                                C18
   PSIZE32 = 32                                                                       I2
   PTYPE33 = OVERLAP            number of "image overlap" pixels      (DQF=64)        C08
   PDTYPE33= INTEGER*4                                                                C18
   PSIZE33 = 32                                                                       I2

                              / GROUP PARAMETERS: PHOTOMETRY
   PTYPE34 = PHOTMODE           photometry mode                                       C08
   PDTYPE34= CHARACTER*48                                                             C18
   PSIZE34 = 384                                                                      I2
   PTYPE35 = PHOTFLAM           inverse sensitivity                                   C08
   PDTYPE35= REAL*4                                                                   C18
   PSIZE35 = 32                                                                       I2
   PTYPE36 = PHOTZPT            zero point                                            C08
   PDTYPE36= REAL*4                                                                   C18
   PSIZE36 = 32                                                                       I2
   PTYPE37 = PHOTPLAM           pivot wavelength                                      C08
   PDTYPE37= REAL*4                                                                   C18
   PSIZE37 = 32                                                                       I2
   PTYPE38 = PHOTBW             RMS bandwidth of the filter                           C08
   PDTYPE38= REAL*4                                                                   C18
   PSIZE38 = 32                                                                       I2

                               / WFPC-II DATA DESCRIPTOR KEYWORDS
   INSTRUME= WFPC2              instrument in use                                     C06
   ROOTNAME=                    rootname of the observation set                       C12
   FILETYPE= SCI                shp, ext, edq, sdq, sci                               C03

                               / SCIENCE INSTRUMENT CONFIGURATION
   MODE    =                    instr. mode: FULL (full res.), AREA (area int.)       C04
   SERIALS =                    serial clocks: ON, OFF                                C03

                               / IMAGE TYPE CHARACTERISTICS
   IMAGETYP= EXT                DARK/BIAS/IFLAT/UFLAT/VFLAT/KSPOT/EXT/ECAL            C18
   CDBSFILE= NO                 GENERIC/BIAS/DARK/FLAT/MASK/ATOD/SHAD/NO              C18
   PKTFMT  =                    packet format code                                    I4
   DATE    =                    date file written (dd/mm/yy)                          C08

                               / FILTER CONFIGURATION
   FILTNAM1=                    first filter name                                     C08
   FILTNAM2=                    second filter name                                    C08
   FILTER1 =                    first filter number (0-48)                            I2
   FILTER2 =                    second filter number (0-48)                           I2
   FILTROT =                    partial filter rotation angle (degrees)               R4
   LRFWAVE =                    linear ramp filter wavelength                         R4

                               / INSTRUMENT STATUS USED IN DATA PROCESSING
   UCH1CJTM=                    TEC cold junction #1 temperature (Celsius)            R4
   UCH2CJTM=                    TEC cold junction #2 temperature (Celsius)            R4
   UCH3CJTM=                    TEC cold junction #3 temperature (Celsius)            R4
   UCH4CJTM=                    TEC cold junction #4 temperature (Celsius)            R4
   UBAY3TMP=                    Bay 3 A1 temperature (deg C)                          R4
   KSPOTS  =                    status of Kelsall spot lamps: ON, OFF                 C03
   SHUTTER =                    shutter in place during IFLAT (A or B)                C01
   ATODGAIN=                    analog to digital gain (Electrons/DN)                 R4

                               / RSDP CONTROL KEYWORDS
   MASKCORR= PERFORM            do mask correction: PERFORM, OMIT, COMPLETE           C08
   ATODCORR=                    do A-to-D correction: PERFORM, OMIT, COMPLETE         C08
   BLEVCORR=                    do bias level correction: PERFORM, OMIT, COMPLET      C08
   BIASCORR=                    do bias correction: PERFORM, OMIT, COMPLETE           C08
   DARKCORR=                    do dark correction: PERFORM, OMIT, COMPLETE           C08
   FLATCORR=                    do flat field correction: PERFORM, OMIT, COMPLETE     C08
   SHADCORR=                    do shaded shutter correction: PERFORM, OMIT, COMPLETE C08
   DOSATMAP= OMIT               output saturated pixel map: PERFORM, OMIT, COMPLETE   C08
   DOPHOTOM=                    fill photometry keywords: PERFORM, OMIT, COMPLETE     C08
   DOHISTOS= OMIT               make histograms: PERFORM, OMIT, COMPLETE              C08
   OUTDTYPE= REAL               output image datatype: REAL, LONG, SHORT              C06

                                / CALIBRATION REFERENCE FILES
   MASKFILE=                    name of the input DQF of known bad pixels             C18
ATODFILE=                    name of the A-to-D conversion file                    C18
   BLEVFILE=                    engineering file with extended register data          C18
   BLEVDFIL=                    engineering file DQF                                  C18
   BIASFILE=                    name of the bias frame reference file                 C18
   BIASDFIL=                    name of the bias frame reference DQF                  C18
   DARKFILE=                    name of the dark reference file                       C18
   DARKDFIL=                    name of the dark reference DQF                        C18
   FLATFILE=                    name of the flat field reference file                 C18
   FLATDFIL=                    name of the flat field reference DQF                  C18
   SHADFILE=                    name of the reference file for shutter shading        C18
   PHOTTAB =                    name of the photometry calibration table              C18
   GRAPHTAB=                    the HST graph table                                   C18
   COMPTAB =                    the HST components table                              C18

                               / DEFAULT KEYWORDS SET BY STSCI
   SATURATE= 4095               data value at which saturation occurs                 I2
   USCALE  = 1.0                scale factor for output image                         R4
   UZERO   = 0.0                zero point for output image                           R4

                               / READOUT DURATION INFORMATION
   READTIME=                    Length of time for CCD readout in clock ticks         I4

                               / PLANETARY SCIENCE KEYWORDS
   PA_V3   = 0.0                position angle of v3 axis of HST                      R4
   RA_SUN  = 0.0                right ascension of the sun (deg)                      R8
   DEC_SUN = 0.0                declination of the sun (deg)                          R8
   EQNX_SUN= 2000.0             equinox of the sun                                    R4
   MTFLAG  = F                  moving target flag                                    L1
   EQRADTRG= 0.0                equatorial radius of target                           R4
   FLATNTRG= 0.0                flattening of target                                  R4
   NPDECTRG= 0.0                north pole declination of target                      R4
   NPRATRG = 0.0                north pole right ascension of target                  R4
   ROTRTTRG= 0.0                rotation rate of target                               R4
   LONGPMER= 0.0                longitude of prime meridian                           R4
   EPLONGPM= 0.0                epoch of longitude of prime meridian                  R4
   SURFLATD= 0.0                surface feature latitude                              R4
   SURFLONG= 0.0                surface feature longitude                             R4
   SURFALTD= 0.0                surface feature altitude                              R4

                               / PODPS FILL VALUES
   PODPSFF =                    0=(no PODPS fill), 1=(PODPS fill present)             I2
   STDCFFF =                    0=(no ST DCF fill), 1=(ST DCF fill present)           I2
   STDCFFP =                    ST DCF fill pattern (hex)                             C04
   RSDPFILL= -100               bad data fill value for calibrated images             I2

                               / EXPOSURE TIME AND RELATED INFORMATION
   UEXPODUR=                    commanded duration of exposure (seconds)              I4
   NSHUTA17=                    number of AP17 shutter B closes                       I4
   DARKTIME=                    dark time (seconds)                                   R4
   UEXPOTIM=                    major frame pulse time preceding exposure start       I4
   PSTRTIME=                    predicted obs. start time (yyyy:ddd:hh:mm:ss)         C18
   PSTPTIME=                    predicted obs. stop  time (yyyy:ddd:hh:mm:ss)         C18

                               / EXPOSURE INFORMATION
   EQUINOX = J2000              equinox of the celestial coordinate system            C08
   SUNANGLE=                    angle between sun and V1 axis (deg)                   R4
   MOONANGL=                    angle between moon and V1 axis (deg)                  R4
   SUN_ALT =                    altitude of the sun above Earth's limb (deg)          R4
   FGSLOCK =                    commanded FGS lock (FINE,COARSE,GYROS,UNKNOWN)        C07

   DATE-OBS=                    UT date of start of observation (dd/mm/yy)            C08
TIME-OBS=                    UT time of start of observation (hh:mm:ss)            C08
   EXPSTART=                    exposure start time (Modified Julian Date)            R8
   EXPEND  =                    exposure end time (Modified Julian Date)              R8
   EXPTIME =                    exposure duration (seconds)--calculated               R4
   EXPFLAG =                    exposure interruption indicator                       C13

                               / TARGET & PROPOSAL ID
   TARGNAME=                    proposer's target name                                C30
   RA_TARG =                    right ascension of the target (deg) (J2000)           R8
   DEC_TARG=                    declination of the target (deg) (J2000)               R8

   PROPOSID=                    PEP proposal identifier                               I4
   PEP_EXPO=                    PEP exposure identifier including sequence            C15
   LINENUM =                    PEP proposal line number                              C15
   SEQLINE =                    PEP line number of defined sequence                   C15
   SEQNAME =                    PEP define/use sequence name                          C15

   END

7.2.2 Static Bad Pixel Mask Files (MSK): <uniquename>.R0H

The static mask files (formerly known as the data quality masks) contain flags for those pixels that always contain degraded values. This mask is routinely incorporated into the data quality file generated in the RSDP pipeline by calwp2.

Format: The static mask file is a short integer (INTEGER*2) image file of four groups with the same dimensions as the WFPC 2 science image. The image contains values of 0 in all pixels, except for those with known static defects. Defective pixels are flagged with the value 4.

Flags and Indicators: The flag and indicator used to select the static mask reference files is MODE (which can be either AREA or FULL).

Restrictions: The static mask reference file is not accompanied by a data quality file. The header of the static mask image is a copy of the WFPC 2 science data header.

The following listing shows a sample WFPC 2 static mask reference file.

BITPIX  = 16                / bits per data value                                   I2
DATATYPE= INTEGER*2         / data type of the array                               C10

PTYPE9  = DATAMIN           / minimum value of the data                            C08
PDTYPE9 = REAL*4                                                                   C18
PSIZE9  = 32                                                                        I2

PTYPE10 = DATAMAX           / maximum value of the data                            C08
PDTYPE10= REAL*4                                                                   C18
PSIZE10 = 32                                                                        I2

PTYPE19 = DETECTOR          / CCD detector: PC 1, WFC 2-4                           C08
PDTYPE19= INTEGER*4                                                                C18
PSIZE19 = 32                                                                        I2

PTYPE23 = GOODMIN           / minimum value of the "good" pixels                   C08
PDTYPE23= REAL*4                                                                   C18
PSIZE23 = 32                                                                       I2

PTYPE24 = GOODMAX           / maximum value of the "good" pixels                   C08
PDTYPE24= REAL*4                                                                   C18
PSIZE24 = 32                                                                        I2

PTYPE25 = DATAMEAN          / mean value of the "good" pixels                      C08
PDTYPE25= REAL*4                                                                   C18
PSIZE25 = 32                                                                        I2

PTYPE26 = GPIXELS           / number of "good" pixels              (DQF=0)         C08
PDTYPE26= INTEGER*4                                                                C18
PSIZE26 = 32                                                                       I2

PTYPE28 = CALIBDEF          / number of "calibration defect" pixels (DQF=2)        C08
PDTYPE28= INTEGER*4                                                                C18
PSIZE28 = 32                                                                        I2
PTYPE29 = STATICD           / number of "static defect" pixels      (DQF=4)        C08
PDTYPE29= INTEGER*4                                                                C18
PSIZE29 = 32                                                                        I2

INSTRUME= WFII              / instrument in use                                    C04
ROOTNAME=                   / rootname of the observation set                      C12
FILETYPE= MSK               / file type: msk, bas, drk, flt                        C03

MODE    =                   / instr. mode: FULL (full res.), AREA (area int.)      C04
SERIALS =                   / serial clocks: ON, OFF                               C03

IMAGETYP= SPECIAL           / image type: EXT/BIAS/DARK/IFLAT/UFLAT/VFLAT/ECAL     C18
CDBSFILE= MASK              / CDBS: YES/NO/BIAS/DARK/FLAT/MASK/ATOD/SHAD           C18

DATE    =                   / date file written (dd/mm/yy)                         C08
FILTNAM1=                   / first filter name                                    C08
FILTNAM2=                   / second filter name                                   C08
FILTER1 =                   / first filter number (0-48)                           I2
FILTER2 =                   / second filter number (0-48)                          I2

SHUTTER =                   / shutter in place during IFLAT (A or B)               C01
ATODGAIN=                   / analog to digital gain (Electrons/DN)                R4

EXPTIME =                   / exposure duration (seconds) -- calculate             R4
TARGNAME=                   / target name                                          C30    END                                                       [Listing Version 01  09-JUL-1992]

7.2.3 A-to-D Lookup Table Files (A2D): <uniquename>.R1H

The A-to-D lookup table files are used to correct the image data for a pattern introduced by the analog-to-digital converter electronics. This is done by replacing the short integer pixel values obtained from the WFPC 2 with floating-point values that remove the systematic degradation introduced by this hardware problem.

Format: The A-to-D lookup table file is a single-precision (REAL*4) image file with a line length (NAXIS1) of 4096 and multiple lines. The first line contains a value of -1 in pixel 1 and the Bay 3 temperature (in degrees Kelvin) for each A-to-D lookup table in subsequent pixels.

The index of these pixels must correspond to the line containing that lookup table. The remainder of the first line is filled with -1 values.

Flags and Indicators: The flag and indicator used to select the A-to-D reference files is ATODGAIN.

Restrictions: The A-to-D lookup table is not accompanied by a data quality file. The header of the A-to-D lookup table image is a copy of the WFPC 2 science data header. The file must have four groups (one for each detector).

The following listing shows a partial image header for an A-to-D lookup table.

BITPIX  = 16                / bits per data value                                   I2
   DATATYPE= INTEGER*2         / data type of the array                               C10

   PTYPE10 = DATAMIN           / minimum value of the data                            C08
   PDTYPE10= REAL*4                                                                   C18
   PSIZE10 = 32                                                                        I2

   PTYPE11 = DATAMAX           / maximum value of the data                            C08
   PDTYPE11= REAL*4                                                                   C18
   PSIZE11 = 32                                                                       I2



   PTYPE21 = DETECTOR          / CCD detector: PC 1, WFC 2-4                          C08
   PDTYPE21= INTEGER*4                                                                C18
   PSIZE21 = 32                                                                        I2

   PTYPE23 = GOODMIN           / minimum value of the "good" pixels                   C08
   PDTYPE23= REAL*4                                                                   C18
   PSIZE23 = 32                                                                        I2

   PTYPE24 = GOODMAX           / maximum value of the "good" pixels                   C08
   PDTYPE24= REAL*4                                                                   C18
   PSIZE24 = 32                                                                        I2

   PTYPE25 = DATAMEAN          / mean value of the "good" pixels                      C08    PDTYPE25= REAL*4                                                                   C18    PSIZE25 = 32                                                                        I2

   PTYPE26 = GPIXELS           / number of "good" pixels              (DQF=0)         C08
   PDTYPE26= INTEGER*4                                                                C18
   PSIZE26 = 32                                                                       I2
   PTYPE28 = CALIBDEF          / number of "calibration defect" pixels (DQF=2)        C08
   PDTYPE28= INTEGER*4                                                                C18    PSIZE28 = 32                                                                       I2    PTYPE29 = STATICD           / number of "static defect" pixels      (DQF=4)        C08
   PDTYPE29= INTEGER*4                                                                C18
   PSIZE29 = 32                                                                        I2

   INSTRUME= WFPC2             / instrument in use                                    C06    ROOTNAME=                   / rootname of the observation set                      C12
   FILETYPE= A2D               / file type: msk, a2d, bas, drk, flt, shd              C03

   MODE    =                   / instr. mode: FULL (full res.), AREA (area int.)      C04
   SERIALS =                   / serial clocks: ON, OFF                               C03

   IMAGETYP= SPECIAL           / image type: EXT/BIAS/DARK.IFLAT/UFLAT/VFLAT/ECAL     C18
   CDBSFILE= ATOD              / CDBS: YES/NO/BIAS/DARK/FLAT/MASK/ATOD/SHAD           C18

   DATE    =                   / date file written (dd/mm/yy)                         C08
   FILTNAM1=                   / first filter name                                    C08
   FILTNAM2=                   / second filter name                                   C08
   FILTER1 =                   / first filter number (0-48)                            I2
   FILTER2 =                   / second filter number (0-48)                           I2

   SHUTTER =                   / shutter in place during IFLAT: ( A or B)             C01
   ATODGAIN=                   / analog to digital gain (Electrons/DN)                 R4

   EXPTIME =                   / exposure time (seconds)                               R4
   TARGNAME=                   / target name                                           C30
   END
                                                     [Listing Version 01  24-MAY-1990]

7.2.4 Bias Files (BAS): <uniquename>.R2H

The structure in the electronic bias is removed by subtracting the bias reference file (with its accompanying data quality file).

Format: The bias reference file and its associated data quality file are REAL*4 image files with the same number of dimensions as the WFPC 2 science image. It is made from the average of a large number of bias readouts. The bias level removal correction must be done before averaging these files. This file therefore contains only the pattern superimposed upon the DC bias level.

Flags and Indicators: The flags and indicators used to select the bias reference files are MODE (which can take a value of either AREA or FULL) and ATODGAIN (which can take a value of either 7.0 or 15.0).

Restrictions: The bias reference file must be accompanied by a data quality file. The header of the bias image is a copy of the WFPC 2 science data header.

The following partial image header shows keywords used in the bias reference file.

BITPIX  = 16                / bits per data value                                   I2
DATATYPE= INTEGER*2         / data type of the array                               C10

PTYPE9  = DATAMIN           / minimum value of the data                            C08
PDTYPE9 = REAL*4                                                                   C18
PSIZE9  = 32                                                                        I2

PTYPE10 = DATAMAX           / maximum value of the data                            C08
PDTYPE10= REAL*4                                                                   C18
PSIZE10 = 32                                                                        I2

PTYPE19 = DETECTOR          / CCD detector: PC 1, WFC 2-4                          C08
PDTYPE19= INTEGER*4                                                                C18
PSIZE19 = 32                                                                        I2

PTYPE23 = GOODMIN           / minimum value of the "good" pixels                   C08
PDTYPE23= REAL*4                                                                   C18
PSIZE23 = 32                                                                        I2

PTYPE24 = GOODMAX           / maximum value of the "good" pixels                   C08
PDTYPE24= REAL*4                                                                   C18
PSIZE24 = 32                                                                        I2

PTYPE25 = DATAMEAN          / mean value of the "good" pixels                      C08
PDTYPE25= REAL*4                                                                   C18
PSIZE25 = 32                                                                       I2

PTYPE26 = GPIXELS           / number of "good" pixels               (DQF=0)        C08
PDTYPE26= INTEGER*4                                                                C18
PSIZE26 = 32                                                                        I2

PTYPE28 = CALIBDEF          / number of "calibration defect" pixels (DQF=2)        C08
PDTYPE28= INTEGER*4                                                                C18
PSIZE28 = 32                                                                        I2

PTYPE29 = STATICD           / number of "static defect" pixels      (DQF=4)        C08
PDTYPE29= INTEGER*4                                                                C18
PSIZE29 = 32                                                                        I2
INSTRUME= WFPC2             / instrument in use                                    C06
ROOTNAME=                   / rootname of the observation set                      C12
FILETYPE= BAS               / file type: msk, a2d, bas, drk, flt, shd              C03

MODE    =                   / instr. mode: FULL (full res.), AREA (area int.)      C04
SERIALS =                   / serial clocks: ON, OFF                               C03

IMAGETYP= SPECIAL           / image type: EXT/BIAS/DARK/IFLAT/UFLAT/VFLAT/ECAL     C18
CDBSFILE= BIAS              / CDBS: YES/NO/BIAS/DARK/FLAT/MASK                     C18

DATE    =                   / date file written (dd/mm/yy)                         C08
FILTNAM1=                   / first filter name                                    C08
FILTNAM2=                   / second filter name                                   C08

FILTER1 =                   / first filter number (0-48)                            I2
FILTER2 =                   / second filter number (0-48)                           I2

SHUTTER =                   / shutter in place during IFLAT (A or B)               C01
ATODGAIN=                   / analog to digital gain (Electrons/DN)                 R4

EXPTIME =                   / exposure duration (seconds) -- calculated             R4
TARGNAME=                   / target name                                          C30
END
                                            [Listing Version 01  09-JUL-1992]

7.2.5 Dark Files (DRK): <uniquename>.R3H

The WFPC 2 dark reference file and its associated data quality file are used to correct the dark current. The WFPC 2 CCDs generate a spurious signal during exposures know n as dark current. This signal is a function of the time since the last erase command and the operating temperature of the CCD detectors and varies from pixel to pixel. The dark reference file is scaled by the time since the last erase command and subtracted from the image.

Format: The dark reference file is a single-precision (REAL*4) image file with the same number of dimensions as the WFPC 2 science image. It is made from the average of a large number of dark images. The bias level removal and bias image subtraction corrections must be done to these files prior to averaging. Ideally, the CCD detectors should not have been saturated by sources for several hours prior to the acquisition of the dark images used to make this reference file. The dark reference file must be scaled to the equivalent of a 1-second exposure.

Flags and Indicators: The flags and indicators used to select the dark reference files are MODE (which can be either AREA or FULL), SERIALS (which can be either ON or OFF), and ATODGAIN (which can be either 7.0 or 15.0).

Restrictions: The dark reference file must be accompanied by a data quality file. The header of the dark reference file is a copy of the WFPC 2 science data header.

The following listing shows a partial image header for a sample dark reference file.

BITPIX  = 16                / bits per data value                                   I2
DATATYPE= INTEGER*2         / data type of the array                               C10
PTYPE9  = DATAMIN           / minimum value of the data                            C08
PDTYPE9 = REAL*4                                                                   C18
PSIZE9  = 32                                                                        I2

PTYPE10 = DATAMAX           / maximum value of the data                            C08
PDTYPE10= REAL*4                                                                   C18
PSIZE10 = 32                                                                       I2

PTYPE19 = DETECTOR          / CCD detector: PC 1, WFC 2-4                          C08
PDTYPE19= INTEGER*4                                                                C18
PSIZE19 = 32                                                                        I2

PTYPE23 = GOODMIN           / minimum value of the "good" pixels                   C08
PDTYPE23= REAL*4                                                                   C18
PSIZE23 = 32                                                                        I2
PTYPE24 = GOODMAX           / maximum value of the "good" pixels                   C08
PDTYPE24= REAL*4                                                                   C18
PSIZE24 = 32                                                                        I2

PTYPE25 = DATAMEAN          / mean value of the "good" pixels                      C08
PDTYPE25= REAL*4                                                                   C18
PSIZE25 = 32                                                                        I2

PTYPE26 = GPIXELS           / number of "good" pixels               (DQF=0)        C08
PDTYPE26= INTEGER*4                                                                C18
PSIZE26 = 32                                                                        I2

PTYPE28 = CALIBDEF          / number of "calibration defect" pixels (DQF=2)        C08
PDTYPE28= INTEGER*4                                                                C18
PSIZE28 = 32                                                                        I2

PTYPE29 = STATICD           / number of "static defect" pixels      (DQF=4)        C08
PDTYPE29= INTEGER*4                                                                C18
PSIZE29 = 32                                                                        I2

INSTRUME= WFPC2             / instrument in use                                    C06
ROOTNAME=                   / rootname of the observation set                      C12
FILETYPE= DRK               / file type: msk, a2d, bas, drk, flt, shd              C03

MODE    =                   / instr. mode: FULL (full res.), AREA (area int.)      C04
SERIALS =                   / serial clocks: ON, OFF                               C03

IMAGETYP= SPECIAL           / image type: EXT/BIAS/DARK/IFLAT/UFLAT/VFLAT/ECAL     C18
CDBSFILE= DARK              / CDBS: YES/NO/BIAS/DARK/FLAT/MASK/ATOD/SHAD           C18

DATE    =                   / date file written (dd/mm/yy)                         C08
FILTNAM1=                   / first filter name                                    C08
FILTNAM2=                   / second filter name                                   C08
FILTER1 =                   / first filter number (0-48)                            I2
FILTER2 =                   / second filter number (0-48)                           I2

SHUTTER =                   / shutter in place during IFLAT (A or B)               C01
ATODGAIN=                   / analog to digital gain (Electrons/DN)                 R4

EXPTIME =                   / exposure duration (seconds) -- calculated             R4
TARGNAME=                   / target name                                           C30
END
                                            Listing Version 01  09-JUL-1992]

7.2.6 Flat Field Reference Files (FLT): < uniquename>.R4H

The variations in sensitivity between pixels in the CCD detectors are corrected by applying a flat field reference file. This file contains the normalized inverse sensitivity (gain) for each pixel in the detector. It is made from internal flat lamp exposures, the combination of streaked earth flats or processed observations of astronomical sources. The image is multiplied by the flat field file after correcting for bias and dark.

The flat field reference file is a single-precision (REAL*4) image file with the same number of dimensions as the WFPC 2 science image. The bias level removal and bias image subtraction corrections must be done to these files. The dark correction is not usually relevant to the short, bright flat field exposures (but may be in some cases). The flat fields must be normalized to 1.0 and inverted (1/x) to allow the correction process to use multiplication. Normalization should be based on all pixels not flagged in the flat field file’s data quality file in all four detectors (groups). It is important that the range of values in the flat field files have reasonable limits. Pixels that fall outside the acceptable range of sensitivity, or which are located in dead regions, should be set to 1 in the flat field file and flagged in the data quality file.

Flags and Indicators: The flags and indicators used to select the flat field reference files are MODE (the mode can be either AREA or FULL), FILTNAM1, and FILTNAM2. There are 71 filter elements; in addition, some filter elements can be used in combination with others. The variety of modes plus the time-dependencies of some of the flat fields requires that several hundred WFPC 2 flat fields reside in CDBS.

Restrictions: The flat field reference file must be accompanied by a data quality file. The header of the flat field reference file is a copy of the WFPC 2 science data header.

The following listing shows a partial image header from a sample flat field reference file.

BITPIX  = 16                / bits per data value                                   I2
DATATYPE= INTEGER*2         / data type of the array                               C10

PTYPE9  = DATAMIN           / minimum value of the data                            C08
PDTYPE9 = REAL*4                                                                   C18
PSIZE9  = 32                                                                        I2

PTYPE10 = DATAMAX           / maximum value of the data                            C08
PDTYPE10= REAL*4                                                                   C18
PSIZE10 = 32                                                                        I2

PTYPE19 = DETECTOR          / CCD detector: PC 1, WFC 2-4                          C08
PDTYPE19= INTEGER*4                                                                C18
PSIZE19 = 32                                                                        I2

PTYPE23 = GOODMIN           / minimum value of the "good" pixels                   C08
PDTYPE23= REAL*4                                                                   C18
PSIZE23 = 32                                                                        I2

PTYPE24 = GOODMAX           / maximum value of the "good" pixels                   C08
PDTYPE24= REAL*4                                                                   C18
PSIZE24 = 32                                                                        I2

PTYPE25 = DATAMEAN          / mean value of the "good" pixels                      C08
PDTYPE25= REAL*4                                                                   C18
PSIZE25 = 32                                                                        I2

PTYPE26 = GPIXELS           / number of "good" pixels  (DQF=0)                     C08
PDTYPE26= INTEGER*4                                                                C18
PSIZE26 = 32                                                                        I2

PTYPE28 = CALIBDEF    / number of "calibration defect" pixels (DQF=2)              C08
PDTYPE28= INTEGER*4                                                                C18
PSIZE28 = 32                                                                        I2

PTYPE29 = STATICD           / number of "static defect" pixels      (DQF=4)        C08
PDTYPE29= INTEGER*4                                                                C18
PSIZE29 = 32                                                                        I2

INSTRUME= WFPC2             / instrument in use                                    C06
ROOTNAME=                   / rootname of the observation set                      C12
FILETYPE= FLT               / file type: msk, a2d, bas, drk, flt, shd              C03

MODE    =                   / instr. mode: FULL (full res.), AREA (area int.)      C04
SERIALS =                   / serial clocks: ON, OFF                               C03

IMAGETYP= SPECIAL           / image type: EXT/BIAS/DARK/IFLAT/UFLAT/VFLAT/ECAL     C18
 CDBSFILE= FLAT              / CDBS: YES/NO/BIAS/DARK/FLAT/MASK/ATOD/SHAD          C18

DATE    =                   / date file written (dd/mm/yy)                         C08
FILTNAM1=                   / first filter name                                    C08
FILTNAM2=                   / second filter name                                   C08
FILTER1 =                   / first filter number (0-48)                            I2
FILTER2 =                   / second filter number (0-48)                           I2

SHUTTER =                   / shutter in place during IFLAT (A or B)               C01
ATODGAIN=                   / analog to digital gain (Electrons/DN)                 R4

EXPTIME =                   / exposure duration (seconds) -- calculated             R4
TARGNAME=                   / target name                                          C30
END

                                            [Listing Version 01  09-JUL-1992]

7.2.7 Shutter Shading Reference Files (SHD): <uniquename>.R5H

When a WFPC 2 exposure is relatively short, shutte r shading (resulting from the finite time of flight of the shutter blade) gives rise to uneven illumination across the field of view. It is corrected by applying the shutter shading reference file in the following way:

output = input * (1 + reference time x shutter shading/exposure time)

where reference time is 1 second.

Format: The shutter shading reference file is a single-precision (REAL*4) image file with the same number of dimensions as the WFPC 2 science image.

Flags and Indicators: The flags and indicators used to select the shutter shading reference files are SHUTTER (which can have the value A or B) and MODE (which can be AREA or FULL).

Restrictions: The shutter shading reference file is not accompanied by a data quality file. The header of the shutter shading reference file is a copy of the WFPC 2 science data header.

The following listing shows a partial image header from a sample flat field reference file.

BITPIX  = 16                / bits per data value                                   I2
DATATYPE= INTEGER*2         / data type of the array                               C10

PTYPE9  = DATAMIN           / minimum value of the data                            C08
PDTYPE9 = REAL*4                                                                   C18
PSIZE9  = 32                                                                        I2

PTYPE10 = DATAMAX           / maximum value of the data                            C08
PDTYPE10= REAL*4                                                                   C18
PSIZE10 = 32                                                                        I2

PTYPE19 = DETECTOR          / CCD detector: PC 1, WFC 2-4                          C08
PDTYPE19= INTEGER*4                                                                C18
PSIZE19 = 32                                                                       I2

PTYPE23 = GOODMIN           / minimum value of the "good" pixels                   C08
PDTYPE23= REAL*4                                                                   C18
PSIZE23 = 32                                                                        I2

PTYPE24 = GOODMAX           / maximum value of the "good" pixels                   C08
PDTYPE24= REAL*4                                                                   C18
PSIZE24 = 32                                                                        I2

PTYPE25 = DATAMEAN          / mean value of the "good" pixels                      C08
PDTYPE25= REAL*4                                                                   C18
PSIZE25 = 32                                                                        I2

PTYPE26 = GPIXELS           / number of "good" pixels               (DQF=0)        C08
PDTYPE26= INTEGER*4                                                                C18
PSIZE26 = 32                                                                        I2

PTYPE28 = CALIBDEF          / number of "calibration defect" pixels (DQF=2)        C08
PDTYPE28= INTEGER*4                                                                C18
PSIZE28 = 32                                                                        I2
PTYPE29 = STATICD           / number of "static defect" pixels      (DQF=4)       C08
PDTYPE29= INTEGER*4                                                                C18
PSIZE29 = 32                                                                        I2

INSTRUME= WFPC2             / instrument in use                                    C06
ROOTNAME=                   / rootname of the observation set                      C12
FILETYPE= SHD               / file type: msk, a2d, bas, drk, flt, shd              C03

MODE    =                   / instr. mode: FULL (full res.), AREA (area int.)      C04
SERIALS =                   / serial clocks: ON, OFF                               C03

IMAGETYP= SPECIAL           / image type: EXT/BIAS/DARK/IFLAT/UFLAT/VFLAT/ECAL     C18
CDBSFILE= SHAD              / CDBS: YES/NO/BIAS/DARK/FLAT/MASK/ATOD/SHAD           C18

DATE    =                   / date file written (dd/mm/yy)                         C08
FILTNAM1=                   / first filter name                                    C08
ILTNAM2=                   / second filter name                                   C08
FILTER1 =                   / first filter number (0-48)                            I2
FILTER2 =                   / second filter number (0-48)                           I2

SHUTTER =                   / shutter in place during IFLAT (A or B)               C01
ATODGAIN=                   / analog to digital gain (Electrons/DN)                 R4

EXPTIME =                   / exposure duration (seconds) -- calculated             R4
TARGNAME=                   / target name                                          C30
END
                                            [Listing Version 01  09-JUL-1992]