Fixed compilation option for CosmoTool. Show a message to indicate which variant is used to build the python modules
This commit is contained in:
parent
beb651c79a
commit
68bdc4fb31
3 changed files with 30 additions and 23 deletions
|
@ -154,6 +154,8 @@ def get_grid_values(xx,data, ranges):
|
|||
def get_mean_density(fdir, smin, step):
|
||||
""" estimate ensemble mean
|
||||
"""
|
||||
import progressbar as pb
|
||||
|
||||
print('-'*60)
|
||||
print('Get 3D ensemble mean density field')
|
||||
print('-'*60)
|
||||
|
@ -174,23 +176,23 @@ def get_mean_density(fdir, smin, step):
|
|||
fname1 = fdir + 'final_density_'+str(idat)+'.dat'
|
||||
#and (idat<smin+1000)
|
||||
while((os.path.exists(fname0))):
|
||||
auxdata0,auxranges0=read_borg_vol(fname0)
|
||||
auxdata1,auxranges1=read_borg_vol(fname1)
|
||||
auxx0=auxdata0
|
||||
auxx1=auxdata1
|
||||
MEAN0+=auxx0
|
||||
VAR0+=auxx0**2
|
||||
MEAN1+=auxx1
|
||||
VAR1+=auxx1**2
|
||||
|
||||
norm+=1
|
||||
idat+=step
|
||||
fname0 = fdir + 'initial_density_'+str(idat)+'.dat'
|
||||
fname1 = fdir + 'final_density_'+str(idat)+'.dat'
|
||||
del auxranges0
|
||||
del auxdata0
|
||||
del auxranges1
|
||||
del auxdata1
|
||||
auxdata0,auxranges0=read_borg_vol(fname0)
|
||||
auxdata1,auxranges1=read_borg_vol(fname1)
|
||||
auxx0=auxdata0
|
||||
auxx1=auxdata1
|
||||
MEAN0+=auxx0
|
||||
VAR0+=auxx0**2
|
||||
MEAN1+=auxx1
|
||||
VAR1+=auxx1**2
|
||||
|
||||
norm+=1
|
||||
idat+=step
|
||||
fname0 = fdir + 'initial_density_'+str(idat)+'.dat'
|
||||
fname1 = fdir + 'final_density_'+str(idat)+'.dat'
|
||||
del auxranges0
|
||||
del auxdata0
|
||||
del auxranges1
|
||||
del auxdata1
|
||||
|
||||
MEAN0/=norm
|
||||
VAR0/=norm
|
||||
|
@ -208,6 +210,8 @@ def get_mean_density(fdir, smin, step):
|
|||
def get_mean_density_fdir(fdir,init,steps):
|
||||
""" estimate ensemble mean
|
||||
"""
|
||||
import progressbar as pb
|
||||
|
||||
print('-'*60)
|
||||
print('Get 3D ensemble mean density field')
|
||||
print('-'*60)
|
||||
|
@ -227,7 +231,7 @@ def get_mean_density_fdir(fdir,init,steps):
|
|||
norm0=0.
|
||||
norm1=0.
|
||||
|
||||
for fn in fname0:
|
||||
for fn in pb.ProgressBar(len(fname0))(fname0):
|
||||
auxborg=read_borg_vol(fn)
|
||||
auxdata0 = auxborg.density
|
||||
MEAN0+=auxdata0
|
||||
|
@ -236,7 +240,7 @@ def get_mean_density_fdir(fdir,init,steps):
|
|||
del auxdata0
|
||||
del auxborg
|
||||
|
||||
for fn in fname1:
|
||||
for fn in pb.ProgressBar(len(fname1))(fname1):
|
||||
auxborg1=read_borg_vol(fn)
|
||||
auxdata1 = auxborg1.density
|
||||
MEAN1+=auxdata1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue