Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2882 from ehsteve/gallery-allconstants
Added constants list to gallery
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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()) |