Skip to main content

Calculate sunpath using pyephem

Project description

pyephem_sunpath

https://img.shields.io/pypi/v/pyephem_sunpath.svg https://img.shields.io/travis/santoshphilip/pyephem_sunpath.svg Documentation Status Updates

Calculate sunpath using pyephem

Introduction

Pyephem_sunpath is built upon pyephem an astronomical computation package. From the pyephem website we have:

PyEphem provides basic astronomical computations for the Python programming language. Given a date and location on the Earth’s surface, it can compute the positions of the Sun and Moon, of the planets and their moons, and of any asteroids, comets, or earth satellites whose orbital elements the user can provide. Additional functions are provided to compute the angular separation between two objects in the sky, to determine the constellation in which an object lies, and to find the times at which an object rises, transits, and sets on a particular day.”

Pyephem_sunpath uses the a small part of pyephem to calculate the sun position and sun path for any location on earth. The big advantage of using pyephem, is that we will get a high degree of accuracy in the calculations.

Features

  • sunpos() calculates sun position (in altitude and azimuth) using local time and timezone

  • sunpos_radiance and sunpos_radiancexyz also calculate the sun position. The arguments and results are designed for users of the Radiance Software.

  • function details are in the module documentation and docstrings

Usage

Find the sun position in New Delhi at 1pm:

from pyephem_sunpath.sunpath import sunpos
from datetime import datetime

thetime = datetime(2018, 5, 23, 13)
lat = 28.6
lon = 77.2
tz = 5.5

alt, azm = sunpos(thetime, lat, lon, tz, dst=False)
print(alt, azm)

>> 77.5362391561 232.336370505

Credits

Pyephem_sunpath is built upon pyephem an awesome astronomical package

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.2.0 (2018-05-28)

2018-05-28

  • cleaned up code

  • comprehensive docstrings

  • updated README.rst

  • added copyright notices

  • updated contributing authors

0.1.1 (2018-05-26)

  • Working release on PyPI.

0.1.0 (2018-05-05)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyephem_sunpath-0.2.0.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

pyephem_sunpath-0.2.0-py2.py3-none-any.whl (7.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pyephem_sunpath-0.2.0.tar.gz.

File metadata

File hashes

Hashes for pyephem_sunpath-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2305c6a8e8371cf1f14827b743a2552c238d3e3cfaeb87bd65543d84efa2b4b4
MD5 46bde496311162bf300db5a2f9e1fad8
BLAKE2b-256 8b24f7dadea4a344f0bd36fc6aefb37b69fc1ca20e645482f6bff9af08e827e4

See more details on using hashes here.

File details

Details for the file pyephem_sunpath-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pyephem_sunpath-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4a12e688e19a621e7d7242e70d14bbbefe160f0d6ef6237cd5bb74e4cd262978
MD5 b431b8a28976e86a9f751dab56e285dd
BLAKE2b-256 bdc52c26c9eb4c61e23fbda3e263eef6745ed232e9f0bb51366145e642877ed1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page