[Python-modules-commits] [python-pysolar] 07/10: Added docstrings from H. Zebner, despammed email addresses, fixed imports in shade_test.py
Wolfgang Borgert
debacle at moszumanska.debian.org
Fri Oct 3 23:36:28 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to annotated tag 0.4.2
in repository python-pysolar.
commit 97e118e497a5f2278a467bd1380ab748e38a21ae
Author: pingswept <brandon at pingswept.org>
Date: Mon Jan 18 18:23:16 2010 -0500
Added docstrings from H. Zebner, despammed email addresses, fixed imports in shade_test.py
---
constants.py | 7 ++++---
horizon.py | 8 ++++----
julian.py | 9 +++++----
poly.py | 7 ++++---
query_usno.py | 7 ++++---
radiation.py | 7 ++++---
shade.py | 7 ++++---
shade_test.py | 16 +++++++++-------
simulate.py | 7 ++++---
solar.py | 9 ++++++---
util.py | 11 ++++-------
11 files changed, 52 insertions(+), 43 deletions(-)
diff --git a/constants.py b/constants.py
index c4e5df1..a1c85de 100644
--- a/constants.py
+++ b/constants.py
@@ -1,8 +1,6 @@
#!/usr/bin/python
-# Constants for calculating the position of the sun relative to the earth
-
-# Copyright 2008 Brandon Stafford
+# Copyright 2008-2010 Brandon Stafford
#
# This file is part of Pysolar.
#
@@ -33,6 +31,9 @@
#
# See also ftp://ftp.imcce.fr/pub/ephem/planets/vsop87/VSOP87D.ear
+"""Constants as input for ephemeris calculations
+
+"""
earth_radius = 6378140.0 # meters
aberration_sin_terms = [[0,0,0,0,1],
diff --git a/horizon.py b/horizon.py
index 10d1df8..443999d 100644
--- a/horizon.py
+++ b/horizon.py
@@ -1,9 +1,6 @@
#!/usr/bin/python
-# Script for detecting angle to solar obstructions from
-# spherically distorted images
-
-# Copyright 2009 Brandon Stafford
+# Copyright 2009-2010 Brandon Stafford
#
# This file is part of Pysolar.
#
@@ -20,6 +17,9 @@
# You should have received a copy of the GNU General Public License along
# with Pysolar. If not, see <http://www.gnu.org/licenses/>.
+"""Script for detecting angle to solar obstructions from spherically distorted images
+
+"""
from PIL import Image
from math import *
import numpy as np
diff --git a/julian.py b/julian.py
index c5e76ff..e152b4b 100644
--- a/julian.py
+++ b/julian.py
@@ -1,8 +1,6 @@
- #!/usr/bin/python
+#!/usr/bin/python
-# Julian calendar calculations for calculating the position of the sun relative to the earth
-
-# Copyright 2008 Brandon Stafford
+# Copyright 2008-2010 Brandon Stafford
#
# This file is part of Pysolar.
#
@@ -19,6 +17,9 @@
# You should have received a copy of the GNU General Public License along
# with Pysolar. If not, see <http://www.gnu.org/licenses/>.
+"""Julian calendar calculations for calculating the position of the sun relative to the earth
+
+"""
import math
def GetJulianCentury(julian_day):
diff --git a/poly.py b/poly.py
index 5f2d732..0335105 100644
--- a/poly.py
+++ b/poly.py
@@ -1,8 +1,6 @@
#!/usr/bin/python
-# Library for calculating location of the sun
-
-# Copyright 2008 Brandon Stafford
+# Copyright 2008-2010 Brandon Stafford
#
# This file is part of Pysolar.
#
@@ -19,6 +17,9 @@
# You should have received a copy of the GNU General Public License along
# with Pysolar. If not, see <http://www.gnu.org/licenses/>.
+"""Additional support constants and their calculation for solar geometry
+
+"""
coeff_list = [
('ArgumentOfLatitudeOfMoon', (93.27191, 483202.017538, -0.0036825, 327270.0)),
('LongitudeOfAscendingNode', (125.04452, -1934.136261, 0.0020708, 450000.0)),
diff --git a/query_usno.py b/query_usno.py
index 77861c9..4163a18 100644
--- a/query_usno.py
+++ b/query_usno.py
@@ -1,8 +1,6 @@
#!/usr/bin/python
-# Tool for requesting data from US Naval Observatory
-
-# Copyright 2007, 2008 Brandon Stafford
+# Copyright 2007-2010 Brandon Stafford
#
# This file is part of Pysolar.
#
@@ -19,6 +17,9 @@
# You should have received a copy of the GNU General Public License along
# with Pysolar. If not, see <http://www.gnu.org/licenses/>.
+"""Tool for requesting data from US Naval Observatory
+
+"""
import datetime, random, solar, time, urllib, urllib2
class Ephemeris:
diff --git a/radiation.py b/radiation.py
index 618a9c9..f9685f1 100644
--- a/radiation.py
+++ b/radiation.py
@@ -1,8 +1,6 @@
#!/usr/bin/python
-# Functions for calculating the solar radiation hitting the earth
-
-# Copyright 2008 Brandon Stafford
+# Copyright 2008-2010 Brandon Stafford
#
# This file is part of Pysolar.
#
@@ -19,6 +17,9 @@
# 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
+
+"""
import solar
import math
diff --git a/shade.py b/shade.py
index 0bcfb2d..d8d03a7 100644
--- a/shade.py
+++ b/shade.py
@@ -1,8 +1,6 @@
#!/usr/bin/python
-# Library for solar panel shading calculations
-
-# Copyright 2007 Brandon Stafford
+# Copyright 2007-2010 Brandon Stafford
#
# This file is part of Pysolar.
#
@@ -19,6 +17,9 @@
# You should have received a copy of the GNU General Public License along
# with Pysolar. If not, see <http://www.gnu.org/licenses/>.
+"""Shade calculation functions
+
+"""
import math
def GetSideByLawOfCosines(side_a, side_b, included_angle_deg):
diff --git a/shade_test.py b/shade_test.py
index ca14632..65d6bb0 100644
--- a/shade_test.py
+++ b/shade_test.py
@@ -1,8 +1,6 @@
#!/usr/bin/python
-# Test of solar panel shading calculations
-
-# Copyright 2007 Brandon Stafford
+# Copyright 2007-2010 Brandon Stafford
#
# This file is part of Pysolar.
#
@@ -19,10 +17,14 @@
# You should have received a copy of the GNU General Public License along
# with Pysolar. If not, see <http://www.gnu.org/licenses/>.
+"""A test module for shading calculations
+
+"""
import solar
import shade
import datetime
-from pylab import *
+import radiation
+import pylab
#from itertools import izip
def ShadeTest():
@@ -42,7 +44,7 @@ def ShadeTest():
timestamp = d.ctime()
altitude_deg = solar.GetAltitude(latitude_deg, longitude_deg, d)
azimuth_deg = solar.GetAzimuth(latitude_deg, longitude_deg, d)
- power = solar.GetRadiationDirect(d, altitude_deg)
+ power = radiation.GetRadiationDirect(d, altitude_deg)
xs = shade.GetXShade(width, 120, azimuth_deg)
ys = shade.GetYShade(height, 120, altitude_deg)
shaded_area = xs * ys
@@ -59,8 +61,8 @@ def ShadeTest():
print powers
print shade_x
- plot(times, shaded_powers, times, powers) # plot ends up with a line across it because x values wrap around
- show() # could fix that with sort function below
+ pylab.plot(times, shaded_powers, times, powers) # plot ends up with a line across it because x values wrap around
+ pylab.show() # could fix that with sort function below
#def sort(list_to_sort, order): # based on a function by Ron Adam on some Python mailing list
# d = dict(izip(order, list_to_sort))
diff --git a/simulate.py b/simulate.py
index de8e2e3..084d64d 100644
--- a/simulate.py
+++ b/simulate.py
@@ -1,8 +1,6 @@
#!/usr/bin/python
-# Library for calculating location of the sun
-
-# Copyright 2007 Brandon Stafford
+# Copyright 2007-2010 Brandon Stafford
#
# This file is part of Pysolar.
#
@@ -19,6 +17,9 @@
# You should have received a copy of the GNU General Public License along
# with Pysolar. If not, see <http://www.gnu.org/licenses/>.
+"""Support functions for horizon calculation
+
+"""
import datetime
import radiation
import solar
diff --git a/solar.py b/solar.py
index e9302ff..ed348be 100644
--- a/solar.py
+++ b/solar.py
@@ -1,8 +1,6 @@
#!/usr/bin/python
-# Library for calculating location of the sun
-
-# Copyright 2007 Brandon Stafford
+# Copyright 2007-2010 Brandon Stafford
#
# This file is part of Pysolar.
#
@@ -19,6 +17,11 @@
# You should have received a copy of the GNU General Public License along
# with Pysolar. If not, see <http://www.gnu.org/licenses/>.
+"""Solar geometry functions
+
+This module contains the most important functions for calculation of the position of the sun.
+
+"""
import math
import datetime
import constants
diff --git a/util.py b/util.py
index da56070..04e548a 100644
--- a/util.py
+++ b/util.py
@@ -2,9 +2,7 @@
# -*- coding: utf-8 -*-
-# Library for calculating location of the sun
-#
-# Copyright 2009 Brandon Stafford
+# Copyright 2009-2010 Brandon Stafford
#
# This file is part of Pysolar.
#
@@ -21,18 +19,17 @@
# You should have received a copy of the GNU General Public License along
# with Pysolar. If not, see <http://www.gnu.org/licenses/>.
-"""This module contains the basic tools for solar calculations.
+"""Additional support functions for solar geometry, astronomy, radiation correlation
:Original author: Simeon Nwaogaidu
-:Contact: SimeonObinna.Nwaogaidu at lahmeyer.de
+:Contact: SimeonObinna.Nwaogaidu AT lahmeyer DOT de
:Additional author: Holger Zebner
-:Contact: holger.zebner at lahmeyer.de
+:Contact: holger.zebner AT lahmeyer DOT de
:Additional author: Brandon Stafford
"""
-
import conversions_time as ct
import datetime
import decimaldegrees.decimaldegrees as dg
--
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