This technology includes the determination of temperature dependent temporal deviations of the real from the intended gradient waveforms and k-space trajectories during MRI image acquisition, and the use of appropriate temperature dependent pre-compensations to avoid or reduce the image distortion caused by these temporal deviations on the gradient waveforms and k-space trajectories, which will improve imaging quality. The determination of the temperature dependence includes a) direct measurements of the trajectory at the temperature the system operates during the scan, and b) measurements of the trajectory at different temperatures and modelling or interpolating the trajectory at the temperature the system operates during the scan.