Intro
This article introduces workarounds for errors from read_qnt()
and read_xmap()
when files recording analytical conditions are missing or written in incompatible formats depending on instruments (i.e., versions of EPMA hardware and software).
Spot analysis data
Among the required files to read spot analysis data (Tab. 1), .cnd/elemw.cnd
and Pos_001/data001.qnt
can be missing or be written in unexpected format. In such case, prepare a csv file describing element names, dwell time for peak and background, and relative positions of backgrounds in a given format (Tab. 2). Then, following code will read spot analysis data.
qnt <- read_qnt(".qnt", conditions = "conditions_qnt.csv")
# First argument is path to the directory containing required files.
# "conditions" argument is a path to a user-prepared csv file.
Tab. 1: Required files to retrieve spot analysis data
.cnd/elemw.cnd or Pos_001/data001.qnt |
Metadata including dwell time for peak and background, and relative positions of backgrounds. In some case, .cnd/elemw.qnt is incomplete or missing, and needs to be prepared manually (e.g., https://gist.github.com/atusy/f1577b67b8874c9e915941c0725d0e22). JXA-8230 lacks .cnd/elemw.cnd , but provides Pos_001/data/qnt . |
bgm.qnt |
Minus-side background intensity |
bgp.qnt |
Plus-side background intensity |
elem.qnt |
Element names specified for matrix corrections (e.g., oxide or metal in ZAF) |
elint.qnt |
Element names as is. |
mes.qnt |
Probe current |
net.qnt |
Net intensity |
peak.qnt |
Peak intensity. This file is optional. If missing, peak intensity is calculated from net and background intensities. |
stg.qnt |
Coordinates and comments |
wt.qnt |
Mass concentrations [wt%] |
Tab. 2: An example csv file which records element names, dwell time for peak and background, and relative positions of backgrounds. Download csv file from here.
SiO2 |
Si |
1 |
1 |
10 |
5 |
MgO |
Mg |
1 |
1 |
10 |
5 |
Mapping data
Mapping data are expected to be saved as ASCII converted files (*.txt
or *.csv
) and as condition files (*.cnd
) (Tab. 3). Asterisks are expected to be filled by the format of #_map
or by data#
where sharps are integers. File names of ASCII converted files and condition files must be paired (e.g, 1_map.txt
and 1_map.cnd
). In case of irregular file names or missing condition files, prepare a csv file describing element name, file path, instrument, dwell time, probe current, X-Y coordinates of a starting pixel, step size, map size, and dead time (Tab. 4). Then, following code will read spot analysis data.
xmap <- read_qnt(conditions = "conditions_xmap.csv")
# "conditions" argument is a path to a user-prepared csv file.
Tab. 3: Required files to retrieve mapping data
*_map.txt or data*.csv |
ASCII converted mapping data (e.g., 1_map.txt, 2_map.txt,… or data001.csv, data002.csv, …) |
*.cnd |
Analytical conditions: element name, dwell time, probe current, step size, pixel size, and coordinates. File names must corresponds to mapping data (e.g, 1_map.cnd, data001.cnd) |
Tab. 4: An example csv file which records element names, dwell time for peak and background, and relative positions of backgrounds. Except for ‘Element’ and ‘File path’, only values in a first row is used. The other cells are ignored regardless of their contents. Download csv file from here.
Si |
.map/1/1_map.txt |
JXA-DUMMY |
100 |
1e-07 |
0 |
0 |
5 |
100 |
100 |
0 |
Mg |
.map/1/2_map.txt |
|
NA |
NA |
NA |
NA |
NA |
NA |
NA |
NA |