Spectra of multiply charged nickel and copper ions in an X-pinch plasma