Add support for Python3.5, More bispectrum work
This commit is contained in:
parent
23a8b07229
commit
019480c0e0
6 changed files with 172 additions and 130 deletions
|
@ -1,8 +1,8 @@
|
|||
from _cosmotool import *
|
||||
from _project import *
|
||||
from _cosmo_power import *
|
||||
from _cosmo_cic import *
|
||||
from _fast_interp import *
|
||||
from ._cosmotool import *
|
||||
from ._project import *
|
||||
from ._cosmo_power import *
|
||||
from ._cosmo_cic import *
|
||||
from ._fast_interp import *
|
||||
from .grafic import writeGrafic, writeWhitePhase, readGrafic, readWhitePhase
|
||||
from .borg import read_borg_vol
|
||||
from .cic import cicParticles
|
||||
|
|
|
@ -124,4 +124,4 @@ if __name__=="__main__":
|
|||
delta[3,2,1]=1
|
||||
b = powerspectrum(delta, 1, 16, fourier=False)
|
||||
a = bispectrum(delta, 1, 16, fourier=False)
|
||||
print a[0].max()
|
||||
print(a[0].max())
|
||||
|
|
|
@ -23,9 +23,8 @@ def build_filelist(fdir):
|
|||
fdir=fdir[1:] #eliminate first element
|
||||
|
||||
for fd in fdir:
|
||||
fname_0=fname_0+glob.glob(fd+'initial_density_*')
|
||||
fname_1=fname_1+glob.glob(fd+'final_density_*')
|
||||
|
||||
fname_0=fname_0+glob.glob(fd+'initial_density_*')
|
||||
fname_1=fname_1+glob.glob(fd+'final_density_*')
|
||||
|
||||
return fname_0, fname_1
|
||||
|
||||
|
@ -56,21 +55,22 @@ def read_borg_vol(BORGFILE):
|
|||
r=s.rsplit(' ')
|
||||
|
||||
if size(r)==5 :
|
||||
if r[0] =="define":
|
||||
if r[1]=="Lattice" : N0=int(r[2])
|
||||
N1=int(r[3])
|
||||
N2=int(r[4])
|
||||
|
||||
|
||||
if size(r)==11 :
|
||||
if r[4] =="BoundingBox": xmin=float(r[5])
|
||||
xmax=float(r[6])
|
||||
ymin=float(r[7])
|
||||
ymax=float(r[8])
|
||||
zmin=float(r[9])
|
||||
zmax=float(r[10].rstrip(','))
|
||||
|
||||
if r[0]=='@1': break
|
||||
if r[0] =="define":
|
||||
if r[1]=="Lattice" :
|
||||
N0=int(r[2])
|
||||
N1=int(r[3])
|
||||
N2=int(r[4])
|
||||
|
||||
if size(r)==11 :
|
||||
if r[4] =="BoundingBox":
|
||||
xmin=float(r[5])
|
||||
xmax=float(r[6])
|
||||
ymin=float(r[7])
|
||||
ymax=float(r[8])
|
||||
zmin=float(r[9])
|
||||
zmax=float(r[10].rstrip(','))
|
||||
|
||||
if r[0]=='@1': break
|
||||
|
||||
ranges=[]
|
||||
ranges.append(xmin)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue