Skip to content

Commit

Permalink
Add test for odd box size in python layer.
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed May 2, 2024
1 parent 724037c commit 560e3e3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def measure(self, measRecord, exposure):
sub_im = exposure.image.array[y_slice, x_slice]
sub_var = exposure.variance.array[y_slice, x_slice]

if sub_im.size == 0 or sub_im.shape[0] != sub_im.shape[1]:
if sub_im.size == 0 or sub_im.shape[0] != sub_im.shape[1] or (sub_im.shape[0] % 2) == 0:
raise OutOfBoundsError("The footprint does not fit within the exposure.", 0)

flux, var = _compensatedGaussianFiltInnerProduct(
Expand Down

0 comments on commit 560e3e3

Please sign in to comment.