# Make a  MonkhorstPackGrid with mirror symmetry in A direction and time reversal symmetry
symmetries = [( numpy.array([[-1,0,0], [0,1,0], [0,0,1]]), numpy.zeros(3))]
mpg = MonkhorstPackGrid(2, 5, 3, symmetries=symmetries)

# Get the kpoints
irreducible_kpoints = mpg.kpoints()
irreducible_weights = mpg.kpointsWeights()

all_kpoints = mpg.allKpoints()

# Print out the irreducible kpoints
print(len(irreducible_kpoints), ' irreducible kpoints')
for kp, w in zip(irreducible_kpoints, irreducible_weights):
    print(kp, w*len(all_kpoints))

# Get the map from the full kpoints to the irreducible part
fold_out_map = mpg.foldoutMapVector()

# Print out the relation between the full and irreducible set
print(len(all_kpoints), '  kpoints')
for i, kp in enumerate(all_kpoints):
    print(kp, ' -> ', irreducible_kpoints[fold_out_map[i]])