plot

class LineStyleSet(file_name, color_first=True)[source]

Bases: object

get(id_)[source]
get_style(id_)[source]
save()[source]
create_chain_property(self, res)[source]
default_color_generator(color_first)[source]
export_legend(ax, filename='legend.pdf', ncol=1)[source]

export legend in Axis ax to file filename

get_chain_property(self, idx, display=True)[source]

Get chain name and curve style in plot

get_chain_property_v1(self, idx, display)[source]
get_chain_property_v2(self, idx, display)[source]
hist_error(data, bins=50, xrange=None, weights=1.0, kind='poisson')[source]
hist_line(data, weights, bins, xrange=None, inter=1, kind='UnivariateSpline')[source]

interpolate data from hostgram into a line

hist_line_step(data, weights, bins, xrange=None, inter=1, kind='quadratic')[source]
plot_partial_wave(self, params=None, data=None, phsp=None, bg=None, prefix='figure/', res=None, save_root=False, chains_id_method=None, **kwargs)[source]

plot partial wave plots

Parameters
  • self – ConfigLoader object

  • params – params, dict or FitResutls

  • data – data sample, a list of CalAngleData

  • phsp – phase space sample, a list of CalAngleData (the same size as data)

  • bg – background sample, a list of CalAngleData (the same size as data)

  • prefix – figure saving folder and nameing prefix

  • res – combination of resonaces in partial wave, list of (list of (string for resoances name or int for decay chain index))

  • save_root – if save weights in a root file, bool

  • chains_id_method – method of how legend label display, string

  • bin_scale – more binning in partial waves for a smooth histogram. int

  • batch – batching in calculating weights, int

  • smooth – if plot smooth binned kde shape or histogram, bool

  • single_legend – if save all legend in a file “legend.pdf”, bool

  • plot_pull – if plot the pull distribution, bool

  • format – save figure with image format, string (such as “.png”, “.jpeg”)

  • linestyle_file – legend linestyle configuration file name (YAML format), string (such as “legend.yml”)