def METHOD_NAME(res, X, Y, roiSize = 5, errScale = 1, cutoffErr=100, cutoffSigma = 400/2.35):
    im = np.zeros((len(X), len(Y)), 'f')
    #record our image resolution so we can plot pts with a minimum size equal to res (to avoid missing small pts)
    delX = abs(X[1] - X[0]) 
    for r1 in res:
        for r in r1.results:
            xg = r.metadata.voxelsize_nm.x*(r.slicesUsed[0].start + r.slicesUsed[0].stop)/2
            yg = r.metadata.voxelsize_nm.y*(r.slicesUsed[1].start + r.slicesUsed[1].stop)/2
            dx = r.x0() - xg
            dy = r.y0() - yg
            xn = xg + dy
            yn = yg + dx
            ix = abs(X - xn).argmin()
            iy = abs(Y - yn).argmin()
            if (ix > roiSize) and (ix < (len(X) - roiSize)) and  (iy > roiSize) and (iy < (len(Y) - roiSize)) and  not r.fitErr is None and r.fitErr[1] < cutoffErr and r.sigma() < cutoffSigma and r.resultCode==1:
                imp = Gauss2D(X[(ix - roiSize):(ix + roiSize + 1)], Y[(iy - roiSize):(iy + roiSize + 1)],1, xn,yn,max(r.fitErr[1]*errScale, delX))
                im[(ix - roiSize):(ix + roiSize + 1), (iy - roiSize):(iy + roiSize + 1)] += imp
    return im