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?
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 high 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.