Re: Astronomy--Programs to Compute Siderial Time?

2010-01-07 Thread John Machin
On Jan 7, 2:40 pm, "W. eWatson"  wrote:
> John Machin wrote:

>
> > 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.
>
> What is it used for?

The maintainer of the module processes the xml file with some script
or other to create the user-legible docs.

> Do I need it?

No.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Astronomy--Programs to Compute Siderial Time?

2010-01-06 Thread W. eWatson

John Machin wrote:

On Jan 7, 11:40 am, "W. eWatson"  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 actually need to learn how to make a module that can be imported, 
which in the short interlude I have done. Also looked into docstrings 
and docs, which I now have a decent grasp of. Never really used either 
doc info or writing my own module before. Easy.



I found
a module somewhat like I want, siderial.py. You can see an intro to it
at .
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).
How right you are. I misspelled it twice, and quickly found that out 
when I tried to use the [side][real] (easy mnemonic, two words) module. 
sidereal.


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.

What is it used for? Do I need it?

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/

Found that too as I cruised around.


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 /Lib/site-packages
Again in my "learning about modules", discovered that too. I think I'm 
on my way. Thanks.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Astronomy--Programs to Compute Siderial Time?

2010-01-06 Thread John Machin
On Jan 7, 11:40 am, "W. eWatson"  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 .
> 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 /Lib/site-packages
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Astronomy--Programs to Compute Siderial Time?

2010-01-06 Thread W. eWatson

Roy Smith wrote:

In article ,
 "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.


FWIW, if you have any interest in this kind of stuff, you must read the 
classic book on the subject:


http://www.amazon.com/Astronomical-Formulae-Calculators-Jean-Meeus/dp/094339
6220

This is not some textbook which takes graduate level physics to understand.  
It's a straight-forward primer for people who want to use calculators to 
compute phase of the moon and stuff like that.
Thanks, but I'm quite familiar with it. My copy is some 10-15 years old. 
 I suspect he never wrote a newer edition for any computer language. I 
do have access to a C++ library, but I don't think that's going to do me 
much good with Python.


My problem at the moment is finding either someone who has implemented 
it or another similar module.


Note I posted just before you that I have found a siderial.py module, 
but am not familiar with how one installs them or the doc mechanism.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Astronomy--Programs to Compute Siderial Time?

2010-01-06 Thread Roy Smith
In article ,
 "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.

FWIW, if you have any interest in this kind of stuff, you must read the 
classic book on the subject:

http://www.amazon.com/Astronomical-Formulae-Calculators-Jean-Meeus/dp/094339
6220

This is not some textbook which takes graduate level physics to understand.  
It's a straight-forward primer for people who want to use calculators to 
compute phase of the moon and stuff like that.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Astronomy--Programs to Compute Siderial Time?

2010-01-06 Thread W. eWatson

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. I found 
a module somewhat like I want, siderial.py. You can see an intro to it 
at .
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?

--
http://mail.python.org/mailman/listinfo/python-list