volume normalization in catalogUtil just uses zobov info now

This commit is contained in:
P.M. Sutter 2016-01-19 08:39:40 -06:00
parent 113dd647df
commit 1607147cb6

View file

@ -119,24 +119,24 @@ def loadPart(sampleDir):
boxLen = mul boxLen = mul
if isObservation == 1: #if isObservation == 1:
# look for the mask file # # look for the mask file
if os.access(sample.maskFile, os.F_OK): # if os.access(sample.maskFile, os.F_OK):
maskFile = sample.maskFile # maskFile = sample.maskFile
else: # else:
maskFile = sampleDir+"/"+os.path.basename(sample.maskFile) # maskFile = sampleDir+"/"+os.path.basename(sample.maskFile)
print "Using maskfile found in:", maskFile # print "Using maskfile found in:", maskFile
props = vp.getSurveyProps(maskFile, sample.zBoundary[0], # props = vp.getSurveyProps(maskFile, sample.zBoundary[0],
sample.zBoundary[1], # sample.zBoundary[1],
sample.zBoundary[0], # sample.zBoundary[0],
sample.zBoundary[1], "all", # sample.zBoundary[1], "all",
selectionFuncFile=sample.selFunFile, # selectionFuncFile=sample.selFunFile,
useComoving=sample.useComoving) # useComoving=sample.useComoving)
boxVol = props[0] # boxVol = props[0]
volNorm = maskIndex/boxVol # volNorm = maskIndex/boxVol
else: #else:
boxVol = np.prod(boxLen) boxVol = np.prod(boxLen)
volNorm = len(x)/boxVol volNorm = len(x)/boxVol
isObservationData = isObservation == 1 isObservationData = isObservation == 1
@ -170,24 +170,24 @@ def getVolNorm(sampleDir):
boxLen = mul boxLen = mul
if isObservation == 1: #if isObservation == 1:
# look for the mask file # # look for the mask file
if os.access(sample.maskFile, os.F_OK): # if os.access(sample.maskFile, os.F_OK):
maskFile = sample.maskFile # maskFile = sample.maskFile
else: # else:
maskFile = sampleDir+"/"+os.path.basename(sample.maskFile) # maskFile = sampleDir+"/"+os.path.basename(sample.maskFile)
print "Using maskfile found in:", maskFile # print "Using maskfile found in:", maskFile
props = vp.getSurveyProps(maskFile, sample.zBoundary[0], # props = vp.getSurveyProps(maskFile, sample.zBoundary[0],
sample.zBoundary[1], # sample.zBoundary[1],
sample.zBoundary[0], # sample.zBoundary[0],
sample.zBoundary[1], "all", # sample.zBoundary[1], "all",
selectionFuncFile=sample.selFunFile, # selectionFuncFile=sample.selFunFile,
useComoving=sample.useComoving) # useComoving=sample.useComoving)
boxVol = props[0] # boxVol = props[0]
volNorm = maskIndex/boxVol # volNorm = maskIndex/boxVol
else: #else:
boxVol = np.prod(boxLen) boxVol = np.prod(boxLen)
volNorm = Np/boxVol volNorm = Np/boxVol
return volNorm return volNorm
@ -357,7 +357,7 @@ def loadVoidCatalog(sampleDir, dataPortion="central", loadParticles=True,
numPart = int(line[8]), numPart = int(line[8]),
densCon = line[9], densCon = line[9],
voidProb = line[10], voidProb = line[10],
radius = pow(line[7]/volNorm*3./4./np.pi, 1./3.), radius = 0., # this is read in later
macrocenter = np.zeros((3)), macrocenter = np.zeros((3)),
redshift = 0, redshift = 0,
RA = 0, RA = 0,