[Python-modules-commits] [python-pysolar] 04/08: import version 0.7+gite32d755, latest version from authors homepage, debian/ directory removed

Wolfgang Borgert debacle at moszumanska.debian.org
Thu Aug 10 18:49:54 UTC 2017


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to branch master
in repository python-pysolar.

commit 28cf1a14b8133691869d489189da3aaf2a705620
Author: W. Martin Borgert <debacle at debian.org>
Date:   Thu Aug 10 19:04:48 2017 +0200

    import version 0.7+gite32d755, latest version from authors homepage, debian/ directory removed
---
 .gitignore                                         |    6 +-
 .travis.yml                                        |    7 +
 CONTRIBUTORS.markdown                              |    9 +-
 Pysolar.egg-info/PKG-INFO                          |   12 -
 Pysolar.egg-info/SOURCES.txt                       |   17 -
 Pysolar.egg-info/dependency_links.txt              |    1 -
 Pysolar.egg-info/top_level.txt                     |    1 -
 Pysolar/__init__.py                                |    1 -
 Pysolar/constants.py                               |  402 --
 Pysolar/elevation.py                               |   62 -
 Pysolar/julian.py                                  |   63 -
 Pysolar/radiation.py                               |   49 -
 Pysolar/rest.py                                    |  229 -
 Pysolar/simulate.py                                |   67 -
 Pysolar/solar.py                                   |  359 --
 Pysolar/testsolar.py                               |  151 -
 Pysolar/util.py                                    |  656 --
 README.markdown                                    |   59 +-
 debian/changelog                                   |    5 -
 debian/compat                                      |    1 -
 debian/control                                     |   22 -
 debian/copyright                                   |   39 -
 debian/dirs                                        |    2 -
 debian/docs                                        |    1 -
 debian/files                                       |    1 -
 debian/rules                                       |    6 -
 development-notes.md                               |   13 +-
 dist/Pysolar-0.5.tar.gz                            |  Bin 21144 -> 0 bytes
 dist/Pysolar-0.6-alpha.tar.gz                      |  Bin 21164 -> 0 bytes
 doc/Makefile                                       |  171 +-
 doc/conf.py                                        |  244 +-
 .../chart_Pysolar_error_v_altitude_2008-07-21.png  |  Bin 0 -> 60569 bytes
 .../chart_Pysolar_error_v_altitude_2014-12-13.png  |  Bin 0 -> 42380 bytes
 .../chart_Pysolar_error_v_altitude_2015-04-17.png  |  Bin 0 -> 35809 bytes
 .../chart_Pysolar_error_v_azimuth_2008-07-21.png   |  Bin 0 -> 62970 bytes
 .../chart_Pysolar_error_v_azimuth_2014-12-13.png   |  Bin 0 -> 43644 bytes
 .../chart_Pysolar_error_v_azimuth_2015-04-17.png   |  Bin 0 -> 45255 bytes
 .../chart_Pysolar_error_v_latitude_2008-07-21.png  |  Bin 0 -> 99268 bytes
 .../chart_Pysolar_error_v_latitude_2014-12-13.png  |  Bin 0 -> 59782 bytes
 .../chart_Pysolar_error_v_latitude_2015-04-17.png  |  Bin 0 -> 53716 bytes
 .../chart_Pysolar_error_v_longitude_2008-07-21.png |  Bin 0 -> 135309 bytes
 .../chart_Pysolar_error_v_longitude_2014-12-13.png |  Bin 0 -> 96718 bytes
 .../chart_Pysolar_error_v_longitude_2015-04-17.png |  Bin 0 -> 70428 bytes
 .../img/reference_frame.png                        |  Bin
 doc/index.rst                                      |  249 +-
 images/spherical.jpg                               |  Bin 844711 -> 0 bytes
 images/sun_path_2009-03-19.jpg                     |  Bin 444611 -> 0 bytes
 images/sun_path_2009-03-19_800x400.jpg             |  Bin 67494 -> 0 bytes
 pysolar.org/all.css                                |   54 -
 pysolar.org/gradient.png                           |  Bin 497 -> 0 bytes
 pysolar.org/index.html                             |  107 -
 pysolar.org/logo.png                               |  Bin 8078 -> 0 bytes
 pysolar/__init__.py                                |    6 +
 pysolar/constants.py                               |  445 ++
 pysolar/elevation.py                               |   78 +
 pysolar/radiation.py                               |   52 +
 pysolar/rest.py                                    |  300 +
 pysolar/rest2-validation.ipynb                     |   98 +
 pysolar/simulate.py                                |   64 +
 pysolar/solar.py                                   |  388 ++
 pysolar/solartime.py                               |  790 +++
 pysolar/util.py                                    |  641 ++
 pysolar_v_usno.csv                                 | 6570 --------------------
 setup.py                                           |    9 +-
 test/pysolar_v_usno.csv                            | 6260 +++++++++++++++++++
 {Pysolar => test}/query_usno.py                    |   36 +-
 test/test_hour_angle.py                            |   82 +
 test/testsolar.py                                  |  184 +
 usno_data_6259.txt => test/usno_data_6259.txt      |    0
 .../usno_data_short_test.txt                       |    0
 test/validation.ipynb                              |  255 +
 util/get_delta_t                                   |   82 +
 validation.ipynb                                   |  239 -
 73 files changed, 10354 insertions(+), 9291 deletions(-)

diff --git a/.gitignore b/.gitignore
index 281ef63..a663447 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,8 @@
 *.pyc
 
 # Output of Sphinx documentation generator
-doc/.build
+doc/_build
+
+# Output from setuptools
+/build/
+/pysolar.egg-info/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..32af48e
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,7 @@
+language: python
+python:
+    - "3.4"
+    - "3.5"
+    - "3.6"
+    - "3.7-dev"
+script: PYTHONPATH="." python test/testsolar.py
diff --git a/CONTRIBUTORS.markdown b/CONTRIBUTORS.markdown
index 2aa0fa5..fd4e77b 100644
--- a/CONTRIBUTORS.markdown
+++ b/CONTRIBUTORS.markdown
@@ -5,25 +5,30 @@ Many people have contributed to Pysolar since its inception.
 
 Thanks to:
 
+* Lawrence d'Oliveiro (ldo)
+* Naz Gassiep (mrnaz)
+* Sean T. Hammond (seanth)
 * Will Hardy
 * Poul-Henning Kamp
+* David V. Hill
 * PJ Kundert
 * Lahmeyer International
 * Jon Little
 * Tim Michelsen
+* Mark J. Nelson (anadrome)
 * Simeon Obinna Nwaogaidu
 * Brent Pedersen
 * David Perez-Suarez (DPSHelio)
 * Francois Rogez
 * Arnaldo Russo
 * Sean Taylor
-* Sean T. H. (seanth)
+* Andrew Benedict Wallace
 * Robin Wilson
 * Pietro Zambelli
 * Holger Zebner
 
 for their contributions of code, bugfixes, documentation, and general encouragement.
 
-I appreciate it.
+I appreciate all of the help you have given.
 
 Brandon Stafford
diff --git a/Pysolar.egg-info/PKG-INFO b/Pysolar.egg-info/PKG-INFO
deleted file mode 100644
index c7e4a1a..0000000
--- a/Pysolar.egg-info/PKG-INFO
+++ /dev/null
@@ -1,12 +0,0 @@
-Metadata-Version: 1.1
-Name: Pysolar
-Version: 0.6-alpha
-Summary: Collection of Python libraries for simulating the irradiation of any point on earth by the sun
-Home-page: http://pysolar.org
-Author: Brandon Stafford
-Author-email: brandon at pingswept.org
-License: GNU General Public License (GPL)
-Description: UNKNOWN
-Platform: UNKNOWN
-Requires: numpy
-Requires: pytz
diff --git a/Pysolar.egg-info/SOURCES.txt b/Pysolar.egg-info/SOURCES.txt
deleted file mode 100644
index 2c4d327..0000000
--- a/Pysolar.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-MANIFEST.in
-setup.py
-Pysolar/__init__.py
-Pysolar/constants.py
-Pysolar/elevation.py
-Pysolar/julian.py
-Pysolar/query_usno.py
-Pysolar/radiation.py
-Pysolar/rest.py
-Pysolar/simulate.py
-Pysolar/solar.py
-Pysolar/testsolar.py
-Pysolar/util.py
-Pysolar.egg-info/PKG-INFO
-Pysolar.egg-info/SOURCES.txt
-Pysolar.egg-info/dependency_links.txt
-Pysolar.egg-info/top_level.txt
\ No newline at end of file
diff --git a/Pysolar.egg-info/dependency_links.txt b/Pysolar.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/Pysolar.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/Pysolar.egg-info/top_level.txt b/Pysolar.egg-info/top_level.txt
deleted file mode 100644
index 39f1045..0000000
--- a/Pysolar.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-Pysolar
diff --git a/Pysolar/__init__.py b/Pysolar/__init__.py
deleted file mode 100644
index d018838..0000000
--- a/Pysolar/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from .solar import *
diff --git a/Pysolar/constants.py b/Pysolar/constants.py
deleted file mode 100644
index 22658ee..0000000
--- a/Pysolar/constants.py
+++ /dev/null
@@ -1,402 +0,0 @@
-#!/usr/bin/python
-
-#    Copyright Brandon Stafford
-#
-#    This file is part of Pysolar.
-#
-#    Pysolar is free software; you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation; either version 3 of the License, or
-#    (at your option) any later version.
-#
-#    Pysolar is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU General Public License for more details.
-#
-#    You should have received a copy of the GNU General Public License along
-#    with Pysolar. If not, see <http://www.gnu.org/licenses/>.
-
-"""This file is consists of numerical constants for calculating corrections,
-such as the wiggling ("nutation") of the axis of the earth. It also includes
-functions for building dictionaries of polynomial functions for rapid
-calculation of corrections.
-
-Most of the constants come from a 2005 paper by Reda and Andreas:
-
-I. Reda and A. Andreas, "Solar Position Algorithm for Solar Radiation
-Applications," National Renewable Energy Laboratory, NREL/TP-560-34302,
-revised November 2005.
-
-http://www.osti.gov/bridge/servlets/purl/15003974-iP3z6k/native/15003974.PDF
-
-However, it seems that Reda and Andreas took the bulk of the constants
-(L0, etc.) from Pierre Bretagnon and Gerard Francou's Variations Seculaires
-des Orbites Planetaires, or VSOP87:
-
-http://en.wikipedia.org/wiki/Secular_variations_of_the_planetary_orbits#VSOP87
-
-See also ftp://ftp.imcce.fr/pub/ephem/planets/vsop87/VSOP87D.ear
-
-"""
-
-def buildPolyFit(params): 
-    (a, b, c, d) = params
-    return (lambda x: a + b * x + c * x ** 2 + (x ** 3) / d)
-
-def buildPolyDict():
-    """This function builds a dictionary of polynomial functions from a list of
-    coefficients, so that the functions can be called by name. This is used in
-    calculating nutation.
-
-    """
-    return dict([(name, buildPolyFit(coeffs)) for (name, coeffs) in coeff_list])
-
-
-coeff_list = [
-		('ArgumentOfLatitudeOfMoon', (93.27191, 483202.017538, -0.0036825, 327270.0)),
-		('LongitudeOfAscendingNode', (125.04452, -1934.136261, 0.0020708, 450000.0)),
-		('MeanElongationOfMoon', (297.85036, 445267.111480, -0.0019142, 189474.0)),
-		('MeanAnomalyOfMoon', (134.96298, 477198.867398, 0.0086972, 56250.0)),
-		('MeanAnomalyOfSun', (357.52772, 35999.050340, -0.0001603, -300000.0))
-	]
-
-earth_radius = 6378140.0 # meters
-
-aberration_sin_terms = [[0,0,0,0,1],
-	[-2,0,0,2,2],
-	[0,0,0,2,2],
-	[0,0,0,0,2],
-	[0,1,0,0,0],
-	[0,0,1,0,0],
-	[-2,1,0,2,2],
-	[0,0,0,2,1],
-	[0,0,1,2,2],
-	[-2,-1,0,2,2],
-	[-2,0,1,0,0],
-	[-2,0,0,2,1],
-	[0,0,-1,2,2],
-	[2,0,0,0,0],
-	[0,0,1,0,1],
-	[2,0,-1,2,2],
-	[0,0,-1,0,1],
-	[0,0,1,2,1],
-	[-2,0,2,0,0],
-	[0,0,-2,2,1],
-	[2,0,0,2,2],
-	[0,0,2,2,2],
-	[0,0,2,0,0],
-	[-2,0,1,2,2],
-	[0,0,0,2,0],
-	[-2,0,0,2,0],
-	[0,0,-1,2,1],
-	[0,2,0,0,0],
-	[2,0,-1,0,1],
-	[-2,2,0,2,2],
-	[0,1,0,0,1],
-	[-2,0,1,0,1],
-	[0,-1,0,0,1],
-	[0,0,2,-2,0],
-	[2,0,-1,2,1],
-	[2,0,1,2,2],
-	[0,1,0,2,2],
-	[-2,1,1,0,0],
-	[0,-1,0,2,2],
-	[2,0,0,2,1],
-	[2,0,1,0,0],
-	[-2,0,2,2,2],
-	[-2,0,1,2,1],
-	[2,0,-2,0,1],
-	[2,0,0,0,1],
-	[0,-1,1,0,0],
-	[-2,-1,0,2,1],
-	[-2,0,0,0,1],
-	[0,0,2,2,1],
-	[-2,0,2,0,1],
-	[-2,1,0,2,1],
-	[0,0,1,-2,0],
-	[-1,0,1,0,0],
-	[-2,1,0,0,0],
-	[1,0,0,0,0],
-	[0,0,1,2,0],
-	[0,0,-2,2,2],
-	[-1,-1,1,0,0],
-	[0,1,1,0,0],
-	[0,-1,1,2,2],
-	[2,-1,-1,2,2],
-	[0,0,3,2,2],
-	[2,-1,0,2,2]]
-	
-nutation_coefficients = [[-171996,-174.2,92025,8.9],
-	[-13187,-1.6,5736,-3.1],
-	[-2274,-0.2,977,-0.5],
-	[2062,0.2,-895,0.5],
-	[1426,-3.4,54,-0.1],
-	[712,0.1,-7,0],
-	[-517,1.2,224,-0.6],
-	[-386,-0.4,200,0],
-	[-301,0,129,-0.1],
-	[217,-0.5,-95,0.3],
-	[-158,0,0,0],
-	[129,0.1,-70,0],
-	[123,0,-53,0],
-	[63,0,0,0],
-	[63,0.1,-33,0],
-	[-59,0,26,0],
-	[-58,-0.1,32,0],
-	[-51,0,27,0],
-	[48,0,0,0],
-	[46,0,-24,0],
-	[-38,0,16,0],
-	[-31,0,13,0],
-	[29,0,0,0],
-	[29,0,-12,0],
-	[26,0,0,0],
-	[-22,0,0,0],
-	[21,0,-10,0],
-	[17,-0.1,0,0],
-	[16,0,-8,0],
-	[-16,0.1,7,0],
-	[-15,0,9,0],
-	[-13,0,7,0],
-	[-12,0,6,0],
-	[11,0,0,0],
-	[-10,0,5,0],
-	[-8,0,3,0],
-	[7,0,-3,0],
-	[-7,0,0,0],
-	[-7,0,3,0],
-	[-7,0,3,0],
-	[6,0,0,0],
-	[6,0,-3,0],
-	[6,0,-3,0],
-	[-6,0,3,0],
-	[-6,0,3,0],
-	[5,0,0,0],
-	[-5,0,3,0],
-	[-5,0,3,0],
-	[-5,0,3,0],
-	[4,0,0,0],
-	[4,0,0,0],
-	[4,0,0,0],
-	[-4,0,0,0],
-	[-4,0,0,0],
-	[-4,0,0,0],
-	[3,0,0,0],
-	[-3,0,0,0],
-	[-3,0,0,0],
-	[-3,0,0,0],
-	[-3,0,0,0],
-	[-3,0,0,0],
-	[-3,0,0,0],
-	[-3,0,0,0]]
-
-L0 = [[175347046.0,0,0],
-[3341656.0,4.6692568,6283.07585],
-[34894.0,4.6261,12566.1517],
-[3497.0,2.7441,5753.3849],
-[3418.0,2.8289,3.5231],
-[3136.0,3.6277,77713.7715],
-[2676.0,4.4181,7860.4194],
-[2343.0,6.1352,3930.2097],
-[1324.0,0.7425,11506.7698],
-[1273.0,2.0371,529.691],
-[1199.0,1.1096,1577.3435],
-[990,5.233,5884.927],
-[902,2.045,26.298],
-[857,3.508,398.149],
-[780,1.179,5223.694],
-[753,2.533,5507.553],
-[505,4.583,18849.228],
-[492,4.205,775.523],
-[357,2.92,0.067],
-[317,5.849,11790.629],
-[284,1.899,796.298],
-[271,0.315,10977.079],
-[243,0.345,5486.778],
-[206,4.806,2544.314],
-[205,1.869,5573.143],
-[202,2.4458,6069.777],
-[156,0.833,213.299],
-[132,3.411,2942.463],
-[126,1.083,20.775],
-[115,0.645,0.98],
-[103,0.636,4694.003],
-[102,0.976,15720.839],
-[102,4.267,7.114],
-[99,6.21,2146.17],
-[98,0.68,155.42],
-[86,5.98,161000.69],
-[85,1.3,6275.96],
-[85,3.67,71430.7],
-[80,1.81,17260.15],
-[79,3.04,12036.46],
-[71,1.76,5088.63],
-[74,3.5,3154.69],
-[74,4.68,801.82],
-[70,0.83,9437.76],
-[62,3.98,8827.39],
-[61,1.82,7084.9],
-[57,2.78,6286.6],
-[56,4.39,14143.5],
-[56,3.47,6279.55],
-[52,0.19,12139.55],
-[52,1.33,1748.02],
-[51,0.28,5856.48],
-[49,0.49,1194.45],
-[41,5.37,8429.24],
-[41,2.4,19651.05],
-[39,6.17,10447.39],
-[37,6.04,10213.29],
-[37,2.57,1059.38],
-[36,1.71,2352.87],
-[36,1.78,6812.77],
-[33,0.59,17789.85],
-[30,0.44,83996.85],
-[30,2.74,1349.87],
-[25,3.16,4690.48]]
-
-L1 = [[628331966747.0,0,0],
-[206059.0,2.678235,6283.07585],
-[4303.0,2.6351,12566.1517],
-[425.0,1.59,3.523],
-[119.0,5.796,26.298],
-[109.0,2.966,1577.344],
-[93,2.59,18849.23],
-[72,1.14,529.69],
-[68,1.87,398.15],
-[67,4.41,5507.55],
-[59,2.89,5223.69],
-[56,2.17,155.42],
-[45,0.4,796.3],
-[36,0.47,775.52],
-[29,2.65,7.11],
-[21,5.34,0.98],
-[19,1.85,5486.78],
-[19,4.97,213.3],
-[17,2.99,6275.96],
-[16,0.03,2544.31],
-[16,1.43,2146.17],
-[15,1.21,10977.08],
-[12,2.83,1748.02],
-[12,3.26,5088.63],
-[12,5.27,1194.45],
-[12,2.08,4694],
-[11,0.77,553.57],
-[10,1.3,3286.6],
-[10,4.24,1349.87],
-[9,2.7,242.73],
-[9,5.64,951.72],
-[8,5.3,2352.87],
-[6,2.65,9437.76],
-[6,4.67,4690.48]]
-
-L2 = [[52919.0,0,0],
-[8720.0,1.0721,6283.0758],
-[309.0,0.867,12566.152],
-[27,0.05,3.52],
-[16,5.19,26.3],
-[16,3.68,155.42],
-[10,0.76,18849.23],
-[9,2.06,77713.77],
-[7,0.83,775.52],
-[5,4.66,1577.34],
-[4,1.03,7.11],
-[4,3.44,5573.14],
-[3,5.14,796.3],
-[3,6.05,5507.55],
-[3,1.19,242.73],
-[3,6.12,529.69],
-[3,0.31,398.15],
-[3,2.28,553.57],
-[2,4.38,5223.69],
-[2,3.75,0.98]]
-
-L3 = [[289.0,5.844,6283.076],
-[35,0,0],
-[17,5.49,12566.15],
-[3,5.2,155.42],
-[1,4.72,3.52],
-[1,5.3,18849.23],
-[1,5.97,242.73]]
-
-L4 = [[114.0,3.142,0],
-[8,4.13,6283.08],
-[1,3.84,12566.15]]
-
-L5 = [[1,3.14,0]]
-
-B0 = [[280.0,3.199,84334.662],
-[102.0,5.422,5507.553],
-[80,3.88,5223.69],
-[44,3.7,2352.87],
-[32,4,1577.34]]
-
-B1 = [[9,3.9,5507.55],
-[6,1.73,5223.69]]
-
-
-R0 = [[100013989.0,0,0],
-[1670700.0,3.0984635,6283.07585],
-[13956.0,3.05525,12566.1517],
-[3084.0,5.1985,77713.7715],
-[1628.0,1.1739,5753.3849],
-[1576.0,2.8469,7860.4194],
-[925.0,5.453,11506.77],
-[542.0,4.564,3930.21],
-[472.0,3.661,5884.927],
-[346.0,0.964,5507.553],
-[329.0,5.9,5223.694],
-[307.0,0.299,5573.143],
-[243.0,4.273,11790.629],
-[212.0,5.847,1577.344],
-[186.0,5.022,10977.079],
-[175.0,3.012,18849.228],
-[110.0,5.055,5486.778],
-[98,0.89,6069.78],
-[86,5.69,15720.84],
-[86,1.27,161000.69],
-[85,0.27,17260.15],
-[63,0.92,529.69],
-[57,2.01,83996.85],
-[56,5.24,71430.7],
-[49,3.25,2544.31],
-[47,2.58,775.52],
-[45,5.54,9437.76],
-[43,6.01,6275.96],     
-[39,5.36,4694],
-[38,2.39,8827.39],
-[37,0.83,19651.05],
-[37,4.9,12139.55],
-[36,1.67,12036.46],
-[35,1.84,2942.46],
-[33,0.24,7084.9],
-[32,0.18,5088.63], 
-[32,1.78,398.15],
-[28,1.21,6286.6],
-[28,1.9,6279.55],
-[26,4.59,10447.39]]
-
-R1 = [[103019.0,1.10749,6283.07585],
-[1721.0,1.0644,12566.1517],
-[702.0,3.142,0],
-[32,1.02,18849.23],
-[31,2.84,5507.55],
-[25,1.32,5223.69],
-[18,1.42,1577.34],
-[10,5.91,10977.08],
-[9,1.42,6275.96],
-[9,0.27,5486.78]]
-
-R2 = [[4359.0,5.7846,6283.0758],
-[124.0,5.579,12566.152],
-[12,3.14,0],
-[9,3.63,77713.77],
-[6,1.87,5573.14],
-[3,5.47,18849]]
-
-R3 = [[145.0,4.273,6283.076],
-[7,3.92,12566.15]]
-
-R4 = [[4,2.56,6283.08]]
-
diff --git a/Pysolar/elevation.py b/Pysolar/elevation.py
deleted file mode 100644
index 9eea89a..0000000
--- a/Pysolar/elevation.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/python
-
-#    Copyright Sean T. Hammond
-#
-#    This file is part of Pysolar.
-#
-#    Pysolar is free software; you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation; either version 3 of the License, or
-#    (at your option) any later version.
-#
-#    Pysolar is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU General Public License for more details.
-#
-#    You should have received a copy of the GNU General Public License along
-#    with Pysolar. If not, see <http://www.gnu.org/licenses/>.
-
-"""Various elevation-related calculations
-
-"""
-import math
-
-def GetPressureWithElevation(h, Ps=101325.00, Ts=288.15, Tl=-0.0065, Hb=0.0, R=8.31432, g=9.80665, M=0.0289644):
-	#This function returns an estimate of the pressure in pascals as a function of elevation above sea level
-	#NOTE: This equation is only accurate up to 11,000 meters
-	#NOTE: results might be odd for elevations below 0 (sea level), like Dead Sea.
-	#h=elevation relative to sea level (m)
-	#Ps= static pressure (pascals) = 101325.00 P
-	#Ts= standard temperature (kelvin) = 288.15 K
-	#Tl= temperature lapse rate (kelvin/meter) = -0.0065 K/m
-	#Hb= height at the bottom of the layer = 0
-	#R= universal gas constant for air = 8.31432 N*m/s^2
-	#g= gravitational acceleration for earth = 9.80665 m/s^2
-	#M= Molar mass of Earth's atmosphere = 0.0289644 kg/mol
-	#P=Ps*(Ts/((Ts+Tl)*(h-Hb)))^((g*M)/(R*Tl))
-	#returns pressure in pascals
-	if h>11000.0: print("WARNING: Elevation used exceeds the recommended maximum elevation for this function (11,000m)")
-	theDenominator = Ts+(Tl*(h-Hb))
-	theExponent=(g*M)/(R*Tl)
-	return Ps*(Ts/theDenominator)**theExponent
-
-def GetTemperatureWithElevation(h, Ts=288.15, Tl=-0.0065):
-	#This function returns an estimate of temperature as a function above sea level
-	#NOTE: this is only accurate up to 11,000m
-	#NOTE: results might be odd for elevations below 0 (sea level), like Dead Sea.
-	#Ts= standard temperature (kelvin) = 288.15 K
-	#Tl= temperature lapse rate (kelvin/meter) = -0.0065 K/m
-	#returns temp in kelvin
-	return Ts+(h*Tl)
-
-def ElevationTest():
-	print("Elevation(m) Pressure(Pa) Temperature(K)")
-	h=0
-	for i in range(11):
-		P=GetPressureWithElevation(h)
-		T=GetTemperatureWithElevation(h)
-		print("%i %i %i" % (h, P, T))
-		h=h+1000
-
-
diff --git a/Pysolar/julian.py b/Pysolar/julian.py
deleted file mode 100644
index a668687..0000000
--- a/Pysolar/julian.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/python
-
-#    Copyright Brandon Stafford
-#
-#    This file is part of Pysolar.
-#
-#    Pysolar is free software; you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation; either version 3 of the License, or
-#    (at your option) any later version.
-#
-#    Pysolar is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU General Public License for more details.
-#
-#    You should have received a copy of the GNU General Public License along
-#    with Pysolar. If not, see <http://www.gnu.org/licenses/>.
-
-"""This file contains all the functions related to the Julian calendar, which
-are used in calculating the position of the sun relative to the earth
-
-"""
-import math
-
-def GetJulianCentury(julian_day):
-    return (julian_day - 2451545.0) / 36525.0
-
-def GetJulianDay(utc_datetime):
-    """This function is based on NREL/TP-560-34302 by Andreas and Reda
-
-    This function does not accept years before 0 because of the bounds check
-    on Python's datetime.year field.
-
-    """
-    year = utc_datetime.year
-    month = utc_datetime.month
-    if(month <= 2.0):        # shift to accomodate leap years?
-        year = year - 1.0
-        month = month + 12.0
-    day = utc_datetime.day + (((utc_datetime.hour * 3600.0) + (utc_datetime.minute * 60.0) + utc_datetime.second + (utc_datetime.microsecond / 1000000.0)) / 86400.0)
-    gregorian_offset = 2.0 - (year // 100.0) + ((year // 100.0) // 4.0)
-    julian_day = math.floor(365.25 * (year + 4716.0)) + math.floor(30.6001 * (month + 1.0)) + day - 1524.5
-    if (julian_day <= 2299160.0):
-        return julian_day # before October 5, 1852
-    else:
-        return julian_day + gregorian_offset # after October 5, 1852
-
-def GetJulianEphemerisCentury(julian_ephemeris_day):
-    return (julian_ephemeris_day - 2451545.0) / 36525.0
-
-def GetJulianEphemerisDay(julian_day, delta_seconds = 66.0):
-    """delta_seconds is the value referred to by astronomers as Delta-T, defined as the difference between
-    Dynamical Time (TD) and Universal Time (UT). In 2007, it's around 65 seconds.
-    A list of values for Delta-T can be found here: ftp://maia.usno.navy.mil/ser7/deltat.data
-
-    More details: http://en.wikipedia.org/wiki/DeltaT
-
-    """
-    return julian_day + (delta_seconds / 86400.0)
-
-def GetJulianEphemerisMillenium(julian_ephemeris_century):
-    return (julian_ephemeris_century / 10.0)
diff --git a/Pysolar/radiation.py b/Pysolar/radiation.py
deleted file mode 100644
index 2cf4704..0000000
--- a/Pysolar/radiation.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/python
-
-#    Copyright Brandon Stafford
-#
-#    This file is part of Pysolar.
-#
-#    Pysolar is free software; you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation; either version 3 of the License, or
-#    (at your option) any later version.
-#
-#    Pysolar is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU General Public License for more details.
-#
-#    You should have received a copy of the GNU General Public License along
-#    with Pysolar. If not, see <http://www.gnu.org/licenses/>.
-
-"""Calculate different kinds of radiation components via default values
-
-"""
-#from . import solar
-import math
-
-def GetAirMassRatio(altitude_deg):
-	# from Masters, p. 412
-	# warning: pukes on input of zero
-	return (1/math.sin(math.radians(altitude_deg)))
-
-def GetApparentExtraterrestrialFlux(day):
-	# from Masters, p. 412
-	return 1160 + (75 * math.sin(math.radians((360./365) * (day - 275))))
-
-def GetOpticalDepth(day):
-	# from Masters, p. 412
-	return 0.174 + (0.035 * math.sin(math.radians((360./365) * (day - 100))))
-
-def GetRadiationDirect(utc_datetime, altitude_deg):
-	# from Masters, p. 412
-	
-	if(altitude_deg > 0):
-		day = solar.GetDayOfYear(utc_datetime)
-		flux = GetApparentExtraterrestrialFlux(day)
-		optical_depth = GetOpticalDepth(day)
-		air_mass_ratio = GetAirMassRatio(altitude_deg)
-		return flux * math.exp(-1 * optical_depth * air_mass_ratio)
-	else:
-		return 0.0
diff --git a/Pysolar/rest.py b/Pysolar/rest.py
deleted file mode 100644
index d08efb5..0000000
--- a/Pysolar/rest.py
+++ /dev/null
@@ -1,229 +0,0 @@
-#!/usr/bin/python
-
-#    Copyright Brandon Stafford
-#
-#    This file is part of Pysolar.
-#
-#    Pysolar is free software; you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation; either version 3 of the License, or
-#    (at your option) any later version.
-#
-#    Pysolar is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU General Public License for more details.
-#
-#    You should have received a copy of the GNU General Public License along
-#    with Pysolar. If not, see <http://www.gnu.org/licenses/>.
-
-import math
-
-albedo = {} # single-scattering albedo used to calculate aerosol scattering transmittance
-
-albedo["high-frequency"] = 0.92
-albedo["low-frequency"] = 0.84
-
-rhogi = 0.150 # mean ground albedo from [Gueymard, 2008], Table 1
-
-E0n = {"high-frequency": 635.4, # extra-atmospheric irradiance, 290-700 nm (UV and visible)
-       "low-frequency":  709.7} # extra-atmospheric irradiance, 700-4000 nm (short infrared)
-
-def GetAerosolForwardScatteranceFactor(altitude_deg):
-	Z = 90 - altitude_deg
-	return 1 - math.e ** (-0.6931 - 1.8326 * math.cos(math.radians(Z)))
-
-def GetAerosolOpticalDepth(turbidity_beta, effective_wavelength, turbidity_alpha):
-	# returns tau_a
-	print("effective_wavelength: ")
-	print effective_wavelength
-	return turbidity_beta * effective_wavelength ** -turbidity_alpha
-
-def GetAerosolScatteringCorrectionFactor(band, ma, tau_a):
-	# returns F
-	if band == "high-frequency":
-		g0 = (3.715 + 0.368 * ma + 0.036294 * ma ** 2)/(1 + 0.0009391 * ma ** 2)
-		g1 = (-0.164 - 0.72567 * ma + 0.20701 * ma ** 2)/(1 + 0.001901 * ma ** 2)
-		g2 = (-0.052288 + 0.31902 * ma + 0.17871 * ma ** 2)/(1 + 0.0069592 * ma ** 2)
-		return (g0 + g1 * tau_a)/(1 + g2 * tau_a)
-	else:
-		h0 = (3.4352 +  0.65267 * ma + 0.00034328 * ma ** 2)/(1 + 0.034388 * ma ** 1.5)
-		h1 = (1.231 - 1.63853 * ma + 0.20667 * ma ** 2)/(1 + 0.1451 * ma ** 1.5)
-		h2 = (0.8889 - 0.55063 * ma + 0.50152 * ma ** 2)/(1 + 0.14865 * ma ** 1.5)
-		return (h0 + h1 * tau_a)/(1 + h2 * tau_a)
-
-def GetAerosolTransmittance(band, ma, tau_a):
-	# returns Ta
-	return math.exp(-ma * tau_a)
-
-def GetAerosolScatteringTransmittance(band, ma, tau_a):
-	# returns Tas
-	return math.exp(-ma * albedo[band] * tau_a)
-
-def GetBeamBroadbandIrradiance(Ebn, altitude_deg):
-	Z = 90 - altitude_deg
-	return Ebn * math.cos(math.radians(Z))
-
-def GetDiffuseIrradiance():
-	return GetDiffuseIrradianceByBand("high-frequency") + GetDiffuseIrradianceByBand("low-frequency")
-
-def GetDiffuseIrradianceByBand(band, air_mass=1.66, turbidity_alpha=1.3, turbidity_beta=0.6):
-	Z = 90 - altitude_deg
-	effective_wavelength = GetEffectiveAerosolWavelength(band, turbidity_alpha)
-	tau_a = GetAerosolOpticalDepth(turbidity_beta, effective_wavelength, turbidity_alpha)
-	rhosi = GetSkyAlbedo(band, turbidity_alpha, turbidity_beta)
-
-	ma = GetOpticalMassAerosol(altitude_deg)
-	mo = GetOpticalMassOzone(altitude_deg)
-	mR = GetOpticalMassRayleigh(altitude_deg, pressure_millibars)
-
-	To = GetOzoneTransmittance(band, mo)
-	Tg = GetGasTransmittance(band, mR)
-	Tn = GetNitrogenTransmittance(band, 1.66)
-	Tw = GetWaterVaporTransmittance(band, 1.66)
-	TR = GetRayleighTransmittance(band, mR)
-	Ta = GetAerosolTransmittance(band, ma, tau_a)
-	Tas = GetAerosolScatteringTransmittance(band, ma, tau_a)
-
-	BR = GetRayleighExtinctionForwardScatteringFraction(band, air_mass)
-	Ba = GetAerosolForwardScatteranceFactor(altitude_deg)
-	F = GetAerosolScatteringCorrectionFactor(band, ma, tau_a)
-
-	Edp = To * Tg * Tn * Tw * (BR * (1 - TR) * Ta ** 0.25 + Ba * F * TR * (1 - Tas ** 0.25)) * E0n[band]
-	Edd = rhogi * rhosi * (Eb + Edp)/(1 - rhogi * rhosi)
-	return Edp + Edd
-
-def GetDirectNormalIrradiance(altitude_deg, pressure_millibars=1013.25, ozone_atm_cm=0.35, nitrogen_atm_cm=0.0002, precipitable_water_cm=5.0, turbidity_alpha=1.3, turbidity_beta=0.6):
-	high = GetDirectNormalIrradianceByBand("high-frequency", altitude_deg, pressure_millibars, ozone_atm_cm, nitrogen_atm_cm, precipitable_water_cm, turbidity_alpha, turbidity_beta)
-	low = GetDirectNormalIrradianceByBand("low-frequency", altitude_deg, pressure_millibars, ozone_atm_cm, nitrogen_atm_cm, precipitable_water_cm, turbidity_alpha, turbidity_beta)
-	return high + low
-
-def GetDirectNormalIrradianceByBand(band, altitude_deg, pressure_millibars=1013.25, ozone_atm_cm=0.35, nitrogen_atm_cm=0.0002, precipitable_water_cm=5.0, turbidity_alpha=1.3, turbidity_beta=0.6):
-	ma = GetOpticalMassAerosol(altitude_deg)
-	mo = GetOpticalMassOzone(altitude_deg)
-	mR = GetOpticalMassRayleigh(altitude_deg, pressure_millibars)
-	mRprime = mR * pressure_millibars / 1013.25
-	mw = GetOpticalMassWater(altitude_deg)
-
-	effective_wavelength = GetEffectiveAerosolWavelength(band, ma, turbidity_alpha, turbidity_beta)
-	tau_a = GetAerosolOpticalDepth(turbidity_beta, effective_wavelength, turbidity_alpha)
-
-	TR = GetRayleighTransmittance(band, mRprime)
-	Tg = GetGasTransmittance(band, mRprime)
-	To = GetOzoneTransmittance(band, mo, ozone_atm_cm)
-	Tn = GetNitrogenTransmittance(band, mw, nitrogen_atm_cm) # is water_optical_mass really used for nitrogen calc?
-	Tw = GetWaterVaporTransmittance(band, mw, precipitable_water_cm)
-	Ta = GetAerosolTransmittance(band, ma, tau_a)
-	return E0n[band] * TR * Tg * To * Tn * Tw * Ta
-
-def GetEffectiveAerosolWavelength(band, ma, turbidity_alpha, turbidity_beta):
-	ua = math.log(1 + ma * turbidity_beta)
-	if band == "high-frequency":
-		a1 = turbidity_alpha # just renaming to keep equations short
-		d0 = 0.57664 - 0.024743 * a1
-		d1 = (0.093942 - 0.2269 * a1 + 0.12848 * a1 ** 2)/(1 + 0.6418 * a1)
-		d2 = (-0.093819 + 0.36668 * a1 - 0.12775 * a1 ** 2)/(1 - 0.11651 * a1)
-		d3 = a1 * (0.15232 - 0.087214 * a1 + 0.012664 * a1 ** 2)/(1 - 0.90454 * a1 + 0.26167 * a1 ** 2)
-		return (d0 + d1 * ua + d2 * ua ** 2)/(1 + d3 * ua ** 2)
-	else:
-		a2 = turbidity_alpha
-		e0 = (1.183 - 0.022989 * a2 + 0.020829 * a2 ** 2)/(1 + 0.11133 * a2)
-		e1 = (-0.50003 - 0.18329 * a2 + 0.23835 * a2 ** 2)/(1 + 1.6756 * a2)
-		e2 = (-0.50001 + 1.1414 * a2 + 0.0083589 * a2 ** 2)/(1 + 11.168 * a2)
-		e3 = (-0.70003 - 0.73587 * a2 + 0.51509 * a2 ** 2)/(1 + 4.7665 * a2)
-		return (e0 + e1 * ua + e2 * ua ** 2)/(1 + e3 * ua ** 2)
-
-def GetGasTransmittance(band, mRprime):
-	if band == "high-frequency":
-		return (1 + 0.95885 * mRprime + 0.012871 * mRprime ** 2)/(1 + 0.96321 * mRprime + 0.015455 * mRprime ** 2)
-	else:
-		return (1 + 0.27284 * mRprime - 0.00063699 * mRprime ** 2)/(1 + 0.30306 * mRprime)
-
-def GetBroadbandGlobalIrradiance(Ebn, altitude_deg, Ed):
-	return GetBeamBroadbandIrradiance(Ebn, altitude_deg) + Ed
-
-def GetNitrogenTransmittance(band, mw, nitrogen_atm_cm):
-	if band == "high-frequency":
-		g1 = (0.17499 + 41.654 * un - 2146.4 * un ** 2)/(1 + 22295.0 * un ** 2)
-		g2 = un * (-1.2134 + 59.324 * un)/(1 + 8847.8 * un ** 2)
-		g3 = (0.17499 + 61.658 * un + 9196.4 * un ** 2)/(1 + 74109.0 * un ** 2)
-		return min (1, (1 + g1 * mw + g2 * mw ** 2)/(1 + g3 * mw))
-	else:
-		return 1.0
-
-def GetOpticalMassRayleigh(altitude_deg, pressure_millibars): # from Appendix B of [Gueymard, 2003]
-	Z = 90 - altitude_deg
-	Z_rad = math.radians(Z)
-	return (pressure_millibars / 1013.25)/((math.cos(Z_rad) + 0.48353 * Z_rad ** 0.095846)/(96.741 - Z_rad) ** 1.754)
-
-def GetOpticalMassOzone(altitude_deg): # from Appendix B of [Gueymard, 2003]
-	Z = 90 - altitude_deg
-	Z_rad = math.radians(Z)
-	return 1/((math.cos(Z_rad) + 1.0651 * Z_rad ** 0.6379)/(101.8 - Z_rad) ** 2.2694)
-
-def GetOpticalMassWater(altitude_deg): # from Appendix B of [Gueymard, 2003]
-	Z = 90 - altitude_deg
-	Z_rad = math.radians(Z)
-	return 1/((math.cos(Z_rad) + 0.10648 * Z_rad ** 0.11423)/(93.781 - Z_rad) ** 1.9203)
-
-def GetOpticalMassAerosol(altitude_deg): # from Appendix B of [Gueymard, 2003]
-	Z = 90 - altitude_deg
-	Z_rad = math.radians(Z)
-	return 1/((math.cos(Z_rad) + 0.16851 * Z_rad ** 0.18198)/(95.318 - Z_rad) ** 1.9542)
-
-def GetOzoneTransmittance(band, mo, uo):
-	if band == "high-frequency":
-		f1 = uo(10.979 - 8.5421 * uo)/(1 + 2.0115 * uo + 40.189 * uo **2)
-		f2 = uo(-0.027589 - 0.005138 * uo)/(1 - 2.4857 * uo + 13.942 * uo **2)
-		f3 = uo(10.995 - 5.5001 * uo)/(1 + 1.6784 * uo + 42.406 * uo **2)
-		return (1 + f1 * mo + f2 * mo ** 2)/(1 + f3 * mo)
-	else:
-		return 1.0
-
-def GetRayleighExtinctionForwardScatteringFraction(band, mR):
-	# returns BR
-	if band == "high-frequency":
-		return 0.5 * (0.89013 - 0.049558 * mR + 0.000045721 * mR ** 2)
... 19334 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pysolar.git



More information about the Python-modules-commits mailing list