Tag Archive


amateur astronomy awk bash be b[e] supergiant cartoon conference convert exoplanet fedora figaro fits fun history iraf jupiter latex linux magellanic clouds massive star matplotlib meteor mypaper ondrejov observatory optical paper peblo photo photometry planet pro-am pyraf python scisoft skinakas observatory small magellanic cloud smc spectroscopy starlink talk theli ubuntu university of crete video x-ray

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 […]

Replacing many characters in a string with Python

In order to replace a character in a string with Python replace command can be used easily: str.replace(old, new[, count]) [return a copy of the string with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.] But if we want to change […]