plot
- hist_line(data, weights, bins, xrange=None, inter=1, kind='UnivariateSpline')[source]
interpolate data from hostgram into a line
>>> import numpy as np >>> import matplotlib.pyplot >>> z = np.random.normal(size=1000) >>> x, y = hist_line(z, None, 50) >>> a = plt.plot(x, y)
- hist_line_step(data, weights, bins, xrange=None, inter=1, kind='quadratic')[source]
>>> import numpy as np >>> import matplotlib.pyplot >>> z = np.random.normal(size=1000) >>> x, y = hist_line_step(z, None, 50) >>> a = plt.step(x, y)
- plot_adaptive_2dpull(config, var1, var2, binning=[[2, 2], [2, 2], [2, 2]], ax=<module 'matplotlib.pyplot' from '/home/docs/checkouts/readthedocs.org/user_builds/tf-pwa/envs/latest/lib/python3.10/site-packages/matplotlib/pyplot.py'>, where={}, cut_zero=True, plot_scatter=True, scatter_style={'c': 'black', 's': 1}, **kwargs)[source]
- plot_function_2dpull(data_dict, phsp_dict, bg_dict, var1='x', var2='y', binning=[[2, 2], [2, 2], [2, 2]], where={}, ax=<module 'matplotlib.pyplot' from '/home/docs/checkouts/readthedocs.org/user_builds/tf-pwa/envs/latest/lib/python3.10/site-packages/matplotlib/pyplot.py'>, cut_zero=True, plot_scatter=True, scatter_style={'c': 'black', 's': 1}, cmap='jet', **kwargs)[source]
- plot_partial_wave(self, params=None, data=None, phsp=None, bg=None, prefix='figure/', res=None, save_root=False, chains_id_method=None, phsp_rec=None, cut_function=<function <lambda>>, plot_function=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”)