Software for X- and gamma-ray spectrometry