def _rel_window_to_abs_window(el_min, el_max, w_0, w_sz=None):
    """Convert min/max eigenvalues and relative window to absolute values.

    Parameters
    ----------
    el_min : float
        Smallest eigenvalue.
    el_max : float
        Largest eigenvalue.
    w_0 : float [0.0 - 1.0]
        Relative window centre.
    w_sz : float, optional
        Relative window width.

    Returns
    -------
    l_0[, l_min, l_max]:
        Absolute value of centre of window, lower and upper intervals if a
        window size is specified.
    """
    el_range = el_max - el_min
    el_w_0 = el_min + w_0 * el_range
    if w_sz is not None:
        el_w_min = el_w_0 - w_sz * el_range / 2
        el_w_max = el_w_0 + w_sz * el_range / 2
        return el_w_0, el_w_min, el_w_max
    return el_w_0
