[Top] [Prev] [Next] [Bottom]

26.2 Standard Pipeline Calibration

Each calibration step (and the keyword switches used to turn the step on or off) is described in detail in the following sections; the steps are performed in the following order:

  1. Flag static bad pixels.
  2. Do analog-to-digital (A/D) correction.
  3. Subtract bias level.
  4. Subtract bias image.
  5. Subtract dark for exposures longer than 10 seconds.
  6. Multiply by flatfield.
  7. Apply shutter shading correction to exposures of less than 10 seconds.
  8. Calculate photometry keywords.
  9. Calculate histograms.
  10. Generate final science data quality file.

26.2.1 Calibration Files

Table 26.2 lists the types (and related suffixes) of the WFPC2 reference files used in the pipeline calibration. Most suffixes have the form rNh/rNd, where N is a number that identifies the step in which the file is used. The related data quality file, if it exists, has the suffix bNh/bNd. The rootname of a reference file is based on the time that the file was delivered to the Calibration Data Base System (CDBS). The file names and history of all WFPC2 reference files in CDBS (and retrievable from the HST Archive) are contained in the Reference File Memo, available via the WFPC2 WWW pages. This memo is routinely updated with each new delivery. Any CDBS file is available for retrieval through the HST Data Archive (see Chapter 1). Some additional reference files generated by the WFPC2 IDT are listed in the IDT Reference File Memo, also available on the web. The WFPC2 web page can be found at:

http://www.stsci.edu/ftp/instrument_news/WFPC2/Wfpc2_top.html



WFPC2 Calibration -Reference Files

Suffix

Reference File

r0h, r0d

Static mask

r1h, r1d

Analog-to-digital look-up table

r2h, r2d, b2h, b2d

Bias

r3h, r3d, b3h, b3d

Dark frame

r4h, r4d, b4h, b4d

Flatfield

r5h, r5d

Shutter shading

c3f

Photometry table (generated, not required)

All of the installed reference files contain HISTORY keywords at the end of the header which can be viewed using the imhead task. These keywords contain more detailed information about how the file was created and installed in the database.

26.2.2 Calibration Steps

Application of the Static Mask

The static mask reference file (.r0h/.r0d) contains a map of the known bad pixels and columns. If this correction is performed (MASKCORR=PERFORM), the mask is included in the calibration output data quality files. The mask reference file is identified in the MASKFILE keyword. The science data themselves are not changed in any way; the STSDAS task wfixup can be used on the final calibrated science image (.c0h/.c0d) to interpolate across bad pixels flagged in the final data quality file (.c1h).

A/D Correction

The analog-to-digital (A/D) converter takes the observed charge in each pixel in the CCD and converts it to a digital number. Two settings, or gains, of the A/D are used on WFPC2. The first converts a charge of approximately seven electrons to a single count (called a Data Number or DN), and the second converts a charge of approximately 14 electrons to a DN, also referred to as gain 15 for historical reasons. A/D converters work by comparing the observed charge with a reference and act mathematically as a "floor" function. However, these devices are not perfect, and some values are reported more (or less) frequently than they would be by a perfect device. One can adjust statistically for this bias; fortunately the WFPC2 A/D converters are relatively well-behaved and this is a small correction. The largest correction is about 1.8 to 2.0 DN for bit 12 (thus 2048).

The best estimate of the A/D bias is removed when the ATODCORR keyword is set to PERFORM. The calibration file used to correct for the A/D errors has the suffix .r1h.

Bias Level Removal

The charges that are in each pixel sit on top of an electronic pedestal, or "bias" designed to keep the A/D levels consistently above zero. The mean level of the bias must be determined empirically using extended register (overscan) pixels which do not view the sky. The values of these pixels are placed in the extracted engineering files (.x0h/.x0d). The overscan area used to calculate the mean bias levels is [9:14,10:790], with BIASODD being determined from columns 10, 12, and 14 and a BIASEVEN being determined from columns 9, 11, and 13 (this surprising nomenclature is due to an offset in the .x0h file; even and odd are correctly oriented with respect to the data file columns). In observations before March 8, 1994, the pipeline used a larger part of the overscan region, resulting in oversubtraction of the bias level and possibly large negative pixel values. Separate even and odd bias levels were extracted only after May 4, 1994. See Chapter 27 for more information on how to deal with early WFPC2 data. The keyword BLEVCORR controls the subtraction of the bias in calwp2.

Bias Image Subtraction

The value of the bias pedestal can vary with position across the chip. Therefore, once the mean bias level correction has been completed, the pipeline looks at the keyword BIASCORR. If it is set to PERFORM, then a bias image (.r2h) is subtracted from the data to remove any position-dependent bias pattern. The bias reference file is generated from a large set of A/D and bias-level corrected zero-length exposures. The correction consists of subtracting the bias file from the observation and flagging in the .c1h/.c1d file any bad pixels noted in the bias data quality file (.b2h/.b2d).

Dark Image Subtraction

A dark correction is required to account for the thermally-induced dark current as well as a glow (see "Dark Glow" on page 27-4) from the field flattening lens. The dark reference file is generated from ten or more individual dark frames (long exposures taken with the shutter closed) that have each had the standard calibration corrections applied (ATODCORR, BLEVCORR, and BIASCORR). In addition, each frame is examined and regions affected by image anomalies (such as residual images, see Figure 27.2) are masked out. If a dark correction is performed, the dark reference file (which was normalized to one second) is scaled by the DARKTIME keyword value and subtracted from the observation. The keyword DARKCORR controls the subtraction of the dark file (.r3h). By default, DARKCORR is set to "PERFORM" for all exposures longer than 10 seconds, and to "OMIT" for shorter exposures.

Flatfield Multiplication

The number of electrons generated in a given pixel by a star of a given magnitude depends on the individual quantum efficiency of the pixel as well as any large scale vignetting of the field-of-view caused by the telescope and camera optics. To correct these variations in total quantum efficiency, the image is multiplied by an inverse flatfield file, which is currently generated from a combination of on-orbit data, used to determine the large-scale structure of the illumination pattern, and data taken before launch to determine the pixel-to-pixel response function. The application of the flatfield file (extension .r4h) is controlled by the keyword FLATCORR.

Shutter Shading Correction

The finite velocity of the shutter produces a position-dependent exposure time. This effect is only significant for exposures of a few seconds or less, and is automatically removed from all exposures less than ten seconds. The keyword switch is SHADCORR, and the shutter shading file name is stored in the keyword SHADFILE.

Creation of Photometry Keywords

Photometry keywords, which provide the conversion from calibrated counts to astronomical magnitude, are created using the STSDAS package synphot. (More information on synphot can be found in this document, and in the Synphot User's Guide, which is available via WWW.) These keywords are listed in Figure 26.3, below; the first two keywords are in the ASCII header (both .d0h and .c0h) while the last five keywords are group parameters (use the IRAF tasks imheader or hedit to examine the group keywords-see Chapters 2 and 3 for more details). This calibration step uses the HST graph and component tables (.tmg and .tmc) to determine the throughput for the appropriate WFPC2 observing mode and filter. The keyword switch for this step is DOPHOTOM, and the reference file keywords are GRAPHTAB and COMPTAB.

Figure 26.3: Photometry Keywords

DOPHOTOM= `YES ` / Fill photometry keywords: YES, NO, DONE 
PHOTTAB = `ucal$u27s0301n.c3t' / name of the photometry calibration table
`PHOTMODE' / Photometry mode (for example, WFPC2,1, A2D7, F675W,CAL)
`PHOTFLAM' / Inverse Sensitivity (erg/sec/cm2/Å for 1 DN/sec)
`PHOTPLAM' / Pivot wavelength (angstroms)
`PHOTBW ` / RMS bandwidth of the filter (angstroms)
`PHOTZPT' / Photometric zeropoint (magnitude)

Histogram Creation

Histograms of the raw data, the A/D corrected data, and the final calibrated output data are created and stored in the .c2h/.c2d image. This is a multigroup image with one group for each group in the calibrated data file. Each group contains a three-line image where the first row is a histogram of the raw data values, row two is a histogram of the A/D corrected data, and row three is a histogram of the final calibrated science data. This operation is controlled by the keyword DOHISTOS; the default is not to produce them.

Data Quality File Creation

The calwp2 software will combine the raw data quality file (.q0h, .q1h) with the static pixel mask (.r0h) and the data quailty files for bias, dark, and flatfield reference files (.b2h, .b3h, .b4h) in order to generate the calibrated science data quality file (.c1h). The flag values used are defined below. The final calibrated data quality file (.c1h) may be examined (for example, using SAOimage, ximtool, or imexamine) to identify which pixels in your science image may be bad.


The bad pixels flagged in the .c1h file have not been fixed in the .c0h file. You may wish to use the STSDAS task wfixup to interpolate across bad pixels in your science image or to use the .c1h file to determine which pixels to discard in various analysis programs.

The Image

After the completion of the standard pipeline processing the final image is placed in a real-valued image labelled .c0h/.c0d.


WFPC2 Data Quality Flag Values

Flag

Value

Description

0

Good pixel

1

Reed-Solomon decoding error. This pixel is part of a packet of data in which one or more pixels may have been corrupted during transmission.

2

Calibration file defect-set if pixel flagged in any calibration file. Includes charge transfer traps identified in static pixel mask file (.r0h).

4

Permanent camera defect. Static defects are maintained in the CDBS database and flag problems such as blocked columns and dead pixels.

(Not currently used.)

8

A/D converter saturation. The actual signal is unrecoverable but known to exceed the A/D full-scale signal (4095).1

16

Missing data. The pixel was lost during readout or transmission. (Not currently used.)

32

Bad pixel that does not fall into above categories.

128

Permanent charge trap. (Not currently used.)

256

Questionable pixel. A pixel lying above a charge trap which may be affected by the trap.

512

Unrepaired warm pixel.

1024

Repaired warm pixel.

1 Calibrated saturated pixels may have values significantly lower than 4095 due to bias subtraction and flatfielding. In general, data values above 3500 DN are likely saturated.



[Top] [Prev] [Next] [Bottom]

stevens@stsci.edu
Copyright © 1997, Association of Universities for Research in Astronomy. All rights reserved. Last updated: 11/13/97 17:52:14