im3shape: a maximum likelihood galaxy shear measurement code for cosmic gravitational lensing
We present and describe IM3SHAPE, a new publicly available galaxy shape measurement code for weak gravitational lensing shear. IM3SHAPE performs a maximum likelihood fit of a bulgeplus-disc galaxy model to noisy images, incorporating an applied point spread function. We detail challenges faced and choices made in its design and implementation, and then discuss various limitations that affect this and other maximum like lihood methods. We assess the bias arising from fitting an incorrect galaxy model using simple n oise-free images and find that it should not be a concern for current cosmic shear surveys. We test IM3SHAPE on the GREAT08 Challenge image simulations, and meet the requirements for upcoming cosmic shear surveys in the case that the simulations are encompassed by the fitted model, using a simple correction for image noise bias. For the fiducial branch of GREAT08 we obt ain a negligible additive shear bias and sub-two percent level multiplicative bias, which i s suitable for analysis of current surveys. We fall short of the sub-percent level requirement for upcoming surveys, which we attribute to a combination of noise bias and the mis-match between our galaxy model and the model used in the GREAT08 simulations. We meet the requirements for current surveys across all branches of GREAT08, except those with small or high noise galaxies, which we would cut from our analysis. Using the GREAT08 metric we we obtain a score of Q=717 for the usable branches, relative to the goal of Q=1000 for futur e experiments. The code is freely available from https://bitbucket.org/joezuntz/im3shap e.