match_histogram¶
- openpnm.models.misc.match_histogram(target, bin_centers, bin_heights, element='pore')[source]¶
Generate values corresponding to a given histogram
- Parameters
target (OpenPNM Base object) – Object with which this model is associated. This controls the length of the calculated array, and also provides access to other necessary properties.
bin_centers (array_like) – The x-axis of the histogram, such as pore sizes.
bin_heights (array_like) – The y-axis of the histogram, such as the number of pores of each size.
element (str) – Controls how many values to generate. Can either be ‘pore’ or ‘throat’.
- Returns
values – Values corresponding to
bin_centers
generated in proportion to the respectivebin_heights
.- Return type
ndarray