Jan 202012
 

iRoot is a product of the India-based Neutrino Observatory collaboration lead by Prof.Naba Mondal at the Tata Institute of Fundamental Research.
It is a simple plotting and analysis tool based on the popular ROOT from CERN and is primarily intended for analysis using the TTree structures in ROOT. iRoot is supported by a user-friendly GUI designed using Qt.
If your data is stored in TTree stuctures and you want to perform simple analysis with your data without writing any piece of code, iRoot is for you. It has GUI interfaces for most of the jobs that one is most likely to perform with TTree data. Fitting, analysis with PROOF, converting TTree data to ASCII, uploading plots to the cloud etc., are some attractive features to mention.

Jan 112012
 

If you have an SQLite database file and want to check its structure (programmatically)

SELECT * FROM sqlite_master;

To do this via Python as simple as possible, run:

conn = sqlite3.connect("your/database.sqlite")
c = conn.cursor()
c.execute('SELECT * FROM sqlite_master;')
for row in self.cursor:
    print row

Resources

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Dec 112011
 

This is an iMacros script to extract transaction details on the online banking website of the German branch of the bank ING-DiBa. As this is mostly interesting to Germans, the following blog post is in German. If you want to read it in English, consider translating it using Google Translate.

Sep 172011
 

I do not particulary like SVN but sometimes I have to use it. The diff output on the Mac OS X command line usually is not colored which is annoying. The solution is to tell SVN it should use colordiff instead. You can easily install colordiff using homebrew:

brew install colordiff

Then change your SVN configuration to use colordiff using vi ~/.subversion/config; add the following line:

diff-cmd = colordiff

Then a svn diff should be colored (with ugly colours). To change this, run vi ~/.colordiffrc to set up your colordiff preferences and enter the following setup:

Sep 062011
 

With FUSE – The Filesystem in Userspace you can mount all different kinds of remote / local filesystems on you Linux/Unix/Mac computer. Here are some implementations of interesting FUSE filesystems:

Official List of FUSE filesystems: http://sourceforge.net/apps/mediawiki/fuse/index.php?title=FileSystems

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Aug 272011
 

ezyfit can prevent you from buying the Curve Fitting Tool that Matlab does not come with by default. This is how I use it to fit data according to a \sin(2 \theta)^2 function :

x=15:45
y = 30 + 40 * sin( (2*x) * pi / 180 ).^2 + 5*(rand(1, length(x)) - .5)
f = ezfit(x,y,'I(theta) = dC + I_0 * sin( (2 * theta) * pi / 180 )^2');
clf
plot(x,y,'r*');
showfit(f)
dispeqfit(f)

Custom functions can be defined and reused (to speed up) as follows:

Aug 252011
 

There seem to be quite a lot of problems with 16-bit grey scale TIFF images (especially with the Python Imaging Library – PIL). If you can, you may want to use FITS instead of TIFF. There are good and up-to-date libraries for Python: PyFITS.

For me, however, the FreeImage library works great to read 16bit TIFF images.

About the TIFF Format

Every TIFF begins with a 2-byte indicator of byte order: 0x490x49 (“II”) for little-endian Intel style and 0x4d0x4d (“MM”) for big-endian Motorola style byte order. More common is the Intel style.

Aug 252011
 

Hub is a useful extension to make git GitHub aware.

catch lines:

hub introduces git to GitHub
and
hub teaches git about GitHub

Installation

brew install hub

Usage

See hub’s webpage for introductory examples and its man page for further reference.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Aug 232011
 

MacFSEvents is an up-to-date solution to monitor directories for changes on Mac OS X when using the scripting language Python. It is a binding to FSEvents, Mac OS X’s filesystem monitoring framework.

Install MacFSEvents

pip install macfsevents

Quickstart

from fsevents import Observer, Stream

def file_event_callback(event):
    """This is the function being called when an event on a file is detected."""
    print "Mask: %s, Cookie: %s, Name: %s" % (event.mask, event.cookie, event.name)

observer = Observer()
observer.start()
stream = Stream(file_event_callback, '/Users/', file_events=True)
observer.schedule(stream)

### Watch how your callback function is being called when files in the /Users dir are changed

# Before your Python program exits, you must stop the observer:
observer.unschedule(stream)
observer.stop()