lenspack.halo.fitting module

lenspack.halo.fitting.lsq_fit(theta, gamma_t, err, z_halo, z_src, cosmology, model='nfw')[source]

Fit a halo profile to measured tangential shear data by least squares.

Parameters
  • theta (array_like) – Angular distances (e.g. bin centers) from the halo/cluster center. Units of arcmin are assumed if not given as an astropy quantity.

  • gamma_t (array_like) – Mean measured tangential shear at distances theta.

  • err (array_like) – Error on gamma_t. This is typically the standard error of the mean in each theta bin.

  • z_halo (float) – Redshift of the halo/cluster.

  • z_src (float or array_like) – Effective redshift of source galaxies per theta bin. If only a single float is given, this value is used for all theta bins.

  • cosmology (astropy.cosmology.core.Cosmology) – Assumed cosmological model in which the halo/cluster lives.

  • model ({'nfw', 'bmo', 'einasto', 'sis'}, optional) – Halo model type. Currently only ‘nfw’ is supported, so it is default. See lenspack.halos.profiles for available options.

Returns

Best-fit parameters as ((c200, m200), cov), where cov is the 2x2 covariance matrix.

Return type

tuple of numpy arrays