Skip to content

Commit

Permalink
Bugfix for JWST failures
Browse files Browse the repository at this point in the history
JWST apparently is not consistent with when it sets bounding boxes in GWCS for the order of the box.
  • Loading branch information
WilliamJamieson committed Oct 23, 2024
1 parent 0da8055 commit f88ae8c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
15 changes: 0 additions & 15 deletions gwcs/tests/test_wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,21 +413,6 @@ def test_grid_from_model_bounding_box():

assert np.all(grid == grid_truth)

# Handle the C order case
model.inputs = ("y", "x", "slit_name")
model.bounding_box = ModelBoundingBox(
{
"x": bbox[0],
"y": bbox[1],
},
model=model,
ignored=["slit_name"],
order="C",
)
grid = grid_from_bounding_box(model.bounding_box)

assert np.all(grid == grid_truth)


def test_grid_from_compound_bounding_box():
bbox = ((-1, 1), (0, 1))
Expand Down
4 changes: 0 additions & 4 deletions gwcs/wcstools.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,6 @@ def _bbox_to_pixel(bbox):
if isinstance(bounding_box, ModelBoundingBox):
input_names = bounding_box.model.inputs

# Reorder the bounding box to match the order of the inputs
if bounding_box.order == "C":
input_names = input_names[::-1]

# Get tuple of tuples of the bounding box values
bounding_box = tuple(
tuple(bounding_box[name])
Expand Down

0 comments on commit f88ae8c

Please sign in to comment.