1. A method for linearizing a radiation detector, the method comprising: measuring a pulse height spectrum (S) of a predetermined radiation source; identifying at least one spectrum template (T) for the predetermined radiation source; and determining a linearization function by comparing the measured pulse height spectrum (S) with the at least one identified spectrum template (T), wherein the at least one spectrum template (T) is a predefined synthesized energy spectrum for the predetermined radiation source and for the corresponding radiation detector.