mp-units icon indicating copy to clipboard operation
mp-units copied to clipboard

Steradian based units

Open mpusz opened this issue 2 years ago • 7 comments

13f03bfe704083fb1e397f515fba08fd730823be added support for luminous_flux that for now is just an alias for power. It does not account for steradian.

Should it? How to properly define it?

mpusz avatar May 13 '22 12:05 mpusz

Very interesting question! I am not an expert in luminance by any means, but I did a little reading. Here are my thoughts.

  • The steradian is exactly equivalent to the radian-squared. There is widespread agreement on this point; see, e.g., the separate 2021 papers from Paul Quincey, and Brian Leonard, proposing to fix the SI by treating angles correctly.
  • I don't think luminous flux should have the same dimensions as power (as it's currently done in the code). I think that confuses luminance/brightness units, with energy units. It seems as though 1/683 is a lower bound for the lumen, depending on the spectral distribution, not an equality relationship.
  • A key clue that something is wrong is that the current dimension for lumens doesn't have any contribution from the dimension of candelas. I think the correct defining relationship is that one lumen is one candela-steradian.
  • I think including strongly-typed steradians will be very important, because otherwise it will be too easy to mix up lumens and candelas.
  • It's probably unwise of me to risk creating another merge conflict for myself w.r.t. #355 :wink:

chiphogg avatar Jun 16 '22 00:06 chiphogg

I am a bit confused, the issue claims to be about "Steradian based units", but we seem to discuss luminous_flux...

I am no expert in luminous units, so I had to do some reading as well. I agree that luminous flux should not be an alias for power, but not because steradians are involved. Luminous dimensions/units are different from radiant (or energy) dimensions/units, because of standardised luminous efficiency function. For example:

luminous intensity is a measure of the wavelength-weighted power emitted by a light source in a particular direction per unit solid angle

If we omit "wavelength-weighted", then luminous intensity is just power per solid angle (aka radiant intensity) and cd becomes an alias for W/sr. But cd is actually SI base unit, and hence not an alias for W/sr.

I agree that we should define lm = cd⋅sr and fix luminous_flux accordingly. There must not be a conversion between lumens and watts, because it depends on spectral distribution.

This is what I had to say about luminous units. I'll post my thoughts on "steradian based units" separately to allow others to react on them separately.

i-ky avatar Jun 16 '22 07:06 i-ky

The steradian is exactly equivalent to the radian-squared.

This is debatable. As per today's SI, both radian and steradian are dimensionless and therefore steradian is indeed exactly equivalent to radian-squared, at least dimension-wise. Even more broadly, steradian raised to arbitrary power is equivalent to radian raised to (possibly different) arbitrary power).

Semantically though, steradian and radian-squared are different. For example, by multiplying luminous intensity [cd] by angular velocity [rad/s] squared one would not get [lm/s²], one would get [cd⋅rad²/s²]. One cannot simply get steradians by just multiplying two planar angles, this only works for infinitesimally small angles, but in general case there is some spherical geometry involved.

I think including strongly-typed steradians will be very important, because otherwise it will be too easy to mix up lumens and candelas.

This was extensively discussed in #99. I think that the goal of this library is performing dimensional analysis per SI or other well established unit/dimension systems. Users can build on top of it to reach as much type safety as needed (e.g. introduce strong types for width, length and height).

i-ky avatar Jun 16 '22 08:06 i-ky

I am a bit confused, the issue claims to be about "Steradian based units", but we seem to discuss luminous_flux...

I am no expert in luminous units, so I had to do some reading as well. I agree that luminous flux should not be an alias for power, but not because steradians are involved. Luminous dimensions/units are different from radiant (or energy) dimensions/units, because of standardised luminous efficiency function. For example:

luminous intensity is a measure of the wavelength-weighted power emitted by a light source in a particular direction per unit solid angle

