+ 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

@ -279,12 +279,12 @@ class PeriodicCKDTree(cKDTree):
retshape = np.shape(x)[:-1]
if retshape!=():
if k>1:
dd = np.empty(retshape+(k,),dtype=np.float)
dd = np.empty(retshape+(k,),dtype=float)
dd.fill(np.inf)
ii = np.empty(retshape+(k,),dtype=np.int)
ii.fill(self.n)
elif k==1:
dd = np.empty(retshape,dtype=np.float)
dd = np.empty(retshape,dtype=float)
dd.fill(np.inf)
ii = np.empty(retshape,dtype=np.int)
ii.fill(self.n)
@ -310,7 +310,7 @@ class PeriodicCKDTree(cKDTree):
else:
return np.inf, self.n
elif k>1:
dd = np.empty(k,dtype=np.float)
dd = np.empty(k,dtype=float)
dd.fill(np.inf)
ii = np.empty(k,dtype=np.int)
ii.fill(self.n)
@ -368,7 +368,7 @@ class PeriodicCKDTree(cKDTree):
save substantial amounts of time by putting them in a
PeriodicCKDTree and using query_ball_tree.
"""
x = np.asarray(x).astype(np.float)
x = np.asarray(x).astype(float)
if x.shape[-1] != self.m:
raise ValueError("Searching for a %d-dimensional point in a " \
"%d-dimensional KDTree" % (x.shape[-1], self.m))