SMAK

Sam's Microprobe Analysis Kit, or SMAK for short, is the beginning of a imaging toolkit for x-ray microprobes.  It contains the basic functions for:

·         Importing ASCII fluorescence data and displaying as an image

·         Support for several colormaps and displays of scale legends

·         Ability to perform math operations on data channels, including basic addition, subtraction, multiplication, division, as well as smoothing and derivatives.

·         Production of correlation plots, with the ability to make arbitrary masks for regions of particular interest.

·         Display of tricolor RGB plots, with a selected channel representing a color.

·         Ability to combine data channels from multiple files.

·         Display of raw data from image by selecting data pixels, producing a line plot in x and y directions.

·         Recall of MCA data if data was saved at collection time. Ability to rebin data to capture missed peaks.

·         Pricipal component analysis routines on MCA data. Components can be saved back to image maps. Preliminary routine for using PCA to do EXAFS included as well.

·         XANES imaging fitting routine to do linear least squares regressions given maps performed at several energies. User enters matrix of standards and gets the fitted proportions as a function of location on the sample.

Data formats from several microprobes have are supported, with more on the way. Current data formats supported at this time are: 

·         SSRL Microscan files

·         SSRL SCANE ASCII files (format for saved files)

·         SSRL MGScan ASCII files

·         SSRL Super grid files

·         GSE-CARS files

·         PNC-CAT files

·         MRCAT files

·         ALS beamline 10.3.2 files

·         RGB files from Diamond

·         JPG, TIFF, GIF, BMP image formats

Future ability to include other formats is planned, including possible plug-in type support.  A generic ASCII file loader to accommodate other file formats may be provided in the future.  The program is still in its VERY early stages of development, but all questions and particularly comments for improvement are welcomed.  

Documentation:

Hopefully Coming Soon: 

Downloads:

At this point downloads of SMAK are in the form of Win32 executables (tested on WinXP).  Source code in Python source for Linux, Mac or Unix machines will be provided soon, although some of the image capture features appear to be Win dependent from the Python Imaging Library.  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.

 

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

 

Credits:

The interface portions of SMAK were developed by Sam Webb at SSRL, the Stanford Synchrotron Radiation Laboratory.  Thanks to Graham George for developing the SCANE program for imaging at SSRL and to Martin George for enormous computing and programming support.

 

Change List:

09/21/09: Same version, but fixed an error with the new colormaps data file.

08/28/09: Version 0.50: Many updates again!  Added expanded colormaps to plot displays.  Added the ability to place “markers” (i.e. square, circles, text) at given coordinates.  These can be saved etc.  Useful for marking where XAS points, etc were measured.  Fixed issues with multiple zooms in the view.  SMAK can now write a SIXPACK deadtime file.  Fixed issues with correlation plots when deadtime corrections are being made.  Can save image as hi-res TIFF.  Can do a “remove edges” function from the display window (right click) to remove the edge from the display.  Good for quantification summaries.  Can also display side scale axes (cannot be saved yet).  MCA over a selected region can now be chosen as a sum (as it used to be) or the average (divides by the number of points).  PCA can now be done on individual channels (the new default) rather than MCA spectra.  Great for multiple energy maps.  Fixed errors present in the tomography backprojection filters.  Whew.  Will add support for auto-reading ICP-MS inputs in next release.

04/15/09: Version 0.47: Many updates. Added a non-negative least squares fitting routine for the XANES imaging/fitting routine.  Actually added two.  The first one “A” should be the most efficient.  Added a stereo-image maker.  Fixed additional errors in ALS format with the addition of the subtitle field.  Fixed issues with jpg saves of the display without the scalebar present.  Added abilities to “stitch” images together.  Added a deadtime math operation.  Fixed many of the issues with underscores in channel names – best to avoid them however if you want to make tricolor plots!  Added ability to create data files from the saved MCA data.  Can also import XRD data created from the ADM saved integration format.  More to come of course, but these will do for a while!

03/03/09: Version 0.46: Bux fixes for some of the large file format issues.  Added support for APS MRCAT files.

