0804.2025/ms.tex
1: 
2: %\documentstyle[12pt,preprint]{aastex}
3: 
4: % manuscript produces a one-column, double-spaced document:
5: \documentclass[preprint]{aastex}
6: 
7: % preprint2 produces a double-column, single-spaced document:
8: %\documentclass[preprint2]{aastex}
9: 
10: \slugcomment{Accepted for publication in AJ, 16 March 2008}
11: 
12: \shorttitle{GO-10775 Reductions}
13: \shortauthors{Anderson}
14: 
15: \def\hst{{\it HST}}
16: \def\subr #1{_{{\rm #1}}}
17: \def\supr #1{^{{\rm #1}}}
18: \def\minspt{$\buildrel{\prime}\over .$}
19: \def\secspt{$\buildrel{\prime\prime}\over .$}
20: \def\spt{$\buildrel{\rm s}\over .$}
21: \font\bital=cmbxti10
22: 
23: \begin{document}
24: 
25: 
26: \title{An ACS Survey of Globular Clusters V:  Generating a Comprehensive
27:        Star Catalog for Each Cluster\footnote{
28:                Based on observations with the NASA/ESA 
29:                {\it Hubble Space Telescope}, obtained at the 
30:                Space Telescope Science Institute, which is operated by 
31:                AURA, Inc., under NASA contract NAS 5-26555.}} 
32: 
33: \author{Jay Anderson}
34: \affil{Space Telescope Science Institute,
35:        Baltimore, MD 21218, USA; jayander@stsci.edu}
36: 
37: \author{Ata Sarajedini}
38: \affil{Department of Astronomy, University of Florida, 
39:        Gainesville, FL 32611, USA; ata@astro.ufl.edu}
40: 
41: \author{Luigi R. Bedin}
42: \affil{Space Telescope Science Institute, 
43:        Baltimore MD 28218, USA; bedin@stsci.edu}
44: 
45: \author{Ivan R. King}
46: \affil{Department of Astronomy, University of Washington, 
47:        Seattle, WA 98195-1580, USA; king@astro.washington.edu}
48: 
49: \author{Giampaolo Piotto}
50: \affil{Dipartimento di Astronomia, Universit\`a di Padova, 
51:        35122 Padova, Italy; giampaolo.piotto@unipd.it}
52: 
53: \author{I. Neill Reid}
54: \affil{Space Telescope Science Institute, 
55:        Baltimore MD 28218, USA; inr@stsci.edu}
56: 
57: \author{Michael Siegel}
58: \affil{University of Texas, McDonald Observatory, 
59:        Austin, TX 78712, USA; siegel@astro.as.utexas.edu}
60: 
61: \author{Steven R. Majewski}
62: \affil{Department of Astronomy, University of Virginia, 
63:        Charlottesville, VA 22904-4325, USA; srm4n@virginia.edu}
64: 
65: \author{Nathaniel E. Q. Paust}
66: \affil{Space Telescope Science Institute, 
67:        Baltimore MD 28218, USA; npaust@stsci.edu}
68: 
69: \author{Antonio Aparicio}
70: \affil{Instituto de Astrof\'isica de Canarias, V\'ia L\'actea s/n,
71:        E-38200 La Laguna, Spain; antapaj@iac.es}
72: 
73: \author{Antonino P. Milone}
74: \affil{Dipartimento di Astronomia, Universit\`a di Padova, 
75:        35122 Padova, Italy; antonino.milone@unipd.it}
76: 
77: \author{Brian Chaboyer}
78: \affil{Department of Physics and Astronomy, Dartmouth College, 
79:        Hanover, NH 03755, USA; chaboyer@heather.dartmouth.edu}
80: 
81: \author{Alfred Rosenberg}
82: \affil{Instituto de Astrof\'isica de Canarias, 
83:        E-38200 La Laguna, Canary Islands, Spain; alf@iac.es}
84: 
85: \affil{March 16, 2008}
86: 
87: \begin{abstract}
88: The ACS Survey of Globular Clusters has used HST's Wide-Field Channel to
89: obtain uniform imaging of 65 of the nearest globular clusters to provide
90: an extensive homogeneous dataset for a broad range of scientific
91: investigations.  The survey goals required not only a uniform observing
92: strategy, but also a uniform reduction strategy.  To this end, we
93: designed a sophisticated software program to process the cluster data in
94: an automated way.  The program identifies stars simultaneously in the
95: multiple dithered exposures for each cluster and measures them using the
96: best available PSF models.  We describe here in detail the program's
97: rationale, algorithms, and output.  The routine was also designed to
98: perform artificial-star tests, and we run a standard set of $\sim$10$^5$
99: tests for each cluster in the survey.  The catalog described here will
100: be exploited in a number of upcoming papers and will eventually be made
101: available to the public via the world-wide web.
102: \end{abstract}
103: 
104: % keywords:
105: {\em KEYWORDS:  
106:      Globular clusters: general ---
107:      catalogs ---
108:      techniques: image processing, photometric}
109: 
110: 
111: 
112: % ********************************************************
113: % ********************************************************
114: % *****
115: % *****  SECTION 1. OBSERVATIONS
116: % *****
117: % ********************************************************
118: % ********************************************************
119: 
120: 
121: % S1
122: \section{INTRODUCTION}
123: \label{s.INTRO}
124: %
125: The Galaxy's globular clusters hold important clues to a large number of
126: scientific questions, ranging from star formation to stellar structure,
127: galaxy evolution, and cosmology.  Many of these questions can be
128: answered only by surveying a significant fraction of the clusters and
129: studying the cluster system as an ensemble.  Initial globular cluster
130: surveys (e.g., Zinn 1980, Armandroff 1989) focused on integrated-light
131: properties such as total brightness, colors, metallicity, and reddening.
132: Many subsequent ``surveys'' have been constructed by assembling various
133: data from the multitude of independent observations of individual
134: clusters (e.g., Djorgovski \& King 1986, Djorgovski \& Meylan 1993, 
135: Trager et al.\ 1995, Lee et al.\ 1996, and Harris 1996).  However, since 
136: each cluster is typically observed with a different instrument and under 
137: different conditions, there are limits to how homogeneous such a 
138: patched-together data set can be.
139: 
140: In an effort to construct a more homogeneous sample, Rosenberg 
141: et al.\ (2000a, 2000b) surveyed 56 clusters from the ground, producing 
142: star catalogs and color-magnitude diagrams (CMDs) that can be directly 
143: intercompared to yield relative ages and relative horizontal-branch 
144: morphologies.  Piotto et al.\ (2002) used WFPC2 snapshots to image
145: the central regions of 74 clusters and construct CMDs in a uniform
146: photometric system.  These surveys have allowed clusters to be studied 
147: on a more even footing than ever before, but the data in these surveys
148: still suffer from severe crowding in the cluster cores, irregularities 
149: in the sampling, and gaps in the field of view.  Thanks to its fine 
150: sampling, large dynamic range and wide, contiguous field of view, the 
151: Advanced Camera for Survey's (ACS's) Wide-Field Channel (WFC) on board 
152: the Hubble Space Telescope (HST) is the first instrument that can 
153: improve dramatically on all of these shortcomings.  
154: 
155: The ACS Survey of Globular Clusters presented here was designed to
156: provide a nearly complete catalog of all the stars present in the
157: central two arcminutes of 65 targeted clusters.  Such a uniform data set
158: has many scientific applications, and we are currently in the process of
159: using the catalog for broad studies of:\ binary-star distributions,
160: absolute and relative ages, horizontal-branch morphology, blue
161: stragglers, isochrone fitting, mass functions, and dynamical models.  We
162: are also measuring internal motions and orbits for those clusters that have
163: sufficient archival data.  In addition to addressing these major
164: scientific issues, one of the main legacies of this survey will be to
165: provide the community with a definitive catalog of stars in the central
166: regions of these clusters.  This data base will serve as a touchstone
167: for studies of these clusters for many years to come, and as such it
168: should be as accurate and comprehensive as possible.
169: 
170: The images that make up this survey consist almost entirely of point 
171: sources, but each cluster has a different central concentration and density 
172: profile.  So, to construct a definitive catalog, we needed a star-finding 
173: and measuring routine that works in a variety of crowding situations, 
174: often across the same cluster field.  With this in mind, we developed a 
175: sophisticated computer program that simultaneously analyzes all of the 
176: survey exposures for each cluster (one short exposure plus four to five 
177: deep exposures for each of the F606W and F814W filters), to construct a 
178: single list of detected stars and their measured parameters.  The routine 
179: was designed to deal well with both crowded and uncrowded situations, 
180: and as such it is able to find almost every star that a human could find. 
181: At the same time, the routine uses the independence of the pointings and 
182: knowledge of the PSF to avoid including image artifacts in the list.  
183: 
184: This paper describes the data-reduction procedure we developed and the 
185: resulting catalog we produced for each cluster.  It is organized as 
186: follows:  We begin by describing the observations we have available for 
187: each cluster (\S\ \ref{s.OBSNS}) and the preliminary set-up steps required 
188: before the finding program could be run on the images (\S\ \ref{s.SETUP}).  
189: Before diving into the details of our procedures, we first give an overview 
190: of the general considerations that are involved in finding and measuring 
191: stars in dithered, undersampled images of globular clusters 
192: (\S\ \ref{s.OVERVIEW}).  We then describe in detail our automated finding 
193: and measuring program and use it to construct a catalog of the real 
194: stars for each cluster (\S\ \ref{s.KSYNC}).  We use the same program 
195: to perform a standard battery of artificial-star tests for each cluster 
196: (\S\ \ref{s.ASTEST}).  We also consider the photometric errors that are 
197: present in an ACS data set such as that collected here 
198: (\S\ \ref{s.PHOTO_ERRORS}).  Finally, we describe the photometric and 
199: astrometric calibration and the assembly of the final catalog of positions, 
200: magnitudes, quality characterizations, etc., for the detected stars 
201: for each cluster field (\S\ \ref{s.CATALOG}).  We end with a summary of 
202: upcoming scientific results and additional studies that will complement 
203: this survey (\S\ \ref{s.SUMMARY}).
204: 
205: 
206: %
207: % ********************************************************
208: % ********************************************************
209: % *****
210: % *****  SECTION 2. OBSERVATIONS
211: % *****
212: % ********************************************************
213: % ********************************************************
214: 
215: % S2
216: \section{OBSERVATIONS}
217: \label{s.OBSNS}
218: 
219: The goal of the ACS Survey of Globular Clusters (GO-10775, PI-Sarajedini)
220: was to image the central regions of a large number of globular clusters 
221: in order to generate a homogeneous set of star catalogs.  The clusters 
222: are all at different distances and all have different central densities and 
223: radial profiles, so there is of course no way to obtain identical data 
224: for every cluster, but our aim was to come as close to this ideal as 
225: possible.
226: 
227: Each cluster was observed for one orbit in F606W ($V$) and one orbit in 
228: F814W ($I$), except for M54, which was observed for 2 orbits in each filter.
229: In each orbit, we took one short exposure and either four or five deeper 
230: exposures, depending on how many we could fit into the orbit.  We chose the 
231: exposure times for each cluster so that the horizontal-branch stars would 
232: be unsaturated in the short exposure and the turn-off and subgiant branch 
233: stars would be unsaturated in the deep exposures.  For the typical cluster, 
234: we reach about 6 magnitudes below the turn-off, to about 0.2 $M_{\odot}$.
235: Table~\ref{tab01} provides the details of our observations for each cluster.  
236: 
237: \input{tab01.tex}
238: 
239: To give the survey as much spatial uniformity as possible, we stepped
240: our observations so that no star would fall in the inter-chip gap in more 
241: than one of the deep exposures.  Since the WFC field-of-view is actually 
242: quite rhombus-shaped, we also made sideways steps so that the resulting 
243: field would be as square as possible.  Figure~\ref{fig01} shows the 
244: coverage for a typical cluster that had four deep exposures.
245: 
246: \begin{figure}
247: %\plotone{FIG01/ds9.ps}
248: \plotone{fig01.ps}
249: \caption{{\it Left}: the depth of the deep stack in the case of four
250:          deep images.  Most parts of the field are covered by all four
251:          images.  We dithered the observations to ensure that a star
252:          will fall in the gap in at most one deep exposure; hence we
253:          have at least three images covering all areas but the very
254:          edges.  {\it Right}: the depth of the short stack (1 or 0).
255:          Some bright stars will fall in the gap of the short-exposure
256:          image and can be measured (albeit poorly) only in the deep
257:          exposures.
258:          \label{fig01}}
259: \end{figure}
260: 
261: 
262: % ********************************************************
263: % ********************************************************
264: % *****
265: % *****  SECTION 3. PRELIM SET UP
266: % *****
267: % ********************************************************
268: % ********************************************************
269: 
270: % S3
271: \section{PRELIMINARY SET-UP}
272: \label{s.SETUP}
273: 
274: The HST pipeline generates two main types of output image.  The {\tt
275: flt} images have been flat-fielded and bias-subtracted, but are
276: otherwise left in the raw WFC CCD frame, which suffers from a lot of
277: distortion.  The standard pipeline also generates a {\tt drz} image for
278: each set of associated exposures.  This is a drizzled, composite image
279: of all the exposures that were taken in the same visit through the same
280: filter.  The {\tt drz} images have been resampled into a standard
281: distortion-free frame and tied to an absolute astrometric frame via the
282: guide stars.  A careful photometric calibration has also been worked out
283: for them (Sirianni et al.\ 2005).  Thus, the {\tt drz} images can serve
284: to establish both our astrometric reference frame and photometric zero
285: points.  However, because they have been resampled, they are not well
286: suited for high-accuracy PSF-fitting analysis.  For this reason, we used
287: the {\tt drz} images for calibration, but our final measurements came
288: from careful analysis of the individual {\tt flt} images.
289: 
290: The first step in reducing the data for each cluster was to construct 
291: a reference frame and relate each {\tt flt} exposure to this frame, both 
292: astrometrically and photometrically.  
293: 
294: 
295: % SS3.1
296: \subsection{Constructing a reference frame for each cluster}
297: \label{ss.ref_frame}
298: 
299: To construct an astrometric frame for each cluster, we first measured 
300: simple centroid positions for the bright, isolated stars in the F606W 
301: {\tt drz} image.  Using the WCS header information, we converted these 
302: positions into a reference frame that has the targeted cluster center at 
303: coordinate [3000,3000], the $y$ axis aligned with North, and a scale of 
304: 50 mas/pixel.  For all cluster orientations, this allows the entire observed 
305: field to fit conveniently within a frame that is 6000$\times$6000 pixels.
306: 
307: The next step was to relate each of the individual {\tt flt} exposures
308: to this reference frame.  We started by measuring positions and fluxes
309: for all of the reasonably bright stars in each {\tt flt} exposure with
310: the program {\tt img2xym\_WFC.09x10}, documented in Anderson \& King
311: (2006, AK06).  Briefly, the program starts with a library PSF, which was
312: constructed empirically for each filter using GO-10424 observations of
313: the outskirts of NGC~6397.  These library PSFs account for the spatial
314: variations in the WFC PSF due to the telescope optics and the variable
315: charge diffusion present in the CCD (see Krist 2005).  The PSF in each
316: exposure can differ from this library PSF due to spacecraft breathing or
317: focus changes, so we fitted the library PSF to bright stars in each
318: image and came up with a spatially constant perturbation to the PSF that
319: better represents the star images in each individual exposure.  Using
320: the improved PSF, the program then went through each exposure and
321: measured positions and fluxes for the bright, isolated stars.  The
322: exposure-specific, improved PSFs were saved for later in the analysis.
323: 
324: We next found the common stars between the reference list and the star list 
325: for each exposure.  This allowed us to define a general, 6-parameter linear 
326: coordinate transformation from the distortion-corrected frame of each 
327: exposure into the reference frame.  Since the photometry and astrometry are
328: more accurately measured in the {\tt flt} frames than in the {\tt drz} 
329: frame, we improved the internal quality of the reference frame by 
330: iteration.  The final reference-frame positions and fluxes for the bright 
331: stars should be internally accurate to better than 0.01 pixel and 
332: 0.01 magnitude.
333: 
334: Using this reference list of stars for each cluster, we computed
335: the final astrometric transformations and photometric zero points from 
336: each short and deep exposure into the reference frame.  The photometric 
337: system at this stage was kept in instrumental magnitudes, 
338: $-2.5\,{\rm log}_{10}({\rm flux}_{\rm DN})$, where the flux corresponds 
339: to that measured in the deep {\tt flt} images for the cluster at hand.
340: It was convenient to keep our photometry in this instrumental system until 
341: calibration at the very end (\S~\ref{ss.photo_calib}), because instrumental 
342: magnitudes make it easier to assess errors in terms of the expected 
343: signal to noise.
344: 
345: % S3.2
346: \subsection{Stack construction}
347: \label{ss.stacks}
348: 
349: The transformations from the individual exposures into the reference 
350: frame allowed us to construct a stacked representation of each field.  
351: We did not use these stacks in the quantitative analysis, but they were 
352: an invaluable tool which enabled us to inspect star lists and evaluate
353: the star-finding algorithm.  (It is worth noting that the {\tt drz} 
354: images which were produced in the ACS pipeline were not adequate for 
355: this for several reasons:  
356: [1] the pipeline uses the commanded POS-TARGs to register the exposures in
357:     a common frame, whereas our empirical star-based transformations allow
358:     a much more accurate mapping from the exposures into the reference frame; 
359: [2] the pipeline is set up to deal with an arbitrary set of images with
360:     different exposure times, whereas our stacking algorithm could be 
361:     optimized for the 3 to 5 deep exposures plus one shallow exposure 
362:     that we have for each filter; and 
363: [3] we wanted the image to be in our reference frame, but did not want 
364:     to resample the {\tt drz} image and thus degrade the resolution even 
365:     further.)
366: 
367: 
368: There is no unique way to construct a stacked image from a dithered set 
369: of exposures.  Our construction of the stacks was analogous to using 
370: {\tt drizzle} (Fruchter \& Hook 2002) with {\tt pixfrac} = 0.  We went
371: through the reference frame pixel by pixel and used the inverse 
372: coordinate transformations and inverse distortion corrections to map the 
373: center of each reference-frame pixel into the frame of each of the 
374: individual F606W exposures.  We then identified the closest pixel in each 
375: of the 3 to 5 exposures and computed a sigma-clipped mean of these pixel
376: values.
377: %(It may seem strange to talk of sigma-clipping a sample as small as 3 to
378: %5 in size, but in fact we know how much the points should spread, and
379: %made extensive Monte Carlo tests to establish our rejection procedures.)
380: Finally, we set the value of the reference-frame pixel to this mean, and
381: moved on to the next pixel in the reference frame.  This produced a
382: stack of the deep exposures.
383: 
384: To deal with pixels that were saturated in the deep exposures, we 
385: generated a similar stack from the short exposure (actually, a stack 
386: from just one image is better called a resampling).  We then constructed a 
387: composite stack by starting with the deep-exposure stack and replacing 
388: any pixel that was within 3 pixels of a saturated pixel with the 
389: exposure-time-scaled value from the short-exposure stack.  Finally, 
390: we put the WCS header information into this composite stack for each 
391: filter.  Figure~\ref{fig02} shows an example of the stacked images for 
392: a 100$\times$100-pixel region at the center of 47 Tuc.  
393: 
394: \begin{figure}
395: \plotone{fig02.ps}
396:          \caption{({\it Left}) A 100$\times$100-pixel (5$\times$5-arcsecond) 
397:                                region in the stack from the deep F606W 
398:                                exposures of 47 Tuc;
399:                 ({\it middle}) same for the short F606W exposure;  
400:                  ({\it right}) the combination of the long and short exposures.
401:          \label{fig02}}
402: \end{figure}
403: 
404: 
405: We constructed such a composite stack for the F606W and the F814W 
406: exposures for each cluster.  These stacks were not used directly in 
407: the reductions discussed in the next sections, but because they are a 
408: simple representation of the scene without regard to the locations of 
409: stars, they provide a critical sanity test of our finding and measuring 
410: routines.  They will also serve as excellent finding charts for future 
411: spectroscopic projects.
412: 
413: % ********************************************************
414: % ********************************************************
415: % *****
416: % *****  SECTION 4. OVERVIEW OF THE REDUCTION
417: % *****
418: % ********************************************************
419: % ********************************************************
420: 
421: % S4
422: \section{GENERAL CONSIDERATIONS FOR THE FINDING AND MEASURING PROCEDURE}
423: \label{s.OVERVIEW}
424: 
425: In the previous section, we constructed a calibrated reference frame 
426: for each cluster and found the photometric and astrometric transformation 
427: from each exposure into this frame.  These transformations allowed us 
428: to construct a composite stacked image for each cluster.  The next step 
429: was to construct a composite list of stars for each cluster.
430: 
431: Our strategy for finding and measuring stars had to be tailored to the 
432: scientific goals of the project and to the specifics of the detector and 
433: fields.  In this section, we discuss some of the issues involved in 
434: constructing a catalog of stars from moderately undersampled images of 
435: globular clusters, where the stellar density can vary by orders of 
436: magnitude, and where there are both bright giants and faint main-sequence 
437: stars together in the same field.  In this section, we provide an overview 
438: of the reduction; the details will be given in Section \ref{s.KSYNC}.  
439: 
440: \subsection{The goals of the survey}
441: \label{ss.GOALS}
442: %
443: There are many different scientific objectives for this data set:  
444: luminosity-function analysis, isochrone fitting, binary studies, etc.  
445: Many of these different applications would benefit from different sampling 
446: strategies.  For instance, luminosity-function (LF) studies do not require 
447: precise photometry to sift stars into 0.5-magnitude-wide bins, but LF 
448: studies {\it do} depend on high completenesses and reliable completeness 
449: corrections.  On the other hand, when fitting isochrones to CMDs, we do 
450: not need a particularly complete sample of stars, but we do need a sample 
451: with the smallest possible photometric errors.  In order to satisfy these 
452: competing requirements, we pursued a two-pronged strategy. Our primary goal was 
453: to identify as many stars as possible, so that no future searches would be 
454: necessary on these images.  At the same time we sought to document which 
455: stars were more likely to be better measured.  This way, each application can 
456: cull from the catalog the sample of stars that is best suited for the 
457: analysis at hand.
458: 
459: 
460: \subsection{The need for automation}
461: \label{ss.AUTOMATION}
462: %
463: While we wanted our catalogs to be as comprehensive as possible, because 
464: of crowding and signal-to-noise limitations we could not hope to identify
465: every star in every cluster field.  The best we could hope for was to find 
466: all the stars that could be found by a careful human.  
467: There are hundreds of thousands of stars in many of these fields, so 
468: finding stars by hand was not very practical.  Add to this the need 
469: to run artificial-star tests and it was clear that we had to come up 
470: with a completely automated finding and measuring procedure.  This 
471: procedure had to:  
472: (1) be optimized for the WFC detector and globular-cluster fields, 
473: (2) find almost everything that a person would find, 
474: (3) misidentify a minimum of artifacts as stars, and 
475: (4) measure each star as accurately as possible.  Below we discuss our
476: general approach to dealing with these issues.  In the next section, we
477: will deal with the specifics.
478: 
479: % S4.1
480: \subsection{Finding stars in undersampled images}
481: \label{ss.finding_undersam}
482: %
483: In well-sampled images, it can be useful to convolve the image with a PSF 
484: in order to highlight the signal from the point sources over the random 
485: pixel-to-pixel noise.  In undersampled images, however, much of the flux 
486: of a point source is concentrated in its central pixel.  This undersampling 
487: makes it counterproductive to convolve the image before finding, because 
488: the stars already stand out as starkly as they can in the raw frames 
489: (or in frames in which the brighter stars have been subtracted out).  
490: An additional complication of undersampling 
491: is that it is often difficult to determine from a single undersampled 
492: image whether or not a given detection is stellar, so we need some
493: independent way to establish which detections are really stars.  
494: 
495: The best way to find stars in undersampled images, then, is to take 
496: a set of dithered exposures and look for significant local maxima 
497: (or ``peaks'') that occur in the same place in the field in several 
498: independent exposures.  The dithering is critical because it allows 
499: us to differentiate real sources from warm pixels or cosmic rays.  
500: 
501: 
502: % S4.2
503: \subsection{Iterative finding}
504: \label{ss.finding_human}
505: %
506: The stars used in \S\ \ref{ss.ref_frame} to relate the individual exposures 
507: to the reference frame were found with a single pass through each image.
508: The finding routine found only stars that had no brighter neighbors 
509: within four pixels.  Such an algorithm finds almost all of the bright
510: stars in a field, but it misses many of the obvious faint stars in the 
511: wings of the bright ones.  If after finding the bright stars, we were then 
512: to subtract them out and search for more stars in the subtracted images, 
513: we could both find more faint stars and at the same time improve the 
514: photometry for the brighter stars (by subtracting the fainter stars before
515: our final measurement of the brighter ones).
516: 
517: There are two ways to perform such an iterative search.  The first approach 
518: is to make multiple passes through the entire field.  This has the advantage 
519: that it treats the field as a contiguous unit, but it is extremely memory 
520: intensive and requires maintaining many large, intermediate images (the raw 
521: images, subtracted images, model images, etc). 
522: 
523: An alternative strategy is to reduce one patch of the field at a time, doing 
524: multiple passes on that patch before moving on to the next patch.   Such a
525: patch must be larger than the distance over which stars can influence 
526: each other, but it can be small enough to allow the transformations 
527: to be linear and to treat the PSFs as spatially constant within the patch.  
528: The patch approach also has an advantage for doing artificial-star (AS)
529: tests.  When reducing the entire field as a unit, AS tests must be done 
530: in parallel.  To ensure that artificial-stars will not affect the crowding 
531: they are intended to measure, we can add at most one test star 
532: every 20$\times$20 pixels and are thus limited to about $\sim$40,000 stars 
533: per run.  On the other hand, with a patch-based approach we can do 
534: AS tests in series, one after another, with no worry of them ever 
535: interfering with each other.  This allows the number of tests per run 
536: to be limited only by computing time.  For all these reasons, we 
537: chose to reduce each field using a mosaic of local patches.
538: The details of this will be fleshed out in \S~\ref{ss.patch}.
539: 
540: % S4.3
541: \subsection{Avoiding artifacts}
542: \label{ss.avoiding_artifacts}
543: %
544: One of the complications of studying globular clusters is that there are 
545: almost always very bright stars and very faint stars in the same field,
546: and we want to study them both.  The bright stars affect the faint stars
547: in two ways.  First, they dominate the region closest to them, making it 
548: hard to find faint stars that are too close.  But the extremely bright 
549: stars also affect an even larger region around them because of the mottled 
550: wings of the PSF, which are very hard to model accurately.
551: 
552: 
553: To ensure that false detections, such as PSF artifacts or residuals from 
554: imperfect subtraction of bright stars, would not enter into our sample, we 
555: ended up insisting that any new stellar detection must stand above a 
556: conservative estimate of the error in the subtraction of the previously 
557: identified brighter stars.  In practice, this means that there is a limit 
558: to how close to a brighter star a given fainter star can be reliably 
559: found.  We determined that while such a requirement does exclude a small number 
560: of stars that could have marginally been found by hand, it does an 
561: excellent job of excluding non-stellar artifacts from the sample
562: (see Fig.~\ref{fig03} and \S~\ref{ss.setting_up}).  The region of 
563: exclusion as a function of brightness can easily be quantified by 
564: artificial-star tests.
565: 
566: \begin{figure}
567: \plotone{fig03.eps}
568: \caption{The stars found in a 120$\times$160-pixel region of NGC~6715 in
569:          the vicinity of a bright star.  The left panel shows the scene 
570:          without any stars indicated.  The middle panel shows all the 
571:          ``stars'' that would be found if we did not consider the influence 
572:          of the bright star.  The right panel shows the stars that were 
573:          found to be bright enough to be distinct from the profile of the
574:          bright star (see \S\ \ref{ss.setting_up}).  The different colors 
575:          and sizes of the circles correspond to the different passes through 
576:          the data.  The large yellow circles are stars that were found in 
577:          the first pass. These stars are saturated in the deep exposures.  
578:          The red symbols were found in the first deep-exposure pass, with 
579:          the increasingly smaller green, cyan, and magenta symbols indicating 
580:          stars found in subsequent passes.  
581:          \label{fig03}} 
582: \end{figure}
583: 
584: % S4.4
585: \subsection{Measuring stars in undersampled images}
586: \label{ss.measuring_undersam}
587: %
588: Once stars were found, we had to measure fluxes and positions for them,
589: and our measuring algorithms also had to be tailored to the particulars 
590: of the detector and fields.  Most of the signal from stars in undersampled 
591: images is concentrated in the stars' central few pixels, so our fits 
592: clearly had to focus on those pixels.
593: 
594: There are two ways to measure stars in multiple exposures.  We can 
595: either measure each star independently in each exposure and later combine
596: these observations, or we can fit for a single flux and position for each 
597: star simultaneously to all the pixels in all the exposures.  The first 
598: approach is generally better for bright stars, where each exposure presents 
599: a well-posed problem with an obvious stellar profile to fit.  The latter 
600: approach is better for very faint stars, which cannot always be 
601: robustly found and measured in every individual exposure.  In our 
602: procedures, we ended up computing the flux for each star both ways.  
603: The vast majority of stars we found were bright enough to be measured 
604: well using the first approach, so our basic catalog reports just the 
605: independently fitted fluxes.  We did, however, save the simultaneous-fitted 
606: fluxes in auxiliary files.
607: 
608: It is worth noting that although our aim was to construct a uniform sample, 
609: it was not possible to measure all stars with the same quality.  Some stars 
610: were bright and isolated and could be measured with a large, generous 
611: fitting radius.  Other stars were crowded or faint, and only 
612: their core pixels could be fitted.  In a sense, each star presented a special 
613: circumstance, and our general measuring algorithm had to be able to adapt 
614: as much as possible to minimize the most relevant errors for each star.  
615: The PSF provided the unifying measuring stick that enabled us to evaluate 
616: a consistent flux for all the stars, even though the fit to different stars 
617: sometimes had to focus on different pixels.
618: 
619: \subsection{Summary of the considerations}
620: \label{ss.consid_summy}
621: %
622: In summary, our finding and measuring strategy had to take into account 
623: the nature of the data set and the goals of the survey.  We clearly needed
624: an automated procedure that could find stars simultaneously in multiple
625: dithered exposures.  The procedure would have to be able to use multiple 
626: iterative passes to identify faint stars in the midst of brighter ones, 
627: and it would also have to be robust against inclusion of PSF artifacts or 
628: subtraction residuals as stars.  Finally, we needed to come up with a way 
629: to measure a flux and position for each star, taking into consideration 
630: its particular local environment.
631: 
632: 
633: % ********************************************************
634: % ********************************************************
635: % *****
636: % *****  SECTION 5. THE REDUCTION PROGRAM
637: % *****
638: % ********************************************************
639: % ********************************************************
640: 
641: % S5
642: \section{THE REDUCTION PROGRAM}
643: \label{s.KSYNC}
644: %
645: We designed a sophisticated computer program ({\tt multi\_phot\_WFC}) 
646: that could deal with all of the above requirements in a generalized way, 
647: so that the same program could be used to reduce the data for every 
648: cluster in the sample, no matter how much crowding or saturation the 
649: cluster might suffer at its center.  The program takes as input the 
650: 10 to 12 raw {\tt flt} images in each cluster's data set and the 
651: background information about how each exposure is related to the 
652: reference frame.  It then analyzes the images simultaneously and 
653: outputs a list of stars that it found, including a position, $V$ and $I$ 
654: photometry, and some data-quality parameters for each star.  It 
655: was set up to run in two different modes: finding real stars and 
656: running artificial-star (AS) tests.  In this section we describe the 
657: mechanics of the real-star search.  In \S\ \ref{s.ASTEST} we discuss 
658: the AS operation, which differs only in the set-up and the output stages. 
659: 
660: 
661: % S5.1
662: \subsection{The patch}
663: \label{ss.patch}
664: %
665: We chose to reduce each cluster field one patch at a time, both to
666: conserve memory and to facilitate artificial-star tests.  The size of
667: the patch was a compromise between the desire to cover as much field as
668: possible in each patch in the real-star runs without covering too much
669: unnecessary field in the artificial-star runs.  We thus arrived at a
670: patch size of 25$\times$25 pixels.  Since stars at the edge of a patch
671: often have significant neighbors outside of the patch, each patch
672: allowed us to fully treat only its central 11$\times$11-pixel region.
673: We centered a patch every 10$\times$10 pixels, so the entire
674: 6000$\times$6000-pixel reference frame for each cluster was covered by an 
675: array of 600$\times$600 patches.
676: 
677: To set up each patch for analysis, we used the transformations from
678: \S\ \ref{ss.ref_frame} to map the location of the central pixel of the patch 
679: into each of the exposures, and extracted a local 25$\times$25-pixel raster from 
680: each exposure.  We constructed a PSF model for each exposure using the 
681: appropriate library PSF for that location on the chip and the perturbation 
682: component found in \S\ \ref{ss.ref_frame}.  
683: 
684: We also determined the linear transformation from the patch frame into
685: the raster for each exposure.  Using these transformations, we
686: intercompared the pixels for the individual $F606W$ and $F814W$ rasters
687: and flagged as bad any pixels that were discordant by more than
688: $5\sigma$ with the other images for that filter.  We inspected a large
689: sample of the resulting rasters and verified that the obvious cosmic
690: rays and warm pixels were identified.  This procedure enabled us to do
691: simultaneous fits to all the exposures without having to check each time
692: for bad pixels.
693: 
694: 
695: % S5.2
696: \subsection{Setting up the bright-star mask}
697: \label{ss.setting_up}
698: 
699: One of the challenges in constructing a catalog from this 
700: data set was to avoid including PSF artifacts as stars.  
701: Stars brighter than an instrumental magnitude of $-12.5$  
702: ($10^5$ $e^-$ total) often have knots and ridges in their 
703: PSFs that can be confused with stars.  These features are 
704: hard to model accurately, and therefore cannot be  
705: subtracted off well.  The best we could do was to 
706: conservatively estimate their contaminating influence 
707: and make sure that the stars we found stood out clearly 
708: above the bright-star halos.
709: 
710: To do this, we identified several bright, isolated stars that
711: were highly saturated in the deep exposures and examined
712: their radial profiles.  Since we had a flux for each bright star
713: from the short exposures, we could examine the radial profile
714: for the star with a scaling matched to the PSF.  Ignoring 
715: for now the diffraction spikes, we looked at the envelope of the
716: trend with radius and drew by eye a curve that encompassed all 
717: of the obvious halo structure.  Since the halo structure is 
718: largely due to scattered light, it should have the same level 
719: in F606W and F814W, though the detailed structure will be 
720: different for the different filters.  
721: Table~\ref{tab02} gives the upper-envelope profile we found
722: in the $f_{\rm any}$ column.
723: 
724: \input{tab02.tex}
725: 
726: To make use of this profile,
727: before we began the finding procedure for each patch, we
728: first identified all the bright stars that might generate 
729: artifacts that could be confused with stars in the patch 
730: by determining which stars in the bright reference list
731: (\S~\ref{ss.ref_frame}) were within 100 pixels of the patch.
732: For each of these nearby bright stars, we used Table~\ref{tab02}
733: to evaluate this upper-limit estimate for each pixel in the 
734: raster for each exposure, based on the radial distance and 
735: total flux of the bright star.  This was recorded in a 
736: separate raster called the ``mask'' raster.  Later, when we 
737: searched for stars, we required that a star stand out above this 
738: level to be considered a possible stellar detection.
739: 
740: The above treatment did not address the diffraction spikes.
741: Without masking them out also, an automated, multi-pass
742: routine would tend to find beads of false stars along the
743: spikes.  The spikes are complicated to deal with since that
744: they emanate from the bright stars at different angles with 
745: respect to the undistorted {\tt flt} pixel grid at different 
746: locations in the field (due to the large distortion in the 
747: WFC camera).  Since the changes in angle were small, the spikes 
748: were still largely directed along $x$ and $y$, at least over 
749: the short distance of a patch.  So when there was an extremely 
750: bright star within 100 pixels directly to the left or right or 
751: directly above or below the current patch, we looked for a linear 
752: ridge in the patch that was directed towards the bright star.  
753: Once the exact location of the spike was identified, we used the 
754: $f_{\rm spike}$ column of Table~\ref{tab02} to mask out the
755: relevant pixels.   The entries in this column were also 
756: constructed by examining the radial profiles of spikes around 
757: bright stars.
758: 
759: 
760: (We note that while the above approach successfully prevented
761: diffraction spikes from being identified as stars, we were
762: dissatisfied with the somewhat imprecise treatment of the spikes.
763: So in the time since the GO-10775 reduction, we have done a more
764: thorough characterization of the spikes' 
765: angles with chip location.  We verified that the spikes
766: are fixed relative to the detector and that their orientation
767: changes linearly with location on the chip such that, for
768: example, the spike along $x$ will be directed at $-4.0^{\circ}$ at the
769: upper-left corner of the 4096$\times$4096 detector, and at $-2.3^{\circ}$
770: at the upper-right corner.  We have now folded this more precise spike 
771: treatment into the reduction routine, so that when it is used on 
772: future data sets, the spike treatment will be more rigorous.
773: We reiterate, though, that the star lists presented here should be 
774: free of spike contamination.)
775: 
776: An additional step in the set-up was to deal with saturated stars.  Our
777: routines were designed to find stars by looking for local maxima in images.  
778: Saturated stars tend to have a plateau of saturated pixels at their 
779: centers, so they cannot be automatically identified as detections by 
780: peak-based algorithms.  So, in a pre-processing stage for each exposure, 
781: we examined each contiguous region of saturation and artificially added 
782: a peak at the center, so that the automated routine would know to find 
783: a star there.  The routine then fit the wings of the PSF to the unsaturated 
784: pixels, allowing us to include the bright stars in the star lists and 
785: luminosity functions.  While this wing-fitting approach is the only 
786: way to measure {\it positions} for saturated stars, we show in 
787: \S~\ref{ss.satphot} that there is a better way to measure accurate fluxes.
788: 
789: Finally, in addition to correcting the centers of saturated stars, we 
790: also made a ``saturation map,'' which showed how many of the deep images 
791: were saturated at each location within the patch.  The saturation could 
792: be either because of direct illumination or because of charge blooming.  
793: The saturation map helped us to know where in the patch we should trust 
794: the short exposures more than the deep ones.
795: 
796: 
797: % S5.3
798: \subsection{Finding stars in the patch}
799: \label{ss.finding_stars}
800: %
801: Once the rasters, transformations, PSFs, and other background information 
802: had been assembled for each patch, we were finally ready to find the stars.  
803: As we mentioned in \S\ \ref{ss.finding_human}, our aim was to construct as 
804: comprehensive a catalog as possible, so we could not afford to find just 
805: the ``easy'' stars, but rather we needed to find all the stars that could 
806: be reliably found.  Thus the finding process would have to involve 
807: multiple iterative passes in which we first found the brightest stars, 
808: subtracted them, then searched for additional stars in the residuals.  
809: The goal during this finding process was not to measure the most accurate 
810: flux and position possible.  At this stage, we simply needed a good basic 
811: idea of where all the stars were in the patch, and roughly how bright they 
812: were, so that when we later made our final measurements, we could measure 
813: each star better by removing a good model for the contribution of its 
814: neighbors.
815: 
816: At the beginning of each finding iteration, we constructed a model 
817: for the raster for each exposure, 
818: using the current list of stars and the appropriate PSF.  We subtracted 
819: this model from the original raster and also subtracted a sky value as 
820: determined from the entire raster.  This was the ``residual'' raster, and 
821: there was one for each exposure.  (The residual rasters for the first 
822: iteration were just the sky-subtracted raw images, since there were not
823: yet any sources to subtract.)
824: 
825: In each iteration, we constructed a map of potential new sources in the
826: patch by going through the residual raster for each exposure, pixel by
827: pixel.  If we found a peak that had: (1) at least 10$\times$ the sky
828: sigma in its brightest 2$\times$2 pixels, (2) no unsubtracted brighter
829: neighbors or saturated or bad pixels within 3.5 pixels, (3) at least
830: 25\% more flux in its brightest 2$\times$2 pixels than the model of the
831: previously found stars predicted, and (4) more flux than the bright-star
832: mask at that point, then we considered it a possible stellar detection.
833: We added a `1' to the new-source map at the appropriate location in the
834: patch.  We also kept track of the particularly high-quality detections
835: (those that had a distinctively PSF shape) in a separate
836: high-quality-source map.  %At the end, the new-source map gave a count of
837: %how many times each putative source had been detected.
838: 
839: Once we had gone through all the exposures, we scanned the new-source
840: map to see where in the patch multiple exposures might have detected the same stars.  For 
841: parts of the field where we had all 10 deep exposures available, a star had 
842: to be detected independently in at least 5 of them to qualify for the list.  
843: At the edges of the field, where we had coverage from only one or two 
844: F606W and F814W exposures, we could not rely on an abundance of
845: coincident detections to validate each star.  Yet we still wanted to find
846: the obvious stars in the outer regions.  So, we allowed for a lower 
847: threshold number of detections but insisted that the detections be 
848: ``high-quality'' (having a good fit to the PSF).  Table~\ref{tab03} gives 
849: the number of detections required as a function of how many images 
850: were available.
851: 
852: \input{tab03.tex}
853: 
854: After identifying a star in the patch, we then measured it by fitting the 
855: PSF to the star simultaneously in all the exposures, solving for four 
856: parameters:  an $x$ and a $y$ position, and a flux in each of F606W and F814W.
857: Identifying a new star next to a previously found star can affect the old 
858: star's flux, so we iterated the fitting process until we converged on a 
859: position and a $V$ and $I$ flux for each of the stars in the current list.
860: These simultaneous-fit positions are not the best way to measure all 
861: stars, but they do give us a robust starting point.  The iteration was 
862: completed when we had converged on flux and position estimates for all 
863: the currently known stars in the patch.
864: 
865: % S5.3.2
866: \subsection{The multiple passes through the patch}
867: \label{sss.multiple_passes}
868: %
869: The above narrative describes what happened each time we passed through
870: the patch looking for new stars.  During the first two passes, we 
871: searched only the short exposures, looking exclusively at the parts of 
872: the patch that were saturated in the deep exposures.   Thanks to the 
873: pre-processing of the saturated regions (see \S~\ref{ss.setting_up}) 
874: the automated procedure was able to identify saturated stars as well 
875: as unsaturated stars.  In the third pass, we looked at parts of the 
876: patch that were saturated in the deep exposures, but which had no 
877: short-exposure coverage (for example, if the patch happened to fall 
878: in the inter-chip gap of the short exposures, see Fig.~\ref{fig01}).
879: This way, we did not miss any of the brightest stars.  Finally, in the 
880: fourth and subsequent passes, we focused on unsaturated stars in the 
881: deep exposures.  We performed up to ten additional passes through the 
882: patch.  Usually, all of the stars were found after very few passes, but 
883: sometimes there were particularly crowded regions that required 
884: up to ten passes.  Once no additional stars were found at the end of 
885: a pass, we moved on to the measurement stage.
886: 
887: Figure~\ref{fig03} shows an example of the stars found in a region of
888: NGC~6715.  In the left panel, we show all the sources that would be found 
889: by our algorithm if we were to find everything that generated a significant 
890: number of peaks, without regard to the bright-star mask.  On the right, 
891: we show how well our bright-star mask rejected the non-stellar artifacts 
892: around bright stars.  The multiple-pass approach typically found two to 
893: three times more stars than the single-pass procedure that was used 
894: to identify the bright isolated stars in \S~\ref{ss.ref_frame}.  
895: 
896: % S5.4
897: \subsection{The measurement stage}
898: \label{ss.measurement}
899: 
900: Once we had a final list of stars, we sought to measure each one as
901: accurately as possible.  The simultaneous-fitting method used above works 
902: best for very faint stars (see \S~\ref{ss.measuring_undersam}), but 
903: the vast majority of stars in our catalog were bright enough to be found 
904: and measured well in the individual exposures.  So, we measured each star 
905: in each of the individual exposures where it could be found, after 
906: first subtracting off its neighbors.  We measured a sky value from 
907: an annulus between 3 and 7 pixels for the fainter stars 
908: and between 4 and 8 pixels for the brighter stars (an estimate of the star's 
909: own contribution is subtracted before the sky is measured).  We then fit 
910: the PSF to the star's central 5$\times$5 pixels, in the manner of AK06.  
911: This worked well for isolated stars, but if the known neighbors contributed 
912: more than 2.5\% of the flux in the 25-pixel aperture, we found it was better 
913: to concentrate the fit on the centermost pixels.  Such a weighted fit is 
914: more susceptible to errors in the PSF, but it is less susceptible to 
915: errors in modeling of the neighbors.
916: 
917: In this way, we obtained between three and five independent estimates for 
918: each star's position and flux in each of the two filters.  From these 
919: multiple estimates we computed an average position and flux and an 
920: empirical estimate of the errors.  We also constructed a few diagnostics 
921: related to the quality of each measurement.  We recorded $o_V$ and $o_I$, 
922: the fraction of flux in the aperture coming from known neighbors, and 
923: $q_V$ and $q_I$, which are derived from the fractional residuals in
924: the fit of the PSF to the pixels.  The first pair of parameters can help 
925: to select a subset of stars that are more isolated from nearby 
926: contaminating neighbors, and hence presumably better measured.  The 
927: second pair can also help to select isolated stars, but this time by 
928: highlighting the stars that are not parts of barely resolved, but not-easily-separable blends.  
929: Section~\ref{s.PHOTO_ERRORS} will illustrate some ways to use these quality 
930: parameters.
931: 
932: % S5.5
933: \subsection{Generating the output catalog}
934: \label{ss.list}
935: %
936: Only the stars in the central region of each patch could be optimally 
937: measured, since stars at the edges could have unaccounted-for neighbors 
938: just outside the patch.  So we added to our final list of sources all 
939: the stars within the central 11$\times$11 pixels of the 25$\times$25-pixel 
940: patch.  We used the transformations from \S~\ref{ss.patch} to convert 
941: the local positions into the reference frame.  To ensure that no star 
942: near the border of the patch would be counted twice, we only added stars 
943: to the final list that were not already in the list.
944: 
945: For each star, the main output file records:\  (1) a position in the 
946: reference frame, (2) an instrumental F606W and F814W magnitude, (3) errors 
947: in the positions and fluxes, (4) the number of images where the star could 
948: have been found, and the number in which it was actually found, (5) an 
949: estimate of the flux in the aperture coming from other stars, (6) an 
950: estimate of the quality of the PSF fit, and (7) the simultaneous-fit 
951: fluxes.  We also record how the star was found: whether (best-case 
952: scenario) it was found unsaturated in the multiple deep exposures, 
953: unsaturated in the short exposure, saturated in the short exposure, or 
954: (the worst-case scenario) it could only be found as saturated in the 
955: deep exposures, because it fell in the gap of the short exposure. 
956: 
957: Note that for each star we kept track of both the average fluxes from the 
958: individual-exposure measurements and the fluxes obtained from the 
959: simultaneous fitting to all exposures at once.  Since the vast majority of 
960: stars were bright enough to be measured well in each individual exposure, 
961: in the main catalog we report only the average fluxes.  But we do
962: record the simultaneous-fit fluxes in auxiliary files.  In addition, we
963: also preserve in auxiliary files the photometry from the individual 
964: exposures so that variable stars can be identified and studied.
965: 
966: 
967: 
968: % ********************************************************
969: % ********************************************************
970: % *****
971: % *****  SECTION 6. ARTIFICIAL STAR TESTS
972: % *****
973: % ********************************************************
974: % ********************************************************
975: 
976: % S6
977: \section{ARTIFICIAL-STAR TESTS}
978: \label{s.ASTEST}
979: 
980: The patch-based approach made it very easy to perform artificial-star tests.
981: The standard way of performing AS tests is to do them {\it in parallel}:  
982: several sets of images are doped with an array of artificial stars, which 
983: are far enough apart not to interfere with each other; the images are then 
984: reduced blindly and the output lists are matched against the input lists, 
985: to see which stars were found.  The patch-based approach allows us to do 
986: AS tests {\it in serial}, one artificial star at a time.  This allows us 
987: to do the whole set of AS tests in completely automatic fashion, and requires 
988: no auxiliary image files.
989: 
990: 
991: % S6.1
992: \subsection{One artificial star at a time}
993: \label{ss.one_at_a_time}
994: %
995: An artificial-star test asks the question: If a star of a particular
996: magnitude and color is added at a particular location in the field, will
997: it be found, and if so, what will its measured magnitude and color be?
998: To answer this question, we simply define a patch that is centered at
999: the target location (as in \S\ \ref{ss.patch}) and then add the star, 
1000: with the appropriate scaling, PSF, and noise, into the raster for each 
1001: exposure.  The patch is then reduced in a completely automatic way using 
1002: the procedures described in the preceding section; this generates a list 
1003: of all sources that were found and measured.  The AS routine then reports 
1004: the star that was found closest to the inserted position.  Once this has 
1005: been completed, the procedure can be repeated for the next artificial star.
1006: These artificial stars can never interfere with each other, because each 
1007: one is added only to the rasters, which are temporary copies of the exposures.
1008: 
1009: Each artificial-star test thus consists of a set of input parameters  
1010: ({\tt x\_in}, {\tt y\_in}, {\tt mv\_in}, and {\tt mi\_in}), and the same 
1011: output parameters as in \S~\ref{ss.list} for the nearest found star.  The 
1012: end user will later have to determine whether the recovered star corresponds 
1013: to the inserted star.  Typically, if the input and output positions agree to 
1014: within 0.5 pixel and the fluxes agree to within 0.75 magnitude, then the 
1015: star can be considered found.  If the star was recovered much brighter, 
1016: then that means it was inserted on top of a brighter star and was not found 
1017: as itself.  Also, if it was recovered more than 0.5 pixel away, then it is 
1018: likely that the star itself was not found, but a brighter nearby neighbor 
1019: was.  It is of course equally necessary to deal with such issues 
1020: in the ``parallel'' way of doing AS tests.
1021: 
1022: % S6.2
1023: \subsection{The standard run of tests}
1024: \label{ss.standard_run}
1025: We generated a standard set of artificial-star tests for each cluster 
1026: in order to probe our finding efficiency and measurement quality from 
1027: the center to the edge of
1028: the field.  We inserted the artificial stars with a flat luminosity 
1029: function in F606W, with instrumental magnitudes from 
1030: $-5$ ($10^2\, e^- {\rm \  total})$, to $-17$, and with colors that 
1031: placed the stars along the fiducial cluster sequence, which followed the 
1032: main sequence up the giant branch.  Stars brighter than about $-13.75$
1033: are saturated in the deep images.  The exposure times for the deep
1034: images for each cluster were chosen so that saturation would occur
1035: above the sub-giant branch (SGB).  In the AS tests, when an added
1036: star pushed a pixel above the saturation limit, we treated that pixel
1037: as saturated in our finding procedure, but we made no attempt to model
1038: how the added charge would bleed up and down the columns.  Thus,
1039: brighter than the SGB, the artificial-star tests should be treated
1040: more qualitatively than quantitatively.  Nonetheless, the qualitative
1041: tests indicate that the completeness is essentially 100\% above the
1042: SGB throughout almost all the clusters.  For the few clusters that 
1043: are crowded and saturated at their centers, more sophisticated 
1044: artificial-star tests may be required, but the fact that our data set 
1045: has only one short exposure in each filter does limit what can be
1046: done when the bright stars are crowded.
1047: 
1048: In order to sample the cluster radii evenly, we inserted the stars with 
1049: a spatial density that was flat within the core, and declined as $r^{-1}$ 
1050: outside of the core.  In this way, we performed the same number of tests 
1051: in each radial bin.  Our standard artificial-star run had about $10^5$ stars 
1052: and will be made available along with the real-star run for each cluster 
1053: when we release the catalog.  
1054: 
1055: 
1056: % S6.3
1057: \subsection{Using the artificial-star tests}
1058: \label{ss.using_astests}
1059: %
1060: The most obvious use of artificial-star tests is to assess completeness.
1061: Figure~\ref{fig04} shows the completeness fractions as a function of
1062: radius for four clusters in our sample.  NGC~2808 has a very crowded core,
1063: and even stars near the turnoff (F606W $\sim\!-13$, in instrumental 
1064: magnitudes) have moderately low completeness in the core.  NGC~5139 
1065: ($\omega$ Cen) has moderate crowding, but a very broad core, and so 
1066: the completeness does not vary much with radius within our field.  
1067: In NGC~5272, the completeness is almost 100\% for the brighter stars in 
1068: the core, but fainter stars are lost there.  Finally, in the sparse 
1069: Palomar 2 the completeness is almost 100\% everywhere for all but the 
1070: very faintest stars.  
1071: 
1072: \begin{figure}
1073: \plotone{fig04.eps}
1074: \caption{The completeness fraction as a function of radius for four clusters.
1075:          The lines show the completeness for bins 1.0 magnitude tall
1076:          centered on {\tt mv} = $-5$ through $-15$.  The faintest bin, 
1077:          at {\tt mv}=$-5$, is shown as a heavy line with filled-triangle 
1078:          symbols.  The middle bin, at {\tt mv}=$-10$, is shown as a heavy 
1079:          line with filled-square symbols.  The brightest bin, at 
1080:          {\tt mv}=$-15$, is shown as a heavy line with filled circles.  
1081:          The cluster main-sequence turn-off is typically at instrumental 
1082:          magnitude $-12.5$.  
1083:          \label{fig04}}
1084: \end{figure}
1085: 
1086: Most symbols in Figure~\ref{fig04} represent about 2000 AS tests,
1087: so they should be accurate to about 2\%.  However, because the field is
1088: square, the outer two bins contain fewer stars and should have
1089: errors of 3\% and 7\%, respectively.  Also, the bottom curve
1090: (for {\tt mv}=$-5$) contains only half as many stars as the others,
1091: since the stars were inserted with a flat LF between $-5$ and $-17$.
1092: Thus, the turndown for the faintest and furthest points in NGC~5139
1093: and Pal 2 can be traced to small-number statistics.
1094: 
1095: Artificial-star tests can also be used to tell us about photometric
1096: biases in the sample.  Some fraction of sources in the field are
1097: superpositions of two stars that happen to lie nearly along the same
1098: line of sight.  Sometimes, if the stars are not too close to one
1099: another, the two can be disentangled by means of our multiple-pass
1100: finding.  Other times, the quality-of-fit parameter can help to identify
1101: blended stars that had a broadened profile, yet were too close to
1102: separate.  Nonetheless, some superpositions are hard to identify and
1103: will masquerade as photometric binaries.  The artificial-star tests can
1104: be used to evaluate directly the contributions from these various
1105: kinds of blends.
1106: 
1107: 
1108: % ********************************************************
1109: % ********************************************************
1110: % *****
1111: % *****  SECTION 7. PHOTOMETRIC ERRORS
1112: % *****
1113: % ********************************************************
1114: % ********************************************************
1115: 
1116: % S7
1117: \section{PHOTOMETRIC ERRORS}
1118: \label{s.PHOTO_ERRORS}
1119: %
1120: In \S~\ref{s.OVERVIEW} we made the point that different scientific
1121: objectives are sensitive to different kinds of photometric errors.
1122: Unfortunately, it is hard to come up with a single number to characterize
1123: the photometric error for each star.  When we combined the
1124: independent measurements for each star in \S~\ref{ss.measurement}, the
1125: agreement among the independent measurements gave us some handle on the
1126: measurement errors ($\sigma_V$ and $\sigma_I$).  However, there are some
1127: systematic errors that cannot be detected in this way.  For instance, a
1128: particular star will be found in the same place relative to the same
1129: neighbors in all the exposures, so any error related to that crowding
1130: will be the same for all measurements, and it will not show up in the
1131: r.m.s.\ deviation, There are two main things that prevented us from
1132: measuring each star as well as the r.m.s.\ errors would imply: the
1133: presence of other stars and errors in the PSF.  In this section, we
1134: discuss ways to identify and mitigate these sources of error.
1135:  
1136: % S7.1
1137: \subsection{Errors related to crowding}
1138: \label{ss.params}
1139: %
1140: The first way the magnitudes of a star can be compromised is by the presence 
1141: of neighbors.  Thanks to our multiple-pass finding approach, we were able 
1142: to find essentially any star that a careful human could find.  This enabled 
1143: us to subtract off a good model of the neighbors of each star before we
1144: measured the star itself.  This certainly improved our photometry, but 
1145: neighbor subtraction can never be done perfectly, and it is invariably 
1146: the case that isolated stars are measured better than stars with near 
1147: neighbors.
1148: 
1149: In the course of computing the four basic parameters for each star (the 
1150: $x$ and $y$ positions and $V$ and $I$ fluxes), we also came up with several 
1151: additional diagnostic parameters that can be used to tell us how well each 
1152: star was measured.  The most useful of these are:  
1153: (1) $\sigma_V$ and $\sigma_I$, the r.m.s.\ deviation of the independent 
1154:     flux measurements made in the different exposures, 
1155: (2) $q_V$ and $q_I$, derived from the absolute value of the residuals of
1156:     the PSF fit for each star (scaled by the flux),
1157: (3) $o_V$ and $o_I$, the amount of flux in the aperture from neighboring 
1158:     stars relative to the star's own flux, and
1159: (4) $n_V$ and $n_I$, the number of images in which the star was found.
1160: 
1161: These additional parameters can be used in two ways.  One way to use
1162: them is on a star-by-star basis.  If there is a particular star of
1163: interest in an unusual place in the CMD, then we can compare its
1164: measurement parameters against those of stars of similar brightness
1165: nearby to see if there may issues that might explain the photometric
1166: peculiarities of the star.  Another way to make use of the additional
1167: parameters is to identify a subset of stars that are more likely to be
1168: better measured.  The left panels of Figure~\ref{fig05} show the trends
1169: for the quality-of-fit and $\sigma$ parameters as a function of
1170: magnitude for NGC~6093.  In each plot there is a locus of well-measured
1171: stars near the bottom, and a more distended distribution of stars with
1172: larger errors.  We drew in discrimination lines by eye to separate the
1173: stars that were clearly poorly measured from those that were close to
1174: the well-measured distribution.  A star had to be above the line in only
1175: one of the four plots to be considered suspect.  The selections we have
1176: made put about half the stars into the well-measured sample and half
1177: into the more suspect sample.  On the right, we show CMDs for the two
1178: samples.  It is clear that many stars that have photometry which places
1179: them off the main sequence in the CMD also have larger internal errors
1180: and/or poorer PSF fits.  This is the case both for stars well off the
1181: sequence and for stars that are just a little off the sequence.  (The
1182: sequence is much broader in the left CMD.)
1183: 
1184: \begin{figure}
1185: \plotone{fig05.eps}
1186: \caption{In the left panels, we show from top to bottom $\sigma_V$, 
1187:          $\sigma_I$, $q_V$, and $q_I$ as a function of instrumental 
1188:          magnitude for
1189:          the stars in NGC~6093.  The lines delineate the well-measured
1190:          stars (those below the lines) from those that are less well 
1191:          measured (above the lines).  The CMD in the middle panel shows 
1192:          those stars that fell above the line in at least one of the four
1193:          plots.  The CMD on the right shows the stars that appear to be well 
1194:          measured according to all the parameters.
1195:          \label{fig05}}
1196: \end{figure}
1197: 
1198: Figure~\ref{fig06} shows the same selection strategy for six different 
1199: clusters, with a variety of central concentrations.  For all the clusters, 
1200: the quality-selection algorithm from the previous figure is able to identify 
1201: stars that are not measured well.  We note that in crowded centers there 
1202: is often a tuft of poorly measured stars at around F606W $\sim -12.5$ 
1203: and F814W $\sim -12.5$ (the diagonal tufts in NGC~6388 and NGC~6441).  
1204: We have visually inspected these stars in the images and found that these 
1205: are stars near the crowded centers of clusters with nearby saturated 
1206: neighbors that have bled into the star's aperture in one of the filters.  
1207: Our modeling of the neighbors was not able to simulate such complicated 
1208: artifacts, therefore a small number of stars suffered unavoidable 
1209: contamination.  Thankfully, these stars can be identified by their large 
1210: photometric errors.
1211:  
1212: \begin{figure}
1213: \plotone{fig06.eps}
1214: \caption{We show the low-quality {\it (left)} and 
1215:          high-quality {\it (right)} samples 
1216:          for six selected clusters.  In NGC~6441 and NGC~6624, we see that 
1217:          the second sequence is not an artifact of the photometry but 
1218:          represents real, well-measured stars---likely a young, foreground 
1219:          population.  
1220:          \label{fig06}}
1221: \end{figure}
1222: 
1223: Despite these clear improvements in the diagrams, the quality parameters 
1224: should not be thought of as a panacea.  Imposing quality cuts on the data 
1225: often implicitly imposes other selections as well.  For instance, stars that 
1226: are more isolated are often better measured, so the quality cuts naturally 
1227: select for stars in the less crowed outskirts of the clusters.  If the 
1228: scientific goal is to study a feature in the CMD that should have no radial 
1229: dependence (such as the turnoff morphology), then this will not affect the 
1230: science.  But if the goal is to study blue stragglers or binaries, 
1231: then any radial correlation between these populations and the quality 
1232: parameters may well produce a biased sample.  An examination of the quality 
1233: parameters as a function of radius could mitigate these selection effects.  
1234: 
1235: % S7.2
1236: \subsection{PSF-related errors}
1237: \label{ss.psf_errors}
1238: 
1239: The other kind of non-random error that can affect our photometry comes from
1240: the PSF itself.  Ideally, we would like to measure each star with a large 
1241: fitting radius or aperture (e.g., $\sim5$ pixels radius), so that our flux 
1242: measurement for each star would have as little sensitivity as possible 
1243: to the details of the PSF model.  Unfortunately, almost all of the stars 
1244: in our fields have neighbors within this radius, and it would be very 
1245: difficult to disentangle the light from overlapping star images over
1246: such a large area.  It was obviously necessary to use a smaller fitting 
1247: region in order to focus on the most relevant pixels for each star.  
1248: Our standard fitting aperture was 5$\times$5 pixels, corresponding to 
1249: a radius of $\sim2.5$ pixels.  When there was crowding, we often had 
1250: to focus even more on the PSF core (see \S~\ref{ss.measurement}).  This 
1251: necessary focus on the central regions of the PSF made us particularly 
1252: vulnerable to any variations in the PSF that affected what fraction of 
1253: light fell within the adopted fitting radius. 
1254:  
1255: To understand how PSF variation may have affected our photometry, it is 
1256: important to consider how the WFC PSF can vary with position or with 
1257: time.  Even if the PSF were perfectly constant over time, it would 
1258: still have a different shape in different places on the detector due both
1259: to distortion and to spatial variations in the chip's charge-diffusion 
1260: properties caused by variations in chip thickness (Krist 2005).  On account
1261: of both of these effects, the fraction of light in the central pixel of 
1262: the F606W PSF varies from 18\% to 22\% from location to location on the 
1263: detector.  If this is not accounted for, then fluxes measured by 
1264: core-fitting can vary by up to 10\% (0.1 magnitude).  On top of this, 
1265: spacecraft breathing can introduce an additional 5\% variation in the PSF 
1266: core intensity.  To deal with these variations, our PSF model had a 
1267: temporally constant component that varied with position, and a spatially 
1268: constant component that accounted for how the PSF in each exposure differed 
1269: from the library PSF.
1270: 
1271: Our two-component PSF model did a good job generating an appropriate 
1272: PSF for each star in each exposure, but the model is not perfect.  
1273: Unfortunately, when the telescope changes focus, the PSF does not change 
1274: in exactly the same way everywhere on the detector, and there are 
1275: residual spatially dependent variations of a few percent in the fraction 
1276: of light in the core.  We considered constructing more elaborate PSF 
1277: models, but there were simply not enough bright, isolated stars in 
1278: these fields to allow us to solve for an array of corrections to the 
1279: library PSF for each exposure.  To improve the PSF this way, we would have had 
1280: to measure the PSF profile out to at least 5 pixels for a large number 
1281: of stars distributed throughout the field.  The centers of most of our 
1282: clusters were simply too crowded to permit us to model the PSF's spatial 
1283: variation empirically.  Thus, there is a limit to how well we can know 
1284: the PSF in each exposure, and this uncertainty naturally impacts our 
1285: ability to measure accurate fluxes for the stars.  It is interesting 
1286: to note that the same crowding that prevents us from using large 
1287: apertures when we measure stars also prevents us from measuring much 
1288: more than the core of the PSF in the centers of clusters.  
1289: This further limits the accuracy of our measurements.  
1290: 
1291: The main effect that unmodelable PSF variations have on our photometry
1292: is to introduce a slight shift in the photometric zero point as a
1293: function of the star's location in the field.  On average this shift is
1294: zero (thanks to the spatially-constant-adjustment part to the PSF), but
1295: the trend with position can be as large as $\pm$0.02 magnitude.  These
1296: small systematic errors will not be important at all for
1297: luminosity-function-type analyses, where stars are counted in wide bins.
1298: But the errors can be important for high-precision analyses of the
1299: intrinsic width of CMD sequences or for studies of turnoff morphology.
1300: In general, the PSF variation affects the F606W and F814W filters
1301: differently, so the most obvious manifestation of this systematic error
1302: is a slight shift in the color of the cluster sequence as a function of
1303: location in the field.  This variation, in fact, is very hard to
1304: distinguish from a variation in reddening with position, which
1305: is certainly present in many of the clusters.
1306: 
1307: In an effort to examine these color residuals, we first modeled the 
1308: main-sequence ridge line (MSRL), as in the left panel of Figure~\ref{fig07} 
1309: by tabulating the observed F606W$-$F814W color as a function of F606W 
1310: magnitude.  We next subtracted from each star's observed color the MSRL 
1311: color appropriate for its F606W magnitude.  This gave us a vertically 
1312: straightened sequence (next panel of Fig.~\ref{fig07}), with a color 
1313: residual for each star.   In the right array of panels in Figure 7, we 
1314: examine the location of the observed sequence relative to the MSRL for 
1315: different places within the field.  We see that in some places the 
1316: cluster sequence systematically lies a little to the red or to the blue 
1317: of the average MSRL.
1318: 
1319: \begin{figure}
1320: \plotone{fig07.eps}
1321: \caption{{\it Left}: CMD for NGC~5272.  {\it Next panel}: CMD
1322:          straightened by MSRL.  {\it Right set of panels}: the
1323:          straightened sequence for an array of locations on the
1324:          detector.
1325:          \label{fig07}}
1326: \end{figure}
1327: 
1328: In Figure~\ref{fig08} we plot these color residuals for four clusters as 
1329: a function of location on the chip.  For the first three, we see 
1330: systematic residuals of $\pm$0.01 magnitude or so.  We know that these 
1331: errors are often related to the PSF because when we have explicitly 
1332: measured bright stars with larger apertures, the systematic trends were 
1333: reduced (even though the spread about the MSRL is often greater, because of 
1334: the stray light that enters a larger aperture).  These systematic errors 
1335: may seem quite small, but from the r.m.s.\ spread of the independent
1336: and artificial-star tests we would expect color errors of less than 
1337: 0.005 magnitude for each well-exposed star, so the systematic trends do 
1338: limit how well we can evaluate the intrinsic width of the sequence for 
1339: each cluster.  
1340: 
1341: \begin{figure}
1342: \plotone{fig08.eps}
1343: \caption{The spatial dependence of the color residuals for four clusters.  
1344:          We divide the 6000$\times$6000 field for each cluster into 
1345:          12 horizontal slices, each 500 pixels tall in $y$ (the center is
1346:          marked on the right).  Within each panel, we show the color residual 
1347:          from the MSRL as a function of $x$ coordinate.  In each of the
1348:          first three panels the dotted lines represent a color
1349:          difference of $\pm0.025$ mag.  In the rightmost panel
1350:          the dashed lines correspond to $\pm0.25$ mag.
1351:          \label{fig08}}
1352: \end{figure}
1353: 
1354: 
1355: The cluster on the right (Pal 2) exhibits color residuals of
1356: $\sim0.20$ mag, more than ten times those for our typical cluster.  
1357: These residuals are due to variable reddening for this low-latitude 
1358: cluster and are largely unrelated to the PSF.  Reddening has a similar 
1359: effect to that of the PSF-related shifts, except that stars affected by reddening
1360: should be shifted along the reddening vector, while PSF-related shifts do 
1361: not necessarily have their $V$ and $I$ shifts correlated.
1362: 
1363: One way to mitigate the color effect is to introduce an array of empirical 
1364: corrections across the field and adjust the color for each star according 
1365: to this table.  This procedure does tend to tighten up the CMD and allows
1366: us to see more structure (see Milone et al.\ 2007 for a study of 
1367: the NGC~1851 CMD), but it is hard to do highly accurate work this 
1368: way. 
1369: 
1370: \clearpage
1371: 
1372: % ********************************************************
1373: % ********************************************************
1374: % *****
1375: % *****  SECTION 8. THE FINAL CATALOG
1376: % *****
1377: % ********************************************************
1378: % ********************************************************
1379: 
1380: % S8
1381: \section{THE FINAL CATALOG}
1382: \label{s.CATALOG}
1383: 
1384: The procedures described thus far have produced instrumental magnitudes,
1385: and positions in an adopted reference frame for each cluster.  For
1386: our final catalog, however, we need to put the magnitudes onto correct
1387: zero points, and give positions in an absolute frame.  In addition,
1388: improvements are needed in the photometry of the saturated stars, and
1389: corrections must be made for the effects of CTE.
1390: 
1391: 
1392: % S8.1
1393: \subsection{Improving the brightest stars}
1394: \label{ss.satphot}
1395: %
1396: In designing this project, we chose the length of the short exposures in
1397: each cluster in such a way that the horizontal branch would be well exposed 
1398: but not saturated.  Even though the brighter RGB stars were also of interest, 
1399: it was not efficient to take more than one short exposure for each cluster.  
1400: The automated finding program discussed in \S\ \ref{s.KSYNC} did find the 
1401: saturated stars, and it measured a flux for each one by fitting the wings of 
1402: the PSF to the unsaturated pixels; but such measurements tend to have 
1403: large errors, both random and systematic.
1404: 
1405: There is a better way of measuring the saturated stars.
1406: Gilliland (2004, G04) has found that when a star saturates in the WFC,
1407: its electrons bleed into other pixels, but the total number of electrons
1408: due to that star is conserved.  If the gain is set to 2, then this
1409: information is preserved in the {\tt flt} image.  We were able to verify
1410: that the procedure recommended in G04 works for our images, by using it
1411: on the stars that are saturated in our long-exposure images, and
1412: comparing the resulting fluxes with the accurate fluxes that we had
1413: measured for those same stars in our short exposures.  The technique
1414: that we used was to measure each star in an aperture of 5-pixel radius
1415: and include in addition the contiguous saturated pixels that had bled
1416: even farther.  We found that the fluxes that we measured in this way
1417: agreed well with those measured from the unsaturated images in the short
1418: exposures.  Thus we felt confident in our use of the G04 technique to
1419: measure the saturated images in the short exposures, and used these
1420: measurements for our final instrumental magnitudes of those stars.
1421: 
1422: Figure~\ref{fig09} shows a comparison between the CMD obtained from
1423: PSF-fitting and the one obtained from the G04 approach.  The
1424: improvement in the upper parts of the CMD is dramatic, both in the
1425: continuity of the sequences and in the photometric spread.  Note that
1426: towards the bottom of the middle plot the photometric errors increase
1427: significantly.  This is because the 5-pixel aperture often includes more
1428: than just the target star, even for these bright giant-branch stars.
1429: PSF-fitting is clearly much better than aperture photometry when stars
1430: are not saturated, since most of our accuracy comes from the few central
1431: pixels, with their high signal-to-noise ratio.  The final photometry uses
1432: the better measurement for each star:  for stars that are unsaturated in
1433: the short exposures, we use the PSF-fit result, but for saturated stars
1434: we substitute the aperture-based result.
1435: 
1436: \begin{figure}
1437: \plotone{fig09.eps}
1438: \caption{{\it (Left)} The upper part of the CMD for NGC~2808 for stars
1439:          measured with the wings of the PSF.  {\it(Center)} The same
1440:          stars, but with the aperture-based approach.  {\it (Right)}
1441:          Combination of the two:\ PSF-fitting for unsaturated stars, and
1442:          the aperture-based approach for the saturated stars.
1443:          Magnitudes are instrumental; saturation sets in at around
1444:          $-13.75$.
1445:          \label{fig09}}
1446: \end{figure}
1447: 
1448: 
1449: We became aware of the G04 approach only after a large number of the
1450: clusters had already been measured.  If we had known of it from the
1451: beginning, we would have incorporated it directly into our procedures
1452: instead of making it a separate post-processing step.
1453: 
1454: \clearpage
1455: 
1456: % S8.2
1457: \subsection{CTE corrections}
1458: \label{ss.cte}
1459: %
1460: The background in many of our short exposures is low enough to raise
1461: concerns about the impact of CTE effects on our photometry.  The
1462: standard corrections for CTE effects are provided for aperture
1463: photometry with several aperture sizes, by Riess \& Mack (2004,
1464: RM04).  Since our photometry comes from PSF fitting to the inner
1465: 5$\times$5 pixels rather than from aperture photometry, it is unclear
1466: which aperture is the most appropriate match to our measurements. In the
1467: light of this ambiguity, we proceeded as follows:
1468: 
1469: We used Eq.\ 2 of RM04,
1470: %
1471: $$
1472:     YCTE = 10^A \times SKY^B \times FLUX^C 
1473:                              \times {y_{\rm readout}\over{2048}} 
1474:                              \times {(MJD - 52333)\over{365}},
1475: $$
1476: %
1477: to estimate the CTE correction for each star, given the local 
1478: sky background, the $y$-position of the star in the {\tt flt} images, 
1479: the Modified Julian Date (MJD) of the observation, and the flux 
1480: of each star as determined from the PSF magnitude.  The quantity 
1481: $y_{\rm readout}$ is the number of $y$ shifts experienced by the pixel;
1482: it is simply $y$ for the bottom chip and 2049-$y$ for the top chip.
1483: 
1484: RM04 provide values of the exponents $A$, $B$, and $C$ for various sizes
1485: of the photometric aperture.  We chose the values for a 5-pixel
1486: aperture, and made those corrections, typically $\sim0.02$ mag, to our
1487: PSF photometry.  We then compared the short- and long-exposure
1488: photometry for the same stars, after both had been CTE corrected.  We
1489: then examined the the magnitude differences between the short- and
1490: long-exposure photometry, and for almost all clusters the mean
1491: difference was zero, with no significant trend as a function of the
1492: input parameters $y$-position, sky background, and stellar flux.  (See
1493: Figure~\ref{fig10} for an example.)  In a few cases there was a
1494: systematic variation as a function of $y$-position; for these clusters
1495: we adopted an aperture size of 7 pixels in the calculation of the CTE
1496: corrections, and that eliminated the trend.
1497: 
1498: \begin{figure}
1499: \plotone{fig10.eps}
1500: \caption{The left panel shows the difference between the instrumental 
1501:          magnitudes on the long-exposure frames and the short exposures, 
1502:          for stars in common, as a function of y-position, before the 
1503:          application of the CTE correction for the F606W observations of
1504:          NGC~6809.  The right panel shows the same stars after the 
1505:          CTE correction has been applied.
1506:          \label{fig10}}
1507: \end{figure}
1508: 
1509: \clearpage
1510: 
1511: % S8.3
1512: \subsection{Photometric calibration}
1513: \label{ss.photo_calib}
1514: 
1515: Thus far we have kept our photometry in instrumental magnitudes, because
1516: of their simple relation to counted electrons.  (As stated in \S\
1517: \ref{ss.ref_frame}, instrumental magnitudes are simply $-2.5\log N$,
1518: where $N$ is the number of counted electrons in the first deep {\tt flt}
1519: image.)  We now need to put our magnitudes on a correct zero point.
1520: 
1521: Unfortunately, our instrumental magnitudes refer to {\tt flt} images,
1522: but the zero point definitions provided by STScI refer to {\tt drz}
1523: images.  We therefore measured a few dozen isolated bright stars in the
1524: the {\tt drz} images, using the procedure detailed in Bedin et al.\,
1525: (2005).  We then used the encircled-energy corrections and the zero
1526: points given by Sirianni et al.\, (2005, S05) to arrive at calibrated
1527: VEGAMAG photometry:
1528: %
1529: $$ 
1530: m_{\rm filter} =
1531:  - 2.5 ~ \log_{10} \frac{I_{\rm e^-}}{exptime}
1532:  + Zp^{\rm filter}
1533:  - \Delta m_{AP_{0.\!\!^{\prime\prime}\!5}-AP_{\infty}}^{\rm filter} 
1534:  - \Delta m_{PSF-AP_{0.\!\!^{\prime\prime}\!5}}^{\rm filter}, 
1535: $$
1536: %
1537: where ``filter'' refers to either F606W or F814W.  The first term 
1538: on the right refers to the PSF-fitting photometry in the {\tt flt} images, 
1539: the second term is the zeropoint (from S05's Table 10), and the third term 
1540: is the correction from the 0\secspt5 aperture to the nominally infinite 
1541: aperture (from S05's Table 5).  The final term must be measured empirically 
1542: as the difference between our PSF-fitting photometry and the 
1543: 0\secspt5-aperture photometry in the {\tt drz} image.  This is 
1544: typically close to zero, since our PSFs have been normalized to have 
1545: unit volume within a radius of 10 {\tt flt} pixels.
1546: 
1547: Figure~\ref{fig11} shows the {\tt flt}$-${\tt drz} term (the fourth
1548: term) for several clusters for which it was easy to measure.  Several of
1549: our clusters were so crowded---even in the outskirts---that we could not
1550: find enough isolated, unsaturated stars to measure an uncontaminated
1551: flux within the 0\secspt5 calibration radius.  Since the offset appears
1552: to be constant (as it should be), we simply adopted the average value
1553: over all the clusters ($-0.02$ magnitude).  We expect the absolute
1554: calibration to be accurate to about 0.01 magnitude for the typical
1555: cluster, but because of focus variations that affect the PSF (see
1556: \S~\ref{ss.psf_errors}), the zero-point errors can approach 0.02
1557: magnitude and can vary with position in the field.
1558: 
1559: \begin{figure}
1560: \plotone{fig11.eps}
1561: \caption{The zero-point difference between the PSF-fitting photometry on
1562:          the {\tt flt} images and the 0\secspt5-aperture on the {\tt
1563:          drz} images, determined empirically for several clusters.  The
1564:          error bars indicate the range of stars measured for that cluster, 
1565:          reflecting both random errors and possible systematic errors with 
1566:          position.  The dashed line shows the $-0.02$ value adopted as the 
1567:          average.  The PSF for the E3 images was observed to be more out of
1568:          focus than for any other cluster.  Also, the E3 field is sparse,
1569:          which makes it hard to improve the PSF model with an accurate
1570:          perturbation PSF.
1571:          \label{fig11}}
1572: \end{figure}
1573: 
1574: \clearpage
1575: 
1576: % S8.4
1577: \subsection{Absolute astrometric frame}
1578: \label{ss.abs_astrom}
1579: 
1580: The reference frame we adopted for each cluster was based on the WCS
1581: information that the reduction pipeline had placed in the header of the
1582: {\tt drz} image.  (See \S\ \ref{ss.ref_frame}.)  We expect the absolute
1583: astrometric zero point for this frame to be accurate only to
1584: 1--2\arcsec, since that is what can be expected from errors of the
1585: absolute positions of HST's guide stars (Koekemoer et al.\, 2005).
1586: 
1587: To get zero points that were more accurate, we downloaded the 2MASS
1588: point-source survey for for the region of each cluster, and found
1589: between 40 and 1500 reference stars that we were able to match up with 
1590: stars in our lists.
1591: 
1592: We then compared our absolute positions against the absolute positions
1593: of the same stars in the 2MASS catalog, and found that the two frames
1594: were typically offset by $\sim$1.5\arcsec .  Figure~\ref{fig12} shows
1595: the distribution of offsets for the ensemble of clusters.  The typical
1596: shift is consistent with the expected astrometric accuracy of HST's
1597: guide-star catalog.  Each measured shift came from averaging many tens of 
1598: stars, each with a typical residual of 0\secspt15.  Thus our final absolute
1599: frame for each cluster should have an absolute accuracy much better than
1600: this.  (The absolute accuracy of 2MASS positions is given as 15 mas in
1601: Skrutskie et al.\, 2006.)  We adjusted the WCS header in each of our
1602: stacked images (which will be included with the catalog), to reflect the
1603: improved absolute frame. 
1604: 
1605: \begin{figure}
1606: \plotone{fig12.eps}
1607: \caption{Offsets between absolute positions constructed from the WCS header 
1608:          of the {\tt drz}-frame and positions given in the 2MASS catalog.  
1609:          Each point represents one cluster.  The dotted circle corresponds 
1610:          to 1\arcsec\, (20 pixels).  Positions in our final catalog have 
1611:          been shifted to agree with the 2MASS zero points.  
1612:          \label{fig12}}
1613: \end{figure}
1614: 
1615: 
1616: The relative positions of stars in our field should be much more
1617: accurate than their absolute zero point (15 mas corresponds to 0.3 pixel).
1618: The non-linear part of the WFC distortion solution is accurate to better
1619: than 0.01 pixel (0.5 mas) in a global sense (see Anderson 2005), which
1620: is about the random accuracy with which we can measure a bright star in
1621: a single exposure.  Recently, it has been discovered that the linear
1622: terms of the distortion solution have been changing slowly over time
1623: (see Anderson 2007).  Since our reference frames were based on the {\tt
1624: drz} images (which had not been corrected for this effect), our final
1625: frames contain an error of about 0.3 pixel in the off-axis linear terms.
1626: Users are therefore cautioned to adopt general 6-parameter linear
1627: transformations when relating our frame to other frames.  If such
1628: transformations are made, our positions should be globally accurate to
1629: 0.01 pixel across the field.
1630: 
1631: 
1632: % S8.5
1633: \subsection{The main catalog}
1634: \label{ss.final_cat}
1635: %
1636: Our entire catalog contains over 6 million stars for 65 clusters, with a
1637: median number of 67,000 stars per cluster.  Our procedures generated a
1638: large amount of information for each star in each cluster, but most
1639: users will need only the high-level data for each star.  So for each
1640: cluster we produced a single file called {\tt NGCXXXX.RDVIQ.cal}, which
1641: has one line for each star found.  The columns give reference-frame
1642: position, calibrated (i.e., zero-pointed) magnitudes, errors, calibrated
1643: RA and Dec, and some general measurement-quality information.  The
1644: column by column description for this file is given in
1645: Table~\ref{tab04}.
1646: 
1647: \input{tab04.tex}
1648: 
1649: In addition, for each cluster we generated several auxiliary files, 
1650: which contain the simultaneous-fit fluxes, the exposure-by-exposure 
1651: photometry, and much more.  Finally, we also put together a similar set 
1652: of files for the artificial-star tests, along with the list of input 
1653: parameters ({\tt x\_in}, {\tt y\_in}, {\tt mv\_in}, and {\tt mi\_in}).
1654: The stacked image in each color will be made available along with the 
1655: catalog for each cluster.
1656: 
1657: 
1658: \clearpage
1659: 
1660: % ********************************************************
1661: % ********************************************************
1662: % *****
1663: % *****  SECTION 9. SUMMARY
1664: % *****
1665: % ********************************************************
1666: % ********************************************************
1667: 
1668: 
1669: % S9
1670: \section{SUMMARY}
1671: \label{s.SUMMARY}
1672: %
1673: The ACS Survey of Globular Clusters is the first truly uniform, deep
1674: survey of the central regions of a large number of Galactic globular
1675: clusters.  The observations for each of the 65 clusters were carefully
1676: planned in order to provide even spatial coverage of  a 3$\times$3-arcminute 
1677: region near the center of each cluster.  To make use of the uniformity 
1678: of the observations, we developed a reduction strategy that would
1679: reduce the data set for each cluster in an automated way, finding as
1680: many stars as possible while at the same time minimizing the inclusion
1681: of false detections.  The stars found were measured as accurately as
1682: possible with the best available PSF models.
1683: 
1684: We adjusted the exposure times for individual clusters in such a way
1685: that the final catalog of stars is largely complete down to
1686: 0.2\,$M_{\odot}$ for the less crowded clusters.  We hope that our nearly
1687: definitive list of stars will make it easier for future researchers to
1688: cross-identify stars in past and future cluster observations.
1689: 
1690: In addition to the catalog of real stars, we also constructed a standard
1691: catalog of artificial-star tests for each cluster that can help assess
1692: any incompleteness or photometric biases in the sample.  We plan to make
1693: this catalog public in the near future with full access to the
1694: photometric and astrometric data for each of the 65 clusters via the
1695: world-wide web.
1696: 
1697: Even a cursory glance at the many CMDs in this survey shows that while 
1698: the clusters all have the same general features, each cluster contains 
1699: a unique population of stars, representative of its particular 
1700: star-formation and dynamical history.  An early version of this catalog 
1701: has already led to several papers, including:\
1702: (1) a study of clusters with no previous HST observations 
1703:     (Sarajedini et al.\ 2007);
1704: (2) the creation of a set of stellar evolutionary tracks matching 
1705:     our photometric system (Dotter {\ al.}\, 2007);
1706: (3) population analysis of the M54/Sgr Color-Magnitude Diagram 
1707:     (Siegel et al.\ 2007); and
1708: (4) discovery of the multiple subgiant branch of NGC~1851 
1709:     (Milone et al.\ 2007).
1710: 
1711: Additional papers are in preparation to study radial profiles, 
1712: relative ages, cluster mass functions and mass segregation, the 
1713: Sagittarius clusters, horizontal-branch morphology, the binary populations 
1714: and their radial gradients, blue stragglers, internal proper motions, and 
1715: dynamical families of clusters.
1716:  
1717: \acknowledgements
1718: 
1719: The Co-I's based in the United States acknowledge the support of STScI
1720: grant GO-10775.  We thank the anonymous referee for thoughtful comments
1721: that helped us make this more accessible to the community.
1722: 
1723: \references
1724: 
1725: \parindent -0.10in
1726: \narrower
1727: 
1728: Anderson, J. \& King, I. R. 2006,  ACS/ISR 2006-01,  
1729:    PSFs, Photometry, and Astrometry for the ACS/WFC
1730: 
1731: Anderson, J. 2007, ACS/ISR 2007-08,
1732:    Variation of the Distortion Solution of the WFC.
1733: 
1734: Armandroff, T. E. 1989, AJ, 97, 375 
1735: 
1736: Bedin, L. R., Cassisi, S., Castelli, F., Piotto, G., Anderson, J., Salaris, M., Momany, Y., \& Pietrinferni, A.  2005, MNRAS, 357, 1038
1737: 
1738: Bedin, L. R., Piotto, G., King, I. R., \& Anderson, J. 2003, AJ, 126, 247 
1739: 
1740: Djorgovski, S., \& Meylan, G. 1993, Structure and Dynamics of Globular
1741:    Clusters (eds.\ S.\ Djorgovski \& G.\ Meylan), ASPCS, vol.\ 50 (San
1742:    Francisco:\ Astron.\ Soc.\ Pacific)
1743: 
1744: Djorgovski, S., \& King, I. R. 1986, ApJ, 305, L61
1745: 
1746: Dotter, A., Chaboyer, B., Jevremovi\`c D., Baron, E., Ferguson, J. W., Sarajedini, A., \& Anderson, J.  2007, AJ, 134, 376
1747: 
1748: Fruchter, A. S., \& Hook, R. N. 2002 PASP 114 792
1749: 
1750: Gilliland, R. 2004, ACS/ISR 2004-01, 
1751:    CCD Gains, Full Well Depths, and Linearity up to and Beyond 
1752:    Saturation
1753: 
1754: Harris, W. E. 1996, AJ, 112, 1487
1755: 
1756: Koekemoer, A. M., McLean, B., McMaster, M., \& Jenkner, H. 2005, ACS/ISR
1757:    2005-06, Demonstration of a Significant Improvement in the
1758:    Astrometric Accuracy of HST Data
1759: 
1760: Lee, Y. -W., Demarque, P., \& Zinn, R. 1994, ApJ, 423, 248
1761: 
1762: Milone, A. P., Villanova, S., Bedin, L. R., Piotto, G., Carraro, G., Anderson, J., King, I. R., \& Zaggia, S.  2006, A\&A, 456, 517
1763: 
1764: Milone, A. P., et al.  2007, ApJ, in press
1765: % 10 authors
1766: 
1767: Piotto. G., et al.  2002, A\&A, 391, 945
1768: % 12 authors
1769: 
1770: Riess, A., \& Mack, J. 2004.  ACS/ISR 2004-06, 
1771:    Time Dependence of ACS CTE Corrections for Photometry and 
1772:    Future Predictions
1773: 
1774: Rosenberg, A., Piotto, G., Saviane, I., \& Aparicio, A. 2000a, A\&AS, 144, 5
1775: 
1776: Rosenberg, A., Aparicio, A., Saviane, I., \& Piotto, G.  2000b, A\&AS, 145, 451
1777: 
1778: Sarajedini, A., et al. 2007, AJ, 133, 1658
1779: % 13 authors
1780: 
1781: Siegel, M. H., et al. 2007 ApJL 667 57
1782: % 14 authors
1783: 
1784: Skrutskie, M. F., et al. 2006, AJ, 131, 1163
1785: % 31 authors
1786: 
1787: Trager, S. C., King, I. R., \& Djorgovski, S.  1995, AJ, 109, 218
1788: 
1789: Zinn, R.  1980, ApJS, 42, 19
1790: 
1791: \clearpage
1792: 
1793: 
1794: 
1795: 
1796: 
1797: \clearpage
1798: 
1799: 
1800: 
1801: 
1802: 
1803: 
1804: 
1805: 
1806: 
1807: 
1808: 
1809: 
1810: 
1811: \end{document}
1812: 
1813: \acknowledgements
1814: 
1815: