Repository navigation
Conversation
The radian was 1 and the hertz 1/second, so 1 rad/s equalled 1 Hz. The radian is now a base unit (RADIAN, dimension 'angle', in the common set), collected with SI_BASE_UNITS in the new BASE_UNITS. The hertz is a cycle per second (2*pi*radian/second), the steradian radian**2, and the degree, arcminute, arcsecond, lumen and lux are expressed in it. 2*pi*f rad/s now equals f Hz; 1 rad vs 1 and 1 Hz vs 1/s differ in dimension. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
m-messer
force-pushed
the
fix/radian-dimension
branch
from
October 16, 2026 08:54
f355af1 to
ff41c06
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The radian was
1and the hertz1/second, so1 rad/sequalled1 Hz. Physically, 1 Hz is one cycle per second, which is 2π rad/s. Because of this, the upstreamtest_radians_to_frequency(2*pi*f radian/secondvsf Hz) failed.Change
The angle is now a dimension:
RADIAN) with the dimensionangle. It stays in thecommonset with the symbolr. The newBASE_UNITSholds it together withSI_BASE_UNITS.hertz=2*pi*radian/second, i.e. a cycle per second.becquerelstays1/second.steradian=radian**2. Degree, arcminute and arcsecond are multiples of the radian. Lumen and lux now include thesrfactor.quantity.pyusesBASE_UNITS, so the radian's factor is pulled out like the other base units' and it gets theangledimension.Breaking
These pairs no longer have the same dimension, so
same_dimensionreturns False for them:1 radand11 Hzand1/s1 Hzand1 BqResponses that mix them, e.g.
50 s^-1for a frequency or a bare number for an angle, now give a dimension mismatch. The README and CHANGELOG describe the new behaviour.The earlier 0.3.0 CHANGELOG entry ("radian and steradian are now 1") is now partly out of date and could be merged with the new entry before release.
Testing
test_radians_to_frequency.expected_changes.json.🤖 Generated with Claude Code