mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-05 07:41:11 +00:00
some bug fixes to the a-p analysis scripts; fixed major bug in prunevoids; updated catalog release scripts
This commit is contained in:
parent
06c8ddc26e
commit
022eec19bb
13 changed files with 437 additions and 239 deletions
|
@ -14,8 +14,6 @@ import argparse
|
|||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
from datasetsToPlot import *
|
||||
|
||||
plotNameBase = "compdenscon"
|
||||
|
||||
obsFudgeFactor = .66 # what fraction of the volume are we *reall* capturing?
|
||||
|
@ -24,10 +22,20 @@ parser = argparse.ArgumentParser(description='Plot.')
|
|||
parser.add_argument('--show', dest='showPlot', action='store_const',
|
||||
const=True, default=False,
|
||||
help='display the plot (default: just write eps)')
|
||||
parser.add_argument('--parmFile', dest='parmFile', default='datasetsToPlot.py',
|
||||
help='path to parameter file')
|
||||
args = parser.parse_args()
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
filename = args.parmFile
|
||||
print " Loading parameters from", filename
|
||||
if not os.access(filename, os.F_OK):
|
||||
print " Cannot find parameter file %s!" % filename
|
||||
exit(-1)
|
||||
parms = imp.load_source("name", filename)
|
||||
globals().update(vars(parms))
|
||||
|
||||
if not os.access(figDir, os.F_OK):
|
||||
os.makedirs(figDir)
|
||||
|
||||
|
@ -38,10 +46,10 @@ for sampleDir in sampleDirList:
|
|||
dataSampleList.append(pickle.load(input))
|
||||
|
||||
plt.clf()
|
||||
plt.xlabel("Void Radius (Mpc/h)")
|
||||
plt.xlabel("Void Density Contrast")
|
||||
plt.ylabel(r"N > R [$h^3$ Gpc$^{-3}$]")
|
||||
plt.yscale('log')
|
||||
plt.xlim(xmax=80.)
|
||||
plt.xlim(xmax=5.)
|
||||
|
||||
plotName = plotNameBase
|
||||
|
||||
|
@ -62,6 +70,7 @@ for (iSample,sample) in enumerate(dataSampleList):
|
|||
|
||||
boxVol *= 1.e-9 # Mpc->Gpc
|
||||
|
||||
print " Loading", sampleName
|
||||
filename = workDir+"/"+sampleDirList[iSample]+"/centers_"+dataPortion+"_"+\
|
||||
sampleName+".out"
|
||||
if not os.access(filename, os.F_OK):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue