Since the IRS has no internal shutter, reference frames are not truly dark. Reference spectra were collected at the ecliptic poles, or near the target if the local background is significantly different from the high latitude zodiacal sky. However, each array has areas that are not directly illuminated by the optics. These areas were also used to monitor dark current performance.
4.1.2 Flat fields
Ideally, spectral flats should be constructed from observations of a spatially and spectrally flat source that is bright enough to achieve a good signal-to-noise ratio but not bright enough to saturate the arrays. In practice, this ideal source does not exist. Therefore, the IRS flats were created by stepping a standard star (with a smooth, well-known spectrum) through each slit to simulate an extended source. These observations were then combined to simulate an extended source. A model of this extended source was created by combining one-dimensional spectral models. A protoflat was produced by dividing the simulated extended source by the modeled extended source. Finally, the non-uniform spatial response of the protoflat was corrected using observations of the zodiacal light. The following subsections describe this process in more detail.
220.127.116.11 Data Used for Spectroscopic Flats
Table 4.1 Data used to create IRS flats
standard star AORKEY(s)
steps parallel to slit
parallel step size (arcsec)
steps perpendicular to slit
perpendicular step size (arcsec)
ramp time (seconds)
zodiacal background AORKEY(s)
13782528 16462848 13782272 13782784
8243968 9268992 9530880 10020352 10020608
Dedicated sky AORKEY(s)
*In campaign 45, there was a bias change to mitigate the increasing number of rogue pixels in the LL module, resulting in different flats for the pre- and post- bias change campaigns.
**In campaign 25, there was a bias change to mitigate the increasing number of rogue pixels in the LH module, resulting in different flats for the pre- and post- bias change campaigns.
18.104.22.168 Combining Star Observations to Simulate an Extended Source
In this section, we describe how the stepped standard star observations described in Table 4.1 were combined to simulate an observation of an extended source.
First, the *rsc.fits (pre-flatfielded) data for the stepped standard star observations were combined. See Figure 4.1 for a LL example.
Figure 4.1: An example of the co-added pre-flatfielded data for a stepped standard star in LL1 (left panel) and LL2 & LL3 (right panel) modules.
Second, the background was subtracted from this co-added star data. For the SL and LL modules, the observations were carried out such that several of the slit positions were far from the star. These “edge”-steps in the map were used to estimate the background. The mean of these data was subtracted from the mean of the co-added star data. For the SH and LH modules, dedicated background AORs were used to estimate a mean and median background. Depending on the quality of the data, the mean or the median was adopted as a background image, which was then subtracted from the mean star-only data.
Third, if the star was stepped through the different orders separately (i.e. SL and LL), each of these orders was cut and pasted together to make a combined image. An example of the result of performing all of these steps for LL is shown in Figure 4.2.
Figure 4.2: LL1 and LL2 co-added stellar data combined.
22.214.171.124 Create a model of the stepped-star observations
The next step was to take a one dimensional model spectrum of the star and create a two dimensional fits file as if the source were spatially extended and filled the slit. The wavsamp and omask were used to obtain the correct model. The wavsamp table contains the translation from the pixel coordinates to wavelength. A given wavelength for IRS is indicated by a tilted rectangle, often called a "pseudo"-rectangle. There is also a wavsamp.fits file which shows the two dimensional translation of the wavsamp.tbl file for the different modules. The omask file shows where the orders of a given module are present in the two dimensional data. It is usually used to mask out the inter-order regions. The two dimensional model file is illustrated in Figure 4.3.
Figure 4.3 The model of a stellar spectrum in 2D created by interpolating the 1D spectrum over the wavsamp file.
The protoflat (which is a flat that has not yet been corrected using zodiacal light observations) was created by the following procedure.
1. The simulated two dimensional extended source from Section 126.96.36.199 was divided by the modeled two dimensional extended source from Section 188.8.131.52.
2. This resulting file was normalized by dividing it by the median value calculated from all the finite data in the FITS file.
3. Rogue pixels were removed and replaced using IRSCLEAN.
Figure 4.4 illustrates the results for the LL module.
Figure 4.4 The LL protoflat.
184.108.40.206 Create an initial cmask.
The purpose of the cmask is to indicate where the flat is valid, uncertain, or invalid. All the regions outside the wavsamp are obviously invalid but in general the wavsamps are conservative. The actual spatial area that is imaged by the spectrograph is slightly larger, especially for the high-resolution modules. Of course, the sensitivity of the spectrograph falls off from the center of each order so the edges are highly uncertain. Since the area exposed to the sky by the array is larger (by ~5%) than the wavsamps, slightly larger wavsamps than the ones employed by SPICE were used. These were interpolated to be ~5-10% wider than the narrower wavsamps from which the spectra were extracted. As a first step in making the cmask, all the area outside this wavsamp was set to be invalid (bit 7). In other words, all the inter-order regions were set to 128. All the pixels within the order were set to 0.
To determine the “uncertain” flat pixels, the maximum value in each order was taken. All pixels less than 0.001 of the maximum in the flat were assumed to be regions where the flat is uncertain, and were set to bit 8, or a value of 256. This picked up most of the edges of the wavsamps. However, in the cases of LL and LH, the array efficiency drops sharply at the longer wavelengths and hence these modules have many more uncertain flat pixels towards longer wavelengths.
After an initial automated masking, the cmask was examined interactively to mask out pixels that the automated procedure missed. Narrowing the cmask too much reduced the signal and introduced tilts in the spectrum, especially for extended sources. However, keeping the cmask too broad, i.e. allowing many edge pixels to be counted as valid, led to noisier spectra. For the peculiar case of LL where the uncertain pixels form a band towards the long wavelengths, we usually declared most pixels longwards of 37 microns as uncertain. The interactive flagging of the cmask was done iteratively, based on experiments with real data of standard stars. If the derived flat introduced any spikes in the final spectrum, these pixels were flagged in the cmask. In addition, the width of the cmask was set to minimize the noise in the extracted spectra. For the high-resolution modules, this step was done carefully for each of the 10 orders. Figure 4.5 shows a typical cmask resulting from this iterative process.
Figure 4.5 A cmask for the LL-PRE25 data. The pixels marked white are the ones labeled uncertain by our process.
220.127.116.11 Correction for spatial variations
Since there are real (endemic to the array) and artificial (introduced by the discrete stepping of the star through the slit) spatial variations in the protoflat, we removed these variations by using a truly extended flat source, the zodiacal background. The basic process involved co-adding a large number of zodiacal background observations, cleaning this product with IRSCLEAN, and dividing the protoflat by the cleaned, co-added zodiacal background. The result provides a measure of the spatial variations in the protoflat, and is used to derive a correction for these variations. This spatial correction is then multiplied back into the protoflat to create the final flat. The LL spatial correction is shown in Figure 4.6. This spatial correction step does introduce a slight spectral slope (which was previously taken out by the model) but any residual slopes are removed in the fluxcon step later on in the pipeline. The final flat is shown in Figure 4.7. The right-hand panel shows a check to ensure a spatially flat image, which is done by again dividing the zodiacal background by the final flat.
Figure 4.6 The spatial correction for the LL example, generated by taking a running 5-row average of the protoflat / zodiacal background file. Multiplying this back into the flat gives us the final flat.
Figure 4.7 Left: The final flat for LL. Right: The zodiacal background divided by the final flat, as a check to ensure a spatially flat image.