Spitzer Documentation & Tools
IRS Instrument Handbook

Chapter 4.    Calibration

4.1  Spectroscopic Calibration

4.1.1             Dark frames

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.


 

4.1.2.1       Data Used for Spectroscopic Flats

Table 4.1 Data used to create IRS flats

 

SL

SH

LL

pre-45*

LL

post-44*

LH

pre-25**

LH

post-24**

standard star

HR 7341

HR 6688

HR6606

HR6606

HR6688

HR2491

standard star AORKEY(s)

19324416

13531136

LL1: 13364480

LL2: 13364736

LL1: 24399872

LL2: 24400128

13530368

16101888

steps parallel to slit

57

11

91

91

19

21

parallel step size (arcsec)

1.1

1.1

2.4

2.4

1.3

1.7

steps perpendicular to slit

0

5

0

0

3

15

perpendicular step size (arcsec)

N/A

1.8

N/A

N/A

3.5

1.7

ramp time (seconds)

6

30

14

14

60

6

num cycles

 

3

 

 

 

2

 

4

4

2

3

zodiacal background AORKEY(s)

19324928

12604416

13782528 16462848 13782272 13782784

9859072

8243968 9268992 9530880 10020352 10020608

24426240

11810304

11810816

9858560

9859072

11810560

12604416

9858816

16097792

16098048

16098304

16462848

Dedicated sky AORKEY(s)

N/A

13520384

13515776

N/A

N/A

13530880

16088320

16087296

*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.

4.1.2.2       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.

4.1.2.3       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.

4.1.2.4       Protoflat

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 4.1.2.2 was divided by the modeled two dimensional extended source from Section 4.1.2.3.

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.

4.1.2.5       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.

4.1.2.6       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.