opcsim.utils.
midpoints
(bins, base='log')¶Returns a 3xn array of bin diameters.
Build a 3xn array of bin diameters from a 2xn array that can then be fed directly into the OPC class. The default behaviour is to space the bins equally on a log10 basis.
A 2xn array with bin boundaries.
Returns a 3xn_bins array in the format of [left edge, midpoint, right edge]
Examples
Build a set of bins for an OPC similar to a Dylos DC1100 Pro:
>>> arr = np.array([0.5, 2.5], [2.5, 10])
>>> bins = opcsim.utils.midpoints(arr)