Hindered rotations probed by rare earths in crystals: Er3+ and Tm3+ in BaY2F8