Wednesday, March 31, 2010

KIle -an integrated Latex environment

Kile is an integrated Latex environment software with the following features(from
its Kile homepage

  • Compile, convert and view your document with one click.
  • Auto-completion of (La)TeX commands
  • Templates and wizards make starting a new document very little work.
  • Easy insertion of many standard tags and symbols and the option to define (an arbitrary number of) user defined tags.
  • Inverse and forward search: click in the DVI viewer and jump to the corresponding LaTeX line in the editor, or jump from the editor to the corresponding page in the viewer.
  • Finding chapter or sections is very easy, Kile constructs a list of all the chapter etc. in your document. You can use the list to jump to the corresponding section.
  • Collect documents that belong together into a project.
  • Easy insertion of citations and references when using projects.
  • Flexible and smart build system to compile your LaTeX documents.
  • QuickPreview, preview a selected part of your document.
  • Easy access to various help sources.
  • Advanced editing commands.
Although Kile is a KDE application, you can still install it in Ubuntu Koala using the standard
sudo apt-get install kile
command in the command line. The aptitude system will pull in a lot of KDE support softwares even if you are more comfortable with the GNOME Desktop. At this writing, the version I have is 2.0.83 in KDE 4.3.2, while the latest unstable version is already at 2.1 Beta 3. Kile is easy to use but you need to know some rudiments of Knuth's Latex typesetting setting system of denoting mathematical equations. As a simple example, let us write the following in kile: The kinetic energy of a body with mass m and speed v is given by (1/2) mv^2. Now run Kile and start with a new article. Automatically, Kile will give you a blank built in article template like this:

\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}

%opening
\title{}
\author{}

\begin{document}

\maketitle

\begin{abstract}

\end{abstract}

\section{}

\end{document}




Now edit the above so it will be shown as
 
\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}

%opening
\title{Kinetic Energy of a moving body}
\author{Ali Baba}

\begin{document}

\maketitle

\begin{abstract}
Example Latex article example
\end{abstract}

\section{Definition}
The kinetic energy of a body with mass $m$ and speed $v$ is given by $\frac{1}{2}m\cdot v^2$.

\end{document}

Save the file to myfirst.tex and then click on Quickbuild icon. If everything is allright, Kile will call support programs to generate a pdf file myfirst.pdf. Here is an image of the output.


If you get this far, congratulations!  There is still so much to discuss but we stop here at this moment. We only illustrate that KIle is an easy to use free-software to generate professional looking typeset documents.


To be continued... Chip in your comments so the post will be more useful to you.

Wednesday, March 17, 2010

Stellarium- a complement to Kstars

Let me tell you that my previous experience with Stellarium did not go well three years or more ago. It repeatedly crashed and I got some negative feelings over the software.

But today Stellarium redeemed itself. I was presented with a picture of a pasture in Paris and moving the mouse gave me fantastic various viewing transformations including fisheye view pleasures.

Stellarium will complement Kstars. Thankfully my harddisk (120 Gbytes) is large enough to accommodate the two or I have to pick up Kstars based only on familiarity.

When I wanted to visit Mars, I was presented with a Spirit panoramic view of Gusev crater collated from a lot of pictures.


I thank the developers of Stellarium for finally making Stellarium work flawlessly this time on the latest Ubuntu 9.10 Karmic Koala OS.

Till then, we have to write more posts on both Stellarium and Kstars.

Kalzium- a periodic table of elements viewer

Kalzium is a free software available for Linux systems for viewing properties of the elements and for exploring the periodic table. Properties of the elements can be viewed at a glance either individually or grouped. The information on isotopes are also included and wikipedia articles are referenced. Here is a snapshot.




Click on the image for a fuller view. Kalzium is a KDE application. You should install the Kalzium helpfiles (Kalzium handbook) so as to maximize benefits in using the program. Kalzium also include a free chemical equation balancer! Clever people. Kalzium can be obtained from
http://www.kde.org/kalzium if it is not available as a package for your OS. My version of Kalzium is at 2.2.98.

