7.10 Time-Variable Background

The background in the WFC3/IR channel is a combination of zodiacal light, scattered light from the bright Earth limb, and line emission at 1.083 μm from helium atoms excited by sunlight in the Earth's upper atmosphere. The strength of the zodiacal light depends on the orientation of the target with respect to the sun, which varies throughout the year but is effectively constant within a given exposure/orbit/visit. The scattered light and line emission components can vary within an orbit and even within a single exposure.

Scattered light can often be present for observations made when the limb angle, which is the angle between HST's pointing direction and the nearest limb of the bright Earth, is less than ~30 degrees (WFC3 ISR 2002-12, WFC3 ISR 2009-21). The total amount of scattered light increases as the target-to-limb angle decreases throughout an orbit, producing a background which is both time- and spatially-variable. This primarily impacts the left side of the detector (Figure 7.11) and can affect all filters and both grisms.

The helium emission line is seen when the spacecraft leaves the Earth shadow and enters the illuminated atmosphere. The strength of the increased background depends on the observed path-length through the atmosphere, and as a diffuse source shows no spatial structure in the F105W and F110W filters (WFC3 ISR 2016-16). For the G102 grism, the helium emission has a unique spectral signature and must therefore be corrected using a background model. A discussion of variable background subtraction methods for the IR grisms and an updated set of dispersed background models are provided in WFC3 ISR 2020-04.

Strong time variation in the background during a MULTIACCUM ramp can corrupt the calwf3 (wfc3ir) cosmic-ray identification algorithm (CRCORR, Section 3.3.10), which assumes that a given pixel sees a constant count rate from a combination of sources and diffuse background (i.e., the "ramps" are linear). Strong time variation in the background can trip the CR thresholds, with most or all of the image identified as a CR at a given read. Furthermore, since the background variation is fairly smooth from read to read any algorithm that tries to iteratively identify clean reads before and after a CR hit will likely fail.

The primary impact of the strong background variations is to increase noise as it reduces the available exposure time in the final flt products (e.g. only one or two reads out of 15 are used to form the flt). Furthermore, the distribution of background pixel values frequently shows multi-modal non-Gaussian shapes as different parts of the image trip (Fig 7.12) and confuse the CR algorithm in different ways. As a consequence, default flt products generated from ramps with time-variable background are not recommended for scientific analysis and should be manually reprocessed using one of the strategies described below.

7.10.1 Scattered Earthlight

Observations made when HST is pointing near the bright Earth limb can result in the leftmost ~200-400 columns of the detector being subjected to background levels up to twice as bright as that on the rest of the chip. The overall shape of this high background region is similar from one affected image to another, but the overall brightness and the number of affected pixels varies as the HST pointing approaches or recedes from the bright Earth limb. Details on the nature of this effect in IR darks can be found in WFC3 ISR 2009-21.

The top-left panel of Figure 7.11 shows an example of scattered light for a single F140W exposure (icqtbbbxq_flt.fits) from image association 'ICQTBB020'. This image was acquired during the first half of the orbit and is contaminated by scattered light in multiple reads. To identify the impacted reads, the median background rate (e.g. the difference between IMA reads) is computed using Equation 3 from WFC3 ISR 2018-05 for two different regions of the detector and plotted in bottom panel of Figure 7.11. Because scattered light always occurs on the left side of the detector, it is easy to determine which reads are impacted via simple statistics. Note that while the image header reports an NSAMP value of 16, there are actually 15 science extensions in the IMA file. These are numbered by calwf3 in reverse time order, such that [sci,15] is the first read with an exposure of 2.9 seconds and [sci,1] is the last read with a cumulative exposure of 1402.9 sec, as indicated in the figure.

When the ratio of the differential count rate for two regions of the detector exceeds some user-defined threshold, those reads may be flagged as 'bad' in the RAW frame and then excluded during calwf3 reprocessing. For this sample dataset, the first five reads show a strong excess at the left hand side (LHS) of the detector, indicated with dashed lines. The python code below shows how to mask the entire DQ array for reads 10-15 in the RAW file with a value of 1024 (currently unused for WFC3/IR) and then rerun calwf3.

from wfc3tools import calwf3
from astropy.io import fits
import numpy as np
reads=np.arange(10,16)
for read in reads:
    fits.setval('icqtbbbxq_raw.fits',extver=read,extname='DQ',keyword='pixvalue',value=1024)
calwf3('icqtbbbxq_raw.fits')

The recalibrated FLT image is displayed in the top-right panel of Figure 7.11 with the same color stretch as the original image. While the total exposure is reduced from 1403 seconds to 900 seconds, the background in the reprocessed image is now uniform over the entire field of view. Bright circular residuals show a higher background for regions affected by blobs (see Section 7.5). Because calwf3 assumes that any pixel flagged with a DQ value of 512 (bad in flat) is bad in every read, the software fills in these regions with the pixel value from the total exposure. For associated images with a large dither to step over the blobs, the calibrated FLT data may be re-drizzled while rejecting any pixels with 512 flags. When combining observations, AstroDrizzle will then replace those pixels with unflagged regions from the second (dithered) exposure in the association.

