Skip to content

Commit

Permalink
Merge pull request #2882 from ehsteve/gallery-allconstants
Browse files Browse the repository at this point in the history
Added constants list to gallery
  • Loading branch information
Cadair committed Jan 9, 2019
2 parents 492608d + dc1bdcf commit 03e4700
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/units_and_coordinates/constants_reference.py
@@ -0,0 +1,20 @@
# coding: utf-8
"""
===============
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())

##############################################################################
# The following command will display all constants as well as their values
# in an astropy `Table <http://docs.astropy.org/en/stable/table/index.html>`_
print(con.print_all())

0 comments on commit 03e4700

Please sign in to comment.