From 7b4ccf58794f0484989d91d0b8defbaabfa7dfe0 Mon Sep 17 00:00:00 2001 From: Brett Date: Fri, 15 Nov 2024 15:55:55 -0500 Subject: [PATCH] stop pipeline early on a saturated exposure --- romancal/pipeline/exposure_pipeline.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/romancal/pipeline/exposure_pipeline.py b/romancal/pipeline/exposure_pipeline.py index 250583b6a..c359e7198 100644 --- a/romancal/pipeline/exposure_pipeline.py +++ b/romancal/pipeline/exposure_pipeline.py @@ -95,7 +95,6 @@ def process(self, input): # Return fully saturated image file (stopping pipeline) log.info("All pixels are saturated. Returning a zeroed-out image.") - # if is_fully_saturated(result): # Set all subsequent steps to skipped for step_str in [ "assign_wcs", @@ -110,6 +109,11 @@ def process(self, input): "tweakreg", ]: result.meta.cal_step[step_str] = "SKIPPED" + + # Stop at this point and returned only the first model + # as a list to match prior behavior + lib.shelve(result, 0) + return [result] else: result = self.refpix(result) result = self.linearity(result)