Tag Archive


aaomega anglo-australian telescope awk bash b[e] supergiant c-shell conference convert csh exoplanet fedora figaro fits fun galaxy header history iraf jupiter kepler latex linux magellanic clouds massive star matplotlib meteor moon mypaper numpy ondrejov observatory paper peblo photometry planet pyraf python scisoft skinakas observatory spectroscopy starlink talk theli ubuntu video wavelength

Reading columns from a text file – fast and easy!

Although the are many information on how to use the genfromtxt (from numpy) there is not a clear demonstration (that I found…) to show how to easily read a text file with columns of data (including strings – it is straightforward to read columns of numbers with loadtxt for example). Suppose that we have the […]

Note on how to make multiple plots with pylab

iPython is a great tool to work with Python interactively, imitating a MatLab environment especially when running with matplotlib and numpy [the pylab module, all can be automatically imported by starting pylab like: ipython –pylab]. So you can use it to load data and start playing around with them. Although I like to script more […]

Buggy behaviour of unpack within numpy.loadtxt

The routine loadtxt from numpy (numpy.loadtxt) can be used to load columns of data from various files. This works great as long as numbers exist and becomes buggy with strings. Suppose we have a file (named ‘test.test’) with these values: 3103725. 1616.93596535 13.656 0 2011-05-23T23:49:35 3139474. 1405.95436047 13.643 0 2011-05-23T23:51:16 3026925. 1370.07921223 13.683 0 2011-05-23T23:54:40 […]