Skip to content

Instantly share code, notes, and snippets.

@j-faria j-faria/gaussfit.py
Created Dec 12, 2018

Embed
What would you like to do?
Fit all the Gaussians
from scipy import optimize
gauss = lambda x,p: p[0]*exp(-(x-p[1])**2/(2*p[2]**2)) + p[3]
gaussfit = lambda x,y,p0: optimize.leastsq(lambda p, x, y: gauss(x, p) - y, p0, args=(x, y))[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.