Hist1d#

class atompy.Hist1d(_histogram: numpy.ndarray[tuple[Any, ...], numpy.dtype[numpy.float64]], _edges: numpy.ndarray[tuple[Any, ...], numpy.dtype[numpy.float64]])[source]#
Attributes:
bins

Get the number of bins.

binwidths

Get the widths of each bin.

centers

Return centers of the histogram’s bins

edges

Return the bin edges.

for_plot

Returns bin-centers and bin-values

for_step

Returns right edges and bin-values

histogram

The values of the histogram.

integral

Calculate integral of histogram.

normalized_to_integral

Returns the histogram normalized to its integral.

normalized_to_max

Returns the histogram normalized to its maximum.

normalized_to_sum

Returns the histogram normalized to its sum.

sum

Returns 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 Hist1d only within range_[0] and range_[1].

without_range(range_)

Return a Hist1d excluding everything within range_[0] and range_[1].