def str2tuple(idx_str):
    """
    Convert a miller index string to a tuple. 
    
    Arguments
    ---------
    idx_str: str
        String for miller index such as "1,1,1"
        
    Returns
    -------
    tuple
        Returns integer tuple such as (1,1,1)
    
    """
    idx = []
    temp_idx = ""
    for char in idx_str:
        if char == "-":
            temp_idx += char
        else:
            temp_idx += char
            idx.append(temp_idx)
            temp_idx = ""
    idx = tuple([int(x) for x in idx])
    return idx