SMAK Download


Latest release v1.67


                                                      64 bit .exe in .zip file (Windows 7 & 10)

                                                      32 bit .exe in .zip file (Windows 10 only!)


Download v1.66 Windows 64 bit .exe in .zip file.

Download v1.66 Windows 32 bit .exe in .zip file.

Download v1.64 Windows 32 bit .exe in .zip file.

Download v1.50 Windows 32 bit .exe in .zip file.

Download v1.50 Windows 64 bit .exe in .zip file.



MacOS has gone through several major changes over the last few years. This greatly affects the compatibility of SMAK. The best way (in general) 

is to run SMAK via Wine (see notes below) as we are essentially retiring support for Mac DMGs. We are working on a source code install for the future as well.

See below for the best ways to get SMAK on a Mac depending on you OS version.

Catalina 10.15 

Sorry but there is no native version of SMAK available for Catalina at this time. Catalina does not support our solution to use WineHQ which only works for High Sierra and older because Catalina does not support 32 bit applications (Wine is 32 bit only). 


Alternate solution - Crossover:

There is a paid alternative to Wine called Crossover by Codeweavers ( The basic plan is ~$40 for an install of only the latest version of the software (no future updates included) but it has the advantage of not requiring a Windows operating system and runs "natively" within MacOS, i.e. runs the program as though it were a native Mac app even though it uses the Windows .exe install file. We have tried Crossover and it appears to work really well and Nick found it to be super fast, faster than running on Parallels and Win 10. SMAK will even appear as a regular app in Launchpad.

Crossover installation Instructions:

The installation for SMAK is a little funky as Apple have gotten tighter when trying to install apps from unidentified developers (Sam didn't want to pay the costs associated to be an official Apple app developer). So we temporarily have to tell MacOS to allow installations from "Anywhere" (this used to be an option before Catalina and we are just temporarily reinstating this option). Below are images of the Mac Security Preferences, note the different options under "Allow apps downloaded from:" in the two images.












If you try to open SMAK without doing this, you will get constantly prompted to allow every single bit of Python within the SMAK folder (~450 files), not useful and the memory is not retained so you would just have to do it all again next time you open SMAK.


Follow these steps:

  1. Download and install Crossover (

  2. Follow the Crossover instructions for installing an unknown application (

    • For the bottle part, this is simply which Windows OS you choose to emulate. Nick tested Windows 10 64-bit on his 2015 MacBook Pro and this worked fine.​​

    • When prompted to select an executable file, select the smak.exe file within the SMAK folder you downloaded from this page


We now have to reinstate the option to allow installations of apps from "Anywhere" within MacOS.

  1. Open the Terminal app.

  2. Type the following command syntax: sudo spctl --master-disable

  3. Hit Return

  4. Authenticate with your computer admin password (see left).

  5. Hit Return.

  6. ​Go to ​System Preferences and click on "Security and Privacy".

    • You should see the "Anywhere" option as in the image above (right)

  7. "Anywhere" should already be selected.

    • If not you have to hit the padlock icon and enter your admin password.

    • Click the "Anywhere" option.​

  8. Open the SMAK bottle you created using Crossover.​

    • You may have to click an "Allow" button that might have appeared to the right of the "Anywhere" in System Preferences.

    • ​We have now allowed SMAK to open without any future security blocks from MacOS

We will now put the default Security settings back​.

  1. In Terminal type of the following command syntax: sudo spctl --master-enable

  2. Hit Return.

  3. Authenticate with your computer admin password.

  4. Hit Return.

  5. Exit Terminal.

    • ​In System Preferences hit the back button then go back into Security and Privacy. The “Anywhere” option should have gone away.

If you are not comfortable with this you can also run an emulator such as Parallels (paid) or VirtualBox (free) which requires a valid Windows operating system installations. Or you can use a Windows machine.

We are working on a stable Python source distribution.

Mojave 10.14 and older via Wine (Recommended Solution)

With the advent of MacOS High Sierra and the APFS file system, SMAK/SIXPACK for Mac using the dmg will no longer function natively with MacOS. SMAK for Mac will also cease to function if you upgrade to High Sierra and will also not work if you try to do a fresh install in High Sierra. It will go through the installation process but will not open, resulting in some error message.

But all is not lost, we have a recommended solution allow you to keep using SMAK on a Mac using these OS versions!

There is free mini emulator program called WineHQ that allows Windows applications to run on a Mac (running these older OS versions) without a Windows operating system.

Running SMAK via Wine
Installation tips are below. Note that some installations may only be able to run the Windows 32 bit version of Wine.

Command line (recommended, terminal readout):

  1. Install the latest version of Xquartz from Apple if you don’t already have it. You will already have it if you were running SMAK before on your computer but if you have a new computer and this is a new install then you may not have it:

  2. Download Wine from this link: and install it.

  3. Download the latest version of SMAK above by clicking the download button (yes really, the Windows version). A zip file will start to download. Macs automatically unzip the file and you should see a folder called smak-64-166 or smak-32-166.

  4. Place the this folder in your Applications folder.

  5. Double click on the Wine application and it will open a Terminal window with the command line "wine"

  6. Now you have to tell Wine where the smak.exe is. Copy the appropriate line below (depending on which version of SMAK you dowloaded) into Terminal:

    • cd /Applications/smak-64-166

    • cd /Applications/smak-32-166

  7. Now type "wine smak.exe"

  8. SMAK should now open.

Traditional (no terminal readout):

  1. Follow step 1-4 above

  2. We recommend making an alias to the smak.exe file within the smak folder. Right click or control click the smak.exe file and select “Make Alias”.

  3. Place that alias in the main Applications folder.

  4. Select the alias (not double click) and hit “command I” to bring up the “Info” window for the alias. In this window select “Open with” and select “Wine Stable” from the available options.

Now whenever you double click the smak.exe alias, Wine and SMAK should open together.

Troubleshooting Wine when upgrading OS

Nick found that when he upgraded from MacOS High Sierra to Mojave, version 1.4 of SMAK and Wine worked fine. But when he tried to open version 1.5. Wine would open and then close without doing anything.

The solution involved doing a deep uninstall of Wine and reinstalling. This involves deleting a hidden file within the Mac “home” folder via Terminal.

  1. Drag the Wine Stable app from the Applications folder to the Trash. Empty the trash.

  2. Open Terminal

  3. Type or copy and paste the following command lines one at a time, hitting enter after each:

    • cd

    • rm -rf .wine

    • rm -f ~/.config/menus/applications-merged/wine*

    • rm -rf ~/.local/share/applications/wine

    • rm -f ~/.local/share/desktop-directories/wine*

    • rm -f ~/.local/share/icons/????_*.{xpm,png}

    • rm -f ~/.local/share/icons/*-x-wine-*.{xpm,png} }}}

  4. Reinstall Wine.

For reference, these commands lines simply tell the system to delete (rm for remove) the files defined by the path that follows the rm command. These files (among millions of others for you whole computer) are hidden to the user under normal circumstances and can only be deleted via this method.

Mac DMG Installations for OSX El Capitan 10.11, Sierra 10.12

Read before installation!

The Mac dmg installs only work on systems before Sierra 10.12.  Regardless we don't recommend you use these as you will only be able to use older versions of SMAK and we will not be supporting issues with those older versions (we will just recommend you run the latest version of SMAK via Wine).


If you really want to do the old dmg install, note that with El Capitan 10.11 and Sierra 10.12, Apple started using "System Integrity Protection"which would block non-Apple authorized software installs. You will NOT be able run SMAK via the regular dmg install without a few preliminary steps.  You can ignore this if your system is Yosemite 10.10 or older. 


1) First you can temporarily disable the SIP to perform the "tile" installation, and then enable SIP again afterwards. This link describes the process that you need to follow. There is no harm in disable SIP temporarily, just following the instructions for re-enabling it once you are done with the install.

2) Download this zip file and install the folder to your "/System/Library/Tcl" directory. On some Macs the directory may also be "/Library/Tcl".

3) You may also need to install a newer Apple flavor of X11, xQuartz. This should install into your Applications-Utilities folder. Many users have reported that they need to duplicate this program to also be titled X11 (so... select "xQuartz" in a Finder window, copy/paste, rename the new file to "X11").

4) Open the dmg file and drag the application bundle to your "Applications" folder. It will not run from the .dmg file or any other location on your filesystem.

Troubleshooting DMGs
If you have found that SMAK has suddenly stopped working or fails to run after all of this... You may have upgraded your system as of late.  There is a known apparent error (that manifests itself as a "gestalt" version error in the console) with upgrading the Apple OS.  While it is unclear what the best way to resolve this, some Google rumors suggest reinstalling your OS.  From my personal experience of updating from Mavericks to Sierra, I was able to get everything working by
  1. Reinstalling the OS
  2. Reinstalling the Tcl Tile package (as noted above)
  3. Installing or reinstalling xQuartz.
Please let me know if these things work or don't work.

Download v1.40 MacOSX dmg

Download v1.30 MacOSX dmg

Download v1.20 MacOSX dmg

Download v1.10 MacOSX dmg

Download v1.00 MacOSX dmg

Source code in Python source for Linux, Mac or Unix machines will be provided soon. 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.


What's new in version 1.67:

  • Implemented a "highlight" feature to show the pixels that are masked on correlation plots.

  • Regression fitting of highlighted region only fits to the masked region.

  • Option to do a multiple-linear regression on correlation plots.

  • Implemented new filters and thresholding methods for better particle detection.

  • Implemented a watershed masking procedure to identify overlapping particles.

  • In the particle/watershed/masked statistics regions, can perform regression of selected channels for each particle/region present and plot these regression results in histogram format.

  • In the histogram function, can fit the histogram as a series of several gaussian functions.

  • Fixed data reading of PNC-CAT MCA hdf5 files to read and convert the data much faster than previous versions.

Version History

6/10/20 Version 1.67: Implemented a "highlight" feature to show the pixels that are masked on correlation plots. Regression fitting of highlighted region only fits to the masked region. Option to do a multiple-linear regression on correlation plots. Implemented new filters and thresholding methods for better particle detection. Implemented a watershed masking procedure to identify overlapping particles. In the particle/watershed/masked statistics regions, can perform regression of selected channels for each particle/region present and plot these regression results in histogram format. In the histogram function, can fit the histogram as a series of several gaussian functions. Fixed data reading of PNC-CAT MCA hdf5 files to read and convert the data much faster than previous versions.

04/03/20: Version 1.66: Implemented fast-PyMCA fitting procedures. MCA fits of maps will go much faster, especially using the 64-bit compiled versions. For extremely large data files, the MCA may still not all fit into memory, so the “32-bit” PyMCA fitting mode will fit the map in a series of smaller chunks. Corrected bugs in image saving mode for both 64 and 32 bit modes. Can use high-(as is)-resolution saving TIFF for tricolor plots. Functions added (“Process-Low Signal Shift”) for removing error pixels caused by skips in data collection (misc. skipped pixels caused by double counting of trigger inputs). Added support for APS-MAPS formats (h5 type files) and BIO-XAS image formats at CLS. Continuing to track down other bugs.

10/13/19:  Version 1.64: Major new release, (although there will be a delay to get the 64-bit Windows version). Fixed several of the remaining errors that existed in the previous version(s).  Expanded additional support for SOLEIL data formats.  Added visualization for PCA components and added an ability to limit the number of PCA components found, so that you are not limited such that the number of components is forced to the number of data channels.  New Simplex Volume Method (SiVM) for end-member detection added, using an adapted method of Matthias Alfeld.  Support for full field XANES imaging analysis included, and the ability to export clustered spectra from a K-means cluster map.

10/11/18:  Version 1.50: Major new release, including a 64-bit Windows mode.  Note that all Mac support will be through the use of the Wine program. Added 32-bit TIFF support, as well as expanding SOLEIL data formats.  Updated references to plotting libraries, so the graph windows may look a little different.  Added support for SSRL UV-vis spectrometers as MCA files, with the ability to integrate raw UV-vis data to XYZ/RGB/LAB color coordinates. New clustering algorithms added  Numerous bug fixes added along the way.

8/12/16: Version 1.40: Minor fix in the MCA fitting.  Error appeared due to memory contratints for large, ok even moderate sized data.  Fixed now.

3/28/16: Version 1.30: Major release! Minor fixes from last release.  New functionality includes usage of PyMCA routines to do fluorescence fitting to full MCA spectra (must be in SMAK HDF format). New MCA fitting interface includes peak fitting, matrix and absorber effects, as well as the ablity to define different matricies at different pixel positoins, for instance based on Kmeans clustering results!  Included material database to GUI paramters as well.  Can fit a single spectrum, a zoomed area of the map, or the entire map area. Can also apply gaussian spatial filter averaging to the MCA spectra before performing the fit. The interface is still experimenta and will probably evolve in the future, but its a good start to include MCA fitting.


2/29/16: Version 1.20:  Major release. So much in here, I'm sure to forget a lot of it.  Updated the file formats to support several other image formats. Text files are read with a universal newline interpretation, so files saved on a PC can be read by Mac/Unix and vice versa without having to convert the newline characters. The PCA selection now has a large series of multivariate analysis options, including "sPCA" - Principal Compent Analysis, "CCIPCA" - Candid Covariance-free Incremental Principal Component Analysis (the previous standard algorithm), "FA" - Factor Analysis, "NMF" - Non-Negative Matrix Factorization, "FastICA" - Fast Independent Component Analysis , "Kmeans" - K-means Clustering.  File imports will attempt to read the energy in the data file and automatically append that to the column name.  File menu has a "Rapid Import" option, where the first selection of channels is applied to all files and channel names are automatically calculated or incremented. The XANES fitting analysis option has a dialog to import the appropriate energy values from saved, 2-coilumn mu data files.  Added "Invert" to the "Advanced Filter" selection to easily invert several channels without the "Map Math" window. Plot markers section has option to save marker data as an XASSCAN queue so points that are picked from maps can be exported to the XAS data collector. There's probably a lot of ther things too... 


7/25/14: Version 1.10: Major re-release to fix many of the long standing issues. Added too many new features to comprehend. Supports use of SMAK friendly HDF files and support of the Xspress3 HDF MCA files. This also helps loading large files. All users are encouraged to change the old SMAK .mca files to .hdf files so that MCA usage becomes extremely feasible!


7/14/12: Version 1.01: Quick bug fixes. Some minor fixes. Added a fix to remove excess calculations for user-defined masked statistics.


7/9/12: Version 1.00: Major re-release! Including MacOSX flavor! New code removed Windows dependencies on the code, so expect to see a source release as well as a Linux version soon. The toolkit now uses the OpenCV package for many of the image processing and filtering, so the code is much faster. Adding more sophisticated thresholding and filtering routines, including Fourier transforms for noise removal. Can create manual masks and do mask addition operations for defining areas of interest. This is of use mostly in new statistical analysis package which will provide detail inter-map analysis of ROIs, either by manual detection or discrete particles through thresholding analysis. Will perform box-and-whisker type plots, histograms, and do ANOVA statistics between ROIs. Masked and zoomed areas are now used in the PCA and data compression and data summary displays. Moment analysis also uses masked and zoomed areas. Correlation plot raw data can be exported to the clipboard. All plot data in general (including the statistical and histogram data) can also be exported as text. Several other small things that I'm sure I've forgotten! In the new release, the computed tomography codes are being reworked and may be broken. Use the older version of SMAK in the meantime until the fix is posted.


10/28/10: Version 0.52: More new features! Masking on the image directly works correctly (the shift left click can define an ROI or area for MCA examination or both). Data summary now also lists mean and standard deviations for the view/mask being shown. Correlation plots can give a best fit value and r-square correlation. Option to convert the ASCII .mca files to binary for faster access if routine rebinning or examination is required. This can speed up the process by a factor of almost 4. Can make movie animations from the MCA data. Working on several other file formats as well as a whole host of updated features. Stay tuned!


02/19/10: Version 0.51: Many new updates yet again!   Separated math operations into two menu bar items – Process and Analyze.  Added set of dialogs to perform simple quantification.  Does not account for thickness effects or matrix effects as of yet.  Added advanced filtering, including mean, median, min, max, blur, and unsharp filters.  Also added a custom kernel filter.  Histogram function added.  Added new plot marker shapes and a scrollbar in the plot marker window.  While zoomed, the keyboard arrow keys will pan your view.  The summary outputs, correlation plots, etc, are all linked to this view and will update as well.  Option added to perform   line fits (linear, gaussian or both) to line profiles created with the ALT shortcut.  IND function included in the PCA output (text in the DOS window) when performed on channel data.  Can shift pixels in individual rows.  Radial profile maker added.  Advanced stats including moment  analysis added.  Can make a mask, or define a region of interest, on the map image directly using the SHIFT shortcut.  Whew.  More to come soon as well I hope…


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 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.




Sam Webb


© 2018 by Sam Webb.


Proudly created with