nessai.priors

Definitions of common priors in the prime space.

Module Contents

Functions

log_uniform_prior(x[, xmin, xmax])

Unformalised log probability of uniform prior.

log_2d_cartesian_prior(x, y[, k])

Log probability for isotropic 2d Cartesian coordinates.

log_2d_cartesian_prior_sine(x, y[, k])

Log probability of Cartesian coordinates for a angle with a sine prior

log_3d_cartesian_prior(x, y, z)

Log probability for 3d isotropic Cartesian coordinates.

nessai.priors.log_uniform_prior(x, xmin=-1, xmax=1)

Unformalised log probability of uniform prior.

Parameters:
xarray_like

Parameter to computed log-prior for

xminfloat, optional

Lower bound on prior

xmaxfloat, optional

Upper bound on prior

nessai.priors.log_2d_cartesian_prior(x, y, k=np.pi)

Log probability for isotropic 2d Cartesian coordinates.

Assumes a uniform distribution of angles on [0, k] and a radial component drawn from a chi distribution with two degrees of freedom.

Parameters:
x, yarray_like

Cartesian coordinates

kfloat

Range over which the angles used to obtain the Cartesian coordinates are defined.

nessai.priors.log_2d_cartesian_prior_sine(x, y, k=np.pi)

Log probability of Cartesian coordinates for a angle with a sine prior

Assumes angles drawn for a sine distribution andand a radial component drawn from a chi distribution with two degrees of freedom.

Raises a RuntimeError if the anlges were not defined on the range [0, pi].

Parameters:
x, yarray_like

Cartesian coordinates

kfloat

Must be np.pi. Included for compatibility with the interface for angle reparameterisations.

nessai.priors.log_3d_cartesian_prior(x, y, z)

Log probability for 3d isotropic Cartesian coordinates.

Assumes an isotropic distribution of angles and a radial component drawn from a chi distribution with three degrees of freedom.

Parameters:
x, y, zarray_like

Cartesian coordinates