  We present and implement a probabilistic (Bayesian) method for producing
catalogs from images of stellar fields. The method is capable of inferring the
number of sources N in the image and can also handle the challenges introduced
by noise, overlapping sources, and an unknown point spread function (PSF). The
luminosity function of the stars can also be inferred even when the precise
luminosity of each star is uncertain, via the use of a hierarchical Bayesian
model. The computational feasibility of the method is demonstrated on two
simulated images with different numbers of stars. We find that our method
successfully recovers the input parameter values along with principled
uncertainties even when the field is crowded. We also compare our results with
those obtained from the SExtractor software. While the two approaches largely
agree about the fluxes of the bright stars, the Bayesian approach provides more
accurate inferences about the faint stars and the number of stars, particularly
in the crowded case.
