SixPACK

Sam's Interface for XAS Package, or SixPACK for short, is the unification of the  previously named SamXAS and SamView programs into a single analysis package.  Thus the package can guide the user through data averaging and calibration, background removal, and many aspects of fitting.  The interface builds on Matt Newville's IFEFFIT engine.  It contains six basic modules:

·         SamView - an interface for averaging, calibrating, and deadtime correcting raw data

·         Background subtraction of data to create normalized mu(E) and chi(k) functions

·         A FEFF periodic table interface to create single scattering phase and amplitude paths - Now compatible with FEFF6 through FEFF8.

·         A GUI for the fitting of experimental EXAFS to theoretically derived phase and amplitude files

·         A GUI for linear combination fitting of EXAFS or XANES to experimentally obtained reference spectra

·         A principal component analysis routine that decomposes data into a set of orthogonal components.  Also features a target transformation feature to check if potential reference spectra are in the component space defined by the samples.

The SamView module is a general purpose XAS data preprocessing program.  It reads raw data collected from a beamline and allows the user to view raw data, average scans, calibrate energy, and perform deadtime corrections for solid state detectors.  Current data formats supported at this time are: 

·         SSRL XAScollect binaries

·         SSRL XAScollect ASCII files

·         DND-CAT quick-scanning XAS binary files

·         DND-CAT ASCII files from step XAS scans

·         DND-CAT ASCII files from multi-element detectors

·         GSE-CARS single and multi-element detectors

·         PNC-CAT simple format

·         SRC multi-element detector format

·         ALS beamline 10.3.2

·         NSLS beamlines X-11A, X-23A2 and X-23B

·         NSLS BSIF binary format for X26A 1-D data

·         Generic ASCII format for other formats

Future ability to include other formats is planned, including possible plug-in type support.  A generic ASCII file loader is provided to accommodate other file formats.  The background subtraction module adds the ability to perform the subtraction of gaussian type pre-edge removal to the standard complements of background removal and spline fitting.  The gaussian method is a useful approach to remove the scattering contributions of low concentration samples collected with solid-state detectors.  A special feature of the XANES fitting routine is the ability to make corrections for self-absorbance to spectra obtained using fluorescence yield detectors (i.e. Lytle cells or Ge solid state arrays).  The program is still in its early stages of development, but all questions and particularly comments for improvement are welcomed.  Screenshots of the program and its modules are now online, albeit quite outdated at the current time.

Documentation:

Documentation has now arrived!  It is still in a early draft.  Any comments to improve clarity are welcomed.

View the HTML documentation.  

Download HTML documentation in a .zip file.

Coming Soon:  Tutorials!  New documentation to reflect recent improvements (badly needed)!

 

Downloads:

At this point downloads of SixPACK are in the form of Win32 executables (tested on Win2000 and WinXP).  Source code in Python source for Linux, Mac or Unix machines is located here.  As of now, it is still relatively untested on non-win platforms.  Any feedback on the use of the code on other platforms is greatly appreciated.

  • Download Windows executable in .zip file. 

A nice installer for the IFEFFIT package is given at Matt Newville's site.  If this installation route is chosen, copy the executable from the above zip file over the IFEFFIT installed version to update to the latest version.  Versions from 8/02/02 to 12/31/02 will also need to place the xbm folder, mnexafsfit.iff and sixpack.gif files inside the sixpack folder in the IFEFFIT directory in order to run properly.  This fix should not be needed with versions after 0.33.  New files to include while updating since the last IFEFFIT installer was created include _socket.pyd and test.inp.  These should both be in the same directory as the executable.

SixPACK is Open Source Software.  See a copy of the license here.

 

Credits:

The interface portions of SixPACK and the SamView module were developed by Sam Webb at SSRL, the Stanford Synchrotron Radiation Laboratory.  IFEFFIT was developed by Matt Newville at CARS, the Consortium for Advanced Radiation Sources, at The University of Chicago.  Special credit also belongs to Bruce Ravel for his "Ravelware" programs, many of which have inspired some of the look and feel of the SixPACK modules.  EXAFS self-absorption correction routines based on code from Corwin Booth.

 

