A structural phase-transition in K(Mg1−xCux)F3 perovskite