Normal2LogLike

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

Bases: paintbox.likelihoods.LogLike

Variation of the normal log-likelihood with scaled errors.

Uncertainties in the input spectrum may be under/ over estimated in some occassions, leading to under/over-estimated uncertainties in parameter estimation. This log-likelihood includes an extra parameter to scale the observed uncertainties by a multiplicative factor to increase the likelihood of the modeling. In this case, the log-likelihood is given by

\[ \begin{align}\begin{aligned}:nowrap:\\ \begin{equation} \ln \mathcal{L}(y, \sigma|\theta, \eta)= -\frac{N}{2}\ln (2\pi) -\frac{1}{2}\sum_{i=1}^N \left (\frac{f(\theta)- y_i}{\eta \sigma_i} \right )^2 - \frac{1}{2}\sum_{i=1}^{N}\ln \eta^2\sigma_i^2 \end{equation}\end{aligned}\end{align} \]

where \(y\) is the observed spectrum, \(\sigma\) are the uncertainties, \(\theta\) is the input vector of parameters and and \(f(\theta)\) is the SED model. The multiplicative factor \(\eta\) is appended to the 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]