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, and the line emission is filter-specific. 

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 the helium emission 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; Jupyter notebooks available for correcting the background are discussed later in this section.

Strong time variation in the background during a MULTIACCUM ramp can corrupt the calwf3 (wfc3ir) cosmic-ray identification algorithm (CRCORRSection 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.

Four Jupyter notebooks were created to aid users in identifying images affected by variable background. These notebooks are briefly described in Table 7.2, and in more detail below and in Section 9.5.3. These visualization tools may be used to identify issues with the data, for example, a guidestar (GS) failure, a satellite trail in a specific read, or time variable background. 

Table 7.2: Jupyter notebooks that can be used to help identify images affected by variable background (see also Section 3 of STAN 42)

Notebook TitleMethod(s)Usage

IR IMA Visualization Tools with an Example of Time Variable Background

Inspect the IMA MULTIACCUM images and produce signal ramp plots to determine whether a dataset needs reprocessing.

Any IR imaging filter.
Compares cumulative vs instantaneous signal in ramp.

Manual Recalibration with calwf3: Turning off the IR Linear Ramp Fit

Use the final read of the IMA MULTIACCUM image, skip the ramp fit, and create an FLT image.

Any IR imaging filter.
Uses Astrodrizzle to combine FLTs and reject cosmic rays.

Correcting for Helium Line Emission Background in WFC3/IR Exposures using the "Flatten-Ramp" Technique

Subtract the median background per IMA read and re-run the ramp fit with calwf3.

All filters affected by the helium line emission background.
Corrects uncharacteristically 'noisy' FLT images with poor ramp fits.

Correcting for Scattered Light in WFC3/IR Exposures: Using calwf3 to Mask Bad Reads

Mask specific reads in the RAW image and reprocess with calwf3, including running the ramp fit.

Removes scattered light present in reads at the beginning or end of an exposure.
Uses AstroDrizzle to combine FLTs.

Correcting for Scattered Light in WFC3/IR Exposures: Manually Subtracting Bad Reads

Subtract specific reads from the IMA MULTIACCUM image, skip the ramp fit, and create an FLT image.

Removes scattered light or anomalies present in any read.
Uses AstroDrizzle to combine FLTs and reject cosmic rays.

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.

Two new Jupyter notebook tutorials show how to reprocess datasets affected by scattered light using different methods. The first notebook, Correcting for Scattered Light in WFC3/IR Exposures: Using calwf3 to Mask Bad Reads, is based on the F140W exposure (icqtbbbxq_flt.fits) shown in the top-left panel of Figure 7.11. 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 average flux between consecutive IMA reads is computed 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 (due to the geometry of the optical bench, see Section 1.1), it is easy to determine which reads are impacted. When the ratio of the differential count rate for two regions of the detector exceeds a 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. 

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 1000 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 new version was produced by calwf3 after masking the first 5 reads (not including the zero read) in the RAW file. The reprocessed image is free of Earth limb scattered light and the background is uniform over the entire field of view though with an unavoidable reduction in effective exposure time, from 1403 to 1000 seconds (see notebook Correcting for Scattered Light in WFC3/IR Exposures: Using calwf3 to Mask Bad Reads).  Blob regions are filled by calwf3 with their original, higher signal value as discussed in the text however these regions are flagged in the DQ array and may be rejected when combining dithered exposures.

Bottom: The difference in count rate between individual reads in a WFC3/IR _ima.fits file (see notebook WFC3/IR IMA Visualization Tools with An Example of Time Variable Background. For this particular scattered light exposure, excess signal affects the first several reads, manifested as a higher median count rate on the left side of the image (orange triangles) than on the right side of the image (green triangles). The left and right side count rates level out in later reads to a Zodiacal light level of +0.9 e-/s.

A second Jupyter notebook shows an alternative strategy for removing scattered light: Correcting for Scattered Light in WFC3/IR Exposures: Manually Subtracting Bad Reads. This method does not leave residuals in blob regions in the recalibrated image though it is more computationally intensive. 

Alternatively, exposures impacted by scattered light may be reprocessed using the 'Last-minus-first' technique described in WFC3 ISR 2016-16 and in the Jupyter notebook described in Section 7.10.2. While this method is the most straightforward, it will result in a spatially varying sky background in the recalibrated image. Photometry on such a calibrated FLT image will therefore require a local background correction to account for the sky however the exposure will have the expected noise distribution. While this strategy is insensitive to any background variations during the exposure, the lack of an up-the-ramp fit requires the user to identify CRs by other means, for example, comparing multiple exposures with AstroDrizzle

7.10.2 Metastable Helium 1.083 μm Emission Line

Line emission at 1.083 microns due to 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 a factor 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 (see also the Jupyter notebook WFC3/IR IMA Visualization Tools with An Example of Time Variable Background). The correction techniques can be summarized as follows.

The first method is the 'Last-minus-first' technique described in the previous Section and in the Jupyter notebook: Manual Recalibration of Images using calwf3: Turning off the WFC3/IR Linear Ramp Fit which is discussed in Section 9.5.3. In this workflow, the calwf3 ramp fitting step is turned off (CRCORR=OMIT) so that the calibrated (_flt) image is the result of subtracting the first read from the last read, then dividing 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 stable zodiacal background and the second was impacted by variable helium line emission. The central panel shows both images reprocessed with the ramp fitting (CRCORR) turned off. While the noise properties of the images are now improved, omitting the up-the-ramp fit leaves CRs in each image which must be identified by other means, such as AstroDrizzle.

The bottom panel of Figure 7.12 shows the second image as reprocessed using the 'Flatten-ramp' technique which equalizes the background signal rate for each read prior to performing the ramp fit (see Section 9.5.3 and the Jupyter notebook Correcting for Helium Line Emission Background in WFC3/IR Exposures using the “Flatten-Ramp” Technique). 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 has been used successfully e.g. for reprocessing the 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 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 stable 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 only higher due to the elevated background level but also exhibits a bimodal non-Gaussian shape. Exposures such as these require manual reprocessing (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 although the cosmic rays in each exposure must now be identified and removed.

Bottom: Results from reprocessing with the “Flatten-ramp” technique. The statistics of the reprocessed image are indistinguishable from the "Last-minus-first" image with the added benefit of cosmic ray removal by calwf3.

Figure from WFC3 ISR 2016-16.