Tesllation seems stable with new boundary handling procedure. Rooted out strange adjacency record-keeping due to some galaxies connecting to guard particles. Zobov still generates warning about guard particle encounters, but this is fine for observational datasets because we don't trust the tesselation at the edge galaxies anyway.

This commit is contained in:
Paul M. Sutter 2025-01-16 18:40:54 +08:00
parent 091cf5d1dc
commit 5d93a8a737
8 changed files with 63 additions and 12 deletions

View file

@ -21,8 +21,8 @@
import os
from numpy import abs
import matplotlib as mpl
mpl.use('Agg')
#import matplotlib as mpl
#mpl.use('Agg')
LIGHT_SPEED = 299792.458

View file

@ -118,6 +118,7 @@ def launchPrep(sample, binPath, workDir=None, inputDataDir=None,
# flag edge galaxies with python routine for now
galFile = outputDir+"/zobov_slice_"+sampleName
os.system("mv %s %s" % ("galaxies.txt", outputDir))
#galFile = outputDir + "galaxies.txt"
edgeGalFile = outputDir + "/galaxy_edge_flags.txt"
contourFile = outputDir + "/contour_map.fits"
@ -481,7 +482,7 @@ def launchZobov(sample, binPath, outputDir=None, logDir=None, continueRun=None,
edgeFlags = np.loadtxt(edgeFile, dtype=np.int32)
# set edge galaxy volumes to nearly 0 (implying very high density)
vols[ edgeFlags>0 ] = 1.e-4
vols[ edgeFlags>0 ] = 1.e-10
volFile = outputDir+"/vol_weighted_"+sampleName+".dat"
with open(volFile, mode='wb') as File:
@ -493,7 +494,6 @@ def launchZobov(sample, binPath, outputDir=None, logDir=None, continueRun=None,
else:
volFileToUse = outputDir+"/vol_"+sampleName+".dat"
cmd = [binPath+"/jozov2", \
outputDir+"/adj_"+sampleName+".dat", \
volFileToUse, \

View file

@ -146,6 +146,7 @@ def findEdgeGalaxies(galFile, maskFile, edgeGalFile, contourFile,
# load in galaxies
#galPos = np.genfromtxt(galFile)
# TODO - WHY IS THIS FASTER THAN np.column_stack???
galPos = np.genfromtxt(outputDir+"/galaxies.txt")
with open(galFile, 'rb') as File:
chk = np.fromfile(File, dtype=np.int32,count=1)