Author Topic: Does dead time vary as a function of emission energy?  (Read 348 times)

Probeman

  • Emeritus
  • *****
  • Posts: 2543
  • Never sleeps...
    • John Donovan
Does dead time vary as a function of emission energy?
« on: July 18, 2022, 08:39:28 AM »
I've heard varying opinions on this question.  Brian Joy recently made this comment:

I was hoping that my calculated dead times would be virtually identical to those I’ve previously determined, as I no longer believe that X-ray counter dead time varies systematically with X-ray energy.  (But maybe I'm wrong considering the pattern possibly emerging in the calculated dead times.)  Perhaps my PHA settings weren’t quite right?  If so, considering that PHA shifts should be smaller for lower X-ray energies, my most recent determinations on Ti and Mo should be the most accurate.  The age of the counters could be a factor as well, as anomalies certainly are present in the pulse amplitude distributions, at least under certain conditions.  I examined these distributions carefully, though, across a wide range of count rates, and I don’t think I made any serious errors.  Maybe I’ll run through the whole process again on Cu or Fe and see if I get the same results as before.  Currently, I have dead time constants for my channels 2, 3, and 5 set at 1.45, 1.40, and 1.40 μs, respectively, but I might eventually lower the values for channels 2 and 3 a little – channel 5 has been more consistent.  At any rate, the values for Mo aren’t drastically lower and are most similar to those obtained from Ti.  Continuing the same pattern as before, channel 2 gives the largest dead time constant using the ratio method:

Mo Lα/Mo Lβ3 ratio method [μs]:
channel 2/PETL:  1.38, 1.43     (Ti: 1.43, 1.46; Fe: 1.44, 1.48; Cu: 1.50, 1.46)
channel 3/PETJ:  1.33              (Ti: 1.37; Fe: 1.41; Cu: 1.45)
channel 5/PETH:  1.37             (Ti: 1.42; Fe: 1.41; Cu: 1.42)
Current-based method, Mo Lα [μs]:
channel 2/ PETL:  1.27
channel 3/ PETJ:  1.17
channel 5/ PETH:  1.27
Current-based method, Mo Lβ3 [μs]:
channel 2/ PETL:  0.18
channel 3/ PETJ:  -1.15
channel 5/ PETH:  0.20

It would be good to see the above values plotted up by Brian as a function of emission energy. I would also like to see more speculation and data from other labs on this question, but here are some rough data I've collated from my lab:





The bias values shown are fairly nominal as I did not control them for the first few measurements, but those DTs do correlate with some of the outliers. So I will be remeasuring them to obtain a more self consistent plot hopefully soon (it's the World Athletics Championships for the next two weeks in Eugene, so the campus is chaos).

But still it seems that there are no obvious trends in this preliminary data.
« Last Edit: July 18, 2022, 08:45:05 AM by Probeman »
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 2543
  • Never sleeps...
    • John Donovan
Re: Does dead time vary as a function of emission energy?
« Reply #1 on: October 15, 2022, 02:02:55 PM »
Following up on this question, I thought: what if instead, dead time could be a function of PHA gain?  So I plotted up the same optimized dead times against PHA gain and this is what we get for spectrometers 1 to 4:



and spec 5:
 


So no obvious trend here either, except maybe a very, very slight positive slope if one really looks hard at the plots!   ::)

So what can we conclude?  Not much.  To be honest I think most of the scatter in this data is due to my improper PHA settings and allowing some of the high count rate k-ratios to be cut off due to pulse height depression as described here:

https://probesoftware.com/smf/index.php?topic=1466.msg11309#msg11309

I need to re-run these constant k-ratio tests when I get a chance.
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 2543
  • Never sleeps...
    • John Donovan
Re: Does dead time vary as a function of emission energy?
« Reply #2 on: October 17, 2022, 03:27:52 PM »
When I ran a test of the dead times on our Cameca using enforced dead times of 2 usec I obtained these optimized dead times:

ELEM:    ti ka   ti ka   ti ka   ti ka   ti ka
BGD:       OFF     OFF     OFF     OFF     OFF
SPEC:        1       2       3       4       5
CRYST:     PET    LPET    LPET     PET     PET
DEAD:     2.10    2.05    2.00    2.30    2.05
DTC%:     41.8    82.7    86.5    39.5    54.1

These dead time correction % are at 180 nA.  This is of course using the "new" WDS board that we installed in 2015 when we upgraded to PeakSight 6.1.  I think it is pretty clear that we should be utilizing the 2 usec enforced dead times or even the 1 usec enforced dead times:

https://probesoftware.com/smf/index.php?topic=1466.msg11317#msg11317

I also spoke with Gareth Seward at UC Santa Barbara and he obtains dead times between 1.5 and 1.9 usec when using 1 usec enforced dead times on all of his Cameca spectrometers. Interestingly Cameca never mentioned to me (or him) that we could lower the enforced dead times to 2 or even one microsecond when we got our new WDS boards!

But what I need help with is to understand the PHA scans that I performed at both 10 nA and 200 nA.  So here is spec 1 PET at 200 nA where I tuned the PHA gain to keep the Ti ka escape peak above the baseline:



It looks a little weird because of the "shelf" on the right side of the main PHA peak (what is that from?), but hey, a least it's all above the baseline! I then set the beam current back to 10 nA and this is what we have:



So, looks pretty good all in all. Note that both at at the same bias and gain. 

Next we turn to spec 2 with the LPET crystal, first at 200 nA, with the gain again adjusted to keep the pulse height depression shift above the baseline level:
 


A little ugly, but because we are in integral mode, we should not be losing any pulses on the high side of the distribution. At least that's my understanding anyway. But now at 10 nA with the same bias and gain:



OMG!  That shifted up quite a bit.  But again, if we are in integral mode, we should be OK, right?  This is what we will need to do for quantitative analysis (high speed quant mapping) at these crazy high count rates. And of course to calibrate our dead times.

Now keep in mind that both spec 1 and spec 2 are 1 atm detectors.  Let's now take a look at a 2 atm detector, spec 3, again first at 200 nA:



and now at 10 nA:



Interestingly this looks much more like the spec 1 PET PHA scan with a much lower count rate. In fact the count rate for this spec 3 with the LPET crystal on Ti metal (extrapolated from 10 nA) is ~836K cps!
« Last Edit: October 17, 2022, 03:29:31 PM by Probeman »
The only stupid question is the one not asked!

sem-geologist

  • Professor
  • ****
  • Posts: 224
Re: Does dead time vary as a function of emission energy?
« Reply #3 on: October 18, 2022, 03:00:10 PM »
I qoute your two pictures for comparison:
But what I need help with is to understand the PHA scans that I performed at both 10 nA and 200 nA.  So here is spec 1 PET at 200 nA where I tuned the PHA gain to keep the Ti ka escape peak above the baseline:



It looks a little weird because of the "shelf" on the right side of the main PHA peak (what is that from?), but hey, a least it's all above the baseline!

....
Now keep in mind that both spec 1 and spec 2 are 1 atm detectors.  Let's now take a look at a 2 atm detector, spec 3, again first at 200 nA:




In both cases those shelfs are pulse pile-up (more less double amplitude). It is a bit tricky to see that double relation from graph as Probesoftware made PHA plots are for unknown reason shifted by about 0.5V to the right (a strong hint: it is physically impossible to get anything exactly at and above +5V with new WDS boards). In the first figure of spectrometer 1, at first sight the 3V divided by 1.8 V looks not so close to 2 (thus not so obvious relation of double energy). But shifting the PHA to the correct position (by 0.5V) makes the relation closer to double (2.5V / 1.3V). On second plot as it is equipped with high count producing LPET - and thus much much higher count rate - it experience severe PHA shift, and such shift is accidentally compensated by this artificial shift of 0.5V in PfS. And thus initially it looks ok: 4 V / 2V == 2. But if we would shift the PHA to correct position then we would have 3.5V / 1.5V != 2 - that is as this is real shift of of PHA where on spect 1 there is only pulse amplitude downsizing. (I am convinced there are two processes making PHA values lower down with increasing count rates). So it looks that your first spectrometer has no PHA shifting and only downsizing (which kicks in first) and as we see on spectrometer with LPET with further increase of count rate PHA baseline shift kicks-in later.
« Last Edit: October 19, 2022, 06:54:39 AM by sem-geologist »

Probeman

  • Emeritus
  • *****
  • Posts: 2543
  • Never sleeps...
    • John Donovan
Re: Does dead time vary as a function of emission energy?
« Reply #4 on: October 19, 2022, 09:11:10 AM »
In both cases those shelfs are pulse pile-up (more less double amplitude). It is a bit tricky to see that double relation from graph as Probesoftware made PHA plots are for unknown reason shifted by about 0.5V to the right

I will check the PHA plots against PeakSight, but I thought I did this many years ago and they were the same.

a strong hint: it is physically impossible to get anything exactly at and above +5V with new WDS boards

Are you saying that even in integral mode, the PHA pulses are cut off at 5v?
The only stupid question is the one not asked!

sem-geologist

  • Professor
  • ****
  • Posts: 224
Re: Does dead time vary as a function of emission energy?
« Reply #5 on: October 20, 2022, 05:54:13 AM »
lets define first what is PHA pulses. ADCs work not in continuous, but pulsed mode. ADC is triggered (with small delay) if pulse presence is recognized and its max value is cached temporarily with pulse hold chip. So if it is recognized (before digitization) - it increases counter of integral mode by one (Unless, it waits digitization step to filter out if it is below 0V - that is still pending for testing out).  Then further in the pipeline the signal is squeezed (amplitude reduced) with voltage dividers to fit into range of 0 to +5V. In case some hold peak be higher than 5V even after voltage divider step, before it is passed to ADC, there are diode clamps to 0 V (gnd) and 5V (ADC supply) (so if it is <0V it is pulled-up to 0V, and if it is above 5V it is pulled down to 5V. That is theoretical... practically diode clamps has threshold of 0.3 to 0.7 V, and thus would clamp the signal into boundaries of -0.7V to +5.7V...). ADC has its reference V at middle point --- that is 2.5 V --- so there is physically no way to measure anything above 5V. Also PHA graph (in peaksight) and saved data (into txt) has not 256 values, but few less. I guess last index [255] (counting from 0) hold cumulative value of all overflown values and is cut out from exposure to the PHA plot (as it would make the highest peak in the plot). Even weirder part is that on our SXFive FE the saved PHA txt (with Peaksight) the last energy record is at 4826mV.

So the answer is: it is not "cut off". It is drained-down to +5 V (or rather +5.3V) and is left out from the requested PHA distribution. It also very depends from ADC, what it does with signal voltages overflowing its 8-bit range.

When talking about old WDS cards - there was different ADC and 5.5V in PHA plot was physically possible to obtain.
« Last Edit: October 21, 2022, 01:12:49 AM by sem-geologist »

Probeman

  • Emeritus
  • *****
  • Posts: 2543
  • Never sleeps...
    • John Donovan
Re: Does dead time vary as a function of emission energy?
« Reply #6 on: October 23, 2022, 09:55:33 AM »
lets define first what is PHA pulses. ADCs work not in continuous, but pulsed mode. ADC is triggered (with small delay) if pulse presence is recognized and its max value is cached temporarily with pulse hold chip. So if it is recognized (before digitization) - it increases counter of integral mode by one (Unless, it waits digitization step to filter out if it is below 0V - that is still pending for testing out).  Then further in the pipeline the signal is squeezed (amplitude reduced) with voltage dividers to fit into range of 0 to +5V. In case some hold peak be higher than 5V even after voltage divider step, before it is passed to ADC, there are diode clamps to 0 V (gnd) and 5V (ADC supply) (so if it is <0V it is pulled-up to 0V, and if it is above 5V it is pulled down to 5V. That is theoretical... practically diode clamps has threshold of 0.3 to 0.7 V, and thus would clamp the signal into boundaries of -0.7V to +5.7V...). ADC has its reference V at middle point --- that is 2.5 V --- so there is physically no way to measure anything above 5V. Also PHA graph (in peaksight) and saved data (into txt) has not 256 values, but few less. I guess last index [255] (counting from 0) hold cumulative value of all overflown values and is cut out from exposure to the PHA plot (as it would make the highest peak in the plot). Even weirder part is that on our SXFive FE the saved PHA txt (with Peaksight) the last energy record is at 4826mV.

So the answer is: it is not "cut off". It is drained-down to +5 V (or rather +5.3V) and is left out from the requested PHA distribution. It also very depends from ADC, what it does with signal voltages overflowing its 8-bit range. 

When talking about old WDS cards - there was different ADC and 5.5V in PHA plot was physically possible to obtain.

By the way, you were right about the 0.5 v shift. Apparently after we changed the WDS board from the old to the new I did not notice that the PHA range had changed in peakSight.  So now it is properly set to 0 to 0.5 volts to match the PeakSight display.

We do plot all 256 values from the MCA output in Probe for EPMA, so there are still some small differences between PeakSight and Probe for EPMA.  But that is an easy adjustment one can make in their Probewin.ini:

[pha]
PHAMultiChannelMin=0.         ; Cameca MCA PHA minimum x-axis voltage
PHAMultiChannelMax=5.         ; Cameca MCA PHA maximum x-axis voltage

On the question of whether the PHA output is cut off at 5v in integral mode, we must be talking about different things. Because I ran a test myself starting at a low gain with all the spectrometer scans within the 0 to 5 volt range.

Then gradually increasing the PHA gain as seen here:



The only spectrometer whose intensities did not remain consistent as the gain pushed the PHA scans beyond 5 volts was spectrometer 3 (blue symbols in the first plot), and that was because I (once again) did not provide enough initial PHA gain to bring the Ti escape peak above the baseline.

Here is spec 3 at low gain where the Ti escape peak is not visible above the baseline:



And here it is again at a higher gain where the Ti escape peak is now above the baseline:



The other spectrometers all stayed above the baseline at both gain ranges and the Ti escape peak is always visible.

My conclusion is that integral mode on the Cameca works exactly as expected where the pulses above 5v are *not* cut off up until some much higher voltage as one can see here from spec 2 using the LPET (green symbols in the first plot):



and here at the highest gain:



I must conclude that no pulses are being cut off at 5 v, but now the question is how high can these pulses go before they do get cut off (or suppressed)?  Gareth Seward wondered if it could be as high as 10 or 15 v?

Someone should run this same gain (and or bias) test on their JEOL instrument (in integral mode of course) and see if they get similar results for their measured intensities. This can be run on just the primary standard (Ti metal).

This also has implications for the constant k-ratio acquisition procedure. I'm going to suggest that when using Ti Ka, be sure that you always see the Ti escape peak when one is at the highest beam current when adjusting your PHA.

In fact I'm making a note to John Donovan to modify the constant k-ratio procedure pdf to reflect this...
« Last Edit: October 23, 2022, 04:36:27 PM by Probeman »
The only stupid question is the one not asked!

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2977
  • Other duties as assigned...
    • Probe Software
Re: Does dead time vary as a function of emission energy?
« Reply #7 on: October 24, 2022, 01:38:47 PM »
I thought I might insert a little bit of historical context regarding PHA settings because the PHA plots above by Probeman may seem very unintuitive to most.

Back in the olden days (on an ARL SEMQ EPMA in the 1980s), I was taught to adjust my PHAs as shown here:



The idea being that in order to avoid high order (> first order) spectral interferences, we would set the window level close to the PHA peak so we could avoid some (but not all!) of those higher order photons.  The downside was that if our count rates changed significantly higher or lower, the PHA peak would shift lower or higher (respectively) and our baseline or window settings would cut off some of our signal, causing a non-linear response  with regards to concentration.

I hope that no one reading this is still using that traditional PHA tuning approach!  But eventually, once the quantitative spectral interference correction was developed in 1993:

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

we could open up our PHA settings and allow all the photons in and correct for spectral interferences quantitatively in software:



This resulted in much better detector linearity, especially when measuring at different count rates (and we could also correct for spectral interferences!).  More recently (as mentioned by SEM Geologist) we should probably just leave the PHA in INTEGRAL mode, so that we aren't cutting off higher energy photons due to pulse pileup effects as seen here:



This last plot above is how we now train new users to tune the PHAs.

Now since much of the time we are obtaining roughly similar count rates on our standards and unknowns (though not always), the PHA settings aren't always quite so critical, but whenever we are running standards and unknowns at significantly different count rates (concentrations and/or beam currents) we need to consider what we are doing more carefully.

For example, acquiring our standard with a high concentration and our unknown with a low concentration.  And of course when acquiring a constant k-ratio data set over a large range of beam currents (count rates) and especially for high speed quantitative mapping at high beam currents where multiple phases can contain very different concentrations.

The rule of thumb is pretty simple in all these cases: simply adjust your PHA settings at the highest count rates that you will be observing, and be sure to keep the PHA peak (and escape peak if present) *above* the baseline level of your PHA. 

This is of course because due to pulse height depression at high count rates which will cause the PHA peak to shift to the left, we need to tune our PHA settings at the highest count rates we will be observing in that session.  At any other (lower) count rates, the PHA peak will shift to the right, and if we are utilizing INTEGRAL PHA mode, we will be able to count all those pulses even though they are shifted outside our normal PHA display.

Sounds crazy but it appears to be true (see above post by Probeman). Also see attached constant k-ratio document which has been modified to include new language regarding tuning our PHAs.

Question is: what is that maximum PHA voltage for Cameca (greater than 5 volts) and for JEOL (greater than 10 volts) that we can get to (in INTEGRAL mode) and these photons will still be counted as part of the integration?
« Last Edit: October 24, 2022, 01:43:43 PM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

sem-geologist

  • Professor
  • ****
  • Posts: 224
Re: Does dead time vary as a function of emission energy?
« Reply #8 on: October 24, 2022, 11:35:25 PM »
Question is: what is that maximum PHA voltage for Cameca (greater than 5 volts) and for JEOL (greater than 10 volts) that we can get to (in INTEGRAL mode) and these photons will still be counted as part of the integration?
I thought I had already answered that. on Cameca (new type boards) anything above +5V is drained-down to +5V before passing to ADC. If it is +12V it would be drained down to +5V; if it would be +6V - would be drained down to +5V. The value "5" is rather not exact - as diodes have some threshold (0.7V some can have 0.3V) - and probably is somethere in between 5.3-5.7V which is out of ADC range - thus we dont see all drained-down pulses sumed into single last bin of PHA plot.

Probeman

  • Emeritus
  • *****
  • Posts: 2543
  • Never sleeps...
    • John Donovan
Re: Does dead time vary as a function of emission energy?
« Reply #9 on: October 25, 2022, 08:34:19 AM »
Question is: what is that maximum PHA voltage for Cameca (greater than 5 volts) and for JEOL (greater than 10 volts) that we can get to (in INTEGRAL mode) and these photons will still be counted as part of the integration?
I thought I had already answered that. on Cameca (new type boards) anything above +5V is drained-down to +5V before passing to ADC. If it is +12V it would be drained down to +5V; if it would be +6V - would be drained down to +5V. The value "5" is rather not exact - as diodes have some threshold (0.7V some can have 0.3V) - and probably is somethere in between 5.3-5.7V which is out of ADC range - thus we dont see all drained-down pulses sumed into single last bin of PHA plot.

I'm still not getting the answer I would like. You say "anything above +5V is drained-down to +5V before passing to ADC." You then mention 12v and 6v, but what is the upper limit?  Is it 12v?  Is it 20v?  The question is: what is the *limit* that "would [no longer] be drained down to 5v"?

My point is that I can somewhat imagine how far this plot extends to the right beyond 5v *before it is drained down to 5v*, but I'm just curious if there is a maximum value beyond which it is not *drained down to 5v".  The fact that we see the same integrated intensities, even at such high gain values, tells me the maximum allowable voltage pulse must be pretty darn high, but what is it exactly?



Another thing I noticed Saturday when I ran this Gain test is that I saw this displayed in PeakSight when I had something similar to the above PHA scan:



Probe for EPMA plots all the values just as it get them from the instrument, so I wonder why PeakSight clips the PHA display like this when in INTEGRAL mode...
« Last Edit: October 25, 2022, 06:20:35 PM by Probeman »
The only stupid question is the one not asked!

sem-geologist

  • Professor
  • ****
  • Posts: 224
Re: Does dead time vary as a function of emission energy?
« Reply #10 on: October 27, 2022, 03:25:50 AM »
The answer is a bit more convoluted than I wish It could be. The short answer (for Cameca hardware): there is no limit, and in integral mode You will catch even the cosmic radiation detected by counter (in our case that is about 0-10 cps). How do I know it is cosmic radiation? I can catch those pulses on oscilloscope.

They saturate the amplification (pulse has top part flattened (cut-off, or drained down to max voltage the OPAMP is able to output) ) of 2nd differentiator OPAMP. So the first ceiling is preamplifier-shapping amplifier-Class AB amplifier box mounted on the spectrometer - if amplitude of signal is too high it is limited to maximum possible output of OPAMP. Then there is some voltage drop at cable termination (75ohm) - the inputs to the WDS board has clamp diode protection (draining lower signal than -15V to -15V, and higher than +15V to +15V). receiving OPAMPS again there are not rail-to-rail and will limit the output to something like +/-12 or +/-13 V range. Then there is gain circuitry and here in new board design signals are scaled to OPAMPS with +/-12V supply thus those max values will be drained to something like +10V or +11V (Precise values can be checked in datasheets of OPAMPS). And lastly, after peak detection and holding its value in the pulse-hold chip it then goes through resistor-based voltage divider to scale it down to more less (I think it is intentionally set just a bit above 5V) -5V to + 5V and before it is passed to ADC excess (if there is any) is drained to  0 and 5V (or as I mentioned before, most likely rather to -0.7V and 5.7V due to diode voltage threshold).

So to tell the truth this clamping diodes before ADC of PHA wont see any signals more than +6V as they will be already pulled-down step by step in long pipeline of signal long before getting anywhere near ADC.

Anyway ability to sense the cosmic rays (blanked beam, not to huge gain to exclude the potential noise problems of circuit itself) just demonstrates that there is practically no upper limit... well if You really want some numbers to imagine, maybe some thunderstruck (giga-Volts) to the EPMA itself can be agreed as potentially obvious limit ⚡ 8)

