Closed ver228 closed 7 years ago
This is a really good point. We need to have another discussion about what the purpose is of having units, and whether the software should do anything automatically, or merely should keep track of what you said was what. (There's another issue that right now the units are path-independent, but one could have data where one p was in pixels, another p was in microns, and a third p was in pascals.)
We discussed this yesterday at our monthly meeting and the decision was:
Units prefixed by @
will not be converted--you're on your own there, as you always are with @-stuff.
Fixed with 6f37dc575844913ea8a99c5b7fdda0621ca71693
Note @Ichoran that to reflect what we apparently agreed above, I have changed the specification to add radians ('radians', 'rad', 'r') and degrees ('degrees') as first-class units.
e.g. Python's MeasurementUnit
class will convert between degrees and radians; the following is True
:
MU.create('degrees').from_canon(2*pi) == 360
It seems that the software (at least the Python version) does not support the units "degrees" and "radians". It should be easy to modify the code to accept these new units, but maybe it would be better to accept arbitrary units. In some features will demand relatively non-standard units like "counts" or "intensity".
I am not sure how to accept arbitrary units and at the same time correct misspellings or invalid prefixes. Probably adding some symbol before the units like ":" to enable explicit defining a new unit.