[AstroPy] How can I add another name to a registered unit?
Duncan Macleod
duncan.macleod at ligo.org
Tue Feb 3 16:09:26 EST 2015
Hi all,
I’m wondering how to add another name to an already registered unit. The example I have is a data file containing the unit string ‘Degrees_F’ - meaning Fahrenheit. I understand I can enable a new unit called ‘Degrees_F’ that represents the original ‘deg_F/Fahrenheit' unit from units.imperial, but what I’d really like to do is just register the string ‘Degrees_F’ as another name for ‘deg_F’, rather than an equivalent unit.
In the end I’d like to see the following:
>>> units.Unit(‘Degrees_F’)
Unit(‘deg_F’)
Is this possible?
Thanks
Duncan
--
Duncan Macleod
duncan.macleod at ligo.org
LIGO Data Grid systems development
Louisiana State University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20150203/67deb51f/attachment.html>
More information about the AstroPy
mailing list