Change List:

8/28/09: Version 0.66:  Missed a few numbers there in versions in the official release.  Few updatres: Added an r-factor for least squares fitting.  It is simply the sum of the square of the residuals divided by the sum of the squares of the dataset.  Updated file import formats that needed new versions.  Added a “MatrixFit” least squares fitting – will calculate the least squares fit of all possible permutations of the selected component list. Returns a new window with a list of the fit permutations and their r-factor quality of fit.  Added a “check all” and “check none” option in the background subtraction routine.  Default in PCA is now to NOT select all the components after the calculation.  SamView has option to save each file opened as an individual average file – good for large numbers of microprobe XANES data.

3/07/08: Version 0.63:  Minor update to correct some errors with Tix file windows crashing the plotter.

10/29/07: Version 0.62:  Minor update to correct comment format for new SSRL ASCII files.

9/08/07: Version 0.61:  Minor update to correct auto-format reader for NSLS multi-element detectors.  Removed links to old defunct websites on startup to shorten the delay on starting the program.

6/14/07: Version 0.60:  Minor update to correct for PC based SSRL data files. Also updated the version of Tix parameters os that the screen sizes and widgets are smaller.

1/30/07: Version 0.59:  Minor update to properly read most current file formats from GSE-CARS at APS.

1/24/07: Version 0.58:  Added a support of the new PC based SSRL binary format. Better selection of multiple SCAs in some data formats. Indicator bar in the FEFF fitting routine to show when FEFFIT is working. Added a pulldown menu for selecting files to plot in the background subtraction routine.

5/24/06: Version 0.57:  Fixed a few minor bugs in the startup sequence and fixed an error in the plotter routines which cause an error to be raised.

5/22/06: Version 0.56: Fixed a few bugs found in Linux installations from the source code.  Added a few improvements to the data importer of SamView for several data formats.  Added a few missing files that were vacant from the last release.

2/27/06: Version 0.55: Fixed bug from IFEFFIT upgrade and missing .dll from very latest update.  Many changes since I've been so slow on updating.  Highlights include… Upgraded the IFEFFIT version to 1.2.8. Added upper and lower limits on deadtime regions, fixed problems with averaging/truncating files with different lengths, added gain adjustment for averaging files under different amplifier conditions.  Reads recent changes to SSRL file formats correctly.  Background removal now passes all pred-edge and post-edge variables correctly to IFEFFIT.  Added capability to set variables in EXAFS fitting as restraint variables (toggle switch).  Command line interface to IFEFFIT added under Help menus.

8/26/04: Version 0.52:  Bugfix in EXAFS fitting module regarding calculation of residuals.  Also completed the save components menubar item in PCA. 

8/24/04: Version 0.51:  Note logo changes to splash screen and icons.  Upgraded IFEFFIT version distributed with Sixpack to 1.2.6.  Added the NSLS BSIF binary 1-D format for beamline X26A.  SamView now supports averaging files of different lengths, with option for truncation or merging of entire data lengths.  Files must still have the same initial energy spacings to work properly.  Users with small screens may double click on cursor readout to raise a popup cursor position window.  Background subtraction routine has mu option to shift energy positions.  PCA routine now has 5 significant digits in the IND function display.  EXAFS fitting routine has option to display the k-space residuals in the plot window.

3/24/04: Version 0.50:  Fixed 'apply to all' bug in the auto-read of multiple fluorescence detectors in the SSRL data format readers.  Added menu item to apply current selected active fluorescence channels to all data files.  Added a results summary window in the background subtraction routine to permit easy copying of parameters to word prcessors for note taking.

3/7/04: Version 0.49:  Added auto-read formats for PNC-CAT and SRC beamlines.  Upgraded IFEFFIT version distributed with Sixpack to 1.2.5.

12/16/03: Version 0.48:  Added capability to perform self-absorption corrections to EXAFS data, given a known sample composition.  This functionality was based from the code of Corwin Booth.  Also included in the source code distribution is a Python native version of mucal.  Additional changes made to the quick-XAS loading format from DND-CAT to more easily support variable data formats. 