As for Peaksight PHA...
1) Probably You have averaging of curve "on"
2) exported PHA data miss the last bin, it has not 256, but only 255 positions. (my memory is blurred, I think in v6.4 was artificially trying to tie the last value to 0V, or maybe in some previous version. At v6.5 it really does not do that).
I found out that it does the same thing on Peaksight 6.5. I think PHA in peaksight is a complete mess: saved distribution is offset from the presented plot. In Plot the graph finishes at 5.0V, there in saved txt at 4.826V. interestingly from graph it is clear that this last straight segment goes from last "real" measured and rightly present value toward half height at 5V. The highest point saved in txt is at 4.712V, but on graph it is 4.826V. Thus I think the last ADC bin could hold all the overflown counts which is intentionally engineered to be hidden from user and PHA  plot as in this kind of high gain situations it would broke whole "until any bin hits up-to-255" PHA acquisition logic. When something is being hidden it is just a question of time when developer itself can get confused - that inconsistency between Peaksight saved txt PHA and graphical plot just tells us that something very hacky and over-complicated is done behind the curtains, so complicated that confused a hell-out the developers of Peaksight.
 to conclude: txt of distribution has only 255 bins (8bits should have 256), and 5 last bins are actually obviously artificial interpolation.
So for 100% neither PHA plot neither PHA saved distribution txt files in Peaksight represent the real PHA measurements, but clearly those are highly interpolated, probably rebind and butchered to hide or workaround something. Not-cool!

