mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
weighted volumes now propagate to pruning step
This commit is contained in:
parent
7e5a51d931
commit
78678881af
3 changed files with 14 additions and 5 deletions
|
@ -101,7 +101,7 @@ newSample = Sample(
|
|||
|
||||
# width of redshift boundaries to flag edge galaxies
|
||||
# (interpreted as boundaryWidth*(zMax-zMin))
|
||||
boundaryWidth = 0.1,
|
||||
boundaryWidth = 0.01,
|
||||
|
||||
# leave this at -1 for mean particle separation,
|
||||
# or specify your own in Mpc/h
|
||||
|
|
|
@ -79,6 +79,7 @@ class Sample:
|
|||
omegaM = 0.27
|
||||
minVoidRadius = -1
|
||||
fakeDensity = 0.01
|
||||
hasWeightedVolumes = False
|
||||
profileBinSize = 2 # Mpc
|
||||
autoNumInStack = -1 # set to >0 to automatically generate stacks of size N
|
||||
autoPartInStack = -1 # set to >0 to automatically generate stacks with N particles
|
||||
|
@ -104,7 +105,7 @@ class Sample:
|
|||
zBoundary=(), zRange=(), zBoundaryMpc=(), boundaryWidth=0.1,
|
||||
shiftSimZ=False,
|
||||
minVoidRadius=-1, fakeDensity=0.01, volumeLimited=True,
|
||||
numAPSlices=1,
|
||||
numAPSlices=1, hasWeightedVolumes=False,
|
||||
includeInHubble=True, partOfCombo=False, isCombo=False,
|
||||
comboList=(), profileBinSize=2.0,
|
||||
boxLen=1024, usePecVel=False, omegaM=0.27,
|
||||
|
@ -126,6 +127,7 @@ class Sample:
|
|||
self.zRange = zRange
|
||||
self.minVoidRadius = minVoidRadius
|
||||
self.fakeDensity = fakeDensity
|
||||
self.hasWeightedVolumes = hasWeightedVolumes
|
||||
self.volumeLimited = volumeLimited
|
||||
self.includeInHubble = includeInHubble
|
||||
self.partOfCombo = partOfCombo
|
||||
|
|
|
@ -437,6 +437,7 @@ def launchZobov(sample, binPath, outputDir=None, logDir=None, continueRun=None,
|
|||
for i in range(len(vols)):
|
||||
vols[i] *= selfunc(redshifts[i])
|
||||
|
||||
sample.hasWeightedVolumes = True
|
||||
volFile = outputDir+"/vol_weighted_"+sampleName+".dat"
|
||||
with open(volFile, mode='wb') as File:
|
||||
numPartTot.astype(np.int32).tofile(File)
|
||||
|
@ -467,6 +468,7 @@ def launchZobov(sample, binPath, outputDir=None, logDir=None, continueRun=None,
|
|||
numPartTot.astype(np.int32).tofile(File)
|
||||
vols.astype(np.float32).tofile(File)
|
||||
|
||||
sample.hasWeightedVolumes = True
|
||||
volFileToUse = outputDir+"/vol_weighted_"+sampleName+".dat"
|
||||
else:
|
||||
volFileToUse = outputDir+"/vol_"+sampleName+".dat"
|
||||
|
@ -524,6 +526,12 @@ def launchPrune(sample, binPath,
|
|||
|
||||
periodicLine = " --periodic='" + getPeriodic(sample) + "'"
|
||||
|
||||
if sample.hasWeightedVolumes:
|
||||
volFileLine = " --partVol=" + outputDir+"/vol_weighted_"+\
|
||||
str(sampleName)+".dat"
|
||||
else:
|
||||
volFileLine = " --partVol=" + outputDir+"/vol_"+str(sampleName)+".dat"
|
||||
|
||||
if useComoving:
|
||||
useComovingFlag = " --useComoving"
|
||||
else:
|
||||
|
@ -548,11 +556,9 @@ def launchPrune(sample, binPath,
|
|||
cmd += " --voidDesc=" + outputDir+"/voidDesc_"+str(sampleName)+".out"
|
||||
cmd += " --void2Zone="+outputDir+"/voidZone_"+str(sampleName)+".dat"
|
||||
cmd += " --zone2Part=" + outputDir+"/voidPart_"+str(sampleName)+".dat"
|
||||
cmd += " --partVol=" + outputDir+"/vol_"+str(sampleName)+".dat"
|
||||
cmd += " --partAdj=" + outputDir+"/adj_"+str(sampleName)+".dat"
|
||||
cmd += " --partEdge=" + outputDir+"galaxy_edge_flags.txt"
|
||||
cmd += " --extraInfo=" + outputDir+"/zobov_slice_"+str(sampleName)+\
|
||||
".par"
|
||||
cmd += " --extraInfo=" + outputDir+"/zobov_slice_"+str(sampleName)+".par"
|
||||
cmd += " --tolerance=" + str(boundaryTolerance)
|
||||
cmd += " --mockIndex=" + str(mockIndex)
|
||||
cmd += " --maxCentralDen=" + str(maxDen)
|
||||
|
@ -562,6 +568,7 @@ def launchPrune(sample, binPath,
|
|||
cmd += " --numVoids=" + str(numVoids)
|
||||
cmd += observationLine
|
||||
cmd += periodicLine
|
||||
cmd += volFileLine
|
||||
cmd += useComovingFlag
|
||||
cmd += " --omegaM=" + str(sample.omegaM)
|
||||
cmd += " --outputDir=" + outputDir
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue