opcsim 0.5.0
  • API
  • Tutorial
  • Gallery
  • Site
      • Installation
      • Contributing
      • API reference
      • Tutorial
      • Example gallery
  • Page
      • opcsim.utils.make_bins

opcsim.utils.make_bins¶

opcsim.utils.make_bins(dmin, dmax, n_bins, base='log')¶

Returns a 3xn array of bin diameters.

Build a 3xn array of bin diameters that can then be fed directly into the OPC class. The default behaviour is to space the bins equally on a log10 basis.

Parameters
dminfloat

Minimum particle diameter in microns

dmaxfloat

Maximum particle diameter in microns

n_binsint

Number of bins

base{‘log’ | ‘none’ | None}
Returns
binsarray

Returns a 3xn_bins array in the format of [left edge, midpoint, right edge]

Examples

Build a set of bins for an OPC with dmin=0.5, dmax=2.5, and 3 bins:

>>> bins = opcsim.utils.make_bins(0.5, 2.5, 3)

Back to top

Source

© Copyright 2016-2020, David H Hagan and Jesse H Kroll.
Created using Sphinx 3.0.3.