Skip to content

Commit

Permalink
Merge pull request #260 from nkhadka21/main
Browse files Browse the repository at this point in the history
minor updates in slsim coolest interface.
  • Loading branch information
sibirrer authored Oct 9, 2024
2 parents 5c535f3 + 62614af commit 9b8bf59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions slsim/Util/coolest_slsim_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def create_slsim_from_coolest(path, file_name, mag_zero_point=27):
# replace amplitudes with magnitudes in lenstronomy kwargs.
replacement_mappings = {
"kwargs_source": {"amp": "magnitude", "value": source_mags},
"kwargs_lens_light": {"amp": "magnitude", "value": lens_mag},
"kwargs_ps": {"point_amp": "magnitude", "value": ps_mag},
"kwargs_lens_light": {"amp": "magnitude", "value": [lens_mag]},
"kwargs_ps": {"point_amp": "magnitude", "value": [ps_mag]},
}
for key, replacement_info in replacement_mappings.items():
for keys, values in replacement_info.items():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_coolest_slsim_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_update_coolest_from_slsim_and_create_slsim_from_coolest(
)
npt.assert_almost_equal(
slsim_from_updated_coolest[1]["kwargs_ps"][0]["magnitude"],
expected_result[1]["kwargs_ps"][0]["magnitude"],
[expected_result[1]["kwargs_ps"][0]["magnitude"]],
)

os.remove(test_path + "coolest_template_update.json")

0 comments on commit 9b8bf59

Please sign in to comment.