# The Posterior Object¶

class radvel.posterior.Posterior(likelihood)[source]

Posterior object

Posterior object to be sent to the fitting routines. It is essentially the same as the Liklihood object, but priors are applied here.

Note

Append radvel.prior.Prior objects to the Posterior.priors list to apply priors in the likelihood calculations.

bic()[source]

Calculate the Bayesian information criterion

Returns: BIC float
logprob()[source]

Log probability

Log-probability for the likelihood given the list of priors in Posterior.priors.

Returns: log probability of the likelihood + priors float
logprob_array(param_values_array)[source]

Log probability for parameter vector

Same as self.logprob, but will take a vector of parameter values. Useful as the objective function for routines that optimize a vector of parameter values instead of the dictionary-like format of the radvel.model.Parameters object.

Returns: log probability of the likelihood + priors float
writeto(filename)[source]

Save posterior object to pickle file.

Parameters: filename (string) – full path to outputfile
radvel.posterior.load(filename)[source]

Load posterior object from pickle file.

Parameters: filename (string) – full path to pickle file