Analysis of and resonances of ions