Author Topic: Polygon Extraction and/or Pixel Filtering  (Read 1311 times)

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2379
  • Other duties as assigned...
    • Probe Software
Re: Polygon Extraction and/or Pixel Filtering
« Reply #30 on: January 10, 2019, 11:01:11 am »
Ok, I think I might know what is going on.

In x-ray maps the statistics for a single pixel are essentially determined by the pixel dwell time.  So increasing the number of pixels doesn't much change the standard deviation (in a homogeneous material).

If you want to see the error decrease as a function of the (increasing) number of pixels, then what you want is the standard error (not the standard deviation) of the pixels.

This is because the standard error describes the error of the average, while the standard deviation describes the error for a single measurement.

Now as to why we (in science) routinely report the average and the standard deviation (rather than the average and the standard error), is a question I have asked several statisticians over the years, and the only answer I've heard is that "maybe because the standard deviation is larger and therefore a more conservative estimate"... but maybe one of you more mathematical types can enlighten us? 

I myself would sure like to hear why it is that we don't usually see the average and standard error reported together more often.

In any case, this pixel averaging situation may be a case in which the standard error is more applicable than the standard deviation?
« Last Edit: January 10, 2019, 11:05:25 am by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Ben Buse

  • Professor
  • ****
  • Posts: 402
Re: Polygon Extraction and/or Pixel Filtering
« Reply #31 on: January 14, 2019, 04:28:44 am »
Hi John,

Thanks you've got it, I was describing the need for standard error (I'd calculated the standard error without realizing it) when averaging pixels.

Your previous question 'long concentrations' should have read 'low concentrations' but it is a problem for all concentrations. I'll modify the post

Ben
« Last Edit: January 14, 2019, 04:56:40 am by Ben Buse »

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2379
  • Other duties as assigned...
    • Probe Software
Re: Polygon Extraction and/or Pixel Filtering
« Reply #32 on: January 14, 2019, 11:38:23 am »
Hi John,

Thanks you've got it, I was describing the need for standard error (I'd calculated the standard error without realizing it) when averaging pixels.

Your previous question 'long concentrations' should have read 'low concentrations' but it is a problem for all concentrations. I'll modify the post

Ben

Hi Ben,
OK, cool.

I can imagine that some might like to see the actual standard deviations and some might want to see the standard errors.

I'll see if we can squeeze in an additional option button or checkbox somewhere!   Won't be until this weekend though, sorry.
john
« Last Edit: January 14, 2019, 02:30:11 pm by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2379
  • Other duties as assigned...
    • Probe Software
Re: Polygon Extraction and/or Pixel Filtering
« Reply #33 on: January 22, 2019, 07:00:38 pm »
Hi John,

Thanks you've got it, I was describing the need for standard error (I'd calculated the standard error without realizing it) when averaging pixels.

Your previous question 'long concentrations' should have read 'low concentrations' but it is a problem for all concentrations. I'll modify the post

Ben

Hi Ben,
I think we've got what we need.  Check out this new control for average and standard deviations or average and standard errors:



And here is a plot using the standard deviations:



and here is the same data but using the standard errors:



For those wondering what the standard error is, it's the standard deviation divided by the square root of (number of measurements minus one).  That's a big improvement in precision, but it makes sense since there are lots of pixels to average in a 10 x 10 pixel shape!

Remember, the standard deviation describes the variance of each point, while the standard error describes the variance of the average.  Bottom line, making more measurements of points *or* pixels, has its reward!    :D
« Last Edit: January 22, 2019, 09:08:26 pm by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Probeman

  • Emeritus
  • *****
  • Posts: 1827
  • Never sleeps...
    • John Donovan
Re: Polygon Extraction and/or Pixel Filtering
« Reply #34 on: January 23, 2019, 12:30:03 pm »
With all this talk about averaging of pixels, it is important to keep in mind that pixel averaging only works when averaging quantitative x-ray map pixels (or points for that matter!). Now these x-ray maps could be elemental weight percents, oxide weight percents, atomic percents, formula atoms, detection limits, etc., etc., etc., but they must be already corrected for matrix effects prior to averaging.

Why?  Because we know from physics that matrix correction of x-ray intensities are extremely non-linear. If we instead average raw intensities of a heterogeneous interaction volume, whether that heterogeneity be due to scanning the beam or defocusing it, we will obtain inaccurate results, when that average is subsequently quantified.  See the attachments to this post here for additional details:

https://probesoftware.com/smf/index.php?topic=44.msg145#msg145

An easy way to think about this is to consider an interaction volume that is at the boundary of a pure Cu phase and a pure Al phase. From geometry we know that most of the copper x-rays are being emitted from pure Cu and most of the aluminum x-rays are being emitted from pure Al, but our software sees both emitted intensities and has to assume that this is (roughly) a 50-50 Cu-Al "alloy" (since the software knows nothing about the sample geometry).

The matrix correction for copper in a CuAl alloy is similar to that of the pure element (because Cu Ka is very energetic and suffers little absorption in this "alloy"), but Al Ka is highly absorbed in such a composition, and is therefore is greatly overcorrected resulting in totals of around 150-160 wt%.

SAMPLE: 32767, TOA: 40, ITERATIONS: 0, Z-BAR: 24.23118

 ELEMENT  ABSCOR  FLUCOR  ZEDCOR  ZAFCOR STP-POW BKS-COR   F(x)u      Ec   Eo/Ec    MACs
   Cu ka   .9996  1.0000  1.0555  1.0551  1.0739   .9828   .9903  8.9790  1.6706 49.0723
   Al ka  2.0289  1.0000   .9199  1.8664   .8478  1.0851   .4374  1.5600  9.6154 3320.82

 ELEMENT   K-RAW K-VALUE ELEMWT% OXIDWT% ATOMIC% FORMULA KILOVOL                                       
   Cu ka  .00000  .66532  70.195   -----  50.000    .500   15.00                                       
   Al ka  .00000  .15969  29.805   -----  50.000    .500   15.00                                       
   TOTAL:                100.000   ----- 100.000   1.000

By the way, this is also why one cannot characterize thin film compositions if any substrate elements are detected. Because if the beam energy is sufficient, and the electrons penetrate to the substrate, not only will the homogeneous volume assumption be invalid, but the substrate can fluoresce elements in the thin film layer if any absorption edges of slightly lower energy than the substrate x-rays are present.

Unless of course one acquires intensities using multiple beam energies, and applies a  thin film geometry model such as Pouchou and Pichoir!  See here for more discussion on quantification of thin film geometries:

https://probesoftware.com/smf/index.php?topic=111.msg405#msg405
« Last Edit: January 23, 2019, 12:41:15 pm by Probeman »
The only stupid question is the one not asked!

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2379
  • Other duties as assigned...
    • Probe Software
Re: Polygon Extraction and/or Pixel Filtering
« Reply #35 on: April 03, 2019, 10:57:02 am »
Ben Buse mentions that the quantitative histogram feature, or Quantigram as Ed Vicenzi has termed it, described here:

https://probesoftware.com/smf/index.php?topic=1144.msg7951#msg7951

might be confusing when many elements are displayed at once.  We concur and we finally realized that there is a built-in feature of the Pro Essentials graphics library that allows the user to select specifically which data subsets to plot. To access this subset selection feature (and this applies to all plots in Probe for EPMA and CalcImage by the way!), simply right click on the plot and select the Customization Dialog menu as seen here:



You will then see this dialog:



Next, from this dialog select the subsets that you wish to plot and click the OK or Apply button as seen here:



Here we selected only the Mg, Al and O subsets for clarity and the plot (after zooming in) in is much easier to read:

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

"Not Absolutely Certain, Yet Reliable"

Ben Buse

  • Professor
  • ****
  • Posts: 402
Re: Polygon Extraction and/or Pixel Filtering
« Reply #36 on: April 04, 2019, 06:17:50 am »
Thanks John,

This is nice.

Here's a plagioclase map



You can see the Bytownite/Anorthite core and Andesine/Labradorite rim. It also shows the large error (as each pixel short time etc), which masks any further distinctions in the histogram

Probeman

  • Emeritus
  • *****
  • Posts: 1827
  • Never sleeps...
    • John Donovan
Re: Polygon Extraction and/or Pixel Filtering
« Reply #37 on: April 06, 2019, 11:36:38 am »
Thanks John,

This is nice.

Here's a plagioclase map



You can see the Bytownite/Anorthite core and Andesine/Labradorite rim. It also shows the large error (as each pixel short time etc), which masks any further distinctions in the histogram

What a pretty sample. It's almost "art"!

Did you try seeing if you can "pull out" these zoned compositions using the Classify window in CalcImage:

https://probesoftware.com/smf/index.php?topic=1071.0

You might need to set the precision to a small number, maybe even zero, and try specifying 2, 3 or 4 phases.
« Last Edit: April 06, 2019, 04:11:03 pm by Probeman »
The only stupid question is the one not asked!