-
Notifications
You must be signed in to change notification settings - Fork 1
Description
First, thanks for making this amazing software available.
I have a question about the channel-to-energy conversion. In PolynomialEnergyCalibration.cs, we have this for a second degree polynomial:
this.coefficients[2] * Math.Pow(n, 2) + this.coefficients[1] * n + this.coefficients[0];
Do you consider the first channel to be n=0, or n=1?
Consider a Radiacode XML output file that has a well-defined peak in the n-th channel in the XML file. When I compare such a well-defined peak in the Radiacode app vs. BecqMoni, I suspect that:
- Radiacode calculates this energy as
c*n**2 + d*n + e - BecqMoni calculates this energy as
c*(n-1)**2 + d*(n-1) + e
In other words, I suspect that BecqMoni considers the tenth channel to be n=9 (indexing 0..9), while Radiacode consider it to be n=10 (indexing 1..10).
For a typical set of coefficients (c, d, e), the difference in energy produced by these two calculations can be on the order of 2 to 4 keV. This is minor, but shifts the location of peaks when plotted against energy.
All this is to ask:
- Is there a standard way to do this, and does BecqMoni follow that standard? (or does Radiacode not follow that standard?)
- is there a way to accommodate these differences?
Thanks for considering this. As I said, it's minor, but if we can address this and eliminate a difference of a few keV, that's a win!
EDIT: Adding a demonstration plot below.
