cumulaive instead of differential number function

This commit is contained in:
P.M. Sutter 2014-05-13 15:42:20 -04:00
parent 0bcdc3dfa5
commit c180c23a05

View file

@ -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)