-
Notifications
You must be signed in to change notification settings - Fork 20
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
@register_unit not global #151
Comments
Do you want to add Gauss to the units? I didn’t add it to emphasise that DQ is SI based (so nobody mistakenly uses the CGS version of Maxwells equations) but we could explain this in the docs. The |
Hi Miles, we should allow people to register their own defined units globally or support the common units. If you prefer to add more units to the package, let's do that! In the atom physics community, "Gauss" is the standard unit for magnetic fields, and with What do Maxwell's equations have to do with |
I’m happy to add Gauss though we should emphasise in the docs that it is the SI version. See https://en.m.wikipedia.org/wiki/Gaussian_units for differences. It’s just about preventing footguns. Another way you can “export” units to users is to provide a macro for it, like Coils.@register_units Which would execute all of the |
They key part of the wiki article is:
|
Thanks for sharing the details |
Hi all,
I am in the process of upgrading the Coils.jl package from
Unitful
toDynamicQuantities
and register Gauss as units:However, when I run my package tests, I need to re-register the unit; otherwise, I get "LoadError: ArgumentError: Symbol Gauss not found in
Units
orConstants
."I think this is not what one would expect and its a bit annoying for users to have to re-register the units themselves.
The text was updated successfully, but these errors were encountered: