# Starfinder: a code for crowded stellar fields analysis

## 1. Introduction

If the PSF is constant across the frame, the observed stellar field may be considered a superposition of shifted scaled replicas of the PSF itself, lying on a smooth background originated by faint unresolved stars and other possible sources. Actually the PSF is not always constant: in wide-field AO imaging, for instance, off-axis stars appear blurred and radially elongated with respect to the guide star; this anisoplanatic effect is mainly due to the partial correction of the wavefront tip-tilt. A further complication in the analysis of nearly diffraction-limited images is represented by the detailed structure of the PSF, which is generally difficult to model analytically and may produce false detections. Starfinder (see also Diolaiti et al, 1998) seeks to consider all these aspects.

## 2.  Analysis procedure

### 2.1.  PSF and background determination

If it is not known, the PSF for the analysis must be extracted from the image. In our code the user selects a set of stars, which are cleaned from the most contaminating sources, background-subtracted, centered with sub-pixel accuracy, normalized and superposed with a median operation. The halo of the retrieved PSF is then smoothed, applying a variable box size median filtering technique.

The PSF estimate represents a template to analyze the field stars; sub-pixel positioning is accomplished by interpolating the PSF array, which must be well-sampled. A similar approach has been described in Véran et al. (1998).

To overcome anisoplanatic effects in AO imaging we use an approximation of the local PSF given by the convolution of the reference source, commonly referred to as guide star, with a radially elongated elliptical gaussian. The parameters of this blurring kernel are derived from a polynomial fit. To do this, first a set of stars at various distances from the reference source is selected then the parameters (elongation and width) of the convolving elliptical gaussian, which gives the best match to the observation, are determined for each one . This set of measurements is fitted with a polynomial, which will be used to determine the local PSF for the analysis of each presumed star in the field.

The image background is estimated by interpolating a set of local measurements relative to sub-regions arranged in a regular grid (see Bertin et al, 1996). If the brightest stars in the field can be removed, a very similar estimate may be obtained by the application of a median smoothing technique to the input frame.

### 2.2. Stars detection, astrometry and photometry

The starting point is a list of presumed stars, whose observed intensity in the background-removed image is greater than a prefixed detection threshold. Preliminary smoothing reduces the incidence of noise spikes. The objects are listed by decreasing intensity and analyzed one by one by the following sequence of steps:

1. re-identification after subtraction of the known stars, in order to reject spurious detections due to PSF features of bright sources;
2. cross-correlation with the PSF, as a measure of similarity with the template;
3. astrometric and photometric analysis by local fitting.

Each new accepted star is added to a synthetic stellar field, updated at every step. When all the objects in the list have been analyzed, a final re-fitting is performed to improve their astrometry and photometry; then they are temporarily removed to upgrade the background estimate.

The basic step described above (detection and analysis) may be repeated: a new list of presumed stars is formed after subtracting the previously detected ones and the analysis is started again on the original image. This iteration is very useful to detect stars in crowded groups, down to separations comparable to the Rayleigh limit for the detection of close binaries.

An optional deblending mode is available. All the objects somewhat more extended than the PSF are considered blends. The deblending strategy consists of an iterative search for residuals around the object and subsequent fitting; the iteration stops when no more residual is found or the fit of the last residual was not successful.

## 3.  Applications to high and low Strehl images

The algorithm has been run on a K-band PUEO image of the Galactic Center, as an example of a well-sampled high-Strehl AO observation of a stellar field.

We have evaluated the astrometric and photometric accuracy of the algorithm adding to the image, for each magnitude bin in the retrieved luminosity function (fig.1), a total of 10 % of synthetic stars located at random positions, with the only constraint that the minimum distance of each simulated star from all the previously detected ones must be greater than 1 PSF FWHM (about 4 pixels). The plot of the photometric errors shows accurate and unbiased photometry (see fig.2a,2b).

Our method has also been applied to two well-sampled low-Strehl images of the globular cluster 47 Tuc, observed at the ESO 3.6m telescope with the ADONIS AO system. The PSF FWHM is about 6 pixels.The two frames, that have a large overlap area, have been analyzed with the same procedure. The results (fig. 2 c and d) present a good internal astrometric and photometric accuracy.

## 4.  Conclusions and future developments

Starfinder seems to be able to analyze well-sampled images of very crowded fields observed, for instance, with ground-based AO systems. According to our experience it may be successfully applied also to adequately sampled HST images, like those obtained with dithering strategies. It is reasonably fast (only few minutes on a Pentium II PC for the analysis of the Galactic Center) and a widget interface makes it accessible to users unfamiliar with IDL. In the near future the tools for space-variant analysis will be improved. A further work will give a complete description of the code.

#### Acknowledgments.

Francois Rigaut is acknowledged for kindly providing the PUEO image of the Galactic Center and for supporting the initial development of this method.

## References

Bertin E., Arnouts S. 1996, A&AS, 117, 393

Diolaiti E., Bendinelli O., Bonaccini D., Parmeggiani G., Rigaut F. 1998, in ESO/OSA Topical Meeting on Astronomy with Adaptive Optics, ed. D.Bonaccini (Garching b. Munchen, ESO), p.175

Véran J.-P., Rigaut F. 1998, Proc. SPIE 3353, 426