Spectral Extraction and Calibration - Method

The method below has been tested most thoroughly on the spectrophotometric observations, but it has also been used on a variety of other observations. In brief, it uses the flatfielded images, extracts from them using the offline pipeline, then calibrates the spectra using vector spectral corrections and finally combines them into a single spectrum.

Detailed instructions to execute the steps below can be found in the notes.txt file.

All software required is located in the following three directories:

  /home/sloan/procs/fitstran/
  /home/sloan/procs/irs/
  /home/sloan/procs/sp/

1. For each DCE, copy into a local directory:

    bcd.fits   - the final flatfielded image
    f2unc.fits - the uncertainty file for this image
    bmask.fits - the mask file for this image

The flatfielded image is the starting point for the procedure

2. Correct for NaNs and pixels which exceed a mask value of 4096 (using imclean.pro).

LH uses an additional routine developed by D. Devost, imrogue.pro, which identifies rogue pixels so that they can also be removed.

3. Difference the images to remove the sky (using imdiff.pro).

For SL, subtract the images with the star in different orders.
E.g. SL1 Nod 1 - SL2 Nod 1
This requires the same ramp times and the same number of DCEs in the two orders. If the target was not observed in this way, then use the LL differencing method.

For LL, subtract the images with the star in the same order, but in opposite nods.
E.g. LL1 Nod 1 - LL1 Nod 2

SH and LH are not differenced.

4. Build a script to execute the offline pipeline, log onto isc4 or isc5, source the appropriate offline pipeline (currently S10.5), and execute the script.

The script extracts a spectrum from each DCE using profile.c (which operates on the undifferenced images), ridge.c, and extract.c (which operates on the differenced images).

5. Convert the output from the offline pipeline from IPAC table files to spectral FITS files (using ipac2fits.pro).

6. Coadd the DCEs for each EXPID and calibrate them using the appropriate spectral corrections.

Currently, the most recent version for S10.5 for SL is version 20. For LL, it is version 22. There are seperate corrections for both orders, and both nod positions in each order. Hopefully the flatfields will improve sufficiently to eliminate the need for separate spectral corrections for each nod.

The procedure spccbat.pro performs this step, using the input file usually saved as cc.a1.lst.

7. Combine the nods and orders to build a single spectrum for the target in each module (using spfnodjoin.pro, which calls sppair.pro).

In this step, the differences in the spectrum in the two nod positions are used to determine the uncertainty in the flux.

8. Combine the spectra from SL and LL into a single low-resolution spectrum.

First, the SL and LL spectra are combined (using spjoin.pro).

Then the spectral segments are normalized to each other to eliminate the discontinuities. Normalizations are multiplicative, and scalar. All segments are normalized to the brightest segment. The bonus orders are discarded after normalization, and the remaining segments are trimmed as follows:

    SL2 (5.2-7.5 um)
    SL1 (7.5-14.3 um)
    LL2 (14.0-20.7 um)
    LL1 (20.5-36.0 um).

This step is performed by the program cleanlores.pro.

Data processed in this way can be found in:

calsfx observations:

/home/ioc/campaign_NN/IRS_070/lores/target.P.lo.ac.fits
  where NN = campaign number (P, 01, 02, etc.)
  target = source name
  P = pointing (a, b, c, etc.)

Starburst and BCD sample:

/home/sloan/irsdata/galpah/lores/target.a.lo.ac.fits

MC_DUST sample:

/home/sloan/irsdata/mc_dust/lores/target.a.lo.ac.fits


Home

Last modified 20 December, 2004. © The IRS Team.