Skip to content

Commit

Permalink
stop pipeline early on a saturated exposure
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Nov 15, 2024
1 parent d6d0ed0 commit f7de0f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion romancal/pipeline/exposure_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Check warning on line 96 in romancal/pipeline/exposure_pipeline.py

View check run for this annotation

Codecov / codecov/patch

romancal/pipeline/exposure_pipeline.py#L96

Added line #L96 was not covered by tests

# if is_fully_saturated(result):
# Set all subsequent steps to skipped
for step_str in [

Check warning on line 99 in romancal/pipeline/exposure_pipeline.py

View check run for this annotation

Codecov / codecov/patch

romancal/pipeline/exposure_pipeline.py#L99

Added line #L99 was not covered by tests
"assign_wcs",
Expand All @@ -110,6 +109,11 @@ def process(self, input):
"tweakreg",
]:
result.meta.cal_step[step_str] = "SKIPPED"

Check warning on line 111 in romancal/pipeline/exposure_pipeline.py

View check run for this annotation

Codecov / codecov/patch

romancal/pipeline/exposure_pipeline.py#L111

Added line #L111 was not covered by tests

# Stop at this point and returned only the first model
# as a list to match prior behavior
lib.shelve(result, 0)
return [result]

Check warning on line 116 in romancal/pipeline/exposure_pipeline.py

View check run for this annotation

Codecov / codecov/patch

romancal/pipeline/exposure_pipeline.py#L115-L116

Added lines #L115 - L116 were not covered by tests
else:
result = self.refpix(result)
result = self.linearity(result)
Expand Down

0 comments on commit f7de0f4

Please sign in to comment.