If we omit "wavelength-weighted", then luminous intensity is just power per solid angle (aka radiant intensity) and cd becomes an alias for W/sr. But cd is actually SI base unit, and hence not an alias for W/sr.

At first, I thought this too, but now I think that misses an important distinction. Luminous units describe a qualitatively different phenomenon than energy flow: the phenomenon of "brightness perceived by a human eye". Yes, brightness (at a given wavelength) is proportional to power. But they are qualitatively different phenomena.

This was a huge conceptual hurdle for me to get over, but on reflection, it's the only way I can make sense of the fact that there is a separate dimension in the ISQ for "brightness": otherwise, why wouldn't we just use watts?

The steradian is exactly equivalent to the radian-squared.

This is debatable. As per today's SI, both radian and steradian are dimensionless and therefore steradian is indeed exactly equivalent to radian-squared, at least dimension-wise. Even more broadly, steradian raised to arbitrary power is equivalent to radian raised to (possibly different) arbitrary power).

Semantically though, steradian and radian-squared are different. For example, by multiplying luminous intensity [cd] by angular velocity [rad/s] squared one would not get [lm/s²], one would get [cd⋅rad²/s²]. One cannot simply get steradians by just multiplying two planar angles, this only works for infinitesimally small angles, but in general case there is some spherical geometry involved.

I think you may be conflating two separate issues: the dimensions/units involved, and the procedures for computing specific values. It sounds like you agree that radians squared are equivalent to steradians for infinitesimal angles. Well, computing a macroscopic solid angle is equivalent to an integral over microscopic solid angles. In any case, the dimensions and units are the same: if the steradian unit is equivalent to radian-squared unit in the microscopic case, then it always is.

I think including strongly-typed steradians will be very important, because otherwise it will be too easy to mix up lumens and candelas.

This was extensively discussed in #99. I think that the goal of this library is performing dimensional analysis per SI or other well established unit/dimension systems. Users can build on top of it to reach as much type safety as needed (e.g. introduce strong types for width, length and height).

Strong types for width/length/height solve a different problem than distinguishing between lumens and candelas. In the former case, there is no scaling difference, and we make the distinction purely to help with bookkeeping. In the latter, we will get different numerical answers depending on which kind of quantity we are talking about. The value we pass around for an isotropic light source will be different by a factor of 4*pi depending on whether we measure it in lumens or candelas... but if we "ignore steradians", they will be equivalent.

Incidentally, the lumen/candela distinction is a great example of why the SI's treatment of angles as "dimensionless" is suboptimal. From Quincey, 2021:

It is illuminating to note that in the field of light and radiation, within which solid angles feature strongly in the definitions of quantities such as radiant intensity and radiance, the standard units unambiguously contain the angle unit – they are W sr-1 and W sr-1 m-2 respectively. The steradian is not optional, even though 1 steradian is officially equal to the number 1, because this would lead to confusion between the lumen and the candela, for example, where 1 cd = 1 lm sr-1 . So unlike torque, where the angle unit is officially absent, or angular velocity, where the angle unit is officially optional, for radiance the angle unit is officially compulsory. No serious unit system should be satisfied with this unnecessary lack of consistency.


To sum up, these action items seem clearly correct to me:

  1. Add steradian as a unit of solid angle, making it dimensionally equivalent to radian-squared.
  2. Define lumen as the product of candela and steradian.

chiphogg avatar Jun 16 '22 15:06 chiphogg

It sounds like you agree that radians squared are equivalent to steradians for infinitesimal angles. Well, computing a macroscopic solid angle is equivalent to an integral over microscopic solid angles.

Both statements are true, but the equivalence of steradian and radian squared does not follow from them. Integrals don't "preserve" every property. For example, infinitesimal rotation is a vector quantity, but finite rotation isn't:

Despite having direction and magnitude, angular displacement is not a vector because it does not obey the commutative law for addition.[1] Nevertheless, when dealing with infinitesimal rotations, second order infinitesimals can be discarded and in this case commutativity appears.

I don't know what are the rules of dimensional analysis, when it comes to integrals and derivatives. Dimensional analysis article on Wikipedia has these rules, but the whole article reflects current state of dimensional analysis, where angles are considered dimensionless.

I would not be surprised if in the future someone will come up with an argument that planar and solid angles should be independent dimensions (just like someone did for "luminous family" of units). I think that today's conventions should be implemented as is following the principle of least surprise. When (and if) scientific community reaches consensus on separate dimension for radian/steradian/whatever, implementation will be adjusted.

i-ky avatar Jun 17 '22 07:06 i-ky

  1. Define lumen as the product of candela and steradian.

I totally agree. This is true regardless of the definition of steradian (dimensionless, equivalent to radian squared or whatever) and definitely better than current definition as 1/683 W.

i-ky avatar Jun 17 '22 07:06 i-ky

Both statements are true, but the equivalence of steradian and radian squared does not follow from them. Integrals don't "preserve" every property. For example, infinitesimal rotation is a vector quantity, but finite rotation isn't:

Despite having direction and magnitude, angular displacement is not a vector because it does not obey the commutative law for addition.[1] Nevertheless, when dealing with infinitesimal rotations, second order infinitesimals can be discarded and in this case commutativity appears.

Unfortunately, I think some of the terminology in the article is a bit misleading. When we call the combining of subsequent rotations "addition," we're speaking loosely and colloquially. Really, the operation is composition. In some cases (e.g., two dimensions; infinitesimals), you can compute the result of the composition by adding the components, but in other cases (as you rightly note), you can't.

Whenever you have true addition, and you're dealing with quantities, you need to express them all in the same unit, and the result will have this same unit. I'm not aware of any exceptions to this rule. Are you?

I don't know what are the rules of dimensional analysis, when it comes to integrals and derivatives. Dimensional analysis article on Wikipedia has these rules, but the whole article reflects current state of dimensional analysis, where angles are considered dimensionless.

If we admit another dimension into dimensional analysis, it would follow the same rules of dimensional analysis. It would have to. The question of whether angles (plane and solid) should be admitted is a separate question, which has no bearing on how dimensional analysis interacts with derivatives and integrals.

I would not be surprised if in the future someone will come up with an argument that planar and solid angles should be independent dimensions (just like someone did for "luminous family" of units). I think that today's conventions should be implemented as is following the principle of least surprise. When (and if) scientific community reaches consensus on separate dimension for radian/steradian/whatever, implementation will be adjusted.

While it clearly hasn't reached "consensus", this has already begun to happen: see the two papers from 2021 which I linked in my first post above. They don't agree on all details, the main disagreement being whether quantities such as torque and moment of inertia should include angles in their definitions. (Either approach would work.) However, they agree on far more than they disagree. This includes the fact that the steradian is the coherent derived unit for solid angle, and is equivalent to the radian-squared.


Perhaps the correspondence is eaiser to grasp if we consider other units for solid angles. The square degree is one such unit, which is common in astronomy. It's equal to $\left(\frac{\pi}{180}\right)^2 \text{sr}$. It's also equal to... well, the square of one degree. This establishes that solid angle scales as the square of angle, which is really all we need. The conclusion that a steradian is a radian squared follows inescapably from the above. See also this article, on the concept of solid angles generally.

chiphogg avatar Jun 18 '22 19:06 chiphogg

Thank you for this very interesting discussion and links to awesome reading 😃

For now, I fixed what was clearly wrong with luminous flux, and continued the current approach of using dimensionally-strong angles in the SI definitions. I plan to change that in the future as I stated several times already:

  • https://github.com/mpusz/units/issues/99#issuecomment-753648444
  • https://github.com/mpusz/units/issues/239#issuecomment-784559683
  • https://github.com/mpusz/units/issues/281#issuecomment-887249740

but first, I must finish work on #281.

mpusz avatar Sep 01 '22 10:09 mpusz