Learning Python

Both in astronomy and statistics, python is recognized as a versatile programming language. I asked python tutorials to Alanna. The following is her answer, which looks very useful for those who wish to learn python.

————————————————————————
1/ Python basics:
My favorite Intro to Python website is the Tutorial by Guido van Rossum (python founder):
http://docs.python.org/tut/

I also find other references at this site to be useful: http://docs.python.org

For more complicated questions I often search: http://www.python.org/

2/ Scientific python: numarray, numpy These modules allow one to use APL/IDL- like syntax with matrices (i.e. implicit loops over indices when doing many common operations). They also have some handy scientific functions. Eventually “numarray” will be replaced by “numpy”, but it hasn’t happened yet (because of “pyfits” for fits files). It should happen this year (November??).

Numarray home page: http://www.stsci.edu/resources/software_hardware/numarray

Numpy home pages: http://sourceforge.net/projects/numpy/ for code; and http://numpy.scipy.org/ for an overview.

3/ For fits files, the astronomical programmers at Space Telescope Science Insititute alse wrote “pyfits”: http://www.stsci.edu/resources/software_hardware/pyfits

2 Comments
  1. hlee:

    It’ll not hurt this post adding something like this, pyMC: Markov chain Monte Carlo for Python. After a big time elapse, I’m now learning python, finally.

    [Added1] Importantly, StatPy: Statistical Computing with Python by Tom Loredo. (Some links may not work but they are easily googleable.)

    [Added2] I also found Dive into Python useful.

    Thanks, Alanna.

    10-22-2008, 12:30 pm
  2. hlee:

    I found Python for Scientific Computing by TE Oliphant [pdf] and references therein useful.

    02-14-2009, 12:09 am
Leave a comment