def calculate_pos_deviation_square(error, sl):
    """
    Calculate the square deviation between a given error value and a significance level
    if the deviation is positive (>0)
    
    Parameters
    ----------
    error : error
    sl : significance level
    
    Returns
    -------
    square deviation or 0
    
    """
    
    if error > sl:
        return (error-sl)**2
    else:
        return 0