[SciPy-User] Three-term gaussian fit to gaussian data using scipy (Otto Ngeke)

Otto Ngeke lieemlieem at gmail.com
Fri Apr 7 02:57:15 EDT 2017


HI Sergio,

Thanks for the new fit. I am in a bit of a difficulty because the set of
Gaussians I have chosen is to go as input to another software, and that
software only accepts the Gaussians in that specific form. If I modify as
you suggested, then I can no longer use the software.

On Thu, Apr 6, 2017 at 11:46 PM, Sergio Rojas <sergio_r at mail.com> wrote:

>
> ------------------------------
>
> Message: 3
> Date: Thu, 6 Apr 2017 08:56:56 +0200
> From: Otto Ngeke <lieemlieem at gmail.com>
> To: SciPy Users List <scipy-user at python.org>
> Subject: Re: [SciPy-User] Three-term gaussian fit to gaussian data
> using scipy
> Message-ID:
> <CAO7y-mt2KekFx+1-=M5m_+A=+-n-JmTQ3jCYQbLwB8bF3cZrKw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I tried to pay more attention to the initial guess as suggested, and found
> a very nearly close fit! The new initial guess I used is
>
> p0=[V.max(), std_dev, V.max(), 2]
>
> See attached for new fit.
>
> ...
> ...
> -------------------
>
> In case a set of gaussians aren't a constraint to your fit,
>
> you might want to play a bit with something like,
>
> return ps1*np.exp(-(x/ps2)**2)*np.sin(x)**2 + ps2*np.exp(-(x/ps3)**2) +
> ps3*np.exp(-(x/ps4)**2)
>
> and the set of parameters:
>
> p0=[V.max(), std_dev, V.min(), 2]
>
> Reagrds,
>
> Sergio
> Non-linear fitting stuff:
> https://www.packtpub.com/big-data-and-business-intelligence/numerical-and-
> scientific-computing-scipy-video
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at python.org
> https://mail.python.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-user/attachments/20170407/7c06d811/attachment.html>


More information about the SciPy-User mailing list