def pulse_series_dose(t, X1, X2=0., pulse_width=0.1, interval=0.1):
    """Pulse function for dose administration, with X1 and X2 amounts
        alternately administered.

    :param t: current time point
    :type t: float
    :param X1: amount of dose administered in high pulse
    :type X1: float
    :param X2: amount of dose administered in low pulse, defaults to 0.
    :type X2: float, optional
    :param pulse_width: time duration of high pulse, defaults to 0.1
    :type pulse_width: float, optional
    :param interval: time duration of low pulse, ie interval between high
        pulses; defaults to 0.1
    :type interval: float, optional
    :return: dose administered at time t
    :rtype: float
    """
    if t % (pulse_width + interval) < pulse_width:
        return X1
    else:
        return X2