Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally show derived units #92

Open
grero opened this issue Sep 2, 2016 · 0 comments
Open

Optionally show derived units #92

grero opened this issue Sep 2, 2016 · 0 comments

Comments

@grero
Copy link

grero commented Sep 2, 2016

It would be nice to have the option of getting the string representation of a derived unit directly, e.g. print 1V as 1V, instead of 1 kg m²s⁻³A⁻¹. I realise this might be contrary to the purpose of this package. The reason I want to do this is that I'm looking to store some data with their associated units, and so would like to be able to read strings like "mV" from a file and create an array of mV quantities. What I have tried so far is

_strunit = string(SIUnits.unit(first(data)))

which of course returns "kg m²s⁻³A⁻¹" for an array of voltage data.

Conversely, I would like to have something like

parse(SIUnit, "mV") = 1//1000 kg m²s⁻³A⁻¹

My apologies if this functionality is outside of the scope of the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant