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

Fix HEALPix unit conversion at load time #795

Merged
merged 2 commits into from
Oct 29, 2024
Merged

Conversation

keskitalo
Copy link
Member

@keskitalo keskitalo commented Oct 28, 2024

Fix an issue with HEALPix map unit conversion.

The units were being parsed correctly from the FITS header but somehow scale.to(pix.units).value was always evaluating to 1.0. Replacing it with scale.to_value(pix_units) did the trick.

Many, many thanks to @tpsatt for reporting the problem!

@keskitalo keskitalo requested a review from tskisner October 28, 2024 16:39
Copy link
Member

@tskisner tskisner left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

In other places across the code, this helper function is used. Perhaps we could just fix that helper function and then use the function here?

@keskitalo
Copy link
Member Author

Definitely! I just pushed an update and will merge once the unit tests pass.

@keskitalo keskitalo merged commit f678b72 into toast3 Oct 29, 2024
7 checks passed
@keskitalo keskitalo deleted the fix_healpix_units branch October 29, 2024 15:52
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

Successfully merging this pull request may close these issues.

2 participants