Photometry of individual sources requires an initial phase of detection. The detection process can be separated into two phases: (1) preprocessing of the image, and (2) actual detection, yielding a list of discrete sources. Given a distribution of background intensities, the probabilityof intensitydeviations for light sources as a result of the background can be calculated. Setting a maximum ac...