+ 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:
Paul M. Sutter 2025-03-04 14:07:36 -05:00
parent b79046ac22
commit 326756b2bc
8 changed files with 73 additions and 61 deletions

View file

@ -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'))