class beast.fitting.pdf2d.pdf2d(gridvals_p1, gridvals_p2, nbins_p1, nbins_p2, logspacing_p1=False, logspacing_p2=False, minval_p1=None, maxval_p1=None, minval_p2=None, maxval_p2=None)[source]

Bases: object

Create an object which can be used to efficiently generate a 2D pdf for an observed object

gridvals_p1, gridvals_p2ndarray

1D float array with the values of the quantity for all the grid points

nbins_p1, nbins_p2int

number of bins to use for the 1D pdf

logspacing_p1, logspacing_p2bool, optional

whether to use logarithmic spacing for the bins

minval_p1, maxval_p1, minval_p2, maxval_p2float, optional

override the range for the bins. this can be useful to make sure that the pdfs for different runs have the same bins

Methods Summary

gen2d(gindxs, weights)

Compute the 2D posterior PDFs based on the nD probabilities

Methods Documentation

gen2d(gindxs, weights)[source]

Compute the 2D posterior PDFs based on the nD probabilities


1D int array with the indxs of the weights in the full model grid


1D float array with the fit probabilities (likelihood*prior) at each grid point


2D float array giving the bin pPDF values