Skip to content

almaavu/Corrimag

Repository files navigation

ALMA Corrimag

https://github.com/almaavu/Corrimag

Correlation of MA-XRF or SEM-EDS element maps.

Install:

Python3

https://www.python.org/downloads/

ALMA Corrimag

python -m pip install git+https://github.com/almaavu/Corrimag.git

Dependencies:

python -m pip install requirements.txt
  • numpy
  • pandas
  • matplotlib
  • scipy
  • scikit-image
  • imageio

Usage:

python -m corrimag "d:/maps"

Without installation:

python corrimag.py "d:/maps"

Input:

  • Directory path with element maps.

Result:

  • XLSX file with correlation coefficients
  • Correlation matrix image

Sources:

https://en.wikipedia.org/wiki/Pearson_correlation_coefficient

https://imagej.net/imaging/colocalization-analysis

Example:

Element maps:

Result:

pair r2 r m b
6 Cr Pb-LB 0.87 0.93 1.08 -0.06
1 Ca Hg 0.80 0.90 0.77 0.04
10 Hg S 0.43 0.66 0.56 -0.12
3 Ca S 0.21 0.45 0.33 -0.02
0 Ca Cr 0.01 0.12
2 Ca Pb-LB 0.00 0.06
8 Cr Zn-KB 0.00 0.03
13 Pb-LB Zn-KB 0.00 0.01
5 Cr Hg 0.00 -0.02
9 Hg Pb-LB 0.00 -0.05
4 Ca Zn-KB 0.00 -0.06
12 Pb-LB S 0.00 -0.06
7 Cr S 0.01 -0.08
11 Hg Zn-KB 0.08 -0.29
14 S Zn-KB 0.65 -0.81 -0.57 0.45

About

Calculates correlations between pairs of element maps (MA-XRF, SEM-EDS).

Resources

License

Stars

Watchers

Forks