mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
fixed handling of maskfile and comoving coords in loadPart
This commit is contained in:
parent
e728e4a152
commit
7c9086efb8
1 changed files with 9 additions and 2 deletions
|
@ -27,6 +27,7 @@ from void_python_tools.backend import *
|
||||||
import void_python_tools.apTools as vp
|
import void_python_tools.apTools as vp
|
||||||
import pickle
|
import pickle
|
||||||
from periodic_kdtree import PeriodicCKDTree
|
from periodic_kdtree import PeriodicCKDTree
|
||||||
|
import os
|
||||||
|
|
||||||
NetCDFFile = Dataset
|
NetCDFFile = Dataset
|
||||||
ncFloat = 'f8'
|
ncFloat = 'f8'
|
||||||
|
@ -95,11 +96,17 @@ def loadPart(sampleDir):
|
||||||
boxLen = mul
|
boxLen = mul
|
||||||
|
|
||||||
if isObservation == 1:
|
if isObservation == 1:
|
||||||
props = vp.getSurveyProps(sample.maskFile, sample.zBoundary[0],
|
# look for the mask file
|
||||||
|
if os.access(sample.maskFile, os.F_OK):
|
||||||
|
maskFile = sample.maskFile
|
||||||
|
else:
|
||||||
|
maskFile = sampleDir+"/"+os.path.basename(sample.maskFile)
|
||||||
|
print "Using maskfile found in:", maskFile
|
||||||
|
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",
|
||||||
useLCDM=sample.useLCDM)
|
useLCDM=sample.useComoving)
|
||||||
boxVol = props[0]
|
boxVol = props[0]
|
||||||
volNorm = maskIndex/boxVol
|
volNorm = maskIndex/boxVol
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue