Author Topic: Getting Started With CalcZAF  (Read 10738 times)

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2259
  • Other duties as assigned...
    • Probe Software
Getting Started With CalcZAF
« on: October 17, 2013, 04:31:51 pm »
A very nice tutorial for quantitative calculations in CalcZAF can be performed using the default CalcZAF.dat input file.  The following post is a step by step exercise discussing the various data types in this input file and options for the quantitative calculations.

If you do not have CalcZAF already installed on your computer, you can download it for free here:

http://www.probesoftware.com/download/CalcZAF.msi

Assuming you already have CalcZAF installed, you should first check that it is up to date by running the Help | Update CalcZAF menu and clicking the Download Update button and following the on-screen directions.

When finished updating CalcZAF we can start by running CalcZAF.exe, and clicking the File | Open menu and selecting the default CalcZAF.DAT file as seen here:



Note that the format of this file is documented in the Probe for EPMA User Reference manual which can be accessed by hitting the F1 key in CalcZAF. You can also output CalcZAF format files from Probe for EPMA for test purposes. The first "sample" which is MgO will be loaded to the Calculate ZAF Corrections window as seen here:



Note that the first calculation option "Calculate Intensities From Concentrations" is automatically selected because that is specified in the CalcZAF.dat file. Note that if you enter a composition from a formula or the standard database, this is the default option for calculation. Next click the Calculate button and the results will be output to the ZAF Calculations and log windows as seen here:



Note the calculated k-ratios along with a number of other useful parameters. You can click on the element row to change the element concentrations or the Analytical | Operating Conditions menu to change the keV and then click the Calculate button again as desired.

We can now load the next "sample" in the CalcZAF.Dat file by clicking the Load Next Dataset From Input File as shown here:



and see that it is a calculation of concentrations from Fe, Si and O unknown *and* standard intensities and of course the standard compositions. When the Calculate button is again clicked we see the following results:



Now an interesting option is the ability to compare the results of the 10 different matrix corrections (and 6 different mass absorption coefficient tables) in CalcZAF- courtesy of John Armstrong who wrote the original CITZAF code. This is performed by simply checking the Use All Matrix Corrections checkbox shown here and again clicking the Calculate button:



The tabulated results can be seen listed in the log window after clicking OK and then exporting the results to Excel (if available):



The next sample is an alloy steel, again unknown and standard intensities with pure element standards:



This next sample is an iron oxide calculated from raw k-ratios and standard compositions only:



This example is again MgO, but compositions calculated from unknown k-ratios normalized to pure elements:



This next sample is magnetite (Fe3O4) calculated from unknown and standard counts (and standard compositions) with oxygen calculated by stoichiometry:



The excess oxygen when Fe is displayed as FeO is visible here:



This next example is Si calculated by difference. The calculation by difference and other calculation options in CalcZAF are accessed with the Calculation Options button shown here:



This is a slightly more complicated calculation where oxygen is calculated by stoichiometry and Fe is calculated by stoichiometry to the stoichiometric oxygen. Therefore the only element actually measured in this example was Si!



Note that the above type of calculation is often applied to carbonates where only the cations (Ca, Mg, Fe, Mn, etc) are measured, oxygen is calculated by stoichiometry and carbon is calculated by stoichiometry to the calculated oxygen by the rule 0.333 carbon atoms for each oxygen atom.

The remaining examples are similar to what we have already looked at above, but a few others deserve additional explanation.  This example of calculating stoichiometric oxygen in a matrix where some of the oxygen is replaced by a halogen element is interesting:



Because the matrix correction was calculated with the assumption of stoichiometric oxygen as shown above, the absorption correction of F ka by oxygen is over calculated. Particularly since the absorption of F ka by oxygen is quite severe. However, by simply applying a correction for oxygen equivalent of halogen in the matrix iteration we can rigorously calculate the proper absorption correction for F ka by stoichiometric oxygen as seen here:



The modified absorption correction and results are seen here and it is worth noting that without the subtraction of the oxygen equivalent of fluorine from the calculated oxygen during the matrix correction, the fluorine values will be in error by over 20% relative (9.252 wt% without the halogen equivalent correction and 9.023 wt% with the halogen equivalent correction in the matrix correction)!



Finally note that the standard used for fluorine should be entered properly into the standard composition database (Standard.mdb) with the oxygen equivalent of halogen applied as seen here:



There are many other calculation options available in CalcZAF, but this post should get you started. As always, please let us know if you have any questions related to this post.

A couple of documents that you might find useful:

http://epmalab.uoregon.edu/pdfs/JTA-1988-ZAF.pdf

http://epmalab.uoregon.edu/pdfs/CalcZAF,%20TryZAF%20and%20CITZAF.pdf
« Last Edit: September 18, 2015, 05:00:24 pm by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2259
  • Other duties as assigned...
    • Probe Software
Re: Getting Started With CalcZAF
« Reply #1 on: December 23, 2013, 09:15:56 am »
Here's a different approach to getting started with CalcZAF, that explains the output in some detail.

After launching CalcZAF, first click the Enter Composition as Formula String and enter any compound formula, for example, CaMgSi2O6:



Then enter the formula in the formula field as shown here:



After clicking OK, you will see the following the the Calculate ZAF Corrections window:



Note that the formula you entered has been converted automatically to concentrations (normalized to 100% of course).  One can modify the conditions (take off angle, keV, etc, using the Analytical | Operating Conditions menu or the calculation options using the Analytical | ZAF, Phi-Rho-Z, Alpha Factor and Calibrations Curve Selections menu as seen here:



Now click the Calculate button and you will see the Std K-fac. output in the Calculate ZAF Corrections window as seen here:



Because you entered a composition, the program assumes you want to calculate intensities (k-ratios) from concentrations (mole formulas or concentration strings, or from the standard database).

If you want to calculate a composition from intensities, simply click on each element and enter the appropriate intensities and standard information.

In the meantime let's examine the log window output in more detail as seen here:



If you have further questions please post them here...
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

jared.wesley.singer

  • Post Doc
  • ***
  • Posts: 17
Re: Getting Started With CalcZAF
« Reply #2 on: October 29, 2014, 08:49:00 am »
Hello World,

I have a further question:

Has anyone created a CalcZAF input file or process for mixed carbonate, sulfate, and phosphate?  Can the "Use Oxygen From Halogens Correction" be rigged for oxyanions? 

In this case I measured minor S and P in forams.  For each sulfur I'll get SO3C, and there will be excess oxygen because the SO42- should replace CO32- as do halogens; similar for phosphorus:

3,7,15,40,"foram6",0,0,0
 1            ""            "c"            0.3333       ""            ""             0
"Mg"          "ka"           1             1             32767         0             0.006504      1
"Ca"          "ka"           1             1             32767         0             0.357064      1
"Sr"          "la"           1             1             32767         0             0.000967      1
"S"           "ka"           1             3             32767         0             0.000114      1
"P"           "ka"           2             5             32767         0             0.001124      1
"O"           ""             1             0             0             0             0             0
"C"           ""             1             2             0             0             0             0

Thanks for any ideas on how to improve this kind of analysis,

Jared
« Last Edit: October 29, 2014, 09:47:06 am by John Donovan »

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2259
  • Other duties as assigned...
    • Probe Software
Re: Getting Started With CalcZAF
« Reply #3 on: October 29, 2014, 09:47:57 am »
Has anyone created a CalcZAF input file or process for mixed carbonate, sulfate, and phosphate?  Can the "Use Oxygen From Halogens Correction" be rigged for oxyanions? 

In this case I measured minor S and P in forams.  For each sulfur I'll get SO3C, and there will be excess oxygen because the SO42- should replace CO32- as do halogens; similar for phosphorus...

I guess you could just "specify" a fixed concentration for the matrix effects- it isn't that important for trace and often minor elements...  also check out this fun post:

https://probesoftware.com/smf/index.php?topic=92.msg520#msg520
 
« Last Edit: August 24, 2018, 05:05:03 pm by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Probeman

  • Emeritus
  • *****
  • Posts: 1672
  • Never sleeps...
    • John Donovan
Re: Getting Started With CalcZAF
« Reply #4 on: December 04, 2014, 01:50:54 pm »
On certain Win7 computers (but only on some of them!), when you perform an update from the Help menu, you follow the msi installer prompts to update CalcZAF and you will sometimes get this error after clicking the Install button:



After much investigation we have to admit we do not understand this error (we tried all the suggestions we found after googling this error and nothing seems to fix the issue).

However, if you simply browse to the Probe for EPMA application folder (usually C:\Probe Software\Probe for EPMA) and just double-click the CalcZAF.msi installer that you downloaded, the msi installer  will run fine the 2nd time.

This might be related to recent reports of other Windows installer errors for Skype and Adobe. If you figure out what Microsoft did and know how to fix it, please tell us!
The only stupid question is the one not asked!

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2259
  • Other duties as assigned...
    • Probe Software
Re: Getting Started With CalcZAF
« Reply #5 on: August 21, 2015, 08:23:23 am »
I recently modified the app registration process in CalcZAF (and PFE), so with v. 10.9.9 the software can now install and run properly under Japanese and Chinese (Unicode) Windows OS.
john
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Probeman

  • Emeritus
  • *****
  • Posts: 1672
  • Never sleeps...
    • John Donovan
Re: Getting Started With CalcZAF
« Reply #6 on: August 26, 2015, 12:58:22 pm »
I made some slight changes to the default xline.dat, xedge.dat and xflur.dat emission, edge energy and fluorescent yield files, which resulted in some slight differences in the calculations as shown in the attached images for the Henke and FFAST MACs.  These changes will not affect your current version (this goes to!) 11 PFE installation as the xline.dat, xedge.dat and xflur.dat files are not overwritten.
The only stupid question is the one not asked!