1. A method to determine distortion correction data for distortion correction of magnetic resonance images acquired with a magnetic resonance system, comprising the steps of: (a) in a processor, calculating a starting spherical function representing the magnetic field of a gradient coil, comprising a conductor, of the magnetic resonance system on the basis of conductor geometry of the conductor of the gradient coil; (b) in a processor, determining a three-dimensional parameter map that represents a magnetic field generated by the gradient coil using a defined measurement subject, with a defined gradient strength set for the gradient coil; (c) in a processor, generating a deviation parameter map from the parameter map and from a reference parameter map determined with the gradient coil deactivated; (d) in a processor, determining spherical function coefficients of the gradient magnetic field by fitting a spherical function representing the magnetic field of the gradient coil to the deviation parameter map using the starting spherical function; and (e) in a processor, determining distortion correction data from the spherical function coefficients of the fitted spherical function, and making said distortion correction data available in a form for correcting said magnetic resonance images.