Analysis of the spectrum of triply ionized magnesium (Mg IV).