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

Astropy 6.1.4 #17096 regression fix #128

Merged

Conversation

e-koch
Copy link
Collaborator

@e-koch e-koch commented Oct 1, 2024

From astropy/astropy#17096: astropy 6.1.4 introduced a bug here due to our use of

u.deg.is_equivalent(pa)

when pa is a Quantity and pa=0 * u.deg. The immediate fix is to compare to the unit, not the quantity. (See traceback from @olebole here astropy/astropy#17096 (comment)).

@e-koch e-koch requested a review from keflavich October 1, 2024 13:36
@e-koch
Copy link
Collaborator Author

e-koch commented Oct 1, 2024

This PR also fixes our use of default_unit in Beam and Beams

@e-koch e-koch mentioned this pull request Oct 1, 2024
radio_beam/beam.py Outdated Show resolved Hide resolved
Copy link
Contributor

@keflavich keflavich left a comment

Choose a reason for hiding this comment

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

Functionally, this looks good - thanks! I'm not sure the function name is right though.

Copy link
Collaborator Author

@e-koch e-koch left a comment

Choose a reason for hiding this comment

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

thanks! Updated to _with_default_unit as suggested. Should be good to merge now.

radio_beam/beam.py Outdated Show resolved Hide resolved
@e-koch
Copy link
Collaborator Author

e-koch commented Oct 18, 2024

@keflavich ready to merge after tests pass.

@e-koch e-koch mentioned this pull request Oct 18, 2024
@e-koch
Copy link
Collaborator Author

e-koch commented Oct 18, 2024

@keflavich Looks like spectral-cube's test failures are also related to this PR.

@keflavich keflavich merged commit f1111a4 into radio-astro-tools:master Oct 18, 2024
13 checks passed
@e-koch e-koch deleted the astropy_17096_regression_fix branch October 18, 2024 14:50
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.

3 participants