When extraction completes, the data are stored in two separate ways.  One method used "object structures" similar to the echelle pipeline; these contain extra metadata associated with each observation.

However since many observers are familiar with the spextool pipeline used at the IRTF, we also save the output in SpeX format, in the file "Object/Spec_xxxx.fits" for each exposure.  These files are 2048 x 3 element matrices, with the three rows representing wavelength, flux, and error.  By saving in this format, we can use the Spextool package routines to combine spectra and perform telluric correction.

To start this process, we first combine all exposures of a single object.  At the IDL prompt, type:

IDL> fire_xcombspec

This will launch the xcombspec GUI, as shown below. 

1. First, enter in your data path (which should be the "Object" directory in your reductions folder).  Then specify the root filename (i.e. "Spec_" is the default setting) and the file numbers (range or comma delimited, e.g. "140-144,147").  Click on "Load Spectra" to read in the spectra, which will appear in the window to the right.

2. Next, apply any scaling and pixel corrections to the spectra before combining.  The options are:

3. Next, choose the statistic to use for combining the spectra.  There are several options available; the default (Robust Weighted Mean) tends to provide the best results for more than 4 spectra of reasonable S/N.

4. Finally, enter a base output file name (e.g., "CombSpec_140-143" - no need to add the ".fits" at the end) and click on "Write File".  A fire_xvspec viewer window will pop up to display the spectrum (below). You will need to remember that filename for the final telluric correction step.