StudTLogLike

class paintbox.StudTLogLike(observed, model, obserr=None, mask=None)[source] [edit on github]

Bases: paintbox.likelihoods.LogLike

Student’s t-distribution log-likelihood.

The Student’s t-distribution log-likelihood allows for robust inference of parameters in models containing outliers. The log-likelihood is given by

\begin{equation} \ln p(y, \sigma | \theta, \nu ) = N\log \left [ \frac{\Gamma\left (\frac{\nu + 1}{2}\right )}{\sqrt{ \pi (\nu-2)}\Gamma\left (\frac{\nu}{2} \right )}\right ] -\frac{1}{2}\sum_{i=1}^{N}\log \sigma_{i}^2 -\frac{\nu+1}{2}\sum_{i=1}^N \log \left [ 1 + \frac{\left ( y_i - f(\theta)\right )^2}{\sigma_{i}^2 (\nu-2)} \right ] \end{equation}

where \(y\) is the observed spectrum, \(\sigma\) are the uncertainties, \(\theta\) is the input vector of parameters, \(f(\theta)\) is the SED model, and \(\nu\) is the degree-of-freedom parameter that controls the wings of the distribution, which is appended to the input parnames list.

Parameters
observed: numpy.ndarray

Observed spectro-photometric SED of object.

model: paintbox SED model

SED model used in the modelling.

obserr: numpy.ndarray, optional

Uncertainties in the observed SED fitting to be used in the weighting of the log-likelihood.

mask: numpy.ndarray, optional

Mask for observed data, with zeros (ones) indicating non-masked ( masked) wavelengths.

Attributes
parnames: list

List with name of variables used in the evaluation of the log-likelihood.

Methods Summary

__call__(theta)

Call self as a function.

gradient(theta)

Methods Documentation

__call__(theta)[source] [edit on github]

Call self as a function.

gradient(theta)[source] [edit on github]