Skip to content

Commit

Permalink
add EPL_MULTIPOLE_M3M3_ELL to list of lens models for solver4point
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Gilman committed Sep 5, 2024
1 parent c360318 commit 7db7614
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lenstronomy/LensModel/Solver/solver4point.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ def __init__(self, lensModel, solver_type="PROFILE"):
"CNFW_ELLIPSE_POTENTIAL",
"EPL",
"EPL_BOXYDISKY",
"EPL_BOXYDISKY_ELL",
"EPL_MULTIPOLE_M3M4",
"EPL_MULTIPOLE_M3M4_ELL",
]:
raise ValueError(
"first lens model must be supported by the solver: 'SPEP', 'SPEMD', 'PEMD',"
" 'SIE', 'NIE', 'EPL', 'EPL_BOXYDISKY', 'EPL_MULTIPOLE_M3M4', 'NFW_ELLIPSE_POTENTIAL', 'NFW_ELLIPSE_CSE', "
" 'SIE', 'NIE', 'EPL', 'EPL_BOXYDISKY', 'EPL_BOXYDISKY_ELL', 'EPL_MULTIPOLE_M3M4', "
"'EPL_MULTIPOLE_M3M4_ELL', 'NFW_ELLIPSE_POTENTIAL', 'NFW_ELLIPSE_CSE', "
"'SHAPELETS_CART', 'CNFW_ELLIPSE_POTENTIAL'."
"Your choice was %s" % lensModel.lens_model_list[0]
)
Expand Down Expand Up @@ -161,7 +164,9 @@ def _update_kwargs(self, x, kwargs_list):
"PEMD",
"EPL",
"EPL_BOXYDISKY",
"EPL_BOXYDISKY_ELL",
"EPL_MULTIPOLE_M3M4",
"EPL_MULTIPOLE_M3M4_ELL",
]:
[theta_E, e1, e2, center_x, center_y, _] = x
kwargs_list[0]["theta_E"] = theta_E
Expand Down Expand Up @@ -220,7 +225,9 @@ def _extract_array(self, kwargs_list):
"PEMD",
"EPL",
"EPL_BOXYDISKY",
"EPL_BOXYDISKY_ELL",
"EPL_MULTIPOLE_M3M4",
"EPL_MULTIPOLE_M3M4_ELL",
]:
e1 = kwargs_list[0]["e1"]
e2 = kwargs_list[0]["e2"]
Expand Down Expand Up @@ -272,7 +279,9 @@ def add_fixed_lens(self, kwargs_fixed_lens_list, kwargs_lens_init):
"PEMD",
"EPL",
"EPL_BOXYDISKY",
"EPL_BOXYDISKY_ELL",
"EPL_MULTIPOLE_M3M4",
"EPL_MULTIPOLE_M3M4_ELL",
]:
kwargs_fixed["theta_E"] = kwargs_lens["theta_E"]
kwargs_fixed["e1"] = kwargs_lens["e1"]
Expand Down

0 comments on commit 7db7614

Please sign in to comment.