def METHOD_NAME(interpolator, md, roiSize=5):
    #global zvals, dWidth
    global lobeSeparation, axis_x
    #generate grid to evaluate function on
    X, Y, Z, safeRegion = interpolator.getCoords(md, slice(-roiSize,roiSize), slice(-roiSize,roiSize), slice(0, 2))
    #print Z, safeRegion
    if len(X.shape) > 1: #X is a matrix
        X_ = X[:, 0, 0]
        Y_ = Y[0, :, 0]
    else:
        X_ = X
        Y_ = Y
    z = numpy.arange(-500, 500, 10)
    p = interpolator.interpModel.max(2)
    if md['PRI.Axis'] == 'x':
        I = p.max(1)
    else:
        I = p.max(0)
    sepr = I[int(I.size/2):].argmax()
    sepl = I[int(I.size/2)::-1].argmax()
    #print sepr, sepl
    lobeSeparation = sepr + sepl
    axis_x = md['PRI.Axis'] == 'x'    
    ps = []
    for z0 in z:    
        d = interpolator.interp(X, Y, Z + z0)