Ask Your Question

More physics constants in Sagemath

asked 2019-09-13 04:31:37 -0600

John Bao gravatar image

updated 2019-09-13 04:34:31 -0600

I can you following command to load physics constants h and c:

 from scipy.constants import  h, c
 h, c   # show value of h and c

But, how can I load more physics constants such as Bohr magneton? Following command doesn't work,

 from scipy.constants import  Bohr magneton
 Bohr magneton   # to show Bohr magneton

I load physics constant from

Thanks for help.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-09-13 05:33:21 -0600

tmonteil gravatar image

As explained in the doc you provided, this constant appears in the constant database, so you can do:

sage: from scipy.constants import physical_constants
sage: physical_constants["Bohr magneton"]
(9.274009994e-24, 'J T^-1', 5.7e-32)

So you can do something like:

sage: Bohr = physical_constants["Bohr magneton"][0]
sage: Bohr
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-09-13 04:31:37 -0600

Seen: 133 times

Last updated: Sep 13 '19