sup3r.qa.utilities.continuous_dist

continuous_dist(diffs, bins=None, range=None, interpolate=False)[source]

Get interpolated distribution from histogram

Parameters:
  • diffs (ndarray) – Array of values to use to construct distribution

  • bins (int) – Number of bins for the distribution. If None then the number of bins will be determined from the value range and the smallest difference between values

  • range (tuple | None) – Optional min/max range for the distribution.

  • interpolate (bool) – Whether to interpolate over histogram counts. e.g. if a bin has count = 0 and surrounding bins have count > 0 the bin with count = 0 will have an interpolated value.

Returns:

  • ndarray – distribution value counts

  • ndarray – distribution values at bin centers