normal¶
- openpnm.models.geometry.throat_size.normal(target, scale, loc, seeds='throat.seed')[source]¶
Produces values from a Weibull distribution given a set of random numbers.
- Parameters
%(models.target.parameters)s –
%(models.misc.seeds)s –
mean (float) – The mean value of the distribution. This is referred to as the
loc
in the scipy.stats function, and this key word is also accepted.stddev (float) – The standard deviation of the distribution. This is referred to as the
scale
in the scipy.stats function, and this key word is also accepted.
- Returns
- Return type
%(models.misc.stats.returns)s
Examples
The following code illustrates the inner workings of this function, which uses the ‘norm’ method of the scipy.stats module. This can be used to find suitable values of ‘scale’ and ‘loc’.
import numpy import scipy.stats import matplotlib.pyplot as plt func = scipy.stats.norm(scale=.0001, loc=0.001) fig = plt.hist(func.ppf(q=numpy.random.rand(10000)), bins=50) plt.show()