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

coord method in mpdaf.obj.coords is confusing #38

Open
andresgur opened this issue May 16, 2024 · 0 comments
Open

coord method in mpdaf.obj.coords is confusing #38

andresgur opened this issue May 16, 2024 · 0 comments

Comments

@andresgur
Copy link

I believe the coord function inside mpdaf.obj.coords is a bit of confusing at the moment.

First, there's the spaxel keyword, whose purpose is not documented, but my impression that if given everything will be assumed to be in pixel units, hence the "unit" keyword will be ignored. This should be stated in the docs.

Second, inside the code, I think what is called "x" is actually "y" and viceversa. e.g.

pixcrd = np.indices((self.naxis2, self.naxis1))
        if spaxel:
            x, y = pixcrd

Isn't naxis2 associated with y axis and naxis1 with x axis?

It also says it returns dec ra (i.e. y, x) but then the return line reads return x,y.

So I believe it should be stated in the docs clearly what the spaxel keyword does, and double check whether x,y are being named correctly in the code.

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