changed the contamination handling logic to also exclude contaminated pixels from the source region

This commit is contained in:
2025-06-05 13:07:33 +03:00
parent d346bbadbc
commit f680039e9a
3 changed files with 93 additions and 30 deletions

View File

@@ -229,8 +229,9 @@ class UpperLimitView(APIView):
or annulus_pixels.filter(contaminated=True).exists()
)
# exclude contaminated pixels from the background calculations
# exclude contaminated pixels from the background and source regions
annulus_pixels = annulus_pixels.exclude(contaminated=True)
source_pixels = source_pixels.exclude(contaminated=True)
status_int = 0
error_message = ""