What to imagine what is to the right from the visible PHA graph? I personally imagine continuation of the curve to 5.7V, and then huge steep vertical  bar after which the curve drops to 0V. Looking to the datasheet of 1N4148 diodes I see that there is no definitive answer what threshold value is exactly as it depends from many other conditions.

A question, ProbeSoftware uses some API to get the PHA directly from SX. Does it returns 256 channels or only 255?
« Last Edit: October 27, 2022, 05:19:11 AM by sem-geologist »

Probeman

  • Emeritus
  • *****
  • Posts: 2543
  • Never sleeps...
    • John Donovan
Re: Does dead time vary as a function of emission energy?
« Reply #11 on: October 27, 2022, 08:45:52 AM »
The short answer (for Cameca hardware): there is no limit

No limit works for me!     ;D

Would be interesting to have someone do a JEOL bias (or gain) test to see how consistent their returned intensities are when the PHA peak is shifted to the right (past 10v)...

A question, ProbeSoftware uses some API to get the PHA directly from SX. Does it returns 256 channels or only 255?

The PHA MCA API array is dimensioned to 256 (0 to 255) as seen here:

Private Type TypeSX100_PHA_MCA
    baseline As Long                   ' PHA baseline (in millivolts)
    window As Long                     ' PHA window (in millivolts)
    struct_align As Integer            ' structure alignment (?)
    struct_index As Integer            ' index (?)
    PHA_value(0 To BIT8&) As Byte      ' PHA data values
End Type

The Cameca API documentation isn't overly helpful but that is what is documented.

I will try and do some tests this weekend and post some results displaying the full number of returned values.
« Last Edit: October 27, 2022, 08:48:07 AM by Probeman »
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 2543
  • Never sleeps...
    • John Donovan
Re: Does dead time vary as a function of emission energy?
« Reply #12 on: October 31, 2022, 10:04:53 AM »
I ran some more PHA and gain tests over the weekend and found some interesting behaviors on my Cameca.
 
First I set the number of PHA points to 256 in PFE to see if I could reproduce the odd clipping behavior seen in PeakSight and yes I was able to see this.  First here at a gain of 1186:
 


Looks fine, right?  Now at a gain of 2232:



We see the same "clipping" behavior as PeakSight!   But here's the weird thing:  when I acquire a PHA scan in PFE, I see the PHA mode switch from integral to differential! And then back again as soon as the PHA acquisition is finished.   Now why would Cameca do that since I started in integral mode and don't care about the window setting! Donovan took a quick look at the code and says they aren't changing the mode to differential mode.

I mean I can understand setting the PHA to differential mode when performing a traditional (JEOL or Cameca SX50) style PHA scan where the baseline and window are set say 0.5 volts apart and then the baseline is scanned across the PHA range. But when using an MCA PHA scan (as Cameca has since the SX100), there's no reason to set it to differential mode. Right?

Anyway, here's another gain test (proxy for count rate) where I acquired a number of samples over a range of gain settings in integral mode, and one can see the intensities are essentially flat, except for spc 3 (again), but it is much flatter than before:



I thought I had adjusted spec 3 gain to start with the escape peak above the baseline as seen here at low gain:



and here at high gain where it appears to clip in the PHA scan, yet we see little to no change in the measured intensities:


 
So why is spc 3 still showing a (very) small increase in intensities as the gain is increased and the peak pushed beyond 5 v?   Note that spc 3 is the highest intensity. Yet the other spectometers show no increase at all?  If increasing the gain was causing clipping we should see a *decrease* in intensity, yet (at least on spec 3) we see a very small increase.  What mechanism could that be?  The (2 atm) detector is just getting "excited" at these higher count rates and gain settings?    ;D
 
My conclusions are that when in integral mode, no (or almost no) clipping is occurring in our intensity measurements (at least on Cameca instruments!) even as the PHA peak goes past 5v.

It would be great to see intensity data from JEOL instruments while the bais (or gain) is increased in integral mode and the PHA peak is pushed beyond 10v.
« Last Edit: October 31, 2022, 10:06:54 AM by Probeman »
The only stupid question is the one not asked!

sem-geologist

  • Professor
  • ****
  • Posts: 224
