cgobat / asymmetric_uncertainty

A package for handling numeric quantities with asymmetric uncertainties.
https://github.com/cgobat/asymmetric_uncertainty/wiki
GNU General Public License v3.0
17 stars 4 forks source link

Compatibility with `astropy.units` #3

Open cgobat opened 1 year ago

cgobat commented 1 year ago

The a_u object type is not currently compatible with astropy.units. Adding this functionality would greatly enhance this package for use across the physical sciences, and would certainly be very nice to have, given that this package's perhaps most notable use case is in astronomy & astrophysics.

My initial thought is that the most straightforward way to do this will be to make a_u a subclass of astropy.units.Quantity.

cgobat commented 1 year ago

The astropy-units-compatibility branch has been updated with basic support for mathematical operations between instances of a_u and instances of astropy.units.Quantity and astropy.units.Unit.