IrsLow

IrsLow is an IDL code to extract spectra from IRS (Spitzer) low-resolution observations. The code is presented in Fadda et al. ( 2010 ApJ 719:425 ). This page contains the most recent version available.

The code starts from the BCD level, computes and subtract a background, finds and removes rogue pixels and outliers. Finally, it is possible to reject interactively bad pixels, and extract the spectra. The extraction is done using PSF fitting. The calibration data used are the ones made available with the most recent spice distribution.

To use the code, install on your system the idlutils library and the most recent version of spice. If you are not able to install the idlutils library, alternatively you can only get the codes for the bspline fitting and add the directory with the codes to the IDL path, !path = !path + ":/path_of_bspline_directory/" Then, change in the code the line caldir:'/home/fadda/spice/cal/' to the directory where you placed the spice calibration directories.

Running the software is pretty easy. First, you need the list of the BCDs covering the source (from one or more AORs) in the long-low or in the short-low mode. You can use in IDL: list=file_search('/path/r00000000/ch0/bcd/*bcd.fits') or, if you have more AORs, list = [file_search('/path/r00000001/ch0/bcd/*bcd.fits'),file_search('/path/r00000002/ch0/bcd/*bcd.fits')] The, run the code: IrsLow, list (if long-low data, channel 2) or IrsLow, list, /sl (if short-low data, channel 0). You will be presented with five windows: two windows containing the data in first and second order (central and left upper windows), a window with the profiles (right-upper window), two windows which will display the extracted spectra (central and left lower window) and a window to examine the PSF fits on a single wavelength (lower-right window).

You can click "c" on the limits of a spectrum on the profile window to clip out the sources. Green lines will show the regions clipped and the background of the profile, in the same regions, will change color.

Now, with "b" we can recompute the background excluding the region with sources and subtract it again from the images. This passage can be repeated until a satisfactory background removal is done. The minimum and maximum of the displayed image can be changed by inserting new values in the two lower-left boxes (MIN and MAX). Remember to hit return after inserting the new values. To unclip a region, just click "C" including the limits of the clipped region.

Sometimes, the two orders are not well aligned. To force the alignment, click "a" on the top of the same source in the two orders. A shift will be computed and applied to the data. This step is essential to guarantee a good extraction. Once satisfied, clicking "x" on the profile you can extract a spectrum of an isolated source.

The extracted spectra of the two orders appear below the images. In case of 2 close spectra, a simultaneous fit of two PSFs can be performed by clicking 2 on the top of each close profile peaks.

In this case, two spectra (white and green) will appear in the windows. The spectra will be saved as ASCII files with names corresponding to their coordinates containing: order, wavelength (micron), flux (Jy), flux error and number of points used for the fit.

It is possible to inspect the PSF fitting clicking on one point of the spectrum.

In the smallest window, the points used for the fit and the fitted PSFs will appear. Points surrounded with diamonds are discarded (outliers) or hot pixels if the diamond is green. It is possible to further perfect the fit by deleting ("d") or undeleting ("u") some points and then redo the fit ("f"). If the new fit appears to be better, it is possible to save the result with "s". Sometimes it can be useful to resize the small window to better see the points. In this case, click "w" on the lower and upper limits of the part of the window you want to select. Clicking "W" you can see again all the points involved.

To leave the code, just click "q" for quit. To have some help on line, click h,H,or ? on the window you are using.

IrsLow has been developed by Dario Fadda. If you use this software, please quote the following paper: Fadda et al., 2010, ApJ, 719, 425.