def gaussSmooth(xs, yrough, xi, yi, sig): #ys=[y*gaussNorm1D(x,mu,sig) for x,y in zip(xs,yrough)] Nx = len(xs) Nxi = len(xi) for j in range(Nx): if yrough[j] == 0.0: continue low = max(0, j * 5 - 50) high = min(Nxi, j * 5 + 50) yi[low:high] += gauss1D(array(xi[low:high]), yrough[j], xs[j], sig)
def gaussSmooth(xs,yrough,xi,yi,sig): #ys=[y*gaussNorm1D(x,mu,sig) for x,y in zip(xs,yrough)] Nx=len(xs) Nxi=len(xi) for j in range(Nx): if yrough[j]==0.0: continue low=max(0,j*5-50) high=min(Nxi,j*5+50) yi[low:high]+=gauss1D(array(xi[low:high]),yrough[j],xs[j],sig)
def sumgauss(xcenter,ycenter,xgrid,ygrid,sigma): return gaussFunctions.gauss1D(xgrid,ygrid,ycenter,xcenter,sigma)
def sumgauss(xcenter, ycenter, xgrid, ygrid, sigma): return gaussFunctions.gauss1D(xgrid, ygrid, ycenter, xcenter, sigma)