Skip to content

Commit

Permalink
added info functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
sibirrer committed Sep 25, 2024
1 parent 9ceecec commit 67ca292
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hierarc/Likelihood/cosmo_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,11 @@ def cosmo_instance(self, kwargs_cosmo):
else:
cosmo = self._cosmo_fixed
return cosmo

def info(self):
"""
prints information about the likelihood object
:return: print statements
"""
self._likelihoodLensSample.info()
14 changes: 14 additions & 0 deletions test/test_Likelihood/test_cosmo_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,20 @@ def test_kde_likelihood_integration(self):
logl = cosmoL.likelihood(args=args, verbose=True)
assert logl < 0

def test_info(self):
cosmoL = CosmoLikelihood(
self.kwargs_likelihood_list,
self.cosmology,
self.kwargs_model,
self.kwargs_bounds,
custom_prior=None,
interpolate_cosmo=True,
num_redshift_interp=100,
cosmo_fixed=None,
)

cosmoL.info()


if __name__ == "__main__":
pytest.main()

0 comments on commit 67ca292

Please sign in to comment.