pyhs3.axes.RegularAxis¶
- class pyhs3.axes.RegularAxis(**data)[source]¶
- Variables:
name – Name of the axis/variable
min – Minimum value (inherited from BoundedAxis)
max – Maximum value (inherited from BoundedAxis)
nbins – Number of bins (for regular binning)
- Parameters:
data (
Any)
Validators¶ Validator
Mode
Fields
after
model
after
model
- __init__(**data)¶
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (
Any)
Methods
Validate that max >= min.
Validate that max >= min.
to_hist()Convert this axis to a hist.axis object.
Attributes
- RegularAxis.check_min_le_max()¶
Validate that max >= min.
- Return type:
- RegularAxis.to_hist()[source]¶
Convert this axis to a hist.axis object.
- Return type:
- Returns:
A hist.axis.Regular object
- RegularAxis.edges¶
Get the bin edges for this axis.
- Returns:
List of bin edges. Generates edges using linspace.
- RegularAxis.nbins¶
- RegularAxis.min¶
- RegularAxis.max¶
- RegularAxis.name¶