From 938e3d9f86a32b69f6547d0705ea454f59c470ab Mon Sep 17 00:00:00 2001 From: Mihai Cara Date: Thu, 16 May 2024 15:43:24 -0400 Subject: [PATCH] remove redundant code --- jwst/tweakreg/tweakreg_step.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/jwst/tweakreg/tweakreg_step.py b/jwst/tweakreg/tweakreg_step.py index 849ad4c066..27c11ef1fb 100644 --- a/jwst/tweakreg/tweakreg_step.py +++ b/jwst/tweakreg/tweakreg_step.py @@ -171,25 +171,15 @@ def process(self, input): "Parameter 'separation' must be larger than 'tolerance' by at " "least a factor of sqrt(2) to avoid source confusion." ) - for model in images: - model.meta.cal_step.tweakreg = "SKIPPED" - # Remove the attached catalogs - if hasattr(model, "catalog"): - del model.catalog self.skip = True self.log.warning("Skipping 'TweakRegStep' step.") return images if self.abs_separation <= _SQRT2 * self.abs_tolerance: self.log.error( - "Parameter 'abs_separation' must be larger than 'abs_tolerance' " - "by at least a factor of sqrt(2) to avoid source confusion." - ) - for model in images: - model.meta.cal_step.tweakreg = "SKIPPED" - # Remove the attached catalogs - if hasattr(model, "catalog"): - del model.catalog + "Parameter 'abs_separation' must be larger than 'abs_tolerance' " + "by at least a factor of sqrt(2) to avoid source confusion." + ) self.skip = True self.log.warning("Skipping 'TweakRegStep' step.") return images