github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

pingswept / pysolar

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 6
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (6)
  • Wiki (4)
  • Graphs
  • Tag: 0.4.0

click here to add a description

click here to add a homepage

  • Branches (1)
    • master
  • Tags (6)
    • 0.4.1
    • 0.4.0
    • 0.3.0RC2
    • 0.3.0RC1
    • 0.3.0
    • 0.2.1
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

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. — Read more

  cancel

http://pysolar.org

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Updated sun path code, added __init__.py 
pingswept (author)
Thu Jun 18 14:42:42 -0700 2009
commit  a627996677a9a19d335c250269a5d40425c5833c
tree    d3a529089e51f6f0ae944b436ce3d87c0e96c02a
parent  cfd2cd4f7adfff8a1c82c0d22221e7b5a905bd48
pysolar /
name age
history
message
file CONTRIBUTORS.markdown Fri Apr 10 20:34:58 -0700 2009 Updated README and CONTRIBUTORS. [pingswept]
file COPYING Sat Mar 01 15:36:54 -0800 2008 Initial import from SVN tag 0.2.0 [Brandon Stafford]
file README.markdown Fri Apr 10 20:34:58 -0700 2009 Updated README and CONTRIBUTORS. [pingswept]
file __init__.py Thu Jun 18 14:42:42 -0700 2009 Updated sun path code, added __init__.py [pingswept]
file constants.py Sat Mar 08 17:06:06 -0800 2008 Broke code out into smaller files. Updated copy... [Brandon Stafford]
directory doc/ Tue Jan 27 20:19:03 -0800 2009 Started documentation folder using Sphinx [pingswept]
file horizon.py Thu Jun 18 14:42:42 -0700 2009 Updated sun path code, added __init__.py [pingswept]
directory images/ Fri Apr 10 21:52:13 -0700 2009 Added images for examples and documentation. [pingswept]
file julian.py Loading commit data...
file poly.py Sat Mar 08 17:06:06 -0800 2008 Broke code out into smaller files. Updated copy... [Brandon Stafford]
directory pysolar.org/ Tue May 12 16:36:20 -0700 2009 Link to Github examples and rm Sourceforge link [pingswept]
file pysolar_v_usno.csv
file query_usno.py
file radiation.py
file shade.py
file shade_test.py
file simulate.py Fri Apr 10 20:44:58 -0700 2009 Added code for overlaying sun paths. [pingswept]
file solar.py Sun Jan 11 17:34:39 -0800 2009 Added corrections from Sean Taylor to GetParall... [pingswept]
file spherical.jpg
file sun_path_widget.py Thu Jun 18 14:42:42 -0700 2009 Updated sun path code, added __init__.py [pingswept]
file testsolar.py Sun Jan 11 17:34:39 -0800 2009 Added corrections from Sean Taylor to GetParall... [pingswept]
file usno_data_6259.txt Sat Jul 19 18:41:04 -0700 2008 query_usno.py: added code to validate Pysolar a... [pingswept]
file usno_data_short_test.txt Sat Jul 19 18:41:04 -0700 2008 query_usno.py: added code to validate Pysolar a... [pingswept]
file util.py Tue Feb 24 19:09:00 -0800 2009 Added code contributed by Simeon Obinna Nwaogai... [pingswept]
README.markdown

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, and more.

Rough steps for use, until either forever or I have time to write more documentation:

  1. Install python.
  2. Get to a Python prompt.
  3. Execute code:
     import datetime, solar
     d = datetime.datetime.utcnow()
     lat = 42.0
     long = -71.0
     solar.GetAltitude(lat, long, d)
     solar.GetAzimuth(lat, long, d)
    

For better examples of usage, see the examples on Github.

Difference from PyEphem

Pysolar is similar to PyEphem, with a few key differences. Both libraries compute the location of the sun based on Bretagnon's VSOP 87 theory. Pysolar is aimed at modeling photovoltaic systems, while PyEphem is targeted at astronomers. Pysolar is written in pure Python, while PyEphem is a Python wrapper for the libastro library, written in C, which is part of XEphem.

Validation

Pysolar has recently been validated against similar ephemeris code maintained by the US Naval Observatory. In a random sampling of 6000 locations distributed across the Northern Hemisphere at random times in 2008, Pysolar matched the observatory’s predictions very accurately. The azimuth estimations correlated much more closely than the altitude estimations, but both agreed with the naval observatory’s to within less than 0.1 degrees on average.

More details on the validation page on Github.

A request

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 like, "Yeah, it worked to within a degree over the course of an afternoon in Spain."

Developer contact info

Brandon Stafford

brandon at pingswept org

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server