mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
can now select gadget units in preparation script
This commit is contained in:
parent
95db063b7b
commit
ed3f18f6d0
2 changed files with 5 additions and 3 deletions
|
@ -28,6 +28,7 @@ dataType = "simulation"
|
||||||
|
|
||||||
# available formats for simulation: gadget, multidark
|
# available formats for simulation: gadget, multidark
|
||||||
dataFormat = "gadget"
|
dataFormat = "gadget"
|
||||||
|
dataUnit = 1 # as multiple of Mpc/h
|
||||||
|
|
||||||
# place particles on the lightcone?
|
# place particles on the lightcone?
|
||||||
useLightCone = False
|
useLightCone = False
|
||||||
|
@ -131,6 +132,7 @@ logDir = "{logDir}/{setName}/"
|
||||||
sampleInfo = """
|
sampleInfo = """
|
||||||
newSample = Sample(dataFile = "{dataFile}",
|
newSample = Sample(dataFile = "{dataFile}",
|
||||||
dataFormat = "{dataFormat}",
|
dataFormat = "{dataFormat}",
|
||||||
|
dataUnit = {dataUnit},
|
||||||
fullName = "{sampleName}",
|
fullName = "{sampleName}",
|
||||||
nickName = "{sampleName}",
|
nickName = "{sampleName}",
|
||||||
dataType = "simulation",
|
dataType = "simulation",
|
||||||
|
@ -197,6 +199,7 @@ dataSampleList.append(newSample)
|
||||||
|
|
||||||
scriptFile.write(sampleInfo.format(dataFile=dataFileName,
|
scriptFile.write(sampleInfo.format(dataFile=dataFileName,
|
||||||
dataFormat=dataFormat,
|
dataFormat=dataFormat,
|
||||||
|
dataUnit=dataUnit,
|
||||||
sampleName=sampleName,
|
sampleName=sampleName,
|
||||||
zMin=sliceMin,
|
zMin=sliceMin,
|
||||||
zMax=sliceMax,
|
zMax=sliceMax,
|
||||||
|
|
|
@ -110,7 +110,6 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
|
||||||
dataFileLine = "multidark " + datafile
|
dataFileLine = "multidark " + datafile
|
||||||
elif sample.dataFormat == "gadget":
|
elif sample.dataFormat == "gadget":
|
||||||
dataFileLine = "gadget " + datafile
|
dataFileLine = "gadget " + datafile
|
||||||
useGadgetUnit = "gadgetUnit=1"
|
|
||||||
|
|
||||||
iX = float(sample.mySubvolume[0])
|
iX = float(sample.mySubvolume[0])
|
||||||
iY = float(sample.mySubvolume[1])
|
iY = float(sample.mySubvolume[1])
|
||||||
|
@ -126,7 +125,7 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
|
||||||
outputParameter %s
|
outputParameter %s
|
||||||
%s
|
%s
|
||||||
%s
|
%s
|
||||||
%s
|
gadgetUnit %g
|
||||||
rangeX_min %g
|
rangeX_min %g
|
||||||
rangeX_max %g
|
rangeX_max %g
|
||||||
rangeY_min %g
|
rangeY_min %g
|
||||||
|
@ -138,7 +137,7 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
|
||||||
zobovDir+"/zobov_slice_"+sampleName+".par",
|
zobovDir+"/zobov_slice_"+sampleName+".par",
|
||||||
includePecVelString,
|
includePecVelString,
|
||||||
useLightConeString,
|
useLightConeString,
|
||||||
useGadgetUnit,
|
sample.gadgetUnit,
|
||||||
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