So dont feel bad using Linux in the scientific computing arena. You have lots of free softwares to help you and it is our job current and future to help you maximize the use of these powerful and FREE softwares.Stay tuned for more articles on Kalzium

Tuesday, March 16, 2010

Maxima, the free computer algebra system

Maxima was inspired by the first successful computer algebra system, Macsyma developed at MIT. It is able to perform symbolic integration, differentiation, expansions, and simplifications of expressions.

There are several available interfaces for maxima. The basic program can be run from the command line. But a better way to use Maxima is via wxMaxima and xMaxima. Between the two, I gravitate towards wxMaxima. Here are some capabilities of Maxima.

Here are some simple outputs from Maxima just to get started.

(%i1) diff(x^3, x);
(%o1) 3*x^2
(%i2) expand((x+y)^3);
(%o2) y^3+3*x*y^2+3*x^2*y+x^3
(%i3) integrate(x^3,x);
(%o3) x^4/4
(%i4) factor(x^2 + 2 *x + 1);
(%o4) (x+1)^2
(%i5) 15!
(%o5) 1307674368000

In the above example, after entering ; we press shift enter, not just the enter key to see the results. The outputs are actually pretty printed.

We will add more entries to using Maxima in the future! Stay tuned.

Wolframalpha computational server -secret weapon of smart students

No, wolframalpha is not a free software but rather a currently free computational server (knowledge engine) from the people who developed and sell Mathematica, a powerful symbolic mathematical software.

When my high school graduating niece wanted to factor some polynomial expressions, I simply told her to fire up her browser and visit http://www.wolframalpha.com and type say ( I have forgotten here original expression) x^3 - y^3. Here are snapshots of parts of the screen output of the comptuational service.



















Doubtless, she may not understand what a contour map is at the moment, but the factoring of x^3 -y^3 is part of the output of the server. Integrals and derivatives are even shown!

Now that Wolframalpha is now better known since it was chosen as the best of What's new for 2009 by Popular Science, smart students now have a semiautomated servant in the Internet to help them in their homework.
Wolframalpha will benefit students and their teachers in the college calculus programs. It can display the steps to some of the results, and the fine resolution graphs is more than ice candy. Wolfram alpha deserves more use.

Note: Our Python computational server is idle at the moment. It differs from Wolframalpha in that the latter is very general in scope from stock market questions, to historical significance of dates and has a nice formatted series of outputs.

So you know now one of our secret weapons. Narrow focused "free" solvers say for calculus include wxMaxima and Axiom to name just two.

Enjoy exploring the capabilities of Wolframalpha. Our concern is whether it will continue to be free in the far future.

There is no need to buy an expensive TI-89 or HP 50G unless the instructor absolutely require them. The problem is that in the PHilippines , Internet access is only enjoyed by so few especially in urban areas. Perhaps cell phones, and USB broadband devices can help accelerate the Internet access of the general population. And they will discover a host of currently free, awesome services like wolframalpha.

Is Kstars the best free desktop planetarium?

Kstars is easily installed if your Linux OS is debian based like my Ubuntu Karmic Koala 9.10. Use synaptic package manager or simply issue from the command line sudo apt-get install kstars and Ubuntu will do all the worrying to completely install the package.
It is a KDE package and if you started with GNOME only, the install might take more than an hour just to install the KDE dependencies. It can interface and control telescopes! and knows the longitude and latitude of most places.




Kstars can display more than a 126,000 stars, 13,0000 deep sky objects, the 88 constellations,
all planets,the Sun , the Moon ,thousand of comets and asteroids and the Milky Way.
At version 1.5.4, Kstars have vastly improved and it is so full of features that we have a problem of presenting a short introduction. We'd rather that the reader install Kstars and not rush doing everything. Instead take time to enjoy the accessiblity of a simulated universe under one's fingertips.

Here is a pic from Kstars. We will write additional blogs on Kstart in the future. We wrote this piece to encourage the reader to install the software.




Want to know where the planets are at now? Just enter the name in the Find utility and Kstars will position the displayed celestial map with the object at the center!

Kstars have evolved and may be useful even to serious astronomy amateurs and professionals alike. Nothing give us satisfaction than a free high quality software that is quite so useful in introducing astronomy to Filipino students.


Stay tuned!

Sunday, March 14, 2010

Euler a compact computational software.

Euler is a computational software with a GUI for real and complex numbers and
matrices and is capable of interval arithmetic. It can visualize
functions in two and three dimensions.

Euler is quite compact and compares favorably in speed with other free
softwares in its class like Octave and Scipy.


The current version installed in my Ubuntu 9.10 Karmic Koala is at 1.61.0.
If you have a different version of Linux, it may be available as a package
or if you prefer to install from sources, is available at
http://euler.sourceforge.net.

When you invoke Euler from Applications/Science you wil be greeted with the
following screen which allows you enter commands.





Euler as a calculator
If you type an expression Euler will echo the computed answer unless you end the
expression with a semicolon.

For example, typing sin(pi) ended with the Enter key will print the answer 1. However,
sin(pi); will just be silent.


To be continued.

Saturday, March 13, 2010

Gretl part2 instant regression with built-in datasets.

Gretl comes with useful datasets and that includes datasets from standard textbooks! So teachers of Econometrics should have a single convenient source of econometrics data for expository purposes.

Let us select the djclose.gdt dataset by clicking on gretl/File/Open data/Sample file... and selecting the djclose (Dow Jones Industrial Average daily close).


Let us add data index variable for the data by clicking on Gretl/Add/Index variable. Gretl will then add the variable index.

Let us view the data. Click on gretl/View/Graph specified vars/X-Y scatter. Select the Index variable for X-axis variable and selcect djclose for Y-axis variable. When you click on the Ok button, the following graph will be displayed.



That is neat! The least squares line is drawn automatically. Right click inside the graph and save it to djclose.png.

Now lets see the standard output of regression of Gretl.
Click on gretl/Model/Ordinary Least Squares and a popup gretl:model 1 window will appear.
Select djclose for dependent variable, constant and index for independent variables and click Ok.
You should get the following output:



Model 1: OLS estimates using the 2528 observations 80/01/02-89/12/29
Dependent variable: djclose

coefficient std. error t-ratio p-value
-------------------------------------------------------
const 554.455 8.47987 65.38 0.0000 ***
index 0.751325 0.00580823 129.4 0.0000 ***

Mean dependent var 1504.506 S.D. dependent var 588.3432
Sum squared resid 1.15e+08 S.E. of regression 213.1174
R-squared 0.868839 Adjusted R-squared 0.868787
F(1, 2526) 16732.79 P-value(F) 0.000000
Log-likelihood −17140.82 Akaike criterion 34285.63
Schwarz criterion 34297.30 Hannan-Quinn 34289.87
rho 0.995548 Durbin-Watson 0.009046




That looks easy to do and it is! Look at the p-values for the const and index variables. This indicates that const and index are significant! Other numeric output measures are shown on the output above but we leave it to future posts to explain further.

We hope that Gretl becomes the standard free software for doing econometrics although this author feels that a Python version would be much more extensible. Gretl will inspire our own future Gui based econometris software written in Python.

Gretl -Gnu Regression, time series library

Gretl is an acronym for Gnu Regression,Econometrics and Time Series library.The home page is at
http://gretl.sourceforge.net/,

It is a complete cross-platform(Windows, Mac OS and Unix-Linux) desktop program with its own gui interface, is written natively in the fast machine code compilable C programming language.
It is is free, open-source software, freely distributable under the GNU General Public License (GPL) as published by the Free Software Foundation.


We have not enough time to discuss Gretl in our Econometrics course in the second semester, 2010 as we used and focused more on the the bigger and more general, powerful R statistical data and visualization software. Gretl available data sets were useful for us, especially making available the data sets of Gujarati.

Hopefully we would be better prepared and Gretl might find more usage by
presenting more educationsl resources in this blog and
our continuing experimentation with this software.

Lets see its features from its well written documentation:


  1. Easy intuitive interface in various European, Turkish languages including English.
  2. A wide variety of estimators: ordinary least squares, ML(maximum likelihood), GMM; single-equation and simulaneous equations system methods
  3. Time series methods: ARMA, GARCH, VARs and VECMs, unit-root and cointegration tests, etc.
  4. Limited dependent variables: logit, probit, tobit, interval regression, models for count and duration data, etc.
  5. Output models as LaTeX files, in tabular or equation format
  6. Integrated scripting language: enter commands either via the gui or via script
  7. Command loop structure for Monte Carlo simulations and iterative estimation procedures
  8. GUI controller for fine-tuning Gnuplot graphs
  9. Interface to GNU R, GNU Octave and Ox for further data analysis


Here is a list of built-in functions in Gretl. We are sure that this list would be growing.


$ahat $aic $bic $chisq $coeff
$compan $datatype $df $dwpval $ess
$Fstat $gmmcrit $h $hausman $hqc
$jalpha $jbeta $jvbeta $lnl $ncoeff
$nobs $nvars $pd $pvalue $rho
$rsq $sample $sargan $sigma $stderr
$stopwatch $sysA $sysB $sysGamma $T
$t1 $t2 $test $trsq $uhat
$unit $vcv $version $windows $xlist
$yhat

abs acos asin atan BFGSmax
bkfilt boxcox cdemean cdf cdiv
ceil cholesky cmult cnorm colnames
cols corr corrgm cos cov
critical cum det diag diff
dnorm dsort dummify eigengen eigensym
exp fdjac fft ffti filter
firstobs floor fracdiff gammafun genpois
getenv gini ginv hpfilt I
imaxc imaxr imhof iminc iminr
infnorm int inv invcdf invpd
islist isnull kfilter ksimul ksmooth
isseries isstring lags lastobs ldet
ldiff lincomb ljungbox lngamma log
log10 log2 lower lrvar makemask
max maxc maxr mcorr mcov
mcovg mean meanc meanr median
mexp min minc minr missing
misszero mlag mnormal mols movavg
mpols mread mshape msortby muniform
mwrite mxtab nelem nobs normal
nullspace obs obsnum ok onenorm
ones orthdev pdf pmax pmean
pmin pnobs polroots princomp psd
psdroot pvalue qform qnorm qrdecomp
quantile rank ranking randgen rcond
readfile replace resample round rows
sd sdc sdiff selifc selifr
seq sin sort sortby sqrt
sst strcmp strlen strncmp strstr
sum sumc sumr svd tan
toepsolv tolower tr transp trimr
uniform unvech upper urcpval values
var varname varnum vec vech
wmean wsd wvar xmax xmin
xpx zeromiss zeros




Gretl is available as an add-on package for the Ubuntu-Linux OS. You can instal it via synaptic or simply via apt-get:

apt-get install gretl


and all dependencies should be installed by the software package manager. In my 9.04 Karmic, It is installed in Applications/Other menu.


March 13: To be continued with examples!

Welcome to Free Software Explorations!

I am starting a new blog hosted by blogger.com. This will complement my other blog at dr-adorio-adventures.blogger.com This blog will focus on the effective use of free software (not just open source) where there is no payment for the use of the software.

You might be surprised that free software exists for a broad range of applications in various fields: scientific, academic and commercial use. A catalog of free software might list more than 4000 entries. So we will never run out of topics to write.

This educational blog will include instructions for installation, tutorials and special tips and techniques.

Stay tuned! We will start adding posts this week!