def SignsToSector(signs):
    """Takes a boolean array and returns the integer given by those binary digits."""
    sum = 0
    for i in range(signs.shape[0]):
        if signs[i]: sum += 1 << i
    return sum