next previous
Up: Young massive star clusters galaxies


Subsections

4 Tools for synthetic image generation and analysis

  It is a complicated problem to carry out photometry on star clusters located within spiral galaxies, partly because of the strongly varying background, and partly because the clusters are not perfect point sources. The measurements are subject to many potential errors, and it is essential to check the photometry carefully and get a realistic idea of the achievable accuracy. One way to do this is to carry out experiments with artificial objects, which can be added at any desired position in the image and remeasured using the photometric method of choice. In order to give realistic estimates of the photometric errors the artificial objects should, of course, resemble the real objects as closely as possible.

We have developed a number of tools to be used in the analysis of this type of image data. The two most important ones, which will be described below are

In practice these two algorithms (together with some more general image processing functions) are built into one stand-alone programme[*], so that they can share common routines to handle user-definable parameters, read and write FITS images etc.

We have not included a task to generate the PSF itself from an image. This must be done using some other programme, such as the psf and seepsf tasks in DAOPHOT. We refer to the IRAF and DAOPHOT documentation for more details on these topics.

4.1 mksynth

This algorithm generates synthetic images which are as similar to real data as possible, including a "sky background'' with Gaussian photon shot noise. Stars are generated not just by adding a scaled PSF but rather by a process similar to that by which the photons arrive in a real CCD image during an integration. Thus, in contrast to other popular algorithms for adding synthetic stars to an image (such as addstar in DAOPHOT), mksynth generates a complete synthetic image from scratch, including a noisy background if desired. The PSF can be modeled as one of several analytic profiles (see Sect. 4.2), or read from a FITS file.

One of the major forces of the algorithm is that it allows a great flexibility in the generation of synthetic images, through a number of user-definable parameters. The coordinates and magnitudes of the synthetic objects can be read from a file, or generated at random.

Tests have shown that synthetic images generated by mksynth have very realistic noise characteristics, and it is possible to generate synthetic images which resemble real CCD images very closely. mksynth was described and tested more fully (although in a more primitive version) by Larsen (1996).

4.2 ishape

 

  
Table 2: Essential ishape parameters

\begin{tabular}
{ll}\hline
FITRAD = float & Fitting radius (in pixels) \\ CENTER...
 ...? \\ LOGFILE = string & Name of log file (if KEEPLOG=YES) \\ \hline\end{tabular}

ishape can be used to estimate the intrinsic shape parameters of extended objects in a digital image with a known PSF. The algorithm is designed to work in the domain of "slightly'' extended objects which can be modeled as simple analytic functions, i.e. objects with a size roughly equal to or smaller than the PSF. Conventional deconvolution algorithms are not designed for this type of problem. None of the "first-generation'' deconvolution algorithms such as the Maximum Entropy Principle (Burch et al. 1983) and the Richardson-Lucy algorithm (Richardson 1972; Lucy 1974) handled point-like sources well at all. More recent "two-channel algorithms'' (Lucy 1994; Magain et al. 1998) model the image as consisting of a smoothly varying background and a number of $\delta$-functions. The two-channel algorithms seem to work quite well in many cases, being able to separate point sources and obtain deconvolved images of photometric quality, but they are not able to treat objects which are only nearly point-like. Therefore we feel it is worthwhile to spend some space describing our algorithm which handles this specialised, but for our work important, case. We have used ishape to derive intrinsic radii for star clusters in other galaxies, but one could also imagine other areas of work where the algorithm might be useful, for example in the study of distant galaxies which are just barely resolved.

The analytic profiles by which ishape models the sources are:
\begin{eqnarray}
\mbox{GAUSS:} & S(z) = & \exp(-z^2) \\  \mbox{MOFFAT15:} & S(z)...
 ...(z) = & \frac{1}{(1+z^2)} \\  \mbox{DELTA:} & S(z) = & \delta (z).\end{eqnarray} (1)
(2)
(3)
(4)
(5)
(6)
(7)
Here z is given by the equation z2 = a1 x2 + a2 y2 + a3 x y, where the constants a1, a2 and a3 depend on the major axis, ellipticity and orientation of the model, and x and y are the coordinates relative to the centre of the profile.

For the KING models, the concentration parameter[*] c may assume the values 5, 15, 30 and 100. Note that the HUBBLE model is equal to a KING model with infinite concentration parameter. The MOFFAT models are similar to the profiles used by Elson et al. (1987) to fit young LMC clusters, with their $\gamma = 3$ profile corresponding to the MOFFAT15 model and $\gamma = 5$ to the MOFFAT25 model. Elson et al. (1987) found $2.2 < \gamma < 3.2$ for their sample of LMC clusters. Unlike the KING models, the MOFFAT functions never reach a value of 0, but both the MOFFAT15 and MOFFAT25 functions share the desirable property that their volume is finite so that a well-defined effective radius exists. Clearly, the DELTA model is normally of little use, and is mostly used internally by ishape. The code can easily be extended to include other models as long as they can be described as simple analytic functions of the parameter z.

