PartitionedHistogram1D#
- class libcasm.monte.sampling.PartitionedHistogram1D(
- self: PartitionedHistogram1D,
- partition_names: list[str],
- initial_begin: float = 0.0,
- bin_width: float = 1.0,
- is_log: bool = False,
- max_size: int = 10000,
Bases:
pybind11_object
Data structure for holding 1 or more 1D histograms of related data (i.e. event rates by event type)
Constructor
- Parameters:
partition_names (list[str]) – Names of the partitions. A separate histogram is created for each partition (i.e. activation energies for A-Va hops in one partition and activation energies for B-Va hops in another partition).
initial_begin (float = 0.0) – Initial begin coordinate, specifying the beginning of the range for the first bin. The bin number for a particular value is calculated as (value - begin) / bin_width, so the range for bin i is [begin, begin + i*bin_width). Coordinates are adjusted to fit the data encountered by starting begin at initial_begin and adjusting it as necessary by multiples of bin_width.
bin_width (float = 1.0) – Bin width.
is_log (bool = False) – True if bin coordinate spacing is log-scaled; False otherwise.
max_size (int = 10000) – Maximum number of bins to create. If adding an additional data point would cause the number of bins to exceed max_size, the count / weight is instead added to the out_of_range_count of the
PartitionedHistogram1D
.
Methods
Histogram1D : The histogram constructed by merging the individual histograms for each partition
Histogram1DVector : A list-like container of
Histogram1D
, containing one for each partitionInsert a value into the histogram for a partition, with an optional weight
list[str] : The names of the partitions
Represent the monte::PartitionedHistogram1D as a Python dict.