G. Cowan 7 December 2001 Using jet-finding algorithms to find stars ------------------------------------------ The problem of identifying stars observed in a CCD pixel array by means of a computer algorithm is very similar to that of reconstructing jets from high-energy particle collisions by the energy that they deposit in a calorimeter. For jets, several procedures have been developed, such as the cone-based algorithm used in hadron collider experiments (see e.g. J. Huth et al. 1990; M. Seymour, 1997). It should be reasonably straightforward to adapt the cone algorithm to find stars in a CCD array. The algorithm requires two parameters to be specified in advance: a threshold number of counts n0 and a radius R. Translated into CCD terminology, the steps are: 1) Every pixel with contents n above the threshold n0 is considered a `seed', with position (x_seed, y_seed) taken as the centre of the pixel. 2) A provisional "star" is defined by summing all pixels within radius R of the seed. 3) The position of the star is the centre-of-gravity of the pixels within the radius R of the seed, i.e., x_star = sum_{i,j} n_{ij} x_{ij} / sum_{i,j} n_{ij} , y_star = sum_{i,j} n_{ij} y_{ij} / sum_{i,j} n_{ij} , where n_{ij} is the number of counts in pixel (i,j), x_{ij} and y_{ij} are the x and y positions of the centre of pixel (i,j), and the sums run over all pixels within radius R of the seed. 4) The position (x_star, y_star) will not in general be the same as the position of the seed. Redraw the circle of radius R around the new (x_star, y_star) and repeat step 3. Continue until the positions converge to stable values. 5) There is now a list of provisional stars. Some of these are duplicates, which are discarded. 6) Some stars will be overlapping. For every star, compute the fraction of counts shared by other stars. Any star that has more 50% of its counts in common with another is merged with it. The position (x_star, y_star) is recalculated according to the formulae above using the merged set of pixels. 7) Any star that has less than 50% of its counts in common with a brighter star is split from it. Each pixel is counted only as part of the star to which it is nearest. It would be interesting to try this procedure on star clusters or close binaries and to adjust n0 and R to provide the best separation (with some appropriate definition of `best'). For the best possible measurements of stellar positions it may be useful to correct for a small bias that results from use of the weighted averages for x_star and y_star (Akopjanov 1977). The nature of this bias is to pull the estimated coordinates of a star towards the centre of the nearest pixel. This is easy to see if all the energy is deposited into a single pixel; the estimated position is then always in the pixel's exact centre. A Monte Carlo calculation could be carried out to estimate the bias and a correction based on this could then be applied. Similar procedures have been carried out for determining the positions of clusters of energy deposited in the BaBar electromagnetic calorimeter (Anashkin, 1997; Marsiske 1998). ---------------------- References: John Huth et al., TOWARD A STANDARDIZATION OF JET DEFINITIONS, FERMILAB-CONF-90-249-E, Dec 1990. 6pp. Presented at Summer Study on High Energy Physics, Research Directions for the Decade, Snowmass, CO, Jun 25 - Jul 13, 1990. Published in Snowmass Summer Study 1990:134-136. Michael Seymour, JET PHENOMENOLOGY, Proceedings of Les Rencontres de la Valee d'Aoste, Results and Perspectives in Particle Physics, La Thuile, Italy, March 2-8, 1997. G. A. Akopjanov et al., NIM 140 (1977) 441-445. E. Anashkin, SYSTEMATIC SHIFT CORRECTIONS FOR BABAR EMC BARREL, BaBar internal note #400, 6 November 1997. D. Bukin and H. Marsiske, STUDY TO IMPROVE THE SPATIAL RESOLUTION OF PHOTONS IN THE BABAR ELECTROMAGNETIC CALORIMEER BY TUNING THE WEIGHTING METHOD, BaBar internal note #412, 4 March 1998.