### Author Topic: Quant mapping negative threshold  (Read 1921 times)

#### Ben Buse

• Professor
•    • Posts: 415 ##### Quant mapping negative threshold
« on: December 21, 2016, 01:16:48 pm »
Hi John,

I've been doing some quant mapping. The epoxy comes out as uniform zero. I guessing this is because it has large negatives. Out of interest at what negative threshold do you replace negative with zero. I also have metal where it's at detection limit - and the quant map has values just below and above zero - which is good allowing averaging.

Thanks

Ben
« Last Edit: December 21, 2016, 05:24:31 pm by John Donovan »

#### John Donovan

• Emeritus
•     • • Posts: 2496
• Other duties as assigned... ##### Re: Quant mapping negative threshold
« Reply #1 on: December 21, 2016, 04:30:48 pm »
I've been doing some quant mapping. The epoxy comes out as uniform zero. I guessing this is because it has large negatives. Out of interest at what negative threshold do you replace negative with zero. I also have metal where it's at detection limit - and the quant map has values just below and above zero - which is good allowing averaging

Hi Ben,
You are exactly correct.  We don't want to just cut things off at zero, as you point out. Because that would bias the measurements as the concentrations approach zero- e.g., trace elements.  I am so pleased you understand. I've gotten in arguments with colleagues who say they don't want to ever see a negative concentration. But as you know, when measuring zero, one has an equal probability of measuring positive and negative concentrations- given the fact that we perform a background correction!

These people demanded that I add a checkbox to the PFE Analytical | Analysis Options menu dialog to force negative k-ratios to zero, but as you pointed out- that will only bias trace elements in the positive direction.  Some people just don't understand statistics I guess...

Anyway, to answer your question. Yes, for mapping I do force *very large* negative k-ratios to zero in CalcImage so that things like epoxy don't affect an otherwise excellent quantification, but I leave k-ratios that are slightly negative as they are, so one can correctly map concentrations near zero as seen here:

http://probesoftware.com/smf/index.php?topic=73.0

So to answer your question, if you didn't select the "Force Negative K-ratios To Zero" in the Analysis Options menu dialog, the program uses a different sort of check defined by these constants:

Const MAXNEGATIVE_KRATIO! = -0.2
Const MAXNEGATIVE_SUMKRATIO! = -0.01

to deal with nasty pixels.  Basically, if an element k-ratio is less than -0.2 (-20%), it is forced to zero for just that element. And if the sum of all element k-ratios in the pixel are less than -0.01 (-1%), then all the k-ratios are forced to zero for that pixel.

I'm sure one could think of better ways of dealing with this, but at least this prevents really weird matrix corrections, but does allow for trace element analyses to "bounce around zero" as they should when measuring zero.
john
« Last Edit: December 23, 2016, 01:00:49 pm by John Donovan »
John J. Donovan, Pres.
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

#### John Donovan

• Emeritus
•     • • Posts: 2496
• Other duties as assigned... ##### Re: Quant mapping negative threshold
« Reply #2 on: December 26, 2017, 04:39:25 pm »
There is a subtle issue regarding elements by difference when the total (without the element by difference) exceeds 100%.  For example when calculating water concentration in an alkali glass by the difference of the sum of cations measured (and anions measured or calculated), from 100%. Because when the totals are close to 100%, statistically some points may range over 100% merely by chance. Therefore an appropriate quantification of every data point is critical for a valid average of the H2O by difference.  You might want to review the statistical issues in this post before proceeding:

http://probesoftware.com/smf/index.php?topic=922.msg5948#msg5948

The point being that we obtain a more accurate average when the element by difference is added in as a *negative* concentration, for those points where the total (without the element by difference), happens to be *greater* than 100%, for whatever reason. The statistical considerations are similar to proper averaging of trace measurements close to zero, as in the post linked here:

http://probesoftware.com/smf/index.php?topic=579.msg3312#msg3312

On the other hand, when one is calculating a quantitative map and applying an element (or formula) by difference, because every pixel is not a perfect measurement (due to cracks or pits or heterogeneous interaction volumes at phase boundaries), these negative concentrations could cause a problem for the matrix corrections when applied on a pixel by pixel basis.

For example, one might be measuring oxygen, but if the electron beam falls into a surface crack, there will be very little oxygen Ka emitted due to the much longer absorption path to the spectrometer, while other higher energy emissions lines are less affected. So for example, if one is calculating hydrogen by stoichiometry to excess oxygen (ideal - measured), the resulting *deficit* oxygen will result in a negative result, possibly causing problems due to the non-physical nature of the matrix calculation.

After thinking a bit about it, I've decided to utilize the already existing Force Negative K-Ratios To Zero flag in the Analytical | Analysis Options dialog as seen here: for the "element by difference", "formula by difference" and the "hydrogen by stoichiometry to excess oxygen" calculations (this flag was already being utilized in the "element by difference" calculation, so this merely makes the other calculations statistically similar).  The default will be to allow negative concentrations of these elements to be included in the matrix correction for improved average statistics. But when the Force Negative K-Ratios To Zero checkbox is checked, it will only allow positive concentrations to be included in the matrix correction calculations. This being to deal with non-ideal physical situations when mapping many pixels in a quant map.

This will have benefits when one is calculating quant maps with matrix situations where elements, formulas and hydrogen are being calculated by difference as seen here: and when pixels in voids, cracks, and phase boundaries are present. Thanks to John Fournelle who brought this issue to my attention.