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

add tabular-fits support for Spectrum1D mask #1104

Merged
merged 2 commits into from
Dec 4, 2023
Merged

Conversation

sbailey
Copy link
Contributor

@sbailey sbailey commented Nov 15, 2023

This PR fixes a bug in the Spectrum1D.read / write default tabular-fits format, which was dropping the .mask attribute. It adds tests demonstrating the problem and failing before the fix, and with the fixes these tests now pass.

Detail: due to astropy/astropy#11963, by default int8 masks are written as bool thus losing information, so here I upcast int8 masks to int16 with the result that the dtype changes in the round trip but at least information isn't lost.

@rosteen rosteen added this to the v1.x milestone Nov 27, 2023
Copy link
Contributor

@rosteen rosteen left a comment

Choose a reason for hiding this comment

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

I took the liberty of fixing the failing codestyle check, I think this is good to go in now. Thanks!

@rosteen rosteen merged commit f678dbd into astropy:main Dec 4, 2023
9 of 10 checks passed
@sbailey
Copy link
Contributor Author

sbailey commented Dec 4, 2023

@rosteen thanks for proactively fixing the codestyle issues and merging this. I've been busy enough with my day job that I hadn't even looked at what was failing, fearing it would be worse and take more time than I had available.

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

Successfully merging this pull request may close these issues.

2 participants