Author Topic: Using Probe for EPMA software in "demonstration mode" to teach EPMA  (Read 11424 times)

Probeman

  • Emeritus
  • *****
  • Posts: 1787
  • Never sleeps...
    • John Donovan
Re: Using Probe for EPMA software in "demonstration mode" to teach EPMA
« Reply #60 on: August 14, 2017, 12:15:47 pm »

What aspect of L and H type crystals(?) are you thinking of?
john

Hi John
So the H crystals have poorer resolution compared to the L crystals - due to the smaller rowland circle. Therefore they ideally would be given different energy resolutions

Ben

Hi Ben,
Yeah, that could be done, but I suspect there are many other aspects where the wavescan simulation could be also be improved.

For example, currently I synthesize the wavescan by combining pure element Penepma spectra for pure elements at 1 eV resolution. Then I convolve the summed scans using the Convolg.exe FORTRAN app that comes with Penepma for each crystal type.  At the time I tweaked the convolution resolution to get approximately WDS type peaks using the following equations:

C  ****  Example of FWHM(E) function for a WDS LIF spectrometer (~10 eV at 5898 eV)
      FWHM=0.0000003D0*E**2.

C  ****  Example of FWHM(E) function for a WDS PET spectrometer (~14 eV at 3690 eV)
      FWHM=0.0000008D0*E**2

C  ****  Example of FWHM(E) function for a WDS TAP spectrometer   (~4 eV at 1500 eV)
      FWHM=0.000000000005D0*E**3.9

C  ****  Example of FWHM(E) function for a WDS LDE spectrometer (~10 eV at 512 eV)
      FWHM=0.000000001D0*E**3.7

I'm not saying these are correct, but they give reasonable looking results.  The problem is that WDS resolution is extremely non-linear as a function of energy, and in fact has very high resolution at low energies and very low resolution at high energies, which is of course the opposite of EDS spectra!  See an example of a WDS spectra plotted in eV space:

https://probesoftware.com/smf/index.php?topic=837.msg5476#msg5476

Then there is the question of peak shape. The Convolg.exe FORTRAN app assumes only a Gaussian peak, but in fact the WDS peak is a Gaussian-Lorentenzian, with greatly extended tails due to polygonization effects from the crystal produced during manufacturing as described here:

https://probesoftware.com/smf/index.php?topic=837.msg5592#msg5592

So, there is a lot that can be improved.
john
« Last Edit: August 25, 2018, 08:22:59 am by Probeman »
The only stupid question is the one not asked!

Ben Buse

  • Professor
  • ****
  • Posts: 402
Re: Using Probe for EPMA software in "demonstration mode" to teach EPMA
« Reply #61 on: August 16, 2017, 04:33:58 am »

Hi Ben,
Ok, there is no caveat now with the latest version of PFE.

The simulation mode will now always use the composition of the last standard for subsequent unknowns or wavescans, as long as the takeoff, keV and analyzed elements do not change.

If the conditions change and a standard has not been simulated, the program will simulate a random unknown or wavescan composition until a standard has been simulated using the new conditions.

I think this makes it much more intuitive now, try it out please and let me know what you think. And thanks for your help.
john

Hi John,

This works really well - you can even simulate analysis of samples for elements not present in the sample.

Ben
« Last Edit: August 16, 2017, 04:36:41 am by Ben Buse »

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
Re: Using Probe for EPMA software in "demonstration mode" to teach EPMA
« Reply #62 on: December 30, 2017, 05:46:04 pm »
The previous WDS Penepma simulation code I implemented a few months ago utilizes the last standard composition for simulation of wavescans or unknowns.  But when running a bunch of wavescan simulations with different compositions, that method doesn't work very well, as it just utilizes the last standard composition that was run.  So I've modified the Penepma WDS simulation code, so that if the unknown or wavescan has the same *name* as one of the standards in the run, the program will now automatically load that standard composition for simulation.

To facilitate this, I use the Positions window (from the Automate!, then Digitize window), as seen here:



Using the buttons outlined in red, one merely selects the standard positions from the position database and then duplicates them to either unknown or wavescan position samples.  Now one can automate realistic simulations of unknowns and wavescans based on specific standard compositions as seen here:

John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
Re: Using Probe for EPMA software in "demonstration mode" to teach EPMA
« Reply #63 on: December 31, 2017, 02:04:05 pm »
We've made another small improvement in addition to the above simulation of unknowns and wavescans based on the standard composition if the sample name matches that of a standard already in the run.  This latest improvement automatically adds in oxygen by stoichiometry if the Calculate with Stoichiometric Oxygen option is selected in the Analyze! | Calculation Options dialog.

If this flag is in the default Calculate As Elemental option, and the unknown (or wavescan) sample is *not* using a sample name that is the same as a standard already in the run, the program will generate a random composition based on the currently analyzed elements as seen here:

Un    4 test as elemental, Results in Elemental Weight Percents
 
ELEM:       Si      Fe
BGDS:      LIN     LIN
TIME:    20.00   20.00
BEAM:    30.01   30.01

ELEM:       Si      Fe   SUM 
     8  23.709  76.564 100.273

AVER:   23.709  76.564 100.273
SDEV:     .000    .000    .000
SERR:     .000    .000
%RSD:      .00     .00
STDS:       14      26

However, with the latest code in version 12.1.3, if the Calculate with Stoichiometric Oxygen option is selected as seen here:



the software will now correctly calculate a random *oxide* composition based on the current cation stoichiometry as seen here:

Un   11 test oxide, Results in Elemental Weight Percents
 
ELEM:       Si      Fe       O
TYPE:     ANAL    ANAL    CALC
BGDS:      LIN     LIN
TIME:    20.00   20.00     ---
BEAM:    30.03   30.03     ---

ELEM:       Si      Fe       O   SUM 
    18  14.537  53.817  31.981 100.334

AVER:   14.537  53.817  31.981 100.334
SDEV:     .000    .000    .000    .000
SERR:     .000    .000    .000
%RSD:      .00     .00     .00
STDS:       14      26     ---

STKF:    .4101   .6548     ---
STCT:   144.18  151.28     ---

UNKF:    .1089   .4903     ---
UNCT:    38.27  113.29     ---
UNBG:      .09     .40     ---

ZCOR:   1.3353  1.0975     ---
KRAW:    .2655   .7489     ---
PKBG:   415.00  283.06     ---

And if the Display as Oxides checkbox is displayed, these results will also be displayed:

Un   11 test oxide, Results in Oxide Weight Percents

ELEM:     SiO2     FeO       O   SUM 
    18  31.099  69.235    .000 100.334

AVER:   31.099  69.235    .000 100.334
SDEV:     .000    .000    .000    .000
SERR:     .000    .000    .000
%RSD:      .00     .00     .00
STDS:       14      26     ---

Of course most of the time you'll probably want to enter an unknown (or wavescan) sample name that is the same as a standard already in the run (as described in the previous post), so that one will obtain a specific composition for teaching purposes.  But the random composition code is there just in case one acquires an unknown (or wavescan) simulation and either the sample name doesn't match an existing standard or there are no standards in the run.

Either way, you'll get a reasonable composition with simulated statistics applied, also suitable for teaching!   :)
« Last Edit: January 01, 2018, 12:15:18 pm by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Probeman

  • Emeritus
  • *****
  • Posts: 1787
  • Never sleeps...
    • John Donovan
Re: Using Probe for EPMA software in "demonstration mode" to teach EPMA
« Reply #64 on: November 04, 2018, 04:50:09 pm »
As many of you know, Probe for EPMA has a very realistic demo or simulation mode which can be utilized for educational purposes. 

Probe for EPMA utilizes spectral intensities generated from the Penepma Monte Carlo software in two different ways. First, for WDS simulation it utilizes previously calculated pure element spectra from Penepma calculated using 1 eV resolution in 5 keV steps from 5 to 25 keV. For compounds it simply sums the spectra based on the weight fraction of the element (Yes, we should also be performing an absorption correction on each energy bin, but it's on the to-do list. In the meantime it's good enough...) to produce the final WDS spectrum.

Of course the spectrum is subsequently modified for higher Bragg orders, WDS exponential effects and absorption edges.  See the folder C:\UserData\Penepma12\Penepma\pure for these pure element intensity files. If you don't have these files, or you don't have a complete set of these files, you should update your Penepma data files using the Help | Update menu with the Update Penepma Monte Carlo Files Only checkbox checked.

For EDS, Probe for EPMA utilizes the Penepma in "real time", that is the EDS spectra is generated as the Penepma Monte Carlo program runs in the background and displayed in Probe for EPMA.  The photon rate depends on a number of factors but is roughly equivalent to having a beam current of a few nA or so.

In a recent post Donovan showed an example demonstrating some new flags for EDS quantification and data was shown where the Fe concentration was not very accurate compared to the other elements as seen here:

ELEM:       Si      Ca      Fe      Mg      Al      Mn       O
TYPE:     ANAL    ANAL    ANAL    ANAL    ANAL    SPEC    SPEC
BGDS:      LIN     LIN     EDS     EDS     EDS
TIME:    20.00   20.00   24.00   24.00   24.00     ---     ---
BEAM:    30.02   30.02   30.02   30.02   30.02     ---     ---

ELEM:       Si      Ca      Fe      Mg      Al      Mn       O   SUM 
     5  21.416  11.062   6.624  11.571   4.886    .077  43.597  99.234

AVER:   21.416  11.062   6.624  11.571   4.886    .077  43.597  99.234
SDEV:     .000    .000    .000    .000    .000    .000    .000    .000
SERR:     .000    .000    .000    .000    .000    .000    .000
%RSD:      .00     .00     .00     .00     .00     .00     .00

PUBL:   21.199  10.899   7.742  11.657   4.906    .077  43.597 100.077
%VAR:     1.02    1.50  -14.44  (-.73)  (-.41)     .00     .00
DIFF:     .217    .163  -1.118  (-.09)  (-.02)    .000    .000
STDS:      162     162     162     160     160     ---     ---

This is primarily because of the poor counting statistics resulting from a relatively high energy emission line at 15 keV, only running the Penepma simulation for 12 seconds (it assumed an EDS count time of 12 seconds because of the assumed 50% EDS deadtime), and only a single "measurement".  Here one can see the low count rate from the Fe Ka emission line from Penepma:

On-Peak (off-peak corrected) or EDS (bgd corrected) or MAN On-Peak X-ray Counts (cps/1nA) (and Faraday/Absorbed Currents):
ELEM:    si ka   ca ka   fe ka   mg ka   al ka   BEAM1   BEAM2
BGD:       OFF     OFF     EDS     EDS     EDS
SPEC:        1       2       0       0       0
CRYST:     PET    LPET     EDS     EDS     EDS
ORDER:       1       1       1       1       1
    5G   56.93   33.28    2.82   22.62    9.75  30.016  29.974

AVER:    56.93   33.28    2.82   22.62    9.75  30.016  29.974
SDEV:      .00     .00     .00     .00     .00    .000    .000
1SIG:      .31     .24     .06     .18     .12
SIGR:      .00     .00     .00     .00     .00
SERR:      .00     .00     .00     .00     .00
%RSD:      .00     .00     .00     .00     .00

However, if we increase the WDS counting time to 64 seconds we see a much better result as seen here:

ELEM:       Si      Ca      Fe      Mg      Al      Mn       O
TYPE:     ANAL    ANAL    ANAL    ANAL    ANAL    SPEC    SPEC
BGDS:      LIN     LIN     EDS     EDS     EDS
TIME:    24.00   24.00   64.00   64.00   64.00     ---     ---
BEAM:    30.03   30.03   30.03   30.03   30.03     ---     ---

ELEM:       Si      Ca      Fe      Mg      Al      Mn       O   SUM 
    37  21.533  10.589   7.691  11.640   4.903    .077  43.597 100.030

AVER:   21.533  10.589   7.691  11.640   4.903    .077  43.597 100.030
SDEV:     .000    .000    .000    .000    .000    .000    .000    .000
SERR:     .000    .000    .000    .000    .000    .000    .000
%RSD:      .00     .00     .00     .00     .00     .00     .00

PUBL:   21.199  10.899   7.742  11.657   4.906    .077  43.597 100.077
%VAR:     1.57   -2.85    -.66  (-.15)  (-.05)     .00     .00
DIFF:     .334   -.310   -.051  (-.02)   (.00)    .000    .000
STDS:      162     162     162     160     160     ---     ---

In fact, here we got lucky!   Spurious accuracy as they say!

However, instead of increasing the EDS count time, we could simply acquire more data points per standard.  Note that because PFE "re-seeds" the random number generator in Penepma for each spectrum "acquisition", the average will usually be more accurate than a single point.  Of course, even better is to acquire multiple data points and a longer counting time as seen here:

ELEM:       Si      Ca      Fe      Mg      Al      Mn       O
TYPE:     ANAL    ANAL    ANAL    ANAL    ANAL    SPEC    SPEC
BGDS:      LIN     LIN     EDS     EDS     EDS
TIME:    24.00   24.00   64.00   64.00   64.00     ---     ---
BEAM:    30.01   30.01   30.01   30.01   30.01     ---     ---

ELEM:       Si      Ca      Fe      Mg      Al      Mn       O   SUM 
    37  21.540  10.588   7.696  11.396   5.202    .077  43.597 100.098
    38  21.430  10.739   7.906  11.129   4.779    .077  43.597  99.657
    39  21.481  10.701   6.680  11.716   5.343    .077  43.597  99.595
    40  21.296  10.845   7.757  11.773   4.451    .077  43.597  99.796
    41  21.675  10.843   7.908  11.969   4.561    .077  43.597 100.630

AVER:   21.485  10.743   7.589  11.597   4.867    .077  43.597  99.955
SDEV:     .140    .107    .517    .333    .392    .000    .000    .424
SERR:     .062    .048    .231    .149    .175    .000    .000
%RSD:      .65    1.00    6.81    2.87    8.05     .00     .00

PUBL:   21.199  10.899   7.742  11.657   4.906    .077  43.597 100.077
%VAR:     1.35   -1.43   -1.97  (-.52)  (-.79)     .00     .00
DIFF:     .286   -.156   -.153  (-.06)  (-.04)    .000    .000
STDS:      162     162     162     160     160     ---     ---

So the Fe is off about 2% which is typical EPMA accuracy. The value here for education is that the students can actually see the effects of increasing count time and/or replicate measurements on their own laptop computers.  With a bit of "luck" of course!   ;)
« Last Edit: November 04, 2018, 07:43:54 pm by Probeman »
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 1787
  • Never sleeps...
    • John Donovan
Re: Using Probe for EPMA software in "demonstration mode" to teach EPMA
« Reply #65 on: November 04, 2018, 07:56:52 pm »
But what about unknown acquisitions when PFE is in demo or simulation mode?

So if one acquires an unknown sample the software will create a random composition as described previously. However, if the unknown sample is the *same name* as a standard already added to the probe run, it will base the physics on that standard composition, as seen here for the NIST K-412 mineral glass:

ELEM:       Si      Ca      Fe      Mg      Al
TYPE:     ANAL    ANAL    ANAL    ANAL    ANAL
BGDS:      LIN     LIN     EDS     EDS     EDS
TIME:    60.00   60.00   64.00   64.00   64.00
BEAM:    30.00   30.00   30.00   30.00   30.00

ELEM:       Si      Ca      Fe      Mg      Al   SUM 
    21  21.376  10.788   8.220  10.257   5.251  55.893
    22  21.171  10.703   7.830   9.829   4.200  53.734
    23  21.220  10.716   9.168   9.776   4.973  55.853

AVER:   21.256  10.736   8.406   9.954   4.808  55.160
SDEV:     .107    .046    .688    .264    .544   1.235
SERR:     .062    .026    .397    .152    .314
%RSD:      .50     .43    8.18    2.65   11.32
STDS:      162     162     162     160     160

But now you may ask: why is the total only 55%?  Well since this is an unknown sample, the software does not know that there is oxygen present. Because of course because oxygen was not an analyzed element!

So if we then specify oxygen calculated by stoichiometry in the Calculation Options dialog we now get this result:

ELEM:       Si      Ca      Fe      Mg      Al       O
TYPE:     ANAL    ANAL    ANAL    ANAL    ANAL    CALC
BGDS:      LIN     LIN     EDS     EDS     EDS
TIME:    60.00   60.00   64.00   64.00   64.00     ---
BEAM:    30.00   30.00   30.00   30.00   30.00     ---

ELEM:       Si      Ca      Fe      Mg      Al       O   SUM 
    21  21.216  10.896   8.503  11.568   5.392  43.370 100.946
    22  21.100  10.810   8.100  11.076   4.318  41.808  97.212
    23  21.073  10.834   9.488  10.939   5.103  42.794 100.232

AVER:   21.129  10.847   8.697  11.194   4.938  42.657  99.463
SDEV:     .076    .045    .714    .331    .556    .790   1.982
SERR:     .044    .026    .412    .191    .321    .456
%RSD:      .36     .41    8.21    2.96   11.26    1.85
STDS:      162     162     162     160     160     ---

Note that the iron statistics are still not wonderful, but the other elements are fine.
« Last Edit: November 05, 2018, 09:15:00 am by Probeman »
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 1787
  • Never sleeps...
    • John Donovan
Re: Using Probe for EPMA software in "demonstration mode" to teach EPMA
« Reply #66 on: November 10, 2018, 05:28:13 pm »
Ok, so this is a little silly but it could help students learning to do EPMA in simulation mode from their laptops in class before they get on the actual instrument (as we do in our internship program at UofO). First it was noticed that the code wasn't displaying an escape peak when the emission line energy is high enough to cause one, so that is fixed:



Next the code was modified to respect the PHA gain value, as the user adjusts it, so here:



now gain adjusted down:



and now gain adjusted up (too high in fact!):



as suggested by a couple of students in Julie's class this quarter.
The only stupid question is the one not asked!

JonF

  • Professor
  • ****
  • Posts: 32
Re: Using Probe for EPMA software in "demonstration mode" to teach EPMA
« Reply #67 on: February 04, 2019, 05:04:42 am »
I've been playing around a bit recently with the simulation/teaching mode and I was wondering - as this is a simulation, do we have to run this in real time? Is there a way I could get PfE to simulate wavescans (for example) as fast as the computer will go (whilst still maintaining the counting statistics for example 6s/point)?

I tried having a look around the forums for whether this has been asked before, but I couldn't find an answer.

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
Re: Using Probe for EPMA software in "demonstration mode" to teach EPMA
« Reply #68 on: February 04, 2019, 08:27:58 am »
I've been playing around a bit recently with the simulation/teaching mode and I was wondering - as this is a simulation, do we have to run this in real time? Is there a way I could get PfE to simulate wavescans (for example) as fast as the computer will go (whilst still maintaining the counting statistics for example 6s/point)?

I tried having a look around the forums for whether this has been asked before, but I couldn't find an answer.

Hi Jon,
It's an interesting idea but we cannot think of an easy way to do it.  But it's worth thinking about some more.

The simulation mode was actually meant to run as realistically as possible for several reasons, one being to teach students how the various options affect acquisition time. This means keeping the photon rate "real" if you know what I mean.  One thing you might try is a very high beam current. That might help with the WDS statistics in simulation mode, but the EDS simulation is already constrained by the Monte Carlo electron trajectory rate- which is somewhere around a few nA of beam current for most computers.

For a bit of history, the simulation mode in Probe for EPMA was originally designed for one purpose only and that was so we could develop the acquisition software without having a microprobe available. That is also why there is separate simulation code for the places where the JEOL and Cameca instruments behave differently!

But maybe Sandrin's "method development" application is what you are looking for?

https://probesoftware.com/smf/index.php?topic=743.0
« Last Edit: February 04, 2019, 08:26:18 pm by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

JonF

  • Professor
  • ****
  • Posts: 32
Re: Using Probe for EPMA software in "demonstration mode" to teach EPMA
« Reply #69 on: February 06, 2019, 01:28:06 am »
Hi John,

  Sandrin's method development tool is good, but I've been using the simulation mode in Probe for EPMA to 'sense check' some of the crazier ideas and setups I've been having regarding unusual samples (i.e. things that arent available in that database). Also helps to avoid glaring errors in background positioning etc - all things to minimise setup time actually on the probe.

I'd been ramping up the (simulated) beam current and decreasing the count time, but after your suggestion I decided to take it to an extreme and fiddle with the aperture settings in the probewin.ini file to create a new aperture with a high beam current condition: 5kV, >1000nA, focused beam and a 0.1s dwell time over 1000 points results in full simulated WDS of a simulated materials in a couple of minutes - that'll do for me (I'll use the time to grab a coffee ;-) ).

To go with this, I've created a simulated standard database that I have been inputting ideal compositions of materials, digitize the position of the material in PfE and then convert the position to a wavescan and its the closest software that I know of (only?) to realistically simulate WDS. There's plenty of EDS simulation packages, so this fills a gap for me at least.