8/20/03: Version 0.47:  Upgraded the SixPACK distribution to version 1.2.1 of IFEFFIT.  NEW:  Added ability to cut data from any graph in SixPACK and paste it as tab delimited text onto the clipboard.  This text can then be pasted into any spreadsheet or graphing utility.  Greatly enhances data transfer out of SixPACK.  Added "Plot Paths" in the EXAFS fitting module which allows the user to plot the contributions from all of the FEFF paths in the fit.  Added sort capability to enable reorder of the fit variables.  Also fixed a few aesthetic issues.  

7/27/03: Version 0.46:  Fixed a few errors and added features.  Fixed the stack problem with the remove variable button and fixed errors in the e0 finder.  Added an error checker in the SSRL format to trap from binary files that have been corrupted by ASCII transfers.  Added a computation for step height in the background subtraction routine.  Updated the least-squares report page to contain all pertinent values.  Added a default text in the "label" category in EXAFS fitting to prevent IFEFFIT hangups.  

7/20/03: Version 0.452: Small change to add compatibility for changes in GSE-CARS format

7/14/03: Version 0.451:  Small change to fix a text error in the varimax routine.

7/12/03: Version 0.45:  MANY new changes.  Thanks to all of those who have added valuable input!

  • Fitting reports both chi-square and reduced chi-square
  • Added "remove variable" option in EXAFS fitter
  • Fixed error in log function in least squares fitting routine
  • Added a global search and replace for FEFF paths to facilitate modifying path definitions.  Useful when transftering workspaces between computers
  • Fixed broken library in PCA routine
  • Added varimax rotation to PCA routine
  • Report after performing target transforms on library in PCA is properly formatted
  • Default directories can be chosen in 'File' menus
  • Background subtraction routine has a linear post edge fitting option for L-edge spectroscopy
  • Added functionality to plot FT window parameters in k-space with data
  • Added ability to control number of spline knots in background subtraction
  • Fixed improper file name convention warnings
  • Added ability to apply ROI/detector choices to all files loaded in a series
  • Adjusted GSECARS auto-format to recognize non-adjacent ROIs.  Also fixed error that occured with slight alterations in the file format 

3/21/03: Version 0.43:  Added arctan function to the least squares fitting module.  Background subtraction routine now allows saving a first derivative of the normalized mu.  Added warnings for characters in filenames that may be incompatible with IFEFFIT.  Also fixed the GSE-CARS format to allow more general input with multiple ROIs.

2/13/03: Version 0.42:  Fixed a few bugs in the FEFF fitting routines to allow path degeneracies to be handled better. 

2/08/03:  Version 0.41:  Made a permanent fix for the input problems for recent files at SSRL BL 11-2.  Fixed the occansional occurrence of the chi plots not plotting.  Made a hack fix for some of the data scrambling that occurred when changing spline ranges in the background subtraction routine.  Be sure to update Sixpack with _socket.pyd file and ensure that test.inp is in the same directory as the executable. 

2/05/03:  Version 0.40:  Fixed a file input problem with recent files collected at SSRL BL 11-2.  Also fixed a small plotting error.  

2/04/03:  Version 0.39:  Added a version checker to the program.  A status bar at the bottom of the main screen lets the user know if they have the most recent version of Sixpack or if they need to update.  Also fixed some file storage errors in the least squares fitting routines.  Added a library function to PCA.  Users can define libraries of standard compounds.  After PCA is performed, all of the files in the library will be "target transformed" to see if they fit in the vector space defined by the samples.

2/02/03: Version 0.38:  Fixed minor error in fitting routine which would not plot all components of a fit in the waterfall plotting function.  Also added a "self-absorption" cycle which will run the routines 10 times so you don't get excessively tired clicking the fit buttons.  

1/24/03:  Version 0.37:  Incorporated the new IFEFFIT 1.0076.  Added higher compatibility with GSE-CARS formats.  Allowed user selection of Lytle vs. Ge detectors in SSRL data files that contain both sets of data.  Also added a "history" function to the generic file loader so the options and column assignments are remembered between file inputs. 

