giovedì 26 settembre 2013

Incremental backups using rsync

The following is a command to easily do incremental backups in linux using rsync:

sudo rsync --delete -azvv /source_path /destination_path

using the --delete options, files no longer present in the source will be deleted also in the destination path.

-a: recursively mode
-z: compression mode
-vv: verbosity mode

venerdì 23 agosto 2013

What if axis labels fall outside margins in python?

Just increase the size of the figure by adding this little piece of code:

fig = plt.figure(num=None, facecolor='w', edgecolor='k', figsize=(x size, y size))


venerdì 14 dicembre 2012

How to incorporate plots in python shell

With IPythonQt is possible to have plots directly inside the shell.

This is the command and the proper flags:
ipython qtconsole --pylab=inline








lunedì 3 dicembre 2012

Fonts missing in latex plots

In Ubuntu 12.10 (and possibly also other linux distributions), plots included into latex documents may not have fonts displayed correctly.
The problem seems to be due to some conflict in font settings.
To solve this, just use the flag -j0 in dvips. In the following the correct compiling procedure:

latex file.tex
dvips -j0 file.dvi
ps2pdf file.ps

martedì 7 febbraio 2012

Latex compilation error "This NFSS system isn't set up properly" in Temaker under Ubuntu 11.10

The latex compilation fails returning this error:
"This NFSS system isn't set up properly. "
and in the case of a math formula:
Math formula deleted: Insufficient symbol fonts.

SOLUTION:
install the following package:
texlive
and its dependencies:
telive-fonts-recommended
texlive-latex-base






venerdì 27 gennaio 2012

Fors is born


Finally, after finishing my PhD, I decided to put down in code some idea writing FORS, a python control software designed to be easily integrated into the currently operated and the future adaptive optics systems.

The software includes and summarizes some of the main features, tested using numerical modeling and simulations during the last 4 years, to increase the performance of the MCAO systems for the next generation 4m class solar telescopes.

Coding the software I have experienced many problems and difficulties in particular with the GUI library with sometimes is not well documented.
All in all, at the end of the day, I acquired new skills and I would like (in the next days) to describe through the pages of this blog how to build a GUI in python.






sabato 29 ottobre 2011

A highly integrated GMail notifier in Ubuntu 11.10

Thanks to Alexander Hungenberg we can have a simple and highly integrated GMail Notifier in Ubuntu 11.10. The picture above is self-explaining. This little tool is written in Python and uses the OSD notifications system.  
The installation is simple as usual in Ubuntu:

sudo apt-get install gm-notify

or search for gm-notify in the Ubuntu software center. After the installation use gm-notify-config to configure your account.