From 0deeceb600899244a0832cecb1f9cbb3ecbd5f46 Mon Sep 17 00:00:00 2001 From: Steven Christe Date: Sun, 23 Dec 2018 11:32:21 +0100 Subject: [PATCH 1/3] Create constants_reference.py --- examples/plotting/constants_reference.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 examples/plotting/constants_reference.py diff --git a/examples/plotting/constants_reference.py b/examples/plotting/constants_reference.py new file mode 100644 index 00000000000..5966b6ddcbb --- /dev/null +++ b/examples/plotting/constants_reference.py @@ -0,0 +1,20 @@ +# coding: utf-8 +""" +=============== +SunPy Constants +=============== + +The example shows all of the 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 the constant can be had with the following command. +con.constants.keys() + +############################################################################## +# The following command will display all constants as well as their values +# in an astropy `Table `_ +print(con.print_all()) From 8dd7a3106fd2ae22502ac8e339c80c093c81570e Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Wed, 9 Jan 2019 10:09:33 +0000 Subject: [PATCH 2/3] comments and moved the file location --- .../constants_reference.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename examples/{plotting => units_and_coordinates}/constants_reference.py (71%) diff --git a/examples/plotting/constants_reference.py b/examples/units_and_coordinates/constants_reference.py similarity index 71% rename from examples/plotting/constants_reference.py rename to examples/units_and_coordinates/constants_reference.py index 5966b6ddcbb..65baf35f4ff 100644 --- a/examples/plotting/constants_reference.py +++ b/examples/units_and_coordinates/constants_reference.py @@ -4,17 +4,17 @@ SunPy Constants =============== -The example shows all of the constants provided by sunpy. +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 the constant can be had with the following command. -con.constants.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 `_ -print(con.print_all()) +con.print_all() From dc1bdcf2af15bc41ce34565931d232a572d666c9 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Wed, 9 Jan 2019 11:01:30 +0000 Subject: [PATCH 3/3] need to print the print. --- examples/units_and_coordinates/constants_reference.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/units_and_coordinates/constants_reference.py b/examples/units_and_coordinates/constants_reference.py index 65baf35f4ff..0114c643df2 100644 --- a/examples/units_and_coordinates/constants_reference.py +++ b/examples/units_and_coordinates/constants_reference.py @@ -17,4 +17,4 @@ ############################################################################## # The following command will display all constants as well as their values # in an astropy `Table `_ -con.print_all() +print(con.print_all())