Ion current modulation of a residual gas analyzer