StudT2LogLike

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

Bases: paintbox.likelihoods.LogLike

Student’s t-distribution log-likelihood with scaled uncertainties.

Similar to the Normal2LogLike, this class extends the log-likelihood of the Student’s t-distribution to include a term to scale the uncertainties to increase the likelihood as a way to compensate for under-over estimation of the observed uncertainties. In this case, the log-likelihood is given by

\begin{equation} \ln p(y, \sigma | \theta, \eta, \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 \eta^2\sigma_{i}^2 -\frac{\nu+1}{2}\sum_{i=1}^N \log \left [ 1 + \frac{\left ( y_i - f(\theta)\right )^2}{\eta^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, \(\eta\) is the parameter used to modify the scale of the uncertainties, and \(\nu\) is the degree-of-freedom parameter that controls the wings of the distribution. Both \(\eta\) and \(\nu\) are appended to to input parameter 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]