def f2norm(params, en=1, mu=1, f2=1, weights=1):
    """
    Objective function for matching mu(E) data to tabulated f''(E)
    """
    p = params.valuesdict()
    model = (p['offset'] + p['slope'] * en + f2) * p['scale']
    return weights * (model - mu)
