def increase_threshold(thresh, thresh_inc):
    """
    Increase the threshold based on a string

    Inputs: - thresh        Initial threshold
            - thresh_inc    How the threshold should be increased.
                                "xN": multiply by N
                                "+N": increase by N

    Output: - thresh        Increased threshold
    """

    if thresh_inc.startswith("x"):
        return thresh * float(thresh_inc.split("x")[1])

    elif thresh_inc.startswith("+"):
        return thresh + float(thresh_inc.split("+")[1])

    raise ValueError("Unkown threshold update: {}".format(thresh_inc))