Note: this repository of C programs is being kept for historical reference. I highly recommend using the improved versions of these algorithms instead, which are available in the Python cluster-lensing project. The Python implementation has a much nicer API and allows you to easily build up a DataFrame of galaxy cluster cluster properties and NFW profiles, with and without miscentering effects, through the ClusterEnsemble object. See the project website.
The C program smd_nfw_omp.c was used to calculate weak gravitational lensing magnification and shear profiles for the following published articles:
-
"CFHTLenS: A Weak Lensing Shear Analysis of the 3D-Matched-Filter Galaxy Clusters," J. Ford et al. (2015)
-
"Cluster Magnification & the Mass-Richness Relation in CFHTLenS," J. Ford et al. (2014)
The second C program smd_nfw.c is identical, except that it does not use parallel processing, so may be easier to compile and run on some machines. See the comments at the top of the files for details on required input files, variables, output files, and compiling instructions.
These codes calculate the NFW surface mass density (Sigma) and differential surface mass density (DeltaSigma), which are probed by weak lensing magnification and shear, respectively. It can calculate these profiles for many halos at once, given their different masses and concentrations (parameterized using the scale radius rs and concentration parameter deltac), and their redshifts and a cosmological model (parameterized through rhocrit(z)). This is useful if you are interested in fitting a composite-halo model to an ensemble of different stacked galaxy clusters (as done in the above two papers), as opposed to simply fitting for a single average halo profile.
Optionally, this code will include the effects of cluster miscentering. Assuming that the cluster centroid offsets are described by a two-diminsional Gaussian centered on the identified center, the algorithm performs a convolution between the density profile expected for a perfectly centred halo, and this offset distribution. More details are in the above two papers. An excellent introduction to halo miscentering is given in George et al. (2012).