match_histogram#
- match_histogram(network, bin_centers, bin_heights, element='pore')[source]#
Generate values corresponding to a given histogram
- Parameters:
network (OpenPNM Network object) – The network object to which this model is associated (i.e. attached). This controls the length of the calculated array(s), 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