resample_histogram1d
- pyirf.binning.resample_histogram1d(data, old_edges, new_edges, axis=0)[source]
Rebinning of a histogram by interpolation along a given axis.
- Parameters:
- data
numpy.ndarrayorastropy.units.Quantity Histogram.
- old_edges
numpy.arrayorastropy.units.Quantity Binning used to calculate
data.len(old_edges) - 1needs to equal the length ofdataalong interpolation axis (axis). If quantity, needs to be compatible tonew_edges.- new_edges
numpy.arrayorastropy.units.Quantity Binning of new histogram. If quantity, needs to be compatible to
old_edges.- axisint
Interpolation axis.
- data
- Returns:
numpy.ndarrayorastropy.units.QuantityInterpolated histogram with dimension according to
dataandnew_edges. Ifdatais a quantity, this has the same unit.