1/23/03:  Version 0.36:  Added additional auto-read formats for ALS and NSLS for single fluorescence detectors.  Made the SSRL auto format more general to support varied detector formats.  Abandoned use of PGPLOT to plot graphics and results.  New plotter interface native with Tkinter to provide more effective cursor readouts and zoom functions.  Also allows the plot window to be closed and further graphs to be created without crashing main program.  Users can no longer cut and paste graphs from clipboard.  However, graphs can be dumped to a gif file and imported into the document of choice.  All plot interfaces in modules have a zoom history.  Left click to drag new zoom view and right click to previous view.  Documentation is now severely outdated!

1/21/03:  Version 0.35:  Many changes.  Added a deglitching panel to the background subtraction panel due to popular demand.  This allows basic editing of glitches.  Fixed problems with changes in plot parameters not taking effect in this module as well.  Added a GSE-CARS auto-read format for SamView (still preliminary).  Added a zoom history to the SamView and PCA modules.  Left click controls zooming in, and a right click goes back to the last zoom.  Also changed least-squares fitting routine to auto-fill the x-limits if none are provided.  Fixed a small error in the self-absorption correction routine that didn't work in the upgrade of the module in version 0.33.  Cleaned up some of the source code as well.  A new zip for the source is now present.

1/16/03:  Version 0.34:  Fixed memory leakage bug when calculating mu in the background subtraction routine.  Also added an option to turn off grid interpolation in the least squares fitting routine.  A necessary option when attempting to fit non-XAS data.

1/02/03:  Version 0.33:  About screen now shows proper version!  Added dialog to show comments from SSRL files.  Also changed the look and feel of the least-squares fitting routine.  Can now use an unlimited number of component and function files.  Added many functions other a simple linear function.  Can allow variables in the functional expressions to be guessed or fixed.  The GUI now matches the look and feel of the other modules.  Fixed the install problems when used with the IFEFFIT installer.  Documentation and screenshots to be updated soon!

12/15/02: Version 0.32:  Fixed some minor bugs.  Changed the weighting distribution on the PCA routine and added evaluation functions from Malinkowski's papers.  Added a few SSRL detector specific corrections.

10/23/02:  Version 0.31:  Fixed minor bug to display fitting correlations in EXAFS fitting module.  Documentation and screenshots are now available!

10/16/02:  Version 0.30:  Changes in this list now in reverse chronological order.  Another major update!  Main feature is addition of PCA routine.  It's pretty handy.  Also added scrollable windows for the SamView and PCA module for those who have smaller screens.  Thanks to Francois Farges for pointing this out a while ago - I finally got to fixing it.  Added a row of null radiobuttons in the generic loader so you don't need to start over if you make a mistake.  Sources also updated.

10/10/02:  Version 0.25:  Its been too long before updating...  Many additions!  Thanks to many people for added feedback.  Added support to rebin CS-XAS data in SamView module.  Added generic file reader with scrolling windows.  Small improvements on some of the interface controls, including some hiding of unnecessary windows building up.  Also added window to display fit correlations in advanced fitting.   Added extra file support for DND-CAT data files, including compatibility with ID line EXAFS and multi-element detectors.  The file extensions of these data types are also also recognized:  *.dnd = ascii and CS-XAS, *.dme = multi-element.  Source codes also appropriately updated.

8/11/02: Version 0.22:  Added dialog window to present fit variable correlations.

8/02/02: Version 0.21:  Added support to read in generic ASCII files as raw data with assignment of data columns.  Also made e0 calibration in SamView module more robust and easier to choose calibration point.  Improved performance of background subtraction routine to reduce unnecessary calculations.  Included support for writing FEFF input files compatible with older versions of FEFF.

7/16/02:  Fixed errors in single file read in background subtraction function.  Also fixed bug that showed up when performing deadtime fits on Ge detectors which have bad channels.  Errors in fitting now cause a default value to created.  Added these changes to the source code as well

7/9/02:  First release version of SixPACK (v0.2) incorporating the 0.11 version of SamView and 2.3.1 version of SamXAS.

 

 

Locations of visitors to this page