changed voronoi plotting to take void index rather than ID

This commit is contained in:
Paul M. Sutter 2025-01-18 21:13:51 +10:00
parent ad2d3722cc
commit b79046ac22
2 changed files with 9 additions and 17 deletions

View file

@ -453,7 +453,7 @@ def loadVoidCatalog(sampleDir, dataPortion="central", loadParticles=True,
catalog.part[iEdge].edgeFlag = edgeFlags[iEdge]
else:
print(" Edge file not found!")
catalog.part[:].edgeFlag = 0
#catalog.part[:].edgeFlags = 0
print(" Loading volumes...")
if sample.hasWeightedVolumes:
@ -485,22 +485,13 @@ def loadVoidCatalog(sampleDir, dataPortion="central", loadParticles=True,
print(" Sanity checking adjacenies...")
nBad = 0
## TEST - writing bad galaxies to file
#badGalFile = open("badgal.txt", "w")
for p in range(numPart):
catalog.part[p].nadjs = len(catalog.part[p].adjs)
nHave = len(catalog.part[p].adjs)
nExpected = nadjPerPart[p]
if (nHave != nExpected): print(" Error for particle %d: Have %d adj, expected %d (flag: %d)" % (p, nHave, nExpected, catalog.part[p].edgeFlag))
#if (catalog.part[p].edgeFlag == 0):
# badGalFile.write("%e %e %e\n" % (catalog.part[p].x, catalog.part[p].y, catalog.part[p].z))
# nBad += 1
if (nHave != nExpected and catalog.part[p].edgeFlag == 0):
print(" Error for particle %d: Have %d adj, expected %d (flag: %d)" % (p, nHave, nExpected, catalog.part[p].edgeFlag))
#print("NUMBER OF BAD GALAXIES: %d" % nBad)
#badGalFile.close()
print(" Loading zone-void membership info...")
zoneFile = sampleDir+"/voidZone_"+sample.fullName+".dat"
catalog.void2Zones = []