astro-ph0302608/ms.tex
1: %\documentstyle[12pt,aaspp4,psfig,natbib]{article}
2: %\documentstyle[12pt,aastex,epsfig]{article}
3: \documentclass[12pt,preprint]{aastex}
4: \usepackage{color}
5: \usepackage{graphicx}
6: 
7: \special{papersize=8.5in,11in}
8: 
9: \begin{document}
10: 
11: %%
12: %% Arguments to these comment notifiers can not exceed a single paragraph.
13: %% If you use one of these to comment out a large chunk of text which has
14: %% paragraph breaks, expect to experience hard to diagnose TeX errors ...
15: %%
16: \def\NB#1{[NB: {\it #1}]}
17: \def\DK#1{[DK: {\it #1}]}   % use to leave DK messages
18: \def\DT#1{[DT: {\it #1}]}   % use to leave DT messages
19: \def\JO#1{[JO: {\it #1}]}   % use to leave JO messages
20: \def\NS#1{[NS: {\it #1}]}   % use to leave NS messages
21: 
22: \def \etal {{\it et~al.}}
23: \def \nhi  {$N_{HI}$}
24: \def \ndi  {$N_{DI}$}
25: \def \lnhi  {$Log~N_{HI}$}
26: \def \lndi  {$Log~N_{DI}$}
27: \def \nhe  {$N_{HeII}$}
28: \def \qone {PKS~1937--1009}
29: \def \qtwo {Q1009+2956}
30: \def \qthree {Q0130--4021}
31: \def \qfour {HS~0105+1619}
32: \def \qfive {QSO 1243+3047}
33: \def \qhst {PG~1718+4807}
34: 
35: \def \ETA {$\eta $}
36: \def \het {$^3$He}
37: \def \hef {$^4$He}
38: \def \lisv {$^7$Li}
39: \def \yp      {Y$_p$}
40: 
41: \def \btemp {$b_{temp}$}
42: \def \bturb {$b_{turb}$}
43: \def \ly    {Lyman}
44: \def \mf    {$\times 10^{-5}$}
45: 
46: \def \ob {$\Omega _b$}
47: 
48: %\newcommand{\N}[1]{{N({\rm #1})}}
49: %\newcommand{\cm}[1]{\, {\rm cm^{#1}}}
50: 
51: % Basic Units
52: \newcommand{\kms}{km s$^{-1}$}
53: \newcommand{\cmm}{cm$^{-2}$}
54: \newcommand{\cmmm}{cm$^{-3}$}
55: \newcommand{\escsh}{$\mathrm{ergs}
56:         \mathrm{\ s}^{-1}
57:         \mathrm{\ cm}^{-2}
58:         \mathrm{\ sr}^{-1}
59:         \mathrm{\ Hz}^{-1}$}
60: 
61: % Mathematics
62: \newcommand{\chisquared}{$\chi^{2}$}
63: 
64: % Cosmology Related
65: \newcommand{\omegatotal}{$\Omega _{total}$}
66: \newcommand{\omegam}{$\Omega _m$}
67: \newcommand{\omegalambda}{$\Omega _{\Lambda}$}
68: \newcommand{\omegabaryon}{$\Omega _b$}
69: \newcommand{\omegabaryonhsquared}{$\Omega _bh^{2}$}
70: \newcommand{\hubbleconstant}{$H_{0}$}
71: \newcommand{\lcdm}{$\Lambda$CDM}
72: \newcommand{\ocdm}{OCDM}
73: 
74: \newcommand{\pk} {$P(k)$}
75: 
76: % Ly Alpha Forest Related
77: \newcommand{\lya}{Ly$\alpha$}
78: \newcommand{\lyb}{Ly$\beta$}
79: \newcommand{\lyg}{Ly$\gamma$}
80: \newcommand{\lyd}{Ly$\delta$}
81: \newcommand{\lyaf} {Lyman-$\alpha$ forest}
82: %\newcommand{\nhi}{$N_{\rm H I}$}
83: \newcommand{\zabs}{$z_{abs}$}
84: \newcommand{\zem}{$z_{em}$}
85: \newcommand{\da}{$D_A$}
86: 
87: % UV background related
88: \newcommand{\jtwentyone} {$J_{21}$}
89: \newcommand{\jzero}{$J_0$}
90: \newcommand{\jnu}{$J_{912}$}
91: \newcommand{\jovi}{$J_{197??}$}
92: 
93: 
94: \title{
95: Relative Flux Calibration of Keck HIRES Echelle Spectra\altaffilmark{1}} 
96: 
97: \author{ 
98: Nao Suzuki\altaffilmark{2},
99: David Tytler\altaffilmark{3},
100: David Kirkman,
101: John M. O'Meara,
102: \& Dan Lubin \\
103: Center for Astrophysics and Space Sciences;\\
104: University of California, San Diego; \\
105: MS 0424; La Jolla; CA 92093-0424\\}
106: 
107: \altaffiltext{1} {Based on data obtained with the Kast spectrograph 
108: on the Lick Observatory 3-m Shane telescope and with the HIRES and 
109: ESI spectrographs
110: at the W.M. Keck Observatory that
111: is a joint facility of the University of California, the California
112: Institute of Technology and NASA.}
113: \altaffiltext{2} {E-mail: suzuki@ucsd.edu}
114: \altaffiltext{3} {E-mail: tytler@ucsd.edu}
115: 
116: \begin{abstract}
117: 
118: We describe a new method to calibrate the relative flux levels in
119: spectra from the HIRES echelle spectrograph on the Keck-I telescope.
120: Standard data reduction techniques that transfer the instrument response
121: between HIRES integrations leave errors in the flux of 5 -- 10\%, because
122: the effective response varies. The flux errors are most severe near
123: the ends of each spectral order, where there can be discontinuous jumps.  
124: The source of these errors is uncertain, but may include changes in the
125: vignetting connected to the optical alignment. 
126: Our new flux calibration method uses a calibrated
127: reference spectrum of each target to calibrate individual HIRES
128: integrations. We determine the instrument response independently for
129: each integration, and hence we avoid the need to transfer the
130: instrument response between HIRES integrations.  The procedure can be
131: applied to any HIRES spectrum, or any other spectrum. While the 
132: accuracy of the method depends upon many factors, we have been able to
133: flux calibrate a HIRES spectrum to 1\% over scales of 200~\AA\ that include 
134: order joins. We illustrate the method with spectra of \qfive\ towards which 
135: we have measured the deuterium to hydrogen abundance ratio.
136: 
137: \keywords{quasars: absorption lines -- quasars: individual (\qfive )
138: -- cosmology: observations -- instrumentation: spectrographs --
139: methods: data analysis --  techniques: spectroscopic}
140: % from the AJ list http://www.astro.washington.edu/astroj/aj_sub.html
141: 
142: \end{abstract}
143: 
144: \section{Introduction}
145: 
146: In recent decades, the combination of large aperture telescopes and
147: high resolution spectrographs have allowed for precision analysis of a
148: variety of astrophysical objects.  Echelle spectrographs are the
149: instrument of choice for high resolution, and most large telescopes
150: now have one \citep{vogt87, diego90, dekker00, noguchi98, tull98,
151: mclean98}.
152: 
153: Echelle gratings can give spectra with high spectral resolution, with
154: a large slit width, and a large wavelength range in a single setting
155: \citep*{schroeder87}.
156: % Schroder, D.J. 1987 {\sl Astronomical Optics}, Academic Press
157: An echelle grating disperses the spectrum into many tens of spectral
158: orders, which are then cross dispersed by a second dispersive element
159: so that the orders can be placed, one above the other, on a
160: rectangular CCD detector.  It is difficult to combine the spectra from
161: the many spectral orders of an echelle to produce a single continuous
162: spectrum.  This difficulty arises because the response varies rapidly 
163: across each
164: order, and at a given wavelength is usually different in different
165: orders.
166: 
167: %The range of wavelengths in an order that are not covered in
168: %any other orders is called the free spectral range of that
169: %order. There is always significant light outside the free spectral
170: %range of each order, and this light can be recorded on a large
171: %detector.  Prisms or conventional gratings are used to cross-disperse
172: %these spectral orders, so that many orders can be placed, one above
173: %the other, on a rectangular CCD detector.
174: 
175: 
176: %The blaze
177: %function of the echelle and the vignetting in the spectrograph can
178: %produce large differences between the flux recorded at the blaze
179: %peak and the flux recorded at the edge of the free spectral range.
180: %Near the ends of two adjacent orders, the recorded spectra then have
181: %opposite slopes: as we move along a spectrum increasing the
182: %wavelength, the signal in one order declines while, at the same
183: %wavelength, the signal in the next order is increasing.
184: 
185: High quality relative flux calibration of echelle spectra is highly
186: desirable in many scientific applications.  For example, accurate flux
187: levels over a large range of wavelengths makes it much easier to place
188: continuum levels on spectra with pervasive blended absorption, such as
189: the Lyman alpha forest absorption seen in high redshift QSO spectra.
190: 
191: %, and brings three related
192: %benefits.  
193: %First, it ensures that the flux in a pixel, or a group of
194: %adjacent pixels, is not at an erroneous level because of local flux
195: %calibration errors.  Second, errors are easier to describe and more
196: %reliable when the main source of error in a spectrum is the photon
197: %noise, without a significant systematic component from errors in the
198: %flux calibration.  
199: 
200: %Third, accurate flux levels over a large range of
201: %wavelengths makes it much easier to place continuum levels on spectra
202: %with pervasive blended absorption, such as the Lyman alpha forest
203: %absorption seen in high redshift QSO spectra.
204: 
205: In this paper, we discuss the relative flux calibration of spectra
206: from the HIRES echelle spectrograph on the Keck-I telescope
207: \citep{vogt94}.  We do not discuss absolute flux
208: calibration, as it requires additional calibration data and
209: is not necessary for our absorption line work.
210: We intend that a spectrum with relative flux calibration has the correct
211: shape over some range of wavelengths, and differs from an absolute calibration
212: in only the normalization.
213: 
214: We developed the methods described in this paper to improve our
215: measurements of the primordial Deuterium to Hydrogen abundance ratio
216: in QSO absorption systems, for which the bulk of our spectra come from
217: HIRES.  We have found that we obtain more accurate and reliable
218: estimates of the absorption column densities when we use
219: spectra with accurate relative flux.  High quality flux calibration
220: was not a major design goal for HIRES, and we have found that special
221: steps must be taken to obtain the quality of calibration that we need
222: for our work on D/H.  The usual
223: \citep{iraf_echelle,iraf_slit,echelle_starlink}
224: methods of echelle flux calibration appear inadequate
225: for reasons that we do not fully understand.  This inadequacy
226: motivated the development of the methods we describe.
227: 
228: We would like to both minimize the flux errors in our spectra, and to
229: estimate the size of errors which remain after our calibrations.
230: We shall find that the flux calibration errors depend on wavelength and
231: they are correlated on various wavelength scales. We would like to estimate 
232: the size of the errors on these different scales.
233: We would also like to make the error in the relative flux calibration 
234: less than the photon noise on some relevant scale. For example, when we 
235: fit a flat
236: continuum level to a 50 pixel segment of a HIRES spectrum with signal to 
237: noise ratio of 100 per pixel, the photon noise on the continuum level is 0.14\%.
238: 
239: We found that is harder to approach a given accuracy in relative flux
240: calibration in many places.  These places include the regions
241: where echelle orders join, regions where spectra have lower signal to noise
242: ratio, 
243: wavelengths in the near UV, and in general as the wavelength range increases.  
244: It is very hard to get flux calibration errors of $<1$\% over 
245: even a wavelength range of $<40$~\AA\ within one HIRES order. 
246: Fortunately for our absorption line work, errors that vary
247: smoothly over wavelength scales $> 40$ \AA\ are not as serious as
248: smaller scale errors.
249: 
250: In this paper, we describe a way of calibrating the relative flux in a
251: HIRES spectrum using well calibrated reference spectra of the same
252: target to transfer flux information from other spectrographs to the
253: HIRES spectra.  We force each HIRES spectrum to have the shape of
254: these reference spectra.  This method should correct a variety of flux
255: calibration errors, both from variable vignetting and differences in
256: spectrum extraction and reduction.  The method could also be applied
257: to spectra from various spectrographs, and not just echelles.  This
258: method is based on that introduced by \citet*{burles97,burles98b}
259: %Burles \& Tytler (1997, 1998b),
260: and applied with improvements to \qfour\ in \citet{omeara01}.
261: %O'Meara \etal\ (2001),  and further refined for Q1243+3047 
262: %\citet{kirkman03}.
263: 
264: The paper is organized as follows: we first describe the nature of
265: inconsistencies between repeated HIRES observations of a target, and
266: how this impacts flux calibration.  Second, we describe the spectra we
267: used to illustrate our flux calibration method. Third, we describe at
268: first in overview, and then in detail, our methods for flux
269: calibration.  Fourth, we describe how we combine the HIRES orders that
270: we have flux calibrated individually. Finally, we discuss the accuracy
271: and errors of our method.
272: 
273: 
274: \section{Description of the HIRES flux calibration problem}
275: 
276: 
277: The usual methods of flux calibration appear inadequate when applied to
278: HIRES spectra.  When we determine the instrument response by observing
279: a spectrophotometric standard star, different exposures of the same
280: star give different instrument response functions, even when we
281: believe that the exposures were taken with the same instrument
282: configuration.  For example, in Figure \ref{X2}, we show the signal
283: extracted from two HIRES integrations of G191-B2B.  The exposures were
284: taken on consecutive nights, with similar instrument configurations.
285: On the second night the star was 0.07 degrees higher in the sky and
286: the image rotator (Appendix \ref{rotator}) physical angle differed by
287: 0.071 degrees to compensate for the change in parallactic angle.  The
288: spectra were both extracted with Tom Barlow's MAKEE software (April
289: 2001 version). We show the ``raw" ADU from the CCD before division by
290: the flat field integration or any other calibration.
291: 
292: The differences between the two exposures shown in Figure \ref{X2} are
293: large and unexpected.  In particular, even though the exposures were
294: taken on different nights, we did not expect to see large ($\sim
295: 10$\%) differences within a single order, even after the two exposures
296: were normalized to have the same mean flux in that order.
297: The differences are largest ($\sim$ 10\%) at the ends of the order.
298: Similar differences (both in shape and magnitude) are present in each
299: observed spectral order.  However, the form of the difference is not
300: precisely the same for each order, as demonstrated in Figure
301: \ref{X22c}.  \citet{barlow97} also noted the possibility of systematic
302: flux errors of 10\% near order overlaps.
303: 
304: Flux differences have also been reported for the Subaru telescope
305: HDS echelle spectrograph
306: that sometimes shows 10\% changes during observations \citep{aoki02}.
307: 
308: We have examined approximately 20 other pairs of standard star integrations 
309: from HIRES that have similar instrumental setups.
310: Most show differences of order 10\%, though the exact shape of the
311: differences is not always the same.  In addition to the ``U" shaped
312: ratios (seen in Figure \ref{X2}), we see three other shapes for
313: ratios: near flat ratios, tilted and ogive (or ``fallen S") shapes.  In
314: each case, the shapes of the ratios vary gradually order-to-order in a
315: systematic way, such that adjacent orders have similar shapes. The
316: shapes of the ratios vary much more between pairs of integrations than
317: they do from order-to-order for a given pair of integrations.
318: 
319: Approximately 30\% of integration pairs give flat ratios that indicate
320: that the instrumental response was very similar for the two
321: integrations, which should make flux calibration simple.  A cursory
322: examination did not show any predictors (e.g. telescope elevation,
323: rotator angle, position of target on the slit, seeing) as to which
324: pairs would be similar and which different.
325: 
326: In Figure \ref{X16}, we show HIRES integrations on two stars that we
327: flux calibrated in the usual manner, each using a response function
328: determined from a HIRES exposure of a standard star.
329: The spectra that we calibrated differ from the known flux levels by large
330: amounts over a wide range of wavelengths. The main deviations are
331: systematic across each HIRES order.  We also see large differences at
332: the order overlap wavelengths.  Different ways of combining spectral
333: orders leave different flux calibration errors. If we take the
334: mean of the signals then the flux will jump in a single pixel, by up
335: to 10\%, where each order begins and ends.  There will be
336: approximately 70 such jumps in a complete HIRES spectrum with 36
337: orders.
338: 
339: In the past, we have attempted to reduce the flux errors
340: by fitting continua to each order, and dividing by these continua,
341: before we take the mean flux in a wavelength overlap. This method is
342: unsatisfactory because it is very hard to ensure that the continua
343: that we fit to adjacent orders have both the same flux levels and the
344: same shapes, and we loose flux information.
345: 
346: For some unknown reason, long integrations on a QSO show
347: smaller differences than short integrations on a bright star. A dependence on
348: integration time might relate to some averaging, perhaps related to
349: the target position on the slit. A dependence on brightness might
350: relate to the 100 times lower signal in the QSO integrations, and
351: perhaps subsequent differences in the spectrum extraction.  We still
352: have difficulty flux calibrating QSO exposures, even though they
353: appear to be more stable than exposures on standard stars, because usual
354: procedures still require that we determine the instrument response from a
355: standard star exposure.
356: 
357: The variations we see in standard star exposures indicate that there
358: is some instability in either Keck+HIRES, in our data reduction
359: processes, or in both.  We have investigated two possible origins for the
360: instability: variable vignetting inside of HIRES, and inadequate the
361: extraction of the spectra. We do not see a clear signature of either
362: in our spectra, but we do know that the vignetting is expected to change.
363: 
364: We have explored the possibility of
365: extraction errors by varying the type of profile used during
366: extraction, and the profile width, but found no differences from the
367: standard extraction results from MAKEE.
368: We also measured flux ratios from the raw counts in the CCD images that were
369: similar to those in the spectra extracted by MAKEE.
370: 
371: We know that the vignetting inside HIRES changes with the position
372: angle of the sky image on the HIRES slit and with the telescope
373: elevation (Appendix \ref{rotator}).  
374: When the image rotator is used there are two main options.
375: We can use the image rotator in ``Vertical angle mode" to keep the
376: vertical angle along the slit, so that the position angle varies with
377: the position of the target in the sky.  The rotator can also be used
378: to keep a desired position angle along the slit.  If the rotator is
379: not used, the relevant angle is the telescope elevation.  The
380: variation in vignetting arises from a known mechanical and optical
381: misalignment between the Keck-I telescope and HIRES, and the expected
382: amount of change in the vignetting, from ray tracing kindly provided
383: by Steve Vogt, is approximately 10\%, consistent with our
384: observations.
385: 
386: We can account for why the ratios of HIRES spectra have similar shapes
387: across all orders if the variable vignetting happens after the
388: echelle, and before leaving the cross-disperser. In this part of HIRES
389: the light from the red end of each order is separated from that in the
390: blue end, but all orders are coincident. We might explain the shape of
391: the ratios, and the similarity from order-to-order, if a varying
392: amount of light misses the top and bottom of the cross-disperser (the
393: grooves are vertical), where the red and blue ends of the orders land.
394: This variation could arise when the cone of light from the telescope
395: tips up and down in the vertical plane that connects the center of the
396: tertiary mirror and the HIRES slit.
397: 
398: However, we suspect that vignetting is not the sole cause of the
399: variations in the flux, because we have seen variations in spectra
400: taken under apparently identical instrumental conditions (same
401: elevation, image rotator setting, and target location on the slit) on
402: consecutive nights, as we saw in Figure \ref{X2}.
403: 
404: The changes might also come from differences in the extraction of the
405: spectra from the CCD image, e.g. if we do not extract a fixed
406: proportion of the flux recorded at each wavelength.  Differences in
407: the extraction of spectra, including multiple integrations on a given
408: target, are likely whenever there
409: are changes in conditions, such as the location of the target along
410: the slit, the seeing, the sky brightness and the amount of signal
411: recorded.  However, extraction problems seem an unlikely explanation
412: for standard stars that have high signal to noise ratio.
413: 
414: 
415: 
416: \section{Spectra we will use to Illustrate our Method}
417: 
418: Here, we introduce the spectra that we will use to illustrate our
419: method of relative flux calibration. This is the set of spectra that
420: we used to measure D/H towards \qfive\ ($z_{em} = 2.64$, V=16.9;
421: Kirkman \etal\ 2003).  For our D/H work, we were mostly interested
422: the flux calibration in a 40~\AA\ region centered on the damped \lya\
423: line near 4285~\AA, and on the Lyman limit near 3210~\AA .  We began
424: the development of the methods using a similar set of spectra of
425: \qfour\ that we had used to make an earlier D/H measurement
426: \citep{omeara01}.
427: 
428: We used 5 spectra from the Kast spectrograph on the Lick 3-m
429: telescope, and one from the ESI echelle spectrograph on the Keck-II
430: telescope.  We used both the Kast and ESI spectra separately to make
431: independent flux calibrations of 8 integrations from HIRES.  Further
432: details of the observations, including the dates, the resolution, the
433: mean S/N, and plots of the spectra are in \citet{kirkman03}.  All
434: of the spectra that we used were shifted into the heliocentric frame,
435: and placed on a logarithmic wavelength scale with a constant velocity
436: increment per pixel, although with different increments for different
437: spectra.
438: 
439: \subsection{Spectra from Kast}
440: 
441: The Kast double spectrograph uses a
442: beam splitter to record blue and red spectra simultaneously in two
443: cameras.  For \qfive\ we have five KAST integrations, one from 1997,
444: and two each from 1999 and 2001. All integrations were obtained using
445: the d46 dichroic that splits the spectrum near 4600~\AA, the 830
446: line/mm grism blazed at 3460~\AA\ for the blue side, and the 1200
447: line/mm grating blazed at 5000~\AA\ for the red side.  We reduced all
448: exposures with the IRAF package {\tt longslit}.
449: 
450: \subsection{Spectra from ESI}
451: 
452: ESI covers from 3900 -- 11,000~\AA\ in ten
453: overlapping orders \citep{epps98,bigelow98,sheinis00}.
454: %(Epps \& Miller 1998; Bigelow \& Nelson 1998; Sheinis \etal\ 2000).
455: We have one exposure of \qfive\ using a 1'' slit, taken in the
456: echellette mode on January 11, 2000.  From the same night, we also
457: have an exposure of the flux standard star Feige 110.
458: 
459: \subsection{Spectra from HIRES}
460: 
461: Our HIRES spectra of \qfive\ all used similar instrumental setups.
462: The angle of the HIRES echelle was the same for all exposures, and
463: placed the center of each order near the center of the CCD. The
464: cross-disperser angle was also similar for all exposures, except for
465: one exposure that extended to much larger wavelengths.  The image
466: rotator (Appendix \ref{rotator}) was used in vertical mode, to
467: minimize slit losses from atmospheric dispersion.  We used the C5
468: decker, which provides an entrance aperture to the spectrograph with
469: dimensions $1.15^{''} \times 7.5^{''}$. In each case we placed the
470: target near the middle of the slit. The spectra were all recorded on
471: the engineering grade Tektronix CCD with 2048~$\times$~2048 pixels
472: that has been used in HIRES since 1994.
473: % but is to be replaced in 2003.
474: The HIRES pixel size is 2.1~\kms .
475: 
476: The CCD is large enough to record beyond the free spectral range for
477: all orders at wavelengths $< 5200$~\AA, and we placed the spectra on
478: the CCD such that we did record this flux for all such orders.  All
479: but one integration covered from near 3200\AA\ out to 4700\AA\ in
480: approximately 36 orders.  These integrations were 7200 -- 9000 seconds
481: long.  The S/N in each integration is near 3 per 2.1~\kms\ pixel near
482: the Lyman limit at $\sim$ 3200~\AA , and rises to near 35 at the peak of
483: the \lya\ emission line at $\sim$ 4400~\AA .
484: 
485: 
486: The HIRES spectra we use are the normal output from the MAKEE
487: software, which are the raw counts spectrum divided by spectra
488: extracted from flat field integrations.  In addition, the CCD defects
489: were marked with negative error values.  These spectra differ from the
490: raw counts that we discussed in the previous section in that the flat
491: field division has removed most of the variation across the orders due
492: to the blaze and vignetting. Although this flat field division may
493: introduce additional undesirable changes in the relative flux, we
494: proceed with these spectra because it is imperative that the CCD
495: defects have been removed.
496: 
497: \subsubsection{HIRES Spectral Resolution}
498: 
499: We measured the instrument resolution of HIRES by fitting Gaussian
500: functions to narrow, apparently un-blended lines in a single
501: Thorium-Argon arc integration taken before one of the QSO
502: integrations.  We fit hundreds of arc lines in all parts of the
503: spectrum, and found a dispersion of $\sigma = 3.4 \pm 0.1$~\kms, which
504: corresponds to a FWHM spectral resolution of $8.0 \pm 0.2$~\kms
505: ($b_{ins} = \sqrt{2}\sigma = 4.81 \pm 0.14$~\kms).  We did not detect
506: any variation in the resolution with wavelength.  However, we did
507: detect that the arc lines are not Gaussian in shape, with more
508: extended wings, such that the best fitting $\sigma$ increases when we
509: extend the fitting range around an individual line.  We also expect
510: that the spectra will have slightly different FWHM from the arc
511: spectra, because the illumination of the slit is different.
512: The wavelength shifts that we describe in the next section suggest that the
513: resolution will depend in part on the guiding and seeing.
514: 
515: \subsubsection{HIRES Wavelength Shifts}
516: \label{hireswave}
517: 
518: We measured wavelength shifts between the HIRES integrations and we
519: shifted the spectra onto the same scale to correct these shifts.  We
520: measured the cross-correlations between each of the 7 integrations
521: with the eighth that we used as the reference. An example of the
522: shifts is shown in
523: Figure \ref{X20a}. Comparisons of other pairs of integrations often
524: show a much larger dispersion in the measured shifts.  
525: In all cases, the shifts measured in each order are consistent with a
526: single shift for each integration.  The shifts had a standard
527: deviation of 0.7 \kms, which is 30\% of one HIRES CCD pixel.  Each
528: shift was measured to an accuracy of 0.13~\kms , which we determined
529: from the scatter in the shifts that we measured separately for each
530: order.
531: 
532: These shifts may arise from differences in the placement of the QSO
533: light in the HIRES slit, which projects to approximately 4 HIRES
534: pixels.  The 0.7 \kms\ rms shift is approximately 9\% of the FWHM
535: resolution, which itself is similar to the slit width.  The shifts do
536: not correlate with hour angle or the correction that was applied for 
537: the Earth's orbital motion ($<30$~\kms ) and spin ($<0.4$~\kms ).  The
538: shifts are
539: also larger than we expect from wavelength scale errors.  However, we
540: did find much larger wavelength scale errors when we did not 
541: ensure that MAKEE used enough arc lines to determine the dispersion
542: solution for each order.
543: 
544: \section{Overview of the Method}
545: 
546: There are three main steps in our procedure to apply relative flux
547: calibration to HIRES spectra.
548: 
549: \begin{itemize}
550: \item Step 1: Flux calibrate a high quality reference spectrum of
551:       the target.  
552: \item Step 2: Flux calibrate the HIRES echelle orders with the
553:       reference spectrum.  This imposes the long scale ($> 10$ \AA)
554:       spectral shape of the reference spectrum upon each HIRES echelle
555:       order.  The flux information on smaller scales (e.g. absorption
556:       line profiles) still comes from HIRES.
557: \item Step 3: Combine the HIRES orders. We first sum the integrations
558:       and then join the orders to give one continuous spectrum.
559: \end{itemize}
560: 
561: These procedures do not replace standard CCD spectrum extraction
562: procedures. Rather, they should be thought of as a ``software patch",
563: applied to correct errors that remain after the spectra have been
564: extracted, and perhaps calibrated, in the usual way.  Reasonably well
565: calibrated HIRES spectra are required as inputs to our method, because
566: the flux information on scales $< 10$ \AA\ will still come directly
567: from the HIRES spectra.  The procedure
568: is not unique, and we expect that other sequences might be appropriate
569: for different spectra.
570: 
571: We now discuss in further detail each of the steps outlined above.
572: 
573: \section{Step 1: Flux Calibrating the Reference Spectra of the Target}
574: 
575: Since we can not transfer information about the instrument response
576: between exposures, we must ``self-calibrate'' each exposure we take
577: with HIRES.  The first step of our method is thus to obtain a well
578: calibrated spectrum of the target.  The reference spectrum must
579: come from a well calibrated and stable spectrograph.  In our work on
580: Q1243+3047, we obtained reference spectra from both Lick+KAST and
581: Keck+ESI, and compared them to gauge the accuracy of the final flux
582: calibration.
583: 
584: \subsection{Flux Calibration of Kast Spectra}
585: 
586: To calibrate the flux in our Kast spectra of \qfive , we took flux
587: information from a model spectrum of G191~B2B for the 1997 spectrum,
588: and a STIS spectrum of BD~28~4211 for the 1999 and 2001 exposures.  We
589: discuss the reasons behind our choice of these standard stars in
590: Appendix A.  We measured and matched the resolution of the observed
591: and reference spectra of the standard stars before we used them to
592: calculate the Kast response function.  The dip in the response at the
593: end of blue CCD and the beginning of red the CCD is due to the
594: changing efficiency of the beam splitter.  In Figure \ref{X9}, we
595: illustrate the flux calibration process.
596: 
597: The spectrum shows atmospheric ozone absorption lines
598: \citep{schachter91} as the wiggles of the raw CCD counts (panel b)
599: below 3400~\AA .  Their strength depends on the temperature of the
600: ozone layer and the effective airmass of the integration, and we have
601: not made appropriate adjustments.  We left the wiggles un-smoothed in
602: the response (Figure \ref{X9}, panel d) to help partially remove their
603: effect from the quasar spectrum.
604: 
605: In Figure \ref{X23}, we show the accuracy of the flux calibration of a
606: Kast spectrum of another star.  The flux residuals between our
607: calibrated KAST spectrum and a STIS spectrum of the same star are less
608: than 3\%.
609: 
610: \subsection{Flux Calibration of ESI Spectrum}
611: 
612: We flux calibrate ESI spectra in the same way we do those from Kast.
613: In Figure \ref{X10}, we show the steps in the flux calibration of an
614: ESI spectrum. The ESI orders overlap in wavelength, and in Figure
615: \ref{X6}, we see that the orders do not always have the same flux.
616: These differences increase in size as we approach the end of an order.
617: We have not investigated the origin of these flux differences. We cut
618: off most of the regions where the differences exceeds 2\% (which is
619: the noise level in our spectrum) without leaving any gaps in the
620: wavelength coverage.  We do not know the size of the remaining error,
621: especially in regions where there was no wavelength overlap, because
622: we do not have redundant observations of bright stars.  Nonetheless,
623: the ESI spectra could have better relative flux calibration than HIRES
624: spectra, for several reasons. ESI has fewer orders, each of which
625: covers more wavelength range and a much larger portion of each order
626: is sampled by adjacent orders.  ESI has a fixed instrumental
627: configuration and our ESI spectra have much higher S/N than our
628: individual HIRES integrations, which may change the proportion of the
629: flux that is extracted.
630: 
631: \subsection{Errors in the Reference Spectra}
632: 
633: The errors in the relative flux calibration of the reference spectrum are a
634: fundamental limitation on how well we can apply relative flux
635: calibration to the HIRES spectrum. One way to explore these errors is
636: to compare different reference spectra.  
637: We will see that the differences increase with wavelength range and they
638: are the main source of error in our calibration of our HIRES spectra of 
639: \qfive .
640: 
641: We found that the 5 Kast spectra show two types of shape.  The two
642: from 1999 are similar, as are the two from 2001.  
643: %Figure \ref{k01ab} shows the ratio of the two from 2001. 
644: We call the sum of the two flux
645: calibrated spectra from 1999 K99, and the two from 2001 K01.  KSUM 
646: is our name for the sum of all five spectra.  The 1997 spectrum is
647: similar to K01, but has much lower S/N.
648: 
649: These two groups, K99 and K01, differ in shape on the largest scales
650: across the whole \lyaf , but they do have very similar shapes across a
651: few hundred Angstroms after we normalize them to each other at
652: those wavelengths.  These differences are best seen when we smooth 
653: them slightly by
654: differing amounts to reduce differences in the spectral resolution.
655: The K01 spectra have up to 10\% systematically higher flux at
656: wavelengths $<3400$~\AA\ than do the K99 spectra.  The K01 spectra had
657: a few percent lower flux from 4000 -- 4300~\AA\ and higher flux across
658: the \lya\ emission line.  We do not know the origin of these
659: differences.  Possible origins include variation in atmospheric
660: extinction \citep{burki95} or a variation in the QSO.
661: 
662: We find that the ESI spectra differed from the various Kast spectra by
663: typically 2\% or less per Kast pixel, from 4100 -- 4400~\AA .
664: The differences correlate over a few Kast pixels in the \lyaf ,
665: with no large scale trends, except that to the red side of the \lya\ emission
666: line the ratio of the Kast to ESI flux increases by
667: approximately 5\% from 4300 -- 4400~\AA\ for all five Kast spectra.
668: 
669: \section{Step 2: Flux Calibrating HIRES Echelle Orders with a Reference Spectrum}
670: 
671: We calibrated the relative flux in a HIRES spectrum using a calibrated
672: reference spectrum from either Kast or ESI.  We divided a smoothed
673: version of the HIRES spectrum by the reference spectrum to find the
674: ``Conversion Ratio" spectrum.  We found that the smoothed HIRES
675: spectrum and the reference had to have the same wavelength scale and
676: resolution, because the \lyaf\ absorption lines cause the flux to vary
677: rapidly in wavelength.  We calibrated the individual orders of each
678: HIRES integration using a smooth function fitted to the conversion
679: ratio spectra, one for each order of each integration.
680: 
681: In Figure \ref{X17},
682: % figure9=X17
683: we illustrate the calibration of the relative flux in the HIRES orders
684: that we describe in the following five sub-sections.
685: 
686: \subsection{Wavelength Matching}
687: Because the wavelengths from HIRES are more accurate,
688: we shifted the Kast spectra onto the HIRES wavelength scale.
689: We measured the shifts by cross-correlation of
690: complete HIRES orders, and we confirmed the values by cross-correlating
691: individual strong lines in the \lyaf .
692: 
693: Some of the wavelength shifts may arise because the QSO was not
694: exactly centered in the slit. This is a reasonable explanation for the
695: typical shift which was 42~\kms , or 0.4 Kast pixels, only 
696: 17\% of the projected width of a 2 arcsecond wide slit.
697: These shifts should vary monotonically
698: along a spectrum, and some Kast spectra show this.  However, Figure
699: \ref{X11} shows that other spectra have more complex wavelength
700: shifts.  In such cases we measured the mean shift for each HIRES
701: order, and we fit a low order polynomial to these mean values, similar
702: to that used to fit the arc line wavelengths, to give a smoothly
703: changing wavelength scale without gaps or discontinuities.
704: 
705: We also placed the ESI spectra on the HIRES wavelength scale.  
706: This wavelength scale assignment was obtained by first smoothing 
707: the HIRES spectra to the approximate spectral
708: resolution of ESI, and then finding the velocity
709: shift by cross-correlation of the ESI with the HIRES integration.  
710: %\NB{orders 85,
711: %84, 83 and 80.  makee orders 28, 29, 30 and 33.} 
712: We shifted the complete ESI spectrum by +5.61 \kms , which is
713: 7.5\% of the projected 1 arcsec slit width.  As with
714: the Kast spectra, this shift is larger than we would expect from the
715: wavelength fits to the arc calibration lines and may arise
716: because the QSO was not exactly centered in the slit.
717: 
718: %\NB{Hires order shifts were above}
719: 
720: \subsection{Resolution Matching}
721: 
722: We smooth the HIRES spectrum to match the resolution of the Kast
723: spectrum.  This procedure is sensitive to wavelength shifts between
724: the two spectra, and hence it was done after the wavelength scales
725: were matched.  In contrast, the wavelength scale matching is
726: insensitive to the spectral resolution.  We smoothed the HIRES
727: spectrum, and sampled it in the wavelength bins of the Kast spectrum.
728: We smoothed with a Gaussian function of known FWHM, truncated at
729: $2\sigma$, and normalized to unit area.  We smoothed by different FWHM
730: to find the amount of smoothing that left the smallest residuals
731: between the smoothed HIRES and Kast spectra.  These residuals appeared
732: flat across strong absorption lines, which suggests that a Gaussian is
733: an adequate approximation to the line spread function of the Kast
734: spectrum.  As with the wavelength matching, the \lyaf\ provides
735: additional signal for resolution matching.
736: 
737: The Kast spectral resolution varies from spectrum to spectrum, and it
738: can vary with wavelength in a spectrum, depending on where we chose to
739: focus.  We took the Kast resolution to be the FWHM of the smoothing
740: applied to the HIRES, after subtracting the initial HIRES 8~\kms\ FWHM
741: in quadrature.  For example, in the 1999 spectra of \qfive , the FWHM
742: of the Kast spectrum is near 300~\kms\ near 3300~\AA\ and from 3800 --
743: 4300~\AA\ but it improves to 220~\kms\ near 3500~\AA , where the
744: measurement error is approximately 10 -- 30~\kms , depending on the
745: region of the \lyaf .  We smoothed the HIRES spectrum by a single mean
746: FWHM even when the resolution varied along the Kast spectrum.  Using
747: similar methods we found that the ESI spectrum had a FWHM of 63.2
748: $\pm$ 3.0 \kms .
749: 
750: \subsection{Calculating the Conversion Ratio}
751: 
752: We divide the smoothed HIRES spectrum by the Kast spectrum, to obtain
753: the ``conversion ratio" (CR) spectrum.  The \lyaf\ hinders our
754: calculation of the CR, because we are very sensitive to slight
755: remaining errors in the wavelengths and the resolution.  
756: When we calculate the CR, we weight the flux in the individual spectra
757: by their errors, and we assign an error to each pixel in the CR.
758: %\NS{NS wants to add equation here because complex}
759: It is common to see increased error in the CR near strong
760: absorption lines (e.g. near 4285~\AA\ in panel (e) of Figure \ref{X17}), but 
761: this error does not have a systematic shape when
762: the wavelengths and resolution are well matched.
763: 
764: 
765: \subsection{Smoothing the Conversion Ratio}
766: 
767: We fit the CR spectra to obtain a smoothly changing function. The
768: original CR spectra vary from pixel to pixel because of photon
769: noise in the reference and HIRES spectra, especially in strong
770: absorption lines.  These variations can be much larger than the
771: expected change in the flux calibration and hence we can improve the
772: flux calibration by interpolating. We explored various ways of
773: smoothing and fitting, some in one dimension, along each order
774: separately, and others in two dimensions, both along and between
775: adjacent orders. The best choice will increase the S/N in the CR as
776: much as possible without changing the structure.
777: 
778: We found that a 4th order Chebyshev polynomial fit to the CR spectrum
779: for each HIRES order was a good choice. We choose this order by trial
780: and error. It leaves enough freedom to fit the shapes of the CR and
781: give a reduced $\chi ^2 \simeq 1$. Other fits would be appropriate in
782: spectra with different amount of structure and S/N.  In Figure
783: \ref{X21b}, we show the CR spectra for many HIRES orders.  We see
784: that the CR spectra for adjacent orders are very similar in shape, but
785: change systematically as we move across many orders. We also found
786: that the changes in shape from order-to-order are larger than
787: those between integrations for a given order, except for the effects of
788: photon noise in the CR.
789: 
790: We calculate the CR twice, in an iterative fashion, to improve the accuracy
791: near the ends of the HIRES orders. The first time, we stop the calculation 
792: before the order ends, where the filter, which we use to smooth the HIRES
793: spectrum to the resolution of the reference spectrum,
794: just touches the last pixel in the order. We can not, at that time, calculate 
795: the CR for the remaining pixels because we do not know the flux from beyond the
796: end of the order.
797: This flux is needed when we smooth the HIRES spectrum to match the reference 
798: spectrum. 
799: We do, however, allow the fit to the CR to extrapolate to the end of the order,
800: and we use that extrapolation to make the first estimate of the flux 
801: calibration. When we calculate the CR the second time, we 
802: know the HIRES flux from beyond the end of the order, because we have already
803: calibrated the whole HIRES spectrum.
804: 
805: An example of the type of error that can occur in the CR at order ends
806: is shown in Figure \ref{X21f}. In middle panel on the left, the
807: CR is erroneously low in the first two pixels at the start of order 98.
808: Here we calculated the CR once only, and we ignored the flux from beyond the
809: end of the order, where there happens to be a \lyb\ absorption line.
810: This absorption line lowers the flux in the reference spectrum, but not in
811: the HIRES spectrum for that order.
812: 
813: The error in the relative flux calibration of a HIRES integration
814: depends in part on the S/N in that HIRES integration. The conversion
815: ratios in Figure \ref{X21f} are for a second integration of \qfive\ that
816: can be compared to the integration shown in Figure \ref{X21b}.  The
817: two integrations were calibrated using the same Kast spectrum, and
818: hence the differences are caused by noise in the HIRES integration,
819: especially at the shortest wavelengths.
820: 
821: We experimented with other ways of smoothing the CR to reduce the
822: effects of photon noise. The 4th order polynomials smooth in
823: wavelength along an order, but they do not use any information from
824: adjacent orders.  We made a 2-dimensional map of the CR in the
825: coordinate frame of the HIRES CCD detector, and we smoothed this map
826: in both dimensions, both using a Gaussian filter and independently by
827: fitting a 2D surface using Chebyshev polynomials.  The Gaussian filter
828: did not work well because the largest width that did not change the
829: shape of the CR surface had a $4 \sigma $ width of only 3 orders, not
830: enough to reduce the noise significantly.  In Figure \ref{twodfit}, we
831: show a surface fit that was an improvement over the 1D polynomial
832: fits, but we did not use this in \citet{kirkman03}.
833: 
834: The error in the CR depends on the S/N in each CR pixel, and on the
835: fitting or smoothing that we use. The error will correlate on the
836: smoothing scale. When we apply a 4th order polynomial to each
837: order of 40~\AA, (the correlation length is approximately 10~\AA) and
838: this can be seen when we compare Figures \ref{X21b} \& \ref{X21f}.
839: There are also strong correlations in the CR near the ends of orders,
840: and near strong absorption where the errors are largest.
841: 
842: The contribution to the error in the CR from the S/N in the reference
843: or HIRES spectra can be estimated from the number of pixels in the
844: correlation length.  There are approximately 34
845: pixels in a Kast spectrum per HIRES order, and hence 
846: 8.5 per correlation length. An individual
847: Kast spectrum of \qfive\ has S/N 60 per pixel near 4250~\AA\ and 20
848: near 3250~\AA.  The CR will then have errors of at least 0.6\%
849: near 4250~\AA\ and 1.7\% near 3250~\AA.
850: 
851: \subsection{Applying the Conversion Ratio}
852: 
853: We divide the original HIRES integration, with full spectral
854: resolution and pixels, by the 1D fits to the CR to obtain the desired
855: flux calibrated HIRES spectrum.  Since we have not merged the orders,
856: the wavelength overlaps remain.  The resulting HIRES integration now
857: has relative flux calibration on each order.
858: 
859: 
860: \section{Step 3: Combine the HIRES Orders}
861: 
862: The final step is to combine the fluxed HIRES orders into a single
863: spectrum.  We add the HIRES integrations that have very similar
864: wavelength coverage, order by order, and then merge the orders. We choose
865: this sequence because it facilitates checks of the relative flux
866: calibration.  We compare the flux in each order in multiple
867: integrations before we sum the integrations. After they are summed,
868: the enhanced S/N makes it easier to see errors in the flux
869: calibration in the wavelength overlap between orders.
870: 
871: First, we place all orders from all HIRES integrations on a single
872: wavelength scale, so that pixels from orders that overlap in
873: wavelength sample exactly the same wavelengths.  We choose a scale
874: with a constant velocity increment of 2.1 \kms\ per pixel, equivalent
875: to constant log wavelength increment.  This choice has two advantages
876: over constant wavelength: in velocity units, the spectral resolution
877: of the echelle does not vary significantly with wavelength, and we use
878: velocity units to describe the widths of absorption line systems.
879: 
880: We simultaneously correct errors in the wavelength scales, using
881: information from the cross-correlation of different integrations as
882: discussed in (\S \ref{hireswave}). We do this correction
883: at the same time because we want to re-bin the HIRES spectra only once.
884: 
885: We calculate the mean flux in each pixel, from all integrations, after
886: rejecting large deviations that we identify by evaluating the $\chi
887: ^2$ statistic for each pixel.  We ignore the flux in a pixel from an
888: individual integration if it is $> m\sigma _i$ away from the weighted
889: mean for all integrations, where $\sigma _i $ are the errors on the
890: fluxes in the individual integrations.  The value of $m$ was
891: determined iteratively to remove most pixels with conspicuously
892: deviant flux values. For \qfive , we use $m=2$.  The algorithm
893: iterates, and re-derives the $\chi ^2$ after rejecting the flux value
894: from one integration. If all integrations are $> m \sigma$ away from
895: the weighted mean, we examine the errors.  If the errors in some of
896: the integrations have data, shown by non-zero errors returned by
897: MAKEE, we use the flux from the integration with the smallest error as
898: the mean.  If, however, there is no data in a particular pixel, for
899: example because of a known CCD defect, then we use the weighted mean
900: of the two pixels on either side, again using only those integrations
901: that are within $m \sigma$ of the weighted mean for that wavelength.
902: If none of the above criterion are met, we use the average of the
903: fluxes in all integrations.
904: 
905: Finally, we verify that adjacent orders show similar flux levels where
906: they overlap, and we used a weighted mean to combine the orders in
907: these regions, producing a single flux calibrated spectrum.  In Figure
908: \ref{f344thord}, we show order overlap for spectra of star Feige
909: 34. This spectrum can be compared to the spectra in Figures 
910: \ref{X16} that show
911: the flux calibration using usual methods. The ratio of the flux in
912: adjacent orders shows most variation near 3250~\AA\ : 0.92 -- 1.08\%,
913: and decreases to 0.98 -- 1.02 near 4300~\AA , where the signal to
914: noise ratio is highest in the Kast spectrum that we used as a reference.
915: The calibration of Feige 34 used the method and algorithm that we
916: developed and applied to our spectra of \qfive , with a few
917: exceptions.  The star does not have \lyaf\ lines, and hence we matched
918: the wavelength scale of the Kast and HIRES spectra using a single
919: shift for the whole Kast spectrum. We fitted the CR with one 4th order
920: polynomial per order.  A 6th order fit would work better near
921: 4300~\AA\ where the signal to noise ratio is high.
922: 
923: We consistently found, from many spectra, that the remaining difference 
924: between between the orders was 
925: largest at the end of an order, where the CR is less well known. Hence,
926: we tapered the flux from each order using a weighting function that
927: declined linearly from one, where the overlap begins, to zero, where the order
928: ends.
929: 
930: \section{Comparison of Spectra of \qfive\ Calibrated with Different 
931: Reference Spectra}
932: 
933: We made several different calibrations of the HIRES spectra of \qfive\ using
934: different low resolution spectra to convey the flux information.  We
935: label these HIRES spectra by the spectra that we used for
936: the flux calibration: hence, HK99 is the HIRES spectrum of \qfive\
937: calibrated using the Kast K99 spectrum of \qfive, HKSUM was calibrated
938: using the mean of all five Kast spectra and HESI was calibrated using the
939: ESI spectrum of \qfive .
940: 
941: We also made a spectrum, HH, which we calibrated using a HIRES spectrum
942: of a standard star. This HH calibration is not typical of the accuracy that 
943: we usually obtain, but rather it is the best that we could obtain with our
944: spectra. We made many calibrations using different HIRES integrations of 
945: standard stars, and we show the calibration that had the smoothest order 
946: joins. This HH calibration contrasts with the calibrations of the stars that
947: we showed in Fig. \ref{X16} that did not work as well.
948: 
949: In Figure \ref{X15}, we show the ratios of HIRES spectra calibrated in
950: these different ways.  The top panel shows HK99 spectra divided by
951: HESI.  There is a 7\% difference across the wavelength region shown.
952: The HK01 differs from HESI by 5\% at most, while the HKSUM
953: calibration differs from HESI by 4\%. The calibrations HH and HESI
954: differ the least -- only 3\% -- but show the largest jumps at order
955: joins, e.g. near 4325~\AA .  
956: The four gray bands of Figure \ref{X15} show the wavelength 
957: overlaps between the HIRES
958: orders. We show three complete orders and two partial ones.
959: 
960: We show the wavelength region centered on the
961: strong \lya\ lines that we have use to measure the H~I column density
962: that contributes to a D/H measurement. This \lya\ line has damping
963: wings that absorb approximately 1\% of the flux near 4233 and
964: 4340~\AA\ and hence accurate flux calibration of this region helps us
965: measure the column density, although most information comes from
966: 20~\AA\ on either side of the line center.
967: 
968: The differences between the calibrations have three origins.
969: The largest differences, which are on the largest scales, 
970: come from the differences between the K99, K01 and ESI spectra. 
971: Other differences, especially near the order joins, are related to the 
972: fitting of the CR, and are sensitive to the signal to noise ratio in the Kast 
973: and ESI spectra. A third type of difference occurs from pixel to pixel,
974: and comes from the rejection of deviant pixels from among the 8 HIRES 
975: integrations. The CR fits are smooth curves,
976: and the ratios would also be smooth were it not for differences in the
977: pixels which are rejected when we took the sum of the 8 integrations.
978: The numerous small 1 -- 2\% deviations arise when a pixel is not used
979: from one integration or another. The size of these deviations is
980: given by the signal to noise ratio of the individual integrations. 
981: The noise increases
982: in the strong absorption lines where we are dividing two HIRES
983: spectra, each of which has low signal to noise noise. 
984: Trends that are seen in more than one panel may come from differences
985: of the ESI spectrum from the others.  
986: 
987: We do not know which of the spectra is the more accurate.  
988: All of the spectra used in Figure \ref{X15} were calibrated with CR spectra 
989: that were fit order by order. We found that the 2-dimensional fits to the CR,
990: like that shown in Figure \ref{twodfit}, slightly reduced the deviations 
991: near the order joins.
992: 
993: 
994: \section{Discussion of the Accuracy of the Flux Calibration}
995: 
996: Many factors contribute to the errors in the relative flux calibration,
997: including:
998: \begin{itemize}
999: \item Errors in the flux reported for the standard star.
1000: \item Errors in our spectra of the standard star and reference. Common
1001: error sources include
1002: extinction and absorption in the Earth's atmosphere, slit losses that depend 
1003: on wavelength, a dichroic in the 
1004: spectrograph, variation of the target, variation with wavelength of
1005: the proportion of the flux extracted, and the S/N of the spectra.
1006: \item Errors calculating the response function that we use to calibrate the
1007: reference spectrum. 
1008: Errors occur matching the resolution and wavelength scales of our spectrum of 
1009: the standard to the published flux information.
1010: Such errors are especially conspicuous near absorption lines in the standard.
1011: \item Errors in the preparation of the HIRES spectrum, including
1012: the bias subtraction, flat field division and extraction.
1013: \item Errors applying the flux calibration to HIRES spectrum, including
1014: wavelength shifts, resolution differences, the signal to noise ratio of the HIRES 
1015: spectrum and fitting the CR.
1016: \end{itemize}
1017: We have found that many of these factors can produce 1 -- 10\% errors in flux
1018: calibration, but it is difficult to assign typical values for these errors.
1019: 
1020: The size of the error in the relative flux calibration depends on the
1021: wavelength and the wavelength range.  We do not include errors from the CR
1022: in the usual error array because the CR errors are 
1023: correlated over many pixels.
1024: In this paper we have concentrated on scales of a few orders, or 
1025: approximately 120~\AA\ that are most relevant to our work on D/H. We
1026: have paid much less attention to the relative flux calibration on larger scales
1027: that are dominated by a different set of factors, such as the extinction
1028: at the time of observation.  We expect errors due to extinction to
1029: monotonically increase with scale in our reference spectrum.
1030: 
1031: An indication of the accuracy we have attained in relative flux
1032: calibration is given in Figure \ref{f344thord}. We compare three 
1033: spectra of the flux standard star Feige 34: a HIRES spectrum that we
1034: flux calibrated using a Kast spectrum as the reference, the Kast
1035: reference spectrum, and STIS a spectrum.
1036: The Kast and STIS spectra are those shown in Figure \ref{X23}.
1037: The STIS spectrum was not used in the calibration, except to provide the
1038: normalization of the Kast spectrum across the range 3200 -- 4450~\AA .
1039: We used a one-dimensional 4th order polynomial to fit the CR.
1040: In the wavelength region shown, the HIRES spectrum differs from 
1041: its reference by at most 2.5\%, except near the absorption line,
1042: and typically $<1$\%. 
1043: At wavelengths 3400 -- 3800~\AA , where the signal to noise ratio is lower, the
1044: differences are twice as large.  
1045: The differences correlate on scales $> 5$~\AA .
1046: The flux in different HIRES orders joins smoothly, with no unusual structure.
1047: The remaining differences of the HIRES and STIS spectra come from the
1048: deviation of the Kast spectrum from the STIS, shown in Figure \ref{f344thord}.
1049: This comparison demonstrates that the method can give errors of
1050: $<1$\% in the relative flux over approximately 200~\AA .  
1051: For Feige 34 the accuracy of the flux calibration was limited by the 
1052: accuracy of the reference, and not by the method itself.
1053: \section{SUMMARY}
1054: 
1055: 
1056: We found that the distribution of the signal recorded in HIRES
1057: integrations differs from integration to integration. We 
1058: do not have a complete explanation for this behavior, although
1059: varying vignetting and inadequate extraction may be involved.
1060: We found that these differences persist
1061: even when the instrument is apparently unchanged. These changes mean
1062: that the usual methods of flux calibration are inadequate.
1063: 
1064: The methods we have described for applying relative flux calibration
1065: to a HIRES spectrum use three spectra: the HIRES spectrum of the target that
1066: we wish to calibrate, and Kast spectra of both the target and a flux standard
1067: star. We use the latter to get the Kast response and calibrate the
1068: Kast spectrum of the target that we name the reference spectrum.  We use 
1069: reference spectrum to impose flux calibration on the HIRES target spectrum.
1070: 
1071: This has method has three advantages. First, we
1072: can calibrate HIRES when normal calibrations using standard stars
1073: observed with HIRES alone are inadequate.  Second, we can correct many
1074: types of error in the HIRES spectrum, including those from varying
1075: vignetting and inadequate extraction.  Finally, we can obtain all the
1076: calibration spectra at a different time and on a different telescope.
1077: 
1078: The error in relative flux calibration, and the solution that we
1079: describe, could apply to any spectrum with inadequate relative flux
1080: calibration, whether from an unstable spectrograph or from inadequate
1081: extraction. Vignetting could vary in any spectrograph that was unstable.
1082: Instability could involve an optical misalignment, as with HIRES.
1083: Variable vignetting would be harder to recognize in a
1084: first order spectrum because we expect the largest changes near the
1085: largest field angles, but there is only one spectrum to show this
1086: change, and
1087: flux calibration is often harder near the ends of a single spectrum, for other
1088: reasons.
1089: 
1090: 
1091: \section{Acknowledgments}
1092: 
1093: This work was funded in part by grant NAG5-9224 and by NSF grant
1094: AST-9900842 and AST-0098731.  The spectra were obtained from the Lick
1095: and the W.M. Keck observatories. The W.M. Keck observatory is managed by a
1096: partnership among the University of California, Caltech and NASA.  We
1097: are grateful to Steve Vogt, the PI for the Keck HIRES instrument that
1098: enabled our work on D/H, for many invaluable discussions, along with
1099: Tom Barlow, who developed the MAKEE extraction software package.  We also
1100: thank Wako Aoki and Kunio Noguchi for discussions of the HDS echelle 
1101: spectrograph, and the W.M. Keck Observatory staff and the Lick Observatory 
1102: staff.
1103: 
1104: \appendix
1105: 
1106: \section{Appendix A: Choice of Standard Star}
1107: \label{appa}
1108: 
1109: We used the calibrations of the flux in stars based on
1110: STIS spectra \citep*{bohlin01}.
1111: In Figure \ref{X4} we see that the STIS spectra do not show the
1112: wiggles at 3200-3850~\AA\ that are present in the \citet*{oke90}
1113: spectrum of G191 B2B. This and other Oke spectra are
1114: widely used by default in the reduction packages IRAF and MIDAS.
1115: The differences between the \citet*{oke90}
1116: and STIS spectra can reach several 
1117: percent, larger than our random photon noise. Based on the lack of 
1118: features in the spectrum and the STIS data quality,
1119: we preferred the following stars for UV flux calibration near 3200~\AA :
1120: G191 B2B, BD+28 4211, Feige~110, and Feige~34. 
1121: For G191 B2B we have the additional choice of using a model spectrum 
1122: given by \citet{bohlin01}. This model spectrum fits
1123: their STIS spectra to within 0.7~\% in the continuum \citep*{bohlin00}, and
1124: it simplifies flux calibration because it has full resolution.
1125: 
1126: We used the entire STIS spectrum for flux calibration,
1127: including the broad Balmer absorption lines.  
1128: The \citet*{oke90}
1129: paper provides AB magnitudes at discrete continuum 
1130: points in 5-50~\AA\ intervals. These points skip the Balmer absorption lines,
1131: but we can not do this, because we then have insufficient information to
1132: calibrate several echelle orders, each of which is only 30-60~\AA\ long.
1133: 
1134: Our use of the flux calibration information near the Balmer lines can help us
1135: avoid significant errors.
1136: In Figure \ref{X5} we show a spectrum from ESI echellette order 15 that has its 
1137: sensitivity peak around 4350~\AA\ that coincides with Balmer $\gamma $ line, 
1138: 4341.68~\AA .  \qfive\ \citep{kirkman03} happens to have its \lya\ 
1139: emission at 4330~\AA . In an early flux calibration of this order, poor 
1140: interpolation across this Balmer line had led
1141: us to make an 8\% calibration error that was three times the random error.
1142: 
1143: 
1144: \section{Appendix B: HIRES Image Rotator}
1145: \label{rotator}
1146: 
1147: The vignetting in HIRES depends on whether or not the image rotator is
1148: used, and on the mode in which the rotator is used.
1149: 
1150: HIRES is fixed to the Nasmyth platform of the Keck-I telescope with its
1151: slit approximately parallel to the horizon.
1152: When we look at the image of the sky on the HIRES slit, we see that the
1153: vertical direction in this
1154: image rotates at a rate given by the elevation (EL) of the telescope.
1155: This is because telescope is rotating in EL 
1156: while HIRES is fixed.
1157: If the telescope is pointing at the horizon, and looking at an 
1158: arrow in the sky that is pointing towards the zenith, the image of 
1159: this arrow on the slit plane is also pointing towards the vertical, 
1160: which is perpendicular to the length of the slit.
1161: As the telescope moves to higher EL, the arrow rotates until it is 
1162: aligned along the slit when the telescope is pointing to the zenith.
1163: 
1164: The HIRES image rotator allows us to rotate the image of the sky on the
1165: slit plane in any way we like.
1166: We installed an image rotator in HIRES in late 1996. This is a large
1167: quartz prism that sits in front of the HIRES slit. The light from the
1168: Keck-I telescope tertiary mirror 
1169: undergoes three total internal reflections in the prism before 
1170: coming to a focus on the slit plane. 
1171: The prism can rotate continuously in either direction
1172: about the axis of the beam that converges on the center of the slit.
1173: The prism is aligned so that the image of a star on the center of the
1174: slit moves by under 0.5 arc seconds when the prism is moved in or
1175: out of the beam, and when the prism is rotated. The prism can be 
1176: spun rapidly to demonstrate this alignment. The prism does not
1177: vignette any of the beam that lands within 60 arc seconds of 
1178: the center of the slit.
1179: 
1180: The image rotator has two main modes of operation: Position Angle and
1181: Vertical Angle. The position angle mode is used when we wish to keep two
1182: stars in the slit, where as the vertical angle mode is used to keep the
1183: vertical direction in the sky parallel with the slit, as a surrogate for
1184: an atmospheric dispersion compensator. 
1185: When the image rotator was used in Vertical mode, the position angle along 
1186: the slit is the parallactic angle, and this varies as we track a target.
1187: The parallactic angle is measured at the target, from the North Celestial 
1188: Pole to the Zenith, in the direction from North via East. 
1189: The parallactic angle is fixed for a given elevation and azimuth 
1190: in the sky, but it changes when we track a target across the sky.
1191: 
1192: HIRES spectra are hard to flux calibrate in part because the 
1193: vignetting can change by 10\% from spectrum to spectrum.
1194: The vignetting changes because there is a known misalignment 
1195: between the beam coming from tertiary mirror and the HIRES optical axis.
1196: When HIRES was installed, the center of the Keck telescope pupil 
1197: was measured
1198: to be approximately 9~mm away from the collimator center, which
1199: corresponds to a beam misalignment of 7.4 arcminute. 
1200: If a star is held at one position on the HIRES slit, the axis of 
1201: the beam entering HIRES will rotate around the HIRES optical 
1202: axis at a rate given by any change in the position angle of the 
1203: sky image on the slit. If the position angle moves through 360 
1204: degrees, the axis of the beam entering HIRES
1205: follows the surface of a cone with an apex angle of 
1206: approximately 14.8 arcminutes.
1207: Steve Vogt used ray tracing to find that this rotation causes 
1208: the vignetting to vary by approximately 10\%, depending on the angle.
1209: %The vignetting occurs at the focal plane in the Schmidt camera, 
1210: %with some from the cross-disperser at certain wavelengths and 
1211: %field angles.
1212: The vignetting occurs due to a dewar which forms a central obstruction
1213: in the beam near the camera's prime focus.
1214: 
1215: \begin{thebibliography}{25}
1216: \expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
1217: 
1218: \bibitem[{{Aoki}(2002)}]{aoki02}
1219: {Aoki}, W. 2002,
1220:   http://www.subarutelescope.org/Observing/Instruments/HDS/index.html
1221: 
1222: \bibitem[{{Barlow} \& {Sargent}(1997)}]{barlow97}
1223: {Barlow}, T.~A. \& {Sargent}, W.~L.~W. 1997, \aj, 113, 136
1224: 
1225: \bibitem[{{Bigelow} \& {Nelson}(1998)}]{bigelow98}
1226: {Bigelow}, B.~C. \& {Nelson}, J.~E. 1998, in Proc. SPIE Vol. 3355, p. 164-174,
1227:   Optical Astronomical Instrumentation, Sandro D'Odorico; Ed., Vol. 3355,
1228:   164--174
1229: 
1230: \bibitem[{{Bohlin}(2000)}]{bohlin00}
1231: {Bohlin}, R.~C. 2000, \aj, 120, 437
1232: 
1233: \bibitem[{{Bohlin} {et~al.}(2001){Bohlin}, {Dickinson}, \&
1234:   {Calzetti}}]{bohlin01}
1235: {Bohlin}, R.~C., {Dickinson}, M.~E., \& {Calzetti}, D. 2001, \aj, 122, 2118
1236: 
1237: \bibitem[{{Burki} {et~al.}(1995){Burki}, {Rufener}, {Burnet}, {Richard},
1238:   {Blecha}, \& {Bratschi}}]{burki95}
1239: {Burki}, G., {Rufener}, F., {Burnet}, M., {Richard}, C., {Blecha}, A., \&
1240:   {Bratschi}, P. 1995, \aaps, 112, 383
1241: 
1242: \bibitem[{{Burles} \& {Tytler}(1997)}]{burles97}
1243: {Burles}, S. \& {Tytler}, D. 1997, \aj, 114, 1330
1244: 
1245: \bibitem[{{Burles} \& {Tytler}(1998)}]{burles98b}
1246: ---. 1998, \apj, 507, 732
1247: 
1248: \bibitem[{{Clayton}(1996)}]{echelle_starlink}
1249: {Clayton}, M. 1996, http://starlink.rl.ac.uk/star/docs/sg9.htx/sg9.html
1250: 
1251: \bibitem[{{Dekker} {et~al.}(2000){Dekker}, {D'Odorico}, {Kaufer}, {Delabre}, \&
1252:   {Kotzlowski}}]{dekker00}
1253: {Dekker}, H., {D'Odorico}, S., {Kaufer}, A., {Delabre}, B., \& {Kotzlowski}, H.
1254:   2000, in Proc. SPIE Vol. 4008, p. 534-545, Optical and IR Telescope
1255:   Instrumentation and Detectors, Masanori Iye; Alan F. Moorwood; Eds., Vol.
1256:   4008, 534--545
1257: 
1258: \bibitem[{{Diego} {et~al.}(1990){Diego}, {Charalambous}, {Fish}, \&
1259:   {Walker}}]{diego90}
1260: {Diego}, F., {Charalambous}, A., {Fish}, A.~C., \& {Walker}, D.~D. 1990, in
1261:   Instrumentation in astronomy VII; Proceedings of the Meeting, Tucson, AZ,
1262:   Feb. 13-17, 1990 (A91-29601 11-35). Bellingham, WA, Society of Photo-Optical
1263:   Instrumentation Engineers, 1990, p. 562-576. Anglo-Australian
1264:   Observatory-supported research., Vol. 1235, 562--576
1265: 
1266: \bibitem[{{Epps} \& {Miller}(1998)}]{epps98}
1267: {Epps}, H.~W. \& {Miller}, J.~S. 1998, in Proc. SPIE Vol. 3355, p. 48-58,
1268:   Optical Astronomical Instrumentation, Sandro D'Odorico; Ed., Vol. 3355,
1269:   48--58
1270: 
1271: \bibitem[{{Kirkman} {et~al.}(2003){Kirkman}, {Tytler}, {Suzuki}, {O'Meara}, \&
1272:   {Lubin}}]{kirkman03}
1273: {Kirkman}, D., {Tytler}, D., {Suzuki}, N., {O'Meara}, J.~M., \& {Lubin}, D.
1274:   2003, \apjs submitted, astro-ph/0302006
1275: 
1276: \bibitem[{{Massey} {et~al.}(1992){Massey}, {Valdes}, \& {Barnes}}]{iraf_slit}
1277: {Massey}, P., {Valdes}, F., \& {Barnes}, J. 1992,
1278:   http://iraf.noao.edu/docs/spectra.html
1279: 
1280: \bibitem[{{McLean} {et~al.}(1998){McLean}, {Becklin}, {Bendiksen}, {Brims},
1281:   {Canfield}, {Figer}, {Graham}, {Hare}, {Lacayanga}, {Larkin}, {Larson},
1282:   {Levenson}, {Magnone}, {Teplitz}, \& {Wong}}]{mclean98}
1283: {McLean}, I.~S., {Becklin}, E.~E., {Bendiksen}, O., {Brims}, G., {Canfield},
1284:   J., {Figer}, D.~F., {Graham}, J.~R., {Hare}, J., {Lacayanga}, F., {Larkin},
1285:   J.~E., {Larson}, S.~B., {Levenson}, N., {Magnone}, N., {Teplitz}, H., \&
1286:   {Wong}, W. 1998, in Proc. SPIE Vol. 3354, p. 566-578, Infrared Astronomical
1287:   Instrumentation, Albert M. Fowler; Ed., Vol. 3354, 566--578
1288: 
1289: \bibitem[{{Noguchi} {et~al.}(1998){Noguchi}, {Ando}, {Izumiura}, {Kawanomoto},
1290:   {Tanaka}, \& {Aoki}}]{noguchi98}
1291: {Noguchi}, K., {Ando}, H., {Izumiura}, H., {Kawanomoto}, S., {Tanaka}, W., \&
1292:   {Aoki}, W. 1998, in Proc. SPIE Vol. 3355, p. 354-362, Optical Astronomical
1293:   Instrumentation, Sandro D'Odorico; Ed., Vol. 3355, 354--362
1294: 
1295: \bibitem[{{Oke}(1990)}]{oke90}
1296: {Oke}, J.~B. 1990, \aj, 99, 1621
1297: 
1298: \bibitem[{{O'Meara} {et~al.}(2001){O'Meara}, {Tytler}, {Kirkman}, {Suzuki},
1299:   {Prochaska}, {Lubin}, \& {Wolfe}}]{omeara01}
1300: {O'Meara}, J.~M., {Tytler}, D., {Kirkman}, D., {Suzuki}, N., {Prochaska},
1301:   J.~X., {Lubin}, D., \& {Wolfe}, A.~M. 2001, \apj, 552, 718
1302: 
1303: \bibitem[{{Schachter}(1991)}]{schachter91}
1304: {Schachter}, J. 1991, \pasp, 103, 457
1305: 
1306: \bibitem[{{Schroeder}(1987)}]{schroeder87}
1307: {Schroeder}, D.~J. 1987, {Astronomical Optics} (San Diego: Academic Press,
1308:   1987)
1309: 
1310: \bibitem[{{Sheinis} {et~al.}(2000){Sheinis}, {Miller}, {Bolte}, \&
1311:   {Sutin}}]{sheinis00}
1312: {Sheinis}, A.~I., {Miller}, J.~S., {Bolte}, M., \& {Sutin}, B.~M. 2000, in
1313:   Proc. SPIE Vol. 4008, p. 522-533, Optical and IR Telescope Instrumentation
1314:   and Detectors, Masanori Iye; Alan F. Moorwood; Eds., Vol. 4008, 522--533
1315: 
1316: \bibitem[{{Tull}(1998)}]{tull98}
1317: {Tull}, R.~G. 1998, in Proc. SPIE Vol. 3355, p. 387-398, Optical Astronomical
1318:   Instrumentation, Sandro D'Odorico; Ed., Vol. 3355, 387--398
1319: 
1320: \bibitem[{{Vogt}(1987)}]{vogt87}
1321: {Vogt}, S.~S. 1987, \pasp, 99, 1214
1322: 
1323: \bibitem[{{Vogt} {et~al.}(1994){Vogt}, {Allen}, {Bigelow}, {Bresee}, {Brown},
1324:   {Cantrall}, {Conrad}, {Couture}, {Delaney}, {Epps}, {Hilyard}, {Hilyard},
1325:   {Horn}, {Jern}, {Kanto}, {Keane}, {Kibrick}, {Lewis}, {Osborne},
1326:   {Pardeilhan}, {Pfister}, {Ricketts}, {Robinson}, {Stover}, {Tucker}, {Ward},
1327:   \& {Wei}}]{vogt94}
1328: {Vogt}, S.~S., {Allen}, S.~L., {Bigelow}, B.~C., {Bresee}, L., {Brown}, B.,
1329:   {Cantrall}, T., {Conrad}, A., {Couture}, M., {Delaney}, C., {Epps}, H.~W.,
1330:   {Hilyard}, D., {Hilyard}, D.~F., {Horn}, E., {Jern}, N., {Kanto}, D.,
1331:   {Keane}, M.~J., {Kibrick}, R.~I., {Lewis}, J.~W., {Osborne}, J.,
1332:   {Pardeilhan}, G.~H., {Pfister}, T., {Ricketts}, T., {Robinson}, L.~B.,
1333:   {Stover}, R.~J., {Tucker}, D., {Ward}, J., \& {Wei}, M.~Z. 1994, in Proc.
1334:   SPIE Instrumentation in Astronomy VIII, David L. Crawford; Eric R. Craine;
1335:   Eds., Volume 2198, p. 362, Vol. 2198, 362+
1336: 
1337: \bibitem[{{Willmarth} \& {Barnes}(1994)}]{iraf_echelle}
1338: {Willmarth}, D. \& {Barnes}, J. 1994, http://iraf.noao.edu/docs/spectra.html
1339: 
1340: \end{thebibliography}
1341: 
1342: 
1343: %% Figures
1344: %--figure
1345: 
1346: \clearpage
1347: 
1348: % figure 1
1349: \begin{figure}
1350: \epsscale{0.9}
1351: \plottwo{x2v2.ps}{x3v2.ps}
1352: \caption{
1353: Two 300 second integrations of the star G191-B2B taken with near identical
1354: HIRES setups on consecutive nights: 19 (solid) and 20
1355: (light) September, 2000.  The right panel shows the ratio of the two.
1356: These spectra were taken with the C5 dekker (1.14 arcsec slit), and
1357: the image rotator was set to align the sky vertical along the slit.
1358: The September 19 integration had sidereal time ST = 05:16:48 hours,
1359: telescope elevation EL = 56.96 degrees, and image rotator physical
1360: angle, as measured looking at the prism, of IROT2ANG = 195.9357
1361: degrees. For September 20th we had ST = 05:02:24, EL = 57.03 degrees
1362: and IROT2ANG = 195.8646.  The September 20th spectrum was multiplied
1363: by 1.06 to give similar counts to the other near 4300~\AA\ to correct
1364: for differences in the atmospheric transparency, seeing and the loss
1365: of light at the slit.
1366: % K0900 DN-0140 solid and 0229 light
1367:  \label{X2}  }
1368: \end{figure}
1369: 
1370: \clearpage
1371: % figure 2
1372: \begin{figure}
1373: \includegraphics[angle=270,scale=0.45]{x22cv2.ps}
1374: \caption{
1375: The ratio of the two spectra shown in Fig. \ref{X2}, divided by
1376: average ratio from the ten orders with the largest wavelengths. We show this
1377: average in the top left panel, and other panels each show one HIRES order.
1378: We show the full amount of each order
1379: that fell on the CCD, which includes some wavelength overlap between
1380: adjacent orders. We have re-binned the original
1381: 2048 pixels into 205 pixels for presentation.
1382: \label{X22c}  }
1383: \end{figure}
1384: 
1385: \clearpage
1386: %% Demonstartion of the failure of the Standard Method
1387: % figure 3
1388: \begin{figure}
1389: \epsscale{0.9}
1390: \plottwo{x16av4.ps}{x16bv5.ps}
1391: \caption{
1392: HIRES spectra of stars that we flux calibrated in the usual manner.
1393: In both cases we see large flux calibration errors. In other cases we
1394: can obtain smaller errors.
1395: Left, 
1396: HIRES integration of star BD+33 2642.
1397: We determined the response function of HIRES by
1398: comparing a HIRES spectrum of G191-B2B, taken on the same night
1399: (September 19, 2000), to a model spectrum with known flux (Appendix
1400: \ref{appa}).  The continuous line shows a lower resolution HST FOS
1401: spectrum of BD+33~2642. We may adjust the HIRES spectrum vertically to
1402: account for slit losses.  The right panel is the same, but for a HIRES
1403: integration of BD+28~4211 obtained October 10, 1999, calibrated with a
1404: HIRES spectrum of G191-B2B, taken on the same night. The continuous line
1405: is a STIS spectrum of BD+28~4211.  \label{X16} }
1406: \end{figure}
1407: 
1408: \clearpage
1409: %% HIRES vs HIRES wavelength shift
1410: % figure 4
1411: % formaly called "hires-shift"
1412: \begin{figure}
1413: \includegraphics[angle=270,scale=0.45]{x20av1.ps}  
1414: \caption{
1415: The wavelength shifts measured between two consecutive HIRES integrations
1416: for \qfive , both taken on March 13, 2000.  The small points show
1417: shifts measured by cross-correlating blocks of approximately 20 pixels that 
1418: contain an absorption line.  The larger points show the
1419: mean shift per order, and the vertical bars show $\pm 1\sigma $ from
1420: the distribution of the measurements in that order. The dotted line
1421: shows the mean shift between the two integrations.
1422: \label{X20a}  }
1423: \end{figure}
1424: 
1425: \clearpage
1426: % figure 5
1427: \begin{figure}
1428: \epsscale{0.6}
1429: \plotone{x9v1.ps}
1430: \caption{
1431: Steps in the calibration of the flux in a Kast spectrum.
1432: Panel (a) shows the STIS spectrum of star BD+28 4211. Panel (b) shows the
1433: raw counts recorded in two simultaneous Kast integrations,
1434: one with the blue camera (left) and one with the red camera (right).  We do
1435: not show the wavelength overlap on
1436: either side of the central wavelength of the dichroic beam splitter (called
1437: d46), which we show with the vertical line near 4450~\AA .    
1438: We had moved the ``x-stage" that holds the CCD of the blue camera of Kast
1439: to sample wavelengths well beyond the peak of the \lya\ emission line.
1440: Panel (c) shows the response function (b)/(a), and panel (d) shows the raw
1441: counts in one 5400 second integration on \qfive .
1442: Panel (e) shows the flux calibrated spectrum, (d)/(c).
1443: \label{X9}  }
1444: \end{figure} 
1445: 
1446: \clearpage
1447: % figure 6
1448: %% we may not need to use the following
1449: \begin{figure}
1450: \includegraphics[angle=270,scale=0.45]{x23v1.ps}
1451: \caption{
1452: Top Panel: Two spectra of the star Feige~34, one from STIS (solid line,
1453: \citealt{bohlin01}), and
1454: the other a Kast spectrum that we have flux calibrated (dotted).
1455: We calibrated the Kast spectrum with Kast spectrum of the star BD+28~4211.
1456: We also normalized the Kast spectrum to have the same mean flux as the STIS 
1457: spectrum to adjust for slit losses.
1458: Bottom Panel: Ratio of the two spectra in the top panel.
1459: The dotted line is the error for the STIS spectrum (approximately 1\% random 
1460: and 3\% systematic), and the dashed line is the
1461: random error from the photon noise in the Kast spectrum.
1462: These errors are for 2~\AA\ pixels.
1463: \label{X23}  }
1464: \end{figure}
1465: 
1466: \clearpage
1467: % figure 7
1468: \begin{figure}
1469: \epsscale{0.6}
1470: \plotone{x10v2.ps}
1471: \caption{
1472: Steps in the flux calibration of an ESI integration of \qfive\ using
1473: an ESI spectrum of the star Feige~110 obtained on the same night.  We
1474: show only 3 of the 10 ESI orders. Panel (a) at the top shows the STIS
1475: flux calibrated spectrum of star Feige 110. Panel (b) shows the raw
1476: CCD counts from an ESI spectrum of this star. Panel (c) shows the
1477: smoothed ratio (b)/(a) that is the response function of ESI.  Panel
1478: (d) shows the raw counts from an integration of \qfive , and panel (e)
1479: shows the same spectrum after relative flux calibration.  \label{X10}
1480: }
1481: \end{figure}
1482: 
1483: \clearpage
1484: % figure 8
1485: \begin{figure}
1486: \includegraphics[angle=270,scale=0.45]{x6v0.ps}
1487: \caption{
1488: Demonstration of the errors in the flux calibration of an ESI spectrum of
1489: the star HZ44. The middle traces show the ESI orders after
1490: flux calibration using an ESI spectrum of star Feige~110.
1491: The lower smooth curves show the response function of these ESI orders.
1492: Here we use the usual flux calibration methods.
1493: The insert in the upper right is an enlargement of
1494: 4800 -- 5100~\AA\ that clearly shows that adjacent orders differ.
1495: \label{X6}  }
1496: \end{figure}
1497: 
1498: \clearpage
1499: % figure 9 
1500: \begin{figure}
1501: \epsscale{0.5}
1502: \plotone{x17v0.ps}
1503: \caption{
1504: Illustration of the steps taken to apply relative flux to HIRES spectra of
1505: \qfive\ using Kast spectra of the same QSO.
1506: Panel (a) shows a flux calibrated Kast spectrum.
1507: It has been shifted in wavelength to match the HIRES
1508: wavelengths.  Panel (b) shows the CCD counts recorded in the three
1509: HIRES orders that cover these wavelengths. This is a single HIRES
1510: integration, and the orders overlap in wavelength, although we do not
1511: show this here.  Panel (c) shows the extracted HIRES orders that have
1512: been ``flattened" by dividing by the flat field. This is the
1513: Flux-name.fits file that is the usual output from MAKEE.  Panel (d) is
1514: shows the spectra from panel (c) after smoothing by a Gaussian filter
1515: to match the spectral resolution of the Kast spectrum in panel (a).
1516: The HIRES spectrum has been re-binned onto the Kast pixels.  Panel (e)
1517: shows the ratio (d)/(a) that we call the conversion ratio.  It has
1518: values at the Kast pixels, and two values at the wavelengths that
1519: appear in two HIRES orders. The smooth curves are low order fits to
1520: the pixels that sample the conversion ratio.  Panel (f) is (c)/(e),
1521: the flux calibrated HIRES spectra. Notice that the jump in the HIRES
1522: flux at the order join near 4320~\AA\ in panels (b), (c) and (d) is
1523: detected by the conversion ratio in (e) and corrected in (f).  Panel
1524: (g) shows the sum of 8 HIRES integrations, each of which is corrected
1525: individually in the same manner. The order joins are not apparent.  We
1526: do not plot most pixels in the high resolution spectra, to reduce the
1527: file size.  \label{X17} }
1528: \end{figure}
1529: 
1530: \clearpage
1531: % figure 10
1532: \begin{figure}
1533: \includegraphics[angle=270,scale=0.45]{x11v0.ps}
1534: \caption{
1535: Shifts in the wavelength scale of a spectrum of \qfive\ from the
1536: Kast spectrograph measured relative to a HIRES spectrum of the same QSO.
1537: Each dot shows the shift measured by cross-correlating a region of spectrum
1538: that contains an absorption line. The bars show means of these dots,
1539: taken over the individual HIRES orders. 
1540: We obtain similar shifts when we cross-correlate over complete HIRES orders.
1541: The sampling pixel size is 107.1 \kms .
1542:  \label{X11}  }
1543: \end{figure}
1544: 
1545: \clearpage
1546: % figure 11
1547: \begin{figure}
1548: \includegraphics[angle=270,scale=0.45]{x21bv2.ps}
1549: \caption{
1550: Conversion ratio for the 8100 second HIRES integration of \qfive\ taken April
1551: 4, 1999. The relative flux calibration uses a Kast spectrum from 2001.
1552: The mean level of the CR in each order has been normalized for the plot.
1553: The pixels sizes are from the Kast spectrum, and the curves show 4th order
1554: Chebyshev polynomial fits to each order.
1555:  \label{X21b}  }
1556: \end{figure}
1557: 
1558: \clearpage
1559: % figure 12 
1560: \begin{figure}
1561: \includegraphics[angle=270,scale=0.45]{x21fv2.ps}
1562: \caption{
1563: As Fig. \ref{X21b}, but for a 7200 second HIRES integration taken 11 months 
1564: later on March 14, 2000. 
1565:  \label{X21f}  }
1566: \end{figure}
1567: 
1568: \clearpage
1569: % figure 13
1570: \begin{figure}
1571: \includegraphics[angle=270,scale=0.7]{3Dcrv2.ps}
1572: \caption{
1573: The conversion ratio for a HIRES integration of \qfive\
1574: fitted with a 2-dimensional Chebyshev polynomial. Each small plus sign shows 
1575: the CR value in a pixel of the reference spectrum from ESI.
1576: The CR values are shown elevated above a plane that approximates
1577: the HIRES CCD.
1578: The axis ``CCD pixel position" is the pixel along the
1579: direction of a HIRES order, with wavelength increasing to higher
1580: numbers.  The axis ``Echelle Order" is encoded such that 113 - the
1581: number given is the HIRES order. The orders are shown parallel to each
1582: other and with equal spacing.  The vertical hight of a plus sign shows the
1583: CR in that ESI pixel, and the other two coordinates show the location
1584: of the HIRES pixel with a similar wavelength.  The S/N in the ESI
1585: spectrum increases with wavelength, to the left.  The CR have been
1586: normalized to have a mean CR $=1 $ in the middle 20\% of each HIRES
1587: order.  Prior to this, the CR varied systematically by approximately a
1588: factor of two.  The thick curves show the Chebyshev polynomial along
1589: each order. These polynomials are constrained to 4th order in both the
1590: CCD pixel and echelle order directions.  \label{twodfit} }
1591: \end{figure}
1592: 
1593: 
1594: \clearpage
1595: % figure 14
1596: \begin{figure}
1597: \epsscale{0.8}
1598: \plotone{x25v3.ps}
1599: \caption{
1600: Spectra of star Feige 34 with relative flux calibration.
1601: The lower two spectra are from STIS (heavy line) and Kast (thin line),
1602: both from Fig. \ref{X23}.
1603: The upper two spectra, displaced vertically by the same amount for clarity, 
1604: are the same Kast reference
1605: spectrum and five and a half orders of a HIRES spectrum 
1606: (faint trace with many pixels, darker in even numbered orders).
1607: \label{f344thord} }
1608: \end{figure}
1609: 
1610: \clearpage
1611: % figure 15
1612: % formarly refered to "H-comp"
1613: \begin{figure}
1614: \epsscale{0.7}
1615: \plotone{x15v3.ps}
1616: \caption{
1617: Ratios of the flux in different summations of the 8 HIRES integrations of
1618: \qfive\ that we have calibrated using different spectra.
1619: HK99, HK01 and HKSUM were all calibrated with Kast spectra, while HESI
1620: and HH are HIRES spectra calibrated using ESI spectra and a HIRES
1621: spectrum of a flux standard.  Each of the top 4 panels shows the ratio
1622: of two HIRES spectra, each one of which looks similar to that shown in
1623: the bottom panel.  The vertical bands show the wavelengths where the
1624: orders overlap.  We do not plot most pixels, to reduce the file size.
1625: If we had plotted all pixels, the noise near the few strongest absorption
1626: lines would be much more conspicuous, and in each 10~\AA\ interval
1627: we would see 1 -- 20 fluctuations of 1 -- 2\%.
1628: We also do not plot pixels that have negative flux, because of the 
1629: random noise in the sky subtraction.  
1630: \label{X15} }
1631: \end{figure}
1632: 
1633: 
1634: %%%% END of Main TEXT FIGURES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1635: 
1636: %%% APPENDIX FIGURES START %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1637: 
1638: %% Appendix A :Standard Star
1639: \clearpage
1640: % figure 16
1641: \begin{figure}
1642: \includegraphics[angle=270,scale=0.45]{x4v0.ps}
1643: \caption{
1644: Flux calibrated spectra of the star G191-B2B.
1645: The continuous, wobbly line is a STIS spectrum from \citet{bohlin00}.
1646: The dotted line and points are from Oke (1990).
1647:  \label{X4}  }
1648: \end{figure}
1649: 
1650: \clearpage
1651: % figure 17
1652: \begin{figure}
1653: \includegraphics[angle=270,scale=0.45]{x5v0.ps}
1654: \caption{
1655: Spectra of the flux standard star Feige 110.
1656: The lowest trace shows the signal recorded in one ESI order.
1657: The dotted line shows the flux reported by Oke (1990)
1658: and the points show the flux values that he recommended to minimize
1659: sensitivity to spectral resolution. The STIS spectrum from
1660: \citep*{bohlin01} is shown by the continuous
1661: trace comprising pixels that are easy to see on the plot. 
1662:  \label{X5}         }
1663: \end{figure}
1664: 
1665: % following not made - feb 6th, low priority
1666: %\clearpage
1667: % figure = k01abk99
1668: %\begin{figure}
1669: %\includegraphics[angle=270,scale=0.45]{k01abk99.ps}
1670: %\caption{
1671: %\NS{discuss how to make this with DT and DK}
1672: %A comparison of Kast spectra that have relative flux calibration.
1673: %The top panel shows the ratio of two integration from 2001, while the
1674: %bottom panel shows one integration from 1999 divided by one from 2001.
1675: % (label=k01abk99) \label{k01abk99}  }
1676: %\end{figure}
1677: 
1678: 
1679: 
1680: \end{document}
1681: