radio-astro-tools / radio-beam

A simple toolkit for reading and manipulating beams from astrophysical radio spectral data cubes.
https://radio-beam.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
26 stars 21 forks source link

Astropy 6.1.4 #17096 regression fix #128

Closed e-koch closed 1 month ago

e-koch commented 1 month ago

From https://github.com/astropy/astropy/issues/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 https://github.com/astropy/astropy/issues/17096#issue-2557500683).

e-koch commented 1 month ago

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

e-koch commented 1 month ago

@keflavich ready to merge after tests pass.

e-koch commented 1 month ago

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