XMapTools.2.6 UserGuide PDF
XMapTools.2.6 UserGuide PDF
Pierre Lanari
An introduction to
XM AP T OOLS 2.6
numerical tools for quantitative petrology
Dear user,
It is a pleasure to introduce you XM AP T OOLS 2.6, a software solution to process and analyze com-
positional maps, notably those obtained by EPMA, SEM or LA-ICP-MS. This project was initiated
in 2009; the first public release was provided in late 2012. Since that time, the program has con-
tinuously been improved with numerous updates containing new functionalities and improvements.
XM AP T OOLS is an active product of research that is developed on a weekly basis. These are collected
and provided to you via public updates every years.
This user guide aims to assist you and to give you the better experience possible with XM AP T OOLS.
However, before to go further into details and see how each part of the program works, it is impor-
tant to acknowledge undergraduates, PhD students and researchers that have actively participated in
testing XM AP T OOLS.
XM AP T OOLS HISTORY
XM AP T OOLS 2.X (2014-present) has been developed by Dr. Pierre Lanari at the University of Bern
(Institute of Geological Sciences).
XM AP T OOLS 1.X (2009-2014) was developed by Dr. Pierre Lanari at the University of Grenoble
(ISTerre) with support from Dr. Olivier Vidal and Dr. Éric Lewin
ACKNOWLEDGEMENTS
I would like to thank O. Vidal, A.-M. Boullier, A. Verly, B. Gardonio, F. Bernier, L. Airaghi, E.,
Lewin, S. Guillot, S. Schwartz, M. Munoz, E. Janots, K. Malamoud, J. Braun, (ISTerre Grenoble)
N. Riel (Durham University) M. Engi, J. Hermann, D. Rubatto, M. Burn, A. Berger, M. Tedeschi, A.
Vho, E. Kempf, T. Bovay and F. Giuntoli (University of Bern) C. Loury, Y. Rolland (GeoAzur Nice)
T. Raimondo (University of South Australia) E. Duesterhoeft and R. Bousquet (Kiel University) C.
Martin (American Museum of Natural History) E. Grosch (University of Bergen) C. de Capitani, L.
Frantz (University of Basel) A. Pourteau, R. Oberhänsli (University of Potsdam) S. Centrella (Uni-
versity of Münster) F. Guillot, M. Dupuis (Université de Lille) A. Robert (Université de Toulouse) B.
Dubacq, P. Agard, M. jentzer (ISTEP Paris) V. De Andrade (NSLS II Brookhaven) M. Zucali (Uni-
veristy of Milano) D. Waters (University of Oxford) G. Ortolano (Catania University) C. R. Cioffi
(University of São Paulo) for help, suggestions, comments, data and/or collaborations in order to
develop and test XM AP T OOLS.
C ONTENTS
Contents 3
1 Introduction 1
1.1 XMapTools program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Citation Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Licence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Analytical procedure (electron microprobe) . . . . . . . . . . . . . . . . . . . . . . 6
1.4.1 Micro-mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4.1.1 Spatial resolution . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4.1.2 Chemical resolution . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5 Theoretical considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5.1 How to precisely determine local bulk composition from compositional maps? 12
1.5.1.1 Problem description . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5.1.2 XMapTools procedure to export local composition . . . . . . . . . 13
1.5.1.3 Method evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 Program description 27
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.1.1 Quick access to function descriptions . . . . . . . . . . . . . . . . . . . . . 28
3.1.2 XMapTools strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3
3.2 General functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.2.1 Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.2.2 General settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.2.3 Workspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.2.4 Figure options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.3 Display functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.3.1 Live coordinates display window . . . . . . . . . . . . . . . . . . . . . . . . 36
3.3.2 Figure/display tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.3.2.1 Map display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.3.2.2 Zoom and pan . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.3.3 Sampling tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.3.4 Chemical modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.3.5 Add-ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.3.6 X-pad navigator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.3.7 Activated corrections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.4 X-ray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.4.1 X-ray images display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.4.2 Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.4.3 Mask files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.4.4 Corrections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.4.4.1 BRC - Border-removing correction . . . . . . . . . . . . . . . . . 52
3.4.4.2 TRC - Topo-related correction . . . . . . . . . . . . . . . . . . . 52
3.4.4.3 MPC - Map position correction . . . . . . . . . . . . . . . . . . . 54
3.4.4.4 SPC - Standard position correction . . . . . . . . . . . . . . . . . 55
3.4.4.5 IDC - Intensity drift correction . . . . . . . . . . . . . . . . . . . 55
3.4.4.6 BA1 - Background correction (map) . . . . . . . . . . . . . . . . 57
3.4.4.7 RM1 - Eliminate pixels (area; all maps) . . . . . . . . . . . . . . . 58
3.4.5 Internal standards (spot analyses) . . . . . . . . . . . . . . . . . . . . . . . 58
3.4.6 Standardization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.4.6.1 Classical standardization and the problem of background . . . . . 64
3.4.6.2 Pseudo-background correction in XM AP T OOLS . . . . . . . . . . 64
3.4.6.3 Module XMT_StandardizationTool . . . . . . . . . . . . . . . . . 64
3.5 Quanti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.5.1 Standardized maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.5.2 Standardization Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.5.3 External functions module . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3.5.4 Local composition module . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.6 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
3.6.1 Results from external functions (Results) . . . . . . . . . . . . . . . . . . . 81
3.6.2 Other functions for trace element maps . . . . . . . . . . . . . . . . . . . . 82
3.7 Chemical modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
3.7.1 Binary Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
3.7.1.1 Density diagrams in the Binary module . . . . . . . . . . . . . . . 87
3.7.1.2 Identify pixels (and show their distribution) . . . . . . . . . . . . 87
3.7.1.3 K-means clustering in the Binary module . . . . . . . . . . . . . . 89
3.7.2 TriPlot3D Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
3.7.3 RGB Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
3.7.4 Generator Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
3.7.4.1 Code format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
3.7.4.2 Graphical User Interface of the Generator module . . . . . . . . . 93
3.7.5 Spider Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
3.7.5.1 Sampling functions . . . . . . . . . . . . . . . . . . . . . . . . . 95
3.7.5.2 Figure and colors . . . . . . . . . . . . . . . . . . . . . . . . . . 96
3.7.5.3 Create a movie with spider diagram . . . . . . . . . . . . . . . . . 98
Bibliography 155
I NTRODUCTION
1
1
2 Chapter 1. Introduction
Many additional processing tools have been developed over the years and the software has frequently
been updated. XM AP T OOLS’ website (http://www.xmaptools.com) is available and provides the
latest version of the software including online updates with additional tools, user guide and a tutorial.
XM AP T OOLS software (Lanari et al. 2014b) uses a Castaing-like approach (De Andrade et al. 2006,
Lanari et al. 2018) to standardize semi-quantitative X-ray map data from electron microprobe analyses
into maps of mineral oxide composition. High precision spot analyses are used as internal standards.
Chemical groups corresponding to the mineral phases and other entities are separated using a K-
means statistical approach (automated classification). From maps of element oxide composition,
it is possible to estimate local bulk compositions of the mapped area or of a selected local micro-
domain. One of the main advantages of XM AP T OOLS is that it can calculate mineral compositions,
structural formulae and phase equilibrium conditions, such as pressure and temperature, at each pixel.
This permits a detailed textural interpretation of recorded physico-chemical conditions on a micro-
scale. Various geothermometers or geobarometers are provided in the program (about 50 functions
are available) and it is straightforward to add his own calibrations into the software using the external
function module. In addition, binary and ternary chemical diagrams can be plotted using the modules
B INARY and T RI P LOT 3D. These modules may be used to identify chemical variations and to define
groups of composition. XM AP T OOLS can also be used to obtain local bulk compositions to be used
for thermodynamic modelling (Lanari et Engi 2017).
1.2. Citation Guidelines 3
Please use the following citations in your publications when you refer to XM AP T OOLS. The version
of the program should be specified just after the name. Example: Mapping data were processed using
XM AP T OOLS 2.6.1 (Lanari et al. 2014; 2018)
Please use at least one of the official XM AP T OOLS logo (available here) in your talk / poster along
with the references while figures have been generated using XM AP T OOLS.
• L ANARI , P., V HO , A., B OVAY, T., A IRAGHI , L., C ENTRELLA , S., (2018). Quantitative
compositional mapping of mineral phases by electron probe micro-analyser. Geological Society
of London Special Publication, DOI:10.1144/SP478.4
• L ANARI , P., V IDAL , O., D E A NDRADE , V., D UBACQ , B., L EWIN , E., G ROSCH , E.,
S CHWARTZ , S., 2014. XM AP T OOLS: a MATLAB
-based
c program for electron microprobe
X-ray image processing and geothermobarometry. Computers and Geosciences, 62, 227-240
• L ANARI , P., E NGI , M., 2017. Local bulk composition effects on metamorphic mineral assem-
blages. Reviews in Mineralogy and Geochemistry, 83, 55-102
• R AIMONDO , T., PAYNE , J., WADE , B., L ANARI , P., C LARK , C., H AND , M., 2017. Trace
element mapping by LA-ICP-MS: assessing geochemical mobility in garnet. Contributions to
Mineralogy and Petrology, 172, 17
Density maps:
• C ENTRELLA , S., P UTNIS , A., L ANARI , P., AUSTRHEIM , H. 2018. (2018). Textural and
chemical evolution of pyroxene during hydration and deformation: a consequence of retrograde
metamorphism. Lithos, 296-199, 245-264
Mapping technique:
• L ANARI , P., V HO , A., B OVAY, T., A IRAGHI , L., C ENTRELLA , S., (2018). Quantitative
compositional mapping of mineral phases by electron probe micro-analyser. Geological Society
of London Special Publication, DOI:10.1144/SP478.4
• D E A NDRADE , V., V IDAL , O., L EWIN , E., O’B RIEN , P., AGARD , P., 2006. Quantification
of electron microprobe compositional maps of rock thin sections: an optimized method and
examples. Journal of Metamorphic Geology, 24, 655-668.
Selected application examples: Lanari et al. (2012), Pourteau et al. (2013), Martin et al. (2013),
Lanari et al. (2013; 2014b;a), Trincal et al. (2015), Loury et al. (2016), Mészáros et al. (2016), Scheffer
et al. (2016), Elmola et al. (2017), Airaghi et al. (2017b;a), Lanari et Engi (2017), Lanari et al. (2017),
Raimondo et al. (2017)
4 Chapter 1. Introduction
Note: XM AP T OOLS is a free software for scientists working in Universities and Public Research
Agencies worldwide (see 1.3). Software has become a critical part of modern research and yet there
is little support across the Academic ecosystem for its acknowledgement and citation. We believe
that scientific software developed by academics should be considered a legitimate and citable product
of research. The developments of XM AP T OOLS are part of a research effort that includes costs not
supported by the users. Users of XM AP T OOLS need to understand that citations are the only form of
reward that directly support the software development. Please, cite XM AP T OOLS in your publications
and mention his use in your presentations.
1.3. Licence 5
1.3 L ICENCE
XM AP T OOLS software is distributed in an Double Regime: Academic and Commercial.
In the Academic and Public Research World, XMapTools is distributed under the terms of the Sci-
entific Software Open Source Academic For Free License. This License sets the program Gratis and
Open Source, and grants Freedom to use, copy, study, modify and redistribute it. But these policies
hold only within the Academic and Public Research world. Thus the Academic World can be reas-
sured that the normal research academic policies in working with scientific software are granted by
this license. And it goes even beyond GNU-GPL, since it explicitly sets GRATIS the software.
On the other hand, we would like to reassure also the Commercial World. Indeed, the Scientific
Software Open Source Academic For Free License IS NOT like other, commonly spread Open Source
Free licenses, GNU-GPL or other. In the sense that the present License well keeps into account all
the needs and the way of functioning of the Commercial and Profit Institutions World. Into this
world, XMapTools is going to be distributed under other Licenses, to be negotiated from case to
case. In this case it is a paying code, and exclusiveness for a certain merceological sector, or even
full exclusiveness can be agreed with commercial institutions. This protects commercial institutions
investments on applied research lines using the XMapTools code against concurrential actions, a
posteriori possible to concurrent commercial institutions for codes licensed under commonly spread
Open Source Free licenses. We agree with the Commercial World that these licenses revealed not
compatible with the ordinary way of functioning in the Commercial World. This is the reason why
we choose a different license policy for XMapTools: to make Commercial Institutions profit of the
Basic Research ByProducts. And at the same time, to make the Basic Research benefit of the funding
coming from the Commercial World, to finance the Basic Research itself.
Please, if you are a commercial institution, take the time to read at least the Scientific Software
Open Source Academic For Free License. And you will realise that this is exactly the policy and the
philosophy that can work to conciliate your way of functioning and the normal behaviour of academic
research. Such as everybody can profit of the exchange between the two worlds.
6 Chapter 1. Introduction
The following sections briefly outline some important aspects of this analytical procedure along with
recommended electron microprobe operating conditions.
1.4.1 Micro-mapping
The acquisition of X-ray images must be performed using wavelength dispersive spectrometers
(WDS) at specific wavelength of the considered elements. As there are only four or five WDS in
moderne electron microprobes, the acquisition is typically realized in two passes that can include at
least 8-10 elements. The order of the acquisition is of first importance. The electron beam may cause
local diffusion of light elements such as Na, K and Ca, therefore, these elements must be measured
during the first pass.
The acceleration voltage is fixed at 15 KeV for major elements and 20 KeV for trace elements mea-
surements. Beam current is typically fixed at 100 nA for major element analysis and can be increase
up to 900 nA for some low concentration element analyses such as Pb, Th or U. Of course high values
of current can be used only if the microprobe is able to reach and stabilize such high currents. For
major element analysis and common silicates minerals, the optimal conditions for a good precision
are 15 KeV accelerating voltage, 100 nA beam current and 200 ms dwell time (Lanari et al. 2014b).
Diffusion and volatilization of light elements: Light elements such as K or Na might volatilize
or diffuse when working with a high-intensity electronic beam. De Andrade et al. (2006) showed
that 100 nA current with dwell times of 50 ms do not affect the compositions of common K-bearing
silicate minerals such as white mica. The effect of the high-intenisty electronic beam in mapping
condition may be easily tested by mapping a couple of times a small area with the same analytical
conditions and by comparing the results with XM AP T OOLS. This test has been done using a JEOL-
8200 microprobe at the Institute of Geological Sciences (University of Bern) on a meta-quartzite
from the Western Alps (Marco Burn’s thesis). A small area of 80 × 120 µm2 containing plagioclase
(albite), quartz and K-white mica (phengite) was analyzed using 15 KeV accelerating voltage, 200
nA specimen current and dwell time of 200 ms.
Si maps do not show any difference, excepted for some grains boundaries between quartz and phengite
(white arrows in Fig. 1.1, top). Such small and localized differences can be explained by slight
changes of the position of the mapped area of about 1µm. The same feature is visible in the Al maps
(white arrows in Fig. 1.1, bottom). This effect caused by the low precision (of about 1µm) of the
position of the sample holder.
In contrast, maps of Na and K show strong variations of their number of counts with time (Fig. 1.2).
Na and K intensity variations are shown by pixels of plagioclase and phengite respectively. The
volatilization of Na in plagioclase is quite visible in the second map. The pixels of this map show
between 30 and 40% less counts than those of the first map. During the third pass Na in plagioclase
is almost gone. Maps of K show the same effect of volatilization with a decrease of the number of
counts with the successive maps. However in the case of K the decrease is smaller with only 50-60%
of counts lost after 5 passes.
1.4. Analytical procedure (electron microprobe) 7
Figure 1.1 – X-ray maps Si (top) and Al (bottom) and absolute differences in % compared to the first map. Data
were measured on a JEOL 8200 microprobe at the University of Bern, by acquiring five consecutive maps of the
same area (corresponding to 10 passes: Na, Si, Ca, Al, Fe & Ti, K, Mg, Mn). Accelerating voltage was 15 KeV,
specimen current 200 nA, dwell time 200 ms and the beam size 1 µm. The studied sample is a meta-quartzite
coming from the Glacier-Rafray Klippe (Western Alps) sampled by Marco Burn (PhD Thesis).
8 Chapter 1. Introduction
Figure 1.2 – X-ray maps Na (top) and K (bottom) and absolute differences in % compared to the first map.
Data were measured on a JEOL 8200 microprobe at the University of Bern, by acquiring five consecutive maps
of the same area (corresponding to 10 passes: Na, Si, Ca, Al, Fe & Ti, K, Mg, Mn). Accelerating voltage
was 15 KeV, specimen current 200 nA, dwell time 200 ms and the beam size 1 µm. The studied sample is a
meta-quartzite coming from the Glacier-Rafray Klippe (Western Alps) sampled by Marco Burn (PhD Thesis).
1.4. Analytical procedure (electron microprobe) 9
Precision of X-ray maps & total time of an analytical session: The precision of X-ray images
is a fundamental question that must be discussed in details. However, we have first to estimate how
long it take to measured X-ray maps in order to discuss the different parameters that will affect the
precision of measurement. The total acquisition time (Ta ) in mapping condition can be expressed as:
Nb pixels × Td(s) × N p
Ta (h) = (1.1)
3600
with Td(s) the dwell time, N p the number of passes and Nb pixels , the number of pixels of the final
image. Both spatial (i.e. size of the image and number of pixels) and chemical resolution (dwell time)
of the X-ray images are very important and will strongly affect the total time of a mapping session
(Eq. 1.1).
An example of the effect of different spatial resolutions on X-ray images is reported in Fig. 1.3. A
virtual area with three phases was generated using fixed compositions of SiO2 for the three phases
(Fig. 1.3a). Phase 1 (45 wt.% of SiO2 ) is an inclusion of 8 × 16 µm2 in phase 2 (30 wt.% of SiO2 ).
The contact between phases 2 and 3 (60 wt.% of SiO2 ) is oblique. The size of this area is 36 × 35
µm2 . Pixel sizes of 1, 2, 3 and 4 µm will generates images of 36 × 35, 18 × 17, 12 × 11 and 9 × 8
pixels respectively. For a given surface to be analyzed, the size of the image (in pixels) strongly
affects the measurement time. In this example, estimated measurement times are 756 s, 184 s, 79 s
and 43 s for 1, 2, 3 and 4 µm spot size respectively with dwell time of 300 ms and two passes.
The size of the pixel used for mapping does affect the measurement time, but also the visual quality
of the X-ray image. In the example displayed in Fig. 1.3, the size of the inclusion of phase 1 is 8 × 16
µm2 . As in natural rocks this kind of inclusion can have chemical zoning, it is very important to
have the higher number of pixels with individual measurements of the composition of this inclusion.
For a beam size of 1 µm (first row in Fig. 1.3b), the number of pixels showing the true composition
of the inclusion (i.e. 45 wt.% of SiO2 ) changes with the pixel size used. 90 pixels of phase 1 have
the correct composition with 1 µm spot size, 24 with 2 µm, 10 with 3 µm and 4 with 4 µm. This
example demonstrates that a smaller pixel size provides better constrains for the chemical variations
of the smallest object of the area of interest. A general rule proposed by Lanari and Riel (in prep) is
that "the pixel size must be at least 5 times smaller than the size of the smallest object".
An other characteristic feature of X-ray images is that at the contact between two phases, mixing
compositions are analyzed. It is important to remember that the compositions of the pixels at the
contact between two phases are not the true composition of the phases. These pixels will be removed
during the processing. The beam size used will strongly affect the size of this mixing area. In the ex-
ample discussed above, for a given pixel size of 3 µm (third column), the size of the mixing area will
increase with the beam size. This can be easily evidenced by comparing the contour of the inclusion
of phase 1 between these three images ([3,1], [3,2] and [3,3] that correspond to [rows,column] coor-
dinates). This result suggests that the smaller beam size must be used in order to reduce the number
of mixing pixels at phase boundaries.
10 Chapter 1. Introduction
Figure 1.3 – Spatial resolution dependency to pixel size and beam size. (a) Images of the different phases (left)
and compositions of SiO2 (right). The phase compositions are assumed to be perfectly homogeneous with SiO2
composition of 45 wt.%, 30 wt.% and 60 wt.% for phases 1, 2 and 3 respectively. The size of the small inclusion
of phase 1 is 8 × 16 µm2 . (b) X-ray images generated for different resolutions and beam size of 1, 2, 3 and 4
µm (see text for details).
1.4. Analytical procedure (electron microprobe) 11
in which P is the precision (in % at 2σ), and n the number of recorded counts (intensity). This
function has been plotted in figure 1.4. Consequently, 4,500 counts are required to reach a chemical
precision of 3% (2σ), 10,000 counts for 2% (2σ), and 20,000 for 1% (2σ).
Example: A map of chlorite was acquire at the Institute of Geological Sciences (University of
Bern) on a metasediment from the Western Alps, using an electron beam focussed at 1µm, 15 KeV
accelerating voltage, 100 nA specimen current, 200 ms dwell time and 3µm step size. The chlorite
composition is SiO2 = 25.0 wt−%; Al2 O3 = 20.1 wt−%; FeO = 32.1 wt−%; MgO = 10.6
wt−%. The average number of counts recorded for each chlorite pixels is Si = 3695; Al = 2612;
Fe = 3302; Mg = 1551. Analytical precision was derived using equation (1.2): Si = 3.29%;
Al = 3.90%; Fe = 3.48%; Mg = 5.08%. Consequently, the limits to detect chemical zoning in
chlorite is SiO2 = 0.82 wt−%; Al2 O3 = 0.78 wt−%; FeO = 1.12 wt−%; MgO = 0.534 for the
given analytical variations.
Figure 1.4 – Relation between the number of recorder counts and the analytical precision of an analysis
12 Chapter 1. Introduction
1.5.1 How to precisely determine local bulk composition from compositional maps?
1.5.1.1 Problem description
To estimate local bulk compositions, we need a standardized map for which we know the concentra-
tion of each pixels expressed in oxide weight percentage (wt-%). The aim of this section is to show
you how to derive the bulk composition of a rock by extrapolating a 2D slice (map) into a 3D volume.
In theory, this can easily be done if the following conditions are met:
• The thin section was made perpendicular to a schistosity or a foliation (extrapolation from 2D
to 3D)
• The map was acquired on an unaltered rock surface devoid of compositional heterogeneities
Let first consider a domain of a rock composed by three phases Min1 , Min2 and Min3 showing
homogeneous compositions C1wt , C2wt and C3wt . The compositions are expressed in oxide weight
percentage. The bulk composition of this domain (Cbulk ) can be calculated as:
with w1 , w2 and w3 the mass fractions of Min1 , Min2 and Min3 . This relation can be generalised
for a map of this domain containing n pixels:
i =n
Cbulk = ∑ wi Ciwt (1.4)
i =1
with Xiwt and wi the mass fraction and composition in oxide weight percentage of pixel i. However
the use of this relation is not straightforward because it requires the knowledge of the mass fraction
of a given pixel. On the other hand side, a pixel fraction is a surface fraction (si ) and can be converted
into volume fraction (vi ).
For a rock made of 60 vol − % of quartz and 40 vol − % of andalusite equilibrated at 650K and
2000 bar, the bulk rock composition of this rock is exactly 60 wt − % of SiO2 and 40 wt − % of
Al2 O3 . A compositional map of a representative portion of this sample would contain 60% of pixels
with quartz measurement and 40% of pixels with andalusite measurement (volumes fractions of 0.6
and 0.4 respectively). In such case the surface fraction of a phase i (si ) is extrapolated into a volume
fraction (vi ) assuming
vi = si (1.5)
By contrast weight fractions of quartz and andalusite for the given example are of 0.36 and 0.64
respectively. The deviation between volume and weight fractions is caused by a density difference
between the two solids. At 650K and 2000 bar the density of quartz is 2608kg/m3 and andalusite
3126kg/m3 . The density of the mixture (bulk rock) made of 60 vol − % of quartz and 40 vol − %
of andalusite is 2915kg/m3 .
1.5. Theoretical considerations 13
For any mixture made of n homogeneous phases, the density of the mixture ρmixture is
i =n
ρmixture = ∑ vi ρi (1.6)
i =1
The density of phase i is the ratio of the mass (Mi ) to the volume (Vi )
Mi
ρi = (1.7)
Vi
and consequently the mass of phase i is
Mi = ρi vi ∑ j = 1j = nVj (1.8)
As the mass fraction of a phase i in that mixture is the ratio of the mass of that phase (Mi ) to the mass
of the mixture (Mmixture )
Mi
wi = (1.9)
Mmixture
By combining Eq. (1.8) and Eq. (1.9), it comes out that
ρi
wi = vi (1.10)
ρmixture
The mass fraction of each pixel may be convert into volume fraction of the pixel using Eq. (1.10) if
the density of the corresponding phase and the density of the rock (mixture) are both known. The Eq.
(1.4) become
i =n
ρi
Cbulk = ∑ vi Ciwt (1.11)
ρ
i =1 mixture
If a significant density difference exists between the considered phase the local bulk composition i
calculated from a density-corrected map. The oxide weight percentage of components of each pixel
ρi ρi
are multiplied by ρmixture . If ρmixture is close to one for all the phases, the local bulk composition can be
approximatively derived from the uncorrected oxide weight percentage maps. Accurate determination
of local bulk composition require the knowledge of the phase density.
(2) Merge the standardized maps of interest using the function merge standardized phases
[B2401] to generate a standardized map that contain for all selected phases the pixels compositions
in oxide weight percentage.
(3) Duplicate the new standardized map using the function duplicate Quanti file [B2106]
(4) Use the functions select and area and delete the pixels outside [B2409] or select and area
and delete the pixels inside [B2410] to remove pixels of any domain that is not in the area-of-
interest from which you want to extract the local composition. It is really important to have in this
standardized map only the pixels you need for the local composition estimate because the function
that does the density correction needs to calculate the mean density of the considered pixels (ρmixture
in Eq. 3.19).
14 Chapter 1. Introduction
(5) Generate a density map from the selected mask file (in X-ray) using the function generate a
density map (from selected mask file) [B2406]. It is possible to define the phase densities in
Classification.txt below the keyword >2 (see example in Code 3.14). The order must be the same as
the phases defined below >1. Each row must have only one number.
(6) You can display the density map by using the function display the density map [B2407].
(7) Calculate a density-corrected map using the function compute a density-corrected oxide map
[B2408]. This map should only be used to export local compositions because each pixel is multiplied
ρi
by ρmixture . The sum is not anymore 100 wt-%. The name of this Quanti file begins with *DCM- to
remember you to not use it for other purpose. There is a warning if you try to use this density-corrected
map for structural formula. I strongly suggest to delete this map after exporting the compositions
(8) The composition of this specific domain may be exported using the function export local com-
position: map [B2402].
15
16 Chapter 2. How to get started
2.1 R EQUIREMENTS
XM AP T OOLS is a MATLAB
c
-based program that requires MATLAB
c
to be executed. Unfortu-
nately, there is no compiled version of XM AP T OOLS available so far and users must have a
version of MATLAB
c
installed. NB: For students, a cheap MATLAB
c
student version can be
purchased in the Mathwork website (www.mathworks.com).
Warning: Starting at the next major release (probably XM AP T OOLS 2.7), MATLAB
c
R2014b or
a more recent version will be required. XM AP T OOLS will not longer receive updates if used within
old MATLAB
c
environments (pre-R2014b). Please consider upgrading your MATLAB
c
to ensure
full compatibility with the most advanced version of XMapTools!
(3) In the Set Path window, select the installation path of XM AP T OOLS 1.6.5 and press Remove.
2.3. Installation procedure (download, setup and first configuration) 17
(5) You can manually remove the directory with the old XM AP T OOLS files
NB: The installation directory of XM AP T OOLS must be stored in the pathdef file of MATLAB
c
. If
the setup directory is not listed there (during step 3, see above), this means that XM AP T OOLS is not
correctly working on your machine. You can directly install the new program (see below).
The package is available at: www.xmaptools.com in the section R ESSOURCES and Download.
We do not collect any Personal Data, usage or diagnostic information when you download, install or
use XMapTools and during automatic updates. Check the Privacy Policy for additional information.
By downloading or using XM AP T OOLS, you accept the terms of the software license agreement
(available in 1.3). XM AP T OOLS should be used only at the user’s responsibility. Please note that
XM AP T OOLS is free only for academic and public researchers. If you are working for a commercial
institution, you should first get a licence. Please contact me before downloading the program
18 Chapter 2. How to get started
Figure 2.1 – Description of XM AP T OOLS files and repertories. The setup package contains four folders: Pro-
gram, UserFiles, Addons and Example. The user data must be stored in a different directory (e.g. Xray_Data).
The archive file contains four folders: Program, UserFiles, Addon and Example. Program contains
the XM AP T OOLS program files and should not be modified. UserFiles contains user’s additional
functions and codes. The use of this functionality is explained in details in section 4.3 and is reserved
to advanced users. Addon contains the XM AP T OOLS ’ add-ons. Each subfolder in the Addon directory
will be considered as a potential add-on. The description of the add-on system is provided in chapter
4.4. Example contains a set of microprobe X-ray maps that are used in the tutorial (see chapter 6).
2.3. Installation procedure (download, setup and first configuration) 19
Figure 2.2 – XM AP T OOLS setup. Make a right-click on Install_XMapTools.p and press run to install XMap-
Tools on your computer.
Warning: If data or projects files are stored into the folder XMapTools/Program/, they will be deleted
during the automatic update. A warning message is displayed if the user attempts to run XMapTools
from the setup directory.
(2) Go to the XM AP T OOLS directory (/Program) using the Current Folder window in MATLAB
c
(3) Run the program Install_XMapTools.p (see Fig. 2.2, or using in the MATLAB
c
command win-
dow the case-sensitive command: » Install_XMapTools)
20 Chapter 2. How to get started
(4) Press Yes to confirm that you would like to install XM AP T OOLS on your computer (Fig. 2.3a)
(5) After the setup, a confirmation message is displayed in a dialogue box. Two cases should be
distinguished:
Case 1: Setup is completed (see message in Fig. 2.3b). This message is displayed if XM AP T OOLS
was correctly installed in you computer. You can press OK and use XM AP T OOLS. If your setup is
completed, you can run and use XM AP T OOLS from any folder, without the risk of modifying the
main installation. Directly go to the next section 2.3.3.
Case 2: Setup is not completed (see message in Fig. 2.3c). This message is displayed if XM AP -
T OOLS was not correctly installed in you computer. To solve this problem, try one of the two solutions
below (5a and 5b):
(5b) Open the file pathdef.m in your startup directory / or in matlabroot/ toolbox/local/ and change
the file permissions. Then, try to run a new setup of XM AP T OOLS.
WARNING: Before to run XM AP T OOLS check that you are in your working directory (See Fig. 2.4)
In the last stable release XMapTools 1.6, troubles have been encountered caused by to problems with
22 Chapter 2. How to get started
the FTP connection used to download the new package. This problem has been fixed in XMapTools
2 and the automatic update is expected to work in all cases.
This new automatic update system uses simple web connection to automatically download the latest
version of the software from the website (see details in section 2.4.1). The folder Program stored
in the XM AP T OOLS setup directory is updated. This is NOT the case for: Examples and UserFiles
that are kept unchanged. The user files stored in UserFiles are not deleted by the automatic update
(provided that UserFiles is not stored in Program).
In you do not want do use the automatic update (e.g. no internet access in your computer) an alterna-
tive procedure is also available (see section 2.4.2).
(3) The update program ask for a second confirmation. Press OK to continue. The update program
cleans first all the files of the folder program. In a second time, the new package is downloaded and
unzipped at the right place. At this stage, the update program runs the normal setup procedure (see
details in section 2.3.2.2; (4) and following steps).
(2) unzip the package in the XMapTools setup directory and replace the old folder Program by the
new one
(3) Go to the XM AP T OOLS repertory (Program) using the Current Folder window in MATLAB c
and run the program Install_XMapTools.p (following the procedure described in section 2.3.2.2)
(2) Open the set path window in Matlab (Menu > File > set path). Select the XM AP T OOLS shortcut
and remove it. Save and close this window.
24 Chapter 2. How to get started
2.6.1 EPMA
For a given project with EPMA data (X-ray images), it is recommended to use the following files that
must be stored in the data repertory of this project.
Table 2.1 – Required and optional files in a project folder for EPMA data. Note that the file names Standards.txt
and Classification.txt (case sensitive) are automatically recognized by the program
Examples of Standards.txt and Classification.txt files are available with the release 2.1 (see the direc-
tory Example).
2.6.2 LA-ICP-MS
For a given project with LA-ICP-MS data (compositional maps in ppm), it is recommended to use the
following files that must be stored in the data repertory of this project.
Table 2.2 – Required and optional files in a project folder for LA-ICP-MS data.
The elements names available are Na, Mg, Al, Si, P, S, Cl, K, Ca, Ti, V, Cr, Mn, Fe, Co, Ni, Cu,
Zn, Zr, Ag, Cd, Sn, Ce, As, Sb, Cs, La, Nd, Pb, Sr, Th, U, Yt (which is ytterbium not to be confused
with "Y" coordinate), Sm, Gd, Dy, Pr.
2.6. Required data 25
The following isotopes names are available for LA-ICP-MS maps 7Li, 9Be, 11B, 12C, 13C,
23Na, 24Mg, 27Al, 28Si, 29Si, 31P, 34S, 35Cl, 39K, 43Ca, 44Ca, 45Sc, 47Ti, 49Ti, 51V, 52Cr, 53Cr,
55Mn, 56Fe, 57Fe, 59Co, 60Ni, 65Cu, 66Zn, 69Ga, 71Ga, 72Ge, 73Ta, 75As, 81Br, 82Se, 85Rb,
88Sr, 89Y, 90Zr, 93Nb, 95Mo, 105Pd, 107Ag, 111Cd, 115In, 118Sn, 121Sb, 125Te, 137Ba, 139La,
140Ce, 141Pr, 146Nd, 147Sm, 153Eu, 157Gd, 159Tb, 163Dy, 165Ho, 166Er, 169Tm, 172Yb, 175Lu,
178Hf, 184W, 192Os, 193Ir, 195Pt, 197Au, 202Hg, 205Tl, 204Pb, 206Pb, 207Pb, 208Pb, 209Bi,
232Th, 238U.
The oxides names available are SiO2, TiO2, Al2O3, FeO, MnO, MgO, CaO, Na2O, K2O.
The other maps types available are BSE (back-scattering electron image), SEI (secondary elec-
trons) and TOPO (topography).
• Type 1: WDS maps (e.g. Si, Al, Fe, ...); they can be calibrated into maps of oxide mass
fraction. The oxide corresponding to each element is defined in Xmap_Default.txt (see 2.6.3).
A dead time correction is automatically applied to WDS maps when importing the maps.
• Type 2: EDS maps that can be calibrated in the same way as for type 1. Maps of type 2 are
defined using the EDS code "_" in the file name. They are labeled "EDS_el" in the map menu.
Note that there is no dead time correction applied to EDS maps.
• Type 3: Other maps such as TOPO, BSE and SE or calibrated EPMA (e.g. SiO2 , Al2 O3 , FeO
...) and LA-ICP-MS (e.g. 89Y, 90Zr, 93Nb, 95Mo) maps. These maps cannot be calibrated
using any of the standardization functions. It is possible to transfer these maps to the wokspace
Quanti using the function transfer to quanti (see 3.4.6.3).
• Type 4: Background maps defined using the codes "∗−" (lower background) and "∗+" (upper
background). A dead time correction is automatically applied to WDS background maps when
importing the maps.
• Type 5: Maps generated using the Generator Module (see 3.7.4). These maps cannot be cali-
brated.
Note that the corrections (see 3.4.4) cannot be applied to all the map types. All the map types can be
used in the chemical modules (see 3.7). The function info in the workspace X-ray can be used to
display the type of the selected map.
>2 D e n s i t i e s
3540
2650
2820
2620
>2 Here d e f i n e t h e o x i d e s o r d e r
SiO2 MgO FeO Al2O3 X Y
>3 Here p a s t e t h e a n a l y s e s
25.4800 11.2600 29.0500 21.1400 1.4800 68.310 39.999
52.9400 3.5300 3.0200 24.2300 0.0197 68.331 39.535
52.5800 3.6300 2.7900 24.7200 0.0195 68.338 39.511
27
28 Chapter 3. Program description
3.1 I NTRODUCTION
This chapter provides a detailed description of all the functions available in XM AP T OOLS. By con-
trast, the tutorial "Electron microprobe X-ray maps processing" (chapter 6) explains how to use these
functions to perform the successive steps of processing (e.g. classification, analytical standardization,
thermobarometry).
This program description is divided into three sections: the general functions (section 3.2), the display
functions (section 3.3) and the processing functions (sections 3.4, 3.5 and 3.6). All buttons and menus
available in the GUI are shown in Figs. 3.1, 3.2 and 3.3, 3.4.
Xray:
menus: X-ray images display [M1101] [M1102] - classification [M1201] [M1201] - maskfiles
[M1201] - corrections[M1401] - standardization [M1601]
buttons: X-ray images display ([B1101] [B1102] [B1103] [B1104] [B1105] [B1106] [B1107]
[B1108] - classification [B1201] - maskfiles [B1301] [B1302] [B1303] - corrections [B1401] - stan-
dards [B1501] [B1502] [B1503] [B1504] [B1505] [B1506] - standardization [B1601]
Correction methods:
buttons: [BRC] [TRC] [MPC] [SPC] [IDC] [BA1] [RM1]
Quanti:
menus: standardized maps [M2101] [M2102] - external functions module[M2301] [M2302] [M2303]
buttons: standardized maps [B2101] [B2102] [B2103] [B2104] [B2105] [B2106] - info [B2201]
[B2202] - external functions module [B2301] [B2302] - local compositions module [B2401] [B2402]
[B2403] [B2404] [B2405] [B2406] [B2407] [B2408] [B2409] [B2410] [B2412]
Results:
menus: results from external functions [M3101] [M3102]
buttons: results from external functions [B3101] [B3102] [B3103] [B3104] - Other [B3301] [B3302]
3.1. Introduction 29
Following the original idea of microprobe X-ray images processing using an Castaing’s approach
(De Andrade et al. 2006), XM AP T OOLS software is divided into three workspaces Xray, Quanti and
Results. They are activated using the corresponding browser buttons and display specific objects such
as groups of buttons. The menu with the three buttons Xray, Quanti and Results enables the user to
navigate between the different workspaces.
X-ray workspace is automatically selected during the software opening. This workspace enables to
(1) add, display and manipulate raw data such as X-ray images, (2) classify the pixels, i.e. compute
masks and identify minerals using a supervised multi-channel classification technique, (3) correct
raw X-ray data, (4) load a standard file containing the spot analyses to be used as internal standard,
(5) correct the positions of the maps and spot analyses and select/unselect the standards and (6)
standardize the raw data into maps of oxide wt(%) concentrations.
Quanti workspace is devoted to treatment of the maps of oxide mass concentrations. It is possible
to (1) export analyses of the entire map or of a selected area, (2) merge standardized map and export
local bulk compositions (Lanari et Engi 2017), (3) calculate maps of structural formulae, (4) apply
empirical to semi-empirical geothermobarometers to evaluate P-T conditions of formation (Lanari
et al. 2013).
Results workspace allows the calculated results (mineral structural formulas, P-T maps) to be dis-
played, and the results to be exported.
General functions are provided in all the workspaces such as: (1) plot options, (2) filters, (3) sampling
functions and (4) external modules: B INARY,T RIPLOT 3D, RGB and G ENERATOR.
LA-ICP-MS data can also be proceeded via XM AP T OOLS software. The standardized maps are im-
ported in the workspace X-ray and directly sent to the workspace Results using the functions transfert
to Quanti and transfert to results. The module S PIDER allows spider diagrams to be generated (in-
cluding videos).
XM AP T OOLS projects can be saved as *.mat files and all the variables becomes easily ac-
cessible from the MATLAB
c
command window. Type in the command window ">> open
MyProjectName.mat" and ">> whos" to display XM AP T OOLS variables (and data).
30 Chapter 3. Program description
Figure 3.1 – XMapTools objects and corresponding functions for (a) "general" and (b) "display" windows.
3.1. Introduction 31
Figure 3.2 – XMapTools objects and corresponding functions for (a) "general" and (b) "display" windows.
32 Chapter 3. Program description
Figure 3.3 – XMapTools objects and corresponding processing functions for (a) "X-ray", (b) "Quanti" and (c)
"Results" workspaces.
3.1. Introduction 33
Figure 3.4 – XMapTools objects and corresponding processing functions for (a) "X-ray", (b) "Quanti" and (c)
"Results" workspaces.
34 Chapter 3. Program description
NB: The backup files are relatively heavy (about 100 Mb for a project including 10 maps, 12 stan-
dardized maps and 20 results).
[B4102] The button save the project enables to save the selected XM AP T OOLS project. If a
project file was not created before to press this button, it calls the function save as [B1403].
[B4103] The button save the project as allows the XM AP T OOLS project to be saved as a new
project. The user must specify the name of the new project file. The name of the saved project is
displayed in the same window.
[B4104] The button close and open a new window enables to end the current XM AP T OOLS
session, clear all the variables of the workspace and start a new XM AP T OOLS session. This function
may be used before to load a new project, because it cleans all the variables from the previous session.
[B4105] The button close and exit may be used to end the current XM AP T OOLS session and to
close the program.
• Display help in XM AP T OOLS window [default: enabled] display help instructions into the
main window (blue text at the bottom).
• Activate the diary [default: disabled] enables to save all the info displayed in the MATLAB
c
command window in a diary file. The diary must be deactivated using the command » diary off
if XM AP T OOLS is not closed using one of the close button.
• Display live coordinates [default: enabled] displays the live coordinate in the main window
(top left, see description in section 3.3). This option may in some rare instances cause notable
slowing down during the use of the software; it can be disabled here.
• Figure’s colormap [default: JET] sets the figure’s colormap. Available sets are: Jet (Default);
ColdWarm; FreezeWarm; WYRK; Hot; Gray; HSV; Cool; Spring; Summer; Autumn; Winter;
Bone; Copper; Pink.
• Colormap resolution [default: 128] sets the number of colors used in the colormap. Note that
this option is only available to MATLAB
c
colormaps.
3.2. General functions 35
Figure 3.5 – Settings window. This window can be displayed and hidden by clicking on the button [B4201].
• LOG scale [default: disabled] enables to use logarithmic scale for the color bar. If this option
is not selected a linear scale is used.
• Border interpolation (merge function in Quanti) [default: unselected] activates the border
interpolation option in the function merge [B2401].
User’s personal settings are saved as soon as the button Save default is pressed. The saved settings are
used by default. The settings are stored in the file Default_XMapTools.mat located in the directory
/Program.
NB: XMapTools automatic update will clear the personal settings; new personal settings must be
redefined after each software update.
The XMapTools release number, the XMapTools setup directory and current working directories are
alos displayed in the settings window.
[B4202] The button XMapTools info allows displaying some information regarding the program
such as the XM AP T OOLS license policies.
3.2.3 Workspaces
The buttons Xray, Quanti and Results enable to switch between the different workspaces.
[B4402] The button change display window size allows the size of the map display window to
be adjusted. Three different sizes are available (full screen, intermediate, small).
[B4403] The button unfreeze the interface allows the interface to be unfrozen if the program is
stuck. A description is given in section 5.3.1.
36 Chapter 3. Program description
NB: The coordinates reported in the Live coordinates display window are the matrix coordinates of
the initially loaded X-ray image. The displayed coordinates for one selected pixel are the same for all
the rotate positions (i.e. this value is corrected for the rotation, see function [B5103])
The value displayed as Z is the value for the pixel that is located exactly under the cursor. The unit of
the number displayed depends on which image is displayed. It can be number of counts, oxide wt%,
atoms per formula unit, end-member fraction, equilibrium conditions, density or reference number of
a phase.
[B5101] The button enable auto-contrast enables to apply an automatically optimized color-
scale to the displayed image. If the auto-contrast mode is active then the same button can be used to
disable the auto-contrast (disable auto-contrast ) and come back to the default values. The default
lower and upper values are the min and max values of the displayed image.
[C5101] The cells edit ’min’ and ’max’ values of the colorbar allow the lower and upper values of
the color-scale to be manually edited.
NB: The use of this function switch off the auto-contrast mode.
[B5102] The button export displayed image can be used to export active figure. This function
generates a copy of the figure displayed in the main XMapTools window (including images and user’s
selections, points, lines...) in a new MATLAB
c
figure window. This function can also be used to
export the histogram and probability density diagram.
An example of exported figure is given in figure 3.6. The date and a scale-bar of 100 pixels are printed
in the exported figure. This figure can be saved in different picture formats. In the menu, select File
> Save as and choice the image format: *. f ig, *.eps, *.jpg, *.pcx, *.pbm, *.pd f , *.pgm, *.png,
*.ppm, *.pkm and *.ti f . Pdf files are convenient as they can be easily edited using a program such
as Adobe Illustrator
c
.
[B5103] The button rotate the figure of 90◦ (counterclockwise) allows the orientation of the
image displayed in the main figure to be changed by 90◦ . It is possible to rotate the map to the
following orientations:
NB: The default orientation (1, Fig. 3.7a) is automatically set when you run XM AP T OOLS or load
an existing project. Press the function rotate the figure of 90◦ (counterclockwise) to change the orien-
tation. The selected orientation will be applied during the active session but not saved in the project
file for the next sessions. Note that some functionalities are not compatible with the rotate function.
In this case a warning message will be displayed inviting the user to set the reference orientation.
The coordinates reported in the Live coordinates display window (see section 3.3.1) are the matrix
coordinates of the initially loaded X-ray image. The displayed coordinates for a given pixel are the
same for all the rotate positions.
[B5104] The check box Lower black layer allows a black color layer to be added to the color bar
for all the values lower or equal to the ’min’ value defined in [C5101].
[B5105] The check box Upper black layer allows a black color layer to be added to the color bar
for all the values greater or equal to the ’max’ value defined in [C5101].
[B5106] The button enable/disable median filter is used to enables or disable the median
filter. If selected, this function applies a median filter to the displayed image along two dimensions
using a square window. Each output pixel contains the median value in the M-by-M neighborhood
around the corresponding pixel in the input image. M value is defined in [C5106]. The median filter
is only applied to the displayed images. The data stored in the software are kept unchanged.
[C5102] The cells median filter size allows to set the size in pixel of the median filter [C5106].
Every time a number is enter, the median filter applied to the displayed figure is updated.
38 Chapter 3. Program description
Figure 3.7 – Orientation positions available for the main figure display (see rotate function [B5103])
[B5107] The button activate zoom mode turns on the zoom mode. Turning on the zoom mode
disables the pan mode (and vice versa).
When zoom mode is enabled, pressing a mouse button while your cursor is within the displayed map
zooms into the point or out from the point beneath the mouse (note that each mouse click or scroll
wheel click zooms in or out by a factor of 2.). When using zoom, you can:
• Zoom in by positioning the mouse cursor where you want the center of the plot to be and either
(1) press the mouse button or (2) rotate the mouse scroll wheel away from you (upward).
• Zoom out by positioning the mouse cursor where you want the center of the plot to be and
either (1) simultaneously press Shift and the mouse button, or (2) rotate the mouse scroll wheel
toward you (downward).
• Clicking and dragging over an axes when zooming in is enabled draws a rubberband box. When
you release the mouse button, the figure is adjusted to zoom in to the region enclosed by the
rubberband box.
Note: If only a region of an image is displayed (after zoom or pan was used), this specific view
is maintained when using most of the functions within one workspace (Xrax, Quanti or Results).
However, a few functionalities still require reseting the display to the original image.
[B5108] The button activate pan mode turns on the pan mode. Turning on the pan mode disables
the zoom mode (and vice versa). Note that panning is only available if a zoom is applied.
When the pan mode is enabled, holding the mouse button while your cursor is within the displayed
map permits panning the view of display interactively.
[B5109] The button reset zoom & pan disables both zoom and pan modes and resets the original
view of the displayed image.
Note: the original view is restored when the program switches between the three workspaces.
3.3. Display functions 39
Figure 3.8 – Menu to select the sampling mode: single map (displayed) or multi-map (selected by user)
• Single Map (color) a color profile for the map displayed in the main window (e.g. Fig. 3.9b)
• Single Map (bw) a black-and-white profile for the map displayed in the main window (e.g. Fig.
3.9c)
A menu allowing the sampling mode to be selected (Fig. 3.8) is displayed once the button line mode
sampling is clicked. If the Multiple Map mode is selected, it will be possible to select the list of maps
from which the profile are extracted. Only the maps available in the active workspace - and for the
selected phase - are available.
The profiles are plotted in new window. This figure can be saved using the normal procedure described
for the function export [C5102].
The data plotted can also be exported and saved as and ASCII file (in *.txt, see Ex. 3.1). This file is
automatically stored in the repertory /Export-sampling. If this repertory does not exist, the program
creates a new one in the working directory.
If the mode multi-maps is selected, all the figures generated by the software are saved as both FIG
and PDF files using linear and logarithmic axes in a new folder that is located in the /Export-sampling
directory. Two additional figures that contain all the elements (linear an logarithmic axes) are also
saved. For a profile AB extracted from four maps (elements), twenty files are generated. In this case
the data are saved as a matrix in which each column corresponds to a given element.
40 Chapter 3. Program description
Figure 3.9 – Example of line sampling across a garnet porphyroblast using (a) the map fraction of spessartine
(XSps ). (b) mode Single Map (color). note that the color of is the same as the corresponding pixel on the map.
(c) mode Single Map (bw).
S a m p l i n g from XMapTools
04−May− 2015
Method : L i n e
1 3372.4085
2 3365.3943
3 3327.318
4 3301.2663
5 3392.4491
6 3480.6306
7 3320.304
8 3434.5352
9 3392.4491
10 3 4 2 3 . 5 1 2 5
Code 3.1 – Example of exported file (sampling mode line; single map)
[B5202] The button area mode sampling enables calculating and displaying the average compo-
sition of the pixels contained in a region-of-interest. This region-of-interest is set by selecting spots
that define a polygon which is converted by the program into a mask (see spots 1 to 10 Fig. 3.11b).
Selection mode is disabled using right-clicking (spot 11, in Fig. 3.11b). The polygon is closed without
taking into account the right clicking position, see dashed line in figure 3.11b. The result is displayed
in the cell [C5201]. The results including the average, the standard deviation (1σ), the number of
pixels and the standard error (1σ) can also be exported and saved as and ASCII file (in *.txt, see Ex.
3.2). This file is automatically stored in the repertory /Export-sampling.
For a pixel i with composition Xi from an area containing n pixels, the values shown in 3.2 are
obtained using:
∑ Xi
Value = x̄ = (3.1)
n
3.3. Display functions 41
Figure 3.10 – Three areas used to export the average XSps (see 3.2)
r
∑( Xi − x̄ )2
StdDev = σ = (3.2)
n
σ
StdErr = √ (3.3)
n
S a m p l i n g d a t a e x p o r t e d from XMapTools
14− Dec − 2018
S a m p l i n g mode : Area ( m u l t i p l e maps / a r e a s )
#1 | Nb p i x e l s = 1325
Ref Name Value StdDev N StdErr
1 . 0 0 0 0 XSps 0.1163 0.0035 1325 0.0001
#2 | Nb p i x e l s = 865
Ref Name Value StdDev N StdErr
1 . 0 0 0 0 XSps 0.0508 0.0042 865 0.0001
#3 | Nb p i x e l s = 3453
Ref Name Value StdDev N StdErr
1 . 0 0 0 0 XSps 0.0039 0.0014 3453 0.0000
Code 3.2 – Example of exported file (sampling mode area, see Fig. 3.10)
[B5203] The button integrated lines mode sampling enables calculating and displaying the com-
position variations integrated perpendicular to a reference transect. The function plots the average
values of the transects parallel to the reference transect defining a rectangle (Fig. 3.11c). For a
given pixel on the reference transect, the value is calculated as the mean of the pixel compositions
perpendicular to the reference transect. The rectangle is defined by three spots (see Fig. 3.11c).
Figure 3.11 – Sampling functions: (a) line mode [C5201], (b) area mode [C5202], (c) integrated lines mode
[C5203] and (d) scanning window [C5204]
All the transects are displayed in gray. The mean and median values along the reference transect are
plotted in red and blue respectively. An example is given in Fig. 3.12.
The percentage of pixels used to calculate each value can also be displayed on in a new window. The
results can be exported and saved as and ASCII file (in *.txt, see Ex. 3.3).
3.3. Display functions 43
S a m p l i n g from XMapTools
04−May− 2015
Method : I n t e g r a t e d Area
Columns : Mean | Median | S t d | \% P i x e l s
[C5201] The cells sampling results allows to display some results of the sampling functions.
[B5204] The button scanning window mode sampling enables calculating and displaying the
composition variations using a moving average window (Fig. 3.13). In the given example, the rect-
angle is displaced from the starting point (left on Fig. 3.13-a) to the end of the path (right on Fig.
3.13-a) along 3 segments with 3 × 30 steps. The average composition of the pixels for every step
is calculated together with the standard deviation and they are display in a new figure window (Fig.
3.13-b).
Click two points to define the reference rectangle and successively select the location where you want
to move next the center (see Fig. 3.11) to add one more segment. At least one segment must be
defined (3 points in total); right-clicking ends the selection mode.
Note that in XM AP T OOLS the distance unit used is pixel. In figure 3.13 the distances have been
converted from pixels to µm.
3.3.5 Add-ons
[M5601] The menu add-on list lists all the compatible add-ons available in .../UserHome/Docu-
ments/MATLAB/XMapTools/Addons/. The selected add-on can be called using the button [B5601]
run.
[B5601] The button run executes the add-on selected in the add-on menu [M5601].
44 Chapter 3. Program description
Figure 3.13 – Example of sampling using (a) a scanning window and the exported (b) the moving average and
standard deviation.
3.3. Display functions 45
[B5405] The button Apply enables to exit the correction mode and apply the modifications made.
3.4 X- RAY
3.4.1 X-ray images display
[M1101] The menu X-ray image enables to select the map that is displayed in the main figure
window. All the maps that have been previously loaded with the function add map(s) [B1101] are
listed in this menu.
[M1102] The menu phase (mask) enables to display only the pixels of this mask. Note that the mask
is defined in the mask file selected in menu X-ray image [M1301]. The data of the map selected in
[M1101] are displayed in the main figure window for the given phase selected in the menu [M1102].
The masks are generated during the classification. Mask can also be imported from a mask file using
the button import ([B1302], see below). If none is selected (first choice), all the pixels of the map
selected in [M1101] are displayed in the main figure window.
[B1101] The button import map(s) allows new maps to be imported using the adding tool. All
the map files may be loaded together or separately. Files must be text files and have *.txt; *.asc; *.dat
or *.csv extensions with no head line (see file format in 2.6.3). Note that the import map function can
also read single column files. In this case the program will ask for the size of the map to reshape the
vector into a matrix.
The function import map checks the map files one by one to recognize the corresponding elements.
It is possible to use an automated indexation technique, which scans the maps and detect the corre-
sponding element based on the name of the file. A dialog box is displayed for the file names that does
not match any entry of the database. This dialog box is displayed for all the maps if the automated
indexation is not used.
The Import Tool GUI (Fig. 3.14) contains some correction fonctions to modify the maps that are
imported into XM AP T OOLS. Once the corrections are set (see below) press Apply Corrections to
send the modified data to XM AP T OOLS.
Three types of corrections are available, the first two being applied respectively to EPMA and LA-
ICP-MS maps:
• EPMA: Select the option that activates the dead-time correction. Note that the dead-time cor-
rection is apply to WDS maps only (type 1, see insert 3.5). The following dead-time equation
is used:
Imeasured
Icorr = (3.4)
1 − DT × 10−9 × Imeasured
with Icorr and Imeasured the corrected and measured X-ray intensities in counts per second and
DT the dead time of the detector in ns (default 300 ns).
• LA-ICP-MS: Map-size correction: re-sampling and rotation. Scaling factors (integers) can be
use to modify the size of the map. Positive scaling factors shrink the image using re-sampling,
whereas negative scaling factors expend the image by duplicating the pixels. An example of
re-sampling is provided in figure 3.15.
• All: Find and replace negative values (zero). If this option is activated all the negative values of
the images are replaced by zero.
The information regarding the corrections are printed out in the MATLAB
c
command window (see
examples for EPMA insert 3.4 and LA-ICP-MS insert 3.5 below)
3.4. X-ray 47
Warning: Do not apply any rotation correction to EPMA maps, otherwise the map coordinates pro-
vided in Standard.txt will not work anymore. The rotation correction may only be used with stan-
dardized maps such as LA-ICPMS images.
[B1102] The button delete map enables deletion of a selected map. This button is available only
if two or more maps are loaded.
[B1103] The button display precision map allows a precision map to be generated. This map
shows the precision in % at 2σ (see general concept and equation in §1.4.1.2). This image is opened
in a new window. The color contrast values are the lower and upper values of the precision map. The
precision is computed for a given element (menu [M1101]) and the selected phase provided that a
mask is selected in the menu [M1102].
[B1104] The button info allows a window with some information about the selected map to
be displayed. This info window contains: (1) name of the selected element (with a number corre-
sponding to the internal reference in the element database); (2) selected phase, if selected in menu
[M1102]; (3) map size in pixels: format rows / columns, corresponding to Y / X; (4) mean intensity
of displayed pixels (if a phase is selected in [M1102] the mean is calculated from the intensities of
this phase only) and the corresponding uncertainty at 2σ; (5) median intensity of displayed pixels and
the corresponding uncertainty at 2σ; (6) standard deviation; (7) lower and (8) upper intensity values;
(9) BRC, (10) TRC and (11) MPC correction info (see section 3.4.4).
[B1105] The button display mask image allows the mask image of the selected mask file (menu
[M1301]) to be plotted.
[B1106] The button export phase proportion enables exporting the phase proportions of the
selected mask file (menu [M1301]). A folder Exported-PhaseProportions is automatically generated
and the file is saved. Phase proportions are printed in pixel-% that correspond to surface-%.
3.4. X-ray 49
[B1107] The button export mask image is used to display the mask image of the selected mask
file (in menu [M1301]) in a new window. This figure can be saved using the menu file > save as.
Several image formats are available: .jpeg, .pdf, .eps or .png. NB: the main export function ([B5102])
does not work correctly with mask images.
[B1108] The button rename phases enables to change the assigned phase names. A dialog box
opens and names can be edited. When the button OK is pressed, a new mask image is plotted with
the new labels.
NB: It is strongly recommended to use single word phase names without blank.
3.4.2 Classification
[M1201] The menu method of classification enables to select the method that will be used by the
classification function (button [B1201]). Two automated methods are available: classic computation
or normalized intensities. The differences between both methods are described in details in Lanari
et al. (2014b). Different masks files could be derived using both methods depending on the magnitude
of the differences between the composition of phases. For optimal results we generally recommend
to try both methods.
[M1202] The menu initial pixel composition mode allows the method for defining the coordinates
of the initial pixels to be selected. The compositions of these pixels will be used to define the first
groups by the classification function (button [B1201]). Two options are available: selection and file.
The mode selection enables to select by clicking pixels directly into the map during the classification.
This mode requires a map on which all the mineral phases are visible. The mode file allows a file
containing the coordinates of the initial pixels to be loaded. The format of this file is described in
2.6.5. If the file is named Classification.txt (case sensitive), then the program automatically proposes
to read this file.
[B1201] The button classify calls the automated classification function, which aims to attribute each
pixel of the image to a distinct chemical phase (also termed mask here). This function uses a clustering
approach (k-means function) and the method selected in menu [M1201] from compositions of initial
pixels selected by user (see menu [M1202]). A complete description of the classification function is
provided in Lanari et al. (2014b).
The classification function allows to select the X-ray maps that are used to classify the pixels of the
image. If the mode selection is selected and if a file Classification.txt exists in the working directory,
the program proposes to used this file to specify the initial pixel set during the classification. Press
yes to continue and no to open an other file.
[B1301] The button delete mask file can be used to delete the mask file selected in menu
[M1301]. This button is available only if two or more mask files have been generated.
50 Chapter 3. Program description
[B1302] The button import / merge mask files enables importing mask file(s) generated with the
chemical modules Binary and TriPlot3D. Users can select one (import) or more (merge) mask files
stored in the folder /Maskfiles. XM AP T OOLS generate a new mask file by merging the selected ones.
Users can define the name of the new mask file.
NB: during merging of mask files, the n masks (could be from several mask files) are scanned and the
pixels are allocated to new n mask. If a pixel is selected twice or more, it will be allocated to the last
scanned mask containing this pixel. The pixels that are unselected (0) in the mask file are detected
by the function and not used during the merging step. In the end, all the pixels that are not allocated
are transferred into a unselected pixels group (the last mask). Details and information regarding the
import / merge function are printed into the command window of MATLAB
c
(see example below).
Example: Four mask files (Chlorite.txt; Phengite.txt; Plagioclase.txt; and Quartz.txt) generated from
Binary module have been imported. Some pixels are not allocated to any group and there are trans-
ferred toward a new mask number 5: unselected pixels. The number added after the mask file names
(−1 in this examples) corresponds to the reference of the mask in the corresponding file.
[B1303] The button Export mask file allows the selected mask file (in menu [M1301]) to be
exported. It is possible to select which mask will be exported. Note that any unselected pixel is set to
zero and will be classified as unselected_pixels by the import and merge function [B1302].
3.4.4 Corrections
[M1401] The menu correction method allows a correction method to be selected. This correction
will be applied using the button [B1401]. List of requirements and button strings are shown in tab.
3.1. The corrections are described in the following sections.
[B1401] The button activate / set / apply correction enables applying the correction selected in
menu [M1401]. Corrections involving a correction mode (see details in Tab. 3.1) need to be validated
in order to apply the correction and exit the correction mode.
Figure 3.16 – Examples of BRC correction with various X and Q parameters. This small map (35 × 35 pixels2 )
exhibits three phases (Phase 1 in red; Phase 2 in green; Phase 3 in blue). Pixels removed by BRC are plotted
in black. A complete description of this map can be found in Fig. 1.3.
52 Chapter 3. Program description
BRC is a very simple mathematical correction based on the mask file only. BRC does not take into
account the chemistry of the pixels. This is the reason why it belongs to the user to check the size of
the mixing zone and to select the correct set of parameters to remove the right amount of pixels.
Considering a mask i.e., a matrix with ones where the pixels are allocated to the selected phase, and
a given pixel:
px (i, j) (3.5)
with
(( X − 1)/2) < i < imax − (( X − 1)/2) (3.6)
and
(( X − 1)/2) < j < jmax − (( X − 1)/2) (3.7)
with X the size of the scanning window in pixel (odd number >= 3) and Q the reject criterion in %.
This filtering procedure is applied to all the pixels of all the masks.
The equation (3.8) implies that the BRC may not filter the pixels located at the rim of the map. The
width of this rim is exactly ( X − 1)/2 pixels.
Examples of BRC correction are given in fig. 3.16. Corrections are applied to a small map exhibiting
three phases plotted with three colors (red, green and blue in Fig. 3.16a). Several combinations of X
and Q parameters have been tested and results are reported in figs. 3.16b, c, d and e. For a fixed Q of
100%, it comes out that ( X + 1)/2 pixels are removed for both horizontal and vertical boundaries.
TRC correction are done using the TRC module (Fig. 3.17) that is activated by selecting TRC in menu
[M1401] and pressing the button [B1401].
NB: The BRC correction may be applied before to use the TRC correction. If the pixels showing mix-
ing compositions are removed, the variations of chemistry correlated with topographical variations
can easily be characterized.
3.4. X-ray 53
Figure 3.17 – Example of TRC correction for Si using the TRC module. In this example, BRC correction has
been applied and the black contours are visible in the map in (a). In the diagram X-ray intensity against TOPO
intensity, each cloud is a mineral. (a) display mode; (b) correction mode with a phase selected.
54 Chapter 3. Program description
An example of TRC correction is given in figure 3.17. One element (e.g. Si) can be selected using
the menu X-ray maps (Fig. 3.17a). Two plots are generated: a diagram Si intensity against TOPO
intensity and a map of Si intensities.
The correction may only be applied for one element and one phase because the variations of X-ray
intensities with TOPO intensities are matrix-dependent. In figure 3.17b the phase quartz is selected
to correct for Si. A linear relationship (red line in Fig. 3.17b) is defined by user after pressing the
button Define a correction. The corrected intensities are reported in a new diagram Si intensity against
TOPO intensity and in a map of Si intensities (right diagrams in Fig. 3.17b).
As the corrections have been defined, the parameter a can be copied (button Copy) to be directly
applied to an other phase by using the button paste. A correction can be removed by using the button
Delete.
Once all the phases have been corrected, the corrections can be applied using the button Apply cor-
rections and exit TRC. This function closes the correction module and send back the corrected data to
XM AP T OOLS.
A confirmation window is operating before to exit the correction module because the TRC correction
is an irreversible process. The new intensities corrected for TRC replace the raw intensities. However,
original data are still preserved in the X-ray files. Obviously, TRC may be applied many times on the
same data.
MPC correction mode may be activated by selecting MPC in menu [M1401] and pressing the button
[B1401].
The selected map position can be edited by using the arrow buttons. Use the button [B5501] arrow
up to move up, the button [B5502] arrow down to move down, the button [B5503] arrow right
to move right and the button [B5504] arrow left to move left.
The MPC correction mode is disabled when the user presses the button apply [B1505] located below
the arrows. The corrections are applied to the selected X-ray map.
3.4. X-ray 55
SPC correction mode may be activated by selecting SPC in menu [M1401] and pressing the button
[B1401].
The spot analyses used as internal standards can be moved by using the arrow buttons. Use the
button [B5501] arrow up to move the analyses up, the button [B5502] arrow down to move the
analyses down, the button [B5503] arrow right to move the analyses right and the button [B5504]
arrow left to move the analyses left.
The SPC correction mode is disabled when the user presses the button apply [B1505] located below
the arrows. The corrections are applied to position of the standards.
TRC correction are done using the IDC module (Fig. 3.18) that is activated by selecting IDC in menu
[M1401] and pressing the button [B1401]. It is strongly recommended to apply this correction to a
homogeneous phase (e.g. quartz for Si).
An example of intensity drift is reported in figure 3.18. The measured map of Si in titanite (Fig.
3.18a) exhibit vertical variations of the number of counts for Si. this variation is caused by a a
time-dependent drift caused by variation of the vacuum conditions in the gun. The relative range of
variation is about 14% in this example. All the elements recorded during the same pass are affected
in a similar way.
In the correction parameters (Fig. 3.18) it is possible to specify the direction of acquisition, i.e.
horizontal or vertical (vertical in the example shown in Fig. 3.18). A BRC correction can be used
in the correction module. Note that this correction is only used to generate the composition profile
and is not sent back to the main program after correction. The interpolation method can be chosen
among:
Figure 3.18 – Module to perform the IDC correction. In this example, Si in titanite is used to detect the time-
dependent intensity drift (in counts) during the first scan. Note that the abrupt decrease of intensity was caused
by a vacuum failure in the gun.
The lines (vertical mode) or columns (horizontal mode) of intensities of the selected element are
summed up and displayed as a 1D profile (Fig. 3.18). The red dot show the average intensity of each
line or column with the relative error and standard deviation uncertainty enveloppe (at 2σ).
A correction scheme can be defined by pressing the button Add a new correction. The interpolation
points used to define the correction function are selected by clicking onto the figure (see black points
in Fig. 3.19). This selection is always done from left to right; a new point is registered only if the
X coordinate is higher than the previous point. At least 2 points are required to define a correction
function. The selection mode is deactivated by doing a right-clic.
The correction function used the method defined in the correction parameter (see above) to interpolate
the points (green curve in Fig. 3.19). The interpolation method can be changed after the selection of
the points.
The correction map (see map in Fig. 3.19 in percentage) is obtained by duplicating the correction
function for the number of columns (vertical mode) or rows (horizontal mode). The corrected profile
is also displayed.
Note that the message in the display window change once the correction has been applied to a given
element (compare Fig. 3.18 and Fig. 3.19).
The selected correction scheme can be applied to other element, for example if they have similar
intensities and have been measured during the same pass. Press Apply to apply the correction scheme
3.4. X-ray 57
Figure 3.19 – Module to perform the IDC correction. The correction for Si in titanite has been defined in the
chemical diagram.
to a selected element. Press Edit to change the selected correction scheme. Press Reset to reset the
correction of the selected element.
Once all the element have been corrected for time-dependent drift, the corrections can be applied
using the button Apply corrections and exit IDC. This function closes the correction module and send
back the corrected data to XM AP T OOLS.
A confirmation window is operating before to exit the function because the IDC correction is also an
irreversible process (except if you manually proceed to the exact inverse correction in a new run). The
new intensities corrected for IDC replace the raw intensities stored in the X-ray workspace. However,
original data are still preserved in the X-ray files. Obviously, IDC may be applied many times on the
same data.
It is also possible to export the corrected maps as text files. The files are automatically stored in the
working directory in a subfolder CorrectedMaps. These maps can imported in XM AP T OOLS using
the import function [B1101]. Be careful to not apply twice the deadtime correction.
An example of background correction is given in Lanari et al. (2018) to be compared with the ad-
vanced standardization method.
58 Chapter 3. Program description
The region-of-interest is a polygon for which each - consecutive - corner is set by clicking onto the
image (see spots 1 to 10 Fig. 3.11b). the selection mode is disabled using right-clicking (spot 11, in
Fig. 3.11b). The polygon is closed without taking into account the right clicking position, see dashed
line in figure 3.11b. For all the maps available in the workspace X-ray and the phase in selected
[M1102] all pixels inside or outside the region-of-interest are eliminated.
The eliminated pixels cannot be recovered. Note that it is still possible to reload the original maps.
Example: The file Standards.txt has been read. Ten oxides are provided and the corresponding
elements are printed (Si, Mn, K, Na, Fe, Al, Cr, Ca, Mg, Ti). The X-ray maps that have the same
names may be standardized using these standard analyses. 139 spot analyses have been read and
correctly imported.
[B1502] The button display intensity vs composition chart allows the compositions of the inter-
nal standard spot analyses to be compared with the intensities of the corresponding pixels of the map
selected in the menu [M1101].
Example: The function display intensity vs composition chart has been used to compare the com-
positional data for Al in spot analyses (in wt.% Al2 O3 in Fig 3.20a) and in the X-ray map Al (Fig
3.20b). The correlation coefficient is 0.97.
Standards t e s t i n g . . . ( E l e m e n t : Al ) . . .
Standards t e s t i n g . . . ( Correlation : 0.96754)
Standards t e s t i n g . . . ( E l e m e n t : Al ) . . . . Ok
[B1503] The button check quality of std/maps positions allows the positions of the internal stan-
dard analyses to be tested against the intensities of the X-ray maps. This function checks all the map
names and search for the corresponding oxides or elements provided with the spot analyses. All the
imported maps must have a corresponding element in the standard files. If maps such as TOPO or
BSE or SEI are loaded, they must be deleted (button [B1102]) to use this function.
This function automatically searches the optimal positions of the spot analyses (internal standard)
on the maps. For each element the correlation between the compositions of the spot analyses (in
oxide wt-%) and the compositions of the corresponding pixels (in counts) is calculated. The user
should define ∆X and ∆Y two variables expressed in pixels. For a given spot analysis with the initial
coordinate X j and Yj , the map of the correlation coefficient (τ) for the element Eli is calculated from
the position:
( X j − ∆X, Yj − ∆Y ) (3.12)
to the position
( X j + ∆X, Yj + ∆Y ) (3.13)
The resulting variable τ ( Eli ) is a matrix with (2 ∗ ∆Y − 1) rows and (2 ∗ ∆X − 1) columns.
60 Chapter 3. Program description
Figure 3.21 – Function: check quality of std/maps positions. Correlation coefficients (τ) maps for each element
(Eli ) (see text for details)
Two figures are generated by the function check quality of std/maps positions. The first figure contains
the maps of the correlation coefficients τ ( Eli ) (Fig. 3.21). The original position ( X j , Yj ) is located in
the middle at coordinates (0, 0) and marked by a black star (white squares in Figs 3.21 and 3.22). The
axis values are given in pixels from −∆X to ∆X and from −∆Y to ∆Y. In this example the default
values ∆X = 10px and ∆Y = 10px are used.
The second figure 3.22 can be used to obtain the optimal position (higher number) for all the elements
and is calculated as the sum of square of correlation coefficients ( M ):
M= ∑ El = 1n(τi )2 (3.14)
This method works provided that the individual maps from figure 3.21 show contrasted τ values
ranging from 0.2 − 0.4 to 0.9 − 1. If no good correlation exists, the higher value of the second figure
could not be the optimal position. In this case a problem should have occurred with the transformation
of the map coordinates or the best position can be out of range. Greater values of ∆X and ∆Y might
be used.
3.4. X-ray 61
Figure 3.22 – Function: check quality of std/maps positions. ∑ (τi )2 (see text for details)
[B1504] The button display standards allows the locations of the spot analyses to be displayed
in the main figure (purple circles). The function select/unselect standards [B1506] is available only
when the spot analyses positions are displayed.
[B1505] The button hide standards allows the locations of the spot analyses to be hidden in the
main figure window.
[B1506] The button select/unselect standard (Edit) enables to selected/unselected spot analyses
(internal standards) used for the analytical standardization by selecting them directly on the map.
This button is displayed (i.e. the function is available) after you pressed onto the button display
standards [B1504]. When the button Edit is pressed, the editing mode is activated. Spot analyses
may be selected or unselected by a single click close to their respective locations. Right-clicking
disables the editing mode. Zoom is not allowed during in editing mode, but it can be used before to
switch to the editing mode.
Why do I have to select or deselect spot analyses? The analytical standardization is performed
separately for each phase using a linear relationship between the oxide wt-% compositions of the
point analyses (internal standards) and the corresponding pixel intensities from the X-ray maps. The
calibration line is defined using the median values of the wt-% compositions and the intensities (La-
nari et al. 2014b). For an optimal standardization only the good compositions and intensities must be
used. This means that all the spot analyses showing mixing compositions (i.e. located between two
phases) or in fractures, should not be used and consequently unselected.
NB: Unselected analyses are displayed in black and are ignored during the analytical standardization.
62 Chapter 3. Program description
3.4.6 Standardization
When all required steps are accomplished it is possible to process to the analytical standardization,
i.e., to transform each phase X-ray maps into maps of weight percentage oxide concentration. More
details about this calibration are given in XM AP T OOLS’ papers Lanari et al. (2014b) and Lanari et al.
(2018) .
[M1601] The menu standardization methods is used to select the standardization method that will
be apply by the standardization function.
• Manual (User’s selection) allows you to graphically define the calibration curves for each ele-
ment. This method should be used when the automatic function fails to correctly standardize
the element(s) of a given phase. However, in most cases it has been shown that the problems
may be solved by unselected some bad spot analyses (see procedure in subsection 3.4.5).
The following function is available to transfer the map(s) to the next workspace (Quanti):
• Transfert to Quanti to send the raw data from the X-ray workspace to the Quanti workspace
without standardization. If the raw data are directly standardized map this function is used to
transfer them to the Quanti workspace.
[B1601] The button STANDARDIZE enables to call the standardization function and using the
method selected in [M1601]. Only the compositions of the pixels belonging to the phase selected
in [B1102] are considered during the calibration.
NB: When the standardization is achieved (end of the standardization function) the program gener-
ates a standardized phase containing the standardized data and switches automatically to the next
workspace Quanti updating accordingly the associated objects. The displayed map is also updated
and the standardized data (first oxide in the list) is plotted (see the next section 3.5).
3.4. X-ray 63
Figure 3.23 – Example of standardization for a garnet of the Central Alps after Lanari et al. (2018).
64 Chapter 3. Program description
YC
Y= X (3.15)
XC
Note that the position of C can be automatically or manually defined (see the list of the methods
above).
p p
The X-ray intensities of a given phase p (Yi ) are standardized into oxide weight percentage ( Xi )
using the following relationship:
p XC p
Xi = Y (3.16)
YXC i
Any calibration curve defined with the equation 3.15 intersects the X- and Y-axis origin (0, 0). This
assumption generates systematic deviations for the low-concentrated elements and result in a biaised
standardization.
Example: An example of the advanced standardization of garnet is shown in Figure 3.23. The
advanced standardization is compared with the automated approach for element showing low con-
centrations such as MnO and MgO. A complete discussion is provided in Lanari et al. (2018).
YC − YB
Y= X + YB (3.17)
XC
p
and the standardization of the X-ray intensities for a given phase p (Yi ) into oxide weight percentage
p
( Xi ) is obtained using the relationship:
p p XC
Xi = (Yi − YB ) (3.18)
YC − YB
The elements are listed in the main menu (Fig. 3.24). It is required to go through the element list and
to set the calibration curves. Each item in the element menu is a string containing the element name,
the status and (optional) the method used to define the calibration curve. For a given element, here
aluminium (Al), the string can be:
• Al "Not checked" **??** - No calibration curve is defined yet for this element (the button
Apply auto has not been pressed)
3.4. X-ray 65
Figure 3.24 – Advanced standardization; case: automated - no background correction (here Al in chlorite)
• Al "Automated (no correction)" **OK** - A calibration curve is defined and the automated
method is applied (no background correction). This is diagnostic is made for high X-ray inten-
sity as the background effect on the calibration curve can be neglected (Lanari et al. 2018).
• Al "Manual" **OK** - A calibration curve is defined and the manual mode was used. In this
case, a background correction may or may not be applied, depending on the inputs X, Y and
Back. value.
The button Apply Auto calls an automated calibration function which return either the option No Back-
ground Correction or the option Background Correction determined using the least-square method
or the polyfit method. This button must be pressed once for each element. Pressing this button
again resets the automated calibration mode (for example if manual mode was active). Note: for
elements showing a small intensity-to-background ratio, the background value is approximated from
the intercept of the calibration curve. For elements showing a high intensity-to-background ratio, the
background correction is neglected (Lanari et al. 2018).
The check buttons No background correction, Automated background and Manual background dis-
play the mode being used for the selected element. Select Manual background to activate the manual
mode. Press Apply Auto to reset the display to the automated mode.
Figure 3.25 – Advanced standardization; case: automated - background correction (here Mn in garnet)
defined using the median values of the oxide compositions of the internal standards and intensi-
ties of the corresponding pixels; (2) polyfit, using a point slightly outside the upper limit of the
compositional range on the polyfit function; (3) manual, if the user switched to manual mode.
• Background determination: shows the method used to define the background value. It can be
(1) no background correction, for high intensity-to-background values; (2) auto (least-square)
with or without outlier rejection, if the minimum of the least-square residual function is used;
(3) auto (polyfit) with or without outlier rejection, if the spread is large enough to ensure a good
approximation of the background value; (4) manual background, if the user switched to manual
mode.
• R2 (polyfit): is displayed if the polyfit function has been used.
The figure Automated background correction show the evolution of the residuals with the background
value (e.g. Fig. 3.25). The residuals are computed as the square of the sum of the distances between
the calibration curve and the internal standards for different background values.
The background value as well as the X and Y coordinates of the calibration point are shown in the
window Manual background correction (Fig. 3.25). These values can be edited if the manual mode
is active.
The window Standardization contains a figure displaying the calibration curve(s) together with the
internal standards. The calibration curve without background correction is displayed in black. The
calibration point determined using the median values in red and the one determined using the polyfit
approach in magenta. The calibration curves based on the polyfit approach are shown in magenta
(dashed line, not used, continuous line, used). The calibration curve based on the least-square residual
approach is shown in blue.
3.4. X-ray 67
Figure 3.26 – Advanced standardization; case: manual - background correction (here Ti in garnet)
The button +/- permits to include (shown in black) or to exclude (shown in red) any point from the
calibration set. A single point has to be either added or excluded every time the button is pressed. The
excluded analyses are treated as outliers by the program. The automated optimization is performed
every time a standard analysis is added or removed to the calibration set.
The map figure displays the calibrated map based on the calibration curve defined in the standardiza-
tion figure. The color range is fixed to Min and Max values for non-zero concentrations. A warning
message is displayed in the standardization figure if some pixels have a composition greater than 110
% (for the selected element only). Note that this map allows you to visualise the composition of the
mixing pixels.
(1) Automated calibration curve, method median (red dot) without any background correction (Al
in chlorite, see Fig. 3.24). The calibration curve is plotted in black. Three outliers were found and
automatically rejected by the program.
(2) Automated calibration curve with background correction (Mn in garnet, see Fig. 3.25). In this
case, the calibration curve is plotted in magenta as the polyfit method is used. Note that the best
solution of the least-square method is show as a blue dot.
(3) Manual calibration curve with background correction (Ti in garnet, see Fig. 3.26). The calibra-
tion curve is plotted in green (manual). The dashed curve show the result of the polyfit function (not
used here), the black curve the automated correction without background correction (not used here).
68 Chapter 3. Program description
• It seems that the automated method works fine for > 95% of the cases. For the more compli-
cated ones, it may be needed to switch to the manual mode. Keep in mind that the goal is to
obtained a reasonable calibration curve for the mineral of interest.
• It is critical to avoid spot analyses (standards) showing mixing compositions to obtain an accu-
rate standardization. The quality of the standardization should always be tested by displaying
the sum of the oxide maps (button generate oxide wt-% sum map [B2105], see below). Exam-
ples of bad standardizations are given in the tutorial 6 (see §6.2.7.6).
• For the old project files (older than XM AP T OOLS 2.4.1), it might be necessary to re-standardize
each phase to be able to use all the new features.
3.5. Quanti 69
3.5 Q UANTI
3.5.1 Standardized maps
[M2101] The menu standardized phase allows the standardized phase (corresponding to a stan-
dardized phase) that is displayed in the main figure window to be selected. All the standardized
phase are listed in this menu.
NB: For coding reasons, the first standardized phase name is always none. If none is selected, nothing
happens in the plotting areas and the buttons of the workspace are inactive.
[M2102] The menu elements enables to select the oxide of the standardized phase that is displayed
in the main figure window. This menu is updated for each standardized phase selected in [M2101].
[B2101] The button rename Quanti file allows the name of the standardized phase selected
in [M2101] to be edited. This name was automatically defined during the standardization (format:
[mineral name]-[method used]).
[B2106] The button duplicate Quanti file allows the selected standardized phase to be dupli-
cated.
[B2102] The button delete Quanti file allows the standardized phase selected in [M2101] to be
deleted. This button is available only if two or more standardized phase have been computed.
[B2103] The button export compositions enables exporting oxide analyses from the standardized
phase selected in [M2101]. The generated file is exported in the directory Exported-Oxides. If this
directory does not exist the program makes it in the working directory. Different methods are available
(see Fig. 3.27)
The data are exported to a text file containing a header block and a table with a row for each analysis.
The exported data can easily be imported in Microsoft Excel. Two formatting options are available:
(i) the definition of the oxide order and (ii) the format of the delimiter.
The oxide order must start with the keyword Ref which allows to print out the reference number of
each pixel. All the oxide names corresponding to those listed in are separated by a dash (-). If the
software does not recognize the oxide name, a value of zero is automatically allocated. In the default
order, zero values are allocated to Fe2O3 and XFe3+. The format of the delimiter may be blank or
tabulation.
Ref −SiO2−TiO2−Al2O3−FeO−Fe2O3−MnO−MgO−CaO−Na2O−K2O−Fe3−
65.00 18.58 0.02 20.39 26.76 0.00 0.74 7.85 0.03 0.02 0.18 0.00
66.00 17.36 0.02 17.85 29.55 0.00 0.47 9.74 0.03 0.02 0.10 0.00
107.00 40.71 0.04 12.53 12.25 0.00 0.32 3.91 0.08 0.20 0.07 0.00
The methods available to export data are called : [method reference] method name (what is required).
The required actions / files can be: selection of an area by the user or maskfile, a file with a selection
of pixels generated by XM AP T OOLS. The description of the methods is provided below.
• [1] All pixels - Export all the compositions of the standardized phase selected in [M2101] as
oxide weight percentage analyses. If the map size is very large, the generated file could have a
lot of rows. Some text editing programs can have troubles to read this file (insufficient memory
warning message).
• [2] Selection of pixels (area) - Export all the compositions included in an area defined by the
user of the standardized phase selected in [M2101]. This mode requires to select an area and
press right click to finish. This last action will automatically close the area.
• [3] Random pixels - Export a specified number of compositions randomly selected into the
standardized phase selected in [M2101]. This number may be specified (default, 100).
• [4] Average of groups (maskfile) - This method allows exporting average oxide compositions
of standardized phase selected in [M2101] for all the groups of pixels specified into a given
maskfile. The maskfile may be generated using the modules B INARY and T RI P LOT 3D.
• [5] All of a group (maskfile) This method allows exporting the oxide compositions of a Quanti
file selected in [M2101] for the pixels belonging to one group of a given maskfile. User can
select which mask is used.
• [6] Average of a group (maskfile) - This method works the same way as the method [4]. How-
ever in this case only the average oxide composition of one group is exported including average,
standard deviation and the median values (column format).
• [7] Average of all pixels - This method allows exporting the average oxide composition of all
the compositions of the Quanti file selected in [M2101]. Exported values are average, standard
deviation and median (column format).
• [8] Average + std of selected pixels (area) - Export the average composition and associated
standard deviation of pixels included in an area defined by the user of the standardized phase
selected in [M2101]. This mode requires to select an area and press right click to finish. This
last action will automatically close the area. This function can also apply the external function
selected in [M2303] to the estimated average composition. If the user press yes, the function
runs a Monte Carlo simulation in order to estimate average and standard deviation values of
all the output of the selected external function. The exported file could be easily imported into
Excel. This function is useful to estimate the average composition of an homogeneous domain
of a given phase with a good approximation of the analytical uncertainties on the structural
formula.
3.5. Quanti 71
Figure 3.27 – Menu listing the methods available to export oxide analyses from the selected Quanti file
[B2104] The button apply filter enables creating a new standardized phase from the selected
standardized phase, but only with the composition values ranging between the minimum and maxi-
mum values of the color bar set in [C5101]. This method has been used by Lanari et al. (2013) to
divide each phase into subgroups of compositions prior to P-T study.
[B2105] The button generate oxide wt-% sum map allows the sum of the oxide wt-% composi-
tions to be displayed. This new map can only be displayed for checking purposes (no for computa-
tions, as it is not saved in the project). Color bar minimum and maximum values can be adjusted and
the image exported using the function export ([B5102]).
[B2201] The button display calibration curves enables displaying a new figure with the compo-
sition of the standards (spot analyses, in oxide wt-%), against the composition of the corresponding
pixels (X-ray maps, in number or counts) and the calibration curves.
Warning: This functionality is not available in the version 2.4.1 (and the following updates) for
standardizations that have been computed with 2.3.1 and previous versions. In this case, it is recom-
mended to re-standardize your phases. Note that the following function is not affected and can still
be used to check the quality of the standardization.
[B2202] The button test standardization enables drawing diagrams showing the compositions
of the standards (spot analyses, in oxide wt-%), against the compositions of the corresponding pixels
(standardized maps, in oxide wt-%). This technique is basically used to detect the elements for which
the chemical variability could be below detection limit for the mapping conditions (Lanari et al.
2014b).
72 Chapter 3. Program description
NB: Before the first use of a function, user should perform tests in order to check the results of the
function (see the section 4.3.3 How can I check the results of an external function?)
[M2301] The menu external function group lists the groups of external functions available and can
be used to set which group is active. The external functions are grouped in five groups:
• Structural formulas: Structural formula functions groups the function to calculate structural
formulas of the selected standardized phase.
• P,T and P-T /Map mode: These functions aims to calculate temperature (T) and/or pressure
(P) of crystallization for a given phase, for each selected pixel of the map, which is turned into
P, T, or P and T maps. For each pixel of the input map, the equilibrium conditions are derived
using the pixel composition and fixed variables such as coexisting phase composition, or P or
T.
• P,T and P-T /Spot mode: These functions aims to calculate T and/or P of crystallization
for a given set of pixel. XM AP T OOLS generates a composite chemical map displaying the
compositions of the phases of interest. Set of pixels may be selected directly on the image and
the corresponding compositions are used to estimate the equilibrium conditions.
[M2302] The menu external function subgroup lists the subgroups of external functions available
in a given group set in [M2301].
[M2303] The menu external functions lists the external functions available in a given subgroup set
in [M2302].
[B2301] The button COMPUTE enables running the external function selected in [M2303]. The
data of the standardized phase selected in [M2101] are used as input data.
[B2302] The button external function info window allows the function info window (see Fig.
3.28) to be displayed. This module aims to display info regarding the external functions available in
XM AP T OOLS such as:
• External function name the name of the MATLAB function file with .m extension
• Input parameters as defined in ListFunctions.txt (or if used the user’s file ListFunc-
tions_USER.txt). NB: The name of the variables should be compatible with the XM AP T OOLS
element names defined in Xmap_Default.txt
• Output parameters Names of the output variables generated by the external function
• Comment block displaying the first command block of the selected external function
3.5. Quanti 73
The function merge standardized phases sums up the selected standardized phases. This functions
does not check if the same standardized phases is selected twice, e.g. same phase but with two
different standardizations. If the composition of one pixel is provided in two or more standardized
phases, the result will be the sum of the compositions. As explained before the function generate
oxide wt-% sum map [B2105] should used to check that the oxide wt-% sum values are coherent with
the expected values for the occurring mineral phases.
If the check box Border interpolation is selected, a reference element is needed to perform the bor-
der interpolation. This reference element is used to estimate the composition of the missing pixels
between the two surrounding phases. This interpolation is done only there is missing pixel between
phases. Two additionally parameters (X-n->X+n and OnGarde) are required. X-n->X+n is the size
of the window in pixel used for the interpolation. OnGarde is an parameter defining the sensibility of
the correction (ranging between 0.1 and 1). The default values, 2 and 0.5 respectively, are the optimal
value for most cases.
[B2406] The button generate a density map (from selected mask file) allows a density map to be
generated. Such density map may be used to generate a density-corrected oxide map. The procedure
to export local compositions is discussed in the section 1.5.1. Density of phases may be defined in the
file Classification.txt below the keyword >2 (see example in code 3.14). Nb: The order of the density
74 Chapter 3. Program description
values is the same as the mask above. If phase densities are not provided in Classification.txt, a new
window opens allowing user to define them.
>1
Biotite 367 556
Paragonite 433 741
Nepheline 307 801
Albite 177 224
Rutile 500 415
>2
2918
2921
2590
2599
4203
Code 3.12 – File Classification.txt including specific density (after the keyword >2)
[B2407] The button display the density map allows the density map to be displayed. This func-
tion is available only if a density map was calculated. Local density along profiles or within domains
can be estimated using the sampling functions [B5201], [B5202], [B5203] and [B5204]);
[B2408] The button compute a density-corrected oxide map enables generating a density-
corrected oxide map. User can define the name of this new map. The default name begin with
*DCM abbreviation of density-corrected map. As detailed in the section 1.5.1, DCM value of a pixel
i (DCMi ) is computed from the composition in oxide weight percentage of this pixel (Ciwt ) using the
following relationship
ρi
DCMi = C wt (3.19)
ρmixture i
with ρi the pixel density that is the density of the corresponding phase and ρmixture the local average
density of the selected pixels, i.e. those having a non-zero composition.
DCM . . . ( D e n s i t y c o r r e c t e d map ) . . . p r o c e s s i n g
DCM ... − M a s k f i l e : Meth2−M a s k F i l e 2
DCM ... − Map a v e r a g e d e n s i t y : 2 7 0 3 . 7 0 6 3
DCM ... − S e l e c t e d p i x e l s : 813246/870400
DCM ... − Local average d e n s i t y : 2688.646
DCM ... − New Q u a n t i f i l e : ∗DCM−Merged_Map_BioAlpine
DCM . . . ( D e n s i t y c o r r e c t e d map ) . . . done
[B2409] The button select an area and eliminate pixels outside enables eliminating the pixels
outside a region-of-interest. This region-of-interest is defined by selecting spots that define a polygon
which is converted by the program into a mask (see spots 1 to 10 Fig. 3.11b). Selection mode
is disabled using right-clicking (spot 11, in Fig. 3.11b). The polygon is closed without taking into
3.5. Quanti 75
account the right clicking position, see dashed line in figure 3.11b. For the standardized phase selected
in [M2101] all pixels outside the region-of-interest are eliminated.
[B2410] The button select an area and eliminate pixels inside enables elimnating the pixels
inside a region-of-interest (description of the selection mode is given above). For the standardized
phase selected in [M2101] all pixels inside the region-of-interest are eliminated.
[B2402] The button export local composition: map allows the average oxide composition of the
standardized phase or density-corrected map selected in [M2101] to be exported. This function has
been designed to work with merged maps with or without density correction (see function [B2401]).
The generated file (see code 3.14) is exported in the directory Exported-LocalCompos. If this direc-
tory does not exist the program makes it in the working directory.
Al2O3 24.3961
CaO 0.021694
Cr2O3 0.057805
FeO 19.6617
K2O 3.6851
MgO 6.8446
MnO 0.35621
Na2O 0.33612
SiO2 34.833
TiO2 0.18467
SUM 90.3769
[B2403] The button export local composition: area enables exporting the average oxide compo-
sition of pixels included in an area defined by the user of the standardized phase selected in [M2101].
This mode requires to select an area and press right click to finish. This last action will automatically
close the area. The generated file is exported in the directory Exported-LocalCompos. If this directory
does not exist the program makes it in the working directory.
[B2405] The button export local composition: ellipse (3D) enables exporting the average oxide
composition of pixels included in ellipse defined by the user of the standardized phase selected in
[M2101]. The composition of each small ellipse is extrapolated from 2D surface to 3D volume of an
ellipsoid (e.g. code 3.15).
This mode requires to define a primary ellipse with a long axis between point 1 and 2 and a short
axis with point 3 (Fig. 3.29). Then integrations are defined from the conter to the rim of the primary
ellipse (see points a, b and c on Fig. 3.29).
3.5. Quanti 77
L o c a l c o m p o s i t i o n ( E l l i p s o i d ) from XMapTools
12−Nov − 2015
Reference e l l i p s e information :
C e n t e r p o s i t i o n (X, Y) 338.86 338.86
S l o p e Major a x i s 1.89
R a d i u s Major a x i s 918.78
R a d i u s Minor a x i s 535.68
S u r f a c e ( Nb o f p i x e l s ) 386429.00
S u r f a c e ( i n px ^ 2 ) 1546191.93
Integrations :
Number o f i n t e g r a t i o n s 4.00
Integration values 0.3802 0.6565 0.8301 1.0000
Volumes i n t e g r a t i o n s ( px ^ 3 ) 1041 e6 4319 e6 5475 e6 8104 e6
Volumes f r a c t i o n s 0.0550 0.2280 0.2890 0.4279
Nb p i x e l s i n t e g r a t i o n s 55889 110689 99739 120112
S u r f a c e i n t e g r a t i o n s ( px ^ 2 ) 223 e3 442 e3 399 e3 480 e3
S u r f a c e f r a c t i o n ( from px ) 0.1446 0.2864 0.2581 0.3108
S u r f a c e f r a c t i o n ( i n px ^ 2 ) 0.1446 0.2864 0.2580 0.3108
Compositions i n t e g r a t i o n s :
Al2O3 24.920 25.508 23.386 22.140
CaO 0.088 0.170 0.275 0.497
FeO 1.873 1.010 0.571 0.607
K2O 2.560 1.701 1.520 1.100
MgO 4.150 2.046 1.091 0.882
MnO 0.057 0.055 0.059 0.060
Na2O 7.985 9.470 11.300 11.425
TiO2 1.529 2.183 1.775 0.360
SiO2 54.799 56.254 59.698 62.701
Extrapolated ( e l l i p s o i d ) l o c a l Compositions :
Al2O3 23.421
CaO 0.336
FeO 0.758
K2O 1.439
MgO 1.388
MnO 0.058
Na2O 10.754
TiO2 1.249
SiO2 59.928
SUM 99.3309
[B2412] The function export local composition: variable-size rectangle can be used to estimate
the change in local bulk composition between two rectangular areas along n steps (Fig. 3.30 and
3.31).
• Define the reference domain with a rectangle shape by clicking two pixels (see Fig. 3.30-a).
• Choose from which corner of this rectangle you want to define the smallest rectangle (see
Fig. 3.30-b). The available options are: top-left corner, top-right corner, bottom-left corner,
bottom-top corner. In the example shown in figure 3.30-c, the top-right corner is selected (red
arrow in b).
78 Chapter 3. Program description
• Define the smallest rectangle from the selected corner (see Fig. 3.30-d).
• Define the number of steps, i.e. the number of samples along the dahsed line in figure 3.30-c
Three figures are generated plotting some variables against the surface fraction of the reference rect-
angle:
• The first figure shows the relative difference (in %) for the local bulk composition of the avail-
able oxide (see for example the diagram in Fig. 3.31). As the relative difference of the local
bulk composition is expressed relative to the reference rectangle, it comes out that for x = 1,
yi = 0.
• The second figure shows the variation of the concentration expressed in the unit of the stan-
dardized maps, usually oxide weight percentage.
• The third figure shows the absolute difference in the unit of the standardized maps, usually
oxide weight percentage.
Note: This function does not save any file with the composition of the successive domains.
3.5. Quanti 79
Figure 3.32 – Procedure to export composition build from proportions. (a) number of phases and their (b)
names, (c) modal proportion, and (d) compositions.
Warning: The function export local composition: variable-size rectangle does not work with rotated
maps. If the rotate function is being used, the program will ask you to restore the original orientation.
[B2404] The button export composition build from proportions enables exporting a local bulk
composition computed using mineral compositions and mineral proportions set by user. For example,
it is possible to estimate the bulk composition of an assemblage made of 50% chlorite 30% K-white
mica and 20% quartz using this function (see Fig. 3.32). The following steps are required:
• Set the input compositions for each phase by selecting one pixel on the displayed map
The generated file (see code 3.14) is exported in the directory Exported-LocalCompos. If this direc-
tory does not exist the program makes it in the working directory.
80 Chapter 3. Program description
L o c a l c o m p o s i t i o n ( P r o p o r t i o n s ) from XMapTools
( 3 ) Local Composition :
Al2O3 21.202
FeO 15.9654
K2O 2.7135
MgO 6.4736
Na2O 0.44197
SiO2 46.5449
TiO2 0.1255
3.6 R ESULTS
3.6.1 Results from external functions (Results)
[M3101] The menu results phase enables to select the result (corresponding to the output of an
external function) that is displayed in the main figure window. All the results computed are listed in
this menu.
NB: For coding reasons, the first result name is always none. If none is selected, nothing happens in
the plotting areas and the buttons of the workspace are inactive.
[M3102] The menu elements & variables allows the variable of the result to be selected. This menu
is updated for each result selected in [M3101].
[B3101] The button rename result enables editing the name of the result selected in [M3101].
This name was automatically defined during the computation of the external function (format: [Func-
tionName]).
[B3102] The button delete result allows the result selected in [M3101] to be deleted. This button
is available only if two or more results have been computed.
[B3103] The button export compositions (results) enables exporting variables from the result
selected in [M3101]. One file is generated for each selected variable. The generated files are matrixes
with the same size as the original map. This file is exported in the directory Exported-Results. If this
directory does not exist the program makes it in the working directory.
[B3104] The button APPLY FILTER allows a new result to be created from the one selected in
[M3101], containing only the pixels within the compositional range defined in [C5101].
[B3105] The button delete a variable enables deleting the variable selected in [M3102] of the
result selected in [M3101].
82 Chapter 3. Program description
[B3302] The button compute a relative map allows a relative map to be computed. A reference
pixel shall be defined by clicking on the image (Fig. 3.33a). New maps are generated and saved in
a new result; these maps show the relative variation of each pixel composition to the composition of
the reference pixel. A new result is generated with the name REL_NameOriginalResult. Two maps
are included:
• Diff_rel shows the relative difference in composition for each pixel to the composition of the
reference pixel (e.g. Fig. 3.33b). This map has no unit. For a map A (matrix) and a reference
pixel with a composition R, Di f f _rel is simply obtained by:
A
Di f f _rel = (3.20)
R
• Diff_per shows the relative difference in composition for each pixel to the reference pixel
expressed in percentage (e.g. Fig. 3.33c).
( A − R)
Di f f _per = × 100 (3.21)
R
Note 1: The undefined pixels are plotted with a relative difference of -100 %.
Note 2: The function enable auto-contrast does not work properly with relative maps that can
contain negative value (as the one shown in Fig. 3.33c). Only the pixel with positive values are
considered by the auto-contrast function.
3.6. Results 83
Figure 3.33 – Relative maps. (a) Silicon map of phengite in atom per formula unit (apfu). The reference pixel
used to compute (b) and (c) was selected in the Si-rich phengite (3.37 apfu) and is plotted in magenta. (b) Map
of Si in phengite showing the relative composition of each pixel to the reference pixel (see Eq. 3.20). (c) Map
of relative differences expressed as percentage (see Eq. 3.21).
84 Chapter 3. Program description
Trace element concentration maps such as REE can be plotted in spider diagrams using the chemical
module Spider [B3301]. Note that this module is only available in the workspace Results and will
work only with LA-ICP-MS maps having compatible names (see §2.6.2).
In the following, this module is described using the example of a merged map of oxide wt-% compo-
sitions of chlorite, phengite and quartz for which SiO2 is plotted against MgO (Fig. ??a). The sample
used in the figure is a greenschist facies metapelite from the western Alps investigated by Aude Verly.
The main buttons and options are available in the Binary module (see Fig. 3.36) are:
Main menus (X & Y) to select the maps used as input for the variables X and Y (e.g. SiO2 vs MgO
in Fig. 3.36). The maps listed in these menus depend on the workspace from which Binary is called.
Plot options contain some tools controlling the display of the binary diagram.
• Xmin, Xmax, Ymin, Ymax display the range of composition displayed for X and Y axes.
• Auto (button) automatically adjust the range of each axis to have exactly 99.9 % of the pixels
compositions plotted.
• Reset (button) resets the original display and plot all the pixel compositions.
• Zoom (button) sets the range of each axis using a rectangle defined by clicking on the figure to
select 2 points.
• Export (button) opens the figure in a new window (check the description of [B5102] to see how
to save figures).
• LOG (x-axis) the mode of the horizontal axis is set to log if this option is selected.
• LOG (y-axis) the mode of the vertical axis is set to log if this option is selected.
• Histogram options to set the number of bins (default 50) and to export the figures.
Note 1: If log axis are shown when a selection is made to Identify Pixels, the shape of the polygon is
not correct, whereas the color of the selected pixels are.
3.7. Chemical modules 87
Figure 3.37 – Multi-Groups functions in the Binary module. (a) Quick (rectangle) using 2 groups: chlorite
(red) and phengite (blue). (b) Free shape using 3 groups: chlorite (red), phengite (green) and the mixing pixels
between them (blue)
Note 2: The log axis are not compatible with the density plot and the export function.
• Single group: quick (rectangle) uses a rectangle defined by two points; one group
88 Chapter 3. Program description
Figure 3.38 – k-means clustering in the Binary module. (a) clustering in the system [ XGrs , XSps ] using 5
clusters (see the spots for the initial centroids) and the method sqEuclidan. (b) map showing the spatial
distribution of each final cluster. (c) The clusters are plotted in a binary diagram X Alm vs XGrs . Note that the
cluster distribution was computed in a different binary system, it allows possible relationships (or absence of
relationships) to be identified. In this example, the groups 4 and 5 have similar compositions in Fe (X Alm ) and
Ca (XGrs )
3.7. Chemical modules 89
• Single group: free shape uses a polygone defined by n points (right-clicking to validate); one
group
• Multi-group: quick (rectangle) uses several rectangles, each of them defined by two points
(right-clicking to validate); several groups
• Multi-group: free shape uses several polygones, each of them defined by ni points (right-
clicking to validate each group); several groups. A menu is displayed once each group is
selected asking if an additional group should be added or not.
Note: Details such as the relative proportion of each group are displayed in a small window above
the map.
The k-means algorithm computes centroid clusters based on one of the following method (can be
selected in the menu method):
• sqEuclidean - Squared Euclidean distance (recommended). Each centroid is the mean of the
points in that cluster.
• cityblock - Sum of absolute differences. Each centroid is the component-wise median of the
points in that cluster.
• cosine - One minus the cosine of the included angle between points (treated as vectors). Each
centroid is the mean of the points in that cluster, after normalizing those points to unit Euclidean
length.
Clustering large datasets might take time. A window is displayed when the k-means function is
working; please wait until the waiting window disappears before using the Binary module.
K-means (Maskfile menu) lists the mask files generated by the k-mean function in the Binary mod-
ule. It is possible to select a mask file to display the corresponding clusters.
Plot (button) this button allows the original binary diagram in which the clusters of the selected mask
file were generated to be plotted. This button is only available when a mask file is selected.
Map (button) displays a map showing the spatial distribution of each cluster of the selected mask
file.
Figure 3.39 – Chemical modules TriPlot3D (a) identify pixels, (b) multi-group
3.7. Chemical modules 91
The variables for RGB spot window (Fig. 3.40) enables selecting three maps that will be used to gen-
erate the RGB map. The auto-contrat buttons works in the same way as those available in XM AP -
T OOLS. If an element is selected again using the corresponding menu, the program restores the
original limits, i.e. the min and max non-zero values of the selected map. The button Log scale allows
to use a log scale in the corresponding histogram figure.
The RGB image is updated and plotted with a special colorbar. The buttton export allows the figure to
be opened in a new MATLAB
c
figure window (check the description of [B5102] to see how to save
the figures).
If the contrasts of some of the channels are restricted to narrow ranges of composition, some pixels
of the image can turn white. In order to avoid this, there an option available below the export button.
• [Output] the name of the new map. This name is not required to be a valid variable name, in
this case XM AP T OOLS will generate a valid variable name (see the example below). Note that
for several reasons the name cannot have any space in it.
• [Operation], an arithmetic operation defined by the rules of linear algebra or array arithmetics.
The operation can contain empty spaces between variables digits and operators. Array operators
(with the period character ".") must be used if maps are divided or multiplied by each other.
Use of semicolon at the end of the instruction is optional.
A+B % addition
A−B % substraction
A. ∗ B % Element −w i s e m u l t i p l i c a t i o n
A. /B % Element −w i s e d i v i s i o n
A. ^ B % Element −w i s e power
Example 1 - Let’s consider two compositional maps with identical size, Fe and Mg expressed in
atom per formula unit. The ratio map Mg divided by Fe can be obtained using the following code:
Note that element-wise division is used "./" in order to divide the two arrays element by element.
The module generates a new map with the display name Fe/Mg, the corresponding variable name is
Fe0x2FMg. Indeed / cannot be used in variables name and the G ENERATOR needs to create a valid
name to be used in further operations.
Example 2 - Let’s consider the same maps Fe and Mg. The Mg# map can be obtained using the
following code:
Mg# = ( Mg./( Mg + Fe)) ∗ 100 (3.24)
Note that element-wise division is again used "./" whereas the multiplication is arithmetic (∗) as
an array is multiplied by a number. In this example, all the elements are multiplied by 100. The
G ENERATOR module generates a new map with the display name Mg#, the corresponding variable
name is Mg0x23. Indeed # cannot be used in variable names.
Example 3 - Let’s consider two compositional maps with identical sizes showing the concentration
of 175 Lu and 147 Sm in garnet, expressed in ppm. The average slope of the HREE normalized to
chondrite can be obtained using the following code:
Note that the valid variable name of the map 175Lu is x175Lu as a variable name always starts
with a letter. This conversion is automatically done by XM AP T OOLS: any map name starting with a
number will have a variable name starting with x. Element-wise division is used "./" to divide the two
normalized maps, while each normalization is performed with arithmetic division. The G ENERATOR
module generates a new map with the display name LREE_slope. In this case the variable name is
identical.
[1] Plot options (Fig. 3.41a) The menu can be used to select the map to display. The function Auto
Cont. automatically adjusts the colorbar limits (see [B5101] for details). Select a map in the menu
to reset the display to min and max values. The Min and Max fields allows the colorbar limits to be
manually adjusted (note that Max must be greater than Min). The function export opens the displayed
map in new MATLAB
c
windows (see [B5102] for details).
[2] List of maps (Fig. 3.41a) This table shows the maps and the corresponding variable names
available in the G ENERATOR module. If the map name is a valid variable name, this name is used as
variable name (default). Map type are:
• Input: map sent by the main XM AP T OOLS program to the G ENERATOR module; cannot be
modified. These maps are not exported when the G ENERATOR module is closed.
• Output: map created by the G ENERATOR module that is transferred to the main XM AP T OOLS
program when the G ENERATOR module is closed using the button Exit and Save maps.
[3] Exit and Save maps (Fig. 3.41a) This button is available only when new maps have been
created. To close the interface and unfreeze XM AP T OOLS, use the close button in the top left corner.
[4] Code input (Fig. 3.41a) Input for the code that will be evaluated to generate new variables
(maps).
[5] Generate (Fig. 3.41a) Button to generate the map using the code given in (4).
[6] Classical operations (Fig. 3.41a) Menu listing the type of classical operations available in
XM AP T OOLS. Each menu item correspond to a block of operations. The input file containing the
bloc definitions is available in Program/Dev/Xmap_VarDefinition.txt.
[7] List of operation (Fig. 3.41a) Table showing the operations available in the block selected in
the menu (see step 6). The results of the test function are listed in the the column check:
• Ok: All the maps are available to create this new variable and the variable does not already
exist.
• Fail: At least one of the map used in the code is missing; this variable cannot be created.
94 Chapter 3. Program description
Figure 3.41 – G ENERATOR module graphical user interface (a) before to generate a new map; (b) after gener-
ating new maps
3.7. Chemical modules 95
Figure 3.42 – Spider diagram of REE in garnet using (a) 1%, (b) 5% and (c) 20% of the pixels of the map. See
Fig. 3.43 for x labels.
[8] Read and Generate (Fig. 3.41a) This function create all the variables of the block selected in
(6) that passed the test (see column check in (7)).
[1] List of maps (Fig. 3.41b) The new maps are added to the table. The corresponding variables
can be used; the maps can be sent back to XM AP T OOLS (see below).
[2] Exit and Save maps (Fig. 3.41a) This button is available only when new maps have been
generated. To close the G ENERATORinterface and unfreeze XM AP T OOLS without saving the new
maps, use the close button in the top left corner.
Figure 3.43 – Spider diagram of REE in garnet using the sampling method: spot analyses. Map: 89 Y (red high
concentration, blue low concentration, in ppm, see Fig. 3.44 for color scheme)
[2] Spot(s): The button Spot(s) enables selecting pixels to plot in the spider diagram. As usual in
XM AP T OOLS, use right-clicking to leave the selection mode. An example of selection of 20 spots
from garnet core to the rim is provided in figure 3.43. Note that the colors of the spot corresponds to
the colors of the lines in the spider diagram.
[3] Line: The button Line enables selecting two pixels and plotting the composition of the pixels
along the line. An example of selection of line from garnet core to the rim is provided in figure
3.44. Note that the colors of the first and last spots correspond to the colors of the lines in the spider
diagram.
[4] Area(s): The button Areas enables selecting one or more area(s) and plotting the corresponding
average compositions of the pixels. An example of selection of three areas from garnet core to the
rim is provided in figure 3.45. Note that the colors of the spot corresponds to the colors of the lines
in the spider diagram. In this case the standard deviation (1σ) envelopes are displayed together with
the average. This mode can be activated using the option below the button Area(s). The envelope is
not displayed if (mean − std) < 0 or (mean − std) = 0.
The curves are plotted using the color scheme defined in the corresponding menu (see below).
The map and the spider diagram are cleaned every time a new sampling tool is used. The option hold
on (see Fig. 3.44) can be selected in order to add a new set of curves onto an existing spider diagram.
• Auto Cont. button to automatically adjust the colorbar limits (see [B5101] for details)
• Min and Max values to manually adjust the colorbar limits (note that Max must be greater than
Min)
3.7. Chemical modules 97
• Export this function allows the map and spider diagrams to be exported in new MATLAB
c
The following color schemes are available to draw curves using the spot and line modes:
Note: it is possible to change the active color scheme between each plot.
• Select your favourite color scheme using the color menu (e.g. X-Bred (2) in Fig. 3.47a).
• Activate the option Generate movie: two new fields appear (see Fig. 3.47a)
• Select your sampling mode (spot or line) and click on the corresponding button
• A new window opens; resize the window and press the button RESIZE THE FIGURE AND
CLICK HERE to continue and to generate the movie (Fig. 3.47b)
• The frames are generated (note that the duration depends on your computer and on the number
of points; it is independent of the movie duration) and this figure disappears.
• The video myfile.avi is saved in your working directory. Rename this file. Note that if a file
with the same name already exists it will be automatically replaced.
3.7. Chemical modules 99
Figure 3.47 – Video mode of the S PIDER module. (a) The option Generate movie is active and it is possible to
edit the duration of the video in second and the quality (between 10 and 100 %). (b) Figure used to generate
the movie; this figure can be resized before to start recording the movie. (c) live mode. (e) video (myfile.avi)
A DDITIONAL TIPS AND ADVANCED
FUNCTIONALITIES 4
101
102 Chapter 4. Additional tips and advanced functionalities
However, it is possible to force the program to show negative values by setting the colorbar range
manually in [C5101].
Example: The amount of vacancies on the A-site of phengite has been calculated using the Gener-
atore Module and the formula: Vac = 1 − ( Na_A + K_A);. This calculation will generate pixels
with negative values if the sum of Na + K is greater than one; this can be the case for misclassified
pixels. The results are shown in Figure 4.1:
• If the vacancy map is selected for display, the limits of the colorbar are automatically set con-
sidering only the pixels with positive values (see Fig. 4.1a). All the pixels having a negative
value are shown with the first (bottom) color of the colorbar.
• If the lower limit is changed manually to force the display of pixels with negative values (e.g.
-0.5 in Fig. 4.1b), these pixels appear on the map (see the black arrows). However the pixels
that do not belong to phengite are have a color that correspond to a value of zero and are no
longer plotted in black.
4.1. XMapTools and negative numbers 103
Figure 4.1 – Example of image with negative values that are (1) ignored by the automatic display; (2) visible if
the lower limit of the displayed values is set manually
104 Chapter 4. Additional tips and advanced functionalities
[1] Export a mask image (Fig. 7.1-1) using the button The button export mask image in the
workspace Xray. An example of mask image is reported in figure 4.2.
[2] Functions are available and can be activated using the icons available below the menu. Press
the last one Show plot tools and Dock figure. MATLAB
c
turns the figure window into editing mode
(Fig. 4.3).
[3] With pop-up menu color map, select Custom. A new window Colormap editor opens (Fig. 4.4)
and you can select the colors for each mineral by pressing on the color arrows (see examples in Fig.
4.4).
[4] When new colors are defined, it the figure can be saved using the figure menu and the function
Save as...
Figure 4.2 – Mask image exported using the function export mask image (see text)
4.2. Export mask images with personalized colors 105
In this section, I explain the procedure to add a personalized ListFunction.txt file (called ListFunc-
tions_USER.txt). In a second part, the procedure to generate your own external functions and to add
them to XM AP T OOLS is also described.
• Function type that correspond to the function category. Possible indexes are: [1] Structural
formulae; [2] P, T and P-T map mode; [3] P, T and P-T spot mode; [4] General Functions.
• Mineral(s) that correspond to the name(s) of mineral phase(s) for which the function may
be applied. For example, to add a function that calculate the structural formulae of chlorite,
the code line must includes the keyword Chlorite in order to indicate to XMapTools that this
function belong to the category Chlorite within the type: Structural formulae. If a different
name is used such as ChloriteDT, a new category will be automatically generated.
• Function name is the name of the function without the extension. External functions are
MATLAB
c
functions files (*.m). For example, the function name StructFctChlorite is reported
for the file StructFctChlorite.m.
• Input variables is the list of input variable names that are the names of the standardized maps
generated by XM AP T OOLS. The oxide names available are: Na2O, MgO, Al2O3, SiO2, P2O5,
SO2, Cl2O, K2O, CaO, TiO2, V2O5, Cr2O3, MnO, FeO, CoO, NiO, CuO, ZnO, ZrO2, AgO,
CdO, SnO2, Ce2O3, As2O5, Sb2O3, Cs2O, La2O3, Nd2O3, PbO, SrO, ThO2, UO2, Y2O3,
Sm2O3, Gd2O3, Dy2O3, Pr2O3. The metalloids names available are: Fe_ms, Cu_ms.
• External variables (optional for function of type [3]) are variables that can be edited by the user
at each iteration. Such variables must be provided together with a default value, for example:
PressureKbar(10).
This file ListFunctions.txt should never be edited by any user. If additional functions are needed, the
following procedure can be applied:
Figure 4.5 – XMapTools info displayed in the command window at the launching of the program. (a) The file
ListFunctions_USER.txt has not been detected in the repertory UserFuntions and the default file is loaded and
a warning message displayed. (b) The file ListFunctions_USER.txt exists and has been loaded.
[4] Come back to the working directory and restart XM AP T OOLS. If the user’s function is read by
the program a warning message is displayed in the Command Window when XMapTools is launching
(Fig. 4.5b). If this warning is not displayed (Fig. 4.5a) the default file has been loaded by the program.
Check the external function name in /UserFiles that must be ListFunctions_USER.txt.
[1] Close XM AP T OOLS and go to the setup directory (/program) and open the file ListFunctions.txt.
As described in section 4.3.1, this file reports all the characteristics of the external functions. This file
provides the list of input and output parameters for each functions.
the input data are organized as a matrix in which the first line is the composition of the chlorite and
the second line the composition of the chloritoid (same order of the name: Chlorite+Chloritoid). The
compositions order is given by the input variables: [SiO2, TiO2, Al2O3, FeO, MnO, MgO, CaO,
Na2O, K2O].
The following analyses of chlorite and chloritoid PSB9210b are used from Table 2 in Vidal et al.
(1999).
• Chlorite: 25.63 0.03 23.37 22.82 0.22 15.13 0.06 0.02 0.02
• Chloritoid: 24.15 0 40.80 22.81 0.16 3.02 0.04 0.01 0.02
The predicted temperature is 492◦ C and the ln_Kd is 1.61 in line with the results of Vidal et al.,
(1999).
4.3.3.2 Single name functions (P, T and P-T and structural formulae functions)
The same test can be conducted with the One name functions. In this second case, only one composi-
tion is required. However, for the test the two following lines in the function code must be commented
(using %):
Code 4.2 – Test functions
XmapWaitBar ( 0 , h a n d l e s ) ;
XmapWaitBar ( 1 , h a n d l e s ) ;
% must be r e p l a c e d by :
%XmapWaitBar ( 0 , h a n d l e s ) ;
%XmapWaitBar ( 1 , h a n d l e s ) ;
The function Chl-StructForm-(Si<3) can be tested. The corresponding setup line in ListFunctions.txt
is:
After testing, take care to remove the comments (%) on the two lines of the function XmapWait-
Bar and save again the file.
110 Chapter 4. Additional tips and advanced functionalities
[3] Close XM AP T OOLS, go to the setup directory (/Addon) and paste the add-on folder.
The add-on is ready to be used in XM AP T OOLS and is available in the add-on menu. If the add-on
is not listed in the add-on menu, there is either something wrong with the package or some files are
missing.
Note: Some add-on may require an additional setup that will be done during the first call of the
add-on.
111
112 Chapter 5. General errors and solutions
5.1 I NTRODUCTION
In this sections the main errors codes that may be displayed by XMapTools are described and solutions
are given.
This error occurs during the launching when XMapTools is not able to find /UserFiles that should
be in the setup repertory (containing XMapTools/Setup and XMapTools/UserFiles). If this directory
doesn’t exist and if additional functions have to be used, create a new /UserFiles folder and put it in
the setup repertory. More details about the strategy are given in section 2.3.2.1.
To overcome this problem, a function that can force the program to exist the busy state has been added
in XM AP T OOLS 2.5.1. The button unfreeze the interface allows the interface to be unfrozen if the
program is stuck.
Cases in which this button must not be used (see the warning message display by XM AP T OOLS in
Fig. 5.2):
• The program is waiting you to click on the figure to select one or more specific pixels. Ex-
amples: the classification function, the function to select/unselect the standards and for all the
functions asking you to define a region-of-interest. In this case, do not press the button unfreeze
and use right click instead to end the selection mode. Note: several rick clicks may be required
if the function has been called several times.
• The correction mode is active (e.g. SPC, MPC). Solution: press the button APPLY located
below the X-pad navigator. Note that the unfreeze function does not work if the correction
mode is active.
5.3. Interface errors 113
Figure 5.2 – Warning message appearing when the button unfreeze the interface has been pressed
• The Import tool or the standardization tool module is in use. Solution: close the module.
• XM AP T OOLS is waiting for the result of an external function, but the job is not accomplished
yet (e.g. if the progress bar is still moving, Fig. 5.2b). In this case, wait that the function
finishes his job, or click into the MATLAB
c
Command Window and hit Ctrl + C to kill the job
first; then, and only then press the button unfreeze the interface .
T UTORIAL 1: ELECTRON MICROPROBE
X- RAY MAPS PROCESSING 6
115
116 Chapter 6. Tutorial 1: electron microprobe X-ray maps processing
6.1 I NTRODUCTION
A set of X-ray maps is provided as an example with XM AP T OOLS 2.1.1. In this chapter we described
how to use the XM AP T OOLS to import X-ray maps, standardize them and calculate the P-T conditions
of crystallization. If you are using XM AP T OOLS for the first time, it is strongly suggested to read
first the previous chapters (1, 2) before to start using the tutorial. For example the setup procedure
discussed in chapter 2 is not described here and this step must be achieved before to begin the tutorial.
The chapter ?? provides a comprehensive description of the functions used in this tutorial.
X-ray images used in this example were measured at the University of Lausanne (UNIL) using a
electron probe micro-analyzer JEOL JXA 8200 Superprobe. The studied sample comes from Garvera
outcrop, Urseren zone in the Central Alps. This sample has been studied in details by Janots et al.
(2008), Bernier (2011), Gardonio (2012).
Figure 6.1 – BSE image of the studied area (red rectangle) with transect of spot analyses (blue lines) from
Bernier (2011).
6.2. X-ray workspace 117
(2) Go to the data example repertory using the Current Folder window in the MATLAB
c
window.
This step is critical as many files will be generated by XM AP T OOLS and stored in the working
directory. Make sure that the current path is .../Example as in Figure 6.2a.
(3) Run XM AP T OOLS using the command: » XMapTools (case sensitive, example in Fig. 6.2a)
(4) Information such as software release and attached files are reported in the MATLAB
c
command
window (Fig. 6.3b) XM AP T OOLS main window appears after few seconds (Fig. 6.3)
As discussed in Introduction, XM AP T OOLS is divided into three workspaces: X-ray, Quanti and
Results. The next sections described the corresponding operations of data processing.
(1) Press the button add to import X-ray files (arrow in Fig. 6.4).
(2) A dialog box opens in which files can be selected (6.4a). Select all the files together (i.e. Al.txt,
Ca.txt, Fe.txt, K.txt, Mg.txt, Mn.txt Na.txt and Ti.txt) using the maj button. Press the button open and
XM AP T OOLS reads and imports the selected files.
(3) Select the automated method (see step 4 below). If you do not want to use the automated
method, for each map the program asks for a corresponding element. Each map/element couple are
automatically detected with the file name and should be validated. You must check if the automati-
cally selected element fit with the selected map and press OK. Repeat this operation until all the files
have been checked and imported.
(4) The program scans the maps and finds the corresponding element. Then it opens the Import Tool
(Fig. 6.4b).
(5) In the Import Tool, activate the dead time correction; a dwell time of 200 ms and a dead time of
300 ns were used (Fig. 6.4b). Then press Apply Corrections to correct for dead time and import the
maps in the main window.
Warning: Do not apply any transformation such as rotation to EPMA maps, otherwise the map
coordinates in Standard.txt will not work anymore. The rotation correction should only be used with
standardized maps such as LA-ICP-MS maps.
118 Chapter 6. Tutorial 1: electron microprobe X-ray maps processing
(6) When all the corrected files have been imported, XM AP T OOLS displays the first map in the main
figure area (Fig. 6.5). The details about the maps and the corrections are displayed in the MATLAB
c
NB: The color bar lower and upper values are fixed as the min and max values of the displayed image
(corresponding to min and max intensitites for raw X-ray data). In order to change this values, figure
options must be used (see below).
(2) In the figure option window, the live coordinate screen displays X, Y and Z coordinates cor-
responding to the mouse position on the X-ray map. The Z value is the value of the overflew pixel
located at (X,Y) position. Try to displace your mouse above the map in order to get Z values, here
corresponding to the number of recorded counts, of minerals.
The porphyroblast colored in red shows for instance an average intensity of 10,200 counts for Al.
The greenish matrix on the right part of the map exhibits an average intensity of 5,700 counts.
Figure 6.6 – Display options. (a) Display option menu; (b) auto-contrast mode activated (down), unactivated
(up); (c) rotation mode for different rotation angles.
6.2. X-ray workspace 123
(4) If the auto-contrast mode is active the lower and upper limits are fixed by XM AP T OOLS. You
can switch back to min-max values for the contrast using the same button auto-contrast .
NB: In this example, the displayed image does not change significantly (6.6b). The usefulness of the
auto-contrast function can be demonstrated with the Ca map.
(5) Display the map Ca using the X-ray menu (red arrow in Fig. 6.5, second map)
(9) Image orientation can be changed using the button rotate . Press this button to rotate the im-
age of 90◦ (counterclockwise). Four positions corresponding to 0◦ , 90◦ , 180◦ and 270◦ are available
(Fig. 6.6c).
NB: The image coordinates displayed in the live coordinate screen are coordinates in the original
system that correspond to 0◦ rotation, i.e. the coordinates of an object are exactly the same in all the
rotation modes.
(10) The Image displayed in the figure area can be exported by using the button export . A new
window opens with the same figure (Fig. 6.6d). Use the button save to save the figure in common
image formats (pdf; png; tif). The format PDF is recommended for the figure to be editable in Adobe
Illustrator
c
(2) Manually adjust the color bar limits to: lower = 5000 and upper = 7000 (Fig. 6.7)
(3) Black colors can be added to the color bar in order to hide the pixels with intensities higher and
lower than the max and min values. The black layer for the min value (left in Fig. 6.7) is automatically
activated.
(4) Enable the upper black color by selecting the second checkbox (right in Fig. 6.7). All the pixels
with intensities higher than 7000 are displayed in black.
NB: These settings are saved by XM AP T OOLS and will be applied to any other map displayed in the
main figure window.
(5) Disable the upper black color by deselecting the second checkbox (right in Fig. 6.7). All the
pixels with intensities higher than 7000 are displayed in the last red color of the color bar (normal
mode).
124 Chapter 6. Tutorial 1: electron microprobe X-ray maps processing
Figure 6.7 – Display options. (a) Display option menu; (b) auto-contrast mode enabled (down), disabled (up);
(c) rotation mode for different rotation angles.
(2) Adjust manually the color bar limits using the values: min = 4000 and max = 5200 (Fig. 6.8a).
(3) Press the button median filter . A rectangular median filter is applied to the displayed map
(Fig. 6.8b).
(4) Turn off the median filter by pressing the button median filter .
(5) Edit the size of the median filter (in pixel) to 5 and turn on the median filter. The new filter is
applied to the displayed map (Fig. 6.8c).
(6) Turn off the median filter by pressing the button median filter .
NB: The median filter may be used to remove the noise and to extract chemical composition trends.
This is only a display option, the data stored in the program are not altered.
6.2. X-ray workspace 125
Figure 6.8 – Median Filter. (a) not used; (b) size = 2; (c) size = 5; (d) size = 10;
6.2.3.7 Sampling
(1) Display the map Mg using the X-ray menu (fifth map) and apply the auto contrast using the
button auto-contrast .
(2) Press the button sampling (line) , select the mode single map and define two points of a
transect going across the porphyroblast (see points 1 and 2 in Fig. 6.9a). The program open a new
figure window with the diagram pixel position against chemical composition. The program asks you
if you want to save the corresponding map with the transect line into a FIG file that can be opened
with MATLAB
c
and converted to PDF. In this example the diagram is pixels (from 1 to 168) against
Fe intensity (in counts).
NB: The transect is always displayed from the point 1 (left in chemical diagram) to the point 2 (right
in chemical diagram).
(3) In order to delete the points and the transect displayed on the main figure, Select again the map
Mg using the X-ray menu and apply the auto contrast using the button auto-contrast .
126 Chapter 6. Tutorial 1: electron microprobe X-ray maps processing
Figure 6.9 – Sampling functions. (a) mode: line; (b) mode: area (c) mode: integrated lines.
6.2. X-ray workspace 127
(4) Press the button sampling (area) and select an area in the same porphyroblast (Fig. 6.9b).
The program display the mean composition of this area in the box within the figure option window.
In this example the mean intensity of Fe is 311 ± 18 counts (1σ).
(5) Press the button sampling (integrated lines) and select two points across the porphyroblast
and an additional point to define the half-width of the rectangle along which the transect lines will
be integrated (see points 1 and 2 in Fig. 6.9c). The program open a new figure with the map of the
integrated area (labeled Fig. 1 in 6.9c). Then a new figure window is opened with the diagram pixel
position against chemical composition. The lines in blue are all the transects and the red curve is the
mean transect.
NB: In all the sampling mode, XM AP T OOLS proposes to save the results of the profile in ASCII files
with a dialogue windows. The figures displayed are not saved and must be exported by user using the
button export and the option save as available in the menu (see §6.2.3.4).
(2) Press the button Display precision map (Fig. 6.10a) to generate a precision image (in %
2σ) that opens in a new window (Fig. 6.10b). This precision image reflects the random error from
the detector estimated using counting statistics (Lanari et al. 2014b). More detailed explanations are
provided in section 1.4.1.2.
(3) Set the precision image as the current active figure by selecting the window.
Code 6.2 – caxis function may be used to set the min and max values of the color bar of a figure
(5) Set the color axis range of the figure to 1.5-3.5%. The result is displayed in figure 6.10d. The
analytical error on Al is 2% for chloritoid and phengite, 2.5% chlorite and 12% for quartz.
(6) The precision image generated may be saved using the menu File and Save as ...
(2) Display the X-ray info window using button X-ray info
(3) The resulting info window is displayed in Fig. 6.11 and the text reported in the box 6.3
128 Chapter 6. Tutorial 1: electron microprobe X-ray maps processing
Figure 6.10 – Precision image in % calculated from the X-ray map of Al. (b), (c) and (d) are the same data
(precision image for Al in %) plotted with different color bar axis values (see text)
Map I n f o
∗ s e l e c t e d e l e m e n t : Al ( r e f 3 )
∗ s e l e c t e d mineral : not used ( a l l p i x e l s are d i s p l a y e d )
−−−−−−−−−−
∗ map s i z e : 400 rows & 500 c o l u m n s
−−−−−−−−−−
∗ mean i n t e n s i t y = 6 7 6 5 . 4 9 2 7 ( e r r o r 2o = 2 . 4 3 1 5 \% [ 1 ] )
∗ median i n t e n s i t y = 6 0 3 0 . 8 9 1 8 ( e r r o r 2o = 2 . 5 7 5 4 \% [ 1 ] )
∗ s t a n d a r d d e v i a t i o n = 2690.0589
∗ min v a l u e = 1 1 3 . 0 0 3 8
∗ max v a l u e = 1 1 7 0 2 . 9 4 3 9
−−−−−−−−−−
∗ BRC c o r r e c t i o n : n o t a p p l i e d
∗ TRC c o r r e c t i o n : n o t a p p l i e d
−−−−−−−−−−
[ 1 ] E r r o r s − Poisson d i s t r i b u t i o n ( see Lanari e t a l . 2014)
Figure 6.11 – Info button (a) and window (b) available into the workspace X-ray
In this example, the selected element is Al (the XM AP T OOLS reference of this map is the number 3).
Mask are not yet created and all the displayed pixels are used to calculate the following values: mean
intensity and median intensity, standard deviation, min and max values. The precision is calculated
for both mean and median intensities. In this example BRC and TRC correction are not used.
6.2.5 Classification
The classification function generates masks corresponding to entities identified in the map (e.g. min-
eral, mineral boundaries, fractures). This function allocates each individual pixel of the image to
one of the minerals phases defined by the user. This step is crucial because each mineral must be
individually proceeded through the next steps.
The mask creating function uses the statistical analysis method K-means clustering to distribute the
pixels into groups of similar compositions (Lanari et al. 2014b).
Two approaches are available in XM AP T OOLS: the normalized and the classical approaches. Both of
them use a K-means clustering approach, but with different X-ray intensities inputs. In the normalized
function, X-ray intensities of each element are normalized to their mean values, with the result that all
elements have the same weight and only the variances are compared. In contrast, the X-ray intensities
of each element in the classical method depend on the absolute concentration in each element. This
classical method is therefore more appropriate for elements present in high concentration. these two
automatic approaches are intensively discussed in the next section (6.2.5.1).
A manual classification is available in XM AP T OOLS 2 and will be discussed later (see section
6.2.5.3).
(3) Select all the X-ray maps for the classification and press OK
(4) Select the following pixels (by clicking on the map, see Fig. 6.13a) to define the phases: chlori-
toid: x = 66 y = 242; chlorite: x = 210 y = 203; phengite: x = 186 y = 119; quartz: x = 481
y = 85 and use a right-clic within the image to continue.
(6) The masks are generated and the mask image is automatically displayed in the main figure
window (Fig. 6.13b). In this example the function fails to distinguish the pixels of quartz and the
corresponding compositions are allocated to the phase 3. Pixels allocated to phase 4 are mineral
boundaries between chlorite and phengite and a small mineral on the top and in inclusion in the
chloritoid. In this example, the problem is due to the initial coordinates given for the phase quartz
that does not have a pure quartz composition but contains Ca. This mask correspond to a distinct
phase that have been classified, indicating that a new phase must be defined for quartz. Information
regarding the classification are printed out in the Command Window (Code 6.4).
Code 6.4 – Text printed in the command window during the classification
(7) The name of the phases may be edited using the function rename phases. Press the button
(Fig. 6.12) and define the new names for each phase. In this example, phase 1 belongs to chloritoid,
phase 2 chlorite, phase 3 phengite+quartz and phase 4 is a Ca-rich phase (see inclusion in chloritoid).
6.2. X-ray workspace 131
Figure 6.13 – Classification: (a) Coordinates and position of the input pixels selected by the user in order to
define the compositions of the minerals (map: Al in number of counts). (b) Mask image generated using the
mode Normalized intensities and the mode Selection (see [6])
(8) In your data example repertory, open the file Classification.txt. The names of the phases and the
corresponding pixel coordinates are listed below the keyword >1. These names must be defined as
one string chain without space.
(9) Calculate a new mask file called Maskfile_2(Classic) with the mode Classical computation and
the mode File. The result is displayed in figure 6.14. In this second example quartz pixels were
correctly classified (note that the coordinates in the file Classification.txt for quartz have been edited
compare to the previous example).
(10) As the first mask file Maskfile_1(norm) does not distinguish quartz from chlorite, it can be
deleted using the function delete maskfile. Select the mask file Maskfile_1(norm) in the maskfile
menu. Press the button (Fig. 6.12) to delete it.
132 Chapter 6. Tutorial 1: electron microprobe X-ray maps processing
Figure 6.14 – Classification: Mask image generated using the mode Classical computation and the mode File
(see [8])
(1) Display the map Mg using the X-ray menu and keep none selected in the mask menu. Adjust
the contrast by pressing the button auto-contrast . The result is reported in figure 6.15a. All the
pixels are displayed.
(2) Select the phase chloritoid in the mask menu. Adjust the contrast by pressing the button auto-
contrast . The result is reported in figure 6.15b. In this case, only the pixels that belong to the
mask chloritoid are displayed.
(1) In the workspace X-ray, select the map Al using the X-ray menu (first map) and the phase none
in the mask menu.
(2) Send the maps to the chemical module by pressing the button Binary.
6.2. X-ray workspace 133
Figure 6.15 – Display X-ray image Mg (a) with none selected in the mask menu and (b) with chloritoid selected
in the mask menu. The auto-contrast function has been used before to generate the images.
In the diagram displayed in figure 6.16, the blue dots correspond to X-ray intensity of the selected
pixels. In this example, three groups of pixels can be easily identified in the Fe vs Mg diagram (Fig.
6.17). The first group enriched in Fe and Mg belongs to chlorite. The second group shows high Fe
and low Mg contents belongs to chloritoid. The last group showing both low- Fe and Mg contents
contains the pixels of phengite and quartz. Mixing analyses are visible between the group chlorite
and the group phengite+quartz (Fig. 6.17).
One of the most important tool of Binary module is the Identify pixels function. User can select groups
of pixel compositions in the binary diagram by defining a region-of-interest and display the location
of the corresponding pixels in the map. In the following the mode Single group: quick (rectangle) of
the function Identify pixels is used. In this mode, compositions are selected using a rectangle defined
by two points.
(4) Select the points belonging to the group chloritoid using the function Identify pixels and the
mode Single group: quick (rectangle). The corresponding pixels are displayed in red in a new map
(Fig. 6.18a).
(5) Press the button build a maskfile and save a Mask file named Chloritoid.txt. NB: The file created
is automatically saved in the folder MaskFiles/.
The same procedure is repeated for the phases identified above.
(6) In a diagram Fe vs Mg select the points belonging to the group chlorite and generate a mask file
named Chlorite.txt (Fig. 6.18b).
(7) In a diagram K vs Al select the points belonging to the group phengite and generate a mask file
named Phengite.txt (Fig. 6.18c).
(8) In a diagram Si vs Al select the points belonging to the group quartz and generate a mask file
named Quartz.txt (Fig. 6.18d).
(10) In XM AP T OOLS, press the button import and merge maskfiles and import the mask files:
Chlorite.txt; Chloritoid.txt; Quartz.txt and Phengite.txt. The new mask file is named Merged-
Maskfile. The result is displayed in figure 6.19.
(11) Look at carefully the difference between the two mask files (automatic and manual proce-
dures). Then select the mask file Merged-Maskfile and press the button Delete maskfile to delete
it. Maskfile_2(Classic) will be used in the following.
6.2.6 Corrections
The full description of all corrections available in XM AP T OOLS is provided in the section 3.4.4.
Work in progress.
6.2. X-ray workspace 137
6.2.7 Standardization
When all required steps are accomplished it is possible to process to the analytical standardization,
i.e., to transform each phase X-ray maps into maps of weight percentage oxide concentration. More
details about the process are given in XM AP T OOLS’ papers of Lanari et al. (2014b) and Lanari et al.
(2018).
(1) In the X-ray workspace, display the map Al and select the phase none.
(2) Use the function import standard file to open the standard file (Fig. 6.20a).
(3) As a file Standards.txt exists in the working directory, XM AP T OOLS suggests to open that file
(Fig. 6.20b). Press yes.
(4) The spots analyses stored in Standards.txt have been imported and are plotted in the map dis-
played in the main window (Fig. 6.20d). The group of buttons for internal standards has also been
updated (Fig. 6.20c).
(5) Hide the spots analyses using the function hide standards and display them again using the
function display standards
(2) Display the spot analyses using the function display standards
(3) Use the function display intensity vs composition chart to compare the spectra of Si (counts)
and SiO2 (wt-%). The result is reported in figure 6.23 (case: original position). The correlation
coefficient between the two spectra is 0.78 (see Code 6.5).
Standards t e s t i n g . . . ( Element : Si ) . . .
Standards t e s t i n g . . . ( Correlation : 0.77956)
Standards t e s t i n g . . . ( E l e m e n t : S i ) . . . . Ok
Code 6.5 – Text printed in the command window by the function display intensity vs composition chart
138 Chapter 6. Tutorial 1: electron microprobe X-ray maps processing
Figure 6.20 – Procedure to load standards. (a) Group of buttons for internal standards (no standard file) (b) If
a file Standards.txt exists in the working directory, the program proposes to open that file. (c) Group of buttons
for internal standards (standard file loaded). (d) Map of Al with the spot analyses that are used as internal
standards.
(4) Use the function check quality of std/maps positions to test the position of the internal stan-
dard analyses and the X-ray maps. Use X and Y shifts of 10 pixels each (Fig. 6.21).
The spots analyses are displaced from (-10,-10) to (+10,+10) and a correlation coefficient is calculated
for each position. The result is a map of 20 × 20 pixels for which the center pixel (0,0) is the original
position of the spot analyses (marked by a black star in Fig. 6.22).
The function display in new figures windows: (1) the correlation map for all the selected elements
and (2) the image of the sum of square of correlation coefficients. In case of good correlation, the
second map is likely to indicate the best position of the spot analyses. In this example, it comes out
that the spot analyses are shifted of X = −1 and Y = +2.
(5) Select the correction SPC in the correction menu and press activate to activate the correction
mode. Press No, because you do not need to check again the quality of std/maps positions (see step
6.2. X-ray workspace 139
4). Use the X-pad navigator (left hand side) to move the spot analyses of one pixel rightward and two
pixels downward. Please wait for figure update before to press again on of the arrow button.
(6) Press Apply button located below the X-pad navigator in order to apply the correction. The
correction is printed in the MATLAB
c
Command Window (see Code 6.6).
Code 6.6 – Text printed in the command window by the standard position correction function (SPC)
(7) Use the function check quality of std/maps positions to test again the position of the internal
standard analyses and the X-ray maps. As before, use X and Y shifts of 10 pixels each (Fig. 6.21).
The results are reported in figure 6.23 (case: corrected positions).
The new positions of spot analyses are saved. If you want to retrieve the original positions, you must
load again the file Standards.txt or apply a inverse correction.
(2) Display the spot analyses using the function display standards
140 Chapter 6. Tutorial 1: electron microprobe X-ray maps processing
Figure 6.23 – Results of display intensity vs composition chart for the original and corrected positions
(3) Use the zoom tool to restrict the view to an area of interest (Nb: The zoom option is deactivated
during the selection mode). To use the zoom, click on the image and drag the mouse to define a
rectangle, or just click onto the image to zoom in.
(5) Press the button select/unselect standard (Edit) to activate the selection mode
(6) selected/unselected spot analyses (internal standards) by clicking directly on the map close to
the spot. Please wait for the figure update before to select/unselect the next spot. In this example it is
necessary to delete the spot analyses located near the grain boundaries (Fig. 6.24).
(9) Display the spot analyses using the function display standards .
Figure 6.24 – Internal standards for chloritoid. Note that the spot analyses near the grain boundaries are
unselected (white circles)
(1) Display the map Si (or alternatively Fe or Ca) and select the phase chlorite.
(2) Display the spot analyses using the function display standards
(3) Use the zoom tool to restrict the view to an area of interest (Nb: The zoom option is deactivated
during the selection mode)
(5) Press the button select/unselect standard (Edit) to activate the selection mode
(6) selected/unselected spot analyses (internal standards) by clicking directly on the map close to
the spot. Please wait for the figure update before to select/unselect the next spot. In this example it is
necessary to delete the spot analyses located near the grain boundaries (Fig. 6.25).
6.2. X-ray workspace 143
Figure 6.25 – Internal standards for chlorite. Note that the spot analyses near the grain boundaries are unse-
lected (white circles)
(7) Display the spot analyses using the function display standards .
(1) Select the phase chloritoid, the standardization method Advanced Standardization and press the
button STANDARDIZE. Note that this button is only available when a phase is selected. Use the name
proposed by the program for the standardized phase; Select all the elements to be standardized.
(2) The advanced standardization module opens (see Fig. 6.26). The element can be selected in
the main menu. The standards concentrations (wt-%) are plotted against the intensities of the cor-
responding pixels in the standardization diagram (upper right diagram). The automated background
detection diagram shows (left) shows the evolution of the residuals (square root of the of the sum of
144 Chapter 6. Tutorial 1: electron microprobe X-ray maps processing
the square of distances between the curve and the model) with the background value. The map on the
lower right panel shows the calibrated map for the corresponding oxide of the selected element.
(3) Select the first element Al and press the button Apply Auto. The program calculate the best
standardization curve and update the display located below the menu. In this example, there is no
background correction and the calibration curve is defined by the point X = 39.53 wt%; Y = 10410
counts (Figs. 6.26 & 6.27). Note that the figures can be slightly different if a different set of spot
analyses are used.
(4) Select the next element Ca and press the button Apply Auto. Automated detection: the calibration
curve is defined by the point X = 0.35 wt%; Y = 125 counts; a background value of 114 counts is
estimated ([1] in Fig 6.27). A warning message is displayed as there are 3 pixels with concentration
of CaO above 110 %. This is unrealistic for this example and it suggests that the spot analysis with a
concentration of CaO = 0.32 wt% is an outlier. Press the button +/- and click onto this point. The
new calibration curve is defined by the point X = 0.35 wt%; Y = 317 counts; a background value of
108 counts is estimated ([2] in Fig 6.27). This is more realistic and the highest concentration of CaO
shown in the map has changed to 7 wt%.
(5) Select the next element Fe and press the button Apply Auto. Automated detection: the calibration
curve is defined by the point X = 26.3 wt%; Y = 4448 counts; no background correction needed (Fig.
6.27).
(6) Select the next element K and press the button Apply Auto. Automated detection: the calibration
curve is defined by the point X = 0.25 wt%; Y = 130 counts; a background value of 82 counts is
estimated (Fig 6.27). The K2 O composition of a few mixing pixels in the matrix is between 10 and
13 wt% (see the map in the Standardization tool). These values are realistic for pixels of phengite
that might have been misclassified.
(7) Apply the automated technique to define the calibration curves of the next elements (Mg, Mn,
Na, Si) and compare the results with those shown in Figure 6.27.
The analytical standardization of Si, Al and Fe do not required any background correction because
of the high intensity-to-background ratios (Lanari et al. 2018). The spot analyses used as internal
standards are indeed already corrected for background and the background effects on the calibration
curve are negligible. On the contrary, the elements with a low intensity-to-background ratios such as
Mg and Mn requires a background correction to obtain an accurate calibrated map (Fig. 6.27). In this
example, the calibration curves for Ca, Na and K are almost horizontal indicating that those elements
were below detection limit for the mapping conditions (Lanari et al. 2014b).
(8) Once all the calibration curves haven been defined, press the button Apply Standardization (Fig.
6.26).
(10) The program applies the calibration to the X-ray maps and generate a map of oxide weight
percentage that is then shown in the workspace Quanti.
(12) Check the quality of standardization using the function Generate the oxide wt% sum map
(2) Use the automated procedure to define the calibration curves of all the elements and compare
the results with Figure 6.28.
(3) Once all the calibration curves haven been defined, press the button Apply Standardization (Fig.
6.26) and save the standardization parameters.
(4) Check the quality of standardization using the function Generate the oxide wt% sum map
(2) In the input windows, set a value of 100 (wt%) for SiO2 and press OK.
The program used a calibration point of X = 100 (wt%), Y = 24123 counts (median value of the Si
for the mask quartz) and a background of 0 to calibrate the map. Note that this value can be obtained
using the function Display "Info" window in the workspace X-ray.
The problem in this example is that the interiors of the quartz grains exhibit significantly higher
intensity of 28500 counts. In the standardized map of quartz the SiO2 concentration of these interiors
is overestimated by 5-10 %. To solve this issue with are going to lower the calibration value of quartz.
(3) Delete the standardized map Quartz-homog using the function Delete Quanti file
(4) Come back to the workspace X-ray, select the phase quartz, the standardization method Manual
(homogeneous phase) and press again the button STANDARDIZE. Use the name proposed by the
program for the standardized phase; Select all the elements to be standardized.
(5) In the input windows, set a value of 85 (wt%) for SiO2 and press OK.
• The potassium in white mica was volatilized during the acquisition of the spot analyses, as
they were measured with a current of 20 nA and a beam size too small (1 µm). In the file
Standards.txt, the values of K2 O range between 4 and 6 wt% whereas they should be around
10 wt%. The map cannot be accurately standardized if the internal standards are not accurately
measured.
• The compositional zoning in white mica occurs on a very small scale (< 2 µm) and the position
of the spot analyses measured along the transects is not accurate enough to ensure a good
standardization. In this case it is important to use BSE images to locate a few spot analyses in
specific areas inclusion free and showing more homogeneous composition.
Try to filter the spot analyses in phengite (see §6.2.7.3) to obtain a cluster in the standardization tool.
This is not possible.
For the following sections of the tutorial, the phengite pixels are ignored.
148 Chapter 6. Tutorial 1: electron microprobe X-ray maps processing
6.3.1 How to generate concentration maps and extract local bulk compositions?
When all the phases have been standardized, it is possible to merge the Quanti files to obtain maps
of mass concentration in oxide weight percentages. Local bulk compositions can be extracted from
specific area, provided that the maps are corrected for density Lanari et Engi (2017).
(1) Press the button merge standardized phases [B2401] to merge Quanti files. Select the three
Quanti files available in this example (see Fig. 6.29a). While the button OK is pressed, standardized
map containing the pixel compositions (in oxide weight percentage) for all the selected phases is
generated.
Nb: The function merge standardized phases [B2401] sums up the selected standardized phases. This
functions does not check if the same phase is selected twice, e.g. same phase calibrated using two
different standardization methods. If the composition of a given pixel is provided twice or more, the
result will simply show the sum of compositions.
(1) Duplicate the Quanti file Merged_Map using the button Duplicate Quanti file [B2106] (Fig.
6.30a). A new Quanti file labeled Merged_Map_copy is created (Fig. 6.30b).
(2) Use the function select and area and delete the pixels inside [B2410] (Fig. 6.30c) to remove
pixels of any domain that is not in the area-of-interest from which you want to extract the local
bulk composition. In this example we want to remove the pixels of the two domains containing the
phengite (areas 1 and 2 in Fig. 6.30d). It is important to keep in this layer only the pixel compositions
to be averaged to estimate the local bulk composition as the function applying the density correction
needs to evaluate the average density of the selected domain (ρmixture in Eq. 3.19).
(1) The average density of each mineral phase can be defined in the file Classification.txt as shown
in the example 6.8 below. Density of phengite is set to zero as phengite pixels are not used in this
example. The density values are taken from the website webmineral. Minor density variations with P
and T and within a given solid solution are neglected. The order must be the same as the one used to
define the mineral phases below the keyword >1. Each row should contain a single number.
6.3. Quanti workspace 149
Figure 6.29 – Merge ’Quanti’ files. (a) Select the maps. (b) map of silica
Figure 6.30 – (a) Duplicate the Quanti file ’Merged map’. (b) The ’Quanti’ file ’Merged_Map’ has been
duplicated. (c) Function used to delete the selected pixels of an area. (d) The pixels of two domains (labeled 1
and 2) have been deleted, i.e. they will not be used to extract the local bulk composition.
150 Chapter 6. Tutorial 1: electron microprobe X-ray maps processing
Figure 6.31 – (a) Define a new density map (b) Read the density data stored in the file Classification.txt. (c)
Density values for each phase. (d) Density map used to apply the density corrections.
Code 6.7 – Density of the mineral phases listed in the file Classification.txt. Note that the mineral order must
be the same as in the one of the first block
(2) Generate a density map from the mask file selected in X-ray (the correct mask must be selected
in the workspace X-ray as there is no mask menu in the workspace Quanti; important!) using the
function generate a density map (from selected mask file) [B2406] (Fig. 6.31a). The program
reads the density data stored in Classification.txt, provided that this option is activated (Fig. 6.31b).
The density values can be edited in the input dialog-box shown in Figure 6.31c.
6.3. Quanti workspace 151
Figure 6.32 – Buttons to apply the density correction and export local bulk compositions
(3) You can display the density map any time (Fig. 6.31d) by pressing the button display the density
map [B2407].
Note: This map should only be used to export local bulk compositions because each pixel is multiplied
ρi
by ρmixture . The sum is not anymore 100 wt-%. The name of this Quanti file begins with *DCM- to
remember you to not use it for other purpose. There is a warning if you try to use this density-
corrected map for structural formula. It is strongly recommended to delete this map after exporting
the bulk composition.
(2) The composition of this specific domain may be exported using the function export local com-
position: map [B2402] (Fig. 6.32).
The results are shown in the insert 6.8. If no density correction is applied for this example, the Al
contained in the chloritoid is significantly underestimated.
Code 6.8 – Comparisons between local bulk composition determined for *DCM_Merged_Map_Copy (DCM)
and Merged_Map_Copy (noDCM).
152 Chapter 6. Tutorial 1: electron microprobe X-ray maps processing
Figure 6.33 – Computation of structural formula maps: chloritoid. (a) select the ’Quanti’ file and the external
function Ctd-Struct-Form. (b, c) Buttons and menu of in the workspace Results.
• General functions
• Density functions
• Transfer to results
(2) Select the category Structural formulas, the phase Chloritoid and the function Ctd-StructForm
(Fig. 6.33a).
(4) XM AP T OOLS opens the workspace Results and display the first element of the structural for-
mula, here Si (in apfu, see Fig. 6.33b,c).
Mg2+
(5) Display the variable XMg (corresponding to Mg2+ + Fe2+
) using the menu shown in Figure 6.33c.
Additional variables can be generated in the workspace Quanti (see section 6.4.1 below).
6.4. Results workspace 153
Airaghi Laura, de Sigoyer Julia, Lanari Pierre, Guillot Stéphane, Vidal Olivier, Monié Patrick, Sautter Ben-
jamin, et Tan Xibin. 2017a. Total exhumation across the beichuan fault in the longmen shan (eastern tibetan
plateau, china): Constraints from petrology and thermobarometry. Journal of Asian Earth Sciences, 140:
108 – 121. ISSN 1367-9120. (Cité page 3.)
Airaghi Laura, Lanari Pierre, de Sigoyer Julia, et Guillot Stéphane. 2017b. Microstructural vs compositional
preservation and pseudomorphic replacement of muscovite in deformed metapelites from the longmen shan
(sichuan, china). Lithos, 282: 262 – 280. ISSN 0024-4937. (Cité page 3.)
Bernier F. 2011. Equilibrage des chlorites-micas-chloritoïdes dans des métasédiments du faciès schiste vert :
étude de l’affleurement de Garvera (zone d’Urseren, Alpes centrales). Mémoire, Université Joseph-Fourier
Grenoble 1., pp. 35. (Cité page 116.)
De Andrade V, Vidal O, Lewin E, O’Brien P, et Agard P. 2006. Quantification of electron microprobe compo-
sitional maps of rock thin sections: an optimized method and examples. Journal of Metamorphic Geology,
24: 655–668. (Cité pages 2, 6 et 29.)
Elmola Ahmed Abd, Charpentier Delphine, Buatier Martine, Lanari Pierre, et Monié Patrick. 2017. Textural-
chemical changes and deformation conditions registered by phyllosilicates in a fault zone (pic de port vieux
thrust, pyrenees). Applied Clay Science, 144: 88 – 103. ISSN 0169-1317. (Cité page 3.)
Gardonio B. 2012. Estimation des conditions P-T dans des métasédiments ; étude de l’affleurement de Garvera
(zone d’Ureseren, Alpes centrales). Mémoire, Université Joseph-Fourier Grenoble 1. (Cité page 116.)
Janots E., Engi M., Berger A., Allaz J., Schwartz J., et Spandler C. 2008. Prograde metamorphic sequence
of REE minerals in pelitic rocks of the Central Alps: implications for allanite–monazite–xenotime phase
relations from 250 to 610 ◦ C. Journal of Metamorphic Geology, 26: 509–526. (Cité page 116.)
Lanari P., Guillot S., Schwartz S., Vidal O., Tricart P., Riel N., et Beyssac O. 2012. Diachronous evolution of
the alpine continental subduction wedge: Evidence from P-T estimates in the Briançonnais Zone houillère
(France-Western Alps). Journal of Geodynamics, 56-57: 39–54. (Cité page 3.)
Lanari P., Riel N., Guillot S., Vidal O., Schwartz S., Pêcher A., et Hattori K. 2013. Deciphering high-pressure
metamorphism in collisional context using microprobe-mapping methods: Application to the Stak eclogitic
massif (NW Himalaya). Geology, 41: 11–114. (Cité pages 3, 29 et 71.)
Lanari P., Rolland Y., Schwartz S., Vidal O., Guillot S., Tricart P., et Dumont T. 2014a. P-T-t estimation of syn-
kinematic strain in low-grade quartz-feldspar bearing rocks using thermodynamic modeling and 40Ar/39Ar
dating techniques: example of the Plan-de-Phasy shear zone unit (Briançonnais Zone, Western Alps). Terra
Nova, 26: 130–138. (Cité page 3.)
Lanari P., Vidal O., De Andrade V., Dubacq B., Lewin E., et Schwartz S. 2014b. XMapTools a MATLAB-based
graphic user interface for microprobe X-ray images processing. Computers and Geosciences, 62: 227–240.
(Cité pages 2, 3, 6, 11, 29, 49, 61, 62, 64, 71, 127, 129, 137 et 145.)
Lanari Pierre et Engi Martin. 2017. Local bulk composition effects on metamorphic mineral assemblages.
Reviews in Mineralogy and Geochemistry, 83(1): 55–102. ISSN 1529-6466. (Cité pages 2, 3, 14, 29 et 148.)
Lanari Pierre, Giuntoli Francesco, Loury Chloé, Burn Marco, et Engi Martin. 2017. An inverse modeling
approach to obtain p–t conditions of metamorphic stages involving garnet growth and resorption. European
Journal of Mineralogy. ISSN 0935-1221. (Cité page 3.)
155
156 Bibliography
Lanari Pierre, Vho Alice, Bovay Thomas, Airaghi Laura, et Centrella Stephen. 2018. Quantitative compo-
sitional mapping of mineral phases by electron probe micro-analyser. Geological Society, London, Spe-
cial Publications, 478. ISSN 0305-8719. URL http://sp.lyellcollection.org/content/
early/2018/03/28/SP478.4. (Cité pages 2, 6, 29, 57, 62, 63, 64, 65, 137 et 145.)
Loury Chloé, Rolland Yann, Cenki-Tok Bénédicte, Lanari Pierre, et Guillot Stéphane. 2016. Late paleozoic
evolution of the south tien shan: Insights from p–t estimates and allanite geochronology on retrogressed
eclogites (chatkal range, kyrgyzstan). Journal of Geodynamics, 96: 62 – 80. ISSN 0264-3707. Subduction
and Orogeny. (Cité page 3.)
Martin C., Debaille V., Lanari P., Goderist S., Vanhaecke F., Vidal O., et Claeys P. 2013. REE and Hf
distribution among mineral phases in the CV-CK clan : a way to explain present-day Hf isotopic variations
in chondrites. Geochimica et Cosmochimica Acta, 120: 496–513. (Cité page 3.)
Mészáros Marianna, Hofmann Beda A., Lanari Pierre, Korotev Randy L., Gnos Edwin, Greber Nicolas D.,
Leya Ingo, Greenwood Richard C., Jull A. J. Timothy, Al-Wagdani Khalid, Mahjoub Ayman, Al-Solami
Abdulaziz A., et Habibullah Siddiq N. 2016. Petrology and geochemistry of feldspathic impact-melt breccia
abar al’ uj 012, the first lunar meteorite from saudi arabia. Meteoritics and Planetary Science, 51(10):
1830–1848. ISSN 1945-5100. (Cité page 3.)
Pourteau A., Sudo M., Candan O., Lanari P., Vidal O., et Oberhänsli R. 2013. Neotethys closure history of
Anatolia: insights from 40Ar–39Ar geochronology and P–T estimation in high pressure metasedimentary
rocks. Journal of Metamorphic Geology, 31: 585–606. (Cité page 3.)
Raimondo Tom, Payne Justin, Wade Benjamin, Lanari Pierre, Clark Chris, et Hand Martin. 2017. Trace
element mapping by la-icp-ms: assessing geochemical mobility in garnet. Contributions to Mineralogy and
Petrology, 172(4): 17. ISSN 1432-0967. (Cité page 3.)
Scheffer Christophe, Vanderhaeghe Olivier, Lanari Pierre, Tarantola Alexandre, Ponthus Léandre, Photiades
Adonis, et France Lydéric. 2016. Syn- to post-orogenic exhumation of metamorphic nappes: Structure and
thermobarometry of the western attic-cycladic metamorphic complex (lavrion, greece). Journal of Geody-
namics, 96: 174 – 193. ISSN 0264-3707. Subduction and Orogeny. (Cité page 3.)
Trincal Vincent, Lanari Pierre, Buatier Martine, Lacroix Brice, Charpentier Delphine, Labaume Pierre, et
Muñoz Manuel. 2015. Temperature micro-mapping in oscillatory-zoned chlorite: Application to study
of a green-schist facies fault zone in the pyrenean axial zone (spain). American Mineralogist, 100(11-12):
2468–2483. ISSN 0003-004X. (Cité page 3.)
Vidal O., Goffé B., Bousquet R., et Parra T. 1999. Calibration and testing of an empirical chloritoid-chlorite
Mg-Fe exchange thermometer and thermodynamic data for daphnite. Journal of Metamorphic Geology, 17:
25–39. (Cité pages 107 et 108.)