Archive for 2011

Closest O type stars

By grigoris | Filed in Astronomy

Reading the book of F.D. Seward and P.A. Charles, “Exploring the X-ray Universe”, I found out some really massive and luminous O type stars that are close by and can be pointed out easily at the night sky: star distance (kpc) magnitude (V) spectral type ζ Pup 0.44 2.3 O4If δ Ori 0.5 2.2 O9.5II […]

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

About licensing

By grigoris | Filed in Astronomy

Stumbled upon the various different licenses I though to write down some conclusions (if I really got into any…). A nice comparison table of free software licenses is given in the Wikipedia where it is easily to see which licenses allow: (i) the link with other licenses and (ii) releasing under different license. So, in […]

While asking around for the best solution in how to determine the colors inside the matplotlib’s pie function I found out that the best solution is just … not to use them at all! (At least if they are not more than a couple of objects!) Well, the problem starts from the fact that when […]

While running a data reduction of IR observations with IRAF, the ccdproc printed this error: ERROR (502, “floating point invalid operation”) which means that some values of the image used (the flat image in this case) are not suitable for the performing mathematical actions (like division with 0s). Moreover the IR ccds have many bad […]

Flatcombine and Darkcombine (based on imcombine both) in IRAF just combine the images given as input to create a master flat / dark image without performing any normalization. This is done when using ccdproc with the parameters flatcor and darkcor set to yes.

Although hedit of IRAF is supposed to handle the keywords of a fits file (add, remove) its behaviour can be misleading sometimes. An error like this: ERROR (1121, “FXF: EOF encountered while reading FITS file (something.fits)”) means that after altering the keywords in the header the EOF of the header has been placed wrongly. The […]

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

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

Ubuntu 10.10 includes matplotlib-0.99 in their repositories, which is not the latest one, so you don’t get the latest cool features (like gridspec)! But as I need some of its features I decided to go on and install the latest version matplotlib-1.1.0, only 20 days after its launch ! First of all it cannot be […]