Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

footprint() method returns coordinates in different order than the forward transform #370

Open
jdavies-st opened this issue Jul 30, 2021 · 0 comments

Comments

@jdavies-st
Copy link
Contributor

So this isn't a bug, but more of a user interface inconsistency.

For a simple imaging WCS, I might create and call it like so:

...
wcs = gwcs.WCS(...args)
wcs.bounding_box = ((xlow, xhigh), (ylow, yhigh))

x, y = gwcs.wcstools.grid_from_bounding_box(wcs.bounding_box)
ra, dec = wcs(x, y)

So I create a grid of (x, y) points in pixel coords in my image, and get the output (ra, dec) in sky coordinates to which they map.

But the wcs.footprint() method works like the following:

ra, dec = wcs.footprint().T

I.e. the ordering of the return values from the footprint() method is the transpose of that from the forward and reverse transforms. And also it is a single numpy array, instead of a tuple of arrays as in the former.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant