-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
In #18084, @larrybradley noted that the base fluxes for STmag
and ABmag
(u.ST
and u.AB
) cannot be writting to VOUnit format, because they include units that are deprecated by VOunit (Angstrom and erg). I don't think we want to change the default, but it would be good to allow users to specify what should be done for deprecated units. Specifically, I suggested in #18084 (comment):
[...] it would be nice to solve allow the various unit formats to avoid deprecated units, and thus get rid of the warnings. E.g., just like
unit.to_string
now has afraction
argument that allows one to tell what to do with fractions, one could imagine adeprecated={"warn","error","ignore","replace"}
keyword argument that allowed one to tell that it is fine to replace deprecated units with others (adjusting the scale, of course). Indeed,vounit
already does this partially, for the deprecated deci and deca prefixes.