logo Norris Scientific Norris Scientific » Expet Tools » CALCZAF

HomeSAMx → CalcZAF Converter - Online Help

This website parses sample and standard ASCII files produced by SAMx XMAS microprobe software.

It outputs the standard composition and intensity information in CSV format, but also as as a CalcZAF data file for use in that software. It will also produce an ASCII standard file for importing into a CalcZAF standard database. Read the section on standards below for more information.

Please note: a basic assumption in the logic of this website is that each element present is only being analysed once using one combination of line, crystal, spectrometer, and HV.

This website was developed and tested using v7.19 of "SAMx Standard" and v7.13 of "SAMx Analysis". It has been tested against v11.4.5 of "CalcZAF".

Preparing SAMx Files

The objective is to create a set of standard files, that hold the calibration intensity information, and a set of sample files, that hold the analysis intensity information.

SAMx Standard Files

To create the standard files, run the "Standard" program (green icon) and load each calibration in turn.

SAMx Standard Window

Choose "File" → "Export" → "CurrentStandard(ASCII)"

SAMx Standard Window - Export

An options window will appear, choose "ALL" and save the file. Repeat for all of the standards used by the analysis.

SAMx Standard Window - Export Options

SAMx Analysis Files

To create the analysis files, run the "Analysis" program (red icon) and load each analysis file in turn.

SAMx Analysis Window

Choose "File" → "Print..."

SAMx Analysis Window - Print

An options window will appear. Choose "Ascii File". It is easiest to include "ALL" of the information, however the minimum output to include are the "Pk & Bg" and "Beam Current" items.

Recommended: SAMx Analysis Window - Print - Options Minimum:SAMx Analysis Window - Print - Minimum Options

Packaging The Files for Upload

Arrange the standard and sample files in a folder structure of your choosing, with sensible and distinct file names.

Create a single ZIP file of the entire set of files. An excellent utility for doing this is 7-zip, which is available for a wide range of OSes. Please note that this website is unable to support 7z files made with this program, you must choose "ZIP" as the archive type.

Using the Website

All options and data files are accessible from the front page.

In the "Upload" section choose the ZIP file and click upload. The main page will reload, and the information from the files will be presented in a number of tables. Depending on your use, these tables may be sufficient. Each table can be downloaded using the link "Download Table as CSV" above each table.

To create the CalcZAF files, use the section at the top and click the links to download the files.

There are some quantification options shown in the second section. These allow you to customize the CalcZAF files to some extent, but please note that not all of the CalcZAF quantification options are available here.

Simple Overlap Correction

The version of "SAMx Analysis" tested (v7.13) exports the raw counts-per-second intensity data measured on the spectrometer. Even if an analysis file is configured to perform an overlap correction, the intensity data will not be affected by this. As a result, if you wish to make an overlap correction then these intensities need to be corrected manually, which this website can help with. If you are using a different version of "SAMx Analysis" it may pay to quickly check that the exported intensities are not processed for any overlap correction, otherwise you may apply the correction twice!

This overlap correction is very rudimentary, and should not be relied on for the utmost in accuracy. Ideally the overlap correction would be performed inside the matrix correction. However, to perform simple overlap corrections enter the correction formula in the column "Overlap Correction". There are some common overlaps pre-programmed into this tool using intensity data collected on the RLAHA Jeol JXA-8600 microprobe.

Enter the overlap as a string of "FactorElement" pairs. For example, to make a 10% correction for V on Cr, enter "-0.10V" on the Cr row. Multiple expressions (unlikely for EPMA) can be separated by spaces, and they will be applied in turn from left to right (not that it should matter). If the element is not present in a given analysis then it will be ignored. The overlaps are evaluated recursively, meaning that an overlap correction defined for Ti on V will be applied before the correction for V on Cr. The software will only recurse up to 5-levels deep, which should be plenty for EPMA requirements.

If the intensity of the source element is negative, then no overlap correction is applied as it would be unphysical to add counts in such a case. If negative intensities are common in your data, then check your background positions for interferences, or for a curved background under lower energy lines.

Note that the correction is defined just by element and not by element, line, spectrometer, crystal, and HV. That is because this website functions on the assumption that each element is only being analysed once.

