Hist1d#
- class atompy.Hist1d(_histogram: numpy.ndarray[tuple[Any, ...], numpy.dtype[numpy.float64]], _edges: numpy.ndarray[tuple[Any, ...], numpy.dtype[numpy.float64]])[source]#
- Attributes:
binsGet the number of bins.
binwidthsGet the widths of each bin.
centersReturn centers of the histogram’s bins
edgesReturn the bin edges.
for_plotReturns bin-centers and bin-values
for_stepReturns right edges and bin-values
histogramThe values of the histogram.
integralCalculate integral of histogram.
normalized_to_integralReturns the histogram normalized to its integral.
normalized_to_maxReturns the histogram normalized to its maximum.
normalized_to_sumReturns the histogram normalized to its sum.
sumReturns sum of histogram.
Methods
rebinned(factor)Rebin histogram
save_to_file(fname, **kwargs)Save histogram to file (i.e., centers and bin-values)
within_range(range_[, keepdims])Return a
Hist1donly within range_[0] and range_[1].without_range(range_)Return a
Hist1dexcluding everything within range_[0] and range_[1].