Skip to content

Commit

Permalink
Merge pull request #255 from sibirrer/main
Browse files Browse the repository at this point in the history
change convention of shear to be consistent with SLSim conventions of ellipticity
  • Loading branch information
sibirrer authored Sep 19, 2024
2 parents ff63c4d + 8a41495 commit 2369db8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion slsim/lens.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
analytical_lens_model_support,
)
from slsim.ParamDistributions.los_config import LOSConfig
from slsim.Util.param_util import ellipticity_slsim_to_lenstronomy
from lenstronomy.LightModel.light_model import LightModel
from lenstronomy.Util import constants
from lenstronomy.Util import data_util
Expand Down Expand Up @@ -613,7 +614,17 @@ def deflector_mass_model_lenstronomy(self):
)
# adding line-of-sight structure
gamma1, gamma2, kappa_ext = self.los_linear_distortions
kwargs_lens.append({"gamma1": gamma1, "gamma2": gamma2, "ra_0": 0, "dec_0": 0})
gamma1_lenstronomy, gamma2_lenstronomy = ellipticity_slsim_to_lenstronomy(
e1_slsim=gamma1, e2_slsim=gamma2
)
kwargs_lens.append(
{
"gamma1": gamma1_lenstronomy,
"gamma2": gamma2_lenstronomy,
"ra_0": 0,
"dec_0": 0,
}
)
kwargs_lens.append({"kappa": kappa_ext, "ra_0": 0, "dec_0": 0})
lens_mass_model_list.append("SHEAR")
lens_mass_model_list.append("CONVERGENCE")
Expand Down

0 comments on commit 2369db8

Please sign in to comment.