0805.1426/ms.tex
1: %\documentclass[12pt,preprint]{aastex} 
2: 
3: \documentclass[onecolumn]{emulateapj}
4: 
5: \begin{document}
6: 
7:  
8: \title{Optimal Coaddition of Imaging Data for Rapidly Fading Gamma-Ray
9:   Burst Afterglows}
10: \author{
11: A.\ N.\ Morgan\altaffilmark{1,2},
12: D.\ E.\ Vanden~Berk\altaffilmark{1},
13: P.\ W.\ A.\ Roming\altaffilmark{1},
14: J.\ A.\ Nousek\altaffilmark{1},
15: T.\ S.\ Koch\altaffilmark{1},
16: A.\ A.\ Breeveld\altaffilmark{3},
17: M.\ de Pasquale\altaffilmark{3},
18: S.\ T.\ Holland\altaffilmark{4,5},
19: N.\ P.\ M.\ Kuin\altaffilmark{3},
20: M.\ J.\ Page\altaffilmark{3},
21: M.\ Still\altaffilmark{3}
22: }
23: 
24: %\date{\today} 
25: 
26: \altaffiltext{1}{Department of Astronomy and Astrophysics,
27:   Pennsylvania State University, University Park, PA, USA.}
28: \altaffiltext{2}{Institute of Astronomy, University of Cambridge, Cambridge,
29:   UK.}
30: \altaffiltext{3}{Mullard Space Science Laboratory, Dorking, Surrey, UK.}
31: \altaffiltext{4}{NASA Goddard Space Flight Center, Greenbelt, MD, USA.}
32: \altaffiltext{5}{Universities Space Research Association.}
33: 
34: \begin{abstract}
35: We present a technique for optimal coaddition of image data for rapidly
36: varying sources, with specific application to gamma-ray burst (GRB)
37: afterglows.  Unweighted coaddition of rapidly fading afterglow lightcurve
38: data becomes counterproductive relatively quickly.  It is
39: better to stop coaddition of the data once noise dominates late exposures.
40: A better alternative is to optimally weight each exposure to maximize the
41: signal-to-noise ratio ($S/N$) of the final coadded image data.  By using
42: information about GRB lightcurves and image noise characteristics,
43: optimal image coaddition increases the probability of afterglow
44: detection and places the most stringent upper limits on non-detections.
45: For a temporal power law flux decay typical of GRB afterglows, optimal
46: coaddition has the greatest potential to improve the $S/N$ of afterglow
47: imaging data (relative to unweighted coaddition), when the decay rate
48: is high, the source count rate is low, and the background rate is high.
49: The optimal coaddition technique is demonstrated with applications to
50: {\em Swift} Ultraviolet/Optical Telescope (UVOT) data of several GRBs,
51: with and without detected afterglows.  \end{abstract}
52: 
53: \keywords{methods: data analysis; gamma-rays: bursts}
54: 
55: 
56: %%%%%%%%%%%%%%%%%%
57: %% Introduction %%
58: %%%%%%%%%%%%%%%%%%
59: \section{Introduction}
60: 
61: 
62: The early detection of gamma-ray burst (GRB) optical afterglows
63: is crucial to fulfill several key science goals set forth by the
64: {\em Swift} Gamma-ray Burst Explorer mission \citep{gehrels04}.
65: The Ultraviolet/Optical telescope \citep[UVOT;][]{roming05a} onboard
66: \emph{Swift} was designed to capture these early ($\sim 1$ minute after
67: burst trigger) afterglows in order to both study the behavior of the
68: early optical afterglow and to provide accurate sub-arcsecond positions
69: for ground-based follow-up observations.  However, approximately $60\%$
70: of the GRBs detected by {\em Swift} lack an optical counterpart in rapidly
71: available UVOT data \citep{marshall07, romingmason06, mason05}, and more
72: than $40\%$ lack an optical or IR counterpart in data from any telescope.
73: This unexpectedly high fraction of optical non-detections highlights the
74: importance of ensuring that the available data are being used to their
75: full potential.
76: 
77: In particular, it is imperative that data are coadded in such a way
78: that the chance of revealing a faint detection is maximized or the most
79: stringent upper-limits are obtained.  The rapidly fading behavior of
80: GRBs ensures that coadding more data will eventually become detrimental
81: as the burst signal fades below the background level.  Upper limits have
82: often been reported via the Gamma-ray bursts Coordinates Network (GCN)
83: Circulars \citep{barthelmy95, barthelmy98} which, in our experience,
84: are often calculated using the coaddition of an arbitrary number of
85: unweighted images \citep[e.g.,][]{morgan05, roming05b}.  By continuing
86: to coadd capriciously, we run the risk of not reporting the most useful
87: information to the rest of the GRB community and may even overlook a faint
88: afterglow.  In order to best use the imaging data from \textit{Swift}, a
89: method for determining when to stop coadding burst data, or for optimally
90: coadding the data, must be implemented.
91: 
92: This paper describes the necessary criteria and the technique for
93: optimally coadding faint GRB afterglow imaging data, and for improving
94: detection limits when no afterglow has been detected in the individual
95: images.  Equations are derived that describe the signal-to-noise ratio
96: ($S/N$) of a number of summed exposures for an object whose flux density
97: fades according to a simple power law decay
98: %
99: \begin{equation}
100: F_{\nu} \propto t^{\alpha},
101: \label{eq:powerlaw}
102: \end{equation}
103: %
104: where $\alpha < 0$ is the temporal decay index.  The $S/N$ of an optimally
105: coadded imaging data set depends on the decay index, the start and stop
106: times of each exposure, the measured counts in each exposure, and the
107: noise levels of each exposure.  For bursts which lack an optical afterglow
108: detection, however, the value of the crucial decay index parameter is
109: unknown, making it necessary to adopt assumptions in this case.
110: 
111: Observations with {\em Swift}'s X-ray Telescope \citep[XRT;][]{burrows05}
112: suggest a canonical GRB X-ray afterglow lightcurve, consisting of three
113: distinct power law segments with decay indices ranging from very steep
114: decay at early times ($-5 \lesssim \alpha \lesssim -3; t \lesssim 300$
115: s), followed by a shallow decay ($-0.8 \lesssim \alpha \lesssim -0.2$)
116: until $t \sim 10^4 - 10^5$\,s, and finally a decay of medium ($-1.5
117: \lesssim \alpha \lesssim -1$) steepness \citep{nousek06, zhang06}.
118: Optical and UV afterglows typically display an initial phase lasting
119: up to about 500\,s during which the lightcurve is slowly decaying
120: or even rising, and a longer steeper power law decay phase with a
121: temporal slope of about $\alpha = -0.9 \pm 0.4$ \citep{oates08}.
122: Flaring at early times, as is often seen in X-ray lightcurves
123: \citep[e.g.][]{nousek06}, is occasionally manifested in optical
124: lightcurves \citep[e.g.][]{holland02,jakobsson04,blustin06a,wei06,dai07}.
125: Optical and X-ray lightcurves may, but typically do not, track each other
126: closely.  We assume the simplest temporal decay model given by equation
127: (\ref{eq:powerlaw}) in our modeling of $S/N$, but it is straightforward
128: to generalize the technique to arbitrary lightcurves.
129: 
130: In \S\,\ref{sec:uvotData}, observations of GRB afterglows using the {\em
131: Swift} UVOT are described.  The optimal image data coaddition technique
132: is developed in \S\,\ref{sec:technique}.  The technique is tested with
133: simulated data in \S\,\ref{sec:simulations}, and applied to examples of
134: real UVOT afterglow data in \S\,\ref{sec:realData}.  A discussion and
135: summary are given in \S\,\ref{sec:summary}.
136: 
137: 
138: %%%%%%%%%%%%%%%%%%%%
139: %% Swift GRB Data %%
140: %%%%%%%%%%%%%%%%%%%%
141: \section{{\em Swift} UVOT Observations of GRB Afterglows \label{sec:uvotData}}
142: 
143: The techniques described here apply generically to observations made by a
144: wide variety of telescopes and detectors, however, the UVOT telescope on
145: board the {\em Swift} satellite makes rapid and long-term observations
146: of almost all GRB fields identified by the {\em Swift} Burst Alert
147: Telescope \citep[BAT;][]{barthelmy05}.  For this reason the specific
148: examples used here will focus on data obtained with the UVOT.  In this
149: section we briefly describe the UVOT and the GRB afterglow data sets it
150: typically produces.
151: 
152: The {\em Swift} UVOT is a 30\,cm diameter telescope with a $17\times17$
153: arcminute field of view, with a detector sensitive to wavelengths
154: between approximately 1600 and 8000{\AA}, covered by seven photometric
155: filters labeled $uvw2, uvm2, uvm1, u, b, v$, and $white$ \citep{roming05a}.
156: The photometric calibration of the UVOT is described by \citet{poole08}.
157: 
158: The average time to the first UVOT observation of a GRB location after
159: the BAT trigger is 110s, barring constraints due to the positions of a
160: burst relative to the Sun, Earth, and Moon.  The automated GRB observing
161: sequence utilizes all seven filters, with the order and exposure times
162: determined with respect to the time of the burst.  The simulations
163: described in \S\,\ref{sec:simulations} are based on a typical set of
164: exposures in the UVOT $v$ band, up to about $10^{5}$\,s post-burst.
165: A normal set of $v$ band exposures would consist of a 400\,s ``finding
166: chart'' exposure shortly after slewing to the GRB position, a series of
167: short (10 to 20\,s) exposures, another finding chart exposure, another
168: series of short exposures, and finally a set of longer exposures (100
169: to 900\,s).  The sequence described here is typical for the majority of
170: {\em Swift} detected GRBs and is currently implemented for the detection
171: of new bursts.  Observations often continue to be made for several days
172: or weeks, depending on the flux of the afterglow seen by the XRT.  It is
173: very rare, however, for any significant flux to be detected at optical
174: or UV wavelengths at these late times; so late-time observations will
175: not be considered for the simulations in \S\,\ref{sec:simulations}.
176: 
177: GRB afterglows are detected in the first $white$ or $v$ observations
178: approximately $40\%$ of the time when those observations are made
179: less than 500\,s after the burst.  An analysis of the implications for the
180: nature of GRB afterglows based on the UVOT detection statistics is given
181: by \citet{roming06}.  Additional detections are sometimes made after the
182: coaddition of frames taken over a period of time.  In the next section,
183: we examine the effectiveness of standard unweighted frame coaddition
184: of GRB afterglow data, and describe a method for optimal coaddition of
185: imaging data of temporally varying sources.
186: 
187: 
188: 
189: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
190: %% Optimal Coaddition of GRB Image Data %%
191: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
192: \section{Optimal Coaddition of GRB Image Data \label{sec:technique}}
193: 
194: %%
195: %% Unweighted Coaddition
196: %%
197: \subsection{Unweighted Coaddition}
198: 
199: Assuming a source with a lightcurve that follows a power law decay,
200: we derive an equation that gives an estimate of the $S/N$ in an
201: aperture surrounding the source for an unweighted sum of $n$ exposures.
202: The equation for the final $S/N$ depends on the initial source count
203: rate of the afterglow, the background count rate for each exposure, the
204: start and stop times of each exposure, and the temporal decay index of
205: the burst.  With this equation, one can calculate the exposure at which
206: the maximum $S/N$ occurs for a given burst if unweighted coaddition is
207: adopted.  We implicitly assume that the measurements are made in the same
208: aperture surrounding the same known source location in each of the images.
209: Summing the images and then measuring counts in an aperture in the summed
210: image is equivalent to summing the measurements from apertures in the
211: individual images; here we proceed as if individual aperture measurements
212: are being summed.
213: 
214: There are several sources of noise for a given detector.  Among them
215: are noise due to the signal itself ($N_{src}$), noise due to the
216: sky background ($N_{sky}$), dark noise ($N_{dark}$), and read noise
217: ($N_{read}$).  Assuming all sources of noise are known to perfect accuracy
218: and are uncorrelated, the total noise is the sum in quadrature of these
219: four quantities:
220: %
221: \begin{equation}
222: N^2 = N^2_{src} + N^2_{sky} + N^2_{dark} + N^2_{read}.
223: \end{equation}
224: %
225: For the UVOT, the read noise is zero since it is a photon counting
226: device, and the dark noise is insignificant \citep{mason04}, and thus the
227: dominant contributors to the noise are the source and the sky background.
228: We assume that the source and sky counts are Poisson distributed, but
229: that the summed image counts are large enough that Gaussian statistics
230: apply, so that the total noise is simply the square root of the number
231: of counts:
232: %
233: \begin{equation}
234:   N^2 = \sum_i \left(C_{src,i} + C_{sky,i}\right),
235:   \label{eq:N2}
236: \end{equation}
237: %
238: where $C_{src,i}$ and $C_{sky,i}$ are the measured number of source and
239: sky background counts in the $i^{\rm th}$ exposure, respectively.
240: The signal-to-noise ratio of the summed image is thus given by
241: %
242: \begin{equation}
243:     S/N_{sum} = \frac{\sum_{i} C_{src,i}}
244:       {\sqrt{\sum_{i} \left(C_{src,i}+C_{sky,i}\right)}}.
245:       \label{eq:sn}
246: \end{equation}
247: 
248: The estimated total number of counts in an exposure from a given source
249: is the integral of the count rate $R(t)$ from the start to stop times of an
250: exposure.  If we approximate the sky background count rate ($R_{sky,i}$) as
251: constant during the $i^{th}$ exposure, the estimated sky counts in that
252: exposure are
253: %
254: \begin{eqnarray}
255: C_{sky,i} =  R_{sky,i} \left(t_{stop,i}-t_{start,i}\right),
256: \label{eq:bcsky}
257: \end{eqnarray}
258: %
259: where $t_{start,i}$ and $t_{stop,i}$ are the start and stop times of
260: the $i^{th}$ exposure after the initial burst trigger.
261: 
262: Using the assumption of a simple temporal power law decay for gamma-ray burst
263: afterglows, the model source count rate $R_{model}$ can be parameterized as
264: %
265: \begin{equation}
266: R_{model}(t) = R_{1} \left(\frac{t}{t_1}\right)^\alpha ,
267: \label{eq:rsrcfirst}
268: \end{equation}
269: %
270: where $\alpha$ is the temporal decay index and $R_{1}$ is the initial
271: source count rate, defined to be the average count rate of the $1^{st}$
272: exposure given by
273: %
274: \begin{equation}
275: R_{1} = \frac{C_{src,1}}{\left(t_{stop,1}-t_{start,1}\right)}\,.
276: \label{eq:r0}
277: \end{equation}
278: %
279: The parameter $t_1$ is thus the weighted midpoint of the exposure at
280: which time the count rate is $R_{1}$.  Integrating (\ref{eq:rsrcfirst}),
281: the model number of source counts in the $i^{th}$ exposure is given by
282: %
283: \begin{eqnarray}
284: C_{model,i}  = 
285: 	\left[
286: 	\begin{array}{ll}
287: 	  \frac{R_1}{t_1^\alpha \left(\alpha+1 \right)}
288:             \left(t_{stop,i}^{\alpha+1} - t_{start,i}^{\alpha+1} \right)
289:             & \quad \alpha \neq -1 \\
290: 	  \frac{R_1}{t_1^\alpha} \ln 
291:             \left(\frac{t_{stop,i}}{t_{start,i}}\right)
292:             & \quad \alpha = -1 \\
293:          \end{array} \right]
294: %
295: \label{eq:bcsrc}
296: \end{eqnarray}
297: %
298: For the remainder of the derivation, we shall assume for simplicity that
299: $\alpha$ is never exactly -1.  Inserting (\ref{eq:r0}) into (\ref{eq:bcsrc})
300: for $i=1$ and solving for $t_1$ gives
301: %
302: \begin{equation}
303: t_1 = \left[\frac{ \left(t_{stop,1}^{\alpha+1} - t_{start,1}^{\alpha+1} \right)}{\left(\alpha+1 \right) \left(t_{stop,1}-t_{start,1}\right)} \right]^\frac{1}{\alpha}\,.
304: \label{eq:t0}
305: \end{equation}
306: %
307: Inserting (\ref{eq:t0}) into (\ref{eq:bcsrc}) gives
308: %
309: \begin{equation}
310:   C_{model,i} = R_1  \left(t_{stop,1}-t_{start,1}\right) 
311:     \frac{\left(t_{stop,i}^{\alpha+1} - t_{start,i}^{\alpha+1} \right)}
312:     {\left(t_{stop,1}^{\alpha+1} - t_{start,1}^{\alpha+1} \right)}\,.
313:   \label{eq:csrc}
314: \end{equation}
315: 
316: 
317: The time since the burst associated with the coadded data is not well
318: defined, since it involves many different time intervals, each sampling a
319: different portion of a light curve.  However, a reasonable definition for
320: a characteristic post burst time, $\bar{t}$, is the count weighted average 
321: time of the observations. In other words, $\bar{t}$ is the average arrival
322: time of the counts.  Because the count rate is expected to change across
323: an exposure, the observing times are weighted by the integrated model
324: count rate across each exposure window, rather than weighting them with
325: the measured counts.  Thus we arrive at the characteristic time
326: %
327: \begin{eqnarray}
328:   \bar{t} & = & \frac{\sum_{i}^{n}\int_{t_{start,i}}^{t_{stop,i}}tR_{model}dt}
329:       {\sum_{i}^{n}\int_{t_{start,i}}^{t_{stop,i}}R_{model}dt}
330:       \label{eq:t_barA}\\
331: %
332: \bigskip
333: %
334:   & = & \left(\frac{\alpha + 1}{\alpha + 2}\right)
335:       \frac{\sum_{i}^{n}\left(t_{stop,i}^{\alpha + 2}
336:           - t_{start,i}^{\alpha + 2}\right)}
337:       {\sum_{i}^{n}\,\left(t_{stop,i}^{\alpha + 1}
338:           - t_{start,i}^{\alpha + 1}\right)} \,,
339:       \label{eq:t_barB}
340: \end{eqnarray}
341: %
342: which is independent of the initial count rate.
343: 
344: 
345: 
346: If the temporal decay model is a good approximation to the real lightcurve,
347: the $S/N$ for a summed set of exposures can be predicted as
348: %
349: \begin{eqnarray}
350: S/N_{pred} = \frac{R_1  \left(t_{stop,1}-t_{start,1}\right)
351:    \displaystyle\sum_{i=1}^n
352:    \frac{\left(t_{stop,i}^{\alpha+1} - t_{start,i}^{\alpha+1} \right)}
353:    {\left(t_{stop,1}^{\alpha+1} - t_{start,1}^{\alpha+1} \right)} }
354:    {\sqrt{R_1  \left(t_{stop,1}-t_{start,1}\right) 
355:    \displaystyle\sum_{i=1}^n
356:    \frac{\left(t_{stop,i}^{\alpha+1} - t_{start,i}^{\alpha+1} \right)}
357:    {\left(t_{stop,1}^{\alpha+1} - t_{start,1}^{\alpha+1} \right)}
358:    + \displaystyle\sum_{i=1}^n R_{sky,i}
359:    \left(t_{stop,i}-t_{start,i}\right)}}\,.
360: \label{eq:snfinal}
361: \end{eqnarray}
362: %
363: With this equation, one can predict the signal-to-noise for a summed
364: image of $n$ exposures by simply knowing the start and stop times of each
365: exposure (relative to the time of burst) and measuring both the initial
366: source count rate and the background count rates for each exposure.
367: In typical sets of observations, the $S/N$ will initially increase with
368: the coaddition of more frames, but as the count rate drops the noise
369: will increase faster than the signal, until eventually the $S/N$ will
370: reach a peak value, then begin to fall.  By modeling the S/N, one can
371: determine the amount of data to coadd to achieve the most significant
372: detection for unweighted data.
373: 
374: 
375: %%
376: %% Optimal Weighting 
377: %%
378: \subsection{Weighted Exposures}
379: 
380: While equation (\ref{eq:snfinal}) can be used to predict a peak $S/N$ in
381: unweighted coadded data, the significance of a source detection in
382: a series of images can be raised by optimally weighting the data in
383: each exposure.  Additionally, with optimal weighting, the $S/N$ will not
384: drop as the source counts become less significant.  The derivation
385: of the optimal weighting scheme parallels in part the arguments given by
386: \citet{horne86} for the optimal extraction of spectroscopic data.
387: In that case, the spatial profile of a spectrum at a given wavelength
388: was used to provide independent estimates, at each pixel, of the total
389: source counts in the spectrum.  Each estimate was weighted in such
390: a way that the average value gives the minimum variance in the
391: the total source counts.  In the case of GRBs, the temporal lightcurve
392: takes the place of the spatial spectrum profile, and each
393: observation is the synonym of a pixel in the spectrum profile.
394: 
395: Let $P_{i}$ be the probability that a detected photon from a GRB
396: afterglow is recorded in frame $i$.  The sum of the probabilities
397: over all the $n$ frames is normalized to unity
398: %
399: \begin{eqnarray}
400:   \displaystyle\sum_{i=1}^n P_{i} = 1\,.
401:   \label{eq:probSum}
402: \end{eqnarray}
403: %
404: The probability for frame $i$ is given by the expected GRB afterglow
405: counts in that frame, $C_{model,i}$ (given, for example by equation
406: (\ref{eq:csrc})), divided by the total number of expected counts, which
407: is the sum over the expected counts in all of the frames
408: %
409: \begin{eqnarray}
410:   P_{i} = \frac{C_{model,i}}{\sum_{i}^n C_{model,i}}\,.
411:   \label{eq:P_i}
412: \end{eqnarray}
413: %
414: The probability function is the normalized model GRB afterglow lightcurve.
415: We assume here that the lightcurve is known, but we will discuss
416: the case in which the lightcurve is uncertain in \S\,\ref{sec:realData}.
417: 
418: Given the normalized lightcurve, an estimate of the total number of
419: source counts can be made for each frame, by dividing the source
420: counts by the probability function for that frame
421: %
422: \begin{eqnarray}
423:   C_{tot,i} \approx C_{src,i}/P_{i}\,.
424:   \label{eq:C_toti}
425: \end{eqnarray}
426: %
427: The average value of all of the estimates is then a linear and unbiased
428: estimator of the total number of source counts \citep{horne86}.
429: Including a weighting factor $w_{i}$, for each frame, the estimator of
430: the total source counts $C_{tot}$ is
431: %
432: \begin{eqnarray}
433:   C_{tot} = \frac{\sum_{i}^{n} w_{i}C_{src,i}/P_{i}}
434:             {\sum_{i}^n w_{i}}\,.
435:   \label{eq:C_totSum1}
436: \end{eqnarray}
437: %
438: The total count estimate is optimal when the variance on the estimator
439: is minimized.  The variance of equation (\ref{eq:C_totSum1}), assuming
440: equation (\ref{eq:N2}),  is
441: %
442: \begin{eqnarray}
443:   V(C_{tot}) = \frac{1}{\left(\sum_{i}^n w_{i}\right)^2}
444:       \displaystyle\sum_{i}^{n} w_{i}^2
445:       \left(C_{src,i} + C_{sky,i}\right)/P_{i}^2\,,
446:   \label{eq:var_C_tot}
447: \end{eqnarray}
448: %
449: which is minimized when
450: %
451: \begin{eqnarray}
452:   w_{i} = \frac{P_{i}^{2}}{C_{src,i} + C_{sky,i}}\,,
453:   \label{eq:weight}
454: \end{eqnarray}
455: %
456: modulo a multiplicative constant, so that equation (\ref{eq:C_totSum1})
457: becomes
458: %
459: \begin{eqnarray}
460:   C_{tot} = \frac{\sum_{i}^{n} P_{i} C_{src,i}
461:       / \left(C_{src,i} + C_{sky,i}\right)}
462:       {\sum_{i}^{n} P_{i}^{2}
463:       / \left(C_{src,i} + C_{sky,i}\right) }\,.
464:   \label{eq:C_totSum2}
465: \end{eqnarray}
466: %
467: For a constant source, equation (\ref{eq:C_totSum2}) reduces to the
468: familiar inverse variance weighting.  The optimal weighting factor
469: (\ref{eq:weight}) not only accounts for differences in the variances of
470: each frame, but weights each frame differently depending on the number of
471: source counts expected in the frames.  The $S/N$ of the coadded weighted
472: image data is
473: %
474: \begin{eqnarray}
475:   S/N_{sum,weight} = \frac{\sum_{i}^{n} P_{i} C_{src,i}
476:       / \left(C_{src,i} + C_{sky,i}\right)}
477:       {\left[\sum_{i}^{n} P_{i}^{2}
478:       / \left(C_{src,i} + C_{sky,i}\right)\right]^{1/2}}\,.
479:   \label{eq:sn_wt1}
480: \end{eqnarray}
481: %
482: In contrast to the unweighted $S/N$ given in equation (\ref{eq:sn}),
483: the weighted sum $S/N$ runs little risk of decreasing as the count rate
484: drops, if the lightcurve model is sufficiently accurate.  Frames with few
485: expected counts contribute little to either the final signal or noise.
486: The coaddition process does not need to stop at a particular frame to
487: achieve a maximum $S/N$ -- statistically, the maximum $S/N$ will always
488: be reached with the coaddition of all of the frames.
489: 
490: The expected number of counts in each frame is found from the lightcurve
491: model.  Assuming again that GRB afterglow lightcurves
492: can be described by a single power law, as in equation (\ref{eq:csrc}),
493: and using equation (\ref{eq:P_i}) for the probabilities $P_{i}$, the
494: optimally weighted total number of afterglow counts in a set of exposures is
495: %
496: \begin{eqnarray}
497:   C_{tot} = \left[
498:       \sum_{i}^n\left(t_{stop,i}^{\alpha+1}-t_{start,i}^{\alpha+1}\right)
499:       \right]
500:       \frac{\sum_{i}^{n}
501:       \left(t_{stop,i}^{\alpha+1}-t_{start,i}^{\alpha+1}\right) C_{src,i}
502:       / \left(C_{src,i} + C_{sky,i}\right)}
503:       {\sum_{i}^{n}
504:       \left(t_{stop,i}^{\alpha+1}-t_{start,i}^{\alpha+1}\right)^{2}
505:       / \left(C_{src,i} + C_{sky,i}\right) }\,,
506:   \label{eq:C_totSum4}
507: \end{eqnarray}
508: %
509: and the $S/N$ is
510: %
511: \begin{eqnarray}
512:   S/N_{sum,weight} = \frac{\sum_{i}^{n}
513:       \left(t_{stop,i}^{\alpha+1}-t_{start,i}^{\alpha+1}\right) C_{src,i}
514:       / \left(C_{src,i} + C_{sky,i}\right)}
515:       {\left[\sum_{i}^{n}
516:       \left(t_{stop,i}^{\alpha+1}-t_{start,i}^{\alpha+1}\right)^{2}
517:       / \left(C_{src,i} + C_{sky,i}\right) \right]^{1/2}}\,,
518:   \label{eq:sn_wt}
519: \end{eqnarray}
520: %
521: This shows that $C_{tot}$ can be determined independently
522: of the initial model count rate $R_{1}$, since the equation instead
523: contains the decay slope and observing times.  The total count estimate
524: does not correspond to a particular count rate, because the count rate
525: changes over time.  However, the initial estimated count rate can be found by
526: setting the weighted total counts equal to the sum of the model counts
527: in equation (\ref{eq:csrc}), and solving for $R_{1}$.  Then the count
528: rate at any moment can be estimated from the lightcurve model in equation
529: (\ref{eq:rsrcfirst}).
530: 
531: The characteristic time since the burst of the observations can be defined
532: in a manner similar to equation (\ref{eq:t_barA}), except that in this case each
533: exposure is further weighted by its optimal weight, $w_i$,
534: %
535: \begin{eqnarray}
536:   \bar{t} = \frac{\sum_{i}^{n}w_{i}\int_{t_{start,i}}^{t_{stop,i}}tR_{model}dt}
537:       {\sum_{i}^{n}w_{i}\int_{t_{start,i}}^{t_{stop,i}}R_{model}dt}\,.
538:   \label{eq:t_barWtA}
539: \end{eqnarray}
540: %
541: For the optimal weights defined by equation (\ref{eq:weight}), the
542: characteristic time is
543: %
544: \begin{eqnarray}
545:   \bar{t} = \left(\frac{\alpha + 1}{\alpha + 2}\right)
546:       \frac{\sum_{i}^{n}\left(t_{stop,i}^{\alpha + 2} 
547:           - t_{start,i}^{\alpha + 2}\right)
548:           \left(t_{stop,i}^{\alpha + 1} - t_{start,i}^{\alpha + 1}\right)^{2}
549:           / \left(C_{src,i} + C_{sky,i}\right)}
550:       {\sum_{i}^{n}\,\left(t_{stop,i}^{\alpha + 1} 
551:           - t_{start,i}^{\alpha + 1}\right)^{3} 
552:           / \left(C_{src,i} + C_{sky,i}\right)}\,,
553:   \label{eq:t_barWtB}
554: \end{eqnarray}
555: %
556: which is independent of the initial count rate.
557: 
558: 
559: %%
560: %% Detection limits
561: %%
562: \subsection{Detection Limits \label{sec:detection}}
563: 
564: When an afterglow is not detected in any single image, coaddition of the
565: image data may improve the final $S/N$ enough to provide a detection.
566: Even when the final coadded image does not yield a detection, optimal
567: coaddition can be used to place stronger detection limits on the dataset,
568: than would result from unweighted coaddition.  If the lightcurve
569: shape can be assumed, the source counts $C_{src,i}$, can be replaced
570: by the lightcurve model $C_{model,i}$ in equations (\ref{eq:sn}) and
571: (\ref{eq:sn_wt1}), and the equations set to a minimum $S/N$ (e.g. 3)
572: required for a detection, then solved for the parameters of the lightcurve
573: model.  For the case of a power law decay with a given index
574: (equation (\ref{eq:csrc})), this will yield the maximum initial average
575: count rate, $R_{1,max}$ that could have occurred without producing a
576: detection in the coadded data.  In other words, given a non-detection in
577: the coadded data, $R_{1,max}$ is the limiting measured count rate of the
578: source during the time of the first exposure.
579: 
580: For unweighted data, the expression for $R_{1,max}$ can be derived by
581: solving equation (\ref{eq:snfinal}) for $R_{1,max}$.  The solution
582: is quite simple in that case, since the equation is a quadratic.
583: The unweighted maximum initial count rate may be either lower or higher
584: (better or worse respectively) than the detection limit of the first image
585: by itself, depending on how many unweighted noise-dominated exposures
586: are coadded.
587: 
588: When the data are optimally coadded, equation (\ref{eq:sn_wt1}) applies,
589: with $C_{src,i}$ replaced with $C_{model,i}$.  Assuming a power law
590: decay model for the lightcurve, the $S/N$ is described by equation
591: (\ref{eq:sn_wt}); using $C_{model,i}$ in place of $C_{src,i}$, that
592: equation cannot be solved analytically for $R_{1,max}$, but it is not
593: difficult to solve numerically.  Initial (but slightly over-estimated)
594: guesses for $R_{1,max}$ can be made by assuming that the source counts
595: in the denominator of equation (\ref{eq:sn_wt}) are negligible compared
596: to the background counts, which yields an equation that can be solved
597: analytically for $R_{1,max}$,
598: %
599: \begin{eqnarray}
600: R_{1,max} \approx \frac{S/N_{min}}{\left(t_{stop,1}-t_{start,1}\right)}
601:    \left[ \displaystyle\sum_{i=1}^n
602:    \frac{\left(t_{stop,i}^{\alpha+1} - t_{start,i}^{\alpha+1} \right)^{2}}
603:    {\left(t_{stop,1}^{\alpha+1} - t_{start,1}^{\alpha+1} \right)^{2}
604:    C_{sky,i}} \right]^{-1/2} \,,
605: \end{eqnarray}
606: %
607: where $S/N_{min}$ is the minimum $S/N$ required for the detection of
608: a source.  By utilizing the optimally coadded data, the initial average
609: count rate limit will always be more sensitive than the limit of the
610: first image by itself.  Statistically, the optimally weighted $R_{1,max}$
611: will be more sensitive than the value calculated from the unweighted data.
612: 
613: 
614: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
615: %% Tests with simulated data %%
616: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
617: \section{Tests With Simulated GRB Afterglow Data \label{sec:simulations}}
618: 
619: The final coadded $S/N$ of GRB afterglow data depends upon the observing
620: times, the initial afterglow count rate, the temporal decay slope,
621: the background count rate, and the count rates in each of the images.
622: To test how the quality of coadded data depends on these parameters, we
623: have constructed simulated GRB afterglow lightcurve data, and applied
624: both unweighted and optimally weighted coaddition.  While focusing on
625: typical UVOT parameters, the qualitative results of the simulations
626: apply generally to most GRB afterglow observations.
627: 
628: For each simulation, the decay slope $\alpha$, the initial afterglow count
629: rate $R_{1}$, and the background count rate $C_{sky}$ (assumed constant
630: for simplicity) were specified.  The observing times were kept the same
631: in each case, and are representative of a typical UVOT observing sequence
632: in the $v$ band (See \S\,\ref{sec:uvotData}).  In each observing time
633: interval, the lightcurve model was integrated over the exposure times
634: to find the expected number of counts, which was used as a Poisson mean.
635: The background count rate was also integrated over the exposure times
636: to find the Poisson mean background counts for each time interval.
637: The simulated detected counts from both the afterglow and background were
638: drawn from Poisson distributions, given their respective mean values.
639: The sum of the detected afterglow and background counts is the total
640: simulated observed counts.  The mean background counts (assumed to
641: be accurately measurable) were subtracted from the total counts to
642: give the simulated measured afterglow counts.  Using these values, the
643: coadded $S/N$ at each time interval was calculated according to equation
644: (\ref{eq:sn}) for the unweighted case, and equation (\ref{eq:sn_wt})
645: for the optimally weighted case.
646: 
647: Optical temporal decay slopes for GRB afterglows are usually observed to
648: be in the range $\alpha = -0.5$ to $-2.0$, with an average of about $-0.9$
649: \citep{oates08}.  To see how the effectiveness of optimal coaddition
650: is affected by different decay slopes, data were coadded for simulated
651: lightcurves with a range of decay slopes, while the other parameters
652: were held constant.  Figure\,\ref{fig:simDecaySlope} shows the cumulative
653: $S/N$ after coadding the data through each observing interval, using both
654: unweighted, and optimally weighted coaddition, for two different values
655: of the decay slope.  Error bars show the $68.3\%$ (nominal $1\sigma$)
656: confidence limits from the results of 1000 simulations.  In each case,
657: the unweighted $S/N$ reaches a peak value, then decreases as more data
658: are coadded.  This happens because the noise dominates the observations to
659: a greater extent with each successive observation.  In contrast, the $S/N$
660: of the optimally weighted data rises, then flattens to a nearly constant
661: value at long post-burst times.  The late-time data contributes very
662: little signal or noise, so the $S/N$ values remain almost unchanged.
663: The effect is the same, regardless of the value of the decay slope,
664: but the relative difference between the final weighted and unweighted
665: $S/N$ is greatest for the data with the steepest decay slope.  When the
666: lightcurves are steep, the afterglow fades below the noise level more
667: quickly, so the unweighted $S/N$ drops more rapidly, while the optimally
668: weighted $S/N$ flattens out sooner.
669: 
670: Figure\,\ref{fig:simSourceRate} shows how the coadded $S/N$ is affected
671: by differences in the initial count rate; the decay slope and background
672: count rates were fixed at typical values.  The results show that the
673: final weighted $S/N$ is significantly better than the unweighted $S/N$
674: in all cases, and that optimal coaddition has the greatest potential to
675: improve the final $S/N$ when the count rate is low.  These statements
676: are true in a statistical sense, but at low count rate, there is no
677: guarantee that the cumulative weighted $S/N$ at any observing time will
678: exceed the unweighted value, as the dispersion of the simulations shows.
679: Nonetheless, as shown by Fig.\,\ref{fig:simSourceRate}, in typical cases
680: optimal coaddition is more likely to result in a significant ($S/N > 3$)
681: detection, than when using unweighted coaddition.
682: 
683: The background count rate clearly affects the detectability of fading
684: afterglows.  The background in UVOT images (although low compared
685: to ground-based telescope images) can change greatly from filter to
686: filter, and even among images using the same filter, depending on the
687: directions of the Sun, Earth, and Moon.  Figure\,\ref{fig:simBkgRate}
688: shows that optimal coaddition improves the $S/N$ in the presence of
689: a wide range of background rates (with decay slope and initial count
690: rate fixed in the simulations), particularly when the background rate
691: is high.  When background count rates are very low, as is often the case
692: with X-ray telescopes, there is little benefit from optimal coaddition.
693: For most optical and infra-red detectors, the background is usually the
694: dominant noise factor, so optimal coaddition is worth the minimal
695: implementation effort.
696: 
697: Often the decay slope is unknown, or is not known with great accuracy,
698: so it is of interest to know how the final $S/N$ depends upon the decay
699: slope used in the optimal coaddition.  Simulations were made using typical
700: values of the true decay slope $\alpha = -1.2$, the initial afterglow
701: count rate $R_{1} = 3\,{\rm counts\, s^{-1}}$, and the background count
702: rate $C_{sky} = 2.5\,{\rm counts\,s^{-1}}$.  The model decay slope
703: $\alpha_{model}$ (not necessarily the same as the true slope), used for
704: the optimal coaddition was varied over a wide range of values.  The median
705: final $S/N$ in the coadded data simulations were calculated for each value
706: of $\alpha_{model}$.  The results are shown in Fig.\,\ref{fig:finalSN}.
707: As expected, the final $S/N$ is maximized when the model decay slope
708: closely matches the true slope.  Figure\,\ref{fig:finalSN} shows that,
709: at least for typical cases, there is some leeway in the value of the
710: model decay slope; differences of up to a few tenths in the slope change
711: the final $S/N$ only a small amount.  However, the model slope value
712: cannot be arbitrarily different from the true value, or the final $S/N$
713: can actually drop well below the maximum $S/N$ in the unweighted case
714: (shown by a dashed line in Fig.\,\ref{fig:finalSN}).
715: 
716: The results shown in Fig.\,\ref{fig:finalSN} suggest a way to estimate
717: the decay slope when it is not known.  Optimal data coaddition can be
718: repeated for a data set, for a range of values of the model decay slope.
719: The value that maximizes the final $S/N$ is most likely to come closest
720: to the true decay slope.  For the example given here, we calculated the
721: value of the decay slope that maximized the $S/N$ in the optimally coadded
722: data, for each simulated light curve.  The mean value of the decay slope
723: was $\alpha = -1.20$ with a standard deviation among the simulations
724: of $\sigma(\alpha)=0.19$.  The decay slope estimation technique works
725: well even in cases for which an afterglow is detected only after optimal
726: coaddition.  For example, in simulations where the afterglow decay slope
727: is $\alpha=-0.9$ (the average given by \citet{oates08}), the initial count
728: rate is $R_{1} = 0.9\,{\rm counts\, s^{-1}}$, and the background count
729: rate $C_{sky} = 5.0\,{\rm counts\,s^{-1}}$, the optimally coadded $S/N$
730: is just over 3, while the estimated value of the decay slope is $\alpha =
731: -0.89 \pm 0.44$.  Thus, this technique can be used to calculate reasonable
732: estimates of the decay slope, even in low $S/N$ circumstances.
733: 
734: As mentioned earlier, X-ray and optical lightcurves usually do not
735: track each other very well, particularly at early times.  There are
736: exceptions to this \citep[e.g.][]{blustin06a,grupe07}, but usually the
737: X-ray decay slope is steeper than the optical slope \citep{oates08},
738: so at best the X-ray slope can be used as a lower limit for the optical
739: slope estimate.  When the optical slope is unknown, the best approach
740: for optimal coaddition is probably to assume a range of reasonable decay
741: slopes, bracketed at the steep end by the X-ray slope, and to calculate
742: limiting magnitudes in each case.
743: 
744: 
745: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
746: %% Application to Swift GRB Image Data %%
747: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
748: \clearpage
749: \section{Application to Swift GRB Image Data \label{sec:realData}}
750: 
751: %%
752: %% Bright Optical GRB Afterglows
753: %%
754: \subsection{Optically Bright Bursts}
755: 
756: To demonstrate the effect of optimal coaddition on real data, imaging
757: data from the bright well-sampled optical afterglow of GRB\,050525A were
758: coadded using the weighted and unweighted methods.  The GRB was
759: discovered by the {\em Swift} BAT, and the spacecraft slewed to the
760: source immediately \citep{band05}.  The UVOT began observations
761: about 65s after the burst, and a bright afterglow was detected in images
762: taken with all seven UVOT filters \citep{holland05}.  UVOT imaging data
763: of the afterglow field were collected up to about $1.2\times10^{6}$s
764: after the burst; we have used data only up to a few $\times 10^{5}$s
765: after the burst, since the much later time data are entirely consistent with
766: no source flux and add nothing to this example.  Full analysis
767: of the {\em Swift} data was presented by \citet{blustin06a}.  Here
768: we show how the $S/N$ of UVOT data from a well-detected afterglow 
769: can depend strongly on how the data are coadded.
770: 
771: The UVOT $v$ band lightcurve of GRB\,050525A is shown in the top
772: panel of Fig.\,\ref{fig:050525a}, and was constructed as follows.
773: Source plus background counts in the individual $v$ band images were
774: measured using a 3 arcsecond radius aperture.  A large background annulus
775: region, centered on the afterglow position, and excluding small regions
776: around any detected stars near the annulus, was used to estimate the
777: background counts.  Source counts were measured by subtracting the
778: expected average background counts inside the source extraction region
779: from the total counts inside that region.  A power law model was fit to
780: the lightcurve by finding the parameters that minimized the $\chi^{2}$
781: value of the fit, using the linear count rate data and the associated
782: uncertainties.  The best fit power law has an index $\alpha=-1.03$,
783: and is shown in Fig.\,\ref{fig:050525a}.  The value for the power law
784: index is fairly close to that found by \citet{blustin06a}, who found
785: a value of $\alpha = -1.14$ when a simultaneous fit was made to data
786: in multiple bands.  However, \citet{blustin06a} found that a single
787: power law does not give a full statistical description of the
788: optical/UV lightcurve in any band.  For this example, we have ignored
789: the deviations from a single power law, since they would unnecessarily
790: complicate the analysis, and would provide very little improvement to
791: the optimal coaddition of the data.
792: 
793: The $v$ band data were coadded without weighting, and using optimal
794: weighting according to equation (\ref{eq:C_totSum4}).  The GRB afterglow
795: counts expected in each image were calculated according to equation
796: (\ref{eq:csrc}), using the best fit value of the decay index in
797: the $v$ band.  The cumulative $S/N$ at each exposure was calculated
798: from equation (\ref{eq:snfinal}) for the unweighted data, and from
799: equation (\ref{eq:sn_wt}) for the weighted data.  The bottom panel of
800: Fig.\,\ref{fig:050525a} shows the cumulative $S/N$ for both the weighted
801: and unweighted cases.  The $S/N$ values in both cases match each other very
802: closely through the first $\approx 1000$s after the burst.  Within that
803: time range, the afterglow was still quite bright, and the noise in
804: the images is dominated by the counts from the afterglow itself;
805: optimal coaddition holds little advantage in that case.  However, at
806: later times, when the afterglow count rate had dropped to relatively
807: low values, continued unweighted coaddition of the data becomes
808: detrimental.  When all of the data are coadded without weighting,
809: the final $S/N$ is well below that of the first image by itself.
810: When the data are optimally coadded, the $S/N$ at later times actually
811: increases slightly, and levels off at a maximum value.
812: 
813: While coaddition of data in the case of GRB\,050525A was not necessary
814: for a detection, this example illustrates the danger of coadding image
815: data without considering the rapidly decaying nature of afterglow
816: lightcurves.  At best, unweighted coaddition makes no improvements,
817: and at worst it can severely reduce the quality of coadded data.  
818: Optimal coaddition nearly guarantees that the highest $S/N$ will be
819: returned from coadded data, regardless of how many images are coadded.
820: In the next two sections, we illustrate the benefits of optimal
821: coaddition applied to data with low $S/N$ in individual images.
822: 
823: 
824: %%
825: %% New afterglow detections using optimal coaddition
826: %%
827: \subsection{Optical Detections from Optimally Coadded Data \label{sec:newDet}}
828: 
829: A considerable fraction of optical GRB afterglows are not significantly
830: detected (at $>3\sigma$) in individual UVOT images taken with a specific
831: filter, but may be significantly detected in the coadded data.  An example
832: in which the UVOT $v$ band data reveal no afterglow in individual
833: images, but optimal coaddition results in a detection is GRB\,060604.
834: This GRB was discovered by the {\em Swift} BAT, and the spacecraft slewed
835: to the source position about 100s after the detection \citep{page06}.
836: An afterglow candidate was found in the initial UVOT {\em white} filter
837: image, and later confirmed in unweighted coadded UVOT {\em b} and {\em
838: u} images \citep{blustin06b}, and by ground-based {\em R} band images
839: \citep{tanvir06}.  No significant afterglow was found in any of the
840: individual UVOT {\em v} band images; unweighted coaddition of over 1100s
841: of data yielded a possible source with a significance of 2.4\,$\sigma$
842: \citep{blustin06b}.  This case is a good test of the optimal coaddition
843: technique, since we know that there was an optical afterglow in several
844: bands, but that the source was only marginally detected in another band.
845: The optimal coaddition technique was applied to the {\em v} band data
846: to determine if the significance of the afterglow could be improved.
847: 
848: The {\em v} band data consist of 17 images, excluding the initial very
849: short settling image (taken while the spacecraft is still slewing),
850: starting about 220\,s after the burst, and ending about $10^{5}$\,s after
851: the burst.  The optimal weights used in equation (\ref{eq:C_totSum1})
852: were determined from measurements of the source counts and background
853: counts in each image, and the temporal decay slope.  Source plus
854: background counts in the {\em v} band images were measured inside an
855: aperture centered on the known GRB afterglow position, with an aperture of
856: radius 3\,arcseconds, which is about optimal for maximizing the $S/N$ of
857: faint sources in UVOT images \citep{poole08,li06a}.  A large background
858: extraction region was selected to be near the afterglow position,
859: but located so that it did not contain any obviously detected stars.
860: Source counts were determined by subtracting the expected average
861: background counts inside the source extraction region from the total
862: counts inside that region.  The {\em v} band count rates are shown as a
863: function of time since burst in the top panel of Fig.\,\ref{fig:060604.1}.
864: The best fitting power law was determined using the technique described
865: at the end of \S\,\ref{sec:simulations}.  The uncertainty on the power
866: law slope was estimated by calculating the rms of the best slope values
867: in 100 simulated data sets.  In each of the simulations the counts
868: in the source and background regions were randomly varied according
869: to a Poisson distribution, with means equal to the measured values.
870: The best power law slope and its uncertainty are $\alpha = -0.62 \pm
871: 0.19$; the best fitting power law is shown in Fig.\,\ref{fig:060604.1}.
872: The best slope value is consistent with the value found from the UVOT
873: $white$ band data of $\alpha = -0.62 \pm 0.32$ \citep{blustin06b},
874: and from the ground-based $R$ band data of $\alpha = -0.35 \pm 0.36$
875: \citep{tanvir06,garnavich06}.  It is clear that although none of the
876: individual measurements give a significant detection, the power law decay
877: function fit to all of the data is quite reasonable.  In this case, we
878: have used the fitted value of $\alpha$ because it is consistent with the
879: decay slopes in other bands for which there are afterglow detections,
880: and by design it will give the maximum weighted $S/N$.  In the absence
881: of a reliable fit in the $v$ band, it would have been appropriate to
882: adopt a value of $\alpha$ given by the results in the other bands.
883: 
884: The cumulative $S/N$ at each exposure was calculated from equation
885: (\ref{eq:sn}) for the unweighted data, and from equation (\ref{eq:sn_wt})
886: for the weighted data.  The bottom panel of Fig.\,\ref{fig:060604.1}
887: shows the cumulative $S/N$ for both the weighted and unweighted cases.
888: The $S/N$ rises with coaddition in both cases up to the first few images.
889: In the unweighted case the $S/N$ drops from a high of about 2.8 to about
890: 2.0 after coadding all of the data.  In the optimal weighting case, the
891: $S/N$ rises to about 3.0, and remains quite steady thereafter.  Both the
892: maximum unweighted $S/N$ and the final weighted $S/N$ are greater than the
893: value (2.4) reported by \citet{blustin06b}.  Using optimal coaddition,
894: the {\em v} band data by itself would have been sufficient to detect
895: the optical afterglow.  The individual images were coadded using no
896: weighting, and using the optimal weights calculated as described here.
897: Images centered on the afterglow position are shown for both cases in
898: Fig.\ref{fig:060604.2}.  The images have been scaled so that the field
899: stars appear to have the same brightnesses in both images; this allows a
900: direct comparison of the relative coadded brightness of the afterglow in
901: both images.  The effect of optimal coaddition is to increase the $S/N$
902: of the afterglow relative to unweighted coaddition.  The process also
903: {\em degrades} the $S/N$ of other objects in the image, since for them
904: the weights are not optimal.  The afterglow is difficult to see in the
905: unweighted coadded image, but easily seen in the weighted coadded image.
906: 
907: This case illustrates the potential of optimal coaddition to improve
908: the detection rates of GRB afterglows.  We plan to apply this method
909: to the entire UVOT GRB database \citep{roming08}, to determine if
910: new detections of other afterglows can be achieved.
911: 
912: 
913: %%
914: %% Optical Non-Detections
915: %%
916: \subsection{Improved Detection Limits for Optical Non-Detections
917:   \label{sec:dbursts}}
918: 
919: Optical afterglows have not been detected for many GRBs to date, including
920: GRBs discovered by {\em Swift} \citep{roming06}.  It is important for
921: detection limits to be as deep as possible in order to help understand
922: the ``dark burst'' phenomenon.  Also, when attempting to identify very high
923: redshift burst candidates, fainter detection limits in bluer bands place
924: tighter constraints on the range of possible redshifts.  Here we examine
925: the case of GRB~060923A, which is a potentially very high redshift
926: burst, with detections in the $K$ band, but no detections at optical
927: bands, including the UVOT $v$ band.
928: 
929: GRB~060923A was discovered by the {\em Swift} BAT, and the UVOT began
930: observations of the burst location about 85\,seconds after the trigger
931: \citep{stamatikos06}.  No afterglow was detected in any of the UVOT
932: images, either singly or coadded, and no afterglow was reported from
933: other observations in the $V$, $R$, $I$, and $J$ bands \citep{li06b,
934: melandri06, williams06, fox06a}.  An afterglow was found and confirmed
935: only in the $K$ band \citep{tanvir06, fox06a, fox06b}, suggesting
936: that GRB~060923A could be at a very high ($z>10$) redshift or heavily
937: reddened.  Subsequent very deep $R$ band observations revealed a possible
938: host galaxy with $R\sim25.5$ \citep{tanvir06}, which would favor the
939: reddening hypothesis.  Tighter constraints on the bluer band magnitudes
940: would provide correspondingly tighter constraints on either the redshift,
941: or extinction of the GRB.
942: 
943: As discussed in \S\,\ref{sec:detection}, optimal coaddition can be
944: used to find the maximum count rate (and therefore deepest magnitude)
945: that an afterglow could have had in the first image (where the count
946: rate would have presumably been the greatest) without being detected
947: at a given significance level.  The detection limit calculations
948: require the exposure start and stop times, an estimate of the afterglow
949: decay rate, and a measurement of the background counts at the GRB
950: position in each image.  UVOT images of the burst position were taken 
951: in the $v$ band from about 85\,s to about 11\,ks after the trigger.
952: Background counts in each of the images were estimated for a three
953: arcsecond radius aperture at the reported location of the $K$ band
954: afterglow.  The temporal decay rate is unknown, but reasonable
955: estimates can be made from several arguments.  First, the $K$ magnitude
956: of the afterglow dropped by at least 0.9 magnitudes from about
957: 6.7\,ks to 86\,ks after the burst, which means the $K$ band decay
958: slope was less than $\alpha_{K} = -0.33$.  Second, the XRT lightcurve
959: faded at two distinct rates: $\alpha_{XRT1} = -2.7$ from about 80
960: to 400\,s, and $\alpha_{XRT2} = -1.23$ after about 4000\,s
961: \citep{conciatore06}.  These values bracket typical optical afterglow
962: decay slopes; calculations were made using all three values.
963: 
964: Detection limits for a $S/N$ of three in the first UVOT $v$ band
965: image were made for the image by itself, the unweighted coadded
966: image, and the optimally weighted coadded image, as described in
967: \S\,\ref{sec:detection}.  The count rate limits were converted to
968: standard UVOT $v$ band magnitudes using the zero points and aperture
969: corrections given by \citet{poole08}.  The results for each of the
970: three decay slopes are given in Table\,\ref{table:limits}.  The single
971: image limit is $v=20.22$.  For unweighted coaddition, there is little
972: ($v=20.26$) or no improvement with a shallow decay slope ($\alpha =
973: -0.33$), and the limit actually becomes worse with steep decay slopes.
974: The reason for this is that noise in the later images degrades the
975: $S/N$ of unweighted coadded images, so that a brighter source in the
976: first image is required to produce a significant detection in the final
977: coadded image.  For a shallow slope, the optimally weighted $v$ band
978: limit ($v=20.42$) in the first frame is significantly deeper than the
979: single frame and unweighted coaddition limits.  For steep decay slopes,
980: the optimally weighted limit is virtually the same as the single frame
981: limit (and much better than the unweighted coaddition limit).  There is
982: little improvement over the single frame limit in this case, because
983: the steep lightcurve decay makes the later image weights very small,
984: so that they contribute very little to the final $S/N$.
985: 
986: The early UVOT $v$ band detection limits are the deepest reported for
987: GRB~060923A.  Any estimate of either a photometric redshift, or an
988: extinction value for this burst, must be consistent with the detection
989: limits.  The reported $K$ band detection measurement was made more than
990: $6200$\,s after the first $v$ band measurement.  Given the range of
991: decay slopes considered, the $v$ band magnitude limit at the time of
992: the $K$ band measurement would be at least 1.3 magnitudes fainter
993: than in the first image.  This would place even tighter constraints
994: on either the redshift or extinction.  The same analysis can be applied
995: to time series images of any non-detected GRB afterglow to improve the
996: detection limits.
997: 
998: 
999: %%%%%%%%%%%%%%%%
1000: %% Discussion %%
1001: %%%%%%%%%%%%%%%%
1002: \section{Discussion and Summary \label{sec:summary}}
1003: 
1004: Image addition for the detection of variable objects, or the improvement
1005: of $S/N$, can benefit significantly from proper weighting.  Data from
1006: rapidly varying sources, such as GRB afterglows, stands to benefit the
1007: most from optimal coaddition.  In fact, it can be counterproductive {\em
1008: not} to optimally weight the data when coadding.  We have shown how
1009: optimal coaddition can ensure the best $S/N$ for rapidly varying GRB
1010: afterglow data, even to the point of recovering previously undetected
1011: sources, and can place tighter detection limits on image data sets.
1012: 
1013: We have assumed a simple power law model for the optical lightcurve; this
1014: will clearly be inadequate in many cases \citep{oates08}.  A spectral
1015: extrapolation from the X-ray to the optical lightcurve may provide
1016: a reasonable estimate at early times before the forward shock peak.
1017: The spectral index $\beta$ should vary between $\beta = (p-1)/2$
1018: and $\beta = p/2$ where $p$ is the electron index \citep{sari98}.
1019: Given a range of possible $p$ values, one could predict a range of
1020: possible optical lightcurves.  However, at early times in many X-ray
1021: lightcurves, there is a fast decay phase with superimposed flaring
1022: activity, which rarely has a counterpart at optical wavelengths.
1023: It is probably better in almost all cases to assume an average optical
1024: lightcurve \citep[e.g.][]{oates08} rather than extrapolate from
1025: an X-ray lightcurve.  In any case, it is straightforward to adapt
1026: the coaddition technique to arbitrary lightcurves.
1027: 
1028: The technique can also be applied to observations of any variable source
1029: (e.g.  supernovae, active galactic nuclei, cataclysmic variable stars),
1030: as long as a reasonable estimate of the lightcurve is available.  Optimal
1031: coaddition is most beneficial when count rates are low, background is
1032: high, and the rate of source variability is high.  All of these factors often
1033: apply to optical observations of GRB afterglows.  Optical observations
1034: have been used in the examples presented here, but the technique is
1035: equally applicable to UV, infra-red, and X-ray imaging data that has
1036: Poisson noise characteristics.  The benefit to X-ray and possibly UV data
1037: may not be as great as for other frequency ranges, since the background
1038: count rates are often quite low.  However, there would likely be some
1039: improvement in $S/N$ or detection limits, and no loss in either, when
1040: the source count rates are comparable to the background rates.
1041: 
1042: There are other ways of improving $S/N$ that could probably be used
1043: in combination with the optimal coaddition technique described here.
1044: For example, we have used simple circular apertures to extract source
1045: counts in individual images; if the image point spread function can be
1046: determined with precision, there is the potential for optimally extracting
1047: the counts in each image, or the final coadded image.  A related optimal
1048: pixel weighting technique has been described by \citet{naylor98}.
1049: In addition, if the characteristics (aside from source brightness) of
1050: images differ significantly from frame to frame (which is usually not
1051: the case for UVOT data), there are techniques to optimally coadd the
1052: images to achieve improved $S/N$ or image resolution \citep{fischer94}.
1053: As another example, the UVOT can observe in event mode, by tagging the
1054: arrival time of individual detected photons.  This allows the possibility
1055: of optimally weighting individual {\em events}, rather than integrated
1056: images, which could improve the $S/N$ of afterglow data, particularly
1057: at early post-burst times.  We also caution that the equations derived
1058: here assume count rates high enough that Gaussian noise statistics
1059: can be assumed, but at extremely low count rates that assumption may
1060: not apply, and other approaches should be considered.
1061: 
1062: We will apply optimal image coaddition to all of the GRB afterglow
1063: data obtained with the {\em Swift} UVOT.  The primary goal will be
1064: the recovery of previously undetected afterglows, but at a minimum, the
1065: detection limits will be improved, placing stronger constraints on
1066: the existence of so-called dark GRBs.
1067: 
1068: 
1069: \acknowledgements
1070: Funding for the Swift program at Penn State is provided by NASA under
1071: the contract NAS5-00136.  We acknowledge the use of public data from
1072: the Swift data archive.
1073: 
1074: {\it Facilities:} \facility{Swift (UVOT)}
1075: 
1076: 
1077: %%%%%%%%%%%%%%%%
1078: %% References %%
1079: %%%%%%%%%%%%%%%%
1080: 
1081: \begin{thebibliography}
1082: 
1083: \bibitem[Akerlof et al.(1999)]{akerlof99} Akerlof, C.,
1084:   et al.\ 1999, \nat, 398, 400 
1085: 
1086: \bibitem[Band et al.(2005)]{band05} Band, D., et al.\ 2005,
1087:   GCN Circ. 3466, http://gcn.gsfc.nasa.gov/gcn3/3475.gcn3
1088: 
1089: \bibitem[Barthelmy et al.(2005)]{barthelmy05} Barthelmy, S.~D., et 
1090: al.\ 2005, Space Science Reviews, 120, 143
1091: 
1092: \bibitem[Barthelmy et al.(1998)]{barthelmy98} Barthelmy, S.~D.,
1093:   Butterworth, P.~S., Cline, T.~C., \& Gehrels, N. 1998, in AIP Conf.
1094:   Proc. 428, Gamma-Ray Bursts: 4th Huntsville Symposium, eds.
1095:   C.~A.\ Meegan, R.~D.\ Preece, \& T.~M.\ Koshut (New York: AIP), 99
1096: 
1097: \bibitem[Barthelmy et al.(1995)]{barthelmy95} Barthelmy, S.~D.,
1098:   Butterworth, P., Cline, T.~L., Gehrels, N., Fishman, G.~J.,
1099:   Kouveliotou, C., \& Meegan, C.~A.\ 1995, \apss, 231, 235
1100: 
1101: \bibitem[Blustin et al.(2006)]{blustin06a} Blustin, A.~J., et al.\ 2006,
1102:   \apj, 637, 901 
1103: 
1104: \bibitem[Blustin \& Page(2006)]{blustin06b} Blustin, A.~J., Page, M.~J., 2006,
1105:   GCN Circ. 5219, http://gcn.gsfc.nasa.gov/gcn3/5219.gcn3
1106: 
1107: \bibitem[Burrows et al.(2005)]{burrows05} Burrows, D.~N., et al.\
1108:   2005, Space Science Reviews, 120, 165 
1109: 
1110: \bibitem[Campana et al.(2006)]{campana06} Campana, S., et al.\ 2006,
1111:   \nat, 440, 164
1112: 
1113: \bibitem[Conciatore(2006)]{conciatore06} Conciatore, M.~L., 2006,
1114:   GCN Circ. 5599, http://gcn.gsfc.nasa.gov/gcn3/5599.gcn3
1115: 
1116: \bibitem[Dai et al.(2007)]{dai07} Dai, X., Halpern, J.~P., Morgan, N.~D.,
1117:   Armstrong, E., Mirabal, N., Haislip, J.~B., Reichart, D.~E.,
1118:   \& Stanek, K.~Z.\ 2007, \apj, 658, 509
1119: 
1120: \bibitem[Fischer \& Kochanski(1994)]{fischer94} Fischer, P.,
1121:   \& Kochanski, G.~P.\ 1994, \aj, 107, 802
1122: 
1123: \bibitem[Fox, Rau, \& Ofek(2006)]{fox06a} Fox, D.~B., Rau, A., \& Ofek, E.~O.\
1124:   2006, GCN Circ. 5597, http://gcn.gsfc.nasa.gov/gcn3/5597.gcn3
1125: 
1126: \bibitem[Fox(2006)]{fox06b} Fox, D.~B.\ 2006, GCN Circ. 5605,
1127:   http://gcn.gsfc.nasa.gov/gcn3/5605.gcn3
1128: 
1129: \bibitem[Garnavich(2006)]{garnavich06} Garnavich, P.\, \& Karska, A.\ 2006,
1130:   GCN Circ. 5253, http://gcn.gsfc.nasa.gov/gcn3/5253.gcn3
1131: 
1132: \bibitem[Gehrels et al.(2004)]{gehrels04} Gehrels, N., et al.\ 2004,
1133:   \apj, 611, 1005 
1134: 
1135: \bibitem[Grupe et al.(2007)]{grupe07} Grupe, D., et al.\ 2007, \apj,
1136:   662, 443
1137: 
1138: \bibitem[Holland et al.(2002)]{holland02} Holland, S.~T., et al.\ 2002,
1139:   \aj, 124, 639 
1140: 
1141: \bibitem[Holland et al.(2005)]{holland05} Holland, S.~T., et al.\ 2005,
1142:   GCN Circ. 3475, http://gcn.gsfc.nasa.gov/gcn3/3475.gcn3
1143: 
1144: \bibitem[Horne(1986)]{horne86} Horne, K.\ 1986, \pasp, 98, 609
1145: 
1146: \bibitem[Jakobsson et al.(2004)]{jakobsson04} Jakobsson, P., et al.\ 2004,
1147:   New Astronomy, 9, 435 
1148: 
1149: \bibitem[Li et al.(2006a)]{li06a} Li, W., Jha, S., Filippenko, A.~V.,
1150:   Bloom, J.~S., Pooley, D., Foley, R.~J., \& Perley, D.~A.\ 2006, 
1151:   \pasp, 118, 37 
1152: 
1153: \bibitem[Li et al.(2006b)]{li06b} Li, W., Butler, N., Bloom, J.~S., \&
1154:   Filippenko, A.~V.\ 2006, GCN Circ. 5584,
1155:   http://gcn.gsfc.nasa.gov/gcn3/5584.gcn3
1156: 
1157: \bibitem[Marshall(2007)]{marshall07} Marshall, F.~E.,
1158:   2007, in Proceedings of Gamma Ray Bursts 2007,
1159:   Santa Fe, NM, 05-09 November
1160: 
1161: \bibitem[Mason et al.(2005)]{mason05} Mason, K.~O., Blustin, A.~J.,
1162:   \& Roming, P.~W.~A.\ 2005, in Proceedings of the X-ray Universe 2005,
1163:   San Lorenzo de El Escorial (Spain), 26-30 September  (astro-ph/0511322).
1164: 
1165: \bibitem[Mason et al.(2004)]{mason04} Mason, K.~O., Breeveld, A.,
1166:   Hunsberger, S.~D., James, C., Kennedy, T.~E., Roming, P.~W.~A., 
1167:   \& Stock, J.\ 2004, \procspie, 5165, 277 
1168: 
1169: \bibitem[Melandri \& Gomboc(2006)]{melandri06} Melandri, A., \& Gomboc, A.\
1170:   2006 GCN Circ. 5586, http://gcn.gsfc.nasa.gov/gcn3/5586.gcn3
1171: 
1172: \bibitem[M{\'e}sz{\'a}ros \& Rees(1999)]{meszaros99} M{\'e}sz{\'a}ros, P.,
1173:   \& Rees, M.~J.\ 1999, \mnras, 306, L39 
1174: 
1175: \bibitem[Meszaros \& Rees(1997)]{meszaros97} Meszaros, P., \& Rees, M.~J.\ 1997, \apj, 476, 232 
1176: 
1177: \bibitem[Morgan et al.(2005)]{morgan05} Morgan, A., Grupe, D., Gronwall, C.,
1178:   Racusin, J., Falcone, A., Marshall, F., Chester, M., \& Gehrels, N.\
1179:   2005, GCN Circ., 3577 %shorten?
1180: 
1181: \bibitem[Naylor(1998)]{naylor98} Naylor, T.\ 1998, \mnras, 296, 339
1182: 
1183: \bibitem[Nousek et al.(2006)]{nousek06} Nousek, J.~A., et al.\ 2006,
1184:   \apj, 642, 389 
1185: 
1186: \bibitem[Oates et al.(2008)]{oates08} Oates, S., et al.\ 2008,
1187:   in prep.
1188: 
1189: \bibitem[Page(2006)]{page06} Page, M.~J., et al., 2006, GCN Circ. 5212,
1190:   http://gcn.gsfc.nasa.gov/gcn3/5212.gcn3
1191: 
1192: \bibitem[Poole et al.(2008)]{poole08} Poole, T., et al.\ 2008, \mnras,
1193:   383, 627
1194: 
1195: \bibitem[Roming \& Mason (2006)]{romingmason06} Roming, P.~W.~A.,
1196:   \& Mason, K.~O.\ 2006, in AIP Conf. Proc. 836, Gamma-Ray Bursts in
1197:   the Swift Era, ed. S.~S.\ Holt, N.\ Gehrels, \& J.~A.\ Nousek
1198:   (Melville: AIP), 224
1199: 
1200: \bibitem[Roming et al.(2005a)]{roming05a} Roming, P.~W.~A., et al.\
1201:   2005a, Space Science Reviews, 120, 95 
1202: 
1203: \bibitem[Roming et al.(2005b)]{roming05b} Roming, P.~W.~A., et al.\
1204:   2005b, GCN Circ., 3249
1205: 
1206: \bibitem[Roming et al.(2006)]{roming06} Roming, P.~W.~A., et al.\ 2006,
1207:   \apj, 652, 1416
1208: 
1209: \bibitem[Roming et al.(2008)]{roming08} Roming, P.~W.~A., et al.\ 2008,
1210:   in preparation
1211: 
1212: \bibitem[Rykoff et al.(2006)]{rykoff06} Rykoff, E.~S., et al.\ 2006,
1213:   \apjl, 638, L5 
1214: 
1215: \bibitem[Rykoff et al.(2004)]{rykoff04} Rykoff, E.~S., et al.\ 2004,
1216:   \apj, 601, 1013 
1217: 
1218: \bibitem[Sari \& Piran(1999)]{sari99} Sari, R., \& Piran, T.\ 1999,
1219:   \apjl, 517, L109
1220: 
1221: \bibitem[Sari et al.(1998)]{sari98} Sari, R., Piran, T., \& Narayan,
1222:   R.\ 1998, \apjl, 497, L17 
1223: 
1224: \bibitem[Schady et al.(2005)]{schady05} Schady, P., et al.\ 2005, GCN Circ., 
1225:   3057
1226: 
1227: \bibitem[Stamatikos et al.(2006)]{stamatikos06} Stamatikos, M., et al.\ 2006,
1228:   GCN Circ. 5583, http://gcn.gsfc.nasa.gov/gcn3/5583.gcn3
1229: 
1230: \bibitem[Tanvir, Rol, \& Hewett(2006)]{tanvir06} Tanvir, N., Rol, E.,
1231:   \& Hewett, P., 2006, GCN Circ. 5216,
1232:   http://gcn.gsfc.nasa.gov/gcn3/5216.gcn3
1233: 
1234: \bibitem[Wei et al.(2006)]{wei06} Wei, D.~M., Yan, T., \& Fan, Y.~Z.\ 2006,
1235:   \apjl, 636, L69
1236: 
1237: \bibitem[Williams \& Milne(2006)]{williams06} Williams, G.~G., \&
1238:   Milne, P.~A.\ 2006, GCN Circ. 5588, http://gcn.gsfc.nasa.gov/gcn3/5588.gcn3
1239: 
1240: \bibitem[Zhang et al.(2006)]{zhang06} Zhang, B., Fan, Y.~Z., Dyks, J.,
1241:   Kobayashi, S., M{\'e}sz{\'a}ros, P., Burrows, D.~N., Nousek, J.~A.,
1242:   \& Gehrels, N.\ 2006, \apj, 642, 354 
1243: 
1244: \end{thebibliography}
1245: 
1246: 
1247: %%%%%%%%%%%%%%%%%%
1248: %%%%% Tables %%%%%
1249: %%%%%%%%%%%%%%%%%%
1250: \clearpage
1251: %
1252: % Table 1
1253: % 060923A mag limits
1254: \input{tab1}
1255: 
1256: %%%%%%%%%%%%%%%%%%%
1257: %%%%% Figures %%%%%
1258: %%%%%%%%%%%%%%%%%%%
1259: \clearpage
1260: 
1261: %
1262: % Fig. 1
1263: % Decay slope variation
1264: \begin{figure}
1265: %%%\plottwo{sim_0.5_5.0_2.5.eps}{sim_1.5_5.0_2.5.eps}
1266: \plottwo{f1a.eps}{f1b.eps}
1267: \caption{Cumulative $S/N$ as a function of time since the burst, for
1268:   coadded simulated GRB afterglow data, with a shallow decay slope
1269:   (left) and a steep decay slope (right).  The temporal decay slopes
1270:   $\alpha$, and the initial count rate $R_{1}$, of the lightcurve models
1271:   are given, along with the background count rate $R_{sky}$. Each point
1272:   corresponds to an observation in a relatively short time interval.
1273:   Unweighted coadded data is shown by red triangles; optimally weighted
1274:   coadded data is shown by blue squares.  The error bars span the $68.3\%$
1275:   confidence limits in the results of 1000 simulations.}
1276:   \label{fig:simDecaySlope}
1277: \end{figure}
1278: %
1279: % Fig. 2
1280: % Count rate variation
1281: \begin{figure}
1282: %%%\plottwo{sim_1.1_1.0_3.0.eps}{sim_1.1_10.0_3.0.eps}
1283: \plottwo{f2a.eps}{f2b.eps}
1284: \caption{Cumulative $S/N$ as a function of time since the burst, for
1285:   coadded simulated GRB afterglow data, with a relatively low initial
1286:   count rate (left) and high initial count rate (right).  The temporal
1287:   decay slope $\alpha$, and the initial count rates $R_{1}$, of the
1288:   lightcurve models are given, along with the background count rate
1289:   $R_{sky}$. Each point corresponds to an observation in a relatively
1290:   short time interval.  Unweighted coadded data is shown by red triangles;
1291:   optimally weighted coadded data is shown by blue squares.  The error
1292:   bars span the $68.3\%$ confidence limits in the results of 1000
1293:   simulations.}
1294:   \label{fig:simSourceRate}
1295: \end{figure}
1296: %
1297: % Fig. 3
1298: % Background variation
1299: \begin{figure}
1300: %%%\plottwo{sim_1.1_3.0_5.0.eps}{sim_1.1_3.0_1.0.eps}
1301: \plottwo{f3a.eps}{f3b.eps}
1302: \caption{Cumulative $S/N$ as a function of time since the burst, for
1303:   coadded simulated GRB afterglow data, with a high background count rate
1304:   (left) and a low background count rate (right).  The temporal decay
1305:   slope $\alpha$, and the initial count rate $R_{1}$, of the lightcurve
1306:   models are given, along with the background count rates $R_{sky}$.  Each
1307:   point corresponds to an observation in a relatively short time interval.
1308:   Unweighted coadded data is shown by red triangles; optimally weighted
1309:   coadded data is shown by blue squares.  The error bars span the $68.3\%$
1310:   confidence limits in the results of 1000 simulations.}
1311:   \label{fig:simBkgRate}
1312: \end{figure}
1313: %
1314: % Fig. 4
1315: % Final S/N as model alpha changes
1316: \begin{figure}
1317: %%%\plotone{grbSNfinalAlpha.eps}
1318: \plotone{f4.eps}
1319: \caption{Final $S/N$ in the optimally coadded data as a function of
1320:   the model temporal decay index $\alpha_{model}$, for simulated
1321:   GRB afterglow data.  The true decay index is $-1.2$, and the simulations
1322:   used an initial count rate of 3\,${\rm cts\, s^{-1}}$, and a background
1323:   count rate of 2.5\,${\rm cts\, s^{-1}}$.  The points give the median
1324:   values from 1000 simulations, and the error bars show the uncertainty
1325:   on the median value (not the dispersion in the simulations).  The
1326:   dashed line shows the maximum $S/N$ from unweighted coadded data 
1327:   averaged over the simulations.}
1328:   \label{fig:finalSN}
1329: \end{figure}
1330: %
1331: % Fig. 5
1332: % Cumulative S/N vs. time for GRB050525A
1333: \begin{figure}
1334: %%%\plotone{grb050525aLcSN.eps}
1335: \plotone{f5.eps}
1336: \caption{Lightcurve (top), and cumulative $S/N$ (bottom) for UVOT
1337:   $v$ band image data of GRB\,050525A, as a function of time since the
1338:   burst.  Error bars on the lightcurve represent count rate uncertainties
1339:   for measurements using individual images.  In the $S/N$ plot, red x's
1340:   show the results of unweighted coaddition; blue squares show the results
1341:   of optimal weighting coaddition.}
1342:   \label{fig:050525a}
1343: \end{figure}
1344: %
1345: % Fig. 6
1346: % Cumulative S/N vs. time for GRB060604
1347: \begin{figure}
1348: %%%\plotone{grb060604LcSN.eps}
1349: \plotone{f6.eps}
1350: \caption{Light curve (top), and cumulative $S/N$ (bottom) for UVOT
1351:   $v$ band image data of GRB\,060604, as a function of time since the
1352:   burst.  Error bars on the lightcurve represent count rate uncertainties
1353:   for measurements using individual images.  In the $S/N$ plot, red x's
1354:   show the results of unweighted coaddition; blue squares show the results
1355:   of optimal weighting coaddition.}
1356:   \label{fig:060604.1}
1357: \end{figure}
1358: %
1359: % Fig. 7
1360: % Coadded images of GRB060604
1361: \begin{figure}
1362: %%%\plottwo{coaddNoweight.ps}{coaddOptimal.ps}
1363: \plottwo{f7a.eps}{f7b.eps}
1364: \caption{Coadded UVOT $v$ band images of GRB\,060604. Left --- result from 
1365:   unweighted coaddition.  Right --- result from optimally weighted
1366:   coaddition.  Each image is $4\times4$\,arcmin on a side.  The images
1367:   have been scaled so that the brightnesses of the field stars appear
1368:   nearly the same in both images.  The reported
1369:   location of the afterglow, detected in other bands, is at the center
1370:   in each case.  The circles show the 3\,arcsec radius apertures used
1371:   to extract the source counts.  In the unweighted case, the $S/N$ of the
1372:   counts in the source region is about 2.0, while in the weighted case it
1373:   is about 3.0.} \label{fig:060604.2}
1374: \end{figure}
1375: 
1376: 
1377: \end{document}
1378: