def _bolus_arrival(time_series):
    """
    Determines the bolus uptake volume number. If it could not
    be determined, then the first time point is taken to be the
    uptake volume.

    :param time_series: the 4D time series image
    :return: the bolus arrival volume number, or 1 if the arrival
        cannot be calculated
    """
    from qipipe.helpers.bolus_arrival import bolus_arrival_index, BolusArrivalError
    try:
        return bolus_arrival_index(time_series) + 1
    except BolusArrivalError:
        return 1
