mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
Merge branch 'master' of bitbucket.org:cosmicvoids/void_identification
This commit is contained in:
commit
dff81063d4
3 changed files with 22 additions and 9 deletions
|
@ -26,7 +26,7 @@ option "rangeZ_max" - "Maximum range in Z for making the box (after distorti
|
||||||
option "preReShift" - "Reshift the zero of the Z axis" flag off
|
option "preReShift" - "Reshift the zero of the Z axis" flag off
|
||||||
option "peculiarVelocities" - "Added peculiar velocities distortion" flag off
|
option "peculiarVelocities" - "Added peculiar velocities distortion" flag off
|
||||||
|
|
||||||
option "cosmo" - "Apply cosmological redshift" flag on
|
option "cosmo" - "Apply cosmological redshift" flag off
|
||||||
|
|
||||||
option "subsample" - "Subsample the input simulation by the specified amount" double optional
|
option "subsample" - "Subsample the input simulation by the specified amount" double optional
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,13 @@ dataFormat = "gadget"
|
||||||
useLightCone = False
|
useLightCone = False
|
||||||
|
|
||||||
# common filename of particle files
|
# common filename of particle files
|
||||||
redshiftFileBase = "mdr1_particles_z"
|
particleFileBase = "mdr1_particles_z"
|
||||||
|
|
||||||
# list of redshifts for the particle files
|
# list of file numbers for the particle files
|
||||||
# to get particle file name, we take redshiftFileBase+redshift
|
# to get particle file name, we take particleFileBase+fileNum
|
||||||
|
fileNums = (("0.0", "0.53", "1.0"))
|
||||||
|
|
||||||
|
# redshift of each file in the above list
|
||||||
redshifts = (("0.0", "0.53", "1.0"))
|
redshifts = (("0.0", "0.53", "1.0"))
|
||||||
|
|
||||||
# how many independent slices along the z-axis?
|
# how many independent slices along the z-axis?
|
||||||
|
@ -80,7 +83,7 @@ def getSampleName(setName, redshift, useVel, iSlice=-1, iVol=-1):
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# for given dataset parameters, outputs a script for use with analyzeVoids
|
# for given dataset parameters, outputs a script for use with analyzeVoids
|
||||||
def writeScript(setName, dataFileNameBase,
|
def writeScript(setName, dataFileNameBase,
|
||||||
scriptDir, catalogDir, redshifts, numSubvolumes,
|
scriptDir, catalogDir, fileNums, redshifts, numSubvolumes,
|
||||||
numSlices, useVel, lbox, minRadius, omegaM, subsample=1.0,
|
numSlices, useVel, lbox, minRadius, omegaM, subsample=1.0,
|
||||||
suffix=".dat"):
|
suffix=".dat"):
|
||||||
|
|
||||||
|
@ -149,7 +152,8 @@ newSample = Sample(dataFile = "{dataFile}",
|
||||||
dataSampleList.append(newSample)
|
dataSampleList.append(newSample)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
for redshift in redshifts:
|
for (iFile, redshift) in enumerate(redshifts):
|
||||||
|
fileNum = fileNums[iFile]
|
||||||
zBox = float(redshift)
|
zBox = float(redshift)
|
||||||
Om = float(omegaM)
|
Om = float(omegaM)
|
||||||
zBoxMpc = LIGHT_SPEED/100.*vp.angularDiameter(zBox, Om=Om)
|
zBoxMpc = LIGHT_SPEED/100.*vp.angularDiameter(zBox, Om=Om)
|
||||||
|
@ -181,7 +185,7 @@ dataSampleList.append(newSample)
|
||||||
sliceMinMpc = "%0.1f" % sliceMinMpc
|
sliceMinMpc = "%0.1f" % sliceMinMpc
|
||||||
sliceMaxMpc = "%0.1f" % sliceMaxMpc
|
sliceMaxMpc = "%0.1f" % sliceMaxMpc
|
||||||
|
|
||||||
dataFileName = dataFileNameBase + redshift + suffix
|
dataFileName = dataFileNameBase + fileNum + suffix
|
||||||
|
|
||||||
for iX in xrange(numSubvolumes):
|
for iX in xrange(numSubvolumes):
|
||||||
for iY in xrange(numSubvolumes):
|
for iY in xrange(numSubvolumes):
|
||||||
|
@ -228,10 +232,12 @@ for thisSubSample in subSamples:
|
||||||
|
|
||||||
print " Doing subsample", thisSubSample, " scripts"
|
print " Doing subsample", thisSubSample, " scripts"
|
||||||
setName = prefix+"ss"+str(thisSubSample)
|
setName = prefix+"ss"+str(thisSubSample)
|
||||||
writeScript(setName, redshiftFileBase, scriptDir, catalogDir, redshifts,
|
writeScript(setName, particleFileBase, scriptDir, catalogDir, fileNums,
|
||||||
|
redshifts,
|
||||||
numSubvolumes, numSlices, True, lbox, minRadius, omegaM,
|
numSubvolumes, numSlices, True, lbox, minRadius, omegaM,
|
||||||
subsample=thisSubSample, suffix="")
|
subsample=thisSubSample, suffix="")
|
||||||
writeScript(setName, redshiftFileBase, scriptDir, catalogDir, redshifts,
|
writeScript(setName, particleFileBase, scriptDir, catalogDir, fileNums,
|
||||||
|
redshifts,
|
||||||
numSubvolumes, numSlices, False, lbox, minRadius, omegaM,
|
numSubvolumes, numSlices, False, lbox, minRadius, omegaM,
|
||||||
subsample=thisSubSample, suffix="")
|
subsample=thisSubSample, suffix="")
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,11 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
|
||||||
else:
|
else:
|
||||||
includePecVelString = ""
|
includePecVelString = ""
|
||||||
|
|
||||||
|
if sample.useLightCone:
|
||||||
|
useLightConeString = "cosmo"
|
||||||
|
else:
|
||||||
|
useLightConeString = ""
|
||||||
|
|
||||||
if sample.dataFormat == "multidark":
|
if sample.dataFormat == "multidark":
|
||||||
dataFileLine = "multidark " + datafile
|
dataFileLine = "multidark " + datafile
|
||||||
elif sample.dataFormat == "gadget":
|
elif sample.dataFormat == "gadget":
|
||||||
|
@ -119,6 +124,7 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
|
||||||
output %s
|
output %s
|
||||||
outputParameter %s
|
outputParameter %s
|
||||||
%s
|
%s
|
||||||
|
%s
|
||||||
rangeX_min %g
|
rangeX_min %g
|
||||||
rangeX_max %g
|
rangeX_max %g
|
||||||
rangeY_min %g
|
rangeY_min %g
|
||||||
|
@ -129,6 +135,7 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
|
||||||
""" % (dataFileLine, zobovDir+"/zobov_slice_"+sampleName,
|
""" % (dataFileLine, zobovDir+"/zobov_slice_"+sampleName,
|
||||||
zobovDir+"/zobov_slice_"+sampleName+".par",
|
zobovDir+"/zobov_slice_"+sampleName+".par",
|
||||||
includePecVelString,
|
includePecVelString,
|
||||||
|
useLightConeString,
|
||||||
xMin, xMax, yMin, yMax,
|
xMin, xMax, yMin, yMax,
|
||||||
sample.zBoundaryMpc[0], sample.zBoundaryMpc[1],
|
sample.zBoundaryMpc[0], sample.zBoundaryMpc[1],
|
||||||
sample.subsample)
|
sample.subsample)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue