Author Topic: plotting PAP phi-rho-z  (Read 9880 times)

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3276
  • Other duties as assigned...
    • Probe Software
Re: plotting PAP phi-rho-z
« Reply #15 on: May 13, 2018, 08:35:30 PM »
Edit:  Fluoresence due to the continuum emitted by the substrate (or overlying material) can also contribute to phi(rho*z) within the thin layer of interest, and this (depending on beam energy) could be more significant for Zn Ka than for the Ka lines of elements of lower atomic number.  I believe that this is what Armstrong is hinting at near the bottom of p. 278 in EPQ, where he states, "...phi(rho*z) equations probably inadvertently incorporate some correction for continuum fluorescence."  Heinrich also makes brief mention of this effect in section 10.2.1 of "Electron Beam X-ray Microanalysis."

Thanks for the explanation.  This makes perfect sense.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3276
  • Other duties as assigned...
    • Probe Software
Re: plotting PAP phi-rho-z
« Reply #16 on: May 14, 2018, 08:42:47 PM »
This is an excellent addition to CalcZAF. We will use it at Lehigh 2018.
Inspection of the equations used for the prz curve do show that it is a function of composition via the backscatter fraction and overvoltage parameters, and those are weighted by concentration; so yes, the curves are specific to the composition. As well the emitted curve clearly depends on the mac of the matrix material, again weighted by concentration.

My understanding is that the monte carlo simulation is superior for determining the lateral and vertical limits of electron scattering compared to the prz algorithm which is based on a small number of tracer experiments and via curve fitting generalized to all compositions. That is, the MC calculation is truly composition specific.

One problem with defining the depth of the analytical volume is that it is a cumulative distribution function. Is the depth the limit of electron scattering at zero residual energy, or the 99.99% limit of characteristic X-ray production, or emission. These are all quite different. There are cumulative plots in the older versions of Goldstein that allow you to quote the resolution at a specific percentage of total. The contoured energy deposition plot of Casino is very nice in outlining the volume from which a given X-ray energy can be generated.

Hi Paul,
That's a good idea.  We should be able to output a table of the % emitted volume vs. depth for each x-ray. 

Give us a few days to think about it.
john
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Ben Buse

  • Professor
  • ****
  • Posts: 488
Re: plotting PAP phi-rho-z
« Reply #17 on: May 15, 2018, 06:06:40 AM »
This looks really good, I look forward to trying it. I didn't realise how complex it was when I asked, thank you John, Brian and Paul for all your hard work and the useful discussion here regarding them

Ben

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3276
  • Other duties as assigned...
    • Probe Software
Re: plotting PAP phi-rho-z
« Reply #18 on: May 16, 2018, 09:19:01 AM »
One problem with defining the depth of the analytical volume is that it is a cumulative distribution function. Is the depth the limit of electron scattering at zero residual energy, or the 99.99% limit of characteristic X-ray production, or emission. These are all quite different. There are cumulative plots in the older versions of Goldstein that allow you to quote the resolution at a specific percentage of total. The contoured energy deposition plot of Casino is very nice in outlining the volume from which a given X-ray energy can be generated.

Hi Paul,
The latest CalcZAF (and PFE) update (v. 12.3.4) now outputs the 60, 80, 90, 95 and 99% area depths for the emitted x-rays.  Here is a table for Fe2SiO4 where I adjusted the keVs (using the Combined Conditions button dialog in CalcZAF) to give similar emitted intensities depths for the 99% emission volumes for Fe, Si and O:

Fe2SiO4, sample 1, Emitted intensity area vs. depth for 60, 80, 90, 95 and 99% areas:
   Fe ka    Mass Depth  Micron Depth, TO = 40, keV = 16, d = 4.39
     60%     0.1711894      0.389953
     80%     0.2519391     0.5738931
     90%     0.3197691     0.7284034
     95%     0.3779091     0.8608409
     99%     0.4909591      1.118358

   Si ka    Mass Depth  Micron Depth, TO = 40, keV = 15, d = 4.39
     60%      0.160497     0.3655969
     80%     0.2426119     0.5526467
     90%     0.3097965     0.7056869
     95%     0.3695162     0.8417225
     99%      0.492688      1.122296

   O  ka    Mass Depth  Micron Depth, TO = 40, keV = 17, d = 4.39
     60%     0.1483749     0.3379839
     80%     0.2275082      0.518242
     90%     0.3016956     0.6872336
     95%     0.3659912     0.8336929
     99%     0.4995283      1.137878

And here is the prz plot output for a "combined condition" sample in CalcZAF:

« Last Edit: April 13, 2020, 09:11:25 AM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Paul Carpenter

  • Professor
  • ****
  • Posts: 46
    • Washington University Analytical Facilities
Re: plotting PAP phi-rho-z
« Reply #19 on: May 16, 2018, 11:28:07 AM »
John,
Yes, this is very nice to have and we will use it at Lehigh Microscopy School for the "Quantitative X-ray Microanalysis: Problem Solving using EDS and WDS Techniques" course.

Cheers,
Paul
Paul Carpenter
Washington University St. Louis

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3276
  • Other duties as assigned...
    • Probe Software
Re: plotting PAP phi-rho-z
« Reply #20 on: May 20, 2018, 06:22:34 PM »
I made a small tweak to the prz table output to the log window.  So just as the prz absorption model info is output to the plot:



The same info is now output to the log window as seen here:

Fe2SiO4, sample 1, Emitted intensity area vs. depth for 60, 80, 90, 95 and 99% areas:
ZAF or Phi-Rho-Z Calculations
LINEMU   Henke (LBL, 1985) < 10KeV / CITZMU > 10KeV
Phi(pz) Absorption of Pouchou and Pichoir-Full (Original)

   Fe ka    Mass Depth  Micron Depth, TO = 40, keV = 15, d = 5
     60%     0.1563522     0.3127044
     80%     0.2387924     0.4775849
     90%     0.3070188     0.6140377
     95%     0.3610314     0.7220629
     99%     0.4463145     0.8926289

   Si ka    Mass Depth  Micron Depth, TO = 40, keV = 15, d = 5
     60%     0.1648737     0.3297475
     80%     0.2456282     0.4912564
     90%     0.3162884     0.6325768
     95%      0.380219     0.7604381
     99%     0.4878917     0.9757833

   O  ka    Mass Depth  Micron Depth, TO = 40, keV = 15, d = 5
     60%     0.1348381     0.2696762
     80%     0.2039859     0.4079717
     90%     0.2662188     0.5324376
     95%      0.321537      0.643074
     99%     0.4356308     0.8712616
« Last Edit: April 13, 2020, 09:00:56 AM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Sander

  • Post Doc
  • ***
  • Posts: 11
Re: plotting PAP phi-rho-z
« Reply #21 on: January 27, 2022, 09:36:05 AM »


Dear prof. Joy, I stumbled across this thread when I was trying to understand the shape of phi(rhoZ) curves.  I implemented the algorithms from the P&P paper as published in the EPQ book (some formulas contain quite some typos, actually) and I managed to reproduce the graphs as you posted them.  I do have a question about the horizontal axis; I can't figure out how to reproduce your micrometer scale.  If I divide the rho-z scale (which is in mg/cm^2) by the density of Zn (7.14 g/cm^3) then I should get the scale in "milli-centimeters", right?  But however I fiddle with the scale factor, I can't get a proper scale in micrometers that matches yours...

Probeman

  • Emeritus
  • *****
  • Posts: 2838
  • Never sleeps...
    • John Donovan
Re: plotting PAP phi-rho-z
« Reply #22 on: January 27, 2022, 09:58:48 AM »
Until Brian responds, you might want to look at the CalcZAF code here:

https://github.com/openmicroanalysis/calczaf

which also displays the phi-rho-z curves in mass thickness and linear thickness.  See procedure PlotPhiRhoZCurves in the code module PlotPhiRhoZ.bas.
« Last Edit: January 27, 2022, 10:36:08 AM by Probeman »
The only stupid question is the one not asked!

Brian Joy

  • Professor
  • ****
  • Posts: 296
Re: plotting PAP phi-rho-z
« Reply #23 on: January 27, 2022, 02:05:13 PM »


Dear prof. Joy, I stumbled across this thread when I was trying to understand the shape of phi(rhoZ) curves.  I implemented the algorithms from the P&P paper as published in the EPQ book (some formulas contain quite some typos, actually) and I managed to reproduce the graphs as you posted them.  I do have a question about the horizontal axis; I can't figure out how to reproduce your micrometer scale.  If I divide the rho-z scale (which is in mg/cm^2) by the density of Zn (7.14 g/cm^3) then I should get the scale in "milli-centimeters", right?  But however I fiddle with the scale factor, I can't get a proper scale in micrometers that matches yours...

Hi Sander,

I’ve attached the spreadsheet that I used to plot the curves using output from my matrix correction program.  (You’ll need to be logged in to see the attachment.)  In order to get depth in microns rather than mass-depth [mg cm-2] on the horizontal axis, it’s necessary to divide mass-depth by the density, 7140 mg cm-3, and then multiply the resulting quantity by 10000 μm cm-1.

Let me know if the spreadsheet solves your problem.

Brian
« Last Edit: January 27, 2022, 04:52:19 PM by Brian Joy »
Brian Joy
Queen's University
Kingston, Ontario
JEOL JXA-8230

Sander

  • Post Doc
  • ***
  • Posts: 11
Re: plotting PAP phi-rho-z
« Reply #24 on: January 28, 2022, 01:25:49 AM »
Until Brian responds, you might want to look at the CalcZAF code here:

https://github.com/openmicroanalysis/calczaf

which also displays the phi-rho-z curves in mass thickness and linear thickness.  See procedure PlotPhiRhoZCurves in the code module PlotPhiRhoZ.bas.

I did see that code, which confirmed some of my doubts about the formulas in the P&P paper.  For example, equation 13 says F = (R/S)* Q(E0), and I thought that should be a division by Q (in correspondence with equations 2 and 3).  Also, I did the integrals and derivations by hand and in equation 24 (for the average depth of ionization), their result misses the 1/F factor.  I saw that the CalcZAF code was doing the same things I did, so that was helpful.

Sander

  • Post Doc
  • ***
  • Posts: 11
Re: plotting PAP phi-rho-z
« Reply #25 on: January 28, 2022, 01:31:27 AM »
Hi Brian,

Can it be that your axis is then actually in rho*Z rather than in microns?  In that case, I *am* getting (nearly) identical results.

Nicholas Ritchie

  • Professor
  • ****
  • Posts: 141
    • NIST DTSA-II
Re: plotting PAP phi-rho-z
« Reply #26 on: January 28, 2022, 04:10:00 AM »
Sander,
   You are right that PAP equation 13 is wrong in the way you indicate. "F=(R/S)(1/Q(E0)".  Drove me nuts until I figured it out!  Dale Newbury told me that back when they were collecting the material for the "Green Book", Heinrich and he had to pressure P&P to fill in all the missing gaps in their models.  I really wish they'd have provided more details about units too.  Write me directly and I'll forward addition articles by this pair that provide more clues.

Personally, I've basically given up on the full PAP in favor of XPP. It is simpler and generally gives better answers.

Nicholas
"Do what you can, with what you have, where you are"
  - Teddy Roosevelt

Brian Joy

  • Professor
  • ****
  • Posts: 296
Re: plotting PAP phi-rho-z
« Reply #27 on: January 28, 2022, 01:21:34 PM »
Hi Brian,

Can it be that your axis is then actually in rho*Z rather than in microns?  In that case, I *am* getting (nearly) identical results.

Hi Sander,

Sometimes I make mistakes, but I don’t make mistakes like that.  I was the one who contributed the Fortran 90 code that John translated to VB for the purpose of plotting these curves.

Have you tried to duplicate Figure 7 from Pouchou and Pichoir’s paper in the Green Book?  I’ve attached another Excel file in which I do this and then convert from mass-depth to depth (in microns).

Brian
Brian Joy
Queen's University
Kingston, Ontario
JEOL JXA-8230

Brian Joy

  • Professor
  • ****
  • Posts: 296
Re: plotting PAP phi-rho-z
« Reply #28 on: January 28, 2022, 01:30:05 PM »
Sander,
   You are right that PAP equation 13 is wrong in the way you indicate. "F=(R/S)(1/Q(E0)".  Drove me nuts until I figured it out!  Dale Newbury told me that back when they were collecting the material for the "Green Book", Heinrich and he had to pressure P&P to fill in all the missing gaps in their models.  I really wish they'd have provided more details about units too.  Write me directly and I'll forward addition articles by this pair that provide more clues.

Personally, I've basically given up on the full PAP in favor of XPP. It is simpler and generally gives better answers.

Nicholas

There is also a sign error in equation 21 (PAP).  The expression for F2(X) should read:

F2(Χ) = (A2/X)*{[(Rx-Rc)*(Rx-Rc-2/X)+2/X2]*exp(-X*Rc)-(2/X2)*exp(-X*Rx)}

What is your justification for stating that XPP "generally gives better answers" than PAP?
Brian Joy
Queen's University
Kingston, Ontario
JEOL JXA-8230

Sander

  • Post Doc
  • ***
  • Posts: 11
Re: plotting PAP phi-rho-z
« Reply #29 on: January 29, 2022, 05:18:26 AM »
Sometimes I make mistakes, but I don’t make mistakes like that.  I was the one who contributed the Fortran 90 code that John translated to VB for the purpose of plotting these curves.

Have you tried to duplicate Figure 7 from Pouchou and Pichoir’s paper in the Green Book?  I’ve attached another Excel file in which I do this and then convert from mass-depth to depth (in microns).

Brian

My humble apologies; I am well aware of who I'm talking to.  It turns out I do make mistakes like that, and my issue was elsewhere in my code.  Your Excel file was very helpful in tracking this down because I could find equivalent points on the curve and directly compare the values.

Unfortunately, the fact that my original phi(rho Z) curves were correct, means that my original issue remains a mystery.  The reason I started diving into this is that I have a series of spectra from pure iron at various working distances, and was trying to simulate the ratio between the K and L lines as a function of WD.  The effect I'm seeing is much larger than the correction by XPP.  I was trying to rule out all the possible causes of this one by one, and one obvious choice would be that I had the scale of my phi curve wrong, meaning that the X-rays were being generated at a different depth than I thought they were (and hence, get a different absorption)...