I have a large array of elements that I call RelDist(in which dimensionally, it is a unit of distance) in a simulated volume. I am trying to determine the distribution for "the number of values per unit volume", which is also the density of the number. It should look like this diagram:
I know that the axis scales in database 10, the dialing chart should definitely fall.

Mathematically, I set it as two equivalent equations:

where N is the number of elements in the array that differentiate with respect to the natural logarithm of distances. It can also be equivalently rewritten as a regular derivative by introducing another factor r.
Equivalently

, r N r.
.
1
dN/dlnr/volume
def n(dist, numbins):
logdist= np.log(dist)
hist, r_array = np.histogram(logdist, numbins)
dlogR = r_array[1]-r_array[0]
x_array = r_array[1:] - dlogR/2
dR = r_array[1:] - r_array[0:numbins]
dN_dlogR = hist * x_array/dR
volume = 4*np.pi*dist*dist*dist
return [x_array, dN_dlogR/volume]
, , , , , . , ?
2
dN/dr/volume.
numbins = np.linspace(min(RelDist),max(RelDist), 100)
hist, r_array = np.histogram(RelDist, numbins)
volume = 4*np.float(1000**2)
dR = r_array[1]-r_array[0]
x_array = r_array[1:] - dR/2
y = hist/dR
, , , , .
, ?
R 10, R, R 20, , 30, .. ..
txt , .
https://www.dropbox.com/s/g40gp88k2p6pp6y/RelDist.txt?dl=0