mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
redshift boundary tolerance is now user-selectable
This commit is contained in:
parent
c0a69c4536
commit
7e5a51d931
8 changed files with 26 additions and 20 deletions
|
@ -130,11 +130,13 @@ def figureOutMask(galFile, nside, outMaskFile):
|
|||
# figures out which galaxies live on a mask edge, and also writes the edge
|
||||
# map to an auxillary file
|
||||
def findEdgeGalaxies(galFile, maskFile, edgeGalFile, edgeMaskFile,
|
||||
zmin, zmax, omegaM, useComoving=False):
|
||||
zmin, zmax, omegaM, useComoving, boundaryWidth):
|
||||
|
||||
#if useComoving:
|
||||
# zmin = LIGHT_SPEED/100.*comovingDistance(zmin, Om=omegaM)
|
||||
# zmax = LIGHT_SPEED/100.*comovingDistance(zmax, Om=omegaM)
|
||||
if useComoving:
|
||||
zmin = comovingDistance(zmin, Om=omegaM)
|
||||
zmax = comovingDistance(zmax, Om=omegaM)
|
||||
#zmin = LIGHT_SPEED/100.*comovingDistance(zmin, Om=omegaM)
|
||||
#zmax = LIGHT_SPEED/100.*comovingDistance(zmax, Om=omegaM)
|
||||
#else:
|
||||
# zmin *= LIGHT_SPEED/100.
|
||||
# zmax *= LIGHT_SPEED/100.
|
||||
|
@ -166,8 +168,7 @@ def findEdgeGalaxies(galFile, maskFile, edgeGalFile, edgeMaskFile,
|
|||
isOnMaskEdge = any(mask[p] == 0 for p in neighbors)
|
||||
|
||||
# check the redshift boundaries
|
||||
tol = 0.05 # TODO: made this user-adjustable
|
||||
zbuffer = (zmax-zmin)*tol
|
||||
zbuffer = (zmax-zmin)*boundaryWidth
|
||||
isOnHighZEdge = (z >= zmax-zbuffer)
|
||||
isOnLowZEdge = (z <= zmin+zbuffer)
|
||||
|
||||
|
@ -182,6 +183,7 @@ def findEdgeGalaxies(galFile, maskFile, edgeGalFile, edgeMaskFile,
|
|||
edgeFile.write("0\n")
|
||||
|
||||
edgeFile.close()
|
||||
healpy.write_map(edgeMaskFile, edgeMask, overwrite=True, dtype=np.dtype('float64'))
|
||||
healpy.write_map(edgeMaskFile, edgeMask, overwrite=True,
|
||||
dtype=np.dtype('float64'))
|
||||
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue