From 666dfd8065d8773ffba79a6e8ec1f0334ebe8659 Mon Sep 17 00:00:00 2001 From: Ned Molter Date: Thu, 31 Oct 2024 13:17:52 -0400 Subject: [PATCH] limit s_region update in assign_mtwcs to only imaging modes --- jwst/assign_mtwcs/moving_target_wcs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jwst/assign_mtwcs/moving_target_wcs.py b/jwst/assign_mtwcs/moving_target_wcs.py index 3d01fc96ef..0e3eb679ab 100644 --- a/jwst/assign_mtwcs/moving_target_wcs.py +++ b/jwst/assign_mtwcs/moving_target_wcs.py @@ -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) @@ -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)