Analysing an astronomical image in python