Skip to content

Commit c9f7069

Browse files
authored
Merge pull request #34 from xmaptools/dev_lanari
Merge dev_lanari to main
2 parents 279f943 + 1fae3d8 commit c9f7069

24 files changed

+126
-36
lines changed

Changelog.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# CHANGELOG for XMapTools developer
22

33

4-
## XMapTools 4.4 beta 2 RC (build 250215)
4+
## XMapTools 4.4 (build 250321)
55

66
This version is highly recommended for all users as it includes new features, bug fixes and stability improvements to the software.
77

@@ -47,6 +47,7 @@ Note that the public compiled version of XMapTools 4.4 runs natively on Apple Si
4747
- Enhance the Data Visualisation module with the ability to use log scales for binary plots.
4848
- Add log scale compatibility to multi-plot images and to the gif creation function.
4949
- Improve the map display engine as a test for compatibility with future versions of MATLAB. To start XMapTools with the 4.3 legacy display engine, simply add an empty legacy.xmt file to your working directory.
50+
- Fix a problem with the merge function that did not work properly when multiple quanti files had the same name.
5051
- Fix a problem where the zoom state was lost when exporting the map to a new window.
5152
- Fix an aspect ratio error for the RGB image in the Data Visualization module.
5253
- Fix a problem in the Calibration for EPMA module that could occur if a point was outside the map boundaries; a warning message has been added. Thanks to Stephen Centrella for reporting this issue.
@@ -59,9 +60,10 @@ Note that the public compiled version of XMapTools 4.4 runs natively on Apple Si
5960
- Improve compatibility of the Export Plot Tool (opens in a new window) by allowing log scale colour bars to be properly exported.
6061
- Change the data type from 'wt%' to 'wt/wt' in the Import module.
6162
- Edit the message displayed when XMapTools is used for the first time.
63+
- Fix a configuration error for users using the latest developer version via MATLAB.
6264
- Other minor bug and fixes
6365

64-
Release notes published on XX.XX.2025, by Pierre Lanari & Philip Hartmeier.
66+
Release notes published on 21.03.2025, by Pierre Lanari & Philip Hartmeier.
6567

6668

6769
## XMapTools 4.3 (build 240114)

Program/Dev/help/Converter_LAICPMS.html

Lines changed: 86 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313

1414
<BODY>
1515
<h1> Help > Tools > Converter For LA-ICPMS Data </h1>
16-
<p><i>Help file version 04.01.2024 by P. Lanari & T. Markmann</i></p>
16+
<p><i>Help file version 28.02.2025 by P. Lanari & T. Markmann</i></p>
1717

1818
<br \>
1919
<hr>
2020
<p><b>Table of content</b><br \><br \>
2121
<a href="#MainSteps">Main steps</a><br \>
2222
<a href="#Description">Detailed description</a><br \>
23-
<a href="#Step1">- Step 1: Load datafiles</a><br \>
23+
<a href="#Step0">- Step 0: Load datafiles</a><br \>
24+
<a href="#Step1">- Step 1: Log Generator Module (Optional)</a><br \>
2425
<a href="#Step2">- Step 2: Adjust time shift</a><br \>
2526
<a href="#Step3">- Step 3: Extract integrations & plot data</a><br \>
2627
<a href="#Step4">- Step 4: Apply background correction</a><br \>
@@ -62,24 +63,101 @@ <h2><a name="Description"></a>Detailed description</h2>
6263

6364
The data processing steps are described below. The process is fast, so if something goes wrong during the import, it is recommended that you close the module and start again.
6465

65-
<h3><a name="Step1"></a>Step 1: Load datafile(s)</h3>
66+
<h3><a name="Step0"></a>Step 0: Load datafile(s)</h3>
6667

