mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
cumulaive instead of differential number function
This commit is contained in:
parent
0bcdc3dfa5
commit
c180c23a05
1 changed files with 7 additions and 0 deletions
|
@ -72,6 +72,13 @@ def plotNumberFunction(catalogList, figDir="./",
|
|||
bins = 100./5.
|
||||
hist, binEdges = np.histogram(data, bins=bins, range=(0., 100.))
|
||||
binCenters = 0.5*(binEdges[1:] + binEdges[:-1])
|
||||
|
||||
foundStart = False
|
||||
for iBin in xrange(len(hist)):
|
||||
if not foundStart and hist[iBin] == 0:
|
||||
continue
|
||||
foundStart = True
|
||||
hist[iBin] = np.sum(hist[iBin:])
|
||||
|
||||
nvoids = len(data)
|
||||
var = hist * (1. - hist/nvoids)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue