Archive for June, 2011

Some useful calculations to keep in mind !!

> changing bases in logarithms: loga x = logb x / logb a
for base 10 and e: log x = ln x / ln 10
(log e = 1 / ln 10)

> derivative of exponential with other base:

d (ax) / dx = ax ln a

in the case of base 10: d (10x) / dx = 10x ln 10

> derivative of logarithm with other base:

d (loga x) / dx = d (ln x / ln a) / dx = 1 / ( x ln a)

so in the case of base 10: d (log x) / dx = 1 / ( x ln 10)

A useful online resource for calculations is Wolfram Alpha ‘s engine.

While I was working on a script to make multiple plots with matplotlib I found out that it was not possible with the version that Scisoft 7.5 uses (0.99) but a later version can do it (1.0.1)! So a logical though was to go on and upgrade the matplotlib inside scisoft but was not really obvious or successful. Also, I was not able to find a way to combine python modules inside scisoft with modules outside it (ie at the file system under /usr/lib/python2.x/ in Fedora). Although i did ask in mailing lists about this I have not get any answer yet, so I went on to install the latest version of matplotlib, numpy, scipy through the usual repositories under the file system. Then if I want my script to take advantage of the matplotlib 1.0.1 I insert


at the first line of the scripts while

#!/usr/bin/env python

if I want to work with the modules inside scisoft (like pyraf).

Perhaps I have a better solution to post in the future…