mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
+ radial profiles now full actual density from survey volume, not zobov normalization
+ getVolNorm provides both zobov normalization and average density from survey volume for observations + significant update and cleanup to plotting routines
This commit is contained in:
parent
b79046ac22
commit
326756b2bc
8 changed files with 73 additions and 61 deletions
|
@ -194,11 +194,9 @@ def findEdgeGalaxies(galFile, maskFile, edgeGalFile, contourFile,
|
|||
rayDist = meanPartSep
|
||||
raySteps = np.arange(zmin, zmax, rayDist)
|
||||
log.write(" Will take %d steps per ray with %.2e distance between steps\n" % (len(raySteps), rayDist))
|
||||
#print(meanPartSep, len(raySteps))
|
||||
|
||||
contourPixels = np.nonzero(contourMap)[0]
|
||||
log.write(" We have %d rays to work with\n" % (len(contourPixels)))
|
||||
#print(contourPixels)
|
||||
for pixel in contourPixels:
|
||||
#print("Working with pixel %d" % pixel)
|
||||
vec = healpy.pix2vec(nside,pixel)
|
||||
|
@ -227,6 +225,11 @@ def findEdgeGalaxies(galFile, maskFile, edgeGalFile, contourFile,
|
|||
dist, nearest = galTree.query(minEdge)
|
||||
flagList[nearest] = 3
|
||||
|
||||
log.write(" Flagging statistics:\n")
|
||||
log.write(" %d original galaxies\n" % len(flagList))
|
||||
log.write(" %d near edges\n" % len(flagList[flagList==1]))
|
||||
log.write(" %d near redshift bounds\n" % len(flagList[flagList==2]))
|
||||
log.write(" %d remaining\n" % len(flagList[flagList==0]))
|
||||
# output flag information
|
||||
log.write(" Saving galaxy flags to file...\n")
|
||||
np.savetxt(edgeGalFile, flagList, fmt="%d")
|
||||
|
@ -243,7 +246,8 @@ def findEdgeGalaxies(galFile, maskFile, edgeGalFile, contourFile,
|
|||
ipix = healpy.ang2pix(nside, theta, phi)
|
||||
np.put(flagMap, ipix, 1)
|
||||
|
||||
healpy.write_map(outputDir+"/flagged_galaxies.fits", flagMap, overwrite=True,
|
||||
healpy.write_map(outputDir+"/flagged_galaxies.fits", flagMap,
|
||||
overwrite=True,
|
||||
dtype=np.dtype('float64'))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue