X rays from foil-excited iodine beams