mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
checkpoint for cleaning up output files and consolidating
This commit is contained in:
parent
acdb19e6df
commit
d6a939d2cf
3 changed files with 214 additions and 249 deletions
|
@ -299,35 +299,35 @@ def findEdgeGalaxies(galFile, maskFile, edgeGalFile, contourFile,
|
|||
log.write(" Saving galaxy flags to file...\n")
|
||||
np.savetxt(edgeGalFile, flagList, fmt="%d")
|
||||
|
||||
# paint galaxy flags onto healpix map for diagnostics
|
||||
# TODO - drop this when done testing
|
||||
log.write(" Saving diagnostic maps to file...\n")
|
||||
flagMap = np.zeros(len(contourMap))
|
||||
justEdgeRA = RA[flagList == 1]
|
||||
justEdgeDec = Dec[flagList == 1]
|
||||
## paint galaxy flags onto healpix map for diagnostics
|
||||
## TODO - drop this when done testing
|
||||
#log.write(" Saving diagnostic maps to file...\n")
|
||||
#flagMap = np.zeros(len(contourMap))
|
||||
#justEdgeRA = RA[flagList == 1]
|
||||
#justEdgeDec = Dec[flagList == 1]
|
||||
|
||||
phi, theta = convertAngle(justEdgeRA, justEdgeDec)
|
||||
#phi, theta = convertAngle(justEdgeRA, justEdgeDec)
|
||||
|
||||
ipix = healpy.ang2pix(nside, theta, phi)
|
||||
for i in ipix:
|
||||
flagMap[i] += 1
|
||||
#np.put(flagMap, ipix, 1)
|
||||
#ipix = healpy.ang2pix(nside, theta, phi)
|
||||
#for i in ipix:
|
||||
# flagMap[i] += 1
|
||||
##np.put(flagMap, ipix, 1)
|
||||
|
||||
healpy.write_map(outputDir+"/flagged_galaxies.fits", flagMap,
|
||||
overwrite=True,
|
||||
dtype=np.dtype('float64'))
|
||||
#healpy.write_map(outputDir+"/flagged_galaxies.fits", flagMap,
|
||||
# overwrite=True,
|
||||
# dtype=np.dtype('float64'))
|
||||
|
||||
|
||||
allGalMap = np.zeros(len(contourMap))
|
||||
phi, theta = convertAngle(RA, Dec)
|
||||
#allGalMap = np.zeros(len(contourMap))
|
||||
#phi, theta = convertAngle(RA, Dec)
|
||||
|
||||
ipix = healpy.ang2pix(nside, theta, phi)
|
||||
for i in ipix:
|
||||
allGalMap[i] += 1
|
||||
#np.put(allGalMap, ipix, 1)
|
||||
#ipix = healpy.ang2pix(nside, theta, phi)
|
||||
#for i in ipix:
|
||||
# allGalMap[i] += 1
|
||||
##np.put(allGalMap, ipix, 1)
|
||||
|
||||
healpy.write_map(outputDir+"/all_galaxies.fits", allGalMap,
|
||||
overwrite=True,
|
||||
dtype=np.dtype('float64'))
|
||||
#healpy.write_map(outputDir+"/all_galaxies.fits", allGalMap,
|
||||
# overwrite=True,
|
||||
# dtype=np.dtype('float64'))
|
||||
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue