def DZ_int(self,z=[0],cosmo=None): #linear growth factor.. full integral.. eq 63 in Lahav and suto if not cosmo: cosmo=self.cosmo def intf(z): return (1+z)/(cosmo.H(z).value)**3 j=0 Dz=np.zeros_like(z,dtype='float32') for i in z: Dz[j]=cosmo.H(i).value*scipy_int1d(intf,i,np.inf,epsrel=1.e-6,epsabs=1.e-6)[0] j=j+1 Dz*=(2.5*cosmo.Om0*cosmo.H0.value**2) return Dz/Dz[0]
def DZ_int(z=[0], cosmo=None, rtol=1.e-4, tol=1.e-5): #linear growth factor.. full integral.. eq 63 in Lahav and Suto Ez_func = cosmo.efunc def intf(z): return (1. + z) / (cosmo.H(z=z).value**3) dz = np.zeros_like(z, dtype='float32') inf = np.inf j = 0 for i in z: dz[j] += cosmo.H(i).value * scipy_int1d( intf, i, inf, epsrel=rtol, epsabs=tol)[0] j = j + 1 dz = dz * 2.5 * cosmo.Om0 * cosmo.H0**2 return dz / dz[0] #check for normalization