Skip to content

Commit

Permalink
limit s_region update in assign_mtwcs to only imaging modes
Browse files Browse the repository at this point in the history
  • Loading branch information
emolter committed Oct 31, 2024
1 parent 39e75af commit 666dfd8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jwst/assign_mtwcs/moving_target_wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

from jwst.datamodels import ModelLibrary
from jwst.stpipe.utilities import record_step_status
from jwst.assign_wcs.util import update_s_region_keyword
from jwst.assign_wcs.util import update_s_region_imaging
from jwst.lib.exposure_types import IMAGING_TYPES

log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
Expand Down Expand Up @@ -70,7 +71,8 @@ def assign_moving_target_wcs(input_models):
model.meta.wcsinfo.mt_ra, model.meta.wcsinfo.mt_dec)
del model.meta.wcs
model.meta.wcs = new_wcs
update_s_region_keyword(model, new_wcs.footprint())
if model.meta.exposure.type.lower() in IMAGING_TYPES:
update_s_region_imaging(model)
record_step_status(model, "assign_mtwcs", True)
input_models.shelve(model, i, modify=True)

Expand Down

0 comments on commit 666dfd8

Please sign in to comment.