Skip to content
Matt Newville edited this page Nov 1, 2015 · 3 revisions

Larch NSF Proposal

Larch Overview

Larch was originally designed as IFeffit2 for XAFS Analysis, with the goals of providing a richer programming environment, being able to extend to more data analysis needs, and being easier to maintain and extend to other needs for processing, visualizing, and analyzing synchrotron X-ray data.

Larch is written in Python, makes heavy use of existing libraries (numpy, scipy, matplotlib, etc) and the wide community of synchrotron using python. Like Ifeffit, Larch provides end-users with an interactive "session" using a fully-featured domain-specific-language (dsl) with a wide range of functions for processing and analyzing X-ray spectroscopy data. In this sense, it is somewhat like "Spec for Analysis", and does not require the end-user to follow all of the rules of Python programming. Of course, for those who know and want to use Python, Larch can be used directly without this built-in dsl. Even within the dsl, any available Python module can be imported, making it an easy way to explore and interact with data.

Larch uses a "plugin" system to make it easy to add functionality to the basic framework. This allows new features to be added and existing algorithms to be altered and explored without changing the rest of the functionality, and for these changes to be done by end-users.

Currently, Larch has full capabilities for EXAFS analysis (though I'm sure more things could be added), data plotting and visualization routines, basic mathematical tools, and non-linear least-squares fitting capabilities. There are some capabilities for visualizing and interacting with X-ray Fluorescence data and X-ray Fluorescence maps, and some capabilities for dealing with X-ray reflectivity and standing-wave data. It can also interact with the Epics control system, and is being used at the GSECARS microprobe as the "macro language" for data collection.

Larch provides several GUI interfaces (a basic shell, a Map Viewer for GSECARS XRF maps, and a Data Viewer for basic ASCII files including XAFS Data). Currently, all these GUIs are built with the wx GUI toolkit.

Proposal Items and Goals

The NSF Proposal identifies three key tasks for adding capabilities into Larch to better integrate different X-ray spectroscopy and scattering methods:

  1. Improved EXAFS analysis methods:
    • a) incorporation of Feff8.5 for EXAFS into Larch.
    • b) improved XANES fitting (pre-edge peaks and/or sums of spectral components)
  2. Robust and automated Quantitative X-ray Fluorescence Analysis, as available in PyMca, MAPS, or GeoPIXE.
  3. Automated Phase Identification and Pattern matching for powder diffraction data.

Each of these is a fairly large task and they independent of one another. But we think each is actually manageable. At this writing, the first two have been started but need work, including some design work and advice from the community. With Przemek Dera, we think the third task will largely be a translation from existing IDL code to Python.

The proposal calls for hiring two junior software engineers to help with this effort. The original idea was to have on working on Item 2 and the other on Item 3 with me doing much of the work for Item 1. Thankfully, Bruce Ravel has done much of 1a (Feff85) already.

We also need help with basic data visualization tools and distribution and deployment. So, the exact details of what is to be done is still sort of up in the air.

Clone this wiki locally