CdTe sensors on MPX3 should include as a part of the start-up procedure irradiation of the detector for a while. Actually, it would be even better to irradiate the detector for some time before each measurement. It polarises the sensor which then becomes very stable. I.e. any image corrections such as flat-field will work better. The attached plot is irradiation with 241Am source, so the time to build up the trapped charge in the sensor is relatively long. Irradiation with an X-ray tube should get it there a lot faster. How fast depends on the tube and conditions of the measurement, so should be checked for each setup.
The CSM mode was used here and is strongly recommended.