1. An apparatus comprising: a radiation sensitive detector which produces an output in response to ionizing radiation; a discriminator which produces first and second outputs based on the rate of change of the detector output; a first integrator triggered by the first discriminator output and which generates a first integrator output; a second integrator triggered by the second discriminator output and which generates a second integrator output; a first corrector which uses the first and second integrator outputs to generate a first output indicative of detected radiation having a first energy range and a second output indicative of detected radiation having a second energy range, wherein the first corrector corrects for pulse pile-ups in the detector output.