Spectral Combination Software Jerry Kriss 5/8/2013
Combining FUSE Spectra Procedure is called cf_merge (1805 lines of code + calfuse utilities) Determine zero-point offsets in wavelength scales relative to Segment LiF1A by cross correlation. Renormalize fluxes in all segments to LiF1A&B using overlapping wavelengths. (Pointing control used the FGS on mirror LiF1 for most of the mission.) Weighting is done using relative effective areas in order to preserve Poisson statistics. Correct for the “worm” in Segment LiF1B spectra using LiF2A as a template. Combine all 8 spectra into a single spectrum. Weighting is done using relative effective areas in order to preserve Poisson statistics. A minimum S/N is required for inclusion (in case there were gross segment drifts, which were not uncommon). Spectra are rebinned using linear interpolation. This introduces correlated errors between adjacent pixels, but FUSE is highly oversampled (~7 pix per resel). Binning up by 3 or 4 pixels minimizes the correlated errors. 5/08/2013 2
Correcting the FUSE “Worm” Re-bin LiF1B and LiF2A on commensurate wavelength scales at 1Å spacings from 1100 to 1180 Å. Form the ratio of the rebinned spectra. Find the average in the regions and , rejecting outliers. Fit the ratio using a 3rd-order cubic spline with 13 nodes. Force the fitted data to have the average found in (3) over the wavelength regions and Reject 2-sigma outliers. Form a ratio function using the resulting fit and the average computed in (3) so that F(w) = the average from and F(w) = the fitted ratio from 1115 to 1175 Replace points in F(w) from 1115 longwards that differ from the average by more than 0.01 with the average. Replace points in F(w) from 1175 shortwards that differ from the average by more than 0.01with the average. Divide the original LiF1B data by this ratio, and use this corrected spectrum in forming the final binned result. 5/08/2013 3
Combining STIS Echelle Spectra (1) The whole process is controlled with a cl script, “ech2asc_tot.cl” (81 lines). I start with the x1d file from the pipeline and dump the FITS binary tables into 3-column ascii files containing wavelength, flux, error using “tprint”, with one temporary file per order. Read this list of files into arrays of w, f, e for each order. Loop through the orders and determine the wavelength ranges that overlap. Split this range in half, and take half from one order and half from the next. Overlapping data are simply discarded and are not used. There are some gaps since not all orders overlap. The merged spectrum is written out as a single ascii file containing wavelength, flux, error. 5/08/2013 4
Combining STIS Echelle Spectra (2) I only combine spectra obtained with the same grating. Start with the 3-column ascii files containing wavelength, flux, and error produced by “ech2asc_tot.cl”. Program “weighted_merge.c” (189 lines) combines the spectra into a single file of the same format with a linear wavelength scale. Read a list of filenames and weights to be applied. To preserve Poisson statistics, I generally weight by exposure time. User specifies starting & ending wavelengths and dispersion. Input spectra are linearly interpolated onto the output array. Errors are propagated using weights provided. 5/08/2013 5
Combining COS Spectra Very similar to how I combine STIS echelle spectra. I only combine spectra obtained with the same grating. I start with the x1dsum files from the pipeline, which have combined all the FPPOS spectra for a single central wavelength. Dump the x1d FITS binary tables into 3-column ascii files containing wavelength, flux, error, and DQ using a cl script, “listcos.cl” (76 lines; uses tprint, tabpar, thselect, imgets). Program “weighted_merge.c” combines the spectra into a single file of the same format with a linear wavelength scale. Read a list of filenames and weights to be applied. To preserve Poisson statistics, I generally weight by exposure time. User specifies starting & ending wavelengths and dispersion. Input spectra are linearly interpolated onto the output array. Errors are propagated using weights provided. DQ flags are propagated using “OR”. 5/08/2013 6