Commensurate lock-in in holographic non-homogeneous lattices