NormalLogLike¶
- class paintbox.NormalLogLike(observed, model, obserr=None, mask=None)[source] [edit on github]¶
Bases:
paintbox.likelihoods.LogLikeNormal loglikelihood for SED modeling.
The normal log-likelihood is given by
\begin{equation} \ln \mathcal{L}(y, \sigma|\theta)= -\frac{N}{2}\ln (2\pi) -\frac{1}{2}\sum_{i=1}^N \left (\frac{f(\theta)- y_i}{\sigma_i} \right )^2 - \frac{1}{2}\sum_{i=1}^{N}\ln \sigma_i^2 \end{equation}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.
- 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)Calculation of the log-likelihood.
gradient(theta)Gradient of the log-likelihood.
Methods Documentation
- __call__(theta)[source] [edit on github]¶
Calculation of the log-likelihood.
- gradient(theta)[source] [edit on github]¶
Gradient of the log-likelihood.