Git Product home page Git Product logo

pyephem_sunpath's Introduction

pyephem_sunpath

Documentation Status Updates

Calculate sunpath using pyephem

Note: Pyephem has been depreciated. See https://rhodesmill.org/pyephem/. A good alternate is skyfield https://rhodesmill.org/skyfield/

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.

pyephem_sunpath's People

Contributors

currenttv avatar dependabot[bot] avatar santoshphilip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pyephem_sunpath's Issues

pyephem is no longer maintaned

It would be great if this functionality were restored on top of a different astronomical library. I will make a pull request

tz and time

i tried to google and never found an answer so hop its ok to ask here

but is tz the amount of hours in relation to UTC?

and would this use the current time?

thetime = datetime.now()

my code is:

from pyephem_sunpath.sunpath import sunpos
from datetime import datetime

thetime = datetime.now()
lat = 55.327013
lon = 10.438298
tz = 2

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.