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

Reproject to Non-standard Coordinate Systems #419

Open
zheshishuoshuo opened this issue Nov 28, 2023 · 1 comment
Open

Reproject to Non-standard Coordinate Systems #419

zheshishuoshuo opened this issue Nov 28, 2023 · 1 comment

Comments

@zheshishuoshuo
Copy link

Hello, I would like to use reproject_interp to reproject a FITS image in the Galactic coordinate system to a non-standard FITS coordinate system (such as the Magellanic coordinates or the Sagittarius stream coordinates). How can I achieve this?

@Cadair
Copy link
Member

Cadair commented Nov 28, 2023

hello @zheshishuoshuo

reproject itself has no built-in awareness of coordinate systems, it relies on the input and output WCSes (conforming to the APE 14 WCS API: https://docs.astropy.org/en/latest/wcs/wcsapi.html) to do the coordinate conversions. This means if you want to reproject to a custom coordinate system (i.e. not one supported by astropy.wcs) you have two main options: 1) Make a gwcs object to represent your WCS or 2) make a completely custom LowLevelWCS object where you implement pixel_to_world_values and world_to_pixel_values and the other required properties.

Hope that helps!

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

2 participants