Andrew Williams - Home Page

Research Links

Perth Observatory

PLANET (Probing Microlensing Anomalies NETwork)

Murchison Widefield Array radio telescope being built at the proposed Australian Square Kilometre Array site

Programming Links

The Python Language Website

Numeric Python extensions for fast multidimensional arrays in Python

Virtual Pascal - free 32-bit Pascal compiler

PhD Thesis

Here is my PhD thesis on an automated supernova search program at Perth Observatory, and analysis of the first three years of data (1993-1995).

Contacting me

I can be reached at:

Assorted code

If anyone uses any of this code, please let me know, especially if you alter it or add features.

Assorted Python programs for teaching or demonstrating concepts (not all written by me)

FITS A FITS (Flexible Image Transport System) file class for Python. If you don't have the Numeric Python libraries, it supports reading and writing FITS header cards as Python dictionaries. If you have NumPy, you can load and save FITS images with BITPIX formats of 16, 32, and -32. There is another module ( that contains preprocessing code and uses this module.

This module is in pure Python, so it should be very portable - no need to find binaries for your platform, do any C or fortran compiles, or any other installation steps. That said, I've only tested it under Linux...

improc A library of image processing routines that uses the FITS class above. Requires the NumPy numeric extensions.

XPA A very basic Python module for reading and writing region lists from SAOtng and SAOds9 image viewers, using the X Public Access mechanism. Can also use XPA to instruct the viewer to display a given filename.

Perth Prosp A Python system for controlling a CCD camera using 'Ariel', the Ohio State University low-level CCD and instrument control layer. Includes pre-processing, telescope controller communication using SQL, and some custom image processing automation. As a whole, it's probably not very useful to anyone else, but it's a good working example on use of the fits and improc modules. (The code is from Jan 2002, contact me for the latest version).

MySQL interface library translated to Virtual Pascal Antony T Curtis's port that was distributed with the OS/2 version of MySQL. Several assorted bugfixes to correct pointer problems and unitialised variables, plus some of my code to demonstrate usage (telclnt.pas, sqlint.pas, globals.pas, plus Dosini.pas by Thomas Bargholz from 1994). Known problems: Doesn't handle password authentification properly.

Swancon the CCG code Some Python code to render playing cards to a PDF file, given a text file containing the card descriptions. Fairly generic, but a work-in-progress.

Send-FTP: A bomb-proof ftp sender program. You can either define 'host', 'username', 'password' and 'directory' variables at the top of the program, or leave them undefined and it will prompt you at runtime, or define them (and chmod -r the file) if you want to automate it and don't mind the reduced security. If you rename it to you can import it as a module and call the 'sendfile' or 'sendall' script as you like, otherwise it will send the complete contents of the current direct to the remote host and directory, and keep trying till it succeeds.

To use it, put the program in your path, change to the directory full of stuff you want to send, and run ''. It will send every file in the local directory that doesn't exist on the remote host, or has a different file size.

It uses a watchdog timer for all network calls, so there is no way it can 'lock up'. During transfers, it resets a 5-minute watchdog timer every time an 8kb block is read from the file, so if the transfer rate drops slower than that, or if any of the handshaking calls don't return, it breaks out and reconnects after a 5 minute delay.

If it's started to transfer a file, but failed partway, any subsequent attempts to transfer that file will append to whatever data has actually reached the server instead of starting from scratch. It does _not_ attempt to append to an existing file if the file exists remotely but is smaller than the local copy, as it might actually be a different file, not just a truncated version.

It doesn't touch subdirectories, so all stuff to be transferred needs to be in the one directory.