• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

ephem/H13-Dec-2021-7,2035,499

extensions/H13-Dec-2021-56,25555,037

libastro/H13-Dec-2021-28,30722,503

INSTALLH A D13-Dec-20212 KiB7245

LICENSEH A D13-Dec-20211.3 KiB2822

PKG-INFOH A D13-Dec-20216.6 KiB156120

README.rstH A D13-Dec-20214.6 KiB13095

astro_export.hH A D13-Dec-202149 43

setup.pyH A D13-Dec-20212.7 KiB8465

README.rst

1==============
2PyEphem README
3==============
4
5.. _ephem: http://pypi.python.org/pypi/ephem/
6.. _pyephem: http://pypi.python.org/pypi/pyephem/
7.. _XEphem: http://www.clearskyinstitute.com/xephem/
8.. _Quick Reference: http://rhodesmill.org/pyephem/quick
9.. _Tutorial: http://rhodesmill.org/pyephem/tutorial
10.. _PyEphem web site: http://rhodesmill.org/pyephem/
11
12PyEphem provides an ``ephem`` Python package
13for performing high-precision astronomy computations.
14The underlying numeric routines are coded in C
15and are the same ones that drive the popular `XEphem`_ astronomy application,
16whose author, Elwood Charles Downey,
17generously gave permission for their use in PyEphem.
18The name *ephem* is short for the word *ephemeris*,
19which is the traditional term for a table
20giving the position of a planet, asteroid, or comet for a series of dates.
21
22The `PyEphem web site`_ offers documentation
23and also links to the project bug tracker, user support forum,
24and source code repository.
25If you have a C compiler and the
26`pip Python installer tool <https://pip.pypa.io/en/latest/installing.html>`_
27on your system,
28then installing PyEphem should be as easy as::
29
30  pip install ephem
31
32There are also Windows installers in the downloads section below.
33
34The design of PyEphem emphasizes convenience and ease of use.
35Both celestial bodies and the observer's location on Earth
36are represented by Python objects,
37while dates and angles automatically print themselves
38in standard astronomical formats::
39
40 >>> import ephem
41 >>> mars = ephem.Mars()
42 >>> mars.compute('2008/1/1')
43 >>> print(mars.ra)
44 5:59:27.35
45 >>> print(mars.dec)
46 26:56:27.4
47
48The documentation includes both a `Quick Reference`_ and a `Tutorial`_,
49which are included in text files within the module itself
50as well as being available on the `PyEphem web site`_.
51
52The features provided by PyEphem include:
53
54* Find where a planet, comet, or asteroid is in the sky.
55
56  * High-precision orbital routines are provdied
57    for the Moon, Sun, planets, and the major planet moons.
58  * The user can supply the orbital elements of a comet, asteroid,
59    or Earth-orbiting satellite, and have its location computed.
60  * The positions of 94 bright stars come built-in,
61    and the user can create further fixed objects as needed
62    for their calculations.
63
64* Determine where in the sky an object appears for a particular observer.
65
66  * The user can supply the longitude, latitude, and altitude
67    of the location from which they will be observing.
68  * For convenience, a small database of longitudes and latitudes
69    for 122 world cities is included.
70  * For specified weather conditions (temperature and pressure),
71    PyEphem will compensate for atmospheric refraction
72    by adjusting the positions of bodies near the horizon.
73
74* Compute when a body will rise, transit overhead, and set
75  from a particular location.
76
77* Parse and use orbital data in either the traditional XEphem file format,
78  or the standard TLE format used for tracking Earth-orbiting satellites.
79
80* Determine the dates of the equinoxes and solstices.
81
82* Compute the dates of the various phases of the Moon.
83
84* Convert from the Greenwich Time (more precisely, Ephemeris Time)
85  which PyEphem uses to the local time of the user.
86
87* Convert positions between the equatorial, ecliptic, and galactic
88  coordinate systems.
89
90* Determine on which page of the Uranometria or the Millennium Star Atlas
91  a particular star should appear.
92
93* Return the Julian Date corresponding to any calendar date.
94
95Developers
96----------
97
98If you are interested in learning about how PyEphem works or in
99exploring its source code, check out this repository from GitHub.  It is
100hosted at:
101
102https://github.com/brandon-rhodes/pyephem
103
104If you lack expertise with version control, you can instead simply
105download a static copy of the most recent source code using this link:
106
107https://github.com/brandon-rhodes/pyephem/archive/master.zip
108
109To run its source code in place, create a `virtual environment
110<http://docs.python-guide.org/en/latest/dev/virtualenvs/>`_, activate
111it, change directory to the root of the PyEphem source code, and run::
112
113    python setup.py build_ext -i
114
115You can then run the PyEphem test suite to see whether all of its
116features are working correctly on your operating system and platform::
117
118    python -m unittest discover ephem
119
120PyEphem’s documentation is organized as a standard `Sphinx
121<http://www.sphinx-doc.org/en/master/>`_ document project.  You can
122build the documentation either with the Sphinx command line::
123
124    sphinx-build -b html pyephem/ephem/doc/ ./my_documentation_directory/
125
126— or, more typically, by invoking one of the targets in the
127documentation’s Makefile::
128
129    make -C ephem/doc html
130