mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +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 "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
|
||||
|
||||
|
|
|
@ -33,10 +33,13 @@ dataFormat = "gadget"
|
|||
useLightCone = False
|
||||
|
||||
# common filename of particle files
|
||||
redshiftFileBase = "mdr1_particles_z"
|
||||
particleFileBase = "mdr1_particles_z"
|
||||
|
||||
# list of redshifts for the particle files
|
||||
# to get particle file name, we take redshiftFileBase+redshift
|
||||
# list of file numbers for the particle files
|
||||
# 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"))
|
||||
|
||||
# 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
|
||||
def writeScript(setName, dataFileNameBase,
|
||||
scriptDir, catalogDir, redshifts, numSubvolumes,
|
||||
scriptDir, catalogDir, fileNums, redshifts, numSubvolumes,
|
||||
numSlices, useVel, lbox, minRadius, omegaM, subsample=1.0,
|
||||
suffix=".dat"):
|
||||
|
||||
|
@ -149,7 +152,8 @@ newSample = Sample(dataFile = "{dataFile}",
|
|||
dataSampleList.append(newSample)
|
||||
"""
|
||||
|
||||
for redshift in redshifts:
|
||||
for (iFile, redshift) in enumerate(redshifts):
|
||||
fileNum = fileNums[iFile]
|
||||
zBox = float(redshift)
|
||||
Om = float(omegaM)
|
||||
zBoxMpc = LIGHT_SPEED/100.*vp.angularDiameter(zBox, Om=Om)
|
||||
|
@ -181,7 +185,7 @@ dataSampleList.append(newSample)
|
|||
sliceMinMpc = "%0.1f" % sliceMinMpc
|
||||
sliceMaxMpc = "%0.1f" % sliceMaxMpc
|
||||
|
||||
dataFileName = dataFileNameBase + redshift + suffix
|
||||
dataFileName = dataFileNameBase + fileNum + suffix
|
||||
|
||||
for iX in xrange(numSubvolumes):
|
||||
for iY in xrange(numSubvolumes):
|
||||
|
@ -228,10 +232,12 @@ for thisSubSample in subSamples:
|
|||
|
||||
print " Doing subsample", thisSubSample, " scripts"
|
||||
setName = prefix+"ss"+str(thisSubSample)
|
||||
writeScript(setName, redshiftFileBase, scriptDir, catalogDir, redshifts,
|
||||
writeScript(setName, particleFileBase, scriptDir, catalogDir, fileNums,
|
||||
redshifts,
|
||||
numSubvolumes, numSlices, True, lbox, minRadius, omegaM,
|
||||
subsample=thisSubSample, suffix="")
|
||||
writeScript(setName, redshiftFileBase, scriptDir, catalogDir, redshifts,
|
||||
writeScript(setName, particleFileBase, scriptDir, catalogDir, fileNums,
|
||||
redshifts,
|
||||
numSubvolumes, numSlices, False, lbox, minRadius, omegaM,
|
||||
subsample=thisSubSample, suffix="")
|
||||
|
||||
|
|
|
@ -101,6 +101,11 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
|
|||
else:
|
||||
includePecVelString = ""
|
||||
|
||||
if sample.useLightCone:
|
||||
useLightConeString = "cosmo"
|
||||
else:
|
||||
useLightConeString = ""
|
||||
|
||||
if sample.dataFormat == "multidark":
|
||||
dataFileLine = "multidark " + datafile
|
||||
elif sample.dataFormat == "gadget":
|
||||
|
@ -119,6 +124,7 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
|
|||
output %s
|
||||
outputParameter %s
|
||||
%s
|
||||
%s
|
||||
rangeX_min %g
|
||||
rangeX_max %g
|
||||
rangeY_min %g
|
||||
|
@ -129,6 +135,7 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
|
|||
""" % (dataFileLine, zobovDir+"/zobov_slice_"+sampleName,
|
||||
zobovDir+"/zobov_slice_"+sampleName+".par",
|
||||
includePecVelString,
|
||||
useLightConeString,
|
||||
xMin, xMax, yMin, yMax,
|
||||
sample.zBoundaryMpc[0], sample.zBoundaryMpc[1],
|
||||
sample.subsample)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue