Skip to content

Commit

Permalink
Merge pull request #54 from smericks/updated_lenstronomy
Browse files Browse the repository at this point in the history
fix calls to lenstronomy for new version
  • Loading branch information
swagnercarena committed Jan 26, 2024
2 parents 6f6e9ec + 9956d05 commit 7ddce5e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion paltas/Configs/config_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def _draw_image_standard(self,add_noise=True,apply_psf=True):
if 'lens_equation_solver_parameters' in sample.keys():
lens_equation_params = sample['lens_equation_solver_parameters']
point_source_model = PointSource(
kwargs_model['point_source_model_list'],lensModel=lens_model,
kwargs_model['point_source_model_list'],lens_model=lens_model,
save_cache=True,kwargs_lens_eqn_solver=lens_equation_params)

# Put it together into an image model
Expand Down
6 changes: 3 additions & 3 deletions paltas/MainDeflector/simple_deflectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
combinations of lenstronomy profiles.
"""
from .main_deflector_base import MainDeflectorBase
from lenstronomy.LensModel.profile_list_base import ProfileListBase
from lenstronomy.LensModel.profile_list_base import lens_class


class PEMD(MainDeflectorBase):
Expand Down Expand Up @@ -64,7 +64,7 @@ def draw_main_deflector(self):
for model in md_model_list:
# The list of parameters linked to that lenstronomy model
p_names = (
ProfileListBase._import_class(model,None,None,None).param_names
lens_class(model).param_names
)
model_kwargs = {}
for param in p_names:
Expand Down Expand Up @@ -133,7 +133,7 @@ def draw_main_deflector(self):
for model in md_model_list:
# The list of parameters linked to that lenstronomy model
p_names = (
ProfileListBase._import_class(model,None,None,None).param_names
lens_class(model).param_names
)
model_kwargs = {}
for param in p_names:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
astropy>=4.0.0
colossus
drizzle>=1.13.3
lenstronomy>=1.6.0
lenstronomy>=1.11.6
numpy>=1.13,<=1.24
scipy>=1.7
tqdm>=4.42.1
Expand Down
2 changes: 1 addition & 1 deletion test/config_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def test__calculate_ps_metadata(self):
lens_redshift_list=kwargs_model['lens_redshift_list'],
cosmo=cosmo.toAstropy(),multi_plane=kwargs_model['multi_plane'])
point_source_model = PointSource(
kwargs_model['point_source_model_list'],lensModel=lens_model,
kwargs_model['point_source_model_list'],lens_model=lens_model,
save_cache=True,kwargs_lens_eqn_solver=lens_equation_params)

# Initialize empty metadata and populate it.
Expand Down

0 comments on commit 7ddce5e

Please sign in to comment.