Figure 7.11:  (Top, left) Calibrated FLT image (‘icqtbbbxq_flt.fits’) impacted by scattered light from the Earth limb, seen as a bright excess at the left side of the detector.

(Top, right) The reprocessed FLT image, displayed with the same scaling as the original. This image was produced by calwf3 after masking the first 6 reads in the RAW file, reducing the effective exposure to 900 seconds. Blob regions are filled by calwf3 with their original, higher signal value as discussed in the text, but these regions are flagged in the DQ array and may be rejected when combining dithered exposures.

(Bottom) The difference in the median background rate between consecutive reads in the IMA file versus the cumulative exposure time for the left (blue) and right (red) side of the detector. Dashed lines indicate reads where the ratio of the LHS/RHS >1.05, which are excluded when reprocessing with calwf3. Numbers on the x-axis above the exposure time correspond to the science extension of the IMA file, where [sci,15] corresponds to the first read and [sci,1] to the last read.


Alternatively, exposures impacted by scattered light may be reprocessed using the 'Last-minus-first' technique described in WFC3 ISR 2016-16 and in the tutorial in Section 3.5.2. This turns off calwf3's ramp fitting step (CRCORR), treating the IR detector like a CCD that accumulates charge and is read out only at the end of the exposure. In this case, the observed count rate is determined by simply subtracting the first from the last read of the detector and dividing by the time elapsed between the two reads. Photometry on such a calibrated FLT image will require a local background correction, but the exposure will have the expected noise distribution. While this strategy is insensitive to any background variations during the exposure, it requires the user to then identify CRs by other means, for example, comparing multiple exposures with AstroDrizzle

7.10.2 Metastable Helium 1.083 μm Emission Line

Line emission from metastable helium in the Earth’s upper atmosphere affects the F105W and F110W filters and the G102 grism. When present, this emission can increase the IR background by up to factors of 6 above the nominal zodiacal background. This spatially diffuse source affects portions of HST orbits where both the telescope and the atmosphere are illuminated by sunlight. WFC3 ISR 2014-03 describes this effect in more detail while WFC3 ISR 2016-16 demonstrates how to identify exposures affected by time-variable background and suggestions for reprocessing the affected exposures. The correction techniques can be summarized as follows.

The first method is the 'Last-minus-first' technique described in the previous Section, i.e. the calwf3 ramp fitting step is turned off (CRCORR=OMIT) and the calibrated flt image is the result of the subtraction of the first read from the last read divided by the time elapsed between the two reads. The top panel of Figure 7.12 compares two back-to-back F105W exposures acquired in a single orbit, where the first had a constant zodiacal background and the second was impacted by variable helium line emission. The central panel shows both images reprocessed with the ramp fitting turned off. While the noise properties of the images are now improved, this leaves CRs in each image which must be identified by other means, such as AstroDrizzle.

The bottom panel of Figure 7.12 shows the results of reprocessing the second image using the 'Flatten-ramp' technique which equalizes the background signal rate for each read prior to performing the ramp fit. First, calwf3 is run up to the point of generating the calibrated IMA files but omitting the cosmic-ray identification step (CRCORR). The median background is then subtracted from each read, assuming a constant excess signal for every pixel. Next, a constant value, representing the average count rate of the full exposure, is added back to preserve pixel statistics. Processing with calwf3 is then resumed to perform the ramp fit (CRCORR) step. This approach works well for relatively sparse fields where sky background is easily determined and was used for reprocessing a large sample of archival images used to generate IR sky flats (see WFC3 ISR 2021-01). The statistics of the reprocessed image are indistinguishable from the "Last-minus-first" technique, but with the added benefit of having the cosmic rays identified and removed by calwf3.


Figure 7.12: (Top) Comparison of back-to-back F105W exposures in an orbit, where the first exposure (left column) shows a constant zodiacal light background and the second exposure (center column) is impacted by time-variable Helium line emission. The pixel distribution of the second exposure is poorly behaved (right column): the noise is not simply higher due to the elevated background level but it also shows a bimodal non-Gaussian structure. Exposures such as these should either be discarded or reprocessed (see text).

(Center) The same two images and pixel distributions are shown after reprocessing with the 'Last-minus-first' technique (CRCORR=OMIT). The noise properties of the products have improved but the cosmic rays in each exposure must now be identified by other means.

(Bottom) Results from reprocessing with the “Flatten-ramp” technique. The statistics of the reprocessed image are indistinguishable from the "Last-minus-first" image, but with the benefit of cosmic rays being removed by calwf3.

Figure taken from WFC3 ISR 2016-16.