Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions jwst/assign_wcs/assign_wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
wcs = WCS(pipeline)
output_model.meta.wcs = wcs
output_model.meta.cal_step.assign_wcs = "COMPLETE"
if output_model.meta.exposure.type.lower() == "nis_soss":
output_model.meta.wcs.bounding_box = mod.niriss_bounding_box(output_model)

Check warning on line 80 in jwst/assign_wcs/assign_wcs.py

View check run for this annotation

Codecov / codecov/patch

jwst/assign_wcs/assign_wcs.py#L80

Added line #L80 was not covered by tests
exclude_types = [
"nrc_wfss",
"nrc_tsgrism",
Expand Down
10 changes: 3 additions & 7 deletions jwst/assign_wcs/niriss.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,8 @@
bbox_y = np.array([-0.5, input_model.meta.subarray.ysize - 0.5])
bbox_x = np.array([-0.5, input_model.meta.subarray.xsize - 0.5])

if order == 1:
return tuple(bbox_y), tuple(bbox_x)
elif order == 2:
return tuple(bbox_y), tuple(bbox_x)
elif order == 3:
return tuple(bbox_y), tuple(bbox_x)
if order in (1, 2, 3):
return tuple(bbox_x), tuple(bbox_y)

Check warning on line 106 in jwst/assign_wcs/niriss.py

View check run for this annotation

Codecov / codecov/patch

jwst/assign_wcs/niriss.py#L105-L106

Added lines #L105 - L106 were not covered by tests
else:
raise ValueError(
f"Invalid spectral order: {order} provided. Spectral order must be 1, 2, or 3."
Expand All @@ -131,7 +127,7 @@
bbox = {(order,): _niriss_order_bounding_box(input_model, order) for order in [1, 2, 3]}
model = input_model.meta.wcs.forward_transform
return CompoundBoundingBox.validate(
model, bbox, slice_args=[("spectral_order", True)], order="F"
model, bbox, selector_args=[("spectral_order", True)], order="F"
)


Expand Down
Loading