From 7aea11937082241f31e193da07af6885da69bf27 Mon Sep 17 00:00:00 2001 From: Ismael Mendoza Date: Tue, 2 Apr 2024 13:55:41 -0400 Subject: [PATCH] remove condition > 0 because of noise in real images --- btk/blend_batch.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/btk/blend_batch.py b/btk/blend_batch.py index 9c70994d..a313a797 100644 --- a/btk/blend_batch.py +++ b/btk/blend_batch.py @@ -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.""" @@ -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): @@ -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: