NSLS-II / PyXRF

Fluorescence fitting GUI.
http://nsls-ii.github.io/PyXRF
BSD 3-Clause "New" or "Revised" License
31 stars 23 forks source link

Improved stability of fitting algorithm for total spectrum fitting #244

Closed dmgav closed 3 years ago

dmgav commented 3 years ago

The heights (areas) of emission lines are initialized with a reasonable value (1000) each time before the first step of fitting of total spectrum. Initialization slightly improves fitting time and prevents rare occurrances of very long conversion time on some datasets in cases the parameters are very close to optimal values and areas of some peaks are very small. This change does not prevent the issue to occur in case the 2nd step of optimization is enabled, but the 2nd step is disabled by default and seems to be very rarely used.