def METHOD_NAME(data, X, Y, Z=None):
    A, x0, y0, dw = _calcParams(data, X, Y)
    #clamp dw to valid region
    dw_ = min(max(dw, splines['z'][0][0]), splines['z'][0][-1])
    #lookup z
    z0 = max(min(splev(dw_, splines['z'])[0], 500), -500)
    #correct position & intensity estimates for z position
    A = A/max(splev(z0, splines['A'])[0], .1)
    x0 = x0 - splev(z0, splines['xp'])[0]
    y0 = y0 - splev(z0, splines['yp'])[0]
    b = data.min()
    return [A, x0, y0, -z0, b]