PyTrA

I have recently written a small program called PyTrA for analyzing data at the Photon Factory at the University of Auckland. The main goals of the program were to to read in data from the Photon Factory software and analyze the time-resolved signals. What it can do so far;

  • Import data from the Photon Factory and Ohio State University Center for Chemical and Biophysical Dynamics (CCBD).
  • Fix for dispersion (chirp) via polynomial fitting and linear interpolation.
  • Fit single traces using pymodelfit.
  • Singular value decomposition and reform the spectra of those values.
  • Global fitting interface with Igor Pro using win32com (In mac or unix traces saved to folder).
  • Visualisation using MayaVI and matplotlib.
  • Can export as an csv or time explicit format for analysis in Glotaran or TIMP.
  • Basic help window.

I used many different libraries to get the program working thanks to the people that put them together. The GUI is built using TraitsUI provided by Enthought. The fitting is done using pymodelfit which is a model-fitting framework and GUI developed by Erik J Tollerud in TraitsUI using Chaco. Matplotlib and MayaVi provides beautifully rendered figures.

I have released the python scripts online at https://sourceforge.net/projects/pytra as an open source distribution. The program is written for python 2.7

The dependencies for PyTrA are;

All of these can be downloaded in the great precompiled python distribution from Enthought for academics.

  • Traits
  • TraitsUI
  • Scipy
  • Numpy
  • Matplotlib
  • MayaVi

These need to be installed separately;

  • Pymodelfit
  • Setuptools only for windows this sets up the connection with Igor Pro in windows. In other operating systems it just prints out a file into the directory the file was imported from.

Please have a look and tell me if you find any bugs. This is my first bit of coding in python so I would appreciate any advice or helpful additions to the software.

The most exciting part of the project has been the spectral decomposition using singular value decomposition and then reforming the matrices into 2D images which are more easily interpreted.

SVD of trans-Stilbene showing the separation of different components.

Download the program at Sourceforge

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *