def get_slope(x,t):
    """This function calculates the slope of a peak from exceeding the threshold to the maximum.

        Args:
            x (list): x Values from which the slope is to be determined
            t (list): time section from which the slope is to be determined

        Returns:
            slope (float): slope of the section
        """
    end = 0
    flag = False
    for i in range(len(x)-1):
        if flag == False:
            if x[i+1] > x[i]:
                pass
            else:
                end = i
                flag = True
    slope = (x[end]-x[0])/(t[end]-t[0])
    return slope