Instrument Science Report WFPC2 98-02 The long vs. short anomaly in WFPC2 images S. Casertano and M. Mutchler September 24, 1998 ABSTRACT We present an improved characterization of the so-called “long vs. short” anomaly, a nonlinear behavior of the WFPC2 chips which results in a decrease of the measured count rate with decreasing exposure time. We demonstrate that: 1) this non-linearity depends strictly on total counts in a stellar image, and is independent of exposure time; 2) the effect depends on position on the chip only through the well-known CTE effect, and is independent of position after the CTE correction is applied; 3) F555W and F814W appear similarly affected; and 4) there is a marginal decrease in non-linearity at high background levels, but the effect is statistically insignificant in the overall description of the anomaly. We present a simple formula that can be used to correct the observed counts in a variety of conditions; this formula is recommended for use with most point-source photometry obtained with WFPC2. 1. Introduction The so-called “long vs. short” anomaly was discovered early on in the operational life of WFPC2 by Stetson (1995) by comparing ground-based photometry with WFPC2 exposures of length ranging from over 1000s to a few tens of seconds. Early reports can be found in Kelson et al (1996) and Saha et al (1996). The name derives from the initial interpretation of the anomaly as a zero point difference of about 5% between long and short exposures. This effect has been independently confirmed in a number of studies (see the WFPC2 Clearinghouse at http://www.stsci.edu/ftp/instrument_news/WFPC2/ Wfpc2_clear/wfpc2_clrhs.html for an up-to-date list of references). Casertano (1995) used multiple exposures of a field in the globular cluster ω Cen to characterize this anomaly, finding that the count rate measured for a given object increases with increasing exposure time. Similar results were obtained by Stiavelli (1995) using observations of the globular cluster NGC 2419. There is also a report (Ratnatunga 1995) of consecutive images with a pixel-to-pixel ratio about 3% smaller than the ratio of the exposure times, 1 indicating a possible non-linearity in the opposite sense; we have been unable to confirm a pattern of such occurrences. For a short summary of the earlier results, see also Casertano (1997). On the basis of the evidence collected so far, the anomaly appears to be more properly a function of total counts in a stellar image, rather than a direct function of exposure time. The commonly used “long vs. short” name is thus somewhat of a misnomer. The information obtained from archival data proved adequate to quantify the effect of the anomaly under a specific set of circumstances, but was insufficient to obtain a correction suitable for general use. The WFPC2 group has therefore obtained an extensive set of HST observations, under the calibration program CAL 7630, to help achieve a broader characterization of the “long vs. short” anomaly. We present here a preliminary analysis of this dataset, and give a correction formula that reduces the residual systematic effect of the anomaly below the random error due to the photon noise in our observations. Users interested solely in the correction formula can skip directly to Section 5, which details the recommended correction procedure. Since we could not possibly reproduce all realistic observing conditions in our tests, we encourage users to report to us any successful or unsuccessful applications of our correction formula by sending e-mail to help@stsci.edu. 2. Description of CAL 7630 The observing program CAL 7630 was designed to obtain the most detailed characterization of the long vs. short anomaly possible within a limited investment in observing time. A total of 14 orbits were used to carry out a large number of separate tests on a previously studied field including the Galactic globular cluster NGC 2419. The tests included the following: 1. Basic measurement of the effect: obtain images with exposure time ranging from 10s to 1000s; this provides a test of the effect in extreme conditions; 2. Dependence on background: apply preflash levels between 5 and 1000 e/pixel (previous tests used a maximum of 300 e/pixel); 3. Wavelength dependence: besides F814W, the filter used for the primary characterization of the effect, we took data with F555W and F300W as well; 4. Hysteresis: data were sequenced in both ascending and descending exposure times, to test whether the order of the exposures affects the measurements; 5. Noiseless preflash: multiple exposures were taken about 35 minutes after flooding the chip with charge that was then read out; it was hoped that this procedure would fill any traps on the chip (possible causes of the anomaly) and thus greatly reduce the non-linearity; 2 6. Position on the chip: one set of observations was taken with a large shift, thus testing the same stars in different positions. In total, 52 images were taken at essentially the same pointing, and 5 more at the shifted pointing. All exposures were taken at gain 7. The complete list of exposures, given in Table 1, includes also an INTFLAT exposure used for the noiseless preflash. The heavy horizontal lines in Table 1 mark the orbit boundaries. Table 1: Observations for CAL 7630 Dataset Target Filter Exptime U4CT0101R NGC2419 F814W 10. U4CT0102R NGC2419 F814W 10. U4CT0103R NGC2419 F814W U4CT0104R NGC2419 U4CT0105R Preflash (e/pix) Date Time PA_V3 RA_V1 Dec_V1 0. 11/18/97 07:34:13 79.283 07 38 09.381 +38 52 03.194 5. 11/18/97 07:42:13 79.283 07 38 09.381 +38 52 03.194 10. 10. 11/18/97 07:50:13 79.283 07 38 09.381 +38 52 03.194 F814W 10. 100. 11/18/97 08:43:13 79.283 07 38 09.381 +38 52 03.194 NGC2419 F814W 10. 1000. 11/18/97 09:07:13 79.283 07 38 09.381 +38 52 03.194 U4CT0106R NGC2419 F814W 40. 0. 11/18/97 09:09:13 79.283 07 38 09.381 +38 52 03.194 U4CT0107R NGC2419 F814W 40. 5. 11/18/97 09:17:13 79.283 07 38 09.381 +38 52 03.194 U4CT0108R NGC2419 F814W 40. 10. 11/18/97 09:25:13 79.283 07 38 09.381 +38 52 03.194 U4CT0109R NGC2419 F814W 40. 100. 11/18/97 10:20:13 79.283 07 38 09.381 +38 52 03.194 U4CT010AR NGC2419 F814W 40. 1000. 11/18/97 10:32:13 79.283 07 38 09.381 +38 52 03.194 U4CT010BR NGC2419 F814W 40. 100. 11/18/97 10:40:13 79.283 07 38 09.381 +38 52 03.194 U4CT010CR NGC2419 F814W 40. 10. 11/18/97 10:48:13 79.283 07 38 09.381 +38 52 03.194 U4CT010DR NGC2419 F814W 40. 5. 11/18/97 10:56:13 79.283 07 38 09.381 +38 52 03.194 U4CT010EM NGC2419 F814W 40. 0. 11/18/97 10:58:13 79.283 07 38 09.381 +38 52 03.194 U4CT010FR NGC2419 F814W 100. 0. 11/18/97 11:00:13 79.283 07 38 09.381 +38 52 03.194 U4CT010GR NGC2419 F814W 100. 10. 11/18/97 11:57:13 79.283 07 38 09.381 +38 52 03.194 U4CT010HR NGC2419 F814W 100. 100. 11/18/97 12:06:13 79.283 07 38 09.381 +38 52 03.194 U4CT010IR NGC2419 F814W 100. 1000. 11/18/97 12:19:13 79.283 07 38 09.381 +38 52 03.194 U4CT010JR NGC2419 F814W 300. 0. 11/18/97 12:22:13 79.283 07 38 09.381 +38 52 03.194 U4CT010KR NGC2419 F814W 300. 100. 11/18/97 12:36:13 79.283 07 38 09.381 +38 52 03.194 U4CT010LR NGC2419 F814W 300. 1000. 11/18/97 13:37:13 79.283 07 38 09.381 +38 52 03.194 U4CT010MR NGC2419 F814W 300. 100. 11/18/97 13:51:13 79.283 07 38 09.381 +38 52 03.194 U4CT010NR NGC2419 F814W 300. 0. 11/18/97 13:59:13 79.283 07 38 09.381 +38 52 03.194 U4CT010OR NGC2419 F814W 1000. 0. 11/18/97 15:07:13 79.283 07 38 09.381 +38 52 03.194 U4CT010PR NGC2419 F814W 1000. 100. 11/18/97 15:32:13 79.283 07 38 09.381 +38 52 03.194 U4CT0201M NGC2419 F814W 1000. 1000. 11/18/97 16:55:13 79.283 07 38 09.381 +38 52 03.194 U4CT0202R NGC2419 F555W 40. 0. 11/18/97 17:15:13 79.283 07 38 09.381 +38 52 03.194 U4CT0203R NGC2419 F555W 40. 10. 11/18/97 17:23:13 79.283 07 38 09.381 +38 52 03.194 U4CT0204R NGC2419 F555W 40. 100. 11/18/97 17:31:13 79.283 07 38 09.381 +38 52 03.194 U4CT0205R NGC2419 F555W 40. 1000. 11/18/97 18:28:13 79.283 07 38 09.381 +38 52 03.194 U4CT0206R NGC2419 F555W 300. 0. 11/18/97 18:30:13 79.283 07 38 09.381 +38 52 03.194 U4CT0207R NGC2419 F555W 300. 100. 11/18/97 18:44:13 79.283 07 38 09.381 +38 52 03.194 U4CT0208R NGC2419 F555W 300. 1000. 11/18/97 19:02:13 79.283 07 38 09.381 +38 52 03.194 U4CT0209R NGC2419 F300W 100. 0. 11/18/97 19:58:13 79.283 07 38 09.381 +38 52 03.194 U4CT020AR NGC2419 F300W 100. 100. 11/18/97 20:07:13 79.283 07 38 09.381 +38 52 03.194 U4CT020BR NGC2419 F300W 100. 1000. 11/18/97 20:20:13 79.283 07 38 09.381 +38 52 03.194 U4CT020CM NGC2419 F300W 1000. 0. 11/18/97 20:23:13 79.283 07 38 09.381 +38 52 03.194 U4CT020DR NGC2419 F300W 1000. 100. 11/18/97 21:41:13 79.283 07 38 09.381 +38 52 03.194 U4CT020EM NGC2419 F300W 1000. 1000. 11/18/97 23:27:13 79.283 07 38 09.381 +38 52 03.194 U4CT0301R NGC2419 F814W 40. 0. 11/19/97 01:08:13 79.279 07 38 07.674 +38 53 47.371 U4CT0302R NGC2419 F814W 40. 100. 11/19/97 01:16:13 79.279 07 38 07.674 +38 53 47.371 3 Table 1: Observations for CAL 7630 Dataset Target Filter Exptime U4CT0303R NGC2419 F814W 40. U4CT0304R NGC2419 F814W 300. ----------- -------- ------ U4CT0305R NGC2419 F814W ----------- -------- ------ ---------300. ---------- Preflash (e/pix) Date Time PA_V3 RA_V1 Dec_V1 1000. 11/19/97 01:28:13 79.279 07 38 07.674 0. 11/19/97 01:30:13 79.279 07 38 07.674 +38 53 47.371 ---------- --------- -------- -------- --------------- ---------------- 1000. 11/19/97 02:48:13 79.279 07 38 11.896 +38 53 31.096 ---------- --------- -------- -------- --------------- ---------------- +38 53 47.371 U4CT0401R INTFLAT ----- 600. 3000. 11/19/97 03:38:13 ------ -- -- ------ --- -- ------ U4CT0402R NGC2419 F814W 40. 0. 11/19/97 04:23:13 79.283 07 38 09.381 +38 52 03.194 U4CT0403R NGC2419 F814W 40. 0. 11/19/97 04:25:13 79.283 07 38 09.381 +38 52 03.194 U4CT0404R NGC2419 F814W 40. 0. 11/19/97 04:27:13 79.283 07 38 09.381 +38 52 03.194 U4CT0405R NGC2419 F814W 40. 0. 11/19/97 04:29:13 79.283 07 38 09.381 +38 52 03.194 U4CT0406R NGC2419 F814W 40. 0. 11/19/97 04:31:13 79.283 07 38 09.381 +38 52 03.194 U4CT0407R NGC2419 F814W 40. 0. 11/19/97 04:33:13 79.283 07 38 09.381 +38 52 03.194 U4CT0408R NGC2419 F814W 40. 0. 11/19/97 04:35:13 79.283 07 38 09.381 +38 52 03.194 U4CT0409R NGC2419 F814W 40. 0. 11/19/97 04:37:13 79.283 07 38 09.381 +38 52 03.194 U4CT040AR NGC2419 F814W 40. 0. 11/19/97 04:39:13 79.283 07 38 09.381 +38 52 03.194 U4CT040BR NGC2419 F814W 40. 0. 11/19/97 04:41:13 79.283 07 38 09.381 +38 52 03.194 U4CT040CR NGC2419 F814W 40. 0. 11/19/97 04:43:13 79.283 07 38 09.381 +38 52 03.194 U4CT040DR NGC2419 F814W 40. 0. 11/19/97 04:45:13 79.283 07 38 09.381 +38 52 03.194 U4CT040ER NGC2419 F814W 40. 0. 11/19/97 04:47:13 79.283 07 38 09.381 +38 52 03.194 3. Data Analysis 1: Characterization Image calibration The images were first reduced through the standard STSDAS WFPC2 pipeline task calwp2, using the normal bias, dark, and flat field. In order to conserve observing time, we did not take cosmic ray splits, and therefore we did not carry out cosmic ray rejection on the images. Since WFPC2 has no “faint” cosmic rays (WFPC2 Handbook, Biretta et al 1996, Section 4.9), and the vast majority of CR hits deposits a charge of at least 700 e, we were able to identify the stars affected by cosmic ray hits as outliers in the subsequent analysis. We also increased the robustness of the analysis against outliers by using median and quartiles, instead of average and rms dispersion, wherever practical. Photometry After the pipeline processing, a master list of stars - containing 3470 objects - was constructed from the longest images available, and aperture photometry was performed using the IRAF task noao.digiphot.apphot at the position of each star, using aperture radii ranging from 1 to 5 pixels; the 2 pixel aperture was used as the primary measurement. The sky level was determined in an annulus between 7 and 12 pixel radius, using the option ofilter as recommended by Ferguson (1996). All photometry results were then placed in a master database used for all subsequent analysis. 4 Reference magnitude The next step was to establish a reference magnitude for each object. We started by assuming that the count rates in the longest exposures would be least affected by the nonlinearity, and thus used the combination of all 1000s exposures (300s in F555W) to determine an initial reference magnitude in each filter and aperture. When using CTE-corrected magnitudes (see Section 3), the reference magnitudes were also computed from CTE-corrected raw magnitudes. Subsequent analysis shows that even the magnitude measured in the longest exposure may be affected by the non-linearity for faint enough stars. The correction formula derived in Section 4 to bring the long and short exposures into agreement has been applied to both the short and the long exposure data; more details are given in Section 4. Basic measurement We then proceeded to determine a baseline measurement of the magnitude difference as a function of the various observational variables: exposure time, reference magnitude, background, history, filter, and position in the detector. We examine each one in turn. Magnitude and exposure time Figure 1 gives the most basic representation of the anomaly: the magnitude difference (short minus long) is plotted as a function of magnitude in the long exposure for non-preflashed F814W images. Magnitudes are defined in a 2 pixel aperture; individual panels compare short exposures of 10s, 40s, 100s, and 300s, respectively, against the reference long exposure which is always 1000s. The crosses indicate the median difference in 0.5 magnitude bins, and the vertical bars span the interquartile range (between the 25% and 75% percentile) for each bin. Figure 1 shows clearly that 1) the magnitude difference is a strong function of magnitude, with a larger difference found for fainter objects, and 2) for a given magnitude, the magnitude discrepancy is larger for larger ratios of exposure times. This suggests that the magnitude discrepancy is largest when the “short” exposure has the fewest counts, either because the object is faint or because the exposure time is short. We will quantify this dependence in Section 4. 5 Figure 1: Magnitude discrepancy vs. reference magnitude for various exposure times, without preflash. Magnitude I=21 corresponds to 1.7 counts/second. Dependence on aperture The magnitude discrepancy occurs for all apertures, and generally seems to increase with the size of the aperture. This is illustrated in Figure 2, where the median and interquartile range for the magnitude difference between non-preflashed 40s and 1000s exposures is plotted as a function of the magnitude in the long exposure. The median is shown for each aperture, and the interquartile range for the 1 pixel aperture only. For example, the median magnitude discrepancy for I ~ 21 mag (about 1.7 counts/second in the 2-pixel aperture) nearly doubles, from 0.18 mag in the 1 pixel aperture to 0.35 mag in the 5 pixel aperture. Note that there is a slight reversal of this trend for the faintest stars, where the discrepancy in the 5 pixel aperture is smaller than in the 3 pixel aperture. Other apertures and preflash levels show very similar results, as shown in Figure 3 for the 100s exposure with a preflash of 100e/pixel. 6 Figure 2: Dependence of magnitude discrepancy on aperture: 40s exposure, no preflash. The general pattern thus is that the discrepancy increases with the size of the aperture used, with the exception of very faint stars in apertures > 3 pixel. In the following, we will use almost exclusively a 2 pixel aperture, which is a good compromise for most projects requiring accurate photometry: larger apertures generally increase the statistical noise because of the additional background and read noise, and smaller apertures may be excessively sensitive to the focus position (Suchkov and Casertano 1997). The 2 pixel aperture has been often used in the literature for WFPC2 data, and a high-quality CTE correction is available (Whitmore and Heyer 1997, Whitmore 1998). Dependence on background level The other well-known WFPC2 non-linearity, the CTE effect, lessens its impact with increasing background, presumably because the increase in background helps fill the traps that are likely responsible for the loss of charge. This is an important element to establish 7 Figure 3: Aperture dependence for 100s exposure with preflash of 100e/pixel. the impact of this anomaly on real-world observations, since observations designed to detect faint sources usually include long exposures, which often have significant background (up to about 150 e/pixel for normal broad-band V and I exposures). Since we observed relatively bright stars, the natural background in our short exposures - designed to test the magnitude discrepancy for real-world faint objects - is typically less than 5 e/ pixel. In order to test the influence of the background, we added an artificially elevated background to some of the images, in the form of an image preflash. The preflash was obtained by turning on the INTFLAT lamp, which illuminates the chip via light reflected off the shutter blades, for a predetermined amount of time. A narrow-band filter (F502N) was used to obtain a convenient count rate. We used preflash levels of 5, 10, 100 and 1000 e/pixel, bracketing the values that are likely to occur in real observations. Since the illumination produced by the INTFLAT lamp is not uniform, we measure the actual background individually for each star. 8 Indeed, the non-linearity appears to decrease somewhat with increasing background, at least at very high background levels. In Figure 4 we plot the magnitude discrepancy between the 40s and 1000s exposures within a 2-pixel aperture for stars with 20.5 < I < 21.0, as a function of background around the star. Figure 4: Magnitude discrepancy vs. background. However, a substantial decrease of the discrepancy is only seen in the high background case: 150 DN/pixel (about 1000 e/pixel) are required for the median discrepancy to drop from 0.25 mag to 0.15 mag. At such high background, the ability to measure individual faint sources is impaired by the additional shot noise produced by the preflash, as shown by the increased size of the error bars in Figure 4. For example, an I=20 source produces about 50 ± 5 DN in 40s within a 2 pixel aperture, where the rms error includes read noise, shot noise, and a background of about 5 DN/pixel; the source magnitude can thus be measured with a statistical uncertainty of about 0.1 mag. With the large preflash used here 9 (about 150 DN/pixel), the signal is increased by about 1800 DN, bringing the statistical error to about 17 DN - or 0.3 mag. Therefore, preflashing is not a viable method to reduce the impact of the long vs. short anomaly on magnitude measurements for faint sources. Similarly, an extremely high background - unlikely to occur, except in extremely crowded fields or on within an extended source, such as a galaxy - is required to suppress slightly the magnitude discrepancy. Therefore, it appears that the background does not play a significant role in the long vs. short magnitude discrepancy. Figure 5: Effect of noiseless preflash (thin lines) compared with non-preflashed exposures (vertical bars). Dependence on history and noiseless preflash Comparison of images taken with the same parameters at different points in the orbit, before or after long exposures, and before or after preflash shows no measurable change. 10 The magnitude discrepancy appears to have no significant history term: it depends on the properties of each exposure and not on the status of the camera at the time. We tested separately a special case of dependence on history: the so-called noiseless preflash, which consists of preflashing the detectors with charge that is read out before the actual exposure is taken. This test was performed in the hope that the charge generated by a heavy preflash would be persistent enough in time to reduce the magnitude discrepancy even if read out. In the surface trap picture (Biretta and Mutchler 1998), the interpretation would be that the traps responsible for the charge loss would be filled, and perhaps remain filled for long enough that subsequent exposures would lose less charge, just as preflashed exposures lose less charge. We carried out a noiseless preflash test by illuminating the detectors with a total charge of 3000 e/pixel, three times more than the highest normal preflash we used, before the start of a series of fourteen 40s exposures. The 40s exposures were then reduced similarly to all other exposures, and the magnitude discrepancy compared with that of the “standard” 40s exposures. However, there was a 35 minute interval between the preflash and the start of the 40s exposures; based on the recent results of Biretta and Mutchler (1998), this is more than twice the half-life of the trapped charge, so that any benefit of the noiseless preflash would have been greatly reduced. Figure 5 shows the result of the noiseless preflash test. Each of the thin lines plots the median magnitude discrepancy between one of the fourteen 40s exposures and the standard 1000s long exposure. The solid line with error bars shows the median and interquartile range for the normal, non-preflashed 40s exposure. There is no measurable difference between the exposures with or without noiseless preflash, or within the set of consecutive exposures after the noiseless preflash. While this indicates no effect of the noiseless preflash on the current data, the long delay between the preflash and the exposures, combined with the new information on the decay time of trapped charge, indicate that a new test of the noiseless preflash, with a short interval between preflash and test exposures, is required. Dependence on position on the chip Another test of interest is the dependence of the magnitude discrepancy on the x and y position within the chip. The CTE effect is well known to depend primarily on row number (or the y position), as it consists of a charge loss proportional to the number of rows traversed during readout; this is the parallel-register CTE, or y-CTE. Whitmore and Heyer (1997) have recently published an extensive quantitative characterization of the CTE effect using a set of images in which stars were shifted from one CCD to another, and thus moved from the top to the bottom or from the right to the left of the CCD (since each CCD has a different orientation on the sky). They also find a CTE effect in the x direction (serial register CTE, or x-CTE). 11 Figure 6: x and y dependence of the short vs. long magnitude discrepancy. If the data used here are affected by the CTE loss, we expect to see a dependence of the long vs. short magnitude discrepancy on the x and y coordinate as a second-order effect, even for images taken at the same pointing. The reason is that the CTE charge loss is larger for fainter images (fewer total counts), and therefore sources at high row numbers will be affected more in the short exposures than in the long exposures, thus contributing a row-dependent term to the ‘‘long vs. short’’ anomaly. For example, consider two stars of the same magnitude, one at small y and the other at large y. A long and a short exposure are taken. The star at small y will see very little y-CTE effect. The star at large y will see a smaller fractional charge loss in the long exposure (CTE is small for bright objects), and a larger fractional charge loss in the short exposure. Thus the CTE loss will appear as a “long vs. short” effect at high y, but not at low y. Similar considerations apply to the x-CTE if present. 12 Figure 7: x and y dependence of the magnitude discrepancy after CTE correction This effect can be seen in Figure 6 (top), where the median and interquartile ranges of the magnitude discrepancy are plotted against the y coordinate for 40s and 100s exposures without preflash. On the other hand, the magnitude discrepancy appears to vary only very weakly with the x coordinate (Figure 6, bottom), possibly due to the smaller amplitude of the x-CTE. In order to determine the ‘‘true’’ dependence of the long vs. short anomaly on position in the chip, we correct the measured magnitudes for the CTE loss as recommended by Whitmore and Heyer (1997), with the modifications suggested in Whitmore (1998) to account for the time variation in the CTE loss. Specifically, we apply the following corrections: ∆ f y = 1.47 ⋅ ( y ⁄ 800 ) ⋅ 10 1.0474 – ( 0.2564 ⋅ log BKG ) – ( 0.0987 ⋅ log CTS ) ∆f x = 1.26 ⋅ ( x ⁄ 800 ) ⋅ ( 7.373 – 1.57 ⋅ log CTS ) 13 (1) where ∆f is the percent change in flux, BKG are the total counts in DN (gain 7) per pixel in the background, and CTS are the total counts in DN in the source (2 pixel radius). After these corrections, the residual magnitude discrepancy (Figure 7) appears essentially independent of position; the y dependence is almost entirely corrected by the Whitmore and Heyer formulae, while the x dependence appears slightly overcorrected. We will use the CTE-corrected measurements in the remainder of the analysis. Figure 8: The magnitude discrepancy in F555W (solid), compared with F814W (dashed) Dependence on filter Finally, we wish to check whether the magnitude discrepancy is the same in different filters. The bulk of the data for program 7630 were taken in F814W, but we also collected a limited amount of data in F300W and F555W. Figure 8 shows the magnitude discrepancy for F555W, plotted as a function of instrumental magnitude - thus points at the same 14 abscissa have the same number of counts in equal-length exposures in the two filters. The magnitude discrepancy is essentially the same in both filters for a given instrumental magnitude. Unfortunately, the data in F300W proved insufficient to characterize the magnitude discrepancy, because of the low flux and small number of usable stars. Figure 9: Median and interquartile range for the magnitude discrepancy in F814W for different exposure times, plotted vs. the total counts in the short exposure. 4. Data Analysis 2: A Unified Description As illustrated in Section 3, the basic features of the so-called long vs. short anomaly are: strong dependence on counts, weak dependence on background, and no measurable dependence on history, filter, and on position in the chip (the latter after correcting for the well-known CTE anomaly). Here we present a simple description that explains the major features of the long vs. short anomaly and offers an avenue towards correcting its effects in real-world data. 15 In this view, the long vs. short anomaly is due to a non-linearity of the WFPC2 detectors and/or signal chain. The non-linearity causes a loss of signal which is proportionately larger for fainter signal. The result is a fractional signal loss (thus magnitude discrepancy) which is primarily a function of the total signal itself. In Figure 9 we illustrate this functional dependence by plotting the magnitude discrepancy in non-preflashed images vs. the total signal in the short exposure. The curves for different exposure times overlap very well, indicating that the primary determinant of the magnitude discrepancy is indeed the total observed signal. There is a slight deviation for faint stars in the 300s exposure, which can be explained as residual non-linearity in the reference image (a faint star in the 300s image will be rather faint in the 1000s image as well). Figure 9 is for non-CTE-corrected magnitudes; the plot for CTE-corrected magnitudes is very similar. With this interpretation of the behavior of the WFPC2 detectors, there will be a functional relation between the total flux impinging on the detector and the measured flux, defined by the shape of the curves in Figure 9. Therefore it is possible to define a correction function that can be applied to the observed flux to recover the true flux. The correction function can be expressed in terms of the magnitude discrepancy dm expected at given observed counts and background. After considering various functional forms, we find that a convenient expression is the following: A dm = ---------------------------------------------------------------------21 + B ⋅ counts + C ⋅ counts (2) where counts are the background-subtracted source counts in a 2-pixel aperture, measured in DN at gain 7. There does appear to be some background effect for very high background and at low count levels (see Figure 4), but it is not statistically significant in the overall fit. The functional form of Equation (2) is not unique, but offers a very simple correction and fits well the measurable characteristics of the long vs. short anomaly. The quantities A, B, and C are adjustable parameters whose best values, found by a non-linear least squares optimization, are: A = 0.629 B = 0.0315 C = 0.000333 (3) With this choice of parameters, the magnitude discrepancy is fitted quite well, except for very faint objects (< 30 counts). The residuals for all points are shown in Figure 10; the median and quartiles, as a function of the total source counts, are given in Figure 11. Note that the correction in Equations (2) and (3) has been applied self-consistently to both long and short exposures. The residual error has no obvious systematic component above 30 16 counts, but the discrepancy is somewhat undercorrected below 30 counts; we will discuss this point again at the end of the Section. Figure 10: Residual magnitude discrepancy after correction for dm in Equation 2. After correction, the median residual systematic discrepancy is less than 3% for sources with more than 30 counts; note that the shot noise alone is about 7% for a source with 30 counts. The residual dispersion, as measured by the chi-squared value, is about 1.7 times the nominal photometric error; however, part of the excess dispersion is due to a broad tail to the distribution of magnitude errors, possibly related to the non-standard data reduction procedures needed for cosmic ray rejection in the present dataset. The interquartile range compares well with the expected nominal error. Since the CTE-related charge loss also depends on the measured flux and background, it would have been preferable to fit simultaneously for both CTE and ‘‘long vs. short’’ non-linearity. In practice, the dataset used here is not well suited for an independent deter- 17 mination of the CTE correction, and therefore we have adopted the CTE prescription of Whitmore and Heyer (1997) and Whitmore (1998). The long vs. short magnitude correction given here applies after the appropriate CTE corrections (Equation 1) have been carried out, but please note that the measured flux counts in the equation above is the detected flux without any form of correction. Figure 11: Median and quartiles of the residual magnitude discrepancy, before and after correction. The correction thus derived works reasonably well for F555W data as well. Figure 12 shows the median of the residual magnitude discrepancy for the F555W data after correction with Equations (2) and (3). The short exposure in F555W was 40s and the long exposure was 300s. The magnitude discrepancy is well corrected above 30 counts, and - as in the case of F814W - undercorrected at lower source counts. 18 Figure 12: The discrepancy in F555W data after correction with the F814W equation. The undercorrection at low count values cannot be easily avoided with the chosen functional form. Forcing a better correction below 30 counts causes an overcorrection in the range 100-400 counts, where the magnitude is measured with much smaller statistical uncertainty; thus we prefer to adopt the correction that works best where the magnitude measurements are better. 5. Recommendations The procedure to correct the photometry of point sources for the “long vs. short” nonlinearity is the following: 1. Carry out the standard aperture photometry using an aperture of radius 2 pixel; do not apply any aperture corrections. Retain the value of measured flux and sky background; 19 2. Determine (do not apply yet) the CTE correction as detailed in Whitmore and Heyer (1997) and Whitmore (1998); see also Equation (1) in this document; 3. Determine the magnitude correction dm according to the following formula: 0.629 dm = --------------------------------------------------------------------------------------------------------------2 1 + 0.0315 ⋅ ( counts ) + 0.000333 ⋅ ( counts ) (4) where counts are the total source counts (after background subtraction) within the 2pixel radius aperture, expressed in DN at gain 7; subtract dm from the magnitude; 4. Now apply the CTE and aperture corrections, as well as any other relevant corrections (focus, contamination). Caveats The correction expressed in Equation (4) has been derived for a specific dataset, and it must be applied with care under more general circumstances. For example, scientific WFPC2 data often consist of numerous images with similar or different exposure times, or have been taken at gain 15; neither of these circumstances is directly addressed by our test dataset. Multiple exposures If multiple exposures of the same length are available, we expect that Equation (4) can still be applied, as long as the average value of counts is used. If the exposures are of dissimilar length, most likely the total counts will be dominated by the longest exposures, which therefore determine the value of dm to be used. An untested refinement is the following procedure: • Group together exposures of similar length; • Record the count rates obtained in each exposure or average of similar-length exposures; • Apply to each a multiplicative correction equal to 100.4 ⋅ dm , using the value of counts appropriate to each image group; • Average the corrected count rates (weighted according to their S/N, if desired) and convert to magnitudes. This procedure assumes that the magnitude correction of Equation (4) brings the count rates measured in different exposure times into agreement, and thus should in principle work; however, we have not been able to test this procedure in practice, and cannot quantify its accuracy. 20 Gain 15 data All observations for CAL 7630 were taken at Gain 7. If the anomaly originates in the detector, then Equation (4) should apply for Gain 15 data as well, as long as the source counts are expressed at Gain 7 equivalent by multiplying them by the gain ratio (approximately 2; Holtzman et al 1995). However, if the anomaly originates elsewhere in the signal chain, we cannot quantify its effect on Gain 15 data, which use different electronics. Which zero point should I use? Finally, note that the published WFPC2 zero points and its estimated system throughput are based on exposures with a total of several thousand counts, for which dm in Equation (4) is very small (< 0.0001). Therefore the published zero points are directly applicable after the correction in Equation (4) applied to the observed data. 6. Open issues The observations taken for program 7630 attempted to cover as broad a range of exposure times and preflash values in the F814W filter as practical. However, due to limitations of both observations and analysis, we could not cover all conditions that could conceivably occur in real observations. A number of open issues remain, some of which could be addressed with more data or with the use of archival data, while others are amenable to a more sophisticated analysis. Some of the questions still open are: 1. The magnitude discrepancy in filters other than F814W. We have limited data in F555W, which are fitted reasonably well by Equation (4). However, we have insufficient data for F300W, and no data for other filters, such as the extreme UV or narrow-band filters. There is no reason to expect that the non-linearity of the detectors and signal chain depend strongly on the wavelength - note that the photons detected in UV observations are in reality 500 nm photons emitted by the lumogen coating of the CCD - but it is possible that the optimal correction parameters might depend on the wavelength. 2. The time dependence of the magnitude discrepancy. Data taken in 1994 and in 1997 appear to show comparable amounts of magnitude discrepancy, but we do not have enough information to put quanitative constraints on the change in the magnitude discrepancy over the life of WFPC2. 3. The interrelation between CTE and the magnitude discrepancy. As stated in Section 4, ideally it would be best to fit simultaneously for both magnitude discrepancy and CTE-related charge loss. We plan to carry out such a fit in the future. 4. Quantifying the magnitude discrepancy as a function of aperture radius. The discrepancy generally increases with the radius of the aperture used for the photometry, but a quantitative formula requires a general formula for the CTE-related charge loss, which is not yet available. 21 5. The physical interpretation of the non-linearity. The strong correlation between magnitude discrepancy and total source counts suggests that understanding the microphysics of the detectors and/or non-linearities in the signal chain might shed light on the discrepancy - and possibly yield a better correction formula - but work in this direction has not been done yet. 6. The effect of noiseless preflash. A new test is required with a short time interval between preflash and observations. 7. The behavior of the magnitude discrepancy in extreme cases. For example, a large number of repeated exposures can be used to achieve good signal-to-noise ratio for very faint sources; because of the prohibitive cost of such an experiment, we were unable to reproduce these conditions in our calibration program. 8. Extended sources. The data presented here refer exclusively to point sources; a test for the long vs. short nonlinearity in an extended source was carried out by Stiavelli and Mutchler (1997), who found some marginal evidence for a difference of about 10% between long and short exposures at count levels of about 5 DN/pixel. However, they were unable to provide a systematic description of the discrepancy they found. Furthermore, they used images of the bright galaxy NGC 4472, which nearly fills the WFPC2 field of view; it is unclear how their results apply to the more common case of a faint source extending over a few tens of pixels. 7. References Biretta, J. A., et al, 1996, The WFPC2 Instrument Handbook, version 4.0 Biretta, J., and Mutchler, M., 1998, WFPC2 Instrument Science Report 97-05 Casertano, S., 1995, internal STScI report, available at URL http://www.stsci.edu/ ftp/instrument_news/WFPC2/Wfpc2_cte/shortnlong.html Casertano, S., 1997, in The 1997 HST Calibration Workshop, eds. Casertano, Jedrzejewski, Keyes and Stevens (Baltimore: STScI), p. 327 Holtzman, J., et al., 1995, PASP 107, 1065 Kelson, D. D., el al., 1996, ApJ 463, 26 Ratnatunga, K.U., 1995, private communication Saha, A., et al., 1996, ApJ 463, 26 Suchkov, A., and Casertano, S., WFPC2 Instrument Science Report 97-01 Stetson, P., 1995, unpublished (reported in Kelson et al. 1996 and Saha et al. 1996) Stiavelli, M., 1995, unpublished Stiavelli, M., and Mutchler, M., 1997, WFPC2 Instrument Science Report 97-07 Whitmore, B., and Heyer, I., 1997, WFPC2 Instrument Science Report 97-08 Whitmore, B., 1998, WFPC2 Technical Instrument Report 98-01 22