A open source library for the analysis of large small-angle X-ray scattering (SAXS) data sets is currently under development in Python language.

 

PySAXSLib:

Python library for the analysis of large small-angle X-ray scattering (SAXS) data sets.

What is PySAXSLib ?

Easy: Py(thon)-SAXS-Lib(rary) ! Still not clear ? OK, then let's be a bit more precise:

1- Python is an open source, high level, object-oriented, programming language. Since I'm not a programmer, I'll rephrase this with my own words: Python is a relatively accessible (even I can use it !) programming language because of its simple and compact syntax. You can define objects (e.g. 2D images, 1D data) with methods (integrate, reduce, fit...) which makes the coding very simple. The core of Python is coded in C, I think, which makes it quite fast and the best is that you needn't worry about this because it is automatically compiled at run-time ! Most importantly, at least in my view, is that Python is open source, which means that you can use it and modify it freely as you please. This is the best way to build a collaborative project which also means that your stuff is less likely to be forgotten or re-written in a medium-long term as opposed to many softwares which are abandoned when no longer maintained or when doesn't fit your needs any more...

2- SAXS stands for small-angle X-ray scattering. This technique allows to derive structural information at the nanoscale of objects in a matrix providing there is sufficient contrast in electron density between the two. Typical examples include proteins in solutions, pores or inclusions in metals, ceramics or glasses etc. There is an abundant literature describing how to analyze SAXS data, building on theories developed since the 1950s or so.

3- Library simply means a collection of small programmes, each written for a specific purpose. PySAXSLib includes a main module dedicated for typical SAXS operations and other modules for fitting, plotting, file and data handling etc. Of course, all the modules can be used independently.

The library currently developed can be used either as a standalone programme using a python shell or as a plugin for more general software including GUIs. 

What ISN'T PySAXSLib ?

As already mentioned, the theory of SAXS analysis is well established. Therefore, many softwares are now available to deal with the data analysis. PySAXSLib is developed for a specific purpose: the analysis of very large data sets, typically > 10^3 frames. In such cases, the analysis has to be considerably simplified for efficiency and practical reasons. Hence, the main goal of PySAXSLib is to develop routines to derive simple parameters such as correlation lengths, anisotropy coefficient, orientation, general shape etc... This excludes all analysis involving intensive modelling such as in solution scattering experiments. Although this library is fairly generic, the main developments are directed towards studies of biological tissues.

Typical use of PySAXSLib

Large data sets are typically generated in scanning SAXS experiments using microfocus synchrotron sources, where a sample is rastered in a beam much smaller than the region of interest. A recent paper discribing such procedure and analytical details is described here. Other applications include real-time studies where the variation of a physical or chemical parameter induces a change in structure (temperature, pressure, pH etc.). All these experiments result in stacks or 2D or 1D data which are reduced to scalars (structural parameters). This is precisely what PySAXSLib is used for.

back to top

FAQ:

How can I get PySAXSLib ?

PySAXSLib is now under the final stages of development for a first release expected in December 2009. I am currently writting up some basic documentation and testing the library under various platforms. I therefore cannot distribute it right now, but please send me an email (aurelien.gourrier@yahoo.fr) if you want to be informed in due time.

What other libraries are used in PySAXSLib ?

Aside from the main Python installation, PySAXSLib essentially uses Numpy for array handling, SciPy for various scientific calculations, MPFIT for fitting (there are many advantages in using mpfit instead of the SciPy fitting routine, amongst which the ability to constrain some parameters, fix limits etc.; the main disadvantage, in my view, is the relative lack of documentation and examples) and matplotlib for plotting.

back to top