Skip to content

Commit

Permalink
revert #314 and #322
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Dec 13, 2024
1 parent 4953380 commit 9364f29
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion changes/314.bugfix.rst

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies = [
"numpy >=1.21.2",
"opencv-python-headless >=4.6.0.66",
"asdf >=2.15.0",
"gwcs @ git+https://github.com/spacetelescope/gwcs.git@master",
"gwcs >= 0.18.1",
"tweakwcs >=0.8.8",
"requests >=2.22",
]
Expand Down
10 changes: 5 additions & 5 deletions src/stcal/alignment/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def compute_scale(
msg = "If input WCS is spectral, a disp_axis must be given"
raise ValueError(msg)

crpix = np.array(wcs.invert(*fiducial, with_bounding_box=False))
crpix = np.array(wcs.invert(*fiducial))

delta = np.zeros_like(crpix)
spatial_idx = np.where(np.array(wcs.output_frame.axes_type) == "SPATIAL")[0]
Expand Down Expand Up @@ -441,7 +441,7 @@ def compute_fiducial(wcslist: list,
(low, high) values. The bounding_box is in the order of the axes, axes_order.
For two inputs and axes_order(0, 1) the bounding box can be either
((xlow, xhigh), (ylow, yhigh)) or [[xlow, xhigh], [ylow, yhigh]].
Returns
-------
fiducial : np.ndarray
Expand Down Expand Up @@ -704,7 +704,7 @@ def wcs_from_sregions(
footprints : list of np.ndarray or list of str
If list elements are numpy arrays, each should have shape (N, 2) and contain
(RA, Dec) vertices demarcating the footprint of the input WCSs.
If list elements are strings, each should be the S_REGION header keyword
If list elements are strings, each should be the S_REGION header keyword
containing (RA, Dec) vertices demarcating the footprint of the input WCSs.
ref_wcs :
Expand Down Expand Up @@ -756,8 +756,8 @@ def wcs_from_sregions(
The WCS object corresponding to the combined input footprints.
"""
footprints = [_sregion_to_footprint(s_region)
if isinstance(s_region, str) else s_region
footprints = [_sregion_to_footprint(s_region)
if isinstance(s_region, str) else s_region
for s_region in footprints]
fiducial = _calculate_fiducial(footprints, crval=crval)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_tweakreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def input_catalog(datamodel):
cat = amutils.get_catalog(fiducial[0], fiducial[1], search_radius=radius,
catalog=TEST_CATALOG)

x, y = w.world_to_pixel(cat["ra"].value, cat["dec"].value)
x, y = w.world_to_pixel(cat["ra"], cat["dec"])
return Table({"x": x, "y": y})


Expand Down

0 comments on commit 9364f29

Please sign in to comment.