public
Description: Pysolar is a collection of Python libraries for simulating the irradiation of any point on earth by the sun. It includes code for extremely precise ephemeris calculations.
Homepage: http://pysolar.org
Clone URL: git://github.com/pingswept/pysolar.git
name age message
file COPYING Sat Mar 01 15:36:54 -0800 2008 Initial import from SVN tag 0.2.0 [Brandon Stafford]
file README.markdown Sat Mar 01 15:36:54 -0800 2008 Initial import from SVN tag 0.2.0 [Brandon Stafford]
file constants.py Sat Mar 08 17:06:06 -0800 2008 Broke code out into smaller files. Updated copy... [Brandon Stafford]
file julian.py Sat Mar 08 17:06:06 -0800 2008 Broke code out into smaller files. Updated copy... [Brandon Stafford]
file poly.py Sat Mar 08 17:06:06 -0800 2008 Broke code out into smaller files. Updated copy... [Brandon Stafford]
directory pysolar.org/ Mon Mar 10 21:31:47 -0700 2008 Updated website. [pingswept]
file radiation.py Sat Mar 08 17:06:06 -0800 2008 Broke code out into smaller files. Updated copy... [Brandon Stafford]
file shade.py Sat Mar 01 15:36:54 -0800 2008 Initial import from SVN tag 0.2.0 [Brandon Stafford]
file shade_test.py Sat Mar 01 15:36:54 -0800 2008 Initial import from SVN tag 0.2.0 [Brandon Stafford]
file simulate.py Sat Mar 15 19:45:30 -0700 2008 Split GetAltitude and GetAzimuth into two versi... [pingswept]
file solar.py Sun Mar 09 13:19:39 -0700 2008 Fixed indentation error. Note to self: run damn... [pingswept]
file testsolar.py Sat Mar 08 17:06:06 -0800 2008 Broke code out into smaller files. Updated copy... [Brandon Stafford]
README.markdown

Pysolar performs calculations useful for the development of photovoltaic systems. Rough steps for use, until either forever or I have time to write more documentation:

  1. Install python.
  2. Get to a prompt that looks like: >>>
  3. import solar

  4. import datetime

  5. d = datetime.datetime.utcnow()

  6. lat = 42.0

  7. long = -71.0

  8. solar.GetAltitude(lat, long, d)

  9. solar.GetAzimuth(lat, long, d)

For better examples of usage, check http://pysolar.sourceforge.net/#examples

At this point, Pysolar has basic functionality, but it is relatively untested. I did validate it against the data in a paper by Reda and Andreas; it agrees to 4 significant figures, but that's just one data point.

If you use Pysolar, please let me know how accurate it is. It's difficult to measure sun location with great precision, but I'd love to hear reports of "Yeah, it worked to within a degree over the course of an afternoon in Spain."

Brandon Stafford <first_name> @ pingswept org