Algorithm for locating PSF-like events and computing the centroid in x-ray images

Abstract
The Swift X-ray Telescope (XRT)[1] is designed to make astrometric, spectroscopic, and photometric observations of X-ray emission from Gamma-ray Bursts and their afterglows in the energy band 0.2-10 keV. The XRT has a variety of readout modes which it automatically selects in order to observe objects covering 7 orders of magnitude in flux and to extract the maximum possible science from each one, in response to the flux from the burst diminishing. The primary goal of the XRT is to locate the position of the Gamma-Ray Burst to 1 arcsec and to transmit this position to the UVOT and the ground within 100 seconds of the initial observation of the burst. We describe in detail the use of imaging mode and a centroid algorithm to determine the position of the Gamma-Ray Burst with sub-pixel accuracy.