Denoting the observed image of an object I, the PSF with P, the intrinsic shape with S and the convolution of the two $M = P \star S$,the algorithm finds S by minimising the function:  
 \begin{displaymath}
\chi^2 = 
\sum_{i,j}W_{ij}\left[(I_{ij} - 
M_{ij}(x,y,a,b,w_x,w_y,\alpha))/\sigma_{ij}\right]^2\end{displaymath} (8)
x,y is the position of the object, a and b represent the amplitude (brightness) and the background level, and wx, wy and $\alpha$ are the FWHM along the major and minor axes and the position angle. $\sigma_{ij}$ is the statistical uncertainty on the pixel value at the position (i,j), and Wij is a weighting function. The summation (8) is carried out over all the elements (i,j) of the image area considered (typically a rather small section around the object).

The actual implementation of the minimisation of Eq. (8) is somewhat more complicated than just minimising $\chi^2$ as a function of all seven parameters at once, and particular care is taken to evaluate the convolution $M = P \star S$ as few times as possible. Only the parameters wx, wy and $\alpha$ affect the the actual shape of the convolved profile, so one might think of $\chi^2$ as a function of these three parameters only, with the minimisation of the remaining parameters (x,y position, the amplitude a and background b) being carried out implicitly for each choice of wx, wy and $\alpha$. The function $\chi^2(w_x, w_y, \alpha)$ is minimised using the "downhill simplex'' algorithm (Press et al. 1992) which has the advantage of being simple and robust. The initial guesses are partly user-definable, but tests have shown that as long as convergence is reached, the results are insensitive to the initial guesses.

The result of the fit is given as a FWHM along the major axis and an axis ratio and orientation, but the FWHM may easily be converted to an effective radius (containing half the total cluster light) for all profiles except the HUBBLE and LUGGER profiles.

Both in mksynth and ishape, the arrays containing image data are in reality stored internally with a resolution 10 times higher than the actual image resolution. However, when calculating the $\chi^2$ (Eq. (8)) the arrays are rebinned to the original resolution.

The weighting array W is introduced in order to reduce the effect of bad pixels, cosmic ray events, nearby stars etc. The weights W are derived from the input image before the iterations are started by calculating the standard deviation among the pixels located in concentric rings around the centre of the object, and assigning a weight to each pixel which is inversely proportional to its deviation from the mean of the pixels located in the same ring. If the deviation of Iij is smaller than one $\sigma$ then the corresponding weight Wij is set equal to 1, and if the deviation is larger than a user specified parameter (CTRESH) then Wij is set equal to 0, effectively rejecting that pixel. For small distances from the centre of the profile the statistics will become poor and hence all weights are set equal to 1 for distances smaller than a user-specified limit (CLEANRAD). It is clear that this method of assigning weights works best for images where the sources are more or less circularly symmetric - if this is not the case, then the CLEANRAD parameter should be set to a large value so that all pixels are assigned equal weights.

  
\begin{figure}
\begin{tabular}
{cc}

\includegraphics {8625f6a.ps}
&

\includegraphics {8625f6b.ps}
\end{tabular}\end{figure} Figure 6: Residuals from ishape, modeling a star cluster in NGC 5236. Left: The cluster was fitted using a MOFFAT15 model. Right: The cluster was fitted using a DELTA model

Examples of the output produced by ishape are shown in Fig. 6. In the left part of the figure the cluster was modeled as a MOFFAT15 function, and in the right part of the figure the cluster was modeled as a DELTA function. In each set of four images the original cluster I is shown in the lower right corner, the final model convolved by the PSF (M) is seen to the lower left, the fit residuals are given to the upper left, and the weighting array W is shown to the upper right. Note how structures in the background correspond to regions that are assigned a low weight, indicated by dark areas in the weighting array. In a typical situation it would have been adequate to choose a smaller fitting radius (and thereby reduce the computation time), but in this example we have extended the fitting radius to 11 pixels in order to demonstrate how the star near the upper left corner affects the weighting array.

From Fig. 6 we note two things: First, the fit is improved enormously by allowing the model to be extended as opposed to the DELTA model, which corresponds to subtraction of a pure PSF. Hence, the object is clearly recognised as an extended source. Second, considering that the fitting radius in this example is as large as 11 pixels, the residuals resulting from modeling the cluster as an extended source show no other systematic variations than what can be attributed to background variations. In this particular example the FWHM along the major axis of the MOFFAT15 function was found to be 1.67 pixels, and the FWHM of the PSF was 4.1 pixels.

4.3 Tests of ishape

  Before applying ishape to data, it is of interest to know how reliably the elongation and major axis of small objects in a CCD image can be reconstructed.

  
\begin{figure}
\begin{tabular}
{cc}

