def create_periodic_dosing(timeHigh, timeLow, highVal, lowVal=0):
    """Create a Periodic dosing profile

    Create a dosing profile which oscillates between high and low values.
    Remains high for timeHigh and low for lowHigh each period

    :param timeHigh: Time dosing remains at highVal (float)
    :param timeLow: Time dosing remains at lowVal (float)
    :param highVal: dosing ammount during high levels (float)
    :param lowVal: dosing level during low levels (float)
    :returns: Dosing Profile
    :rtype: Callable[[float], float]
    """

    def inner(t: float) -> float:
        phase = t%(timeHigh + timeLow)
        return highVal if phase <= timeHigh else lowVal

    return inner