An electrostatic trap such as an orbitrap is disclosed, with an electrode structure. An electrostatic trapping field of the form U′(r,φ,z) is generated to trap ions within the trap so that they undergo isochronous oscillations. The trapping field U′(r, φ,z) is the result of a perturbation W to an ideal field U(r, φ,z) which, for example, is hyperlogarithmic in the case of an orbitrap. The perturbation W may be introduced in various ways, such as by distorting the geometry of the trap so that it no longer follows an equipotential of the ideal field U(r, φ,z), or by adding a distortion field (either electric or magnetic). The magnitude of the perturbation is such that at least some of the trapped ions have an absolute phase spread of more than zero but less than about 2π radians over an ion detection period Tm.