def w020_from_defocus(radius, zi, deltaZ, wavelen=1.0):
    """Return the maximum wavefront error corresponding to defocus amount
    `deltaZ`

    Parameters
    ----------
    radius : float
        The radius of the aperture in units of length (usually mm)
    zi : float
        Image distance (or the distance of the observation plane) in the
        same units of length as ``radius``. For objects at infinity,
        ``zi`` is the focal length of the lens.
    deltaZ : float
        The amount of defocus/focus-shift along the optical axis.
        Generally ``deltaZ = za - zi`` where ``za`` is the point of
        convergence of the actual/aberrated wavefront on the optical axis.
    wavelen : float
        The ``waveLength`` is used to specify a wavelength if the
        coefficient w020 needs to be "relative to the wavelength"

    Returns
    -------
    w020 : float
        Wavefront error coefficient for defocus. w020 is the maximum
        wavefront error, which is measured at the edge of the pupil.

    Notes
    -----
    The relation between the wavefront error and the defocus as derived
    using paraxial assumption and scalar diffraction theory.
    It is given as:

    .. math::

        W_{020} = \\frac{\\delta_z a^2}{2 zi(z_i + \\delta_z)}

    which may also be approximated as :math:`W_{020} = \delta_z/8N^2`, where
    ``N`` is the f-number.

    See Also
    --------
    defocus()
    """
    w020 = (deltaZ*radius**2)/(2.0*zi*(zi + deltaZ))
    return w020/wavelen