Likelihood#
- class asteca.Likelihood(my_cluster: Cluster, lkl_name: str = 'plr', bin_method: str = 'knuth')#
Bases:
objectDefine a
Likelihoodobject.This object is used to assess how similar your observed cluster is, stored in a
asteca.Clusterobject, compared to a given synthetic cluster, generated by theasteca.Synthetic.generate()method.- Parameters:
my_cluster (Cluster) –
asteca.Clusterobject with the loaded data for the observed clusterlkl_name (str) – Currently only the Poisson likelihood ratio (
plr) defined in Tremmel et al. (2013) is accepted, defaults toplrbin_method (str) – Bin method used to split the color-magnitude diagram into cells (Hess diagram); one of:
knuth, blocks, scott, freedman or fixed. See Choosing Histogram Bins in astropy documentation for details on theknuth, blocks, scott, freedmanmethods. The methodfixeduses (15, 10) bins in magnitude and color(s) respectively. Defaults toknuth
- Raises:
ValueError – If any of the attributes is not recognized as a valid option
Methods Summary
get(synth_clust)Evaluate the selected likelihood function.
Methods Documentation
- get(synth_clust: ndarray) float#
Evaluate the selected likelihood function.
- Parameters:
synth_clust (np.ndarray) – Array containing the synthetic cluster data. The shape of this array is assumed to be be:
[magnitude, color1, (color2)], wheremagnitudeandcolorare arrays with the synthetic magnitude and color photometric data (color2is the optional second color defined) If the array contains any extra columns beyond these they will be ignored.- Raises:
ValueError – If the likelihood function is not recognized
- Returns:
Likelihood value
- Return type:
float