Python Installation and Basic Programming
From AstroBaki
Jump to navigationJump to searchHere we will assemble resources for learning Python, and for getting it and other programming-related software installed on your computer.
For a scientific programmer in Python, the absolute basics you need to have installed are:
- Python 3.X (note that 2.X still exists, but support for it is being dropped by various scientific packages)
- NumPy: a package for fast numerical array processing
- Matplotlib/Pylab: a package for generating publication-quality plots
- GIT: a revision-control program for keeping tabs on the changes you make to your code. Not just for python.
To get scipy, numpy, python, and a lot of other useful python packages altogether, you may prefer to download the academic version of Canopy from Enthought. All you need to do is make an account with your .edu email address.
Python
Topical Videos
- Introduction to Programs Data Types and Variables by Khan Academy
- Python Lists by Khan Academy
- For Loops in Python by Khan Academy
- While Loops in Python by Khan Academy
- Fun with Strings by Khan Academy
- Writing a Simple Factorial Program by Khan Academy
- ... there are lots more by Khan Academy ...
- Simpler Insertion Sort Function
Links
- Kara Kundert's Introduction to Python and Plotting
- Peter Williams A Python Bungee Jump
- Josh Bloom's Python Boot Camp offers a wealth of resources for getting started with Python. In particular, see:
- Instructions for installing all of the packages mentioned above.
- Useful links to Python resources
- Python for Scientific Computing has a list of resources on various topics relevant to a scientist getting started with Python
- Scipy astronomy tutorial covers reading in and analyzing data in scipy, mostly focusing on FITS files, but with some other useful information for those with data in other formats
- A Google Class on Python
- The Python Tutorial
GIT
Please see the Revision Control page,