Theoretical investigations of the energy gain of the ions from the R.F fields and design of an aperiodic R.F mass spectrometer