As part my PhD, I used GPS satellites to measure the beam pattern of a telescope I built. While this can be done easily with the pyEphem module, I found that there wasn’t much documentation out there on the interwebs. So, I’ve written a simple Python script (below) which takes you through the basics of using pyEphem to track the path of GPS satellites. Firstly, you’ll be needing a list of GPS satellites. This can be downloaded from: This is in the form of…Continue Reading “GPS sattelite tracking in Python using pyEphem”

Cygnus A

I recently spent a few weeks at the Medicina Radiotelescope, Italy, working on getting data from a correlator into a format that CASA and AIPS could read. To do this, I made a python script to convert the data into a FITS IDI file. The FITS Interferometry Data Interchange Convention (“FITS-IDI”) is a set of conventions layered upon the standard FITS format to assist in the interchange of data recorded by interferometric telescopes, particularly at radio frequencies and very long baselines. pyFitsidi is a collection…Continue Reading “pyFitsidi – Python FITS IDI writing”

I’ve been using Sphinx to auto-document some python code, but noticed that there isn’t a Textmate bundle solely for Sphinx. Not to worry though: there is a reStructuredText bundle which will give you some nice commands, and here is a ridiculously simple command to run ‘make html’ for some sphinx documentation: #!/usr/bin/env python import os os.system(‘make html’) It’s just a few lines of python, that say to run ‘make html’ (most Textmate bundles are written in ruby, but python works too). All you then need…Continue Reading “A textmate command for sphinx”

Typing in “bottle python awesome” into Google doesn’t produce anywhere near as many results as it should. Bottle is an amazingly easy to use, lightweight framework with a very simple template engine, and all the goodies that you’ll want for form handling, cookies and that sort of thing. It’s not a fully fledged Model-View-Controller (MVC) or Object-Relational (ORM) type framework like Django, Web2Py or Pylons, so it’s not the best choice for large database driven sites; but for small-medium size sites it’s amazing and has…Continue Reading “Bottle: Quick Python Web Apps”

I’ve been posting a lot of LyX stuff recently, and here’s another: eLyXer is a python app that converts a LyX file to a nicely formatted HTML page. The files I tested worked a treat, so very excited. To install this on a Mac, first get Macports if you don’t already have it. Then, from the terminal, run: sudo port install ImageMagick sudo easy_install elyxer If you’re lucky that’ll work. If you run into a problem with ImageMagick, you probably need to install Java…Continue Reading “eLyXer: tex to HTML”