Re: Does dead time vary as a function of emission energy?
« Reply #13 on: November 02, 2022, 04:04:12 AM »
I ran some more PHA and gain tests over the weekend and found some interesting behaviors on my Cameca.
Your gathered data is valuable as it lets to precise some of PHA (or rather MCA) behaviour.



We see the same "clipping" behavior as PeakSight!   But here's the weird thing:  when I acquire a PHA scan in PFE, I see the PHA mode switch from integral to differential! And then back again as soon as the PHA acquisition is finished.   Now why would Cameca do that since I started in integral mode and don't care about the window setting! Donovan took a quick look at the code and says they aren't changing the mode to differential mode.
I would not call this "clipping" (albeit I guess in diff mode that could behave like this). Thanks To your PHA plots produced with PfS containing the similar signs of last plot segment interpolation to half height of last exposed measured point - it is now clear that Cameca WDS hardware returns not raw PHA distribution, but some highly altered and re-interpolated curve. I guess FPGA (where MCU logic is implemented) just ignores last 8 (? 7 - for Peaksight as it miss the 256th channel) highest channels (representing highest pulses and pulses overflowing the DAC) and creates fictional values for plotting by interpolation from value of last real value present (9th from the end) channel to half height of its value as end point of interpolation.

Now the important question is: can this be somehow bypassed, and could we get these raw counts from those last channels in differential mode? Does diff mode do this "reinterpolation" of last 8 channels only for plotting (this MCA buzzword stuff) or does it do that also for SCA (used during diff mode quanti, or actually always, as diff and integral modes from hardware and communication POV are both "on" simultaneously, and it is the software which decides from which of returned counting mode results (from both) to use and discard the other).


