A method for generating phase image data, the method comprising the steps: receiving first x-ray image data comprising first pixel-wise measurement signal values; receiving second x-ray image data comprising second pixel-wise measurement signal values; wherein the first x-ray image data was obtained in a first measurement mode and the second x-ray image data was obtained in a second measurement mode different from the first measurement mode; determining phase image data comprising pixel-wise phase values from the first and second x-ray image data (28a, 28b) by determining a phase value at a pixel from a first measurement signal value obtained in a first measurement mode at the pixel and a second measurement signal value obtained in a second measurement mode at the pixel by using an x-ray detector configured for simultaneously performing the first and second measurement modes; wherein the first x-ray image data was obtained with a first spectral weighting of photon energies and the second x-ray image data was obtained with a second spectral weighting different from the first spectral weighting; and characterised in that the phase value is determined based on a first sensitivity function (Φ i) modelling an energy behavior of the first measurement mode and based on a second sensitivity function (Φ i) modelling an energy behavior of the second measurement mode, the first sensitivity function being different from the second sensitivity function. receiving first x-ray image data comprising first pixel-wise measurement signal values; receiving second x-ray image data comprising second pixel-wise measurement signal values; wherein the first x-ray image data was obtained in a first measurement mode and the second x-ray image data was obtained in a second measurement mode different from the first measurement mode; determining phase image data comprising pixel-wise phase values from the first and second x-ray image data (28a, 28b) by determining a phase value at a pixel from a first measurement signal value obtained in a first measurement mode at the pixel and a second measurement signal value obtained in a second measurement mode at the pixel by using an x-ray detector configured for simultaneously performing the first and second measurement modes; determining phase image data comprising pixel-wise phase values from the first and second x-ray image data (28a, 28b) by determining a phase value at a pixel from a first measurement signal value obtained in a first measurement mode at the pixel and a second measurement signal value obtained in a second measurement mode at the pixel by using an x-ray detector configured for simultaneously performing the first and second measurement modes; wherein the first x-ray image data was obtained with a first spectral weighting of photon energies and the second x-ray image data was obtained with a second spectral weighting different from the first spectral weighting; and characterised in that the phase value is determined based on a first sensitivity function (Φ i) modelling an energy behavior of the first measurement mode and based on a second sensitivity function (Φ i) modelling an energy behavior of the second measurement mode, the first sensitivity function being different from the second sensitivity function.