You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Providing a custom wcs (in this case a wcs from a cal file) results in an exception:
fromjwst.resampleimportResampleStepimportasdf# point this to the corresponding regtest filecal_filename="~/jwst-pipeline/dev/nircam/image/jw01069002001_01101_00001_nrca5_cal.fits"m=dm.open(cal_filename)
wcs=m.meta.wcsasdf.AsdfFile({"wcs": wcs}).write_to("custom_wcs.asdf")
step=ResampleStep(output_wcs="custom_wcs.asdf")
result=step(m)
Produces an exception:
Traceback (most recent call last):
File "/Users/bgraham/projects/src/jwst/resample_to_cal.py", line 13, in <module>
result = step(m)
^^^^^^^
File "/Users/bgraham/projects/src/jwst/jwst/stpipe/core.py", line 159, in __call__
return super().__call__(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bgraham/.pyenv/versions/jwst/lib/python3.12/site-packages/stpipe/step.py", line 585, in __call__
return self.run(*args)
^^^^^^^^^^^^^^^
File "/Users/bgraham/projects/src/jwst/jwst/stpipe/core.py", line 141, in run
result = super().run(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bgraham/.pyenv/versions/jwst/lib/python3.12/site-packages/stpipe/step.py", line 507, in run
step_result = self.process(*args)
^^^^^^^^^^^^^^^^^^^
File "/Users/bgraham/projects/src/jwst/jwst/resample/resample_step.py", line 123, in process
result = resamp.resample_many_to_one()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bgraham/projects/src/jwst/jwst/resample/resample.py", line 621, in resample_many_to_one
self.finalize()
File "/Users/bgraham/projects/src/jwst/jwst/resample/resample.py", line 462, in finalize
self.update_fits_wcsinfo(self.output_jwst_model)
File "/Users/bgraham/projects/src/jwst/jwst/resample/resample.py", line 645, in update_fits_wcsinfo
model.meta.wcsinfo.cdelt1 = transform[3].factor.value
^^^^^^^^^^^^^^^^^^^
AttributeError: 'Shift' object has no attribute 'factor'
The exception occurs on jwst main (current commit 7545a60) and on 1.17.1 (no earlier versions were tested).
The text was updated successfully, but these errors were encountered:
Providing a custom wcs (in this case a wcs from a cal file) results in an exception:
Produces an exception:
The exception occurs on jwst main (current commit 7545a60) and on 1.17.1 (no earlier versions were tested).
The text was updated successfully, but these errors were encountered: