PyTPM is a Python interface to the Telescope Pointing Machine (TPM) library. TPM is a C library written by Jeffrey W. Percival, for performing coordinate conversions between several astronomical coordinate systems.
Python interface to TPM C code is written using Cython.
TPM was designed with the aim of incorporating it into telescope control systems. To meet this design goal, TPM offers control over calculations carried out during coordinate conversions. Some of these calculations must be performed frequently, for example time related calculations. Others need to be performed only once per night, for example nutation and precession matrices. In general, the former class of quantities are easier to calculate than the latter. TPM allows the user to select the exact calculations to be performed, for a given coordinate conversion. This enables the user to control the computational load, which is important in telescope control systems. TPM C library is used by the KPNO WIYN observatory and the WHAM projects.
TPM is also useful outside telescope control system. It can be very useful for converting a large catalog of coordinates. In such cases, the “star independent” quantities, which tend to be computational expensive to calculate, can be calculated just once for the entire catalog. This will make coordinate conversions faster.
PyTPM is not a complete astrometry package. The aim is to provide access to the TPM C code from Python. TPM machinery can be directly accessed using the pytpm.tpm sub-module. The sub-module pytpm.convert has several convenience functions that can be used for performing coordinate conversions. The latter is sufficient for most, but not all, calculations.
Users must read the TPM manual before attempting to use the pytpm.tpm module.
PyTPM has been tested on Python versions 2.6, 2.7 and 3.2. Distribute is required for installing PyTPM. Cython is not required, unless the Cython code is modified and needs to be re-compiled. Nose is required for running tests. Sphinx and the numpydoc Sphinx extension are required for building documentation from ReST source.
PyTPM can also be installed using pip or easy_install. Use
$ pip install pytpm
See Installation for detailed instructions on installing PyTPM.
The source code repository for PyTPM is at https://github.com/phn/pytpm. The repository can be cloned using git, or a copy can be downloaded using the Download button on the above website.
Information on installing PyTPM can be found in Installation.
For a detailed list of functions and constants defined in PyTPM, see the section on Functions and constants in PyTPM. For detailed information on the data structures defined in PyTPM, see the section on Data Structures.
The document Astrometry Resources presents links to astrometry resources.
Python and Cython code for PyTPM is released under the BSD license; see LICENSE.txt.
Please send email to prasanthhn, at the gmail.com domain, for reporting errors, and for comments and suggestions.