Page 1 of 1

esfit autoscale question

Posted: Tue Dec 20, 2022 1:10 pm
by iliak

Hi,

I have a question about esfit autoscale option. How does it attempt to scale the experimental and simulated spectra? In the older esfit, we could choose between several options, but this seems to be gone. Specifically my issue is that esfit autoscale does not seem to give anything close to the correct scaling to start viable comparison between the simulated and the experimental spectra. See attached screenshots with and without autoscale on.

I tried using normalized and non-normalized experimental data to the same result.

Thank you in advance for any suggestions.

Script and experimental data are attached.


Re: esfit autoscale question

Posted: Tue Jan 10, 2023 9:07 am
by Matt Krzyaniak

The Autoscale checkbox is just a scale factor, obtained through simple linear regression. While the BaseLine menu emulates options given in previous versions and includes polynomial coefficients in that linear regression. In previous version, those two options were folded together into a single dropdown.

That said, the scaling is probably not working so great on your dataset because the initial guess isn't too good and your bounds are too restrictive. For testing purposes, you can emulate the Autoscale option using sim_y = rescaledata(sim_y,data_y,'lsq'); in your initial setup, rather than normalizing. My suggestion is to explore the parameter space a bit more before relying on esfit to minimize.