sunpy Constants

The example shows all of the solar physics specific constants provided by sunpy.

from sunpy.sun import constants as con

All constants are stored in a dictionary. A list of all available keys which describe each constant can be had with the following command.

print(con.constants.keys())
dict_keys(['mass', 'radius', 'luminosity', 'mean distance', 'perihelion distance', 'aphelion distance', 'age', 'solar flux unit', 'visual magnitude', 'average angular size', 'surface area', 'average density', 'surface gravity', 'moment of inertia', 'volume', 'escape velocity', 'oblateness', 'metallicity', 'sunspot cycle', 'average intensity', 'effective temperature', 'mass conversion rate', 'center density', 'center temperature', 'absolute magnitude', 'mean energy production', 'ellipticity', 'GM', 'W_0', 'sidereal rotation rate', 'first Carrington rotation (JD TT)', 'mean synodic period', 'alpha_0', 'delta_0'])

The following command will display all 34 constants.

print(con.print_all())
               key                ...
--------------------------------- ...
                             mass ...
                           radius ...
                       luminosity ...
                    mean distance ...
              perihelion distance ...
                aphelion distance ...
                              age ...
                  solar flux unit ...
                 visual magnitude ...
             average angular size ...
                              ... ...
               center temperature ...
               absolute magnitude ...
           mean energy production ...
                      ellipticity ...
                               GM ...
                              W_0 ...
           sidereal rotation rate ...
first Carrington rotation (JD TT) ...
              mean synodic period ...
                          alpha_0 ...
                          delta_0 ...
Length = 34 rows

Total running time of the script: ( 0 minutes 0.008 seconds)

Gallery generated by Sphinx-Gallery