Fixed cic. Fixed lpt1 evaluation in cosmogrowth
This commit is contained in:
parent
4bc7bf47a7
commit
7662ea98d4
4 changed files with 28 additions and 16 deletions
|
@ -34,6 +34,7 @@ def compute_power_from_borg(input_borg, a_borg, cosmo, bins=10, range=(0,1)):
|
|||
cgrowth = CosmoGrowth(**cosmo)
|
||||
D1 = cgrowth.D(1)
|
||||
D1_0 = D1/cgrowth.D(a_borg)
|
||||
print("D1_0=%lg" % D1_0)
|
||||
|
||||
density_hat, L = ba.half_pixel_shift(borg_vol)
|
||||
|
||||
|
@ -76,7 +77,7 @@ def run_generation(input_borg, a_borg, a_ic, **cosmo):
|
|||
|
||||
for j in xrange(3):
|
||||
# Generate psi_j (displacement along j)
|
||||
psi = D1_0*lpt.lpt1(j).flatten()*(N/L)**3
|
||||
psi = D1_0*lpt.lpt1(j).flatten()
|
||||
# Generate posx
|
||||
posx.append(((posq[j] + psi)%L).astype(np.float32))
|
||||
# Generate vel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue