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

Refactor gwcs_from_array to provide ND GWCS in ND flux case #1211

Open
wants to merge 20 commits into
base: v2.0-dev
Choose a base branch
from

Conversation

rosteen
Copy link
Contributor

@rosteen rosteen commented Feb 4, 2025

Currently, gwcs_from_array always gives a 1D purely spectral GWCS, even in the case where the flux array is multi-dimensional. This PR updates that function to return an ND GWCS, so that the dimensionality of a Spectrum's GWCS always matches that of the flux array, even if the spatial dimensions are simply returning the pixel values. This will simplify and solve a lot of problems down stream in e.g. glue-astronomy and jdaviz.

There were a lot of changes here that were needed to accommodate this change, but I think it's all improvements. I have one final failing test that I need to debug, so I'm opening this as a draft while I resolve that.

@rosteen rosteen added the data objects Core data objects like Spectrum1D or SpectralCollection label Feb 4, 2025
@rosteen rosteen added this to the v2.0 milestone Feb 4, 2025
@rosteen rosteen force-pushed the improve-gwcs-from-array branch from a9d0923 to 55cbb3e Compare February 7, 2025 19:49
@rosteen rosteen marked this pull request as ready for review February 9, 2025 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data objects Core data objects like Spectrum1D or SpectralCollection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant