

def WavelengthErrorFunction(self, shift, data, model):
    '\n        Error function for the scipy.minimize fitters. Not meant to be\n        called directly by the user!\n        '
    modelfcn = UnivariateSpline(model.x, model.y, s=0)
    weight = (1000000000.0 * np.ones(data.x.size))
    weight[(data.y > 0)] = (1.0 / np.sqrt(data.y[(data.y > 0)]))
    weight[(model < 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

dataset/ETHPy150Open kgullikson88/Telluric-Fitter/src/TelluricFitter.py TelluricFitter.WavelengthErrorFunction/VarMisuse@88/142 `weight`->`model`