ProbabilityDict2D class

This class is same as the ProbabilityDict class but instead of storing the one dimensional PDFs for a given parameter, it stores the 2D PDF for 2 parameters. The 2D analytic PDF is stored as a DiscretePDF2D object.

class pesummary.utils.probability_dict.ProbabilityDict2D(*args, logger_warn='warn', autoscale=False)[source]

Class to store the 2D discrete probability distributions for multiple parameters

Parameters:

args (dict) – dictionary containing the discrete probabilities for 2 or more parameters. Key should be 2 parameter names joined with _ and value should be an array of length 3. First element integers for x, second element integers for y and third element the 2D discrete probability distribution for xy. See pesummary.utils.pdf.DiscretePDF2D for more details

plot:

generate a plot to display the stored probability density functions

Examples

>>> from  pesummary.utils.probability_dict.ProbabilityDict2D
>>> x = [-1., 0., 1.]
>>> y = [-1., 0., 1.]
>>> prob_xy = [
...     [1./9, 1./9, 1./9],
...     [1./9, 1./9, 1./9],
...     [1./9, 1./9, 1./9]
... ]
>>> pdf = ProbabilityDict2D({"x_y": [x, y, prob_xy]})
>>> print(type(pdf["x_y"]))
<class 'pesummary.utils.pdf.DiscretePDF2D'>