I mean I can understand setting the PHA to differential mode when performing a traditional (JEOL or Cameca SX50) style PHA scan where the baseline and window are set say 0.5 volts apart and then the baseline is scanned across the PHA range. But when using an MCA PHA scan (as Cameca has since the SX100), there's no reason to set it to differential mode. Right?

Your observed switching to (and back-from) diff mode is not weird at all. Integral mode is just counting of sensed pulses without any amplitude measurement (it alone can't do any PHA graph as there is no information about amplitude). Diff mode is based on measuring the pulse amplitude used for accepting or rejecting pulses depending from pulse amplitude and thus PHA is the means for diff mode. Albeit, I had never notice this switching on Peaksight during PHA aquisition (maybe I was not looking for that). This makes me wonder if this MCA (buzzword) is not for PHA (graphical) mode only, and SCA for normal acquisitions. I just want to remind that MCA and SCA is not some special hardware - it is way how data incoming from DAC is processed, and in case of new hardware all that logic is programmed in single FPGA, where on older hardware it was chain of microprocessors and microcontrollers.


Anyway, here's another gain test (proxy for count rate) where I acquired a number of samples over a range of gain settings in integral mode, and one can see the intensities are essentially flat, except for spc 3 (again), but it is much flatter than before:



I thought I had adjusted spec 3 gain to start with the escape peak above the baseline as seen here at low gain:



and here at high gain where it appears to clip in the PHA scan, yet we see little to no change in the measured intensities:


 
So why is spc 3 still showing a (very) small increase in intensities as the gain is increased and the peak pushed beyond 5 v?   Note that spc 3 is the highest intensity. Yet the other spectometers show no increase at all?  If increasing the gain was causing clipping we should see a *decrease* in intensity, yet (at least on spec 3) we see a very small increase.  What mechanism could that be?  The (2 atm) detector is just getting "excited" at these higher count rates and gain settings?    ;D
 

You thought that distribution at 1631 gain includes escape peak, but actually it includes only part of it. Probably You are lead to believe it is included (fully) as the left slope looks so natural and the shelf going to left decays to 0 counts before getting to 0 V. You should remember that Cameca (Contrary to Jeol) WDS board filters out the noise before signal is sent to pulse sensing and PHA part (this helps to have less of dead-time / or unnecessary counting electronic wasting time by noise pulse counting). It is because of noise pre-filtering the left side of PHA distribution close to 0V will always look like "natural" decaying to 0 counts with distance to 0V and that mislead observer to believe there is no cutoff (while in real it is being cut-out by noise cancellation before signal reaches the pulse sensing and PHA part in the pipeline). This is in fact much revealing, as it looks that Cameca PHA does not apply any baseline in the integral mode - There is no need as noise cancellation does it in the pipeline. Pros of this kind of approach, compared to Jeol design, is more processing time of counting electronics available for real X-ray pulses, where no time is wasted for background noise counts (remember every sensed pulse has also deadtime, and thus counting noise is wasteful); Cons is that esc peaks gets butchered often and needs special care to bring it completely out from being cut out. So at figure with 1631 gain You have actually butchered esc peak, and at gain 3069 you have the whole esc peak exposed (no need for question mark there).
How to find if esc peak is not butchered? There should be small depression between esc peak and main PHA peak, which clearly is missing at 1631 gain. Also it is good idea to set hardware dead time temporary to 4 or 5µs which statistically improves the PHA resolution a bit, and thus if that depression is missing at such conditions too - then clearly the left side of esc peak energies is cut out.


My conclusions are that when in integral mode, no (or almost no) clipping is occurring in our intensity measurements (at least on Cameca instruments!) even as the PHA peak goes past 5v.

To add to Your conclusions:
integral mode does not care about PHA at all. ADC and PHA is following the pulse sensing part, and pulse sensing part is alone enough for integral mode counts. However, thanks to this discussion I see one more things to check with experiments of artificial pulse generator:
* what if few subsequent pulses saturate OPAMPS - would that not make pulse sensing to miss such pulses? I see You checked this count rate vs gain linearity at low count rates, but how high gain would work on very how count rates (where I guess such OPAMP saturation could start to make the pulses be missed? At low count rates "cutting-off" the top of the pulse does not do much for sensing the pulse, but if few OPAMP saturated pulses would overlap that could make the comparator+Pulse-Hold chip tandem to miss the subsequent strongly saturated pulses completely... That is my hypothesis.

Interesting, looks we need few more things to check.
« Last Edit: November 02, 2022, 11:09:17 AM by sem-geologist »