
- The main branch always has the latest version. Download, install dependencies, and run
msiAlign/__main__.py.
- install from pypi and run
msialign in the terminal:
pip install msialign
msiAlign
- The latest executable is available here (won't be regularly updated as it's hard to debug).
Note: You may get a trojan warning due to a PyInstaller issue (see discussions
here,
here,
and here).
It's a false positive; allow it to run in your antivirus settings.
- Metadata Database (for MSI only): Go to
File > Crawl Metadata and select your directory.
- Add Images: Use
File > Add Images, selecting whether it’s a reference image (for cm/pixel alignment).
- Organize Images: Drag images and resize. Use
Ctrl+Click to add alignment lines.
- Calculate cm/pixel: Place vertical lines on ruler marks, right-click, set as "scale lines," and select
Calc > cm/Px.
- Sediment Start: Right-click a vertical line and select "Sediment Start."
- Teaching Points: Add teaching points by
Shift+Click. The distance from sediment start will auto-calculate.
- MSI Analysis: Select
Calc > Prep MSI, attach the metadata, and pair teaching points manually or automatically. Submit to calculate transformations.
- XRF Analysis: Select
Calc > Prep XRF. Pair teaching points and submit to calculate transformations. Specify XRF data path when asked to generate depth and mask data, which is saved in the same directory as the XRF data.
- Note the format of Teaching Points pairs:

- Go to
Calc > Downcore Profile to generate depth profiles. Ensure MSI exports are named exactly after spectrum data (e.g., xxxx.d has xxxx.d.txt).
- Spot method: three methods are available when averaging 2D data into 1D profiles.
- all: all compounds listed in "Target cmpds" must be present in the spectrum, or the spectrum is ignored.
- any: at least one compound listed in "Target cmpds" must be present in the spectrum, or the spectrum is ignored.
- user input: based on the compound list (separated by ;) provided by the user, the spectrum is ignored if any of the listed compounds are not present.
- Dynamic spot averaging: dynamically adjusting the spot size to ensure a minimum number of spectra are averaged instead of dropping them.
- MSI res (um): the resolution of the MSI data in microns
- Max extra rows: the maximum number of rows to add to the spot size to ensure the minimum number of spectra are averaged. If the number of spectra is still below the minimum after adding the maximum number of rows, all spectra within the horizon are ignored.
- Save/Load Canvas: Save workspace via
File > Save Workspace (JSON file), reload with File > Load Workspace.
- Teaching Point Coordinates: Use
View > Update TP View.
- Developer Tools: Access extra functions with
Ctrl + P.