def location_to_bin(A, loc):
    """
    Returns the bin where a location is hashed to
    A: sub-sampling matrix
    loc: location of the tone
    """
    hashed_bin = A.dot(loc) % 2
    return hashed_bin