Skip to content

Commit

Permalink
removed checks for image dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulmkarthik committed Feb 24, 2025
1 parent 1595f65 commit 1802e37
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions slsim/Sources/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,16 +587,6 @@ def kwargs_extended_source_light(self, center_lens, draw_area, band=None):
z_image = self.source_dict["z_data"]
pixel_width = self.source_dict["pixel_width_data"]
pixel_width *= z_scale_factor(z_old=z_image, z_new=self.redshift)

# Ensure the image is 2D
image = self.source_dict["image"]
if image.ndim > 2:
image = image.squeeze() # Remove any singleton dimensions
if image.ndim != 2:
raise ValueError(
f"Interpolated image must be 2D, got shape {image.shape}"
)

kwargs_extended_source = [
{
"magnitude": mag_source,
Expand Down

0 comments on commit 1802e37

Please sign in to comment.