Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 471 #482

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions btk/blend_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def __post_init__(self):
assert c1 == c2 == n_bands
assert n == self.max_n_sources
assert ps11 == ps12 == ps21 == ps22 == self._get_image_size()
assert self.isolated_images.min() >= 0

def _get_image_size(self) -> int:
"""Returns the size of the stamps in pixels."""
Expand Down Expand Up @@ -258,11 +257,7 @@ def _validate_deblended_images(self, deblended_images):
"The predicted deblended_images of at least one of your deblended images "
f"has the wrong shape. It should be {deblended_shape}."
)
if deblended_images.min() < 0:
raise ValueError(
"The predicted deblended_images of at least one of your "
"deblended images has negative values which is unphysical."
)

return deblended_images

def __repr__(self):
Expand Down Expand Up @@ -359,11 +354,6 @@ def _validate_deblended_images(
self.image_size,
)

if deblended_images.min() < 0:
raise ValueError(
"The predicted deblended_images of at least one of your "
"deblended images has negative values which is unphysical."
)
return deblended_images

def __repr__(self) -> str:
Expand Down
Loading