02/04/09: Version 0.45: Big jump in revision number for “official” posting, since there were several small unofficial releases.  Added better support for large files and the ability to read MCAs etc for large file formats.  Fixed some issues with the display of large files (again!).  Support added for deconvolving beam size from the data.  Error analysis added.  Support for RGB files from Diamond added.  Probably a few other things too.  More updates coming soon as well!

04/28/08: Version 0.39: Few minor bug fixes.  Fixed issues with screen sizes of images (again).  Added new support for tomography!

01/25/08: Version 0.38: Few minor bug fixes.  Also added feature which warns users that unsaved work is present and should be saved before closing files or the program.

10/25/07: Version 0.37:  Added the proper HDF tools and DLLs for HDF support of BL6-2 and NSLS files.  Also added preliminary support for TXM files from SSRL BL6-2.

9/08/07: Version 0.36:  Added support for SSRL BL6-2 super data files.  Scale bars now user moveable.  Fixed apparent issues in the PCA analysis with large files.  Probably a few things I’m forgetting too…

6/27/07: Version 0.34:  Fixed an issue with the scale bar not saving in the tricolor plots.  

6/18/07: Version 0.33:  Fixed a reported bug with the sum MCA area functionality. Also upgraded many of the DLLs so that the displays are better (hopefully). Fixed the linked scalebar issues as well.  

5/30/07: Version 0.32:  Fixed a reported bug regarding saving MCA traces to files and the windows clipboard. 

4/30/07: Version 0.31:  Fixed a DLL error in last release.  Zoom and scalebar functions now work in tricolor maps as well.  Both normal maps and tricolor maps share the same zoom parameters.  Correlation plots now show the correlations in the zoomed in area.  Option to switch correlation plots colors to black and white for screen capture friendly data.  Can use the “Set MCA file lines” and “Split MCA files” to separate MCA data collection files taken at multiple energies – i.e. to split up MCA files from data collected above and below a particular absorption edge. 

4/24/07: Version 0.30: Fixed some math errors that arose in the previous version (0.28 and 0.29).  Added a zoom function (drag a rectangle with the control button held down) and an arbitrary cross section line viewer (use the ALT key).  Added some preliminary (fairly untested) ability to fix MCA files with gaps.  Scalebar option added to viewer.

2/16/07: Version 0.28: Added multiple window option and label of the data channel at the top of the display window.  A right click on the channel list will open an additional display window of the chosen.  This allows viewing of multiple channels simultaneously.  The additional windows are destroyed when closed, not hidden.

2/15/07: Version 0.27: Added ability to import single channel data from JPG, GIF, TIFF, and BMP image formats.

1/24/07: Version 0.26: Added routine to sum multiple full spectra points.  Use the shift key on the display image to select a region, double click to finish – if a MCA file is defined, the sum of the regions MCA will be shown.  Fixed a bug which caused trouble with incomplete MCA files.  Known issues with flipping the axes in the viewer to be resolved soon.

10/19/06: Version 0.25: Added progress indicators for PCA file loading and computing progress. Added fast search routine for MCA retrival to reduce wait times. Fixed an occasionally bug that would report the wrong pixel coordinate on the display readouts. Added a XANES fitting routine for doing a least-squares regression of multiple energies to calculate species proportions.

8/8/06: Version 0.23: Screen size issues fixed with the option to change the minimum displayed size of the display. Added functions to average across the axes. PCA analysis and varimax rotation of MCA map data has been added and may be updated in the near future (still need to add a few of the save options).

7/30/06: Version 0.22: Fixed small errors in routines for loading SUPER files and SCANE files. References to pixel maps also improved. Screen size issues fixed again, this time I think for good. Added MCA viewing and re-integration support. Deadtime corrections now present.

7/24/06: Version 0.21: Added support for PNC-CAT data types. Also added corrected issues with data windows for small screens (I hope), added scroll bars for the tri-color plots selection, and the ability to flip the data in x-y coordinates. Adding functionality for data collected at SSRL to view MCA traces at individual points. Next update will have the full functionality to view and rebin data in real time.

6/5/06: Version 0.20: Added support to sum multi-element detector summation and included nifty new logo.

5/22/06: Version 0.19: First public release of SMAK.

 

 


FastCounter by bCentral