def POTDEF1(z, TheTa2): TheTa = np.sqrt(TheTa2**2 + theta1[l]**2) R = D_d * TheTa NFW_p = NFWPotential(amp=M_0, a=r_s, normalize=False) Sigma = NFW_p.dens(R, z) kappa = Sigma / SIGMA_CRIT return (4 / theta2[l]) * TheTa2 * kappa / SIGMA_CRIT**2
def integ(z, TheTa1, TheTa2): TheTa = np.sqrt(TheTa1**2 + TheTa2**2) R = D_d * TheTa NFW_p = NFWPotential(amp=nfw_M0, a=nfw_a, normalize=False) Densidad = NFW_p.dens(R, z) Kappa = 2 * Densidad return Kappa / (SIGMA_CRIT**2)
def halomass(out): hp= NFWPotential(normalize=out[1], a=out[3]) return integrate.quad((lambda x: hp.dens(x,0.)*x**2.),0.,250./_REFR0)[0]*4.*numpy.pi*_convertmass/out[2]**2.