A concrete implementation of an histogram plots using the HwU format
for reading/writing histogram content.
|
__init__(self,
file_path=None,
weight_header=None,
raw_labels=False,
consider_reweights=' ALL ' ,
selected_central_weight=None,
**opts)
Read one plot from a file_path or a stream. |
source code
|
|
|
addEvent(self,
x_value,
weights=1.0)
Add an event to the current plot. |
source code
|
|
|
|
|
|
|
|
|
get_formatted_header(self)
Return a HwU formatted header for the weight label definition. |
source code
|
|
|
get_HwU_source(self,
print_header=True)
Returns the string representation of this histogram using the HwU
standard. |
source code
|
|
|
output(self,
path=None,
format=' HwU ' ,
print_header=True)
Ouput this histogram to a file, stream or string if path is kept to
None. |
source code
|
|
|
test_plot_compability(self,
other,
consider_type=True,
consider_unknown_weight_labels=True)
Test whether the defining attributes of self are identical to histo,
typically to make sure that they are the same plots but from
different runs, and they can be summed safely. |
source code
|
|
|
process_histogram_name(self,
histogram_name)
Parse the histogram name for tags which would set its various
attributes. |
source code
|
|
|
get_HwU_histogram_name(self,
format=' human ' )
Returns the histogram name in the HwU syntax or human readable. |
source code
|
|
|
parse_one_histo_from_stream(self,
stream,
all_weight_header,
consider_reweights=' ALL ' ,
raw_labels=False,
selected_central_weight=None)
Reads *one* histogram from a stream, with the mandatory specification
of the ordered list of weight names. |
source code
|
|
|
trim_auxiliary_weights(self)
Remove all weights which are auxiliary (whose name end with '@aux')
so that they are not included (they will be regenerated anyway). |
source code
|
|
|
set_uncertainty(self,
type=' all_scale ' ,
lhapdfconfig=' lhapdf-config ' )
Adds a weight to the bins which is the envelope of the scale
uncertainty, for the scale specified which can be either 'mur',
'muf', 'all_scale' or 'PDF'. |
source code
|
|
|
select_central_weight(self,
selected_label)
Select a specific merging scale for the central value of this
Histogram. |
source code
|
|
|
rebin(self,
n_rebin)
Rebin the x-axis so as to merge n_rebin consecutive bins into a
single one. |
source code
|
|
Inherited from Histogram :
__add__ ,
__div__ ,
__mul__ ,
__setattr__ ,
__sub__ ,
__truediv__ ,
alter_weights ,
nice_string
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
get_HwU_wgt_label_type(cls,
wgt_label)
From the format of the weight label given in argument, it returns a
string identifying the type of standard weight it is. |
source code
|
|
|
parse_weight_header(cls,
stream,
raw_labels=False)
Read a given stream until it finds a header specifying the weights
and then returns them. |
source code
|
|
|
get_x_optimal_range(cls,
histo_list,
weight_labels=None)
Function to determine the optimal x-axis range when plotting together
the histos in histo_list and considering the weights weight_labels |
source code
|
|
|
get_y_optimal_range(cls,
histo_list,
labels=None,
scale=' LOG ' ,
Kratio=False)
Function to determine the optimal y-axis range when plotting together
the histos in histo_list and considering the weights weight_labels. |
source code
|
|
Inherited from Histogram :
combine
|