asteca.likelihood
#
Module Contents#
Classes#
Define a |
- class asteca.likelihood.likelihood#
Define a
likelihood
object.This object is used to assess how similar your observed cluster is, stored in a
cluster
object, compared to a given synthetic cluster, generated by thesynthetic.generate()
method.- Parameters:
my_cluster (
cluster
) –asteca.cluster
object with the loaded data for the observed cluster.lkl_name (str, {"plr"}, default="plr") – Currently only the Poisson likelihood ratio defined in Tremmel et al. (2013) is accepted.
bin_method (str, {"knuth", "fixed", "bayes_blocks", "manual"}, default="knuth") – Bin method used to split the color-magnitude diagram into cells (Hess diagram). If
manual
is selected, a list containing an array of edge values for the magnitude, followed by one or two arrays (depending on the number of colors defined) for the color(s), also with edge values.
- get(synth_clust)#
Evaluate the selected likelihood function.
- Parameters:
synth_clust (array) –
np.array
containing the synthetic cluster. The shape of this array must be:[magnitude, color1, (color2)]
, wheremagnitude
andcolor
are arrays with the magnitude and color photometric data (color2
is the optional second color defined).- Returns:
Likelihood value.
- Return type:
float