67-
<p>The import tools are located at the top of the interface (Figure 2). The data format can be selected from the first drop down menu and the file format (single or multiple) from the second drop down menu. The data from a measurement session can be contained in a single file or multiple files. <u>If multiple files are selected, it is recommended that you select the last file first and then hold maj while selecting the first file, not vice versa</u>.
68-
</p>
68+
<p>The import tools are located at the top of the interface (Figure 2). The following options can be selected:</p>
69+
70+
<ul>
71+
<li><u>File format</u> (Mass spectrometer): current compatible file formats are Agilent, Thermo. </li>
72+
<li><u>File type</u>: can be "single file" or "multiple files". The data from a measurement session can be contained in a single file or multiple files. Note that if multiple files are selected, it is recommended that you select the last file first and then hold maj while selecting the first file, not vice versa.</li>
73+
<li><u>Laser log file</u>: "yes" if selected, otherwise "no". If no log file is available the Log Generator module will appear when the Load Datafiles button is pressed. Note that a log file cannot currently be used with multiple files.</li>
74+
<li><u>Analysis name format</u>: current compatible formats are "Name - ID" or "Name_ID"</li>
75+
</ul>
6976

70-
<p>For the laser, deselect the log file option if no compatible log file is available. In this case, the Log Generator module will appear when the Load Datafiles button is pressed. </p>
77+
<br />
78+
<center>
79+
<img src="./img/Converter_LAICPMS_ImportMenu.png" width="800">
80+
81+
<p><i><b>Figure 2</b>: Options for importing LA-ICPMS data. </i></p>.
82+
</center>
7183

7284
<p>Once appropriate options have been selected, press the <i>Load Datafiles</i> <img src="./img/SS_ConverterLAICPMS_Loadfiles.png" height="30"> button to select: (1) a single data file from the mass spectrometer containing timestamps and intensity data (e.g. Data.csv) or multiple files (see warning above), and (2) if the Log File option is enabled, immediately after a corresponding log file (e.g. Log.csv) from the laser system (tested with RESONETICS only).</p>
7385

7486
<p>When the opening window pops up, select the data first. A new window will automatically pop up if the Log File option is enabled to select a compatible log file.</p>
7587

88+
<p>For each file, the date and time format can be set by selecting the correct format from the list (Fig. 3). The date and time read is displayed at the top of the window under Label.
89+
</p>
90+
7691
<br />
7792
<center>
78-
<img src="./img/Converter_LAICPMS_ImportMenu.png" width="800">
93+
<img src="./img/Converter_LAICPMS_DateFormat.png" width="250">
7994

80-
<p><i><b>Figure 2</b>: Options for importing LA-ICPMS data. </i></p>.
95+
<p><i><b>Figure 3</b>: Example of selecting the date and time format for each file type. </i></p>.
8196
</center>
8297