To remove any overlap correction from the Quantification Options section, simply delete the expression from the input box.

Overlap Example

The following screen capture shows the quantification options for trace elements in a carbon-saturated iron experiment. The Fe is analysed by difference, the C is a known amount, and the other elements have been calibrated for quantified analysis. The transition metal overlap sequence of Ti → V → Cr on PET is corrected via the terms shown in the overlap column. The 7.7% (Ti → V) and 8.1% (V → Cr) overlap values were measured manually on pure element standards prior to the analysis. There is no meaningful amount of Mn in these samples, but if there was we would need to make a (Cr → Mn) correction on PET. Thankfully, switching to LIF for Fe and beyond no correction is required thanks to the higher resolution of the LIF crystal.

Quant Options - Overlaps

Calibration Correction Factor

This can be used to adjust the calibration factor by a set amount. You could also open the calibration TXT files prior to uploading and adjust the value there.

The final calibration intensity will be: "Standard Intensity" = "Standard Intensity" x "Calbration Correction Factor"

The default value is 1, and a "1" is implied even if the input is left empty.

Using the Output Files with CalcZAF

Standards Database

Open the Standard program and create a new standard database.

From the file menu choose "Import ASCII file (single row format)" and choose the standards file downloaded from this website. The standard data will be loaded, and most importantly, the standard ID values will match the CalcZAF data file.

Close the standards window.

CalcZAF Main Program

There are two ways to proceed. Before doing anything else, choose "Standard" → "Select Standard Database" and select the standard database created in the previous step.

If wishing to process all of the computations automatically, simply choose "File" → "Open Input Datafile and Calculate/Export All". Choose the data file downloaded from this website and choose an appropriate output filename. The wheels will spin and the program will calculate all of the compositions. Most importantly, if there are entries in the file that require different standards then these will be loaded from the database automatically. This is differnet behaviour to the manual processing described in the next paragraph.

If wishing to process each sample individually, and explore the matrix correction in detail, then there is one additional step that must be done. In the menu choose "Standard" → "Add/Remove Standards To/From Run" and manually allocate all of the standards from your database to the run. This is an important step. If you don't choose all of the standards then an error will be thrown when you reach an analysis entry that references the missing standards.

To see the results, the easiest way is to choose "Analytical" → "Display Current Selected Elements" and then click the yellow "Calculate" button. You can also load the next smple and move through your data file. As noted in the preceding paragraph, if you encounter an entry that references a standard not currently allocated then an error will be thrown.

There are many other options and features available in CalcZAF, and the program comes with an excellent help file and very supportive user forum.

To group your data into populations and provide rudimentary filtering and inspection, try the MUNGE website. It will load the output file directly from CalcZAF and export in CSV and Excel formats.

Some Notes on Standard Management

The operation of this website is slightly more complicated due to the way CalcZAF handles standards. There are two approaches:

Use Existing CalcZAF Standard Database - Ignore SAMx Standard Compositions

This requires that you maintain your own standard database in CalcZAF and then assign the CalcZAF standard ID numbers to the elements by hand.

To use this mode of operation, enter the "CalcZAF Standard ID" for each element being measured. The ID number is shown in the CalcZAF standard software, as highlighted in the figure below:

CalcZAF Standard Window - ID

The trade-off will be more clicks here on the website as you allocate your standard numbers manually, but fewer clicks in CalcZAF as you only load the data file and go. The risk is that you may use the wrong standard ID number for an element, though CalcZAF will warn you if the standard does not contain the element of interest.

Create CalcZAF Standard ASCII File

This mode requires more clicks in CalcZAF, but fewer (or no) clicks on this website. The idea is that the standard compositions from SAMx are used to create an ASCII file that can be imported directly into CalcZAF.

The other advantage to working in this mode is that the website allocates the standards automatically and there will be less chance of making a mistake.

To use this mode of operation, download both files generated by this website. First, open the CalcZAF standards program. Create a new standard database. Choose the "Import ASCII File (single row format)" command and choose the standards file downloaded from this website.

CalcZAF Standard Window - Import

The CalcZAF standard program can now be closed.

Example Files

You can download an example file here [15KB ZIP file].

If you find this page useful for your work please consider letting me know, thanks -- Ash.