Spitzer Documentation & Tools
IRAC Instrument Handbook
  • Summary of document button
  • Table of Contents button

 

5.2                  The Artifact-Corrected BCD Pipeline

There are several artifacts commonly seen in IRAC images. For a complete description, see Chapter 7. To mitigate the commonly found artifacts of stray light, saturation, muxstripe (Section 7.2.2), column pull-down (Section 7.2.4), and banding (Section 7.3.2), an artifact correction pipeline was created. It performed the artifact correction on the BCD files. The pipeline then createed a product called a corrected BCD, or CBCD. The CBCDs were used to create the pipeline mosaic. An archive user also has access to the BCD and CBCD files in case the artifact correction was not completely successful or it needs to be run again more conservatively.

 

At each step, an attempt was made to identify the artifacts in the BCDs, adjust the imask pixel values according to the identified artifact, and correct the artifact, with CBCD files being the corrected files. The history of these artifact changes was recorded within the imask file headers. The user can find all of the artifact correction modules on the contributed software section of IRSA’s Spitzer website, and replicate or improve the corrections using the BCD and imask files as input.  

5.2.1        Stray Light

The IRAC stray light masker was designed to mask out stray or scattered light from stars outside the array location as well as filter ghosts from bright stars. The module would alter each imask, corresponding to each BCD file, with pixels likely to be affected by stray light, by turning bit 3 on for those pixels that are likely to be affected by scattered light. The program turned imask bit 2 on for those pixels likely to be affected by filter ghosts.

 

The module first queried the 2MASS database, producing a table of sources that were likely to produce scattered light within the field of view. Using the BCDs and the 2MASS table, including the flux of the bright sources, possible stray light affected areas were calculated. These pixel positions were then turned on within the imask. When the CBCDs were combined to a mosaic, the corresponding pixels in the CBCDs were not used to produce the mosaic, thereby masking out the input pixels possibly affected by scattered light.

 

IRAC data users are reminded that observations that were not adequately dithered (such as the ones made with the small-scale dither patterns) will have gaps if the stray light mask was used. In these cases, the stray light masking program can be downloaded from IRSA’s Spitzer website

 

https://irsa.ipac.caltech.edu/data/SPITZER/docs/dataanalysistools/tools/contributed/irac/straylight/

 

and run on the BCDs in an unaggressive mode by setting a keyword. This disables the production of the larger masks for very bright stars (which produce diffuse scattered light over a large fraction of the array), avoiding gaps in mosaics. More information about stray light can be found in Section 7.3.1.

5.2.2        Saturation

Many of the following artifact corrections need knowledge of the offending source’s flux to work correctly. For observations of very bright sources, the signal (and even pedestal) reads can be saturated. Therefore, the next step in the artifact mitigation process was the saturation correction. 

 

For a bright, strongly saturated point source, the DN will increase from some low number away from the source to the maximum value over 35,000 (InSb arrays) and 47,000 (Si:As) DN, and then decrease to a small, usually negative number, at the center. The image looks like a bright doughnut with a dark center. This inverted “crater” peak profile indicates that a significant fraction of the light from the bright star may have been lost due to saturation. Recovery, or flux rectification, was possible if the point spread function, or PSF, of the star was known. The PSF could then be scaled in flux until the non-saturated pixels in the “wings” of the stellar profile could be fit correctly. 

 

There are several steps to rectify the inner region of the saturated star. First, the exact position of the saturated star was identified using the “craters”.  The program then created a sub-image around the saturated star, and that was resampled on a finer grid to match the 0.24 arcsecond resampled PSF. Remaining artifacts, such as banding and muxbleed, were masked out. The PSF was then matched pixel-by-pixel, the PSF flux wings were scaled to the target wings, mean flux ratios were computed, and the best fit outside the inner saturated region was determined. The “lost flux” was then calculated and the star was rectified by replacing the inner, saturated pixels with flux determined from the PSF profile.

 

The central portion of the IRAC PRF in channel 1 was found to be too narrow for stars due to undersampling, and so a “puffed up” version was empirically derived and found statistically to be more accurate by testing it on stars with known flux. Also, the program was not always successful in fitting a PSF to saturated stars that are closer than 20 pixels to the edge of the image. Such saturated stars were not corrected. 

 

A star that was saturated, or predicted to be saturated, had bit 13 flipped on in the corresponding imask (see Section 7.1.1 for more information about the imask). After this module had corrected the saturation, it turned off bit 13 and turned on bit 4, meaning that the pixel was saturated, but had now been rectified. More information about saturation can be found in Section 7.2.1.

5.2.3        Sky Background Estimation

The remaining artifacts are caused by the flux in a pixel reaching a set threshold (documented in Chapter 7). Once the saturated stars had been corrected, all of the point sources that have fluxes over the respective artifact flux thresholds were detected and flagged. Each pixel that was potentially affected by the artifacts triggered by these high fluxes was flagged in the corresponding imask file (column pull-down has bit 7 set and banding has bit 6 set; see Section 7.1.1 for more information about the imask).

 

An estimated truth image of the sky background was created. To replace the masked pixels, a 5 pixel × 5 pixel box around the corrupted pixel was used to create a weighted average for the pixel value to be replaced using a Gaussian-weighted interpolation from the pixels within the box. If there were not enough pixels in the 5 pixel × 5 pixel area around the affected pixel due to masking, then an 11 pixel  × 11 pixel area was used in the calculation. Replacement of values of affected pixels was done in the CBCDs.

5.2.4        Column Pull-down

In all four arrays, a bright pixel triggered a bias shift within its respective column, creating a lower background value throughout the entire column than in the surrounding columns. The imask has bit 7 set (see Section 7.1.1 for more information about the imask), denoting the column pull-down artifact, as mentioned above.

 

In this module, the truth image of the sky background was used, and for each column, a robust weighted DC offset was determined. This was a simple offset between the affected column and the estimated background value. This offset was determined separately above and below the triggering source. The offset was then applied to the affected column and saved into the CBCD image, thereby removing the bias shift from all the pixels in the column. More information about column pull-down can be found in Section 7.2.4.   

5.2.5        Banding Correction (Channels 3 and 4)

The banding effect manifests itself as the rows and columns that contain a bright source having an enhanced level of flux. This happened only in the Si:As arrays (channels 3 and 4) and has been shown to be due to internal optical scattering (inside the array). Both bright stellar sources and bright extended sources cause banding. It is clearly different from the optical diffraction patterns and the column pull-down effect.

 

Again, the truth image of the background was used to compute a robust weighted DC offset. The banding artifact was extra flux above the background and it was subtracted out and the image saved into the CBCD file. The IRAC pipeline did not model the flaring of banding towards the edges of the array. Therefore, the pipeline correction was not always perfect. Pixels affected by the banding effect have bit 6 set in the imask. More information about banding can be found in Section 7.3.2.

5.2.6        Muxstripe Correction (Channels 1 and 2)

For a very bright source, muxbleed could be accompanied by another image artifact, a pinstripe pattern (“muxstripe;” every fourth column from the bright source was affected) that may extend over part of the image preceding or following the bright pixel (for example, see Figure 7.3 and Figure 7.4). Stars, hot pixels, and particle hits could generate muxbleed and muxstripe. In the artifact correction pipeline, a procedure was developed to mitigate the muxstripe in the image but there was no muxstripe bit in the imask.

 

The algorithm involved converting the BCD image into 256 pixel × 64 pixel arrays (each of the four readout channels into a separate image; every fourth column was read out by the same channel). The muxstripe for one source contaminates only one readout channel, and therefore only one of these separate arrays. The median of the four arrays was created and subtracted from each array, which allowed deviation from the normal background to stand out.

 

Figure 5.10: Subtraction of the median background from the readout channel images. The image on the left shows the original image divided into each of its four readout channels. The image in the middle is the median of the four readout channels. This makes the muxstripe much more apparent in the fourth readout channel image (on the right). The location of the muxstripe is shown with black arrows.

 

Picture3

Figure 5.11: Profiles showing the column median versus row values for identifying muxstripe. The x-axis is in pixel units. The muxstripe is now identifiable between row pixels 125 and 200 (significantly lower values than the median background).

 

From each of these median-subtracted arrays, a one-dimensional array of the values along each row was then created, simply by combining the pixel values along the x-dimension. A profile that represented the median versus row was created. For each profile, statistics were calculated to identify any muxstripe. It was identified as a deviation larger than 3% of the median value for several rows. This missed the weakest muxstripe or a case where all readout channels have muxstripe in the same position (cluster of very bright stars), but this was rare. The subset of pixels that were affected by the muxstripe was identified and this column was corrected using the difference of the median of the “clean” pixels and the median of the affected pixels. The readout channel arrays were then reassembled to recreate the original image, and the corrected image was written to the CBCD file. More information about muxbleeding and muxstriping (“pinstriping”) can be found in Section 7.2.2.   

  • Summary of document button
  • Table of Contents button