Autoionization detection method for measuring spectra of atomic Rydberg states in zero and electric fields