Skip to content

Commit

Permalink
query CosmoInterp from lenstronomy, stabilizing likelihood and cleani…
Browse files Browse the repository at this point in the history
…ng up requirements
  • Loading branch information
sibirrer committed Dec 29, 2021
1 parent 1dc2be9 commit a3bb3db
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 283 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ History
------------------

* Standardizable magnifications added

1.1.1 (2021-12-29)
------------------

* using CosmoInterp module from lenstronomy
203 changes: 0 additions & 203 deletions hierarc/Likelihood/cosmo_interp.py

This file was deleted.

3 changes: 2 additions & 1 deletion hierarc/Likelihood/cosmo_likelihood.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from hierarc.Likelihood.lens_sample_likelihood import LensSampleLikelihood
from hierarc.Sampling.ParamManager.param_manager import ParamManager
from hierarc.Likelihood.cosmo_interp import CosmoInterp
# from hierarc.Likelihood.cosmo_interp import CosmoInterp
from lenstronomy.Cosmo.cosmo_interp import CosmoInterp
from hierarc.Likelihood.SneLikelihood.sne_likelihood import SneLikelihood
import numpy as np

Expand Down
2 changes: 1 addition & 1 deletion hierarc/Likelihood/hierarchy_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def log_likelihood_single(self, ddt, dd, delta_lum_dist, kwargs_lens, kwargs_kin

lnlikelihood = self.log_likelihood(ddt_, dd_, aniso_scaling=aniso_scaling, sigma_v_sys_error=sigma_v_sys_error,
mu_intrinsic=mag_source_)
return lnlikelihood
return np.nan_to_num(lnlikelihood)

def angular_diameter_distances(self, cosmo):
"""
Expand Down
2 changes: 1 addition & 1 deletion hierarc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__author__ = """Simon Birrer"""
__email__ = 'sibirrer@gmail.com'
__version__ = '1.1.0'
__version__ = '1.1.1'
9 changes: 5 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
numpy>=1.13
astropy>=3.0
#lenstronomy>=1.4.0

scipy
numba
# numba
emcee
mpmath
h5py
matplotlib
-e git://github.com/sibirrer/lenstronomy.git@main#egg=lenstronomy
lenstronomy>=1.9.2
# -e git://github.com/sibirrer/lenstronomy.git@main#egg=lenstronomy
scikit-learn>=0.22

# only required through lenstronomy
scikit-image
# scikit-image
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ def run_tests(self):
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
description="Hierarchical analysis of strong lensing systems to infer lens properties and cosmological parameters simultaneously",
install_requires=requirements,
Expand All @@ -61,7 +61,7 @@ def run_tests(self):
test_suite='test',
tests_require=test_requirements,
url='https://github.com/sibirrer/hierarc',
version='1.1.0',
version='1.1.1',
zip_safe=False,
cmdclass={'test': PyTest}
)
71 changes: 0 additions & 71 deletions test/test_Likelihood/test_cosmo_interp.py

This file was deleted.

0 comments on commit a3bb3db

Please sign in to comment.