示例#1
0
def sigma_integrand_ufunc(k, MASS, Z, COSMO1):
    # Same function as sigma_integrand, but works on arrays of k, not just scalars.
    # Useful for plotting purposes.
    # k must be in inverse Mpc
    tophat_radius_Mpc = ((3 * MASS / (4 * pi * Z['rho_bar_m']))**(1/3.)).to(u.Mpc).value
    return k**2 * power_spectrum(k, 0, **COSMO1) / (2*pi**2) \
           * w_tophat(k, tophat_radius_Mpc)**2
示例#2
0
    def sigma_integrand(k):
        # k must be in inverse Mpc

        # should we use the REDSHIFT here? It's currently set to
        # zero. Setting z=0.6 simply changes the normalisation by a
        # factor of ~2. The description in Zhu et al., just before
        # A15, says that it is the present-day value (i.e. z=0), so
        # that's what we're using.
         
        return k**2 * power_spectrum(float(k), 0, **COSMO1) / (2*pi**2) \
               * w_tophat(float(k), float(tophat_radius_Mpc))**2