def METHOD_NAME(res, X, Y, roiSize = 5, errScale = 1, cutoffErr=10, cutoffSigma = 3):
    xs = [r.x0() for r in res if not r.fitErr is None and r.fitErr[1] < cutoffErr and r.sigma() < cutoffSigma]
    ys = [r.y0() for r in res if not r.fitErr is None and r.fitErr[1] < cutoffErr and r.sigma() < cutoffSigma]
    return np.histogram2d(xs,ys,[X, Y])[0]