示例#1
0

nperiods = 5
ampmod =0.3
om_sine = om_global+ampmod*np.sin(2*np.pi*x/xmax*nperiods)
om_sine[om_sine<0] = 0


om_uniform = np.zeros(nn)+om_global


clf()
plot(x,om_uniform)
plot(x,om_sine)

zrec_uniform = inhodist.x2z_inho(x, om_uniform, h,type=dist_type)
zrec_sine = inhodist.x2z_inho(x, om_sine, h,type=dist_type)

clf()
plot(zrec_uniform,x, lw=2, label='Uniform $\Omega_m={0:3.1f}$'.format(om_global))
plot(zrec_sine,x, lw=2, label='Sine modulation with average $\Omega_m={0:3.1f}$'.format(om_global))
xlabel('redshift')
ylabel(dist_type)
legend(loc='upper left',framealpha=0.8)

clf()
plot(zrec_uniform,x/x, lw=2, label='Uniform $\Omega_m={0:3.1f}$'.format(om_global))
plot(zrec_sine,x/np.interp(zrec_sine,zrec_uniform,x), lw=2, label='Sine modulation with average $\Omega_m={0:3.1f}$'.format(om_global))
xlabel('redshift')
ylabel('Distance ratio to Uniform')
legend(loc='upper left',framealpha=0.8)
示例#2
0
# constant om global situation A
omA=np.zeros(nn)+om_global

# constant om vide situation A
omVide=np.zeros(nn)+om_region_vide

# constant om dense situation A
omDense=np.zeros(nn)+om_region_dense

# With hole - situation B
omB = np.zeros(nn)
omB[x < xs]=om_region_dense
omB[(x>=xs) & (x<xe)] = om_region_vide
omB[x>=xe]=om_region_dense

zrecA = inhodist.x2z_inho(x, omA, h,type=dist_type)
zrecB = inhodist.x2z_inho(x, omB, h,type=dist_type)
zrecVide = inhodist.x2z_inho(x, omVide, h,type=dist_type)
zrecDense = inhodist.x2z_inho(x, omDense, h,type=dist_type)

clf()
plot(zz, dp_global,lw=2)
plot(zrecA,x,'r--',lw=2)



clf()
plot(zrecA,x, label='A')
plot(zrecB,x, label='B')
plot(zrecVide,x, label='Vide')
plot(zrecDense,x, label='Dense')
示例#3
0
ylabel('comoving distance (l.o.s.)')



#### Configuration A
hz_A = hz_global.copy()
chi_A = np.zeros(nn)
chi_A[1:nn] = integrate.cumtrapz(1./hz_A, zz)
dp_A = chi_A*c/H0
zs_A = np.interp(xs, dp_A, zz)
ze_A = np.interp(xe, dp_A, zz)
z1_A = np.interp(x1, dp_A, zz)
## Other calculation from differential equation
xx = linspace(0,x1,nn)
omA=np.zeros(nn)+om_global
zrecA = inhodist.x2z_inho(xx, omA, h,type='comoving')



clf()
plot(zz, dp_global,lw=2)
plot(zrecA,xx,'r--',lw=2)





#### Configuration B
# region dense du début
hz_B = hz_region_dense.copy()
chi = np.zeros(nn)