fast fitting: simplify loop logic#1131
Conversation
|
What is the reason for the maximum number of refits to be |
|
If you have repeated the fit for all the elements twice, you surely are in an endless loop. Therefore a limit based on the number of fitted peak areas. |
The original/legacy implementation without OutputBuffer was simpler and on those lines. |
|
The change on the limits is to be reverted. McaAdvancedFitBatch and FastXRFLinearFit follow the same philosophy: if no limits are passed, the limits in the fit configuration are used. use_limits was implemented on user request to avoid having irreproducible interactive sessions because of not selecting exactly the same zoom region. |
We have been using
FastXRFLinearFitwith a patchedOutputBufferfor a while in ewoks to have full control over the output but we had to disable refitting since it's a one-way street. In addition this code was insanely complex. So I decided to bite the bullet and useClassMcaTheorywithConcentrationsTooldirectly.I'm in the process of dissecting the
FastXRFLinearFitcode and several merge requests will follow.This MR tackles only the loop itself. In a follow-up I will tackle the bad pixel stuff. There is another MR on the xmin/xmax limits.