Method for generating at least one image data set and one reference image data set of an examination object from at least two raw data sets , having the following steps: - providing a first raw data set , wherein the first raw data set is acquired with a magnetic resonance system and comprises measurement signals at a plurality of read-out points in the k-space , wherein the read-out points lie on a first k-space trajectory , - providing a second raw data set , wherein the second raw data set is acquired with the same magnetic resonance system and at the same examination object as the first raw data set and comprises measurement signals at a plurality of read-out points in the k-space , wherein the read-out points lie on a second k-space trajectory that is different from the first k-space trajectory , - reconstruction of a plurality of image data sets from the first raw data set , wherein before the reconstruction of each image data set , a separate distortion correction coefficient set is used, wherein a distortion correction coefficient set defines a shift of the read-out points of the measurement signals of the first raw data set in the k-space , - reconstruction of a reference image data set from the second raw data set , - comparison of the image data sets with the reference image data set , wherein on comparison one similarity value (α 87 , α 88 , α 89 , α 90 ) respectively is generated, and - selection of the image data set with the greatest similarity value (α 87 , α 88 , α 89 , α 90 ) and storage of the associated distortion correction coefficient set, wherein the first k-space trajectory is more sensitive to gradient deviations than the second k-space trajectory. - providing a first raw data set , wherein the first raw data set is acquired with a magnetic resonance system and comprises measurement signals at a plurality of read-out points in the k-space , wherein the read-out points lie on a first k-space trajectory , - providing a second raw data set , wherein the second raw data set is acquired with the same magnetic resonance system and at the same examination object as the first raw data set and comprises measurement signals at a plurality of read-out points in the k-space , wherein the read-out points lie on a second k-space trajectory that is different from the first k-space trajectory , - reconstruction of a plurality of image data sets from the first raw data set , wherein before the reconstruction of each image data set , a separate distortion correction coefficient set is used, wherein a distortion correction coefficient set defines a shift of the read-out points of the measurement signals of the first raw data set in the k-space , - reconstruction of a reference image data set from the second raw data set , - comparison of the image data sets with the reference image data set , wherein on comparison one similarity value (α 87 , α 88 , α 89 , α 90 ) respectively is generated, and - selection of the image data set with the greatest similarity value (α 87 , α 88 , α 89 , α 90 ) and storage of the associated distortion correction coefficient set, wherein the first k-space trajectory is more sensitive to gradient deviations than the second k-space trajectory. <EOS>