Updated icgen to support padded phases from BORG

This commit is contained in:
Guilhem Lavaux 2014-11-07 15:33:26 +01:00
parent 09998c39f4
commit c5ad407b20
4 changed files with 90 additions and 53 deletions

View file

@ -37,7 +37,7 @@ if doSimulation:
dsim_hat = np.fft.rfftn(dsim)*(L/N0)**3
Psim, bsim = bic.bin_power(np.abs(dsim_hat)**2/L**3, L, range=(0,1.), bins=150)
pos,_,density,N,L,_,_ = bic.run_generation("initial_density_988.dat", 0.001, astart, cosmo, supersample=1, do_lpt2=True)
pos,_,density,N,L,_,_ = bic.run_generation("initial_density_1872.dat", 0.001, astart, cosmo, supersample=1, do_lpt2=False, supergenerate=2)
dcic = ct.cicParticles(pos, L, N0)
dcic /= np.average(np.average(np.average(dcic, axis=0), axis=0), axis=0)
@ -46,17 +46,16 @@ dcic -= 1
dcic_hat = np.fft.rfftn(dcic)*(L/N0)**3
dens_hat = np.fft.rfftn(density)*(L/N0)**3
Pcic, bcic = bic.bin_power(np.abs(dcic_hat)**2/L**3, L, range=(0,1.), bins=150)
Pdens, bdens = bic.bin_power(np.abs(dens_hat)**2/L**3, L, range=(0,1.), bins=150)
Pcic, bcic = bic.bin_power(np.abs(dcic_hat)**2/L**3, L, range=(0,4.), bins=150)
Pdens, bdens = bic.bin_power(np.abs(dens_hat)**2/L**3, L, range=(0,4.), bins=150)
cgrowth = cg.CosmoGrowth(**cosmo)
D1 = cgrowth.D(astart)
D1_0 = D1/cgrowth.D(1)#0.001)
Pref, bref = bic.compute_ref_power(L, N0, cosmo, range=(0,1.), bins=150)
Pref, bref = bic.compute_ref_power(L, N0, cosmo, range=(0,4.), bins=150)
Pcic /= D1_0**2
Pdens /= D1_0**2
#borg_evolved = ct.read_borg_vol("final_density_1380.dat")
#dborg_hat = np.fft.rfftn(borg_evolved.density)*L**3/borg_evolved.density.size