4
$\begingroup$
UnitConvert[Quantity[360, "Degrees^2"], "Steradians"]

AngularDegrees^2 and Steradians are incompatible units

What am I doing wrong in not getting 4$\pi$?

$\endgroup$
4
  • 1
    $\begingroup$ By any chance, are you using "Degrees"^2, with the ^2 outside of the string, rather than "Degrees^2" ? That's the only way I can get something similar to your error. Alternatively, "AngularDegrees"^2 and "AngularDegrees^2" both work fine. $\endgroup$
    – MarcoB
    Commented Dec 28, 2020 at 15:26
  • $\begingroup$ No that doesn't seem to be the problem.I even get the error with UnitConvert[Quantity[1, "Steradians"], "Radians^2"] $\endgroup$
    – Nickpick
    Commented Dec 28, 2020 at 17:10
  • $\begingroup$ Have tried the below answers with a fresh kernel? $\endgroup$ Commented Dec 28, 2020 at 17:38
  • 1
    $\begingroup$ restarting the kernel after upgrading to Mathematica 12 solved the problem $\endgroup$
    – Nickpick
    Commented Dec 28, 2020 at 18:33

2 Answers 2

5
$\begingroup$

It seems you have misspelled "Degrees". When I correct your misspelling, I get

UnitConvert[Quantity[360, "Degrees^2"], "Steradians"]

Quantity[Pi^2/90, "Steradians"]

It quite a bit less than $4 \pi$. To find the angular measure of a complete sphere in angular degrees we can do the following:

UnitConvert[Quantity[4 π, "Steradians"], "Degrees^2"]
Quantity[129600/π, ("AngularDegrees")^2]

Also, note that a steradian is the same as a square radian.

UnitConvert[Quantity[1, "Steradians"], "Radians^2"]
Quantity[1, "Radians"^2]
$\endgroup$
7
  • $\begingroup$ Corrected the spelling, but sill getting Quantity::compat: (AngularDegrees)^2 and Steradians are incompatible units $\endgroup$
    – Nickpick
    Commented Dec 28, 2020 at 15:02
  • 1
    $\begingroup$ @Nickpick I can reproduce the result in this answer on MMA cloud. What’s your version and OS? $\endgroup$
    – MarcoB
    Commented Dec 28, 2020 at 15:09
  • $\begingroup$ I'm still on Mathematica 11, maybe need to upgrade to 12 $\endgroup$
    – Nickpick
    Commented Dec 28, 2020 at 15:35
  • $\begingroup$ @Nickpick I can't seem to reproduce your problem on MMA 12.0.0, see my answer below $\endgroup$
    – MarcoB
    Commented Dec 28, 2020 at 17:35
  • $\begingroup$ Mathematica 12 solves the problem. Seems to have been a bug in Mathematica 11 $\endgroup$
    – Nickpick
    Commented Dec 28, 2020 at 19:38
2
$\begingroup$

We can't seem to reproduce your problem.

Here are the results of your simpler question from comments, first on my laptop:

$Version
UnitConvert[Quantity[1, "Steradians"], "Radians^2"]

(* Out: 
"12.0.0 for Microsoft Windows (64-bit) (April 6, 2019)"
Quantity[1, "Radians"^2] 
*)

... and on the cloud version:

$Version
UnitConvert[Quantity[1, "Steradians"], "Radians^2"]

(* Out: 
"12.2.0 for Linux x86 (64-bit) (November 16, 2020)"
Quantity[1, "Radians"^2]
*)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.