def mmin(z,Tvir=1.E4): return pb.virial_mass(Tvir,z,**cosmo)
#################################### #sig_8 = n.sqrt(sig0(8./cosmo['h'],Del2k0)) #print sig_8 sig_8 = n.sqrt(sig0(8./cosmo['h'])) print 'sig_8',sig_8 #Del2k0 = Del2k0*(sig8/sig_8) #################################### zeta = 40. K = scipy.special.erfinv(1-1./zeta) print 'K(zeta)=',K #import IPython; IPython.embed() ####################### FZH04 ############################## ##### m_min Tvir = 1.E4 #mmin = (Tvir/442/Om**(1./3)/((1+z)/100))**(3./2)*(h**(-1)*1.E4) mmin = pb.virial_mass(Tvir,z,**cosmo) print "minimum mass (msuns)", mmin RLmin = m2R(mmin) print 'R',RLmin #rlmin = pb.mass_to_radius(mmin,**cosmo) #print RLmin, rlmin #== #smin = sig0(RLmin,Del2k0) smin = sig0(RLmin) print 'smin=',smin ####### S0max = sig0(m2R(zeta*mmin)) S0 = n.arange(0,S0max,0.2) BFZH = deltac-n.sqrt(2*(smin-S0))*K bFZH0 = deltac-K*n.sqrt(2*smin) bFZH1 = K/n.sqrt(2*smin) BFZHlin = bFZH0+bFZH1*S0
def mmin(z, Tvir=1.E4): return pb.virial_mass(Tvir, z, **cosmo)
#################################### #sig_8 = n.sqrt(sig0(8./cosmo['h'],Del2k0)) #print sig_8 sig_8 = n.sqrt(sig0(8. / cosmo['h'])) print 'sig_8', sig_8 #Del2k0 = Del2k0*(sig8/sig_8) #################################### zeta = 40. K = scipy.special.erfinv(1 - 1. / zeta) print 'K(zeta)=', K #import IPython; IPython.embed() ####################### FZH04 ############################## ##### m_min Tvir = 1.E4 #mmin = (Tvir/442/Om**(1./3)/((1+z)/100))**(3./2)*(h**(-1)*1.E4) mmin = pb.virial_mass(Tvir, z, **cosmo) print "minimum mass (msuns)", mmin RLmin = m2R(mmin) print 'R', RLmin #rlmin = pb.mass_to_radius(mmin,**cosmo) #print RLmin, rlmin #== #smin = sig0(RLmin,Del2k0) smin = sig0(RLmin) print 'smin=', smin ####### S0max = sig0(m2R(zeta * mmin)) S0 = n.arange(0, S0max, 0.2) BFZH = deltac - n.sqrt(2 * (smin - S0)) * K bFZH0 = deltac - K * n.sqrt(2 * smin) bFZH1 = K / n.sqrt(2 * smin) BFZHlin = bFZH0 + bFZH1 * S0