The treatment of warm pixels and cosmic rays can be quite different in the case of dithered data. This case is discussed in "Dithering" on page 28-19; the present discussion refers to co-aligned data only.
These bright pixels are warm pixels, or pixels with an elevated dark current. The vast majority of WFPC2 pixels have a total dark current of about 0.005 e-/s-1 (including the dark glow, discussed in "Dark Glow" on page 27-4). However, at any given time there are a few thousand pixels in each CCD, called warm pixels, with a dark current more than 0.02 e-/s-1, up to several e-/s-1 in a few cases (see Figure 26.5). Some of these pixels are permanently warm, but most become warm during the course of the month, probably as a consequence of the on-orbit bombardment by heavy nuclei. STIS, the other instrument currently aboard HST that uses CCDs, exhibits a similar behavior. Most warm pixels return to normal after the CCDs are brought to room temperature for a few hours.
To repair warm pixels we run monthly decontaminations, in which the instrument warms up to about 22 C for a period of six hours. (Longer decontaminations do not appear to improve the fraction of pixels fixed.) Decontaminations are also needed to let UV-blocking contaminants that build up on the CCD windows evaporate, thus temporarily restoring the UV throughput of the camera. For more detailed information, see the WFPC2 Instrument Handbook.
Because of the time variability of warm pixels, standard dark correction does not deal with them adequately. Even dark frames taken within a day of the observation will contain some warm pixels that vary significantly from those in the observation. We have developed a task, known as warmpix, that will allow a user to either flag, or attempt to correct, pixels which are known to be warm, or which have varied near the time of the observation.
Will Warm Pixels Hurt my Science?
The impact of warm pixels on the scientific results obtained from WFPC2 images depends on a number of factors: the exposure length, the number of objects, and the science goals. If the principal goal of the program is to acquire morphological information on well-resolved targets, warm pixels are usually not a serious concern, as they are easily recognizable. If the goal is accurate photometry of point sources, the probability that uncorrected warm pixels will influence the measurement at a given level can be computed on the basis of the distribution of warm pixels (Figure 26.5). In general, warm pixels are a concern in two cases: accurate photometry of faint sources in crowded fields, where warm pixels can easily be confused with cores of faint sources, or aperture photometry with very large apertures and/or of extended objects. In the latter case, warm pixels cause a positive tail in the count distribution that is not included in the background determination, but-depending on the software used-could be included in the integrated source flux, which will then be positively biased.
Figure 26.5: Distribution of Dark Current for Warm Pixels
Can Warm Pixels be Corrected?
There are two levels of possible correction for warm pixels. The first is to identify and flag the warm pixels. Depending on the software used, the flagged pixels can either be ignored (PSF fitting software generally allows this) or be interpolated from nearby pixels (for software that requires a valid value for all pixels, such as most aperture photometry tasks). The identification of warm pixels can be accomplished by taking advantage of the fact that they are the only WFPC2 feature to extend across only one pixel; both cosmic rays and photons, in the form of point sources, involve more than one pixel. The IRAF task cosmicrays, written originally to remove single-pixel cosmic rays in ground-based data, has been used with some success to identify warm pixels in WFPC2 data. Identification of warm pixels is also possible using information from dark frames taken before and after the observations were executed, as described below.
http://www.stsci.edu/ftp/instrument_news/WFPC2/In order to use warmpix to identify or correct WFPC2 observations for the effect of warm pixels, perform the following steps:
wfpc2_warmpix.html
These tables are in Unix-compressed format. On some systems, the retrieved table will not have the .Z extension, but they still need to be renamed to add the .Z extension and uncompressed by the Unix task uncompress. Please contact the Help Desk at help@stsci.edu if you have a non-Unix system or if you encounter difficulties in retrieving the tables.
This procedure will generally correct for 90% to 95% of the warm pixels found in typical user data. There are some uncertainties in the results, associated with the intrinsic variability of hot pixels and the time span between darks. We have recently started a program to obtain dark frames daily, resulting in better warm pixel information. These darks are taken as a service to users, and they are not currently part of our delivered calibration files. Users who wish to use this information can recalibrate their data (see "Recalibration" on page 26-10) using a dark made from darks taken within one or two days of their observations.
Non-STSDAS tasks generally ignore the data quality files, and thus may not properly use the information indicating which pixels need to be rejected. Users should propagate this information by the appropriate method, which will depend on the specifics of the task.
Unlike events seen on the ground, most WFPC2 cosmic ray events deposit a significant amount of charge in several pixels; the average number of pixels affected is 6, with a peak signal of 1500 e- per pixel and a few tens of e- per pixel at the edges. About 3% of the pixels, or 20,000 pixels per CCD, will be affected by cosmic rays in a long exposure (1800 s). Figure 26.6 shows the impact of cosmic rays in an 800 second exposure with WFPC2. The area shown is about 1/16th of one chip (a 200 x 200 region); pixels affected by cosmic rays are shown in black and unaffected pixels are shown in white. A typical long WFPC2 exposure (2000 s) would have about 2.5 times as many pixels corrupted by cosmic rays.
Cosmic rays are noticeable even for very short exposures. The WFPC2 electronics allow activities to be started only at one-minute intervals; thus a minimum-length exposure will collect at least one minute's worth of cosmic rays, the interval between camera reset and readout, and will be affected by about a hundred cosmic rays per CCD.
Figure 26.6: WF Exposure Showing Pixels Affected by Cosmic Rays
Because sub-pixel dithering strategies are now very common, the image combination tasks in the drizzle package (see "Dithering" on page 28-19) now include a script that can remove cosmic rays from images taken at multiple pointings, without repetitions. 
How many Images for Proper CR Rejection?
Cosmic rays are so numerous on WFPC2 images that double hits are not uncommon. For example, the combination of two 2000 s images will typically contain about 500 pixels per CCD that are affected by cosmic rays in both images; in most of these cases, the hit will be marginal in one of the two images. If the science goals require a high level of cosmic ray rejection, it will be desirable to conduct a more stringent test in pixels adjacent to detected cosmic rays (see the parameter radius in crrej). Even better would be, in the planning stage, to break the observation into more than two exposures; the WFPC2 Exposure Time Calculator gives specific recommendations on the number of exposures necessary as a function of the number of pixels lost. In general, three exposures are sufficient for non-stringent programs, and four exposures for any program. The Exposure Time Calculator is available via the WWW at:
http://www.stsci.edu/ftp/instrument_news/WFPC2/Wfpc2_etc/
wfpc2-etc.html
The images in Figure 26.7 show streaks (a) in the background sky and, (b) stellar images produced by charge traps in the WFPC2. Individual traps have been cataloged and their identifying numbers are shown.
Figure 26.7: Streaks in a) Background Sky, and b) Stars
Bright tails have been measured on images taken both before and after the April 23, 1994 cool down. The behavior of the traps has been quite constant with time, and fortunately there is no evidence for the formation of new traps since the ground system testing in May 1993. The charge delay in each of the traps is well characterized by a simple exponential decay which varies in strength and spatial scale from trap to trap. 