Skip to content

Commit

Permalink
Fix deprication from stcal
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Dec 11, 2024
1 parent 40b5682 commit dcd0c8c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions romancal/resample/resample_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from astropy.modeling import Model
from astropy.nddata.bitmask import bitfield_to_boolean_mask
from roman_datamodels.dqflags import pixel
from stcal.alignment.util import wcs_from_footprints
from stcal.alignment.util import wcs_from_sregions

from romancal.assign_wcs.utils import wcs_bbox_from_shape

Expand Down Expand Up @@ -73,13 +73,14 @@ def make_output_wcs(
if w.bounding_box is None:
w.bounding_box = wcs_bbox_from_shape(i.data.shape)
naxes = wcslist[0].output_frame.naxes
ref_wcs = wcslist[0]

if naxes != 2:
raise RuntimeError(f"Output WCS needs 2 axes.{wcslist[0]} has {naxes}.")

output_wcs = wcs_from_footprints(
wcslist,
None,
output_wcs = wcs_from_sregions(
[wcs.footprint() for wcs in wcslist],
ref_wcs,
dict(input_models[0].meta.wcsinfo),
pscale_ratio=pscale_ratio,
pscale=pscale,
Expand Down

0 comments on commit dcd0c8c

Please sign in to comment.