98+
99+
<h3><a name="Step1"></a>Step 1: Log Generator Module (Optional)</h3>
100+
101+
<p>The Log Generator module opens when multiple files are selected (Fig. 4). This module can be used to set the map size (Map Settings) and the laser on and off times for each measurement.</p>
102+
103+
<br />
104+
<center>
105+
<img src="./img/Converter_LAICPMS_LogGenerator_1.png" width="800">
106+
107+
<p><i><b>Figure 4</b>: Log Generator Module. </i></p>.
108+
</center>
109+
110+
<p>The first step is to set the <u>map settings</u>. You can set the start position (<i>X</i> and <i>Y</i>), but the default values [1,1] should work for most applications. The laser diameter must be set to obtain the correct pixel size in the generated maps. The scan speed must be defined to allow the spatial coordinates of each sweep to be calculated. An incorrect scan speed would result in a deformed map around the <i>X</i> dimension.
111+
</p>
112+
113+
<p>The second step is to adjust the file names using the tools in the File Names tab. The aim is to have identical file names for each type of measurement. In the example shown in Figure 5, the original file name is 493-STDGL3. The material name is STGDGL3 and therefore the name position is 2 when the string is split with a '-' delimiter. Adjust the format and if the example shown for the first name works, press the <i>Apply to all</i> button.</p>
114+
115+
<br />
116+
<center>
117+
<img src="./img/Converter_LAICPMS_LogGenerator_2.png" width="300">
118+
119+
<p><i><b>Figure 5</b>: Customise file names in the Log Generator module. </i></p>.
120+
</center>
121+
122+
<p>The third step is to select a filename from the table to display the signal (sum of the intensities). In the signal definition section you can use a ROI to select a part of the signal (e.g. between sweeps 13 and 93 in Figure 6). Here the sweep start value has been manually set to 1 and the type is background. Then, press <i>Add to table</i> to add the entry to the table (Fig. 6). Then a measurement can be added between the next sweep and the last sweep (2 to 258 in Fig. 7)
123+
</p>
124+
125+
<br />
126+
<center>
127+
<img src="./img/Converter_LAICPMS_LogGenerator_3.png" width="800">
128+
129+
<p><i><b>Figure 6</b>: Example of signal definition </i></p>.
130+
</center>
131+
132+
<br />
133+
<center>
134+
<img src="./img/Converter_LAICPMS_LogGenerator_4.png" width="800">
135+
136+
<p><i><b>Figure 7</b>: Example of signal definition (continued) </i></p>.
137+
</center>
138+
139+
<p>The fourth step is to select the <i>Apply</i> tab and press the <i>Apply to Same Name</i> button. The signal definition will then be applied to the file names with the same name (Fig. 8).
140+
</p>
141+
142+
<br />
143+
<center>
144+
<img src="./img/Converter_LAICPMS_LogGenerator_5.png" width="800">
145+
146+
<p><i><b>Figure 8</b>: Example of signal definition (continued) </i></p>.
147+
</center>
148+
149+
<p>This operation must be repeated to apply the signal definitions to all measurements. Note that the number of sweeps for each type of signal (background/measurement) can be edited in the table (e.g. Sweep_End to 315 in the bottom right table in Fig. 9). </p>
150+
151+
<p>Finally, press the <i>GENERATEW LOG</i> button to apply the changes and return to the Converter module.</p>
152+
153+
<br />
154+
<center>
155+
<img src="./img/Converter_LAICPMS_LogGenerator_6.png" width="800">
156+
157+
<p><i><b>Figure 9</b>: Example of signal definition (continued) </i></p>.
158+
</center>
159+
160+
83161
<h3><a name="Step2"></a>Step 2: Adjust time shift</h3>
84162

85163
<p>The value of the time shift can be adjusted to synchronise the data file with the log file. In the main figure, the total signal is plotted together with the laser on/off signals given in the log file (vertical red lines). </p>
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

Program/Dev/splash/splash_4.3.jpg

-887 KB
Binary file not shown.

Program/Dev/splash/splash_4.4.jpg

894 KB
Loading

Program/Dev/splash/splash_4.4_b1.jpg

-872 KB
Binary file not shown.

Program/Dev/splash/splash_4.4_b2.jpg

-877 KB
Binary file not shown.

Program/Install_XMapTools_MATLAB.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060

6161
savepath
6262

63+
% Added on 21.02.2025 for MATLAB installation
64+
RESET_CONFIG;
65+
6366
disp('Installation completed')
6467

6568
end

Program/Modules/About_XMapTools.mlapp

28 Bytes
Binary file not shown.

Program/Modules/Converter_EPMA.mlapp

216 Bytes
Binary file not shown.

Program/Modules/Selector.mlapp

72 Bytes
Binary file not shown.

Program/RESET_CONFIG.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@
3434
save('config_xmaptools.mat','config');
3535

3636
clear all
37-
disp('Completed – configuration has been reset')
37+
disp('XMapTools Config data have been reset')

Program/SourceControl/About_XMapTools_exported.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function createComponents(app)
8484
app.Copyright.FontWeight = 'bold';
8585
app.Copyright.Layout.Row = 11;
8686
app.Copyright.Layout.Column = [2 7];
87-
app.Copyright.Text = '© 2021-2025, University of Bern, Institute of Geological Sciences, Pierre Lanari';
87+
app.Copyright.Text = '© 2021-2025, University of Lausanne, Institute of Earth Sciences, Pierre Lanari';
8888

