satlas.stats.fitting.likelihood_lnprob

satlas.stats.fitting.likelihood_lnprob(params, f, x, y, xerr, func)[source]

Calculates the logarithm of the probability that the data fits the model given the current parameters.

Parameters:
  • params (lmfit.Parameters object with satlas.PriorParameters) – Group of parameters for which the fit has to be evaluated.
  • f (BaseModel) – Model object containing all the information about the fit; will be fitted to the given data.
  • x (array_like) – Experimental data for the x-axis.
  • y (array_like) – Experimental data for the y-axis.
  • xerr (array_like) – Uncertainty values on x.
  • func (function) – Function calculating the loglikelihood of y_data being drawn from a distribution characterized by y_model.

Note

The prior is first evaluated for the parameters. If this is not finite, the values are rejected from consideration by immediately returning -np.inf.