Skip to content

Commit

Permalink
Autofix formatting from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Nov 26, 2024
1 parent 30b4555 commit 8ac4905
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 27 deletions.
11 changes: 4 additions & 7 deletions slsim/lens.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,8 @@ def lenstronomy_kwargs(self, band=None):
kwargs_model["source_redshift_list"] = self.source_redshift_list
elif self.max_redshift_source_class.light_profile == "double_sersic":
kwargs_model["source_redshift_list"] = [
z for z in self.source_redshift_list for _ in range(2)]
z for z in self.source_redshift_list for _ in range(2)
]
kwargs_model["z_source_convention"] = (
self.max_redshift_source_class.redshift
)
Expand Down Expand Up @@ -905,12 +906,8 @@ def source_light_model_lenstronomy(self, band=None):
source_models_list_restructure = source_models_list
kwargs_source_list_restructure = kwargs_source_list
else:"""
source_models_list_restructure = list(
np.concatenate(source_models_list)
)
kwargs_source_list_restructure = list(
np.concatenate(kwargs_source_list)
)
source_models_list_restructure = list(np.concatenate(source_models_list))
kwargs_source_list_restructure = list(np.concatenate(kwargs_source_list))
source_models["source_light_model_list"] = source_models_list_restructure
kwargs_source = kwargs_source_list_restructure
else:
Expand Down
39 changes: 19 additions & 20 deletions tests/test_image_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,23 +467,23 @@ def setup_method(self):
)

self.image1 = sharp_image(
lens_class1,
band="i",
mag_zero_point=27,
delta_pix=0.2,
num_pix=64,
with_source=True,
with_deflector=True,
)
self.image2=sharp_image(
lens_class2,
band="i",
mag_zero_point=27,
delta_pix=0.2,
num_pix=64,
with_source=True,
with_deflector=False,
)
lens_class1,
band="i",
mag_zero_point=27,
delta_pix=0.2,
num_pix=64,
with_source=True,
with_deflector=True,
)
self.image2 = sharp_image(
lens_class2,
band="i",
mag_zero_point=27,
delta_pix=0.2,
num_pix=64,
with_source=True,
with_deflector=False,
)
self.image3 = sharp_image(
lens_class3,
band="i",
Expand All @@ -494,10 +494,9 @@ def setup_method(self):
with_deflector=True,
)
self.combined_image = self.image1 + self.image2

def test_image_multiple_source(self):
npt.assert_almost_equal(
self.image3, self.combined_image, decimal=8
)
npt.assert_almost_equal(self.image3, self.combined_image, decimal=8)


if __name__ == "__main__":
Expand Down

0 comments on commit 8ac4905

Please sign in to comment.