Sunday, 10 February 2013

PyTrA: New release Global fitting and MCMC

New release of PyTrA that will hopefully make it easier to analyze Transient Absorption TrA data. Most exciting additions bayesian data analysis markov chain monte carlo MCMC through pymc and Global fitting multiple traces using scipy optimize fmin   Have a look at what TrA is being used for in the photon factory in this post. The first release can be seen in this post.

New additions

Preprocessing
  • Shift time zero
  • Delete spectrum/traces now removes and reforms matrix
  • Log file tab which allows for much better access to the data and fit 

Analysis
  • Evolving factor analysis which performs SVD analysis on a growing data matrices and plots the singular values of the first 3 SV as a function of rows/columns added. This allows for information about possible mixing and when a component actually begins to appear.
  • Single trace fitting now prints out the variance of the parameters from pymodelfit.
  • Markov Chain Monte Carlo MCMC through the pymc library can be used to apply physical knowledge of the parameters by deciding the priors (distribution where the sampler will look for parameter values) either Uniform, Normal or Poisson. A histogram of the most stable solutions is built up with a mean and an associated error.
  • Global fitting is now accomplished using pymodelfit and scipy.optimise fmin method which minimizes the chi2 value while linking parameters such as the lifetime and allowing the unlinked parameters to fit the trace at that wavelength.

Visualisation
  • 2D raw data plot which plots the matrix with indexes.
  • 3D plot can now scale z-axis.
  • Multiple traces/spectra can be viewed with either averaged or normalized line plots.

All of the software is freely available just email me for a copy (nzjakemartin@gmail. com).

To update you will need the pymc library as well as

I will add a post in soon about how MCMC can be applied to Transient Absorption data.

Here is the presentation and poster that I presented at AMN-6 and a paper is currently being written for the conference proceedings.


def python_code(self):
    so does it work well = 25

No comments:

Post a Comment