Mercury iodide as a gamma spectrometer