Contraction of Z pinches actuated by radiation losses