Skip to content

Commit

Permalink
remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
mcara committed May 16, 2024
1 parent 16f024c commit 938e3d9
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions jwst/tweakreg/tweakreg_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 938e3d9

Please sign in to comment.