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

How to assign units? #145

Closed
dorahermes opened this issue Mar 7, 2024 · 5 comments
Closed

How to assign units? #145

dorahermes opened this issue Mar 7, 2024 · 5 comments

Comments

@dorahermes
Copy link
Member

          Another question, I want to add an example of some quantity (e.g. weight/amplitude) being less than a certain value, but can't find how to add the units, how can I add kilogram to: `(Weight, (Less-than, (Weight/30)))`? thanks!

Originally posted by @dorahermes in #137 (comment)

@IanCa
Copy link
Member

IanCa commented Mar 8, 2024

Let me know if this doesn't do what you want:

(Weight, (Less-than, (Weight/30 kg)))

This should also work with placeholders e.g.:
(Weight, (Less-than, (Weight/# kg)))

@dorahermes
Copy link
Member Author

Thank you! That works and I can now use this successfully (Finding-amplitude, (Less-than, (Finding-amplitude/30 v)))

However, there seems to be an issue using Volt, and I get an error using this: (Finding-amplitude, (Less-than, (Finding-amplitude/30 Volt)))

Errors for HED string 1:
UNITS_INVALID: Invalid unit - "Finding-amplitude/30 Volt" valid units are "Volt,v"

@IanCa
Copy link
Member

IanCa commented Mar 8, 2024

I'm going to need to touch base with Kay and get back to you, but the root of the problem is Volt shouldn't have been capitalized in the schema originally.

@IanCa
Copy link
Member

IanCa commented Mar 9, 2024

hed-standard/hed-python#884

This should make Volt and volt both work. The v vs V change will presumably be in 8.3.0 or later.

@VisLab
Copy link
Member

VisLab commented Jun 3, 2024

This has been fixed in 8.3.0 prerelease. NIST says that SI is V and volt. The cap changes have been made.
However, going forward, once the hedId assignment becomes permanent -- this sort of case change will require deprecation.

@VisLab VisLab closed this as completed Jun 3, 2024
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

3 participants