\includegraphics [width=43mm,clip]{8625f7a.ps}
&

\includegraphics [width=43mm,clip]{8625f7b.ps}
\end{tabular}\end{figure} Figure 7: The images of NGC 5236 used in the tests of ishape. Left: Inner field. Right: Outer field. In this figure only the images with the m=18.7 objects are shown. Note that most of the artificial objects are too compact for their extent to be immediately visible

  
Figure 8: Tests of ishape using synthetic objects added to the NGC 5236 inner field. Input FWHM values in pixels (left) and axis ratios (right) are compared to the values measured by ishape

  
Figure 9: Tests of ishape using synthetic objects added to the NGC 5236 outer field. See Fig. 8 for details


  
Table 3: Median S/N ratios for the data plotted in Figs. 8 and 9

\begin{tabular}
{llll} 
\hline
Mag. & 18.7 & 19.4 & 20.4 \\ Inner field & 142 & 79 & 36 \\ Outer field & 157 & 88 & 40 \\  
\hline\end{tabular}

This was tested by generating a synthetic image with a number of objects with known shape parameters and then remeasuring them using ishape. First, 49 test objects were generated by convolving the PSF measured on a V-band CCD image of the galaxy NGC 5236 with a number of MOFFAT15 models with major axis FWHMs in the range 0-3 pixels and axis ratios between 0 and 1. A synthetic image with all of the 49 test objects was then generated using mksynth, and the synthetic image was finally added to a section of the original image of NGC 5236. This procedure was repeated for synthetic objects of magnitudes 18.7, 19.4 and 20.4 at two positions within NGC 5236 (see Fig. 7). Finally, ishape was run on the test images, and the shape parameters derived by ishape were compared with the input values.

The results are shown in Figs. 8 (inner field) and 9 (outer field). The plots in the left column show the measured FWHM versus the input values, and those in the right column show the measured axis ratio versus the input values. The correlations are more tight for the outer field, implying that the high noise level and stronger background fluctuations in the bright disk near the centre of NGC 5236 limit ishape's ability to reconstruct the shape of the objects. The median S/N ratios for the test objects calculated by ishape are given in Table 3, and as expected the objects in the inner field have somewhat poorer S/N ratios. It is interesting to note that when sufficient signal is present the FWHM is recovered with quite high precision even down to very small values, below FWHM= 0.5 pixels. The FWHM of the PSF itself was 4 pixels, which means that objects with sizes as small as about 10% of that of the PSF can be recognised as extended objects with good confidence.

From Table 3 and Figs. 8 and 9 we estimate that the S/N ratio should be greater than about 50 in order to obtain reasonably accurate shape parameters, although there are probably also many other factors which affect the results, such as the presence of nearby neighbours, crowding in general and the smoothness of the background. The axis ratio is generally somewhat more uncertain than the FWHM, although the scatter would decrease if the more compact objects were excluded from the plot. We will not discuss axis ratios further in this paper, but remark that the elongation might be used as a criterion to look for double clusters.

  
\begin{figure}
\includegraphics [width=8.5cm,clip]{8625f10.ps}\end{figure} Figure 10: The FWHM and effective (half-light) radii derived from three test images by ishape, using a MOFFAT15 profile. The test images were generated using Gauss, King(c=5) and King(c=30) profiles. While there are obvious systematic errors in the measured FWHM values (left column) when applying a wrong model, the effective radii (right column) are in fact reproduced quite well. Sizes are in pixels

In the previous tests we had the advantage of knowing the intrinsic shape of the synthetic clusters in advance. This will usually not be the case in practice, so we should also examine how sensitive the derived cluster sizes are to a particular choice of model. In this study we have used the MOFFAT15 profile to model the clusters because of its similarity to the models that were found to fit young LMC clusters by Elson et al. (1987), but other choices might be as good. In particular, the classical models by King (1962) are known to fit galactic globular clusters very well. We therefore generated another set of synthetic images in the same way as for the previously described ishape tests, but now with Gaussian, King(c=5) and King(c=30) input models. The cluster sizes were then remeasured using ishape and the MOFFAT15 model. The experiment was carried out only for the outer NGC 5236 field, and for one set of images (corresponding to the brightest set used in the previous tests).

The results of this test are shown in Fig. 10 for FWHM (left) and half-light radii (right). Though some systematic model dependencies are evident for the FWHM values, half-light radii are reproduced quite well by the MOFFAT15 model, regardless of the input model. A related result was obtained by Kundu & Whitmore (1998) who found that effective radii derived by fits to a King model were quite insensitive to the adopted concentration parameter. We may thus conclude that the derived effective radii are not very sensitive to the choice of model, and even if the true cluster profiles are closer to King profiles the choice of the MOFFAT15 model will not introduce any large systematic errors.


next previous
Up: Young massive star clusters galaxies

Copyright The European Southern Observatory (ESO)