An X-ray detector system includes a photon-counting detector with multiple detector modules including a respective power-consuming circuitry. At least some of the detector modules include a temperature sensor to monitor a temperature on the detector module and generate a temperature representing signal. A detector controller selectively switches, for at least a subset of the detector modules, the detector modules between an idle mode in which at least a respective part of the detector modules is powered off and an operational mode in which the detector modules are powered on. The power-consuming circuitries of the at least a subset of detector modules generate calibration data based on the temperature representing signals to correct for any temperature-induced changes to image data generated by the photon-counting detector.