45.3 Calibration Details
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:
- Flag static bad pixels.
- Flag saturated pixels.
- Do analog-to-digital (A/D) correction.
- Subtract bias level.
- Subtract bias file.
- Subtract preflash.
- Subtract dark.
- Multiply by inverse flatfield.
- Calculate photometry keywords.
- Calculate histograms.
- Generate final science data quality file.
45.3.1 Static Mask
The static mask reference file contains a map of the known bad pixels and blocked columns. If this correction is performed (MASKCORR=YES), the mask is included in the calibration output data quality files. The mask reference file is identified in the MASKFILE keyword. The science data itself is not changed in any way; the STSDAS task wfixup can be used to interpolate across bad pixels flagged in the final data quality file (.c1h). Note, however, that the fixup is generally only done for image presentation; the interpolation can cause large errors in any photometry involving the flagged pixels.
45.3.2 Saturated Pixels
Pixels at the maximum level of the analog-to-digital (A/D) converter are automatically flagged in the calibration output data quality files (.c1h/.c1d). If the DOSATMAP correction is requested, an additional calibration output file is generated (.c3h/.c3d), containing a map of the saturated and missing pixels. Note, however, that this output file is redundant, since the same information is stored in the .c1h/.c1d.
45.3.3 A/D Fixup
All WF/PC-1 observations should have the analog-to-digital (A/D) correction performed. Due to a problem in the WF/PC-1 sample and hold circuitry, certain DN values are statistically more likely to occur than adjacent values. For this reason, a statistical correction is applied to the data using the A/D fixup file; there is no associated data quality file with the A/D reference file. Note that the correction is a statistical one-there will be some information that is not recoverable.
The A/D reference files may contain multiple look-up tables, which depend on the Bay 3 temperature (stored as degrees Celsius in the WBA3PCTM keyword of the observation). The first row in the A/D reference file consists of temperatures, while subsequent rows contain the lookup tables. That is, the second pixel in row one is the Bay 3 temperature associated with the second row A/D fixup values, the third pixel in row one is the Bay 3 temperature for the lookup table in the third row, and so on. However, since the Bay 3 temperature remained stable, only one lookup table is contained with the A/D reference file.
Note that the STSDAS task mka2d can be used to generate a lookup table. However, a table of the 48-bit errors are required as input (see OV/SV Report, Faber et al., 1992, Chapter 1).
45.3.4 Bias Level
The bias level is determined to first order from the extended register pixels which are in columns 3 through 14 of the extracted engineering files (.x0h/.x0d; if the image was done in area mode, the bias level is determined from the good pixels in column 1). Since the odd and even columns are at slightly (~0.6 DN) different levels (whose parity occasionally changes with a decontamination procedure), the bias level is separately determined and removed for even and odd columns (in calwfp versions after and including February 1992). The levels removed are stored in the group parameters BIASEVEN and BIASODD in the calibrated file, which can be examined with the IRAF task hedit. Note that the BIASEVEN keyword contains the average of the extracted engineering data (EED) columns 3, 5, 7, 9, 11, and 13 while the BIASODD keyword contains the average of EED columns 4, 6, 8, 10, 12 and 14.
45.3.5 Bias File
Once the bias level correction has been completed, any remaining bias pattern is removed by applying a bias file correction. The bias reference file is generated from a 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 file data quality file (.b2h/.b2d). Due to charge transfer problems, the bias calibration files do not make suitable corrections for dark current during readout, and this overhead time should be included in the DARKTIME used for dark correction.1 (See WF/PC-1 ISR 93j-01).
45.3.6 Preflash/CTE File
A preflash was applied to circumvent the low level non-linearity in the CCDs: during readout, very low-level charge (< 250 e- /pixel) was inefficiently transferred, smearing faint images. In addition, some charge (~50e-) was completely lost, which adversely affected the photometry of even uncrowded fields. The preflash, which was requested by the observer, was done by imaging the shutter through a red filter, thereby imposing a low-level signal (~30 to 40 e-/pixel) on the image before the science exposure began.
The preflash reference files were generated from sets of bias files which were preflashed; the final reference files were scaled to 1 second. Since the two possible shutters (A or B) had different reflection patterns, there were separate preflash reference files for each shutter configuration (see note below). If the preflash time (PREFTIME) was larger than zero, the preflash reference file was multiplied by PREFTIME and subtracted from the image. The first row of each preflash file contains the charge transfer efficiency (CTE) correction (offsets for columns with poor charge transfer); if the preflash time was zero, the CTE fixup was done. Note that for preflashed images, the preflash reference file effectively includes the CTE fixup, so that the CTE correction is done during the subtraction of the preflash reference file.
For an external image, the SHUTTER keyword should indicate which shutter was in place during the preflash. The shutter used can be verified by extracting the engineering data to a table using the STSDAS engextr task and then using the tdump task to examine the table, for example:
st> engextr w0ts0n02t.x0h outtable=.
st> tdump w0ts0n02t row=77-78
The example above would write to the screen the values stored in rows 77-78 of the file w0ts0n02t.tab which contain the shutter status at the end of the image readout. Assuming that 1) there were no interruptions or multiple exposures before the readout, 2) SERIALS=NO, and 3) the observation is shorter than 300 seconds, the preflash shutter is the one opposite the shutter marked as closed in the table (e.g., if A is marked as closed in the extracted engineering table, B was used during the preflash).
For exposures longer than 300 seconds, shutter B always closed the end of the exposure, regardless of the shutter used for preflash, so that the above algorithm fails-however, the difference between the A and B shutter blade preflashes was relatively small, less than about 0.5 DN. Shutter B was usually used to preflash long exposures, and that is the assumption used in calibrations. If the shutter blade is likely to be important for the observations, contact the STScI help desk (firstname.lastname@example.org ) for help in determining the preflash shutter.
45.3.7 Dark File
A dark correction is required to account for the thermally-induced dark current which occurred during the image exposure; many of the hot pixels are corrected with the dark file as well (however, see "Hot Pixels" on page 46-5). Usually, 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, BIASCORR, and PREFCORR). In addition, each frame is examined and residual images are excluded by a mask. If the dark correction is requested, the dark reference file (which has been normalized to 1 second) is scaled by the DARKTIME keyword value and subtracted from the observation.
Note that the DARKTIME used in pipeline processing is only an approximation. For long exposures or data requiring very accurate dark correction, the darktime should be recalculated (see WF/PC-1 Instrument Science Report 93-01), inserted into the DARKTIME keyword, and then the images should be recalibrated. There was a problem in older data with the DARKTIME being improperly set for interrupted exposures; in these cases, the darktime must be manually computed from the WEXPODUR keyword and the DARKTIME keyword updated before recalibrating (see "Recalibrating WF/PC-1 Data" on page 45-20).
The data are multiplied by a normalized, inverted flatfield in order to remove any pixel-to-pixel variations in the cameras. Flatfields used in the pipeline calibration were generated from sets of earthcals (observations of the bright earth). The general procedure for creating a pipeline flatfield was to combine a chosen set of earthcals using the STSDAS task streakflat, then normalize and invert using normclip. The code allows for the fact that some of the earthcals had streaks due to features on the earth being smeared by HST motion in the images.
Acquiring enough properly exposed earthflats was time-consuming, primarily due to the large variation in the earth's albedo. In addition, the earth is too bright for some broadband filters, requiring the use of a neutral density filter (either the F8ND or F122M), which added features of their own which must then be removed. For these reasons, only two complete flatfield calibrations were planned, the first was completed during Science Verification ("SV") and early Cycle 1 ("non-SV"), and the second was obtained during the second half of Cycle 2 through Cycle 3 (dubbed closure flats).
Care must be taken in choosing the best flatfield to use; flatfields generated from earthcals taken with the neutral density filters (F122M or F8ND) can contain gradients of 20-30%. See "Choosing Among Available Flats" on page 45-15 and "Flatfield Anomalies" on page 46-7 for details on the available flatfields.
45.3.9 Photometry Keywords
The photometry keywords are listed in Figure 45.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 "Converting Counts to Flux or Magnitude" on page 3-15).
Figure 45.3: Photometry Keywords
DOPHOTOM= `YES ` / Fill photometry keywords: YES, NO, DONE
PHOTTAB = `wtab$cbj15281w.cw0' / name of the photometry calibration table
`PHOTMODE' / Photometry mode (for example, PC,5,F,DN,F1042M,OPEN,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)
The PHOTTAB keyword is set by the PODPS pipeline during generic conversion; all other photometry keywords are blank or contain values of zero in the .d0h files. If the image is being recalibrated, use the StarView Calibration screens and consult the Reference File Memo on WWW for a listing of new photometry tables available for use.
Setting DOPHOTOM to "YES" instructs calwfp to populate the photometry-related keywords; no operations are performed on the actual images. The first step is to form the PHOTMODE keyword based on the values of other keywords (CAMERA, DETECTOR, FILTNAM, etc.) in the header. The calwfp task then searches the photometry table specified in PHOTTAB for the matching mode; the PHOTFLAM, PHOTZPT, PHOTPLAM, and PHOTBW values in the table are written into the c0h group keywords (see Table 44.3). If no matching PHOTMODE is found in the table specified by PHOTTAB, the keywords remain blank or zero. For more information about improving the photometric calibration, see "Improving the Photometric Calibration" on page 46-17.
If this operation is requested (by setting DOHISTOS=YES), 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 3-line image where row 1 is a histogram of the raw data values, row 2 is a histogram of the A/D corrected data, and row 3 is a histogram of the final calibrated science data.
45.3.11 Data Quality Files
Each calibrated science dataset contains a data quality file (.c1h for WF/PC-1). The calwfp software will bit-wise OR all of the raw data quality files (.q0h, .q1h) with the reference file data quality files (.b2h, .b3h, etc.), in order to generate the calibrated science data quality file (.c1h). The flag values used are defined in Table 45.2. The final calibrated data quality file (.c1h) should be examined (for example, using SAOimage or imexamine) to identify which pixels may be bad in the science image.
The bad pixels flagged in the .c1h file are not fixed up in the .c0h file. The -STSDAS task wfixup can be used to interpolate across bad pixels in the science image; note however, that this results in a loss of information and can have adverse effects on any photometry using those pixels.
|1||Reed-Solomon decoding error|
|2||Calibration file defect|
|4||Permanent camera defect|
|8||A/D converter saturation|
1 See WF/PC-1 Instrument Science Report 93-01.
Copyright © 1997, Association of Universities for Research in Astronomy. All rights reserved.