[Python-modules-commits] [python-pysolar] 07/10: Added website.

Wolfgang Borgert debacle at moszumanska.debian.org
Fri Oct 3 23:36:04 UTC 2014


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

debacle pushed a commit to annotated tag 0.2.1
in repository python-pysolar.

commit 1fa344d367d0b091f69b00c54f052d7011d55d62
Author: Brandon Stafford <brandon at farb.(none)>
Date:   Mon Mar 3 23:14:48 2008 -0500

    Added website.
---
 pysolar.org/all.css                     |  54 ++++++++++++++
 pysolar.org/examples.html               | 120 ++++++++++++++++++++++++++++++++
 pysolar.org/gradient.png                | Bin 0 -> 497 bytes
 pysolar.org/index.html                  | 112 +++++++++++++++++++++++++++++
 pysolar.org/logo.png                    | Bin 0 -> 8078 bytes
 pysolar.org/pysolar_reference_frame.png | Bin 0 -> 33781 bytes
 6 files changed, 286 insertions(+)

diff --git a/pysolar.org/all.css b/pysolar.org/all.css
new file mode 100644
index 0000000..ebf4a85
--- /dev/null
+++ b/pysolar.org/all.css
@@ -0,0 +1,54 @@
+
+* { margin:0; padding:0; }
+
+body { font-family:"Trebuchet MS", Verdana, Arial, sans-serif;
+	line-height:160%;
+	font-size:16px;
+	color:#36393D;
+	background: url(gradient.png);
+	background-repeat: repeat-x; 
+	background-color:#FFF; }
+
+h1 { color:#333; margin-top:30px; }
+h1 a:hover { background-color:#FFF; }
+h2 { background-color:#C3D9FF; padding:.3em; margin-top:20px; margin-bottom:20px; }
+
+a { color:#507EA1; padding:.3em; }
+a:hover { color:#507EA1; background-color:#CFDCE6; padding:.3em; }
+a img { border:0; }
+
+#layout { width:65%;
+	margin:0 auto;
+	padding:.3em; }
+	
+#navigation { padding:.5em; margin-top:10px; }
+#navigation li { display:inline; margin-left:10px; }
+#navigation li a { font-size:1.2em; }
+
+li {margin-left:20px;}
+p {padding:.5em;}
+
+#footer { border-top:1px solid #FF7400;
+	padding:.5em;
+	margin-top:5px; }
+
+.box h2 { padding:0; margin:0; font-size:18px; border-bottom:1px solid #FF7400;
+	background-color:#3F4C6B; color:#fff; }
+.box a { color:#CFDCE6; }
+.box a:hover { color:#507EA1; background-color:#CFDCE6; }
+.box p { color:#FFF; padding:.5em; }
+.box { background-color:#3F4C6B; margin-bottom:5px; margin-top:5px; }
+
+.boxcontent { padding:.5em; margin:2px; }
+.boxcontent span { font-size:12px; }
+
+b.rtop, b.rbottom { display:block; background-color:#FFF; }
+b.rtop b, b.rbottom b { display:block; height:1px;
+    overflow:hidden; background-color:#3F4C6B; }
+b.r1 { margin:0 5px; }
+b.r2 { margin:0 3px; }
+b.r3 { margin:0 2px; }
+b.rtop b.r4, b.rbottom b.r4 { margin:0 1px; height:2px; }
+
+code {font-weight:bold;
+	letter-spacing:-1px; }
diff --git a/pysolar.org/examples.html b/pysolar.org/examples.html
new file mode 100644
index 0000000..af07a1a
--- /dev/null
+++ b/pysolar.org/examples.html
@@ -0,0 +1,120 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us">
+<head>
+<title>Pysolar: staring directly at the sun since 2007</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" type="text/css" href="all.css" media="all" />
+</head>
+
+<body>
+<div id="layout">
+
+<h1><a href="index.html"><img src="logo.png" alt="Pysolar logo" /></a></h1>
+
+<ul id="navigation">
+<li><a href="http://sourceforge.net/project/showfiles.php?group_id=193466">Download from SF.net</a></li>
+</ul>
+
+<h2>Location calculation<a name="location"></a></h2>
+<a href="examples.html"></a>
+You can figure out your latitude and longitude from the URL from the "Link to this page" link 
+on <a href="http://maps.google.com/">Google maps</a>. Find your location on the map, click on 
+the "Link to this page" link, and then look at the URL in the address bar of your browser. In 
+between ampersands, you should see something like ll=89.123456,-78.912345. The first number 
+is your latitude; the second is your longitude.<br />
+<br />
+The reference frame for Pysolar is shown in the figure below. Altitude is reckoned with zero 
+at the horizon. The altitude is positive when the sun is above the horizon. Azimuth is 
+reckoned with zero corresponding to south. Positive azimuth estimates correspond to estimates 
+east of south; negative estimates are west of south. In the northern hemisphere, if we speak 
+in terms of (altitude, azimuth), the sun comes up around (0, 90), reaches (70, 0) around 
+noon, and sets around (0, -90).<br />
+<br />
+<img src="pysolar_reference_frame.png" alt="Diagram showing reference frames for altitude 
+and azimuth." /><br />
+Then, use the solar.GetAltitude() function to calculate the angle between the sun and a plane 
+tangent to the earth where you are. The result is returned in degrees.<br />
+<br />
+<pre>
+host:~/pysolar$ python
+Python 2.5.1 (r251:54863, May  2 2007, 16:56:35) 
+[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
+Type "help", "copyright", "credits" or "license" for more information.
+>>> import solar
+>>> import datetime
+>>> d = datetime.datetime.utcnow() # create a datetime object for now
+>>> solar.GetAltitude(42.206, -71.382, d)
+-20.453156227223857
+>>> d = datetime.datetime(2007, 2, 18, 20, 13, 1, 130320) # try another date
+>>> solar.GetAltitude(42.206, -71.382, d)
+19.551710266768644
+</pre>
+<br />
+You can also calculate the azimuth of the sun, as shown below.<br />
+<br />
+<pre>
+>>> solar.GetAzimuth(42.206, -71.382, datetime.datetime(2007, 2, 18, 20, 18, 0, 0))
+-51.622484299859529
+</pre>
+
+<h2>Estimate of clear-sky radiation<a name="power"></a></h2>
+Once you calculate azimuth and altitude of the sun, you can predict the direct irradiation from 
+the sun using solar.GetRadiationDirect(), which returns a value in watts per square meter. As of 
+version 0.2, the function is *not* smart enough to return zeros at night (thus the crazy 1814 
+W/m^2 output below). It does account for the scattering of light by the atmosphere, though it uses 
+an atmospheric model based on data taken in the United States.<br />
+<br />
+<pre>
+>>> latitude_deg = 42.3 # positive in the northern hemisphere
+>>> longitude_deg = -71.4 # negative reckoning west from prime meridian in Greenwich, England
+>>> altitude_deg = solar.GetAltitude(latitude_deg, longitude_deg, d)
+>>> azimuth_deg = solar.GetAzimuth(latitude_deg, longitude_deg, d)
+>>> solar.GetRadiationDirect(d, altitude_deg)
+1814.2039909409739
+</pre>
+<br />
+<h2>Shading calculation<a name="shading"></a></h2>
+For a row of rectangular photovoltaic panels that track the sun, adjacent panels will shade each 
+other in the morning and afternoon, reducing power output. You can create a power estimate that 
+takes into account the shading of adjacent panels.<br />
+<br />
+<pre>
+>>> import shade
+>>> width = 100
+>>> height = 200
+>>> x_spacing = 120
+>>> y_spacing = 120
+>>> xs = shade.GetXShade(width, x_spacing, azimuth_deg)
+>>> ys = shade.GetYShade(height, y_spacing, altitude_deg)
+>>> shaded_area = xs * ys
+>>> shaded_percentage = shaded_area/(width * height)
+</pre>
+
+<img alt="Graph of power vs. time" width="609px" src="power_vs_time.png" /><br />
+
+The graph above was created by calculating the power, including attenuation due to shading, at an
+interval of 30 minutes. The attenuation is assumed to be linearly proportional to area, which is
+probably optimistic, even if bypass diodes are used. The graph was created with <a
+href="http://matplotlib.sourceforge.net/">matplotlib</a>; see <a
+href="http://pysolar.svn.sourceforge.net/viewvc/pysolar/shade_test.py?view=markup">shade_test.py</a>
+for usage.
+
+<div id="footer">
+
+<a href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-xhtml10-blue" 
+alt="W3C valid XHTML 1.0 button" /></a>
+
+<a href="http://jigsaw.w3.org/css-validator/validator?uri=http://pysolar.sourceforge.net/">
+<img style="border:0;width:88px;height:31px" src="http://www.w3.org/Icons/valid-css-blue" alt="Valid CSS logo" />
+</a>
+
+<a href="http://sourceforge.net"><img 
+src="http://sflogo.sourceforge.net/sflogo.php?group_id=193466&type=4" 
+width="125" height="37" alt="SourceForge.net logo" /></a>
+
+</div>
+
+</div>
+
+</body>
+</html>
diff --git a/pysolar.org/gradient.png b/pysolar.org/gradient.png
new file mode 100644
index 0000000..c7e273e
Binary files /dev/null and b/pysolar.org/gradient.png differ
diff --git a/pysolar.org/index.html b/pysolar.org/index.html
new file mode 100644
index 0000000..e04a230
--- /dev/null
+++ b/pysolar.org/index.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us">
+<head>
+<title>Pysolar: staring directly at the sun since 2007</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" type="text/css" href="all.css" media="all" />
+</head>
+
+<body>
+<div id="layout">
+
+<h1><a href="index.html"><img src="logo.png" alt="Pysolar logo" /></a></h1>
+
+<ul id="navigation">
+<li><a href="http://sourceforge.net/project/showfiles.php?group_id=193466">Download from SF.net</a></li>
+<li><a href="#examples">Usage examples</a></li>
+<li><a href="#references">References</a></li>
+</ul>
+
+<p>Pysolar is a collection of<a href="http://python.org">Python</a>libraries for simulating the irradiation of different parts of the earth by the sun.</p>
+
+<p>As of September 9, 2007, it has two parts:</p>
+
+<ul>
+<li>A library that, given a date, time, and and earthly location, calculates the location of the sun</li>
+<li>A library that, given a panel spacing and dimensions, calculates the shading percentage as a function of time for a row of 2-axis tracked panels</li>
+</ul>
+
+<div class="box">
+<b class="rtop">
+	<b class="r1"></b>
+	<b class="r2"></b>
+	<b class="r3"></b>
+	<b class="r4"></b>
+</b>
+<div class="boxcontent">
+	
+<h2>Download</h2>
+
+<p>Sourceforge hosts Pysolar development.</p>
+<p><a 
+href="https://sourceforge.net/project/showfiles.php?group_id=193466&package_id=227872&release_id=520181">Release 
+0.2.0</a></p>
+<p><a 
+href="https://sourceforge.net/project/showfiles.php?group_id=193466&package_id=227872&release_id=502286">Release 
+0.1.0</a></p>
+
+<h2>Prerequisites</h2>
+
+<p>Pysolar requires Python, which comes preinstalled on most Unix 
+machines, including Apple's OS X. You can check to see if you have it 
+installed on a Unix machine by typing <code>python</code> at a command prompt. If the result is something like<br />
+<code>Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25)<br />
+[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2<br />
+Type "help", "copyright", "credits" or "license" for more 
+information.<br />
+>>><br /></code>
+you have Python. (You can escape from the Python prompt with Ctrl-D.)</p>
+
+<p>If the result is more like<br />
+<code>bash: python: command not found<br /></code>
+you probably don't have Python.</p>
+
+<p> If you need to, you can download Python from<a href="http://www.python.org/download/releases/">the Python.org download page</a>.</p>
+
+</div>
+<b class="rbottom">
+	<b class="r4"></b>
+	<b class="r3"></b>
+	<b class="r2"></b>
+	<b class="r1"></b>
+</b>
+</div>
+
+<h2>Examples of usage<a name="examples"></a></h2>
+<ul>
+<li><a href="examples.html#location">Calculating the location of the sun 
+now</a></li>
+<li><a href="examples.html#power">Estimating clear-sky irradiance</a></li>
+<li><a href="examples.html#shading">Calculating the shaded percentage of 
+a row of panels</a></li>
+</ul>
+
+<h2>References<a name="references"></a></h2>
+<ul>
+<li><a 
+href="http://www.osti.gov/bridge/product.biblio.jsp?query_id=1&page=0&osti_id=15003974">Abstract</a> 
+<a href="http://www.osti.gov/bridge/servlets/purl/15003974-iP3z6k/native/15003974.PDF">1.1 MB PDF</a> I. Reda and A. Andreas, "Solar Position Algorithm for Solar Radiation Applications," National Renewable Energy Laboratory, NREL/TP-560-34302, revised November 2005.</li>
+<li><a href="http://www.wiley.com/WileyCDA/WileyTitle/productCd-0471280607,descCd-authorInfo.html">G. Masters</a>, "Renewable and Efficient Electric Power Systems," Wiley-IEEE Press, 2004.</li>
+<li><a href="http://pubs.giss.nasa.gov/abstracts/1997/Bishop_etal.html">Abstract</a> <a href="http://pubs.giss.nasa.gov/docs/1997/1997_Bishop_etal.pdf">4.6 MB PDF</a> J. K. B. 
+Bishop, W. B. Rossow, and E. G. Dutton, "Surface solar irradiance from the International Satellite Cloud Climatology Project 1983-1991," Journal of Geophysical Research, vol. 102, no. D6, March 27, 1997, pp. 6883-6910.</li>
+</ul>
+
+<div id="footer">
+
+<a href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-xhtml10-blue" 
+alt="W3C valid XHTML 1.0 button" /></a>
+
+<a href="http://jigsaw.w3.org/css-validator/validator?uri=http://pysolar.sourceforge.net/">
+<img style="border:0;width:88px;height:31px" src="http://www.w3.org/Icons/valid-css-blue" alt="Valid CSS logo" />
+</a>
+
+<a href="http://sourceforge.net"><img 
+src="http://sflogo.sourceforge.net/sflogo.php?group_id=193466&type=4" 
+width="125" height="37" alt="SourceForge.net logo" /></a>
+
+</div>
+
+</div>
+
+</body>
+</html>
diff --git a/pysolar.org/logo.png b/pysolar.org/logo.png
new file mode 100644
index 0000000..bcf06ad
Binary files /dev/null and b/pysolar.org/logo.png differ
diff --git a/pysolar.org/pysolar_reference_frame.png b/pysolar.org/pysolar_reference_frame.png
new file mode 100644
index 0000000..7656b30
Binary files /dev/null and b/pysolar.org/pysolar_reference_frame.png differ

-- 
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