This is a demonstration of using SPICE to extract a spectrum from IRS data for the object Herbig-Haro 46/47. We outline the basic steps for using SPICE as a generic example for handling any point source data obtained with Spitzer IRS-Staring Mode. The steps are analogous to those outlined here. This specific example involves an extraction from the SL2 module, but it is generally applicable to all of the IRS modules. This demonstrates only a point source extraction; SPICE is currently capable of extracting spectra for extended sources. For a discussion, see the IRS Extended Source calibration page on our website.


Requirements:


Step-by-Step Guide

  1. Once you have downloaded and installed SPICE, launch the SPICE GUI by running the executable, e.g. from the UNIX command line

     unix% spice & 

  2. You should always perform a custom extraction on the BCD data products. The Post-BCD products for IRS are only intended as a "quicklook."
  3. The next very important step, which is somewhat unique to (mid-)infrared, and, particularly, Spitzer IRS-Staring Mode spectroscopy, is to subtract the background in the 2-D spectral image. A number of methods can be invoked to accomplish this; for instance, for a given spectral order, you can subtract the image obtained in the second nod position from the image obtained in the first nod position. Or, you can subtract an image obtained in the other spectral order from the image in the current one. It really all depends on the nature and structure of the background in your image. To increase the signal-to-noise ratio in your spectrum, you can "stack" together all the background-subtracted images in a given nod position; or, alternatively, "stack" all the images in each of the nod positions first, then perform the background subtraction (this is somewhat of a philosophical issue). You will need to do this step in some image processing program, such as IRAF or IDL, outside of SPICE. Write the resulting image from the program as a FITS image (be sure to retain the FITS header from your BCD image).
  4. Within the SPICE GUI, open a point source extraction flow using File --> Open Spice Generic Template --> Point Source with Regular Extract.
  5. Load the bcd, uncertainty and mask files into SPICE. This is done by clicking on the "Modify" button for the "Image File" in the Initialize Parameters and Files module. If you are using archive file names, the corresponding mask and uncertainty files will be selected automatically. The BCD image will be displayed in the FITS window.

    You can check the calibration files which SPICE will use with the "Calibration Files" button. Normally, you will allow SPICE to auto-select the pipeline version; the most recent version of the calibration files which come with SPICE is S17. Alternatively, as shown below, you can point SPICE to the custom calibration (CAL) files if you are an expert IRS user or if SPICE updates fall behind releases of new calibration by the SSC.

  6. You can change the contrast ("stretch") of the 2-D image you are viewing by pressing the color-grid button at the right of the FITS window. You can zoom the image using the controls to the left of the full SPICE window. See figure below -- the controls are circled in red.

  7. You're almost ready to extract the spectrum! One last set-up is still required: selecting the output directory for the output *.profile.tbl, *.ridge.tbl, *.extract.tbl, and *.spect.tbl files generated by the extraction. The ultimate output table of interest is the *spect.tbl -- this is your extracted 1-D spectrum in (ascii) IPAC table format. You can make the selections by pressing the "Output" button.

    When you have set all the input parameters, run the Initialize Parameters and Files module, using the run button in the upper left of the module window.

  8. To begin the extraction, establish the wavelength-collapsed average profile in the spatial direction across the 2-D background-subtracted spectrum, using the Profile module. See top figure below. Note that for the background-subtracted spectrum, a "positive" profile (your spectrum) and a "negative" profile (the spectrum in the other nod), relative to a zero level, are seen as the output. Next, establish the (peak) ridgeline of the spectrum in the dispersion direction along the 2-D spectrum. See bottom figure below. Running the Ridge module will perform the function. You can either allow SPICE to automatically derive the ridge peak or set the ridgeline peak manually.
  9. To extract the spectrum, run the Extract module, which is next in the flow. The extraction can be done with the default parameters for this example. For the low-resolution modules, the spectrum is extracted along the Ridge location, in accordance with the wavelength-dependent Point Spread Function (PSF) and the spectral trace (with pipeline-optimized width). The Extract function can employ a window with a different width ("Manual" width), but the width will still scale with wavelength, unless a full-slit extraction ("ExtSrc" width) is specified. Note that the output of the extraction is still in instrumental units, i.e., electrons/sec.
  10. You still need to "tune" the extraction by applying the flux conversion from instrumental to absolute flux units. To do this, run the Point Source Tune module. This function will correct the slope and curvature of each order by applying the polynomial coefficients in the *_fluxcon.tbl file. This correction is based on an order-by-order comparison of calibration data to standard star model spectra. The flux units are now in Janskys (Jy). This completes the spectral extraction for this module. Note that the so-called "bonus order" of SL2 is somewhat mismatched in flux. You can choose to keep this bonus order, or exclude it (since it overlaps with an order in SL1). Our extraction looks remarkably like the short-wavelength portion of the one in the Spitzer press release and the published paper (Noriega-Crespo et al. 2004, ApJS, 154, 352; see bottom figure below, circled in yellow)... as it should!
  11. You can perform custom extractions on all the modules and orders for these observations, merge the various spect.tbl tables together (outside of SPICE!), and obtain a spectrum similar to what is shown below.
  12. For reference, we provide our extracted spectrum as an ASCII table here. Your extraction obtained from these data may differ slightly.

  13. To quit SPICE, pull down the "File" menu and select "Exit."

Return to the Data Analysis Cookbooks page.



SPITZER HOME || SPITZER SCIENCE || INSTRUMENTS || SCIENCE USER SUPPORT || SEARCH

help@spitzer.caltech.edu

This file was last modified on Fri Mar 28 14:33:43 PDT 2008.

California Institute of Technology Jet Propulsion Laboratory NASA