8989
% Create Information
9090
app.Information = uilabel(app.GridLayout);
@@ -93,7 +93,7 @@ function createComponents(app)
9393
app.Information.FontSize = 11;
9494
app.Information.Layout.Row = [7 10];
9595
app.Information.Layout.Column = [2 7];
96-
app.Information.Text = {'XMapTools is a free software solution for the analysis of chemical maps developed by Prof. Pierre Lanari at the University of Bern, Switzerland.

'; ''; 'Main contributors: Pierre Lanari, Thorsten Markmann, Joshua Laughton, Mahyra Tedeschi

'; ''; 'License: GNU General Public License v3.0'; ''; '

Website: https://xmaptools.ch
'; 'Resources: https://resources.xmaptools.ch'; '
Github: https://github.com/xmaptools '; 'PTtoolbox (by J. Laughton): https://github.com/JoshuaLaughton/PTtoolbox '};
96+
app.Information.Text = {'XMapTools is a free software solution for the analysis of chemical maps developed by Prof. Pierre Lanari at the University of Lausanne, Switzerland.

'; ''; 'Main contributors: Pierre Lanari, Philip Hartmeir, Thorsten Markmann, Joshua Laughton, and Mahyra Tedeschi

'; ''; 'License: GNU General Public License v3.0'; ''; '

Website: https://xmaptools.ch
'; 'Resources: https://resources.xmaptools.ch'; '
Github: https://github.com/xmaptools '; 'PTtoolbox (by J. Laughton): https://github.com/JoshuaLaughton/PTtoolbox '};
9797

9898
% Show the figure after all components are created
9999
app.XMapTools_Info.Visible = 'on';

Program/SourceControl/Selector_exported.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
properties (Access = private)
16-
XMapToolsApp % Description
16+
XMapToolsApp
1717
end
1818

1919

@@ -42,7 +42,7 @@ function startupFcn(app, XMapToolsApp, Names, Label, Mode)
4242
app.Select.Visible = 'off';
4343

4444
for i = 1:length(Names)
45-
p = uitreenode(app.Tree,'Text',char(Names{i}));
45+
p = uitreenode(app.Tree,'Text',char(Names{i}),'UserData',i);
4646
end
4747

4848
app.Label.Text = Label;
@@ -74,8 +74,11 @@ function CancelButtonPushed(app, event)
7474
function ApplyButtonPushed(app, event)
7575
for i = 1:length(app.Tree.SelectedNodes)
7676
Names{i} = app.Tree.SelectedNodes(i).Text;
77+
SelectedID(i) = app.Tree.SelectedNodes(i).UserData;
7778
end
7879
app.XMapToolsApp.ExchangeSelector = Names;
80+
app.XMapToolsApp.ExchangeSelectorId = SelectedID;
81+
7982
SelectCloseRequest(app);
8083
end
8184
end

Program/SourceControl/XMapTools_exported.m

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@
297297
Sampling_SelectStripeButton matlab.ui.control.Button
298298
Sampling_ExportButton matlab.ui.control.Button
299299
Sampling_ResetButton matlab.ui.control.Button
300-
Sampling_Plot2 matlab.ui.control.UIAxes
301300
Sampling_Plot1 matlab.ui.control.UIAxes
301+
Sampling_Plot2 matlab.ui.control.UIAxes
302302
StandardsTab matlab.ui.container.Tab
303303
GridLayout9_3 matlab.ui.container.GridLayout
304304
SubTabStandard matlab.ui.container.TabGroup
@@ -322,8 +322,8 @@
322322
Std_Shift_Y matlab.ui.control.NumericEditField
323323
StdAll_Synchronize matlab.ui.control.Button
324324
StdAll_profil matlab.ui.control.UIAxes
325-
StdAll_map1 matlab.ui.control.UIAxes
326325
StdAll_map2 matlab.ui.control.UIAxes
326+
StdAll_map1 matlab.ui.control.UIAxes
327327
CompositionTab matlab.ui.container.Tab
328328
GridLayout9_4 matlab.ui.container.GridLayout
329329
CompViewer_DensityMenu matlab.ui.control.DropDown
@@ -477,6 +477,7 @@
477477
config % For add-ons
478478

479479
ExchangeSelector % To communicate with Selector
480+
ExchangeSelectorId % added 4.4
480481

481482
ExchangeClassification % To communicate with the classification module (01.2024 – 4.4)
482483

@@ -7165,7 +7166,7 @@ function startupFcn(app, varargin)
71657166

71667167
app.Options_resolutionLabel.Text = ['Resolution: ',num2str(app.XMapTools_Position.Live(1)),'x',num2str(app.XMapTools_Position.Live(2)),' (',num2str(app.XMapTools_Position.Original(1)),'x',num2str(app.XMapTools_Position.Original(2)),')'];
71677168

7168-
app.XMapTools_VER = 'XMapTools 4.4 beta 2 build 240114';
7169+
app.XMapTools_VER = 'XMapTools 4.4 build 250321';
71697170
app.XMapTools_version.Text = app.XMapTools_VER;
71707171
%disp('Version set'),toc
71717172
% Check for Updates ------------------------------------------
@@ -7423,6 +7424,8 @@ function startupFcn(app, varargin)
74237424

74247425
Text2Disp = [Text2Disp,'> LA-ICPMS:\n Markmann, T.A., Lanari, P., Piccoli, F., Pettke, T., Tamblyn, R., Tedeschi, M., Lueder, M., Kunz, B., Riel, N., and Laughton, J. (2024). Multi-phase quantitative compositional mapping by LA-ICP-MS: analytical approach and data reduction protocol implemented in XMapTools. Chemical Geology, 646, 121895.\n\n'];
74257426

7427+
Text2Disp = [Text2Disp,'> CLASSIFICATION:\n Lanari, P., Tedeschi, M., (2025). Chemical map classification in XMapTools. Applied Computing and Geosciences, 25, 100230.\n\n'];
7428+
74267429
Text2Disp = [Text2Disp,'> Mapping technique:\n Lanari, P., & Piccoli, F., (2020). New horizons in quantitative compositional mapping – Analytical conditions and data reduction using XMapTools. IOP Conf. Series: Materials Science and Engineering 891, 012016.\n\n'];
74277430
Text2Disp = [Text2Disp,'> LA-ICPMS data visualization:\n Raimondo, T., Payne, J., Wade, B., Lanari, P., Clark, C., Hand, M., (2017). Trace element mapping by LA-ICP-MS: assessing geochemical mobility in garnet. Contributions to Mineralogy and Petrology, 172, 17.\n\n'];
74287431
Text2Disp = [Text2Disp,'> Local bulk composition and density correction:\n Lanari, P., & Engi, M. (2017). Local bulk composition effects on metamorphic mineral assemblages, Reviews in Mineralogy and Geochemistry, 83, 55-102.\n\n'];
@@ -13473,7 +13476,8 @@ function Calibrate_MergeButtonPushed(app, event)
1347313476
waitfor(Selector(app,app.XMapToolsData.MapData.Qt.Names,'Select phases in the list below','Multiple'));
1347413477
close(app.WaitBar)
1347513478

13476-
s = find(ismember(app.XMapToolsData.MapData.Qt.Names,app.ExchangeSelector));
13479+
% s = find(ismember(app.XMapToolsData.MapData.Qt.Names,app.ExchangeSelector));
13480+
s = app.ExchangeSelectorId; % changed 4.4
1347713481

1347813482
%[s,v] = listdlg('PromptString','Select maps:','SelectionMode','multiple','ListString',app.XMapToolsData.MapData.Qt.Names);
1347913483

@@ -18500,20 +18504,20 @@ function createComponents(app)
1850018504
app.Sampling_ResetButton.Layout.Column = 7;
1850118505
app.Sampling_ResetButton.Text = '';
1850218506

18503-
% Create Sampling_Plot2
18504-
app.Sampling_Plot2 = uiaxes(app.GridLayout9_2);
18505-
app.Sampling_Plot2.PlotBoxAspectRatio = [1.02534562211982 1 1];
18506-
app.Sampling_Plot2.FontSize = 9;
18507-
app.Sampling_Plot2.Layout.Row = [12 19];
18508-
app.Sampling_Plot2.Layout.Column = [1 7];
18509-
1851018507
% Create Sampling_Plot1
1851118508
app.Sampling_Plot1 = uiaxes(app.GridLayout9_2);
1851218509
app.Sampling_Plot1.PlotBoxAspectRatio = [1.02534562211982 1 1];
1851318510
app.Sampling_Plot1.FontSize = 9;
1851418511
app.Sampling_Plot1.Layout.Row = [3 10];
1851518512
app.Sampling_Plot1.Layout.Column = [1 7];
1851618513

18514+
% Create Sampling_Plot2
18515+
app.Sampling_Plot2 = uiaxes(app.GridLayout9_2);
18516+
app.Sampling_Plot2.PlotBoxAspectRatio = [1.02534562211982 1 1];
18517+
app.Sampling_Plot2.FontSize = 9;
18518+
app.Sampling_Plot2.Layout.Row = [12 19];
18519+
app.Sampling_Plot2.Layout.Column = [1 7];
18520+
1851718521
% Create StandardsTab
1851818522
app.StandardsTab = uitab(app.TabGroup);
1851918523
app.StandardsTab.Title = 'Standards';
@@ -18694,16 +18698,6 @@ function createComponents(app)
1869418698
app.StdAll_profil.Layout.Row = [1 3];
1869518699
app.StdAll_profil.Layout.Column = [1 2];
1869618700

18697-
% Create StdAll_map1
18698-
app.StdAll_map1 = uiaxes(app.GridLayout11);
18699-
title(app.StdAll_map1, 'Element')
18700-
app.StdAll_map1.Toolbar.Visible = 'off';
18701-
app.StdAll_map1.PlotBoxAspectRatio = [1.38275862068966 1 1];
18702-
app.StdAll_map1.FontSize = 9;
18703-
app.StdAll_map1.Box = 'on';
18704-
app.StdAll_map1.Layout.Row = [5 8];
18705-
app.StdAll_map1.Layout.Column = [1 2];
18706-
1870718701
% Create StdAll_map2
1870818702
app.StdAll_map2 = uiaxes(app.GridLayout11);
1870918703
title(app.StdAll_map2, 'sqrt(sum(corrcoef^2))')
@@ -18714,6 +18708,16 @@ function createComponents(app)
1871418708
app.StdAll_map2.Layout.Row = [9 12];
1871518709
app.StdAll_map2.Layout.Column = [1 2];
1871618710

18711+
% Create StdAll_map1
18712+
app.StdAll_map1 = uiaxes(app.GridLayout11);
18713+
title(app.StdAll_map1, 'Element')
18714+
app.StdAll_map1.Toolbar.Visible = 'off';
18715+
app.StdAll_map1.PlotBoxAspectRatio = [1.38275862068966 1 1];
18716+
app.StdAll_map1.FontSize = 9;
18717+
app.StdAll_map1.Box = 'on';
18718+
app.StdAll_map1.Layout.Row = [5 8];
18719+
app.StdAll_map1.Layout.Column = [1 2];
18720+
1871718721
% Create CompositionTab
1871818722
app.CompositionTab = uitab(app.TabGroup);
1871918723
app.CompositionTab.Title = 'Composition';

Program/XMapTools.mlapp

896 Bytes
Binary file not shown.

Program/config_xmaptools.mat

-130 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)