SpectralScaledChi2Likelihood¶
- class starkit.fitkit.likelihoods.SpectralScaledChi2Likelihood(observed, lnf=0.0)[source]¶
Bases:
SpectralChi2LikelihoodAttributes Summary
Names of the parameters that describe models of this type.
Methods Summary
evaluate(wavelength, flux, lnf)Calculating likelihood and scaling the uncertainties (as shown in http://dfm.io/emcee/current/user/line/) This likelihood function is simply a Gaussian where the variance is underestimated by some fractional amount: f.
Attributes Documentation
- inputs = ('wavelength', 'flux')¶
- lnf = Parameter('lnf', value=nan)¶
- outputs = ('loglikelihood',)¶
- param_names = ('lnf',)¶
Names of the parameters that describe models of this type.
The parameters in this tuple are in the same order they should be passed in when initializing a model of a specific type. Some types of models, such as polynomial models, have a different number of parameters depending on some other property of the model, such as the degree.
When defining a custom model class the value of this attribute is automatically set by the
Parameterattributes defined in the class body.
Methods Documentation
- evaluate(wavelength, flux, lnf)[source]¶
Calculating likelihood and scaling the uncertainties (as shown in http://dfm.io/emcee/current/user/line/) This likelihood function is simply a Gaussian where the variance is underestimated by some fractional amount: f. One can fit for the natural logarithm of f.
- Parameters:
- wavelengthnumpy.ndarray
wavelength
- fluxnumpy.ndarray
flux
- Returns:
- : float
- log likelihood