skip to navigation
skip to content

Not Logged In

astronomia 0.3

Library for calculation of ephemeris and other astronomical calculations

Package Documentation

Astronomia is a collection of subroutines and applications for calculating the positions of the sun, moon, planets and other celestial objects. The emphasis is on high accuracy over a several thousand year time span. Note that the techniques used are overkill for most calendar applications.

The subroutine library attempts to implement some the techniques described in Astronomical Algorithms, second edition 1998, by Jean Meeus, Willmann-Bell, Inc.

Currently there are no graphical applications apart from some demo CGI interfaces.

Astronomia will work with Python 2.6+ and 3.0+.


Reference documentation is at


At the command line:

$ pip install astronomia
# OR
$ easy_install astronomia

Or, if you have virtualenvwrapper installed:

$ mkvirtualenv astronomia
$ pip install astronomia


To use Astronomia in a project:

import astronomia

Refer to the API Documentation at


Development is managed on bitbucket at


Astronomia is a fork of the Astrolabe library created by Bill McClain. The Astrolabe library is no longer available.

I (Tim Cera) used the Astrolabe library within my tidal analysis package TAPPy. In 2013 I pulled Astrolabe out of TAPPy and forked Astronomia. I have since fixed many bugs and added features. The most important added feature is the ability for most functions to work with array inputs. Bill McClain had dual Python and 'C' code, but I focused only on the Python code, updating with newer data and equations as I found them.


v0.2.3-1, 2013-08-31:

  • Minor changes to get the README.rst to post to the PyPI page.

v0.2.3, 2013-08-31:

  • Made fday_to_hms more robust by getting rid of the integer part of the Julian date.
  • Replaced is_dst with a different (better?) algorithm that at a minimum has updated DST definitions.
  • Fixed ell_to_geo and added tests.
  • Reworked the fday_to_hms algorithm to be more robust.
  • Previous it would return 59 seconds instead of a full minute.
  • Added fday_to_hms tests.


  • Added new tests and expanded test coverage based on tox coverage report.
  • Minor PEP8 edits from flake8
  • Changed the delta T table to make more readable.
  • Verified equations against NASA Eclipse web site.
  • Added the ability for cal_to_jd to work with fractional years and months.
  • Moved all sin/cos/tan... to the numpy equivalents
  • flake8 style suggestions
  • Now have an even better tox.ini - coverage, flake8
  • Removed unused imports
  • Added the html report generation from coverage.
  • Improved the docs
  • Added support for tox and coverage
  • Made documentation match recent moves.


  • Moved coordinate functions from util to calendar
  • Added ecl_to_geo
  • Minor cleanups


  • Refactored nut_in_lon -> nutation_in_longitude
  • Refactored nut_in_obl -> nutation_in_obliquity
  • Renamed ->
  • Refactored ELP2000 class to Lunar class
  • Renamed ->
  • Refactored VSOP87D class to Planets class
  • Added mean_elongation, mean_anomaly, argument_of_latitude Lunar functions
  • Shifted many functions to work with numpy arrays along with scalars
  • Added several tests
  • moon.Moon.dimension3 no longer repeats logic, but calls other functions

v0.1, 2013-06-19:

  • Initial release.
  • Fork from Astrolabe
  • Python 2 and 3 compatibility
  • Added tests
  • Several minor bug fixes
  • Moved to git for source code control
  • Moved to bitbucket
File Type Py Version Uploaded on Size
astronomia-0.3.tar.gz (md5) Source 2014-04-03 564KB
  • Downloads (All Versions):
  • 22 downloads in the last day
  • 324 downloads in the last week
  • 1166 downloads in the last month