hierarc.Likelihood.SneLikelihood package¶
Submodules¶
hierarc.Likelihood.SneLikelihood.sne_likelihood module¶
- class hierarc.Likelihood.SneLikelihood.sne_likelihood.SneLikelihood(sample_name='CUSTOM', **kwargs_sne_likelihood)[source]¶
Bases:
object
Supernovae likelihood This class supports custom likelihoods as well as likelihoods from the Pantheon sample from file.
- log_likelihood(cosmo, apparent_m_z=None, sigma_m_z=None, z_anchor=0.1)[source]¶
- Parameters:
cosmo – instance of a class to compute angular diameter distances on arrays
apparent_m_z – mean apparent magnitude of SN Ia at z=z_anchor (optional)
z_anchor – redshift where definition of apparent_m_z is set (only applicable when apparent_m_z != None)
sigma_m_z – 1-sigma scatter in magnitude in the intrinsic SNe brightness distribution not accounted-for by the covariance matrix
- Returns:
log likelihood of the data given the specified cosmology
hierarc.Likelihood.SneLikelihood.sne_likelihood_custom module¶
- class hierarc.Likelihood.SneLikelihood.sne_likelihood_custom.CustomSneLikelihood(mag_mean, cov_mag, zhel, zcmb, no_intrinsic_scatter=False)[source]¶
Bases:
object
Class method for an arbitrary apparent magnitude likelihood of a Sne sample where the error and systematic covariance matrix is described in astronomical magnitude space.
- log_likelihood_lum_dist(lum_dists, estimated_scriptm=None, sigma_m_z=None)[source]¶
- Parameters:
lum_dists – numpy array of luminosity distances to the measured supernovae bins (units do not matter since normalization is subtracted off for the likelihood)
estimated_scriptm – mean magnitude at lum_dist=0 (optional)
sigma_m_z – 1-sigma scatter in magnitude in the intrinsic SNe brightness distribution not accounted-for by the covariance matrix
- Returns:
log likelihood of the data given the luminosity distances
hierarc.Likelihood.SneLikelihood.sne_likelihood_from_file module¶
This is a lightweight version of the COSMOMC/Cobaya sampler: https://github.com/CobayaSampler/cobaya/blob/71b87842d12c6a04eec182c39b6bef1cd9a987af/cobaya/likelihoods/_base_classes/_sn_prototype.py#L287 It uses the binned Pantheon data: https://github.com/dscolnic/Pantheon/blob/master/Binned_data/lcparam_DS17f.txt And computes the cosmographic likelihood. The main difference is that this class is compatible with the hierArc cosmology module for evaluating likelihoods. This likelihood does NOT include systematics!
If you use
sn.pantheon
, please cite: Scolnic, D. M. et al, 2018 The Complete Light-curve Sample of Spectroscopically Confirmed Type Ia Supernovae from Pan-STARRS1 and Cosmological Constraints from The Combined Pantheon Sample (arXiv:1710.00845)
- Synopsis:
Supernovae likelihood, from CosmoMC’s JLA module, for Pantheon and JLA samples.
- Author:
Alex Conley, Marc Betoule, Antony Lewis (see source for more specific authorship)
- class hierarc.Likelihood.SneLikelihood.sne_likelihood_from_file.SneLikelihoodFromFile(sample_name='Pantheon_binned', pec_z=0.001)[source]¶
Bases:
object
Base likelihood class for evaluating Sne likelihoods.
- log_likelihood_lum_dist(lum_dists, estimated_scriptm=None, sigma_m_z=None)[source]¶
- Parameters:
lum_dists – numpy array of luminosity distances to the measured supernovae bins (units do not matter since normalization is subtracted off for the likelihood)
estimated_scriptm – mean magnitude at lum_dist=0 (optional)
sigma_m_z – 1-sigma scatter in magnitude in the intrinsic SNe brightness distribution not accounted-for by the covariance matrix. This variable is not supported in the current implementation of the Pantheon sample
- Returns:
log likelihood of the data given the luminosity distances
- hierarc.Likelihood.SneLikelihood.sne_likelihood_from_file.read_covariance_matrix(filename, nsn)[source]¶
Reads in covariance matrix file and returns it as a numpy matrix.
- Parameters:
filename – string, absolute path of covariance matrix file
nsn – number of supernovae (or bins)
- Returns:
nxn covariance matrix
hierarc.Likelihood.SneLikelihood.sne_pantheon_plus module¶
- class hierarc.Likelihood.SneLikelihood.sne_pantheon_plus.PantheonPlusData[source]¶
Bases:
object
This class is a lightweight version of the Pantheon+ analysis presented in Pantheon+ likelihood.
The data covariances that are stored in hierArc are originally from Pantheon+ Data products.
If you make use of these products, please cite Brout et al. 2022