  The motion of an ion in a radiofrequency (rf) Paul trap is described by the
Mathieu equation and the associated stability parameters that are proportional
to the rf and dc electric field gradients. Here, a higher-order, iterative
method to accurately solve the stability parameters from measured secular
frequencies is presented. It is then used to characterize an endcap trap by
showing that the trap's radial asymmetry is dominated by the dc field gradients
and by measuring the relation between the applied voltages and the gradients.
The results are shown to be in good agreement with an electrostatic
finite-element-method simulation of the trap. Furthermore, a method to
determine the direction of the radial trap axes using a 'tickler' voltage is
presented and the temperature dependence of the rf voltage is discussed. As an
application for optical ion clocks, the method is used to predict and minimize
the electric quadrupole shift (EQS) using the applied dc voltages. Finally, a
lower limit of 1070 for the cancellation factor of the Zeeman-averaging EQS
cancellation method is determined in an interleaved low/high EQS clock
measurement. This reduces the EQS uncertainty of our $^{88}$Sr$^+$ optical
clock to ${\lesssim} 1\times 10^{-19}$ in fractional frequency units.
