Astronomy--Programs to Compute Siderial Time?

John Machin sjmachin at lexicon.net
Wed Jan 6 20:49:41 EST 2010


On Jan 7, 11:40 am, "W. eWatson" <wolftra... at invalid.com> wrote:
> W. eWatson wrote:
> > Is there a smallish Python library of basic astronomical functions?
> > There are a number of large such libraries that are crammed with
> > excessive functions not needed for common calculations.
>
> It looks like I've entered a new era in my knowledge of Python.

Mild curiosity: this would be a wonderful outcome, but what makes it
look so?

> I found
> a module somewhat like I want, siderial.py. You can see an intro to it
> at <http://infohost.nmt.edu/tcc/help/lang/python/examples/sidereal/ims//>.
> It appears that I can get the code for it through section 1.2, near the
> bottom. I scooped it siderial.py up, and placed it in a corresponding
> file of the same name and type via NotePad. However, there is a xml file
> below it. I know little about it. I thought maybe I could do the same,
> but Notepad didn't like some characters in it. As I understand Python
> doc files are useful. So how do I get this done, and where do I put the
> files?

The file you need is sidereal.py, not your twice-mentioned siderial.py
(the existence of which on the referenced website is doubtful).

What you have been reading is the "Internal maintenance
specification" (large font, near the top of the page) for the module.
The xml file is the source of the docs, not meant to be user-legible.
A very tiny amount of googling "sidereal.py" (quotes included) leads
to the user documentation at http://infohost.nmt.edu/tcc/help/lang/python/examples/sidereal/

Where do you put the files? Well, we're now down to only one file,
sidereal.py, and you put it wherever you'd put any other module that
you'd like to call ... if there's only going to be one caller, put it
in the same directory as that caller's code. More generally, drop it
in <YOUR_PYTHON_INSTALL_DIR>/Lib/site-packages



More information about the Python-list mailing list