FlatDistTransform

class hep_spt.FlatDistTransform(points, values=None, kind='cubic')[source]

Bases: object

Build the class from a given set of values following a certain distribution (the use of weights is allowed), or x and y values of a PDF. This last method is not recommended, since the precision relies on the dispersion of the values, sometimes concentrated around peaking regions which might not be well described by an interpolation.

Parameters
  • points (numpy.ndarray) – x-values of the distribution (PDF).

  • values (numpy.ndarray) – weights or PDF values to use.

  • kind (str or int) – kind of interpolation to use. For more details see scipy.interpolate.interp1d().

Methods Summary

transform(values)

Return the value of the transformation of the given values.

Methods Documentation

transform(values)[source]

Return the value of the transformation of the given values.

Parameters

values (numpy.ndarray) – values to transform.