def WavelengthErrorFunction(self, shift, data, model):
        modelfcn = UnivariateSpline(model.x, model.y, s=0)
        weight = 1e9 * np.ones(data.x.size)
        weight[data.y > 0] = 1.0 / np.sqrt(data.y[data.y > 0])
        weight[weight < 0.01] = 0.0
        newmodel = modelfcn(model.x + float(shift))
        if shift < 0:
            newmodel[model.x - float(shift) < model.x[0]] = 0
        else:
            newmodel[model.x - float(shift) > model.x[-1]] = 0
        returnvec = (data.y - newmodel) ** 2 * weight
        return returnvec


    ### -----------------------------------------------
Test Valet WSGI service secure TLS request response
dataset/ETHPy150Open kgullikson88/Telluric-Fitter/src/TelluricFitter.py/TelluricFitter.WavelengthErrorFunction--crossover with--dataset/ETHPy150Open ioflo/ioflo/ioflo/aio/http/test/test_serving.py/BasicTestCase.testValetServiceBottleSecure