def tocreset(I, Ipickup, TD, curve="U1", CTR=1):
    """
    Time OverCurrent Reset Time Function.

    Function to calculate the time to reset for a TOC
    (Time-OverCurrent, 51) element.

    Parameters
    ----------
    I:          float
                Measured Current in Amps
    Ipickup:    float
                Fault Current Pickup Setting (in Amps)
    TD:         float
                Time Dial Setting
    curve:      string, optional
                Name of specified TOC curve, may be entry from set:
                {U1,U2,U3,U4,U5,C1,C2,C3,C4,C5}, default=U1
    CTR:        float, optional
                Current Transformer Ratio, default=1

    Returns
    -------
    tr:         float
                Time-to-Reset for characterized element.
    """
    # Condition Inputs
    curve = curve.upper()
    # Define Dictionary of Constants
    C = {"U1": 1.08, "U2": 5.95, "U3": 3.88,
         "U4": 5.67, "U5": 0.323, "C1": 13.5,
         "C2": 47.3, "C3": 80.0, "C4": 120.0,
         "C5": 4.85}
    # Evaluate M
    M = I / (CTR * Ipickup)
    # Evaluate Reset Time
    tr = TD * (C[curve] / (1 - M ** 2))
    return tr