A common issue when running espm is that the peak poisitions of the G matrix do not perfectly align with where the peaks are in the dataset, as well as their shape.
A good solution would be to perform a "precalibration" step, where the average spectrum is fit by the G matrix but alowing shifting the positions of the gaussians.
The idea would be to fit the average data with a set of free gaussians with initial positions and intensity ratios set by the kV_xrays.json tables and then fit with least squares, allowing small energy shifts and small changes in width. The result of this fit should then be used to set the energy scale, energy offset, gaussian width and intercept (as is called in espm) and small shifts in the line positions).
Ideally, this can set a proper G matrix that will improve the results of the subsequent NMF decompositon.
The addition of this functionality will be part of Perry's summer intership with us.
A common issue when running espm is that the peak poisitions of the G matrix do not perfectly align with where the peaks are in the dataset, as well as their shape.
A good solution would be to perform a "precalibration" step, where the average spectrum is fit by the G matrix but alowing shifting the positions of the gaussians.
The idea would be to fit the average data with a set of free gaussians with initial positions and intensity ratios set by the kV_xrays.json tables and then fit with least squares, allowing small energy shifts and small changes in width. The result of this fit should then be used to set the energy scale, energy offset, gaussian width and intercept (as is called in espm) and small shifts in the line positions).
Ideally, this can set a proper G matrix that will improve the results of the subsequent NMF decompositon.
The addition of this functionality will be part of Perry's summer intership with us.