Archive for December, 2011

Closest O type stars

Posted December 29, 2011 By grigoris

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
θ Ori C (*) 0.5 5.1 O6V
ζ Ori 0.5 1.6 O9.7Ib
η Car (*) 2.6 -1 to 7 LBV

(*): binary systems

Note on how to make multiple plots with pylab

Posted December 20, 2011 By grigoris

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 these actions it can be really fast and easy to use it when you just want to see some data and do some minor tasks. But since I don’t write them down these actions I keep forgetting them (well… after a serious number of repetitions this would be of no need … but up to that point let me keep a note!).

So, one of these is hot to make multiple plots. After creating (or most probably loading) the data and making all the necessary steps then we follow this typing:
In [23]: fig = figure()
In [24]: ax = fig.add_subplot(111)
In [25]: p1 = ax.plot(x,y,'r-')
In [26]: p2 = ax.plot(x,z,'g-')
In [27]: draw()

which gives us the following result:

About licensing

Posted December 11, 2011 By grigoris

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 this table it is obvious that the GNU General Public License does not allow any change or link in order to preserve the license through the works, while the GNU Lesser General Public License allows only the link with other licenses. But that’s not the same with the permissive licenses like BSD or MIT. That means that these licenses (including the Python’s license) allow both link and distribution with other licenses, which makes them not compatible with copyleft licenses (with the best representative the GNU GPL).

Moreover, IRAF‘s license (Wikipedia / IRAF) is provided free of charge but under various licenses (MIT and some non-free parts). So its license is not really clarified and certainly not compatible with GNU GPL. Although Python provides the opportunity to connect with other licenses and redistribute code under GNU GPL the use of IRAF’s tasks does not allowed it as a whole package. So, the license for code that combines these packages cannot implemented under a copyleft license (like GNU CPL). It seems that a more suitable license would be a Modified BSD (like PyRAF’s license).

[edited on Dec 16th:] Actually since Python and MIT’s license of IRAF (& PyRAF) allow license changes, then scripts that use these tools can have whatever license the author wants, since Python and IRAF/PyRAF are distributed separately.

Thanks to Jann K for clarifying a little more what I have written before!