top of page

SMAK 3

Now in Python!

If you have SMAK 2 or earlier and want the latest features and support, click here for instructions on how to do a new install of SMAK 3 with Anaconda.

SMAK 2 is still available for download here but is no longer supported.

Latest Release - 3.0.9

February 9th 2024

Click here for version history and features list

Update existing Python installation

  1. Open Anaconda/Terminal/Command Prompt.

  2. Activate the environment you use to run smak
    conda activate smakenv

Then:

Option 1) pip install smak

Run SMAK and check the version in the "About" menu. If SMAK has not updated then move to option 2.

Option 2) pip install smak==X.X.X  where X.X.X is the latest version number, e.g. 3.0.9

NOTE:

This will overwrite any of the settings files in your smak distribution folder. Of most importance is your temp directory settings (smakworkpath.pth) and the Workflow definition (batchCommands.json) files.  Please back up these files if you have made significant changes to your files and do not want to lose them!

New installations

Anaconda required!

You MUST have Anaconda 3 installed first in order to install and use SMAK 3.0. Go to https://www.anaconda.com/download to download and follow the installation instructions.

 

Note that text in this font represents command text you need to enter into Anaconda/Terminal/Command Prompt.

  1. Create a new environment from the Anaconda navigator/Terminal/Command Prompt.

  2. conda create -n smakenv python==3.10
    Choose 'y' when prompted.

  3. Activate the new environment.
    conda activate smakenv

  4. Install package via pip
    pip install smak

  5. Navigate to the folder within your anaconda environment where SMAK has been installed. This can be tricky to find.

    • To start, type in PATH (Windows) or $PATH (Mac).
      This will provide a list of Anaconda directories. Yours may look something like this: "C:\Users\yourUsername\AppData\Local\anaconda3\envs\smakenv" (windows)

    • Using this path, navigate to that folder on your computer in (File Explorer - Windows), (Finder - Mac). This is the folder for your SMAK specific virtual environment.

    • From this virtual environment folder, navigate to "Lib\site-packages\smak" (Windows) or "Lib\python3.10\site-packages\smak" (Mac).

    • In this folder, you will see the code for smak, including "smak.py". Bookmark this folder, you will need to access it frequently.

Optional feature install: Segmentation and image registration

To use the full functionality of SMAK, you will need to follow a few additional steps. This is not necessary unless you plan to use segmentation and image registration. If you want to skip this step click here or scroll down this page.

 

Download the files from the following links. They are quite large and may take a while to download.

  1. Move the files into the main smak folder. This is the folder you found and bookmarked in step 5 of "Installation with Conda".

  2. From Anaconda prompt, activate the smak environment (if not already active) with:
    conda activate smakenv 
    Then run the following commands to install packages. Please follow this exact order of package installation.

There is a chance that the installation in point 2 above (the pip install git+https) may not work if the git extensions to python is not installed.  If you run into this issue, issue a conda install git command before the pip install git+https step.

To check this functionality, open SMAK and navigate to the Analyze/Segmentation. An expanded menu including "Initialize SAM" will be available to you.

Run/Open SMAK

  1. Open Anaconda/Terminal/Command Prompt.

  2. Activate the environment you use to run smak
    conda activate smakenv

  3. Navigate to the folder within your anaconda environment where smak has been installed. This is the folder you found and bookmarked in step 5 above.

  4. Run smak
    python smak.py

Improvements on this installation process and guide are underway! In the meantime, don't hesitate to reach out to Joy (joy.a.wood@dartmouth.edu) or Sam (samwebb@slac.stanford.edu) for assistance.

Segmentation packages.png
New installation

SMAK 3 version history

Latest Release - 3.0.9

February 9th 2024

  • Bug update, fixing a few small errors ....

  • Fix the Vitesse TOF-MS data format for data with missing lines

  • Fixed minor error in particle detection in watershed analysis

  • Added channel stitching mode for strict overlay s. machine vision stitching

  • Added side removal option for mosaic formation for removing occluding objects

  • Fixed bug in edge removal workflow

  • Added multi-channel transect cross section report

  • Added elliptical radial integration analysis

  • Fixed errors in the circular radial analysis

  • Updated layout for concentration calibrations

  • Added ability to add ROI regions from a plot marker list, at defined radius from each marker.  Can sort ROIs formed by marker color or shape.

3.0.8

November 15th 2023

  • Bug update, fixing a few small errors ....

  • Fix the Vitesse TOF-MS data format for proper coordinate readback.

  • Fixed data loading of "newer" ALS 10.3.2 data formats

  • Fixed loading of tiff images as data sets

  • Tweaked the data import for the Exum Massbox TOF-MS format.

  • Improved the mulit-fader display blending

  • Fixed an error where the "add channel from zoom" was flipped in the vertical direction.

  • Fixed an error with the export data to clipboard from the correlation plotter.

  • Added "Export ROI Data" to the particle statistics to add masks from the discovered particles as a data channel.

  • Improved the name matching for data labels in the standardization section for LA-MS data.

  • Fixed error on displaying scalebar text in tricolor plots

  • Fixed path error in PyMCA fitting.

  • Fixed error in reading saved information in the legacy quantification.

  • Fixed error for SiVM-PCA when a max no. PCA components was set.

3.0.7

October 18th 2023

  • Bug update, fixing a few small errors in the XANES fitting and a few other places.

  • Fix the Vitesse TOF-MS data format for vertical data collection

  • Add data import for the Exum Massbox TOF-MS format.

  • Weighted "groups" for PCA analysis to balance contributions from different multi-modal techniques.

  • Ability to add "tags" to a selected set of data channels for easier bulk processing

  • Update install scripts to account for a few small issues

3.0.6

October 2nd 2023

  • Biggest update yet!

  • Current and future versions of SMAK will be released in source code only, use on any 64 bit operating system.

  • Requires an installation of Python 3.10 (currently) for installation. The distribution is on GitHub (private) but can be installed from PyPi too!

  • Support for multi-modal image processing. See new formats below. I know I forgot a ton…

  • Batch mode! Can create workflows that do several steps to all open files. Workflows can be edited, saved and shared among users. Look for a Workflow forum on sams-xrays.com.We will be updating documentation and producing some workflow based routines soon too!MCA processing can process in energy or bins.

  • Created new procedure for quantitative analysis that is easier to use. Can make standard templates that are easy to use and re-use. Support for multiple plot regression in standardization.
    Fixed radial graph maker.

  • Can import data across data tabs, and import data maps with auto-resizing. Also created image export across tabs with visual image registration. Registration uses several different methods (ORB, AKAZE, SIFT, or a convolution neural network warp).

  • Added support for OCTAVVS FTIR background processing.

  • MCA can save data in multiple (up to 9) buffers which can be viewed together.

  • Can create MCA spectra from masks, or cluster plot regions. Save MCA after PyMCA shows multiple data frames (data, fit, background).

  • Fixed multi-file PCA processing. Correlation plots can be color coded to the colors of cluster maps.

  • Masks can be created by freehand, from correlation plots, using rectangular/circular shapes. Masked regions can be moved spatially, translated, scaled, etc. Can define masks via a slope relation in correlation plots. Invert mask function.

  • Cross-correlation plots can be created for multiple channels. Multi-fader can be used to combine multiple images in different colormaps.

  • XANES imaging fitting creates a “sum” channel in addition to the fit species.

  • New colormaps for display.
    Added support for Meta’s Segment Anything Model (SAM - great acronym, right?). Segements can be created and saved. Segments fit into the particle/mask analysis routines. Added morphological analysis and export of parameters back to map channels. Added analysis for log(size) distribution and cumulative area plots.

New formats:

  • NSLS X26 binary

  • GSE-CARS updates

  • CLS updates

  • Diamond LS NXS files

  • ESRF SPEC files (ROBL beam line)

  • FTIR formats from Bruker, Agilent, and Thermo (ENVI format).

  • Updated TOF-MS and LA-MS files.

  • IMZML formats for MALDI-MS.

  • Horiba micro-Raman text file exports.

  • qTIFF and updated JPG/TIFF/PNG formats.

  • Mosaic brightfield camera images from SSRL image data collection.

  • FTIR formats will also save the full spectra in a “MCA” type file for processing.

Run Open SMAK
Version

SMAK Legacy Installations (prior to v3.0)

For previous versions of SMAK, click here

bottom of page