diff --git a/python_tools/void_python_tools/apTools/profiles/getSurveyProps.py b/python_tools/void_python_tools/apTools/profiles/getSurveyProps.py index c4fcb35..f707e09 100644 --- a/python_tools/void_python_tools/apTools/profiles/getSurveyProps.py +++ b/python_tools/void_python_tools/apTools/profiles/getSurveyProps.py @@ -20,16 +20,24 @@ import numpy as np import healpy as healpy import scipy.integrate +import void_python_tools as ct __all__=['getSurveyProps'] # returns the volume and galaxy density for a given redshit slice -def getSurveyProps(maskFile, zmin, zmax, selFunMin, selFunMax, portion, selectionFuncFile=None): +def getSurveyProps(maskFile, zmin, zmax, selFunMin, selFunMax, portion, selectionFuncFile=None, useLCDM=False): + + LIGHT_SPEED = 299792.458 mask = healpy.read_map(maskFile) area = (1.*np.size(np.where(mask > 0)) / np.size(mask)) * 4.*np.pi - zmin = zmin * 3000 - zmax = zmax * 3000 + + if useLCDM: + zmin = LIGHT_SPEED/100.*ct.angularDiameter(zmin, Om=0.27) + zmax = LIGHT_SPEED/100.*ct.angularDiameter(zmax, Om=0.27) + else: + zmin = zmin * 3000 + zmax = zmax * 3000 volume = area * (zmax**3 - zmin**3) / 3 if selectionFuncFile != None: diff --git a/python_tools/void_python_tools/backend/classes.py b/python_tools/void_python_tools/backend/classes.py index 72701bd..43fee14 100644 --- a/python_tools/void_python_tools/backend/classes.py +++ b/python_tools/void_python_tools/backend/classes.py @@ -76,6 +76,7 @@ class Sample: includeInHubble = True partOfCombo = False isCombo = False + useLCDM = False # if True, convert population to comoving coordinates comboList = [] # applies to simulations only @@ -96,6 +97,7 @@ class Sample: comboList=(), profileBinSize=2.0, skyFraction=0.19, boxLen=1024, usePecVel=False, omegaM=0.27, numSubvolumes=1, mySubvolume=1, dataFormat="sdss", + useLCDM=False, dataType="observation", subsample=1.0, useLightCone=True): self.dataFile = dataFile @@ -126,6 +128,7 @@ class Sample: self.subsample = subsample self.useLightCone = useLightCone self.dataUnit = dataUnit + self.useLCDM = useLCDM self.stacks = [] diff --git a/python_tools/void_python_tools/backend/launchers.py b/python_tools/void_python_tools/backend/launchers.py index de7e6ee..b5e6a83 100644 --- a/python_tools/void_python_tools/backend/launchers.py +++ b/python_tools/void_python_tools/backend/launchers.py @@ -330,7 +330,7 @@ def launchPrune(sample, binPath, periodicLine = " --periodic='" + getPeriodic(sample) + "'" if useLCDM: - useLCDMFlag = "--useLCDM" + useLCDMFlag = " --useLCDM" else: useLCDMFlag = ""