Analysis of the fringe field region of magnetic quadrupole lenses: field measurements and ion optical calculations