def decayFinder(pulse,threshold):
    """
    For a positive "pulse", define a threshold and return the 
    index immediately after that threshold is passed for a 
    second time. 

    Parameters
    ----------
    pulse: array_like
        1-d set of values that make up the ordinates of a 
        positive pulse
    threshold : float
        A value > the minimum pulse value, and < the max pulse
        value
    
    Returns
    -------
    index : int
        The index of the pulse value immediately after the 
        pulse value is < than the threshold, if the 
        threshold has already been passed once.
    """
    index = 0
    flag = False
    peakIndex = max(range(len(pulse)), key=pulse.__getitem__)
    for i in range(len(pulse)):
        if (flag == True) and (pulse[i] < threshold) and (i > peakIndex):
            index = i
            break
        if pulse[i] > threshold:  # flag the first crossing
            flag = True
    return index