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

Mass reconstruction:


Once you have a good shear catalogue it is always nice to visualise a mass map if only as it immediately identifies regions of the image where your PSF correction has failed.   The most rapid and simple mass reconstruction method comes from Kaiser and Squires 2003 and uses the Fourier method.  In the DUEL practical we’ll be using some executables from the much larger imcat software package from Nick Kaiser.  This software is not part of the KSBf90 package, but you can request it from Nick Kaiser.


For information about each of the imcat software we’ll be using, here are links to the imcat man webpages.


lc:  Once you’ve learnt “reverse polish notation” you’ll learn to love how powerful lc is at catalogue manipulation

makeshearimage: Makes a 2D fits image of the shear field

massmap_ft:  The fourier method to create a kappa map from the shear field

smooth:  Uses Gaussian smoothing to reduce the small scale noise in your map


Note before you can use any imcat code you will need to convert your input catalogues into lc format.


Add a World Co-ordinate System:

If you want to blink between your mass reconstruction and you original image using ds9 for example, you can use add_wcs_hearder.f90.  This code adds the required keywords to the fits header such that your kappa map has a WCS.  It however assumes the following


  1. Y axis points North, X axis points West exactly

  2. (0,0) in the kappa map matches the (0,0) in the image

  3. The kappa map covers the full image


!!!  Important Warning !!!


KSB calculates the two component reduced shear relative to the (x,y) pixel axis of the image.  If you have several images and start working with (RA,Dec) to combine catalogues for example, you will need to convert the shear into the (RA,Dec) reference frame.  For an image with y pointing North and x pointing West, you simply need to flip g2 (multiply by -1).  If your frames point, for example, SW, you need to rotate both g1 and g2 using the following equation



where φ is defined to be the angle between the x axis of each image and a line of constant declination.

 

Running imcats mass reconstruction from the command line:  Example


# Make an lc catalogue from the ascii shear catalogue


lc -C -n number -n flux -n flux_err -n mag -n mag_err -n isoarea -N '1 2 x' -n a -n b -n fr -n fwhm -n flags -n class -n rg -N '1 2 eobs' -N '1 2 ecor' -n Pgamma < D1_i.shear.cat > D1_i.shear_lc.cat

  

# Make an "Emode" catalogue including S/N cuts and create a Emode mass map


lc +all 'e1 = %ecor[0] %Pgamma /' 'e2 = %ecor[1] %Pgamma /'<D1_i.shear_lc.cat | lc +all 'e = %e1 %e2 2 vector' | lc -i '%e %e dot 1 < %flux %flux_err / 10 > and ' > D1_i.shear_E.cat


makeshearimage -N 200 200 -X 26.0 < D1_i.shear_E.cat > D1_i.shear_E.fits

massmap_ft < D1_i.shear_E.fits | smooth -g 4 4 0 > D1_i.Emode.fits


Add a World Co-ordinate System to your resulting kappa map

add_wcs_header.a -image image.fits -kappa kappa.fits


Page maintained by Catherine Heymans, IfA, University of Edinburgh