My name is Thomas Robitaille and I am the leader of a research group at the Max Planck Institut für Astronomie. I carry out research on star formation in the Milky-Way and other galaxies, and I use Python for my daily work.
I have developed a number of Python packages for Astronomers, including APLpy, ATpy, Montage-wrapper, PyAVM. I have also contributed to Scipy and other scientific packages, and am one of the project leaders for Astropy, which is a big project to create one main Python package for Astronomy.
You can contact me at robitaille@mpia.de.
Please let me know if you have feedback/suggestions for improving the course!
The block course lasts five days, and each day will follow this schedule:
The lectures will be mixed with exercise sessions - from time to time I will give you 5 or 10 minutes to complete a given task/exercise. I will give out three graded problem sets during the week, and you will be required to hand these in a deadline indicated on the problem sheet. There will be no final exam. An average of 60% in the problem sets will be required to obtain the 2 credits at the end of the course.
The course will be in English.
I am very happy to come by to review your code/solutions to exercises (i.e. not problem sets). During the afternoon session, please do ask me to come by if you would like me to comment on your code and how to improve it.
for exercises that require you to submit a Python script:
enter a filename that contains the name of the problem sheet and your name, and ending with .py
, as follows:
problem_set_1_thomas_robitaille.py
send me the file by email to robitaille@mpia.de with [PY4SCI]
in the subject.
for exercises that require you to submit an IPython notebook:
enter a filename that contains the name of the problem sheet and your name, and ending with .ipynb
, as follows:
problem_set_2_thomas_robitaille.ipynb
send me the file by email to robitaille@mpia.de with [PY4SCI]
in the subject.
The following criteria are taken into account for grading problem sets - the code should:
run with no errors
produce the correct results
be clearly readable, and include comments explaining what is being done
not include any unused code!
include a header summarizing the problem and if there are any special instructions for running the program. You can use triple quotes to enclose the header information:
"""
Program to compute prime numbers
Author: Thomas Robitaille
You can run this program with ``python primes.py``
"""
There is not always a unique solution to a problem, so it does not matter if your programs do not look the same as somebody else's! What matters most is that you find your own way of doing it.
Practice Problems can be done in groups, but Problem Sets should be done individually in order to get the full marks. If you need to work with someone else, then you can, but (a) you should submit a single solution and declare that you worked together on the solution, and (b) the final grade for the problem set will be multiplied by 0.75. If two students or more submit essentially the same solution without declaring they have worked together, then the final grade for the problem set will be multiplied by 0.50.
If you would like to use Python on your laptop, you have several possibilities:
Come and speak to me in the afternoon if you have any questions or need any help getting set up.
Before you can run Python in the ways described on this page, you will need to start up a command-line Terminal application. In the CIP pool this is located in the Anwendungen -> Zubehör -> Terminal menu.
If you are using the CIP machines, you will need to enable the Anaconda Python distribution with:
export PATH=/local/py4sci/anaconda/bin:$PATH
You can add this to a file named .bashrc
in your home directory if you want the command to run anytime you open a terminal.
I will demonstrate how to do this during the course