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

[Add Check]: units are in SI values #208

Open
2 tasks done
CodyCBakerPhD opened this issue May 3, 2022 · 5 comments · May be fixed by #281
Open
2 tasks done

[Add Check]: units are in SI values #208

CodyCBakerPhD opened this issue May 3, 2022 · 5 comments · May be fixed by #281
Assignees
Labels
category: new check a new best practices check to apply to all NWBFiles and their contents

Comments

@CodyCBakerPhD
Copy link
Collaborator

What would you like to see added to the NWBInspector?

There is a best practice section currently on units of measurement (https://nwbinspector.readthedocs.io/en/dev/best_practices/time_series.html#units-of-measurement) for the units field of any TimeSeries.

@weiglszonja Recently found some examples worth bringing up regarding this.

(a) where they use the British spellingof the words, e.g., 'metres' instead of 'meters'. We should probably decide and specify in the Best Practices whether to use American (which is what we normally suggest) or British spelling, since this can have an impact on machine readability down the line.

(b) with respect to abbreviations, we could also just enforce people to use standard SI abbreviations, i.e, 'meters' -> 'm'

(c) we also need to decide the official BP way of specifying division quantities, such as 'meters per second' or in combination with (b), 'm/s', which is what we've typically used ourselves.

Also it would be cool if we had a check that ensures the unit field follows SI units, but not sure what the best way to do that would be other than hard coding all the different SI base types separated from prefixes ('meters', 'second', 'volts', 'amperes', etc.)

Pseudocode or other logic of the check

No response

Do you have any interest in helping implement the check function?

Yes.

Code of Conduct

@CodyCBakerPhD CodyCBakerPhD added the category: new check a new best practices check to apply to all NWBFiles and their contents label May 3, 2022
@CodyCBakerPhD
Copy link
Collaborator Author

@CodyCBakerPhD
Copy link
Collaborator Author

Also happy to enlist the help of @weiglszonja with this if you want to spearhead it. Also happy to show you how to add check functions in our next meeting

@weiglszonja
Copy link
Contributor

@CodyCBakerPhD Sure, it would be nice to put together something like this:
https://github.com/sappelhoff/bids-specification/blob/master/src/99-appendices/05-units.md

@weiglszonja
Copy link
Contributor

weiglszonja commented May 5, 2022

might be useful for the check functions (for future reference):
https://github.com/sensein/cmixf

@CodyCBakerPhD
Copy link
Collaborator Author

Also suggesting a.u. to denote arbitrary units whenever unknown or unavailable. Remember this being pretty common for publication figures where the unit scales didn't really matter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: new check a new best practices check to apply to all NWBFiles and their contents
Projects
None yet
3 participants