# Weak weak lensing: correcting weak shear measurements accurately for PSF anisotropy

## 1 Introduction

Gravitational lensing is one of the most powerful and direct methods for studying the gravitational potentials of massive objects in the universe. An important type of lensing study is ‘weak lensing.’ It is the study of mild systematic distortions of background sources as their light rays are perturbed by gravitational fields on their way to us. Weak lensing has already provided important results in the study of galaxy clusters (e.g., Tyson et al. tvw (1990); Bonnet et al. q2345 (1993); Fahlman et al. fahlman (1994); Squires et al. a2163 (1997); Fischer et al. q0957 (1997); Clowe et al. clowe (1998); Hoekstra et al. hoekstra (1998)), halos of individual galaxies (e.g., Brainerd et al. brainerd (1996)), and large-scale structure (Schneider et al. schneider98 (1998)). As the techniques are becoming better understood, research is progressing to the search for weaker and weaker distortions, which would enable the outer regions of galaxy clusters and galaxy halos, as well as lensing signals from large-scale structure (e.g., Jain & Seljak jain97 (1997); Kaiser kaiser98 (1998)), to be studied.

To be able to detect such very weak signals, it is important to accurately remove the dominant systematic effect affecting weak lensing measurements: anisotropy of, and smearing by, the point-spread function (PSF). In this paper we will first investigate the limits of the most commonly-used technique for weak lensing analysis, devised by Kaiser et al. (ksb (1995), henceforth KSB). We will show that after PSF anisotropy correction, residual effects on the order of 1% shear are difficult to avoid with this method, even for moderately elongated PSF’s. Since the ability to detect percent signals is important for a variety of scientific questions, we have therefore devised a new method which does not have such residuals, but which nevertheless has noise properties comparable to those of the KSB method.

There are several other methods for PSF anisotropy correction in the literature. The Autocorrelation Function method of Van Waerbeke et al. (waerbeke (1997)) is a variant of the KSB method in which not individual galaxy images, but the autocorrelation function of many of them, is analyzed. The Bonnet & Mellier (bm (1995)) method uses a different aperture weighting function from KSB, and treats the PSF convolution as a shear term. Fisher & Tyson (ft97 (1997)) convolve the image with a kernel constructed to make the PSF rounder again. A more sophisticated such kernel has recently been presented by Kaiser (k99 (1999)).

## 2 Limitations of the KSB formalism for PSF anisotropy correction

We first examine the Kaiser et al. (ksb (1995)) method, following our earlier limited investigation in the context of analysis of Hubble Space Telescope images (Hoekstra et al. hoekstra (1998), Appendix D).

### 2.1 The KSB method

The technique of weak (or statistical) lensing involves measuring the systematic, gravitationally induced, distortion of background images behind a gravitational lens. In the weak lensing regime small background images are distorted by a shear $`(\gamma _1,\gamma _2)`$ and a convergence $`\kappa `$, whose combined effect is represented by the mapping

$`\left(\begin{array}{c}x\\ y\end{array}\right)`$ $`\left(\begin{array}{cc}1\kappa \gamma _1& \gamma _2\\ \gamma _2& 1\kappa +\gamma _1\end{array}\right)\left(\begin{array}{c}x\\ y\end{array}\right)`$ (1)   
$`(1\kappa )\left(\begin{array}{cc}1g_1& g_2\\ g_2& 1+g_1\end{array}\right)\left(\begin{array}{c}x\\ y\end{array}\right)`$ (2)   
where $`g_i=\gamma _i/(1\kappa )`$. For simplicity, in what follows we neglect $`\kappa `$ as it is small in the weak lensing regime, and pretend we are deriving the true shear $`\gamma `$ instead of the reduced shear $`g`$. Thus, our results on shape measurements are valid, but their interpretation as a lensing signal may require consideration of the $`(1\kappa )`$ factor. Our analysis makes no assumptions on the smallness of $`g_i`$, though.

Kaiser, Squires and Broadhurst (1995, henceforth KSB) describe a method for recovering $`(\gamma _1,\gamma _2)`$ from images of distant galaxies. Essentially, they derive galaxy ellipticities from weighted second moments of the observed images, and then correct these for the effects of the weight function and of smearing by the point spread function (PSF). By averaging over many galaxies, which are assumed to be intrinsically randomly oriented, the effect of individual galaxy ellipticities should average out, leaving the systematic lensing signal. The KSB method has proved to be very effective, especially in the study of galaxy cluster potentials.

KSB define various “polarizabilities”, which express the ratio between an input distortion (gravitational shear or PSF anisotropy) and the measured polarization

$$e=(\frac{I_{xx}^wI_{yy}^w}{I_{xx}^w+I_{yy}^w},\frac{2I_{xy}^w}{I_{xx}^w+I_{yy}^w})$$
(3)   
of an image $`f(x,y)`$. These polarizations are derived from weighted second moments

$$I_{xx}^w=f(x,y)x^2W(r)𝑑x𝑑y,\text{etc.,}$$
(4)   
of the image intensities, where $`W`$ is a weight function which goes to zero at large radii. The weight function is required as otherwise the sky noise in the outer parts of the image dominates the measured moment. The significance of the measurement is optimized by taking the weight function to be relatively compact, of a size comparable to the image itself.

Details of the method can be found in KSB, and in Hoekstra et al. (1998, henceforth HFKS), where a few small errors in the formulae of KSB were corrected. For the purposes of the present paper, it is sufficient to know that in the KSB formalism, the “smear polarizability” $`P^{\mathrm{sm}}`$ defines the ratio between the PSF anisotropy $`p=(I_{xx}I_{yy},2I_{xy})`$, constructed from the unweighted second moments $`I_{ij}`$ of the (normalized) PSF, and the resulting change in image polarization $`e`$. The “shear polarizability” $`P^{\mathrm{sh}}`$ is the ratio between the applied shear $`(\gamma _1,\gamma _2)`$ and the resulting change in the image polarization. KSB show how the polarizabilities can be derived from higher weighted moments of the observed PSF and galaxy images.

### 2.2 How accurate is KSB?

In the context of ground-based cluster weak lensing, the KSB method works well. Nevertheless, it does involve some approximations. Now that weaker and weaker signals are of interest, it is therefore important to understand the limitations of the method. As already discussed by HFKS, for strongly non-Gaussian PSF’s the KSB method does not completely correct PSF anisotropy. This is particularly true when analyzing small galaxies in deep HST images, where it turns out that the choice of weight function in eq. 4 is important.

A simple PSF model can be used to illustrate why such residuals are, at some level, unavoidable. Consider the following PSF:

$$P(x,y)=G(1+\delta ,1)+G(4\delta ,4),$$
(5)   
where $`G(a^2,b^2)`$ is a unit-area Gaussian of $`x`$\- and $`y`$-dispersions $`a`$ and $`b`$. $`\delta `$ is a small parameter. The case $`\delta =0.3`$ is plotted in Figure 1.

The PSF of equation 5 has exactly zero anisotropy $`p`$: the second moments in $`x`$ and in $`y`$ are equal. However, the ellipticity of the PSF varies with radius, which means that the weighted second moments are not equal: weighting the central parts more will enhance the $`x`$-moment preferentially. In fact, it is easy to show that the polarization constructed with weighted moments is $`O(\delta )`$. The precise result for a Gaussian weight function $`W=\mathrm{exp}(\frac{1}{2}r^2/w^2)`$ is

$$e_1=\frac{9w^2\left(7+5w^2+w^4\right)\delta }{2\left(1+w^2\right)\left(4+w^2\right)\left(20+16w^2+5w^4\right)}+\mathrm{O}(\delta ^2).$$
(6)   
The polarization of the $`\delta =0.3`$ PSF plotted in Figure 1 is plotted in Figure 2. It has a value of 0.03 near $`w=2`$, roughly the radius of maximum significance which should be used to minimize photon noise in the polarization measurement.

The KSB polarizabilities are derived assuming that the PSF can be written as the convolution of a compact anisotropic part with an extended circular part (KSB eq. A1). This assumption allows the anisotropy to be characterized in terms of $`p`$ only. However, our example shows that this assumption may be too restrictive: it effectively couples the radial intensity profile of the PSF with its ellipticity profile. For example, a single Gaussian with constant ellipticity can be written as such a convolution, but a sum of two elliptical Gaussian such as the PSF of eq. 5 cannot. The systematic errors that arise are the result of this.

## 3 A new method

Here we present a new method, with which the PSF effects can be corrected for with greater accuracy. The essence of the method is not to work with the moments of the observed images; instead each image is fit directly as a PSF-convolved, sheared circular source of unknown radial profile.

Assume for the moment that we have managed to sum the images of many galaxies into an ‘average galaxy’ image $`\overline{g}(x,y)`$. Analysing a stacked galaxy image is similar to the approach discussed by Lombardi & Bertin (lb (1998)), who average image second moments before corrections are applied. It differs from methods such as KSB or Bonnet & Mellier (bm (1995)) in which galaxies are individually corrected for PSF effects before they are combined to produce a shear estimate.

Intrinsically, $`\overline{g}`$ is circular if the galaxies are randomly oriented, but the image we observe has been distorted first by gravitational lensing shear, then by the atmospheric seeing, and finally by the camera optics. The observed $`\overline{g}`$ is therefore a sheared circular source, convolved with a (known) PSF. We therefore fit $`\overline{g}`$ directly to such a model, with the minimum of further assumptions. This approach addresses the apparent difficulty in the KSB methodology in the case of radially changing ellipticity profiles: a sheared circular source has constant ellipticity at all radii, and so after convolution with the PSF only a subset of “allowed” ellipticity profiles remain.

Assuming that the PSF is known, e.g., from analysis of star images in the field, the model for $`\overline{g}`$ is specified by an unknown radial brightness profile, and by the shear parameters $`(\gamma _1,\gamma _2)`$ that we are interested in. In practice we model the radial profile as the superposition of several Gaussians of different fixed widths, and unknown amplitude. We have found that the following recipe for assigning the basis functions gives good results: (i) determine the best-fit circular Gaussian radii to the observed PSF and galaxy images, $`r_{\mathrm{PSF}}`$ and $`r_{\mathrm{GAL}}`$. (ii) Take $`r=(r_{\mathrm{GAL}}^2r_{\mathrm{PSF}}^2)^{1/2}`$ as an estimate for the intrinsic radius of $`\overline{g}`$. (iii) Use four components to describe the radial profile of $`\overline{g}`$, with Gaussian radii $`(0.5,1,2,4)\times r`$.

The algorithm is laid out in Figure 3. We now describe the results of tests to verify the accuracy of the PSF anisotropy correction, and to investigate how well it fares in the presence of noise in the images.

### 3.1 Simulations in the absence of noise

We tested how well PSF anisotropy can be corrected for by considering the case where there is no gravitational shear, only a range of PSF shapes of varying anisotropy. An accurate analysis should yield zero shear after correction for the PSF. On a large number of model images, described below, we compared the results of the algorithm of Figure 3 with those from the KSB algorithm as described in HFKS (implying in particular that the same weight function is used in the derivation of polarizations and polarizabilities of galaxy and PSF images). The weight function was taken to be the best-fit circular Gaussian to the post-seeing galaxy image.

The algorithm described in this paper directly yields an estimate for the shear. In the comparisons, the KSB galaxy polarization after seeing anisotropy correction was divided by the “pre-seeing shear polarizability” $`P^\gamma `$, for which we use the expression given by Luppino & Kaiser (1997).

#### 3.1.1 Double-Gaussian images and PSF

In most of our simulations, we modeled the round average galaxy images as

$$\overline{g}=G(r_g)+G(k_gr_g)$$
(7)   
where $`G(\sigma )`$ is a unit-integral Gaussian of dispersion $`\sigma `$ (a double-Gaussian PSF was also considered by ???REF???). The parameter $`k_g`$ is unity for a Gaussian profile, and is larger for more radially extended profiles. A reasonable, though admittedly crude, approximation to an exponential profile is given by setting $`k_g=2`$, while $`k_g=3`$ gives a reasonable approximation to a de vaucouleurs profile (Figure 4).

The PSF’s were modeled in a similar way, but with anisotropy. Writing now $`G(a,b)`$ for a Gaussian with $`x`$\- and $`y`$-dispersions $`a`$ and $`b`$, we have

$$PSF=G(r_p,(1ϵ_1)r_p)+G(k_pr_p,(1ϵ_2)k_pr_p).$$
(8)   
Again we introduced a shape parameter $`k_p`$, but we also included ellipticities $`ϵ_i`$ for the two components. We considered three kinds of PSF ellipticity profile: we either set $`ϵ_1=ϵ_2`$ (constant ellipticity with radius), or set one of the $`ϵ`$’s to zero, to give a radial increase or decrease of the PSF anisotropy. These three possibilities, though by no means exhaustive, form a representative set of PSF’s.

The advantage of the multiple-Gaussian formulation is that the PSF convolution can be done analytically. We thus constructed a large number of PSF-smeared galaxy images, calculated the polarizations and polarizabilities following HFKS, subtracted the PSF anisotropy correction

$$\delta e=P^{\mathrm{sm}g}(P^{\mathrm{sm}})^1e^{}$$

to the galaxy polarization, and divided the result by Luppino and Kaiser (1997)’s pre-seeing shear polarizability $`P^\gamma `$. We then compared these results with the results of our implementation of the new fitting algorithm of Figure 3.

The results of the simulations are presented in figures 5, 6 and 7. They show that the KSB method can suffer from systematic residuals around the 0.01 shear level once the PSF ellipticity exceeds 0.2 or so, whereas this is not so for the new method developed here. The systematic effects are strongest for small galaxies, for PSF profiles with long tails, and for radially increasing PSF ellipticity. The effect is clearly driven by the PSF shape, not by the galaxy brightness profile.

Notice that in the constant-ellipticity case (Figure 5), with a Gaussian PSF ($`k_{\mathrm{psf}}=1`$) the residuals left by the KSB method are high order in PSF ellipticity, but that for non-Gaussian PSF’s a low-order residual dominates. (We have verified this result analytically using symbolic mathematics.) This is a consequence of the fact that only the single elliptical Gaussian PSF can be written as a convolution of a compact anisotropic function with a round extended one, as assumed in the KSB derivation. It is clearly important to test algorithms not only for single-Gaussian PSF’s!

#### 3.1.2 A WFPC-2 PSF

In order to test whether our results are specific to the double-Gaussian formulation of the PSF, a test was also performed with a model PSF for the WFPC-2 camera on the Hubble Space Telescope. The model was generated with the Tiny TIM software package, provided on-line at STScI by J. Krist. An oversampled PSF was calculated for a position near the corner of CCD#4, and convolved with a Gaussian circular galaxy of FWHM 0.25arcsec. This ‘galaxy’ and the PSF (Figure 8) were then binned to a resolution of half a WFPC-2 pixel to avoid under-resolving the PSF, and analyzed as above. The results are summarized in table 1, and confirm the results obtained from the large number of double-Gaussian simulations described earlier.

### 3.2 Noise properties

#### 3.2.1 Analytic estimate

The error on the estimated shear due to photon noise can be estimated as follows. Let the 1-$`\sigma `$ error on each pixel of $`\overline{g}`$ be $`\sigma `$ (for simplicity we take this to be the same on every pixel, appropriate for background-limited work). Then the fit involves finding the minimum of

$$\chi ^2=\underset{k}{}\left[\overline{g}_k(Pf(𝐱𝚪^2𝐱))_k\right]^2/\sigma ^2$$
(9)   
where $`P(x,y)`$ is the PSF, $`f(r^2)`$ is the intrinsic radial profile of the average galaxy, $``$ denotes convolution, $`𝐱_k`$ is the position of the $`k`$th pixel, and $`𝚪`$ is the distortion matrix of equation 2. If the fit parameters $`\gamma _i`$ are uncorrelated with the radial profile, their inverse variances are given by $`\frac{1}{2}^2\chi ^2/\gamma _i^2`$. For example, at the best fit

$`{\displaystyle \frac{1}{2}}{\displaystyle \frac{^2\chi ^2}{\gamma _1^2}}=`$ $`{\displaystyle \underset{k}{}}\left({\displaystyle \frac{}{\gamma _1}}(Pf(𝐱𝚪^2𝐱))_k\right)^2/\sigma ^2,`$ (10)   
$`=`$ $`{\displaystyle \underset{k}{}}\left(P[4f^{}(r^2)(y^2x^2)]\right)^2/\sigma ^2.`$ (11)   
The right-hand side of equation 11 can be estimated assuming that the PSF and observed average galaxy are Gaussians with dispersions $`r_{\mathrm{PSF}}`$ and $`r_{\mathrm{GAL}}`$ pixels of integral 1 and $`F`$, respectively. Then the 1-$`\sigma `$ error on $`\gamma _1`$ evaluates to

$`\sigma (\gamma _1)=`$ $`\left({\displaystyle \frac{1}{2}}{\displaystyle \frac{^2\chi ^2}{\gamma _1^2}}\right)^{1/2}={\displaystyle \frac{2\pi ^{1/2}r_{\mathrm{GAL}}^3\sigma }{(r_{\mathrm{GAL}}^2r_{\mathrm{PSF}}^2)F}}`$ (12)   
$`=`$ $`{\displaystyle \frac{r_{\mathrm{GAL}}^2}{(r_{\mathrm{GAL}}^2r_{\mathrm{PSF}}^2)}}{\displaystyle \frac{\delta F}{F}},`$ (13)   
where we have used the results that the PSF-fitting error on $`F`$ for a Gaussian source is $`\delta F=2\pi ^{1/2}r_{\mathrm{GAL}}\sigma `$. (The error on $`\gamma _2`$ is the same.) We have verified this formula by means of simulations, similar to those described below. Equation 13 shows the expected increase in noise for small objects, as well as the limit, even for large objects, of

$$\sigma (\gamma _i)\frac{\delta F}{F}.$$
(14)   
#### 3.2.2 Simulations

We have checked the sensitivity to noise in the images by Monte Carlo simulation. Many realizations of random Gaussian noise superimposed on a PSF-smeared, intrinsically round galaxy image were analyzed with both algorithms, and the distributions of the resulting $`(\gamma _1,\gamma _2)`$ estimates compared. Selected results are shown in Table 2. Interestingly, the dispersions in the shears derived with both methods are very similar over a range of galaxy sizes. As we have already seen, the small bias in the results from KSB is present in the simulations with non-circular PSF’s, but not in the method advocated in this paper.

A possible way to avoid the systematic residuals of the KSB method is to increase the radius of the weight function $`W`$ in eq. 4, since the problems arise from the imperfect way in which the polarizabilities represent the effect of $`W`$. However, the primary function of $`W`$ is to control the noise in the images. Doubling the Gaussian radius of $`W`$ does in fact improve the anisotropy correction in the mean, but at the cost of almost doubling the noise on the result (see Table 2).

A by-product of our algorithm is an estimate of the intrinsic radial profile of $`\overline{g}`$. In practice, this estimate appears to be rather sensitive to the noise, especially for small images—not surprising given that this is effectively a deconvolution, albeit a constrained one. Nevertheless, it may be possible to use the information in the best-fit radial profile in several ways. If a suitable prior for the intrinsic radial profile of the average galaxy selected can be formulated (e.g., by combining results over a wide field, or from deeper, higher resolution images), this information might help to refine the best-fit shear solution further. Alternatively, the width of $`\overline{g}`$ might be used to attempt to derive the lensing convergence $`\kappa `$ directly, since in principle it is a direct measure of the magnification of faint galaxies. This possibility is yet to be explored in detail, but is likely to be difficult in practice.

#### 3.2.3 The effect of centroiding errors

The centroid of an image can be determined in different ways, each of them susceptible to errors due to photon noise. The effect of centroiding errors on the summed galaxy image will be a convolution with the distribution of centroid errors. Thus, the PSF needs to be convolved with this distribution before analysis of $`\overline{g}`$, so that the effect of the centroiding error can be compensated.

## 4 Galaxy-by-galaxy application

The method as described so far involves analysing the average galaxy $`\overline{g}`$. Very accurate shear measurements require $`\overline{g}`$ to be the average of a large number of galaxies ($`1000`$ for a 1-$`\sigma `$ shear accuracy of 0.01), otherwise intrinsic ellipticity scatter will dominate. However, constructing such a $`\overline{g}`$ is only possible if the shear and the PSF are constant over a large part of the image. Often this is not the case.

To cope with this limitation, we have therefore experimented with the algorithm in ‘galaxy-by-galaxy’ mode, where the algorithm is applied to individual galaxies and the resulting shear estimates averaged. Mathematically this approach is not perfect, because it involves fitting a constant-ellipticity model to individual galaxies even though this is not necessarily appropriate. Nevertheless it turns out to work better than might have been expected, and better than existing methods.

We tested this approach on various model galaxies, of differing axis ratios. To simulate typical galaxies, we include a round, central ‘bulge’ component, and an outer ‘disk’ of axis ratio between 0.1 and 1. (Simulations with different bulge axis ratios yielded the same results.) These were placed at all orientations, smeared with an elliptical PSF, and analysed with the algorithm described above. The best-fit $`(\gamma _1,\gamma _2)`$ values thus derived for each galaxy are then averaged to give an estimate of the shear.

As may be seen in Figure 9, the algorithm performs very well, essentially correcting all PSF anisotropy signal in the measured shear. By comparison the slightly biased answer returned by the KSB algorithm is apparant as before. Residual systematics of the new method are at the level of a few tenths of a percent.

## 5 Summary

In this paper we have studied possible systematic errors arising from the correction for anisotropic point-spread functions in weak lensing analyses based on the well-known Kaiser et al. (1995) method. While such effects are small, generally below a few percent in the deduced gravitational shear components $`(\gamma _1,\gamma _2)`$, they are at a level that is important for studies such as galaxy-galaxy lensing, lensing by large-scale structure or cluster lensing at large radii. A range of simulations shows that modelling the PSF as a convolution of a compact anisotropic function with a more extended, circular function, which underlies the KSB formulation, is not sufficiently general to describe many PSFs, and leads to these systematic residuals.

We have presented a new algorithm with which to carry out the PSF-correction in a single fitting step, and show with simulated images that the low-level residuals left in the KSB analysis can thus be avoided. The whole image is used in the fitting, so that not just the lowest moments are used to characterize the image shapes. We have also shown that the noise properties of this algorithm compare well with those of KSB. While mathematically the algorithm requires an intrinsically circular source, as may be constructed by stacking many observed galaxy images, in practice nearly unbiased results can also be obtained when the algorithm is used to correct individual galaxy shapes for the PSF. This galaxy-by-galaxy application of the algorithm allows observations with spatially varying PSF and/or shear fields to be handled.

Weak lensing is a unique technique with which to study gravitational potentials at large radii in galaxy clusters, galaxy halos and in the field. The present method holds the promise of allowing a little more information to be extracted from the large volumes of data that will be gathered with the coming generation of wide-field imagers.

###### Acknowledgements.

I would like to thank Peter Schneider, Marijn Franx, Henk Hoekstra and the referee for critical readings of the manuscript and for suggesting several improvements.