KSBf90: A Fortran 90 Implementation of Kaiser, Squires and Broadhurst 1995.

Measure and correct the galaxy shapes:


Once you have a good model of the PSF, all weak lensing methods will use this model to somehow correct the galaxies for this distortion.  The STEP2 paper has a nice summary Table3 of how the different methods perform the correction.


In KSBf90 the galaxy is characterised by its weighted ellipticity (p1, p2) given by equation C3 in the GREAT08 Handbook measured with an optimal weight function.  The scale radius of this optimal weight function is given by the galaxies SExtractor half-light-radius.  Galaxies are then corrected using the PSF model, measured using the same weight function in psffit.f90, using equation C6 in the GREAT08 Handbook.



The resulting shape catalogue

The output file contains the input SExtractor catalogue with the following KSB shape parameters appended


#  +1 rg          KSBf90 output   The scale radius used

#  +2 e1_obs      KSBf90 output   The observed ellipticity

#  +3 e2_obs      KSBf90 output   Eqn B.14

#  +4 e1_cor      KSBf90 output    The PSF anisotropic corrected ellipticity

#  +5 e2_cor      KSBf90 output   Eqn C4

#  +6 pgamma      KSBf90 output   The PSF isotropic correction Eqn C5


To get a shear estimate you need to divide the corrected ellipticity (ei_cor) by Pgamma (Eqn C6 in the GREAT08 Handbook).   The reason why this is not done automatically is that you can choose to either fit Pgamma to reduce noise but potentially bias you results, or use “raw” Pgamma values.  Use gal_select.f90 to decide which Pgamma method to use.



Running gal_correct.f90 from the command line:


gal_correct.a -image image.fits -in SExtractor.cat -crit star_criteria.dat -param KSBf90.param -psf PSF.dat -out shape.cat


-image:  The fits image you are analysing

-in : Your SExtractor catalogue of this image

-crit: Your stellar selection criteria from findstars.f90

-psf:  The PSF model from psffit.f90

-param:  The name and location of your parameter file

-out:  The output of this code; your SExtractor catalogue with KSB shape parameters appended

Page maintained by Catherine Heymans, IfA, University of Edinburgh