artemis.externals.physt.histogram_collection¶
Module Contents¶
-
class
artemis.externals.physt.histogram_collection.HistogramCollection(*histograms: Histogram1D, binning: Optional[BinningBase] = None, title: Optional[str] = None, name: Optional[str] = None)¶ Bases:
Container[Histogram1D]Experimental collection of histograms.
It contains (potentially nama-addressable) histograms with a shared binning.
-
__contains__(self, item)¶
-
property
ndim(self)¶
-
__iter__(self)¶
-
__len__(self)¶
-
copy(self)¶
-
property
binning(self)¶
-
property
bins(self)¶
-
property
axis_name(self)¶
-
property
axis_names(self)¶
-
add(self, histogram: Histogram1D)¶ Add a histogram to the collection.
-
create(self, name: str, values, *, weights=None, dropna: bool = True, **kwargs)¶
-
__getitem__(self, item)¶
-
__eq__(self, other)¶
-
normalize_bins(self, inplace: bool = False)¶ Normalize each bin in the collection so that the sum is 1.0 for each bin.
Note: If a bin is zero in all collections, the result will be inf.
-
sum(self)¶ Return the sum of all contained histograms.
-
property
plot(self)¶
-
classmethod
multi_h1(cls, a_dict: Dict[str, Any], bins=None, **kwargs)¶ Create a collection from multiple datasets.
-
classmethod
from_dict(cls, a_dict: dict)¶
-
to_dict(self)¶
-