Table of Contents
jd: Convert to Julian dateconjd: Convert from Julian daterdaa: Equatorial to horizon
coordinatesaard: Horizon to equatorial
coordinateshoursToRadians(): Convert hours to
radiansradiansToHours(): Convert radians to
hourshourAngleToRA(): Convert an hour
angle to right ascensionraToHourAngle(): Convert a right
ascension to an hour angledayNo(): Date to day numberparseDatetime(): Parse external
date/timeparseDate(): Parse external dateparseTime(): Parse external timeparseAngle(): Parse external angleparseLat(): Parse latitudeparseLon(): Parse longitudeparseHours(): Parse a quantity in
hoursclass MixedUnits: Handling mixed
unit systemsdmsUnits: Converter to and from
degrees, minutes, and secondsclass LatLon: Terrestrial positionclass JulianDate: Julian date and
timeJulianDate.__init__(): ConstructorJulianDate.__float__(): Convert to
floatJulianDate.datetime(): Convert to a
datetime instanceJulianDate.offset(): Move a time by
some number of daysJulianDate.__sub__(): Find the
difference between two timesJulianDate.__cmp__(): ComparisonJulianDate.fromDatetime(): Convert a
datetimeclass SiderealTimeSiderealTime.__init__():
ConstructorSiderealTime.__str__(): Convert to a
stringSiderealTime.utc(): Find Universal
TimeSiderealTime.gst(): Local Sidereal
Time to Greenwich Sidereal TimeSiderealTime.lst(): Greenwich
Sidereal Time to Local Sidereal TimeSiderealTime.fromDatetime(): Convert
UTC to GSTclass AltAz: Horizon coordinatesclass RADec: Equatorial coordinatesAbstract
This document describes sidereal.py, a Python module to perform
spherical geometry calculations for astronomical
applications.
This publication is available in Web form and also as a PDF document. Please
forward any comments to tcc-doc@nmt.edu.
The sidereal.py package is designed to do a few of the simpler
astronomical calculations. The mathematical basis of these
calculations comes from spherical trigonometry.
Here is the source for formulae used in this package:
Duffett-Smith, Peter. Practical astronomy with your calculator. Second edition. Cambridge, 1981, ISBN 0-521-28411-2.
The reader is assumed to know the Python programming language.
All astronomical computations are approximations. Refer to Duffett-Smith's book for a discussion of the limitations of these formulae. In particular, they assume that the Earth is a sphere, which it isn't quite.
The actual implementation of this module is shown in the
companion document, sidereal.py: Internal maintenance specification, in lightweight literate programming form.