-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
1 lumen does not equal 1 candela (1 lm -> cd
returns 1 cd
)
#225
Comments
1 lm -> cd
return 1 cd
)1 lm -> cd
returns 1 cd
)
Another silly example where insect thinks 1 lm = 1 cd:
But then it also does this silly unit math correctly:
|
Thank you for your feedback.
As per the SI standard, Insect defines 1 lumen to be 1 candela · sr and 1 sr (steradian) is defined as 1 m²/m². So 1 lumen = 1 candela · sr = 1 candela · 1 m²/m² = 1 candela
I don't think so. I see how that can be confusing if you think of radian and steradian as fundamental base units (measuring angle or solid angle). But they are not. They are derived units defined as m/m and m²/m², respectively. In a physics calculation, it is useful to explicitly write rad or sr at some places, but mathematically, these units are just placeholders for a 1. And (solid) angles are really just dimensionless quantities. All of the calculations you performed above are completely correct. If you want Insect to keep rad or sr = rad², you can simply ask for it in the conversion ( Note that everything also works fine if you use degree instead of radian. Insect will perform the degree => radian conversion for you:
See also:
|
Any feedback? |
Thank you for the detailed response! That was....illuminating. What you say does make total sense now and perfectly explains why it seemed to work in some cases and not in others. So basically when I see a plain My only feedback is that maybe this isn't a common interpretation/convention? I lack the context to say though. Wolfram alpha behaves the way I expect and tells you these units are incompatible. If you google basic questions like "convert candela to lumen" the results are usually from flashlight forums and the answer is that you need to know the beam angle. Insect's behavior is is unusual to me, but I'm no physicist and maybe I'm not like a typical insect user either! And thanks to your helpful response it's no longer confusing either. Cheers! |
Thank you for the feedback.
That's certainly possible.
Hm. In this example, I certainly see the appeal of Wolfram Alpha's "interpretation". User of Insect might accidentally forget to multiply by "angle squared". However, consider this example: A trigonometric function like "tan" turns "angles into ratios". The inverse, "atan", turns "ratios into angles". Let's say I have a flashlight beam that creates a circle of radius 1 m on a wall in 10 m distance. The angle of the cone would be atan(1 m / 10 m). In Insect, I could simply call:
In Wolfram Alpha, for the same query, I get "cd (candela) and lm (lumens) are not compatible". I have to use something like
to make it work. |
@varenc It's been over three years, but ... there is now a completely new version of this project called Numbat. It currently still follows Insects way of defining units — which is how the current SI standard defines those units. But Numbat is much more flexible in this respect and users can change/customize the complete unit system. This allows us to try alternative proposals on how units should be defined in the SI standard. In particular, there is a whole line of research which indicates that angles should not be treated as dimensionless. For Numbat, I wrote a version of its unit system that follows the proposal outlined in this paper. You can read more about the details, advantages, and drawbacks in the PR: sharkdp/numbat#167. But there is one advantage that directly relates to this ticket: if angles are treated as having their own base dimension, then lumen can not be converted to candela. You can try out this version of Numbat here: https://numbat.dev/angles/ Things to try:
Anyway. Thought you might be interested.
Re-reading my comment from above.. I now have a slightly different view on this topic after reading all of these papers. I'm not 100% convinced this modification should make it to the SI standard, but when dealing with units in software, it's certainly a very valuable approach.
Interestingly, that is actually not the case anymore. It currently results in |
I haven't looked into this thoroughly at all, but insect seems to define 1 lumen as 1 candela in some cases?
That's incorrect. It should return an error as that's an invalid conversion.
But also, this does work correctly:
So at some level insect must know a 1 lumen = cd ⋅(angle)^2.
The text was updated successfully, but these errors were encountered: