COS Tools

This web page hosts several IDL routines I have written, along with collaborators, to deal with far-UV spectroscopic data from the Cosmic Origins Spectrograph. For reference to the instrument and its properties, please see Green et al. (2012) and Osterman et al. (2012). Details of the data coaddition techniques used in these routines can be found in Danforth et al. (2010). The detailed work on significance levels and non-Poissonian noise characteristics are in Keeney et al. (2012). Please refer to these works for more detailed discussion and cite profusely if you find them useful.

Most of these routines start with the x1d.fits files produced by CalCOS. If you download data from MAST, this is what you get. The reduction might even be correct. However, if you're looking for advice on how to reduce your data most optimally using CalCOS, this is not the place for it. Sorry.

IDL routines

This is "research-grade" code; it works on my machine and makes sense to me. I've tried to fix any dependencies, but there may be some I haven't caught. All routines assume you've got ASTROLIB installed and many other useful routines can be found in the GHRSLIB and JHU/APL libraries. If you find something in the codes which doesn't appear in any of those libraries, please let me know and I'll see what I can do.

COADD_X1D.pro (latest version, v3.1.1: 6/13/14)

This routine combines a set of far-UV COS exposures into single set of wavelength/flux/error vectors. A lot of work has gone into this code and it does a lot of things above and beyond a simple coaddition. See the extensive comments in the preamble and the code itself for much more information.

Major changes since v2.x: proper utilization of data quality flags, data binning.

Note that the code requires specific versions of several common codes, including the version of LINTERP.PRO which is part of the ASTROLIB library. The version distributed with GHRSLIB does not work. If you get errors saying "Keyword 'missing=0' not allowed in LINTERP", this is likely your problem. Check the order your IDL libraries are loading.

Older versions:
COADD_X1D_v2.1.pro (as of 7/12/12)
COADD_X1D_v1.pro (as of 12/14/10)
COS_INSPECT.pro

This is a quick-and-dirty routine to display the wavelength/flux/error vectors in a set of far-UV COS x1d files. This is a good way to see what you've got, check for grossly-bad CalCOS reductions, and take a first look at the data.

COS_LSF.pro

On-orbit observations have revealed that the COS line spread function (LSF) is not the ideal Gaussian profile. Instead of a 6.5 pixel FWHM, the profile is more like 7.9 pixels FWHM and up to 40% of the light falls in the wings. Mid-frequency wave-front errors in the HST primary mirror are the culprit. The LSF is asymetric and dependent upon both wavelength and grating. For much more on the subject, please see the STScI ISR on the subject.

However, the LSF has been characterized and can be easily accounted for in analysis. STScI gives the LSF in tabular form, but, for speed's sake, I have converted it into a binary save file COS_LSF.idl which you will need to run my routine. COS_LSF.pro produces the modeled LSF for a given wavelength and grating for both far- and near-UV detectors. I have had good success convolving the LSF with gaussians, voigt profiles, and so forth in absorption line fitting. NOTE: this version is slightly obsolete. There have been newer characterizations of the COS LSF, but I haven't incorproated them into the webpage yet. Stay tuned.

COS_SIGLEVEL.pro

Determines the significance level of a measured absorption feature of a given eequivalent width, wavelength, b-value, and signal-to-noise via equations 4, 7, and 9-11 of Keeney et al. (2012). Latest version: 6/13/14

COS_EWLIM.pro

Determines an equivalent width limit for a set of COS data given a significance level, wavelength, b-value, and S/N via equations 4, 5, 7, and 9-10 of Keeney et al. (2012). Latest version: 6/13/14

If you find this stuff useful, I'd love to hear from you!


Charles Danforth
Last modified: Fri Jun 13 16:03:09 MDT 2014