mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
parameters added to scripts to handle real-space analysis
This commit is contained in:
parent
1c68b64948
commit
5c4be39a99
3 changed files with 15 additions and 4 deletions
|
@ -20,14 +20,22 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import healpy as healpy
|
import healpy as healpy
|
||||||
import scipy.integrate
|
import scipy.integrate
|
||||||
|
import void_python_tools as ct
|
||||||
|
|
||||||
__all__=['getSurveyProps']
|
__all__=['getSurveyProps']
|
||||||
|
|
||||||
# returns the volume and galaxy density for a given redshit slice
|
# 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)
|
mask = healpy.read_map(maskFile)
|
||||||
area = (1.*np.size(np.where(mask > 0)) / np.size(mask)) * 4.*np.pi
|
area = (1.*np.size(np.where(mask > 0)) / np.size(mask)) * 4.*np.pi
|
||||||
|
|
||||||
|
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
|
zmin = zmin * 3000
|
||||||
zmax = zmax * 3000
|
zmax = zmax * 3000
|
||||||
volume = area * (zmax**3 - zmin**3) / 3
|
volume = area * (zmax**3 - zmin**3) / 3
|
||||||
|
|
|
@ -76,6 +76,7 @@ class Sample:
|
||||||
includeInHubble = True
|
includeInHubble = True
|
||||||
partOfCombo = False
|
partOfCombo = False
|
||||||
isCombo = False
|
isCombo = False
|
||||||
|
useLCDM = False # if True, convert population to comoving coordinates
|
||||||
comboList = []
|
comboList = []
|
||||||
|
|
||||||
# applies to simulations only
|
# applies to simulations only
|
||||||
|
@ -96,6 +97,7 @@ class Sample:
|
||||||
comboList=(), profileBinSize=2.0, skyFraction=0.19,
|
comboList=(), profileBinSize=2.0, skyFraction=0.19,
|
||||||
boxLen=1024, usePecVel=False, omegaM=0.27,
|
boxLen=1024, usePecVel=False, omegaM=0.27,
|
||||||
numSubvolumes=1, mySubvolume=1, dataFormat="sdss",
|
numSubvolumes=1, mySubvolume=1, dataFormat="sdss",
|
||||||
|
useLCDM=False,
|
||||||
dataType="observation",
|
dataType="observation",
|
||||||
subsample=1.0, useLightCone=True):
|
subsample=1.0, useLightCone=True):
|
||||||
self.dataFile = dataFile
|
self.dataFile = dataFile
|
||||||
|
@ -126,6 +128,7 @@ class Sample:
|
||||||
self.subsample = subsample
|
self.subsample = subsample
|
||||||
self.useLightCone = useLightCone
|
self.useLightCone = useLightCone
|
||||||
self.dataUnit = dataUnit
|
self.dataUnit = dataUnit
|
||||||
|
self.useLCDM = useLCDM
|
||||||
|
|
||||||
self.stacks = []
|
self.stacks = []
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue