mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
carried boundary flags all the way through to pruning; cleaned up pruning routines
This commit is contained in:
parent
dd181da42a
commit
a45eca0b6e
5 changed files with 124 additions and 139 deletions
|
@ -161,18 +161,19 @@ def findEdgeGalaxies(galFile, maskFile, edgeGalFile, edgeMaskFile,
|
|||
phi, theta = convertAngle(RA, Dec)
|
||||
|
||||
# check the mask edges
|
||||
neighbors = healpy.get_all_neighbours(nside, theta, phi)
|
||||
isOnMaskEdge = any(p == 0 for p in neighbors)
|
||||
ipix = healpy.ang2pix(nside, theta, phi)
|
||||
neighbors = healpy.get_all_neighbours(nside, ipix)
|
||||
isOnMaskEdge = any(mask[p] == 0 for p in neighbors)
|
||||
|
||||
# check the redshift boundaries
|
||||
tol = 0.01 # TODO: made this user-adjustable
|
||||
tol = 0.05 # TODO: made this user-adjustable
|
||||
zbuffer = (zmax-zmin)*tol
|
||||
isOnHighZEdge = (z >= zmax-zbuffer)
|
||||
isOnLowZEdge = (z <= zmin+zbuffer)
|
||||
|
||||
print("DOING %f %f %f %f\n" % (zbuffer, z, zmax, zmin) )
|
||||
if isOnMaskEdge:
|
||||
edgeFile.write("1\n")
|
||||
edgeMask[ipix] = 1
|
||||
elif isOnHighZEdge:
|
||||
edgeFile.write("2\n")
|
||||
elif isOnLowZEdge:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue