def w2_cal_func(x):
    """Calibration fit for W2 from Patel+2014."""
    if x < 5.3:
        return 1.5777 - 0.3495 * x + 0.016 * x**2
    elif 5.3 <= x < 6.7:
        return -0.353 + 0.8826 * x - 0.238 * x**2 + 0.017 * x**3
    else:
        return 0.0