Shear measurement bias

We present a study of the dependencies of shear bias on simulation (input) and measured (output) parameters, noise, point-spread function anisotropy, pixel size, and the model bias coming from two di ﬀ erent and independent galaxy shape estimators. We used simulated images from G alsim based on the GREAT3 control-space-constant branch, and we measured shear bias from a model-ﬁtting method (GFIT) and a moment-based method (Kaiser-Squires-Broadhurst). We show the bias dependencies found on input and output parameters for both methods, and we identify the main dependencies and causes. Most of the results are consistent between the two estimators, an interesting result given the di ﬀ erences of the methods. We also ﬁnd important dependences on orientation and morphology properties such as ﬂux, size, and ellipticity. We show that noise and pixelization play an important role in the bias dependencies on the output properties and galaxy orientation. We show some examples of model bias that produce a bias dependence on the Sérsic index n as well as a di ﬀ erent shear bias between galaxies consisting of a single Sérsic proﬁle and galaxies with a disc and a bulge. We also see an important coupling between several properties on the bias dependences. Because of this, we need to study several measured properties simultaneously in order to properly understand the nature of shear bias. This paper serves as a ﬁrst step towards a companion paper that describes a machine learning approach to modelling shear bias as a complex function of many observed properties.


Introduction
Weak gravitational lensing is a powerful and promising probe of cosmology for current and upcoming galaxy surveys such as the Hyper Suprime-Cam (HSC; Miyazaki et al. 2006) (Laureijs et al. 2011), and Wide-Field Infrared Survey Telescope (WFIRST; Green et al. 2012).Due to the gravitational potentials of the mass fluctuations between distant galaxies and us, the light is deflected, causing distortions in the images of the galaxies.By studying these distortions we can infer and study the distribution of the total matter (dark and baryonic) in the Universe.However, most of the galaxies are only affected by this effect at a level of a few percent.Because the ellipticity of the image of a galaxy is dominated by its intrinsic ellipticity we cannot measure the shear distortion of individual galaxies, but instead we can study them statistically if we have a sample of galaxies that is large enough so that the intrinsic ellipticities average out.
The quality of weak lensing data in observations depends on the accuracy of the ellipticity and shear estimation from the images.There are several systematics that make this measurement challenging (Bridle et al. 2009).Firstly, images are blurred due to the atmosphere or instrument response and suffer from other effects from the telescope optics.Moreover, the convolution kernel of the image (pointspread function, or PSF) is not necessarily isotropic, varies spatially, and it has to be estimated from either modeling or from the images of the stars from the same field.Secondly, the output images are pixelated.Finally, the pixels can suffer from Poisson noise and other noise contributions.Besides taking into account all these steps, we also need an accurate algorithm to estimate the galaxy ellipticities from the pixelated images.
All these effects can produce a bias on the estimation of the shear that can affect our statistics and cosmological analysis, and hence it is crucial to understand the nature of this bias to be able to either calibrate it or improve our methodology to reduce its impact.Because of this, many studies have focused on the different sources of shear bias and calibration techniques.Usually the shear bias is defined as multiplicative and additive factors that define a linear relation between the true and the measured shear.
One of the most studied sources of bias is the one coming from noise, commonly referred as noise bias (Bridle et al. 2009(Bridle et al. , 2010;;Kitching et al. 2010Kitching et al. , 2012Kitching et al. , 2013;;Refregier et al. 2012;Kacprzak et al. 2012;Melchior & Viola 2012;Taylor & Kitching 2016).Refregier et al. (2012) presented an analytic derivation for the bias of Maximum Likelihood estimators (MLEs) affected by an additive noise.They explore a simplified case where galaxy images are modeled and fitted with a Gaussian with its size as the single free parameter, finding a significant effect even for this simple approximation.Taylor & Kitching (2016) and Hall & Taylor (2017) presented analytic descriptions of the impact of different sources of bias to dark energy measurements, finding noise bias to be the most relevant.They also present an analytic calibration of part of the bias.However, these expressions do not account for the full complexity of real images and their precision is then limited.
Other studies have shown many other potential sources of bias.Some examples are: scale-dependence of bias on different cosmological parameters and redshifts (Huterer et al. 2006;Amara & Réfrégier 2008;Kitching et al. 2015); model bias coming from the assumptions of wrong models of galaxy morphology (Massey et al. 2007b;Voigt & Bridle 2010;Bernstein 2010;Zhang & Komatsu 2011;Kacprzak et al. 2012Kacprzak et al. , 2014;;Mandelbaum et al. 2015); selection bias coming from the fact that different samples of galaxies are differently affected by all these systematics (Kacprzak et al. 2012(Kacprzak et al. , 2014)); limitations of model-fitting methods (Melchior et al. 2010;Voigt & Bridle 2010) and how to improve them (Bernstein 2010); galaxy morphology or size (Mandelbaum et al. 2015;Clampitt et al. 2017); PSF modelling and instrumental effects that cannot be treated as convolutions (Massey et al. 2013); the number of pixels in the PSF and the pixel integration level (Voigt & Bridle 2010); and bulgeto-total flux ratio (Voigt & Bridle 2010).Recently, Hoekstra et al. (2015) and Hoekstra et al. (2017) explored the sensitivity of multiplicative bias to the input parameters of simulated images and inferred the accuracy to which we need to measure the sizes and intrinsic ellipticities of galaxies for Euclid-like surveys.
Finally, different shape estimators can lead to different biases and accuracies of the shear measurements.In order to compare a wide variety of estimators, several image processing challenges have been organized to put together different algorithms to estimate the shape of galaxies in the same set of simulations.The first challenges, known as the Shear Testing Programe, STEP1 (Heymans et al. 2006) and STEP2 (Massey et al. 2007a), showed the complexity of the shear measurement and the important role of shear bias.In order to improve the clarity in these studies, the GREAT08 Challenge (Bridle et al. 2009(Bridle et al. , 2010) ) focused on a simplification of the problem, using a known PSF, simple galaxy models and a constant shear.Later in the GREAT10 Challenge (Kitching et al. 2010(Kitching et al. , 2012(Kitching et al. , 2013) ) the realism was increased to include more complex galaxy morphologies, a varying gravitational shear applied and some telescope systematics.Finally, in the GREAT3 Challenge (Mandelbaum et al. 2015) different shape measurement methods were tested to infer weak lensing shear distortions from different simulated surveys (space-and ground-based), shear variations (constant or cosmologically-varying) and galaxy morphologies (realistic and parametric).They also studied the bias dependencies on truncation due to finite postage stamps, the Sérsic index of the galaxy profiles, the PSF size, ellipticity and defocus and the impact of the estimation and interpolation of the PSF.An encouraging conclusion of the study is that several methods were able to measure shear with systematic errors around the level required by Stage IV galaxy surveys.However, note that GREAT3 had low sensitivity to noise bias due to the limited number of galaxies involved and the high SNR per galaxy.
In this paper we present a complementary study of the bias dependencies found in galaxy image simulations based on GREAT3 for different shape estimators.Our goal is to identify the main dependencies of bias found as a function of all simulation (input) and measured (output) parameters, PSF anisotropy, noise, pixelization, and model bias coming from the use of different shear estimators.In particular, we study the bias dependencies on all input parameters of the simulations and all output parameters obtained from the shear estimators in order to identify the properties to which bias is most sensitive.We also analyze the differences between ellipticity bias, which describe the errors on the estimation of the shape of the images, and shear bias, which defines the errors obtained in the estimation of the shear of a given sample of galaxies.We study the model bias and the method dependence by using two different and independent methods to estimate the shape and shear.One of the methods, gFIT (Gentile et al. 2012;Mandelbaum et al. 2015), is a MLE that measures the galaxy shape from fitting the best parameters from a given model.The second method is the Kaiser et al. (1995) (hereafter KSB) implementation of the public code shapelens (Viola et al. 2011), which estimates the shape of the galaxy from the measurement of the weighted moments of the image.We have also studied the effect of isotropic and realistic PSFs, noise and pixelization by repeating the measurements of the estimators on new realizations of the image simulations where we applied some variations on the pixel size, the noise variance and the use of either an isotropic Gaussian PSF or different realistic and anisotropic PSFs.We do not explore here the dependencies of bias coming from implementation parameters, such as the minimization or initialization parameters, or the choice of different galaxy models.However, given the agreement found between gFIT and KSB on most of the dependencies, we think that the implementation of these methods do not affect significantly the conclusions of this paper.
The paper is organized as follows.In Section 2 we describe the image simulations, the shape estimators used and the methodology to measure the shear and ellipticity bias.In Section 3 we show and discuss the results of the main bias dependencies on input parameters (from the simulated images) and output parameters obtained from both estimators.We end in Section 4 with a summary and discussion of the most important results of the paper.We leave in the appendices other tests where we do not see important differences with respect to the ones presented in Section 3 which is already an interesting result.

Images
We use Galsim (Rowe et al. 2015) to simulate the galaxy images of this analysis.We generate the images from the configuration parameters from the GREAT3 (Mandelbaum et al. 2015) control-space-constant (CSC) branch for most of the study together with the centered corresponding PSFs.With this, we obtain images of 2 × 10 6 galaxies corresponding to the GREAT3 CSC branch and their respective PSFs from which we run our shear estimators.Each of the 200 images contains 100 × 100 stamps of 96 pixels of side with one galaxy in each stamp, giving a total of 10, 000 galaxies per image and a total of 2, 000, 000 galaxies.In order to have an average instrinsic ellipticity of 0 without the need of simulating more images, all galaxies have an 90-degree rotated counterpart.This was already the case for the GREAT3 Challenge.In every measurement of bias presented in this paper we always included the orthogonal pairs of galaxies or we corrected for the non-zero average ellipticity if not, as discussed later.Two types of galaxies are included in the CSC branch.On the one hand, galaxies with a bulge using a single Sérsic profile with a varying index n.On the other hand, galaxies with a bulge defined from a de Vaucouleurs' profile and an exponential disk.In Fig. 1 we show some examples of images of both types of galaxies, with the exponential disk (top two rows) and without the disk (middle two rows).As in the GREAT3 CSC branch, we used 200 different shear values and PSFs, each of them assigned to each image of 10, 000 galaxies.Some examples of PSFs are shown in the bottom rows of Fig. 1.For more details of the parameters and characteristics of the simulations we refer to the GREAT3 Challenge Handbook (Mandelbaum et al. 2014).
In Fig. 2 we show the distribution in ellipticity of the simulated images.The top panel shows the distribution for 1 , while the middle panel shows the distribution for 2 .In the bottom panel we show the different shear values applied to the galaxy images.
Additionally, in order to study effects such as truncation, miscentering or PSF effects, we also generated simulations with small variations with respect to the original ones corresponding to the GREAT3 CSC branch described above.In particular, we generated the following simulated images: -Centered images: we forced all the images to be well centered in the stamps.As the gFIT minimizer used gives the possibility to leave specific galaxy model parameters fixed while fitting, we used this feature to fix the center positions of the galaxies to the correct ones in order to study miscentering.Comparing these simulations with the previous ones we can measure the effects of miscentering on shear and ellipticity bias.-Gaussian PSFs: instead of using the original PSFs from GREAT3 CSC, we used a Gaussian isotropic PSF to generate the images.This allows us to evaluate the impact of the PSF anisotropies on the bias measurements.-Pixel size: we generated the same simulations but using a smaller pixel size, in particular with one half of the side of the ones from GREAT3.This allows us to analyse the impact of pixel size.
-Noise variance: we generated other simulations where we reduced or increased the variance of the Gaussian noise of the images.In particular, we have generated simulations applying a factor of 4 to the noise variance from GREAT3 and also applying a factor of 1/4.We have repeated this also for the images with smaller pixels described above in order to see the correlation between pixel size and noise on the effects of ellipticity and shear bias.

Image processing
We use two different shape estimators to measure shear and ellipticiy.We then compare the different results to see how much our study depends on the estimators used.Below we describe the two estimators used.
2.2.1.gFIT gFIT (Gentile et al. 2012;Mandelbaum et al. 2015) is a maximum-likelihood shape estimator.A forward model fitting algorithm is used to minimize a χ 2 between the simulated patch and a parametric model generated using Galsim.We chose to use the native minimization algorithm provided by gFIT, based on cyclic coordinate descent.
The model chosen (the same used as in Mandelbaum et al. 2015) implements galaxy profiles as to be a weighted sum of an exponential disk and a De Vaucouleurs bulge, with 8 parameters: centroid position, ellipticity, flux, flux ratio, half-light radius for bulge and disk.We run SExtractor (Bertin & Arnouts 1996) to initialize the estimates of centroid.
It is important to note that our simulations are built from either a single Sérsic model or a weighted sum of an exponential and a de Vaucouleurs' profiles with different ellipticity and orientation, contrary to the model used in the fitting.All these factors can result in significant model bias in the estimation of the galaxy shapes.

shapelens
This public C++ library includes several modules to estimate the shape of galaxy images.One of them is presented in Viola et al. (2011) and is based on the Kaiser-Squires-Broadhurst (KSB) method (Kaiser et al. 1995).This method estimates the shape from the surface-brightness moments of the images.To compute this moments, it uses an isotropic weighting function which size depends on the estimation of the galaxy size.Due to the isotropy of the weighting function, this estimation produces a bias that increases with the ellipticity.However, this effect can be corrected by considering the higher order contributions that the weighting function has on the shape measurements, as discussed in Viola et al. (2011).This correction can be directly implemented from shapelens.From all the implementation modes available in shapelens, we implement the one which uses the trace of the first order correction (equation (33) from Viola et al. 2011), since it gives the 0.5 0.0 0.5 0.04 0.02 0.00 0.02 0.04 best results.Throught the paper we will refer to this implementation as KSB.
By construction this estimator does not involve any analytic form for the galaxy shape.However, the pixels analyzed are weighted with an isotropic Gaussian kernel from a preselected family of size, which can also produce a model bias.

Bias measurement
We describe the relation between the observed ellipticities obs from our shape estimators and the true ellipticities (coming from both intrinsic shape int and shear g) as follows: where i = 1, 2, +, × and a i , b i are the additive and multiplicative ellipticity bias parameters and describe the errors produced on the estimation of the shapes of the images with respect to their true shapes.We measure them from a linear fit to the scatter distribution between ( i,int + g i ) and i,obs .The tangential and radial components + and × refer to the alignment with respect to the PSF.In other words, + corresponds to the component aligned with the minor and major axis of the PSF ellipticity, and × corresponds to a rotation of 45 degrees with respect to +.In the left panel of Fig. 3 we show an example using gFIT of this distribution and the linear fit obtained from it.Here we see a multiplicative ellipticity bias of 20% that makes the linear fit inconsistent in the extreme values.This comes from the strong contribution of galaxies with a small ellipticity.As we will discuss in Section 3, galaxies with small ellipticities show a strong bias, and these galaxies, located in the center of this panel, are responsible for the bias we show.
As the mean intrinsic ellipticity of galaxy samples is zero and its shear is constant, we can describe the relation between the mean observed ellipticity and shear: where i = 1, 2, +, × and now c i , m i are the additive and multiplicative shear biases.Shear bias describes the sensitivity of the shape estimators to small distortions with respect to the intrinsic ellipticity.Note that ellipticity and shear bias describe different errors and sensitivities produced in the shape measurements and then their behaviours are not necessarily similar.
We measure these parameters from two steps.First, we measure i,obs and its error σ i,obs for each set of galaxies with the same value of g i .Second, with these measurements we linearly fit g i,obs vs g i using i,obs and weighted by 1/σ i,obs , as estimated in the first step.We calculate σ i,obs by performing jackknife (JK) in 50 balanced subsamples.We check that the errors obtained when using more than 20 subsamples do not depend on the number of subsamples used.We also check that the distribution of the results of the JK subsamples is consistent with a Gaussian distribution and we do not find outliers in these distributions, which suggests that the error estimation used here is describing well enough the scatter in the results.This is illustrated visually in Fig. 3.
Although the approaches of measuring a, b and m, c are different, we find that their output differences are insignificant.Because of this, we can also measure c and m from the same linear fitting method than for a and b.
Depending on the properties used to define our galaxy samples (in particular when using output properties), we find situations where the mean intrinsic ellipticity is not 0.
In these cases, the estimated parameters from these formulas are very sensitive to the residual ellipticities.This can be taken into account using the following estimators for c and m: and then again computing the mean ellipticities over the different values of g i .These formulas are equivalent to equation (2) when i,int = 0.When this is not the case, we use this formula in order to compensate the effects of the residual of g i,int on c and m.
In the right panel of Fig. 3 we show a visual example of the distribution of g 1 and g 1,obs obtained from gFIT and using all the simulated images.In red we show the linear fit to the distribution, giving measurements of c and m which are consistent with the measurement obtained from equation (2) using the measured mean ellipticities and shear.

Results
We have studied the ellipticity and shear bias dependencies on all the input properties available from the image catalogues generated from Galsim (so the grand-truth parameters that describe the galaxies and characteristics of the simulated images) and on all the output parameters obtained from both KSB and gFIT.In table 1 we give a brief description of the studied properties and specify those to which bias is significantly dependent.We have only noticed a few parameters that strongly impact the bias.Moreover, we find that ellipticity bias is sensitive to different properties than shear bias.
In this section we first focus on the properties that strongly impact ellipticity bias, and later we show the properties that affect shear bias the most.We also omit some parameters that give redundant results or conclusions with respect to the measurements shown.For all the properties and bias measurements shown in the paper, the bins applied are defined so that each bin contains the same amount of galaxies.

Ellipticity bias vs shear bias
In this subsection we focus on the properties where the ellipticity bias b shows a significant dependence.We split the results into two figures, Fig. 4, which focuses on input parameters related to the size and shape of the galaxies, and Fig. 5, which focuses on the input parameters related to orientation.
Note that in all the cases shear bias m is very different than ellipticity bias, and the difference is not only coming from the amplitude but also from the shape of the dependencies of bias.These differences illustrate the different concepts behind both biases mentioned in Section 2. A large ellipticity bias does not imply a large shear bias, because even if our estimator does not correctly predict the ellipticity of an image, it could still correctly capture small changes around this ellipticity.We can see that b is generally significantly below 1, with an average value of around 0.75 for the galaxies with bulge and disk.On the other hand, m tends to be much more consistent with 1, having an average value of approximately 0.95.This indicates that, although we do not recover the correct ellipticities of the galaxies when they have a bulge and a disk (so they have a large ellipticity bias), we still detect the shear signal from shear, i.e. we have a low shear bias.
We also note the consistency between the two KSB and gFIT estimators .The agreement indicates that, at least at the precision level of this study and for these image simulations, the bias dependencies that we measure are not dominated by the estimator itself but by effects such as pixelization, truncation, and the sizes and morphologies of the images that might affect both methods in a similar way.

Effect of size, flux and ellipticity
In Fig. 4 we show the multiplicative bias b and m as a function of some input parameters for galaxies with a disk and a bulge.We can see strong dependencies on ellipticity bias, but a weak dependence on shear bias in all the cases.In the top left panel we show that the ellipticity bias decreases with the size of the bulge (defined in the x axis from the half-light radius).Although it is not shown here for redundancy, we see the same dependencies for other properties such as the bulge flux or the disk flux, due to noise and pixelization biases.When we use galaxies with only a bulge we find the same dependence but with a much smaller amplitude.This means that the amplitude of the ellipticity bias shown here is also strongly affected by model bias.
The top right panel shows the bias dependence on the ratio between the disk and bulge fluxes.The ellipticity bias is small for galaxies which have a dominant disk.The largest bias comes from galaxies which have similar fluxes for the disk and the bulge, while galaxies dominated by the bulge have again a smaller bias.In fact, the limit of F d /F b = 0 corresponds to the galaxies with only a bulge, which show an ellipticity bias of around 5%.This result indicates that both methods are better at measuring the ellipticity of the images when one of the components is dominant, but a large bias comes when both components, the disk and the bulge, are significantly affecting the overall image.This effect can be seen as a model bias, since KSB does not contemplate a combination of two different profiles and, although gFIT can assume the presence of a disk and a bulge, the two components are always aligned and with the same ellipticity contrary to simulations.
In the middle panels we show the bias dependencies on the ellipticity parameter q (defined from the minor a and major b axis ratio q = a/b) of the bulge (in the left panel) and of the disk (in the right panel).We see opposite dependencies of the ellipticity bias on these parameters, showing a large bias for elliptical bulges and round disks.This can be explained from the fact that the disk is the component that determines the ellipticities the most, as shown in the top right panel.We obtain a small ellipticity bias for galaxies with elliptical disk, but a large bias for round disks, because elliptical images are easier to measure for our shape estimators, but the measured orientation angle of round images is strongly affected by noise and the degeneracies of the estimation parameters.When disk and bulge have different ellipticities, our ellipticity measurements are better when the bulge is rounder because then the ellipticity of the galaxies is dominated by the disk and our methods are less affected by model bias.However, when the bulge is elliptical both components have a significant role in the ellipticity estimation, and then we have a larger model bias.
To illustrate this, in the bottom panels we show the dependence of b 1 (left) and b 2 (right) on both the disk and the bulge ellipticity q.We represent b 1 and b 2 by the colour code.We see that b is better constrained by the disk ellipticity than by the bulge ellipticity (b varies much more with the disk ellipticity that with the bulge ellipticity).For fixed disk ellipticity the bias is always smaller for rounder bulges because it affects less the model bias.Note that the best cases correspond to elliptical disks with round bulges, and the worst cases correspond to elliptical bulges with round disks.Consistently, we did not find any dependence of ellipticity bias on q for galaxies with only a bulge.Moreover, the amplitude of this bias is consistent with the best cases of the galaxies with disk and bulge.This is because in these situations the ellipticities of the images are strongly constrained by one single component (either the disk or the bulge) and this reduces model bias.

Effects of orientation
In Fig. 5 we show the multiplicative bias b and m as a function of the input orientation parameters for galaxies with and without disk.The top left panel shows the bias dependencies on the bulge orientation angle for galaxies with only a bulge, so this shows the bias as a function of the global orientation angle for these galaxies.The other panels focus on galaxies consisting of a disk and a bulge.The middle panels show the bias as a function of the bulge (left) and disk (right) orientation angle β, and the top right panel shows the bias dependence on the difference between the orientations of the disk and the bulge.First of all, we see that the ellipticity bias does not depend on the orientation angle for the galaxies with a single bulge, and this bias is much smaller than the average ellipticity bias of the galaxies with disk.This is because galaxies with one single component on the flux profile are much easier to interpret by both estimators gFIT and KSB while, as shown before.Galaxies with two significant components (bulge and disk) show a large bias, since they can  mix of ellipticities and orientations that the shape estimators do not contemplate.We discuss this in §3.2.3.The top left panel shows a large shear bias m as a function of the overall galaxy orientation angle, but a small ellipticity bias.This means that, although we recover the shape of the galaxy image at a 5% level independently of the orientation of the image, the estimation of the shear is very sensitive to it.This is a good example of how good estimations of the ellipticity can still produce a large shear bias.We leave the discussion of shear bias for §3.2, but note that the dependence of this panel is very similar to the middle right panel, where the bias is shown as a function of the disk orientation angle for galaxies with disk.This is expected, since the orientation of the disk is the property that constrains the most the overall orientation of the galaxies with disk.
The top right panel shows an ellipticity bias b of up to ∼ 50% when the disk and the bulge are not aligned.This is expected, since both shape estimators assume a global orientation of the image, without the possibility of having a bulge and a disk that are differently oriented.We see that the strongest biases come when disk and bulge are perpendicular between them and the smallest biases come when they are aligned, as expected.
The middle panels show both ellipticity and shear bias to be strongly dependent on the bulge (left panel) and the disk (right panel) orientation angles of galaxies (for galaxies with disk).As for the ellipticity parameter q, here we see opposite dependencies of ellipticity bias on the orientation angle of the disk than on the bulge.Since both components can have different orientations, these dependencies come from the combination of both.In order to study the dependence of b from a deeper perspective, in bottom panels we show b 1 (left) and b 2 (right) as a function of the bulge and disk β at the same time.We show that bias depends on both orientations at the same time, so we cannot interpret these bias dependencies separately.
Our hypothesis to explain these results is that the smallest errors come from the galaxies where the disk is the dominant component of the ellipticity measurement, since then we are less affected by model bias.When the ellipticity component of the bulge is large compared to the ellipticity component of the disk we are strongly affected by model bias.This corresponds, for example, to the extreme cases of b 1 for galaxies with β b ≈ 0 or β d ≈ π/4, or for b 2 for galaxies with β b ≈ π/4 or β d ≈ 0. However, when the ellipticity is dominated by the disk we are less affected by model bias.This is the case of b 1 (b 2 ) for galaxies with β b ≈ π/4 (β b ≈ 0).Finally, note in the bottom right panel that when β disk = β bulge (this is shown from the points in the diagonal of the bottom panels) the measurement is not optimal since, although the orientation angle is the same for disk and bulge, both components are still significant and can produce model bias (e.g. the ellipticity parameter q does not need to be the same for both disk and bulge as for our shape estimators).But in this case, the bias does not depend on the orientation angle anymore.

Shear bias dependencies on input parameters
In Figs. 6, 7 and 8 we show the input properties to which we found significant shear bias dependencies.Again, note the good agreement between both shear estimators given the precision of the errors of our analysis, KSB and gFIT, meaning that the sources of bias are not related to these algorithms but to the images themselves (except for one case that we mention later).

Effects of size, flux and ellipticity
In Fig. 6 we show the shear bias dependencies on size and flux.Top panels show the bias as a function of the disk flux (left) and half-light radius (right) for galaxies with disk and bulge, and bottom panels show the shear bias as a function of the bulge flux (left) and half-light radius (right) for the galaxies with only bulge.Note that in these case the flux and size of the bulges correspond to the total flux and size of the galaxies, while the disk information from the top panels is not giving all the information about the size and flux of the object, since the bulge can also be significant in some cases.
We see that shear bias tends to increase with all the properties.This indicates that the estimators give better results for larger images, as expected, since the signal of the image is better.Although the error bars are large, we can see a difference of around 10−15% on the bias from the first to the last bins.In the case of galaxies without disk, shear bias is consistent with 0 for bright and large galaxies.

Effects of orientation and shear
In Fig. 7 we focus on the parameters related with the image orientation and we show the shear bias as a function of the bulge orientation angle β bulge for galaxies with only a bulge, i.e. the global orientation of these images (top panel), the disk orientation angle β disk of the galaxies with disk and bulge (middle panel) and β bulge for the same galaxies (bottom panel).Multiplicative shear bias as a function of the input orientation angle for galaxies with only a bulge (top) and as a function of the disk (middle) and bulge (bottom) orientations for galaxies with a bulge and a disk.Green lines show the results of m1 (dashed) and m2 (dotted) for gFIT and orange lines show m1 (solid) and m2 (dash-dotted) for KSB.
We see the same effect on m in all the cases, although with different amplitudes, and m 1 and m 2 show antisymmetric dependencies.While m 1 increases (it has a positive slope) with β, m 2 decreases with a similar amplitude.The dependencies are symmetric with respect to 45 degrees, this is the reason why we only show the range from 0 to 45 degrees.In order to have a zero mean ellipticity in all the bins, we included the orthogonal pairs of the galaxies in each bin, so that the bins with galaxies with orientation angle β include also galaxies with orientation β + 90 o .
The shear bias seen in this figure can be explained from pixelization effects, since the bias is correlated with the pixel directions.Due to the direction of the pixels and its discretization, galaxies aligned with the pixels (represented in the first bins) will affect less the flux of the nearby pixels if the image is sheared towards its direction than if the shear causes a rotation of the image, and hence m 1 will be more negative than m 2 .Exactly the opposite happens when the images are oriented to the diagonal of the pixels (shown in the last bins), where small distortions of the image towards the diagonal of the pixels will impact less the closest pixels than small rotations.In order to confirm this pixelization effect, we repeated the measurements on other realizations of the same images where we varied the pixel size and the noise.We have seen that using pixels of 2 times smaller side reduces a ∼ 30% the amplitude of the effect.We have also found that noise has an impact on this effect, reducing between a 25% and a 50% the amplitude of the effect if we reduce the variance of the Gaussian noise by a factor of 8.
If we compare the effects of all the panels, we can see that the amplitude of the effects is very similar for the top and middle panel.This is because these two orientations are the ones that determine the most the orientation of the global image.On the top panel, we see the global orientation of the galaxies with only a bulge, and in the middle panel we see the disk orientation of the galaxies with disk.Although the orientation angle of the bulge of these galaxies can be different, the component that dominates in this effect is the disk.Because of this the bottom panel, where we show the bulge orientation of galaxies with bulge and disk, shows a smaller and noisier effect, since the bulge orientation is correlated with the disk orientation, but it is not necessarily the same.

Model bias
In this subsection, we investigate model bias.We have already seen that model bias affects differently the two galaxy populations simulated: m is in general consistent with 1 for galaxies without disk, but approximately 0.95 for galaxies with disk.
In the top panel of Fig. 8 we show the dependence of shear bias on the Sérsic index n for the galaxies with only a bulge.Bias increases up to a 10% bias for high Sérsic index.This effect can come from two contributions.On one side, our model fitted do not include arbitrary Sérsic profiles and this can cause a model bias.On the other hand, a large Sérsic index n corresponds to a steep decrease in luminosity, which makes the luminosity of these galaxies to  Green lines show the results of m1 (dashed) and m2 (dotted) for gFIT and orange lines show m1 (solid) and m2 (dash-dotted) for KSB.
be concentrated in the centre.Hence, these galaxies can be detected as small, occupying few pixels, which makes the estimation of the ellipticity and the interpretation of small distortions difficult.

Bias dependencies on output parameters
In the previous sections we explored the bias dependencies on input properties.The advantage of using the input properties to study shear bias is that we know exactly the relation between the images and these properties, but it has the handicap that they cannot be observed.On the other hand, measured properties are the information that we can obtain from observations.Moreover the measured properties indirectly give information about potentially interesting combinations of input parameters.For example, an object can be measured measured as round because the input ellipticity parameter q is close to 1, but it can also be because the object is small and very sensitive to noise and pixelization.In this case, objects measured as round describe galaxies with a given distribution of sizes, fluxes and shapes that for different reasons make our estimators to predict them as round.
In Fig. 9 we show shear bias as a function of the measured ellipticity (top), the orientation angle (middle) for galaxies with bulge and disk (left) and with only a bulge (right).We see very similar dependencies for both types of galaxies and both shear estimators.In the bottom panels we show the dependence of m1 (left) and m 2 (right) as a function of both the measured ellipticity and the measured orientation angle for the galaxies with only a bulge.
Focusing on the top panels, m depends strongly on the measured modulus of the ellipticity, | out |, showing large biases for measured round objects that can be explained by the difficulties of defining the ellipticity of round objects as discussed in previous sections.But also small and dim galaxies show difficulties to be correctly measured, since they are more affected by noise and pixelization, being frequently wrongly estimated as round.On the bottom panels we can see a strong bias for the components that have been measured to be very small, so we see strong bias m 1 for galaxies with β ∼ 45 o and a strong bias m 2 for galaxies with β ∼ 0 o .However, we have a small bias for the rest of the cases.This shows again the difficulty of measuring ellipticity components that are very small, but it can also mean that small images tend to be measured with a small ellipticity due to noise.Finally, in the bottom panels we see that shear bias depends on both properties at the same time, and we cannot determine the shear bias of the galaxies if we only take into account one of the properties, since for a fixed orientation angle (ellipticity) shear bias still depends strongly on ellipticity (orientation angle).
We have found that noise is the main cause of these dependencies.To test this, we have measured these bias dependencies by repeating the same analysis with the same images but generated with different levels of noise.Here we only describe the results for KSB but the results are equivalent for gFIT.In Fig. 10 we illustrate the impact of noise on the measured parameters q and β.The top panel shows the shear bias dependence of galaxies with disk on q, for different realizations where we have only varied the noise variance.Apart from the original case, we have a version with higher noise where we increased the variance of the Gaussian noise by a factor of 4, and another version with lower noise obtained by decreasing the noise variance by a factor of 4. In the bottom panel we shows the same for β.We clearly see that most of the dependencies disappear when the noise is reduced.This indicates that noise has a strong impact on the shear bias of measured round objects, since elliptical (and small) galaxies can be measured as round if the noise is large enough.The bias for different orientations comes from the fact that small ellipticities are more strongly affected by noise and pixelization.
We have analyzed all the input and output properties with the different levels of noise, and we have seen that most of the bias dependencies on input properties do not change significantly with noise, but the output parameters are very sensitive to it.This highlights the importance of studying the output properties as good indicators of galaxy properties that are strongly affected by bias.

Differences between the shape estimators
In the middle and bottom panels of Fig. 8 we show the only significant difference found between KSB and gFIT given our set of simulations and the precision of the analysis.This shows shear bias as a function of the modulus of the intrinsic ellipticity.While gFIT does not show a strong dependence of bias on this property (specially for galaxies without disk), KSB shows a strong effect.This dependence from KSB comes from the isotropic window function used in the method, as discussed in Viola et al. (2011).However, in this study they show that different implementations of KSB can produce different amplitudes of the bias as a function of the intrinsic ellipticity, and they propose different approximations to correct for it.In this study we applied the implementation that showed the smallest bias dependence on ellipticity from those available in the public shapelens repository.
We have seen in all our study that, apart from this case, most of the results are consistent between both estimators.This means that (almost) all the sources of bias found in this study are not coming from the algorithm to estimate the shear, but from the images characteristics.There could still be some differences between both estimators that have not been shown in this study due to the uncertainties of our data.In particular, we see in Figs. 6, 7 and 8 that gFIT tends to systematically show a slightly smaller bias than KSB.We can also see a significant difference in the last bin of the top panels of Fig. 9 between KSB and gFIT.If these differences are significant and systematic, a larger sample would allow us to study them in more detail.

Other tests and results
In the previous sections we showed the most important bias dependences found from this study.However, we have per- Multiplicative shear bias as a function of the modulus of the observed ellipticity (top panels) and the observed orientation angle (middle panels) for galaxies with a disk and a bulge (left panels) and with only a bulge (right panels).Green lines show the results of m1 (dashed) and m2 (dotted) for gFIT and orange lines show m1 (solid) and m2 (dash-dotted) for KSB.The bottom panels show m1 (left) and m2 (right) represented by the colour code as a function of observed ellipticity and orientation for galaxies with a single bulge.
formed other tests where we do not see a strong impact on ellipticity or shear bias but they are worth to mention.
First, we find additive bias to be weakly dependent on most of the properties, being always significantly smaller than multiplicative bias.Because of this, in this work we focus on multiplicative bias only.
Second, we have repeated the study from the simulated images where we forced them to be centered in the stamps.
0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 In this case we run gFIT but keeping the parameters of the center positions fixed to the correct ones in the fitting process.We compare these results with the original case in order to see the impact of miscentering in this method and these images.We do not find significant differences in the multiplicative bias, and for this reason we do not show the results in the paper.We find a small improvement on the amplitude of the additive bias which makes it consistent with KSB, indicating that KSB is not affected by the miscentering as it is gFIT.
We also study the + and × components of shear and ellipticity bias, but we find consistent results with respect to the 1 and 2 components (except, as expected, for the properties related to orientation).We show some of the results of these components in Appendix A.
Finally, we study the effect of the PSF by repeating the same test from the same images but applying an isotropic Gaussian PSF.The bias dependencies found are the same in both cases, and the PSF anisotropies only affect the precision of our measurements.We show some of the results obtained from an isotropic Gaussian PSF in Appendix B.

Conclusions
In this paper we have explored the dependencies of ellipticity and shear bias on input properties of simulated galaxy images, output properties and the impact of noise, pixelization and PSF anisotropy for two different shape estimators.We used Galsim to simulate the images of galaxies from the GREAT3 Control-Space-Constant (Mandelbaum et al. 2014) parameters and we compared the ellipticity and shear bias obtained from the Maximum-Likelihood extimator gFIT (Gentile et al. 2012;Mandelbaum et al. 2015) and the moment-based KSB method available from the public software shapelens (Viola et al. 2011).In order to study the effects of pixelization, noise and PSF anisotropy we repeated the analysis with some variations from the original simulated images, where we have tested smaller pixel sizes, different levels of noise variance and an isotropic Gaussian PSF.In this paper we focused on multiplicative bias since, given the precision of the analysis, we have not found important dependencies on additive bias.Here we discuss the most important conclusions from our study.
First, we have found a good agreement between both shape estimators gFIT and KSB.Given the differences in the nature of these two estimators, this indicates that most of the dependencies found in this paper do not come from the algorithms of the shape estimator, but from the characteristics of the images that cause effects due to pixelization and noise.However, we have found some differences between the models that could become important if we use a larger set of images to reduce the uncertainties of the study.
Second, we have shown that ellipticity bias and shear bias show very different behaviours since they reflect different sensitivities of the shape estimators.We have shown galaxies selected by some properties that show a very small ellipticity bias with a large shear bias and vice versa.These differences are important to take into account when we try to improve our shear statistics from surveys, since improving our estimators to measure better the ellipticity of the images is not necessarily improving our shear statistics.
Finally, we studied the dependencies of bias on all input and output properties and we determined the ones to which bias is most sensitive.We have found three types of dependencies: -Size and shape dependence: shear and ellipticity bias depends on the properties related to the dimensions of the galaxy image, such as the bulge and disk fluxes and size.Bias is larger for small objects since their shape is more difficult to measure.Round galaxies show also large ellipticity biases because the measurement of the ellipticity is strongly affected by pixelization and noise.Elliptical and large images are less sensitive to these aspects and then show a smaller bias.-Orientation dependence: shear bias depends strongly on orientation, with asymmetric dependencies for m 1 and m 2 .This is due to pixelization effects that make the estimation of the ellipticity more sensitive to small rotations than to small elongations along the pixel directions.-Model bias: shear and ellipticity bias are larger for galaxies containing a bulge and a disk than for galaxies consisting of a single bulge.This is a model bias coming from the fact that the bulge and disk of the simulated galaxies can have different ellipticities and orientations between them, while any of the shape estimators contemplate this possibility.Even though the KSB and gFIT make different assumptions or treatments on the luminosity profile of the images, the model bias suffered from these galaxies is similar.
We have found that the bias as a function of measured ellipticity and orientation is strongly affected by noise.This is because galaxies which are strongly affected by noise can be systematically interpreted to have the same properties even if their input properties are different.This implies that output properties can be useful properties to detect galaxies that have a large bias or that are specially affected by some important effects.Finally, we also found that the PSF anisotropy does not affect the qualitative results of the paper.When we used an isotropic Gaussian PSF instead of the PSFs from GREAT3 we obtained results that we consistent with the original case, but significantly smaller error bars.This means that the anisotropy of the PSFs used did not bias our results, but affected to the precision of the measurements.
The results and conclusions of the paper are limited to the accuracy that we can reach with the simulation images used.Using a larger set of images would help to improve the analysis and potentially find other smaller dependencies or differences between the estimators.However, this study has been useful to identify the main causes of shear bias and the properties to which bias is most dependent.We also highlight the complexity of these dependencies, the impact of the coupling between different properties on shear bias and the need of studying several properties simulateously in order to have a better understanding of the nature of shear bias.

Fig. 1 .
Fig. 1.Examples of galaxy and PSF images generated from Galsim.The top two rows show examples of galaxies with a de Vaucouleurs bulge and an exponential disk.The middle two rows show examples of galaxies with a single Sérsic profile.In these two cases we show galaxies of a variety of sizes and in increasing order.The bottom two rows show examples of PSF images, showing a wide range of complexities, from simple and isotropic to complex and anisotropic.The PSF images have been zoomed for visual reasons.

Fig. 2 .
Fig. 2. Distribution of the intrinsic ellipticity of the simulated images (top two panels) and the 200 different shear values applied to the images (bottom panel).

Fig. 3 .
Fig. 3. Visual example of the linear fit of b (left) from equation (1) and m (right) from equation (2) using all the images taken from the GREAT3 CSC dataset.The left panel shows the distribution of galaxies on the first component of the measured ellipticity component (y-axis) and the first component of the true ellipticity coming from the intrinsic ellipticity and the shear (x-axis).The right panels shows the distribution of the same galaxies on the first component of the measured ellipticities (y-axis) and the first component of the shear.The colour in the distribution represent the density of galaxies and the red lines show the linear regression of the distributions.
Finally, the bottom panels show the ellipticity bias b 1 (left) and b 2 (right) as a function of both disk and bulge orientation angle.

Fig. 4 .
Fig. 4. Multiplicative ellipticity bias (b1,2 from equation (1)) and shear bias (m1,2 from equation (2)) as a function of the input galaxy properties, such as bulge size R b (top left), disk-to-bulge flux ratio (top right), bulge ellipticity (middle left) and disk ellipticity (middle right) for galaxies with a disk and a bulge and for both models gFIT and KSB.The legend of the first 4 panels has been split between them for visual reasons.The bottom panels show b1 (left) and b2 (right) as a function of both the disk and the bulge ellipticity parameter q obtained with gFIT (the results from KSB are very similar).In these plots the values of b are represented by the colour code and their position represent the mean values for each 2-dimensional bin.

Fig. 5 .Fig. 6 .
Fig.5.Multiplicative ellipticity and shear bias as a function of different input orientation properties for both estimators gFIT and KSB, represented by lines as specified in the legends.The top panel shows the bias parameters as a function of the orientation angle β b for galaxies with only a bulge.The top right panel shows the bias dependences on the difference between the disk and bulge orientations for galaxies with a bulge and a disk.The middle panels show the bias parameters as a function of the bulge (left) and disk (right) orientations for galaxies with a bulge and a disk.The legend of the first 4 panels has been split between the panels for visual reasons.The bottom panels show b1 (left) and b2 (right) as a function of both the disk and bulge orientations for the same galaxies.Their values are represented by the colour code and the positions of the points represent the average orientations for each 2-dimensional bin.

Fig
Fig. 7. Multiplicative shear bias as a function of the input orientation angle for galaxies with only a bulge (top) and as a function of the disk (middle) and bulge (bottom) orientations for galaxies with a bulge and a disk.Green lines show the results of m1 (dashed) and m2 (dotted) for gFIT and orange lines show m1 (solid) and m2 (dash-dotted) for KSB.

Fig. 8 .
Fig.8.Multiplicative shear bias as a function of the input Sersic index n for galaxies with only a bulge (top) and as a function of the modulus of the intrinsic ellipticity | | for galaxies with only a bulge (middle) and with a bulge and a disk (bottom).Green lines show the results of m1 (dashed) and m2 (dotted) for gFIT and orange lines show m1 (solid) and m2 (dash-dotted) for KSB.
Fig.9.Multiplicative shear bias as a function of the modulus of the observed ellipticity (top panels) and the observed orientation angle (middle panels) for galaxies with a disk and a bulge (left panels) and with only a bulge (right panels).Green lines show the results of m1 (dashed) and m2 (dotted) for gFIT and orange lines show m1 (solid) and m2 (dash-dotted) for KSB.The bottom panels show m1 (left) and m2 (right) represented by the colour code as a function of observed ellipticity and orientation for galaxies with a single bulge.

Fig. 10 .
Fig.10.Multiplicative shear bias as a function of the observed ellipticity (top) and orientation angle (bottom) using three different realizations with different noise variances.The green lines show the results for the original case, while in the cyan (black) lines we show the results for the case where we increased (decreased) the noise variance by a factor of 4. The results are only shown for KSB but we obtained very similar results for gFIT.
Fig. A.1.All the components 1 (orange solid lines), 2 (orange dash-dotted lines), + (grey solid lines) and × (grey dash-dotted lines) of the multiplicative shear bias as a function of different input properties for gFIT.

Fig. B. 1 .
Fig. B.1.Multiplicative shear (orange lines) and ellipticity (red lines) bias as a function of different input properties (one per plot) for gFIT.

Table 1 .
Description of the properties used in the study.The first column shows the property names, the second describes the properties, the third column specifies what shape estimators we can use to study these properties (some properties can only be measured by one of the estimators).In the last column we specify what properties do not show a significant impact on shear or ellipticity bias.
out , y out the x and y positions of the centroid gFIT No significant dependencies found