Skip to content
Open
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
4 changes: 2 additions & 2 deletions gwcs/wcs/_wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2763,14 +2763,14 @@ def _calc_approx_inv(self, max_inv_pix_error=5, inv_degree=None, npoints=16):
if isinstance(transform, projections.Projection):
sky2pix_proj = transform
break
if sky2pix_proj.__name__.startswith("Pix2Sky"):
if sky2pix_proj.__class__.__name__.startswith("pix2sky"):

@mcara mcara Mar 19, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if sky2pix_proj.__class__.__name__.startswith("pix2sky"):
if type(sky2pix_proj).__name__.startswith("Pix2Sky")

sky2pix_proj = sky2pix_proj.inverse
lon_pole = _compute_lon_pole((crval1, crval2), sky2pix_proj)
ntransform = (
(Shift(crpix[0]) & Shift(crpix[1]))
| self.forward_transform
| RotateCelestial2Native(crval1, crval2, lon_pole)
| sky2pix_proj()
| sky2pix_proj
)

# standard sampling:
Expand Down