Scientific Programming in

The aim of this 5-day course is to provide an introduction to the Python programming environment for research students. The course will assume no prior knowledge about programming and will provide a general introduction to programming in Python as well as an introduction to capturing, exploring, analysing, and plotting data in Python.

Sign up for this course via the UCL Grad School Course Website.

Course Contents

  • General introduction to programming
  • Programming in Python
    • Using the intepreter
    • Writing Python scripts
    • Loops and control flow (for-loops, if-statements)
    • Data types: strings, lists, dictionaries
    • Using and writing functions
  • Matrices, Vectors, and Arrays: the Numpy package
  • Functions for scientific programming: Numpy and SciPy
  • Plotting and producing graphs: Matplotlib

Instructors

Loic Matthey Lloyd Elliot Charles Blundell Fabian Zimmer

Getting Started

Installing Python

For the course we will be using the Enthought Python Distribution, a special, pre-packaged version of Python that includes a lot of useful packages for scientific computing. There is an academic version that is free for academic use, which can be obtained through Enthought Python Distribution (Academic License) by entering your academic e-mail address and then using the download link provided in the email. There are versions for Windows, Mac OS X, and Linux. Follow the installation instructions provided on the download page.

We have some more detailed download and installation instructions as well as some problems to help you get oriented and verify that the installation was successful here. Please follow these instructions and try to install Enthought Python before coming to the first session. However, if there are any problems, we will try to sort it out in the beginning of the first session.

Installing an Editor

In order to edit Python scripts you will need a text editor. If you already have a text editor that you use and are comfortable with, you can simply use that (note that by text editor we do not mean a word processor like Microsoft Word). If you do not already have a preferred text editor, we recommend you use Sublime Text 2, which is available for Windows, Mac, and Linux (note that Sublime Text 2 is not free software, but is currently available as an evaluation version that can be used for an unlimited amount of time).