-
Notifications
You must be signed in to change notification settings - Fork 112
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
Incorrect conversion between Hz and rad/s #636
Comments
julia> uconvert(u"rad", 1.0)
1.0 rad |
So the incorrect conversion is between unitless and radians? |
"Incorrect" for some definition of "correctness", yes, but the point is that radians are dimensionless |
The author of the Frink programming language has a lot of opinionated commentary on units. Here he is on hertz and radians. His summary conclusion:
|
Thanks @jariji. That whole rant was actually really helpful for understanding the issue. I would be in favor of printing this snippet from it out as a warning whenever someone uses
|
Instead of julia> uconvert(u"rad/s", 1.0u"rps")
6.283185307179586 rad s^-1
julia> uconvert(u"rad/s", 1.0u"Hz2π")
6.283185307179586 rad s^-1 |
Printing something every time a specific unit is used is simply impractical. I would guess that some people use the
This might be true in the context of sinusoidal/circular motion, but in general I don’t agree with it. The unit The problem only arises in sinusoidal/circular motion, because Maybe we could add a FAQ section in the manual. We could also add warnings to the docstrings of |
That was mostly hyperbole. I don't think we should actually print out a wall of text whenever someone uses the unit. But honestly even doing that would be better than the current situation of silently giving an unexpected result.
Okay, but sinusoidal motion is where
I don't think a docstring would be sufficient here because people wouldn't usually check the docstring of a physical unit if they have no reason to believe they might be misunderstanding it. I can't emphasize enough that the common understanding and practical usage of a hertz is that of a cycle per second, not of an unqualified "one per second". Even the NIST page on SI time units describes one hertz as "one cycle per second". |
#531 (comment) nailed it, IMO:
|
NIST page writes:
Thus "period" and "cycle" are used synonymously there, I'd also add "event" as a further synonym. Though "cycle" might suggest sinusoidal/circular motion, "period" doesn't. |
Related publication:
|
I would expect this to give
6.2831853 rad s⁻¹
The text was updated successfully, but these errors were encountered: