get#

sunpy.sun.constants.get(key)[source]#

Retrieve a constant by key. This is just a short cut into a dictionary.

Parameters:

key (str) – Key in dictionary in constants.

Returns:

constant (Constant)

See also

None

Contains the description of constants, which, as a dictionary literal object, does not itself possess a docstring.

Examples

>>> from sunpy.sun import constants
>>> constants.get('mass')
<<class 'astropy.constants.iau2015.IAU2015'> name='Solar mass' value=1.9884754153381438e+30 uncertainty=9.236140093538353e+25 unit='kg' reference='IAU 2015 Resolution B 3 + CODATA 2014'>