Jump to Navigation

Computational Methods in Astronomy

Computational Methods in Astronomy

Course Outline: 

The course is intended to give a broad background to the computational problems that an astronomer is most likely to encounter. The emphasis will be to develop skills in logical thinking by means of extensive programming exercises, based on astrophysical problems, using Python. Most of the three-hour sessions are devoted to tutorial exercises. Further exercises are provided as homework which will count towards the final mark. The idea behind the course is to instill familiarity with logical thinking and to develop programming skills.

The course does not make use of well-known software packages, but rather seeks to build an understanding of the fundamentals underlying scientific computations. Students will have had a brief exposure to computers and the Linux operating system prior to the course. The course itself will be one module (30 hours), consisting of 10 three-hour weekly sessions.


Topics to be presented will be drawn from:

  • Introduction to Python programming - 1.
    In this session we introduce programming by example. The students will start off with a basic "Hello World" and end up by solving the roots of a quadratic equation.
  • Introduction to Python programming - 2.
    Students learn how to read/write to disk files. They will generate data files which will be used as input for the graphical display package "gnuplot". By the end of the session they will know how to perform matrix operations using the "numpy" Python module.
  • Basic statistics.
    This session introduces the concept of the mean, median and mode. The most important statistical distributions - the Binomial, Poisson and Gaussian, are discussed and students will develop their own Python scripts to solve problems involving these distributions.
  • Least squares fitting to data.
    The concept of least squares is introduced and students will develop a script to fit a straight line to data. The extension to multi-variate least squares is made using matrix methods. Students will develop a script for fitting polynomial curves and finally to fit a truncated Fourier series to data.
  • Numerical solution to differential equations.
    This session starts off with the simple Euler method for first-order differential equations. Then it is shows how this can be extended to differential equations of any order. The 4th-order Runge-Kutta method is introduced for initial value problems. Finally, boundary value problems are introduced using the shooting method.
  • Find periods in unequally sampled data.
    It is shown how a period can be extracted from noisy data. This leads to the concept of the periodogram. It is shown how aliasing and the Nyquist frequency places limits on the frequencies to be detected. Extracting multiple frequencies is introduced using the pre-whitening technique.
  • Introduction to CCD photometry.
    In this session we show how the brightness of a star can be measured from a CCD image using aperture photometry. Using our knowledge of statistics, the error in the aperture magnitude is calculated. The concept of the PSF is introduced which leads to optimal extraction and profile fitting methods.
  • Introduction to CCD spectroscopy.
    The method of simple extraction of a spectrum from its image is introduced. By analogy with photometry, it is shown how optimal extraction can be used to reduce the noise level. Finally, the cross-correlation method for accurate determination of radial velocity is introduced.

Programmes | by Dr. Radut