How to guess the actual lorentzian function without relaxation behavior with Least square curve fitting

守給你的承諾、 提交于 2019-12-12 05:26:58

问题


I wanted to ask you if it would be possible to implement this idea:

So all in all, I measure a signal (blue curve, See plot of the measured data and the initial guess for the lorentzian function), this signal is a convolution of a lorentzian function and a certain relaxation kernel. I have an initial guess of the lorentzian function (see green curve), but as you notice, the green curve is not really aperfect lorentzian function , as it is still dissymmetric in the bottom. I have never used this tyme of curve fitting and would be really grateful if anyone could show me a little code-example to find the wanted lorentzian function or the actual relaxation kernel exp(-t/tau).

So now in steps:

  1. Say we have a lorentzian function, that decays with a certain relaxation time tau, tau is not a constant but a function of time. So say we have a measured data that we will model as a convolution between a lorentzian function and a relaxation kernel, exp(-t/tau) (please see blue curve)
  2. With a certain algorithm I implemented, I have a first guess of the "unrelaxated" lorentzian function and the relaxation kernel exp(-t/tau) (please see the green one).
  3. now I would like to do least-square curve-fitting in order to determine the best relaxation kernel and the best fit for the lorentzian function that would much my data.

回答1:


I have used the Differential Evolution genetic algorithm that is in recent versions of scipy to aid in fitting a double Lorentzian peak equation to Raman spectroscopy data with excellent results. Change the data and fitted equation in my GitHub code to your own and you should be done.

The GitHub URL for this project is:

https://github.com/zunzun/RamanSpectroscopyFit



来源:https://stackoverflow.com/questions/44440479/how-to-guess-the-actual-lorentzian-function-without-relaxation-behavior-with-lea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!