Skip to content

Commit

Permalink
Update chain.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ajshajib authored Dec 4, 2023
1 parent a5d3d2f commit 6defc33
Showing 1 changed file with 15 additions and 33 deletions.
48 changes: 15 additions & 33 deletions hierarc/Likelihood/KDELikelihood/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,21 @@ def __init__(
loglsamples=None,
rescale=True,
):
"""
"""For keywords in the `kw` parameter, see
https://wiki.cosmos.esa.int/planck-legacy-archive/index.php/Cosmological_Parameters
:param kw: (str). Planck base cosmology keyword. For example, "base" or "base_omegak". See https://wiki.cosmos.esa.int/planck-legacy-archive/index.php/Cosmological_Parameters.
:param probe: (str). Planck probe combination. For example, "plikHM_TTTEEE_lowl_lowE" for default Planck results
:param kw: (str). Planck base cosmology keyword. For example, "base" or
"base_omegak".
:param probe: (str). Planck probe combination. For example,
"plikHM_TTTEEE_lowl_lowE" for default Planck results
:param params: (dictionnary). Dictionnary containing the samples.
:param default_weights: (numpy array). Default weights associated to the samples.
:param cosmology: (str). Astropy cosmology
:param loglsamples: (numpy array). Corresponding Loglikelihood of the samples (optionnal).
:param rescale: (bool). Rescale the chains between 0 and 1 for all parameters. This is absolutely necessary if you want to evaluate a KDE on these chains.
:param loglsamples: (numpy array). Corresponding Loglikelihood of the samples
(optionnal).
:param rescale: (bool). Rescale the chains between 0 and 1 for all
parameters. This is absolutely necessary if you want to evaluate a KDE on
these chains.
"""
self.kw = kw
self.probe = probe
Expand Down Expand Up @@ -142,36 +148,12 @@ def rescale_from_unity(self, verbose=False):


def import_Planck_chain(datapath, kw, probe, params, cosmology, rescale=True):
"""Special function to parse Planck files. Return a Chain object.
:param datapath: (str). Path to the Planck chain :param kw: (str). Planck base
cosmology keyword. For example, "base" or "base_omegak". See
https://wiki.cosmos.esa.int/planck-legacy-archive/index.php/Cosmological_Parameters.
:param datapath: (str). Path to the Planck chain :param kw: (str). Planck base
cosmology keyword. For example, "base" or "base_omegak". See
https://wiki.cosmos.esa.int/planck-legacy-
:param datapath: (str). Path to the Planck chain :param kw: (str). Planck base
cosmology keyword. For example, "base" or "base_omegak". See
https://wiki.cosmos.esa.int/planck-legacy-
archive/index.php/Cosmological_Parameters. :param datapath: (str). Path to the
Planck chain :param kw: (str). Planck base cosmology keyword. For example, "base" or
"base_omegak". See
https://wiki.cosmos.esa.int/planck-legacy-
:param datapath: (str). Path to the Planck chain
:param kw: (str). Planck base cosmology keyword. For example, "base" or
"base_omegak". See https://wiki.cosmos.esa.int/planck-legacy-
archive/index.php/Cosmological_Parameters.
:param datapath: (str). Path to the Planck chain
:param kw: (str). Planck base cosmology keyword. For example, "base" or
"base_omegak". See https://wiki.cosmos.esa.int/planck-legacy-
:param datapath: (str). Path to the Planck chain
:param kw: (str). Planck base cosmology keyword. For example, "base" or
"base_omegak". See https://wiki.cosmos.esa.int/planck-legacy-
archive/index.php/Cosmological_Parameters.
"""Special function to parse Planck files. Return a Chain object. For keywords in
the `kw` parameter, see https://wiki.cosmos.esa.int/planck-legacy-archive/index.php/Cosmological_Parameters
:param datapath: (str). Path to the Planck chain
:param kw: (str). Planck base cosmology keyword. For example, "base" or
"base_omegak". See https://wiki.cosmos.esa.int/planck-legacy-
archive/index.php/Cosmological_Parameters.
"base_omegak".
:param probe: (str). Planck probe combination. For example,
"plikHM_TTTEEE_lowl_lowE" for default Planck results
:param params: (list). List of cosmological parameters. ["h0", "om"] for FLCDM.
Expand Down

0 comments on commit 6defc33

Please sign in to comment.