Population of rotational and isomeric states in rare earths