def _parse_nyquist_vel(nyquist_vel, radar, check_uniform):
    """ Parse the nyquist_vel parameter, extract from the radar if needed. """
    if nyquist_vel is None:
        nyquist_vel = [radar.get_nyquist_vel(i, check_uniform) for i in
                       range(radar.nsweeps)]
    else:   # Nyquist velocity explicitly provided
        try:
            len(nyquist_vel)
        except:   # expand single value.
            nyquist_vel = [nyquist_vel for i in range(radar.nsweeps)]
    return nyquist_vel