I am working with droplets distribution, for purpose of my work I would like to create droplet distribution plot. In this case I need lognorm.pdf
for scipy
. Unfortunately scipy
build function lognorm.pdf
has an equation like this:
lognorm.pdf(x, s) = 1 / (s*x*sqrt(2*pi)) * exp(-1/2*(log(x)/s)**2)
For my case I want to use a formula form Wikipedia:
pdf = 1 / (s*x*sqrt(2*pi)) * exp(-1/2*((log(x)-mu)/s)**2)
The best equation would be like this:
(np.exp(-(np.log10(x) - np.log10(mu))**2 / (2 * np.log10(s)**2)) / ( np.log10(s) * np.sqrt(2 * np.pi)))*N
I do have a code which follows the lest equation, but I just wonder if there is any way of doing this with scipy
or any other python library?