Shutterless IRAC Flatfield Thread Design (4/4/02)





1. Overview

IRAC as designed relied heavily on it's shutter for calibration. In regards to flats, the backside of the shutter was a mirror. When the shutter was closed, this folded the light path back into an internal integrating sphere (the transmission calibrator). This allowed for a very fast measurment to be made which could be compared to similar measurements taken previously. This allowed for easy monitoring of changes in the IRAC flat-field response.

Due to the decision not to use the shutter in flight, such data will now never be taken. The only way that IRAC can now be illuminated is via the sky (although there are additional calibration lamps that do not use the shutter, they are both faint and highly non-uniform).

In any case, the actual flat-field could only have been measured using the sky anyway, since the flat-field contains components from the telescope throughput. The transmisison calibrator was used only to find time variables corrections to this. From now on only "sky flats" will exist. The data for these sky flats will be taken in regions of high zodiacal background. They will be dithered frames of 100 seconds each. It will take approximately three hours to reach the required S/N, given photon counting statistics.

2. Detailed Description Of Thread

The following are the detailed steps to be taken in the thread. For each incoming DCE the following steps will be performed. They closely resemble the current processing, and are virtually identical to the new "sky dark" thread. I have left out modules that do not yet exist, like the first-frame effect correction module.

  1. TRANHEAD will process the headers and add keywords.
  2. INSBPOSDOM will flip the sense of channels 1 and 2.
  3. CVTI2R4 will convert to floating point.
  4. IRACWRAPDET1 will detect wraparound.
  5. IRACWRAPDET2 will detect doughnuts.
  6. IRACWRAPCORR will fix the wraparound.
  7. IRACNORM will correct for barrel-shift and fowler sampling.
  8. Channels 3 and 4 will be corrected for bandwidth effects.
  9. A "lab dark" will be subtracted from the data. A library of these will be supplied by the IST, and will be based on ground testing. They are needed to remove as best as possible the absolute bias level prior to linearization. The also eliminate the muxbleed from hot pixels.
  10. FOWLINEARIZE will linearize the data. This linearized frame will be saved as input to the image combination step.
  11. The linearized frame will be divided by whatever currently existing flat-field exists. Initially this will be a ground-test flat.
  12. DETECT is used to generate a mask file that flags all the pixels containing objects in the flattened frame.

Then, once all the data in an AOR for a given channel has been processed in this fashion,

  1. The linearized frames and the object-masks are used as input to FLATFIELD, which combines the input data with outlier rejection. Note that the output image must be in units of DN, so we use the -o4 output from FLATFIELD.
  2. The appropriate "sky dark" is subtracted from the data.
  3. The result is normalized to create the flat-field.

A few extra notes:

3. Demonstration of Prototype Thread

A prototype of this thread was created using the actual S6 pipeline modules and a pair of CSH wrappers. The first csh wrapper is called iracflatprep.csh and it performs all of the initial steps needed to make the linearized data and the object masks (it is actually identical to the program iracdarkprep.csh). The other wrapper is called iracflat.csh. It scans the current directory for data, repeatedly calls iracdarkprep, and then runs FLATFIELD to make the dark. It subtracts the sky dark, normalizes the result to make the flat, and then performs some diagnostics by comparing the derived flat to the one that was input to the simulator.

Input data for this test was generated with the IRAC Science Data Simulator (ISDS). The science truth image was a model of the zodiacal background scaled to a level appropriate for the sky being modeled based on the values returned by the SPOT background model. The background objects are based on the SWIRE extragalactic model. Stars are the actual 2MASS stars, with an extension of the stellar luminosity function to several magnitudes fainter than 2MASS. This is basically the same model used in previous tests. Here, a new simulator version was used. Relevant changes for this version include a crude first-frame effect model that inputs a fluctuating bias and a more complete cosmic ray model. Also, a different dither strategy was used. The dither strategy and times were selected to allow for good dithering with a sufficient number of frames for object rejection. There were 9 mapping positions arranged in a 3x3 grid with 100" throws. The large cycling dither pattern with 9 dither positions was used, giving a total of 81 pointings per channel. Exposure times were 100 seconds in this case. Total AOR time was three hours, which has been determined previously to be about the right number needed to acheive a 1% flat in channel 1, which is the most difficult due to the low sky background in this channel. The raw data is shown in figure 1.

Figure 2 illustrates a single DCE passing through the thread. Basic data reduction steps are taken, a mask is generated, and then all the data is combined. The final sky flats are shown in figure 3. Also shown are the maps of percent error vs. the known input flat-fields. All of the flats are highly uniform. If anything, channels 1 and 2 are more uniform that the flats for channels 3 and 4, where the counts are much higher. All 4 channels meets the 1% requirement.

The step function in channel 4 requires some special explanation. First, although this step function is objectionable on cosmetic grounds, it actually meets the requirement - the peak amplitude is under 1%. More importantly, however, it will disappear when used in the science thread. The step function originates during linearization. The linearity solution for this array has a step function clearly visible, particularly in it's linear term. This is a result of how it was measured. Because the lamp used to illuminate the array did so unevenly, the spacing of flux levels sampled varied from one array location to another. As a result, there is an uneven number of measurements near the point of saturation. When the linearity solution was computed, it jumped from one set of solution to another as one of the illumination levels jumped above a rejection threshold. However, because this linearity solution is imprinted onto all the data, including both the calibrations and the science data, it appears to be backed out when the flat-field is applied. We have not seen this before because none of the previous tests performed by the IT or IST attempted to start with raw data and run the full pipeline on it. We had always assumed perfect data with only the flat and dark signatures in it.

Fig.1 - Raw simulated data of a high zodiacal background region. Channels 1 and 2 are at top, and 3 and 4 are at bottom.

Raw channel 1 image.
INSBPOSDOM
CVTI2R4 - conversion to floating point
IRACWRAPCORR - wraparound correction
IRACWRAPNORM - fowler-sampling and barrel-shift correction.
EBWC - not applied to this channel
Subtraction of lab dark.
FOWLINEARIZE - linearization. This frame is saved for the image combination step.
Division by existing flat field. This is used to improve the object detection in the next step. The flat-field used here does not figure into the derived flat-field. This algorithm is not recursive.
DETECT - object detection.
FLATFIELD - combination of linearized frames using object masks. Output is in DN.
"Sky Dark" is subtracted from the combined flat image.
Image is normalized. This is the flat-field.

Fig.3 - Derived Sky flats for all channels, the actual flats used by the simulator, and the % difference between these.
Channel 1Channel 2Channel 3Channel 4
Derived Sky Flat
True Flat
% diff
% 1-sig1.00.50.3 0.2