Skip to content

Commit

Permalink
Fix issue in constructing skycell WCS. (#1297)
Browse files Browse the repository at this point in the history
  • Loading branch information
schlafly authored Jul 9, 2024
2 parents 8a7f497 + dedc0cc commit a287ea1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ stpipe
- Add ``ModelContainer`` support to ``Step._datamodels_open`` to allow
loading "pars-*" files from CRDS. [#1270]
mosaic_pipeline
---------------

- Fix construction of skycell WCS. [#1297]



0.15.1 (2024-05-15)
===================
Expand Down
14 changes: 7 additions & 7 deletions romancal/pipeline/mosaic_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,19 @@ def process(self, input):
return result


def generate_tan_wcs(skycell_record, shiftx=0, shifty=0):
def generate_tan_wcs(skycell_record):
# extract the wcs info from the record for generate_tan_wcs
# we need the scale, ra, dec, bounding_box

scale = float(skycell_record["pixel_scale"])
ra_center = float(skycell_record["ra_center"])
dec_center = float(skycell_record["dec_center"])
ra_center = float(skycell_record["ra_projection_center"])
dec_center = float(skycell_record["dec_projection_center"])
shiftx = float(skycell_record["x0_projection"])
shifty = float(skycell_record["y0_projection"])
bounding_box = (
(-0.5, float(skycell_record["x_center"]) + 0.5),
(-0.5, float(skycell_record["y_center"]) + 0.5),
(-0.5, -0.5 + skycell_record["nx"]),
(-0.5, -0.5 + skycell_record["ny"]),
)
shiftx = bounding_box[0][1]
shifty = bounding_box[1][1]

# components of the model
# shift = models.Shift(shiftx) & models.Shift(shifty)
Expand Down

0 comments on commit a287ea1

Please sign in to comment.